ROSE
0.9.6a
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ROSE
ROSE Web Reference
Available ROSE Documentation
Member Function getParent() Documentation
Default Constructor Destructor Documentation Page
Rose Attribute Mechanism Page
ROSE AST Copy Mechanism
AST Construction Documentation Experiment
Doxygen Bugs
ROSE Fortran Support
Instructions On How To Document ROSE
ROSE Project ToDo List
ROSE Project Publications
Related Work
ROSE Project Download Page
Shared vs. Nonshared IR Nodes within Sage III
ROSE Project Talks
Description of AST Diagnostics within ROSE
Test List
Todo List
Deprecated List
Bug List
Modules
Namespaces
Classes
Files
File List
3rdPartyLibraries.docs
abiStuff.h
action.h
actionchanger.h
adaptor_statistics.h
advanced_preprocessing_hooks.h
affineInequality.h
analysis.h
analysisCommon.h
AnalysisDebuggingUtils.h
analyze.h
ann.h
annotations.h
annvariable.h
arrIndexLabeler.h
Assembler.h
AssemblerX86.h
AssemblerX86Init.h
Ast.h
AST_FILE_IO.docs
AST_FILE_IO.h
AstAttributeMechanism.h
AstClearVisitFlags.h
AstCombinedProcessing.h
AstCombinedProcessingImpl.h
AstCombinedSimpleProcessing.h
AstCopyMechanism.docs
AstDiagnostics.docs
AstDOTGeneration.h
AstFromString.h
AstNodePtrs.h
AstNodeVisitMapping.h
AstPDFGeneration.h
AstProcessing.docs
AstProcessing.h
AstQueryMemoryPool.h
AstRestructure.h
AstReverseProcessing.h
AstReverseSimpleProcessing.h
AstSharedMemoryParallelProcessing.h
AstSharedMemoryParallelProcessingImpl.h
AstSharedMemoryParallelSimpleProcessing.h
AstSimpleProcessing.docs
AstSimpleProcessing.h
AstSuccessorsSelectors.h
AstTextAttributesHandling.h
AstTraversal.h
AstTraverseToRoot.h
attach_all_info.h
attachPreprocessingInfo.h
attachPreprocessingInfoTraversal.h
attributeListMap.h
AvailableDocumentation.docs
backend.docs
baseCFGIterator.h
BasicBlockLocalIndex.h
bdwy_liveness.h
binaryInstruction.C
BinaryLoader.h
BinaryLoaderElf.h
BinaryLoaderElfObj.h
BinaryLoaderPe.h
boostGraphCFG.h
BottomUpTraversalLiveness.h
broadway.h
broadway_expr.h
ByteOrder.h
C++_include_files.h
callbacks.h
Callgraph.h
CallGraph.h
CallGraphAnalysis.h
CallGraphTraverse.h
callingcontext.h
cfgNodeFilter.h
CFGRewrite.h
cfgToDot.h
cfgUtils.h
checkIsModifiedFlag.C
CheckWhichAreMarked.h
Classhierarchy.h
ClassHierarchyGraph.h
Combinatorics.h
commandline_processing.h
commandlineProcessingDocumentation.docs
cong_staticCFG.h
constantprop.h
ConstrGraph.h
ConstrGraphAnalysis.h
controlDependence.h
dominatorTreesAndDominanceFrontiers/ControlFlowGraph.h
staticInterproceduralSlicing/ControlFlowGraph.h
coverage_funcsC.h
cpattern.h
CreateSlice.h
CreateSliceSet.h
customFilteredCFG.h
Cxx_Grammar.h
Cxx_GrammarMemoryPoolSupport.h
Cxx_GrammarTreeTraversalAccessEnums.h
DataConversion.C
DataConversion.h
dataflow.h
DataFlowAnalysis.h
DataflowCFG.h
dataflowCfgFilter.h
DebugTool.h
defsAndUsesTraversal.h
defsAndUsesUnfilteredCfg.h
DefUseAnalysis.h
DefUseAnalysis_perFunction.h
DefUseAnalysisAbstract.h
DefUseChain.h
defUseChains.h
DefUseExtension.h
DependenceGraph.h
DFAFilter.h
DFAnalysis.h
dfaToDot.h
diagnostic.h
Disassembler.C
Disassembler.h
DisassemblerArm.C
DisassemblerArm.h
DisassemblerMips.h
DisassemblerPowerpc.h
DisassemblerX86.C
DisassemblerX86.h
DistributedMemoryAnalysis.h
DistributedMemoryAnalysisImplementation.h
divAnalysis.h
doc_example1.docs
midend/programTransformation/documentation.docs
backend/unparser/languageIndependenceSupport/documentation.docs
backend/unparser/CxxCodeGeneration/documentation.docs
backend/unparser/FortranCodeGeneration/documentation.docs
dominatorTreesAndDominanceFrontiers/DominanceFrontier.h
dominanceAnalysis/DominanceFrontier.h
dominatorAnalysis.h
dominatorTreesAndDominanceFrontiers/DominatorTree.h
dominanceAnalysis/DominatorTree.h
DominatorTreeImpl.h
doxygenBugs.docs
dwarfSupport.h
EDefUse.h
ElfDynamicLinking.C
ElfErrorFrame.C
ElfFileHeader.C
ElfNote.C
ElfRelocation.C
ElfSection.C
ElfSectionTable.C
ElfSegmentTable.C
ElfStringTable.C
ElfSymbolTable.C
ElfSymbolVersion.C
enum_property.h
escape.h
ExecDOS.C
ExecGeneric.C
ExecLE.C
ExecNE.C
Expressions.C
ExtentMap.C
extra.docs
ExtractFunctionArguments.h
ExtraRelatedPages.docs
fake_EDG.h
fileoffsetbits.h
frontend/SageIII/virtualCFG/filteredCFG.h
midend/programAnalysis/dominanceAnalysis/filteredCFG.h
filteredCFGImpl.h
FindStatements.h
fixupCopy.h
FormatRestorer.h
FortranSupport.docs
frontend.docs
functionEvaluationOrderTraversal.h
functionLevelTraversal.h
functionNames.h
functionState.h
general_token_defs.h
genericDataflowCommon.h
GenericDynamicLinking.C
GenericFile.C
GenericFormat.C
GenericHeader.C
GenericSection.C
GenericString.C
genUID.h
GlobalIndexing.h
GlobalVarAnalysis.h
grammarBaseClass.h
graphProcessing.h
graphProcessingSgIncGraph.h
graphTemplate.h
Hexdump.C
HowToDocumentROSE.docs
IncludeDirective.h
inputCode_collectComments.h
InsertPragma.h
InstructionEnumsMips.h
InstructionEnumsX86.h
intArithLogical.h
integerOps.h
IntelPinSupport.C
IntelPinSupport.h
InterProcDataFlowAnalysis.h
interproceduralCFG.h
InterproceduralInfo.h
IntraProcAliasAnalysis.h
IntraProcDataFlowAnalysis.h
iteratedDominanceFrontier.h
JeremiahContribution.h
KeepAttribute.h
lattice.h
latticeFull.h
libgomp_g.h
libompc.h
libxomp.h
libxompf.h
LinearCongruentialGenerator.h
liveDeadVarAnalysis.h
LivenessAnalysis.h
localstl.h
LogicalCond.h
manglingSupport.h
MarkingNodes.h
MemoryMap.C
MemoryMap.h
midend.docs
MSTL.docs
NEW_CreateSliceSet.h
NEW_DependenceGraph.h
NEW_EDefUse.h
newCDG.h
newDDG.h
nodeConstAnalysis.h
nodeState.h
omp.h
omp_lib.h
omp_lib_kinds.h
omp_lowering.h
ompAstConstruction.h
OmpAttribute.h
ompparser.h
ompparser.hh
optionDeclaration.h
partitionedAnalysis.h
Partitioner.C
Partitioner.h
PDG.h
PeExport.C
PeFileHeader.C
PeImportDirectory.C
PeImportItem.C
PeImportSection.C
PeRvaSizePair.C
PeSection.C
PeSectionTable.C
PeStringTable.C
PeSymbolTable.C
placeUIDs.h
pointerrule.h
printAnalysisStates.h
procedure.h
programVerification.h
projects.docs
ProjectToDoList.docs
property.h
PtrAliasAnalysis.h
PtrAnal.h
Publications.docs
QueryLib.docs
rangemap.h
reachingDef.h
ReachingDefinition.h
bitvectorDataflow/ReachingDefinitionFacade.h
dataflowAnalysis/ReachingDefinitionFacade.h
reachingDefUnfilteredCfg.h
Registers.C
Registers.h
RelatedWork.docs
RemovalOfNodes.h
report.h
rose.docs
rose_attributes_list.h
ROSE_DownloadPage.docs
RoseBin_DotGraph.h
RoseBin_GmlGraph.h
RoseBin_Graph.h
rosedefs.h
rosedll.h
RoseSrc_CallGraphAnalysis.h
roseTranslators.h
rtiHelpers.h
rule.h
Rva.C
rwAccessLabeler.h
sage.docs
sage3.h
sage3basic.h
sageBuilder.h
sageBuilderAsm.h
sageFunctors.h
sageGeneric.h
sageInterface.h
sageInterfaceAsm.h
saveDotAnalysis.h
SB_Graph.h
SDG.h
SDGLibraryExtender.h
sequenceStructAnalysis.h
set_property.h
SgAggregateInitializer.docs
SgAsmArmInstruction.C
SgAsmBlock.C
SgAsmFunction.C
SgAsmGenericSection.docs
SgAsmInstruction.C
SgAsmInterpretation.C
SgAsmMipsInstruction.C
SgAsmPowerpcInstruction.C
SgAsmStmt.docs
SgAsmX86Instruction.C
SgAssignInitializer.docs
SgBasicBlock.docs
SgBinaryNode.docs
SgBinaryOp.docs
SgBoolValExp.docs
SgBreakStatement.docs
SgCallExpression.docs
SgCaseOptionStmt.docs
SgCatchOptionStmt.docs
SgCatchStatementSeq.docs
SgClassDeclaration.docs
SgClassDefinition.docs
SgClassNameRefExp.docs
SgClassSymbol.docs
SgClinkageStartStatement.docs
SgConditionalExp.docs
SgConstructorInitializer.docs
SgContinueStmt.docs
SgCtorInitializerList.docs
SgDeclarationModifier.docs
SgDeclarationStatement.docs
SgDefaultOptionStmt.docs
SgDeleteExp.docs
SgDirectory.docs
SgDoubleVal.docs
SgDoWhileStmt.docs
SgEnumDeclaration.docs
SgExecStatement.docs
SgExpression.docs
SgExprListExp.docs
SgExprStatement.docs
SgFile.docs
SgFileInfo.docs
SgFloatVal.docs
SgForInitStatement.docs
SgForStatement.docs
SgFunctionCallExp.docs
SgFunctionDeclaration.docs
SgFunctionDefinition.docs
SgFunctionParameterList.docs
SgFunctionRefExp.docs
SgFunctionType.docs
SgFunctionTypeTable.docs
SgGlobal.docs
SgGotoStatement.docs
SgGraphTemplate.h
SgIfStmt.docs
SgInitializedName.docs
SgInitializer.docs
SgIsNotOp.docs
SgIsOp.docs
SgLabelStatement.docs
SgLambdaRefExp.docs
SgListExp.docs
SgLocatedNode.docs
SgLongDoubleVal.docs
SgMemberFunctionDeclaration.docs
SgMemberFunctionRefExp.docs
SgMinusOp.docs
SgModifier.docs
SgModifierNodes.docs
SgName.docs
SgNamespaceAliasDeclarationStatement.docs
SgNamespaceDeclarationStatement.docs
SgNamespaceDefinitionStatement.docs
SgNamespaceSymbol.docs
sgnAnalysis.h
SgNaryBooleanOp.docs
SgNaryComparisonOp.docs
SgNaryOp.docs
SgNewExp.docs
SgNode.docs
SgOptions.docs
SgPointerAssignOp.docs
SgPragmaDeclaration.docs
SgProject.docs
SgPythonGlobalStmt.docs
SgQualifiedName.docs
SgRefExp.docs
SgReturnStmt.docs
SgScopeOp.docs
SgScopeStatement.docs
SgSizeOfOp.docs
SgSpawnStmt.docs
SgStatement.docs
SgStatementExpression.docs
SgStmtDeclarationStmt.docs
SgStorageModifier.docs
SgStringConversion.docs
SgSupport.docs
SgSwitchStatement.docs
SgSymbol.docs
SgSymbolTable.docs
SgTemplateArgument.docs
SgTemplateDeclaration.docs
SgTemplateInstantiationDecl.docs
SgTemplateInstantiationDefn.docs
SgTemplateInstantiationDirectiveStatement.docs
SgTemplateInstantiationFunctionDecl.docs
SgTemplateInstantiationMemberFunctionDecl.docs
SgThisExp.docs
SgThrowOp.docs
SgTryStmt.docs
SgTupleExp.docs
SgType.docs
SgTypeComplex.docs
SgTypeDefault.docs
SgTypedefDeclaration.docs
SgTypedefSeq.docs
SgTypeImaginary.docs
SgTypeString.docs
SgUnaryOp.docs
SgUsingDeclarationStatement.docs
SgUsingDirectiveStatement.docs
SgValueExp.docs
SgVariableDeclaration.docs
SgVariableDefinition.docs
SgVariableSymbol.docs
SgVarRefExp.docs
SgWhileStmt.docs
SharedNodes.docs
sideEffect.h
dominatorTreesAndDominanceFrontiers/SimpleDirectedGraph.h
staticInterproceduralSlicing/SimpleDirectedGraph.h
sla.h
Slicing.h
SlicingCriterion.h
SlicingInfo.h
sourceLocationInheritedAttribute.h
SqlDatabase.h
SqliteDatabaseGraph.h
ssaUnfilteredCfg.h
StackFrameVector.h
staticCFG.h
staticSingleAssignment.h
steensgaard.h
SteensgaardPtrAnal.h
string_functions.h
stringify.C
stringSupportDocumentation.docs
StringUtility.h
structure.h
support.h
taintAnalysis.h
Talks.docs
templateSupport.h
threadSupport.h
transformationSupport.h
unification_ann.h
uniqueNameTraversal.h
unparser.docs
Utf8.h
util.h
utilDocumentation.docs
utility_functions.h
ValueAnnot.h
ValuePropagate.h
VariableRenaming.h
variables.h
VariableStateTransfer.h
varSets.h
virtualBinCFG.C
virtualBinCFG.h
virtualCFG.h
VirtualCFGIterator.h
VirtualFunctionAnalysis.h
WorkLists.h
yicesParserLib.h
File Members
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ExtractFunctionArguments.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <rose.h>
4
#include "
functionEvaluationOrderTraversal.h
"
5
6
//class FunctionCallInfo;
7
13
class
ExtractFunctionArguments
14
{
15
public
:
16
19
void
NormalizeTree
(
SgNode
* tree,
bool
doUnsafeNormalization =
false
);
20
21
// returns a vector of newly introduced temporaries
22
std::vector<SgVariableDeclaration*>
GetTemporariesIntroduced
();
23
24
/*
25
IsNormalized: Given a subtree, returns true if every argument of every function call is a trivial arguemnt.
26
*/
27
bool
IsNormalized
(
SgNode
* tree);
28
29
/*
30
IsNormalizable: Given a subtree, returns true if every argument of every function call is a either trivial arguemnt or
31
is present in a SAFE place from where lifting is possible.
32
*/
33
bool
IsNormalizable
(
SgNode
* tree);
34
35
36
private
:
37
38
std::vector<SgVariableDeclaration*>
temporariesIntroduced
;
39
std::pair< std::vector<FunctionCallInfo>, std::vector<FunctionCallInfo> >
functionCalls
;
40
45
bool
FunctionArgumentNeedsNormalization
(
SgExpression
* argument);
46
49
bool
FunctionArgsNeedNormalization
(
SgExprListExp
* functionArgs);
50
53
bool
SubtreeNeedsNormalization
(
SgNode
* top);
54
57
void
RewriteFunctionCallArguments
(
const
FunctionCallInfo
& functionCallInfo);
58
61
void
InsertStatement
(
SgStatement
* newStatement,
SgStatement
* location,
const
FunctionCallInfo
& insertionMode);
62
63
bool
FunctionArgumentCanBeNormalized
(
SgExpression
* argument);
64
65
66
/* Given the expression which is the argument to a function call, returns true if that
67
expression is trivial. Trivial expressions are those which are simple variable references or constants.
68
*/
69
bool
IsFunctionArgumentTrivial
(
SgExpression
* argument);
70
71
/* Given a vector of function call sites returns true if every argument of every function call is a trivial expression
72
(IsFunctionArgumentTrivial). Such functions don't need to be normalized.
73
*/
74
bool
AreAllFunctionCallsTrivial
(std::vector<FunctionCallInfo> functions);
75
76
/* Given a vector of function call sites, returns true if every argument
77
at every function call site is either trivial (IsFunctionArgumentTrivial) or can be normalized (FunctionArgumentCanBeNormalized).
78
*/
79
bool
AreAllFunctionCallsNormalizable
(std::vector<FunctionCallInfo> functions);
80
};
rose-edg4x
src
midend
programTransformation
extractFunctionArgumentsNormalization
ExtractFunctionArguments.h
Generated on Mon May 5 2014 17:29:23 for ROSE by
1.8.4