Functions

Name

Description

AddConst

AnalyzeEquation

AnalyzeStmtRefs

ApplyBinOP

ApplyLoopSplitting

ApplyUnaryOP

ArrayReferences

AstPostProcessing

This does all post‐processing fixup and translation of the Sage III AST.

Clone

Closure

CompareVal

ComputeLoopDep

CopyArrayOpt2String

CopyNodeEdge

CopySplitNodeEdge

CountEnclosedStmts

CountIteratorSize

DebugAnnot

DecomposeAffineExpression

DepGraphInsertLoop

DepGraphNodeAlignLoop

DepGraphNodeInsertLoop

DepGraphNodeMergeLoop

DepGraphNodeRemoveLoop

DepGraphNodeRestrictDomain

DepGraphNodeSwapLoop

DepType2String

DoubleToString

EdgeDir2DepDir

Equal

FindFirst

FindVal

FuseDepGraphNode

FuseSliceNests

GenerateDotGraph

Generate a dot graph named 'fileName' from a call graph

GetCommonLoop

GetEnclosingLoop

GetExprVal

GetFirstOperand

GetFusionInfo

GetLoopLevel

GetOperatorVariant

GetValBound

GetValLB

GetValUB

GraphNodeToString

GraphToString

HasFraction

IncreaseAlign

IsImportantForSliceSgFilter

IsNIL

IsOne

IsSCGenerated

IsValidDep

IsZero

IteratorToString1

IteratorToString2

LessThan

Max

Min

MoveNodeEdge

NormalizeForLoop

NormalizeMatrix

OptimizeLoopTree

PrintResults

PropagateDefUseChainUpdate

ReadAstTraverse

Traverse an entire AST, where op is invoked on each AST node to gather information.

ReferenceDimension

ReferenceStride

RelToString

ReplaceVal

RestrictDepDomain

Reverse

SelectDepLevel

SelectDepType

SelfSpatialReuse

SetDepDirection

SgExpr2Var

SgTreeTraversal_inFileToTraverse

SliceLoopIvar

SliceLoopRange

SliceLoopStep

SliceNestReverseTypedFusion

SliceNestTypedFusion

SplitEquation

TemporaryReuseRefs

ToString

TransformAstTraverse

Traverse and transform an entire AST, where op is invoked to transform each sub‐Tree.

UnwrapVarCond

UpdateEach

UpdateEachNodeEdge

UpdateMatrix

UpdateNodeEdge

UpdateSplitNodeEdge

XOMP_atomic_end

XOMP_atomic_start

XOMP_barrier

XOMP_critical_end

XOMP_critical_start

XOMP_flush_all

XOMP_flush_one

XOMP_init

XOMP_loop_default

XOMP_loop_dynamic_init

XOMP_loop_dynamic_next

XOMP_loop_dynamic_start

XOMP_loop_end

XOMP_loop_end_nowait

XOMP_loop_guided_init

XOMP_loop_guided_next

XOMP_loop_guided_start

XOMP_loop_ordered_dynamic_init

XOMP_loop_ordered_dynamic_next

XOMP_loop_ordered_dynamic_start

XOMP_loop_ordered_guided_init

XOMP_loop_ordered_guided_next

XOMP_loop_ordered_guided_start

XOMP_loop_ordered_runtime_init

XOMP_loop_ordered_runtime_next

XOMP_loop_ordered_runtime_start

XOMP_loop_ordered_static_init

XOMP_loop_ordered_static_next

XOMP_loop_ordered_static_start

XOMP_loop_runtime_init

XOMP_loop_runtime_next

XOMP_loop_runtime_start

XOMP_loop_static_init

Optional init functions, mostly used for working with omni RTL

XOMP_loop_static_next

XOMP_loop_static_start

XOMP_master

XOMP_ordered_end

XOMP_ordered_start

XOMP_parallel_end

XOMP_parallel_start

XOMP_sections_end

XOMP_sections_end_nowait

XOMP_sections_init_next

XOMP_sections_next

XOMP_single

XOMP_static_even_divide

XOMP_task

XOMP_taskwait

XOMP_terminate

XOR

_ompc_atomic_lock

_ompc_atomic_unlock

_ompc_barrier

_ompc_copyin_thdprv

_ompc_default_sched

_ompc_do_parallel

_ompc_do_single

_ompc_dynamic_sched_init

_ompc_dynamic_sched_next

_ompc_enter_critical

_ompc_exit_critical

_ompc_flush

_ompc_get_thdprv

_ompc_guided_sched_init

_ompc_guided_sched_next

_ompc_init

_ompc_init_ordered

_ompc_is_last

_ompc_is_master

_ompc_reduction

_ompc_runtime_sched_init

_ompc_runtime_sched_next

_ompc_section_id

_ompc_section_init

_ompc_static_bsched

_ompc_static_sched_init

_ompc_static_sched_next

_ompc_terminate

addPredefinedVars

addPrototypesForTemplateInstantiations

Fixups transformations that have added template instantiations or caused template instantiations to be output so that there is a proper prototype declaration before the template instantation is called.

annotateNumCallers

attachPreprocessingInfo

backend

backendCompilesUsingOriginalInputFile

backendGeneratesSourceCodeButCompilesUsingOriginalInputFile

buildArtificialFrontier

buildSourceFileForHeaderFile

buildTokenStreamMapping

buildTokenStreamMappingForRoot

buildVariableList

changeAllMembersToPublic

Change all members in a program to be public. There should really be a smarter procedure for this that only changes members used by inlined code.

checkIsCompilerGeneratedFlag

Checks whether appropriate nodes of an AST are marked as compiler‐generated.

checkIsFrontendSpecificFlag

Checks whether appropriate nodes of an AST are marked as front‐end specific.

checkIsModifiedFlag

checkOpenACCIR

checkOpenMPIR

checkPhysicalSourcePosition

Checks whether the physical source position information is consistant in the Sg_File_Info object

checkTransformedFlagsVisitor

Check for consistancy of isTransformation flags for nodes marked as a transformation.

clang_main

clang_to_dot_main

cleanupInlinedCode

Combined procedure for cleaning up code after inlining. Does not do variable renaming or block flattening, however.

closeLibHandle

computePreviousAndNextNodes

convertAffinityClause

convertAllocatorClause

convertAtomicDefaultMemOrderClause

convertBindClause

convertBodyDirective

convertClause

convertCombinedBodyDirective

convertDefaultClause

convertDefaultmapClause

convertDependClause

convertDepobjUpdateClause

convertDirective

convertDistScheduleClause

convertExpressionClause

convertExtImplementationDefinedRequirementClause

convertFromClause

convertInitializerIntoAssignment

Convert something like "int a = foo();" into "int a; a = foo();"

convertMapClause

convertNonBodyDirective

convertOmpAllocateDirective

convertOmpDeclareSimdDirective

convertOmpDeclareTargetDirective

convertOmpEndDeclareTargetDirective

convertOmpFlushDirective

convertOmpParallelStatementFromCombinedDirectives

convertOmpRequiresDirective

convertOmpTaskwaitDirective

convertOmpThreadprivateStatement

convertOpenACCBodyDirective

convertOpenACCClause

convertOpenACCDirective

convertOpenACCExpressionClause

convertOrderClause

convertProcBindClause

convertScheduleClause

convertSizesClause

convertToClause

convertUsesAllocatorsClause

convertVariantBodyDirective

convertVariantDirective

convertWhenClause

copy_backend

copy_mapped_variable

A helper function to copy a mapped variable from src to desc

debug_cfg

defaultFunctionGenerator

destructorCallAnnotator

detectMacroExpansionsToBeUnparsedAsAstTransformations

detectMacroOrIncludeFileExpansions

detectTransformations

Detect nodes marked as transformations (should not be present coming out of the frontend translation).

detectTransformations_local

determineFileType

doFiniteDifferencingOne

Do finite differencing on one expression within one context. The expression must be defined and valid within the entire body of root. The rewrite rules are used to simplify expressions. When a variable var is updated from old_value to new_value, an expression of the form (var, (old_value, new_value)) is created and rewritten. The rewrite rules may either produce an arbitrary expression (which will be used as‐is) or one of the form (var, (something, value)) (which will be changed to (var = value)).

doInline

Main inliner code. Accepts a function call as a parameter, and inlines only that single function call. Returns true if it succeeded, and false otherwise. The function call must be to a named function, static member function, or non‐virtual non‐static member function, and the function must be known (not through a function pointer or member function pointer). Also, the body of the function must already be visible. Recursive procedures are handled properly (when allowRecursion is set), by inlining one copy of the procedure into itself. Any other restrictions on what can be inlined are bugs in the inliner code.

doRTI

dominates

edgePointerReplacement

edgePointerReplacement overloads

escapeString

escape_double_quotes

existsVariable

expressionTreeEqual

Are two expressions equal (using a deep comparison)?

expressionTreeEqualStar

Are corresponding expressions in two lists equal (using a deep comparison)?

filterGraph

* The function void filterGraph(_GraphStructure& graph, _NodePredicate _nodePred) will filter out all nodes which satisfy the criteria which makes_NodePredicate return 'true'. NodePredicate is any function object that takes a_GraphStructure::Node as a paramater and returns a bool. In order for this to work a function_GraphStructure::DeleteNode must be implemented in order to Delete the nodes. This exact function is implemented asprotected in IDGraphCreateTemplate so it should be easy.*

findAndCallFunctionUsingDlopen

findBasicBlockForStmt

findFollowingPositions

findFunctionUsingDlopen

findIfStmtForSC

findInitializedNamesInScope

Get all variable names declared within a scope, in the correct order for destruction

findIterator

findNearestParentOfType

findPosition

findPrecedingPositions

findRootFunc

Returns the function definition containing the specified statement.

findRoseSupportPathFromBuild

Find the path of a ROSE support file from the build tree.

findRoseSupportPathFromSource

Find the path of a ROSE support file from the source tree.

findStatementForExpression

findVariablesUsedInRegion

Find all variables referenced in a region

finishSageAST

fixReturnStatements

Workaround for ROSE bug. Should be used whenever expressions in a program are modified.

fixupAstDeclarationScope

Fixup all SgDeclarationStatement to have a consistant scope (between the defining and all non‐defining declarations).

fixupAstDefiningAndNondefiningDeclarations

Fixup all SgDeclarationStatement references to defining and non‐defining declarations.

fixupAstSymbolTables

Fixup global and local symbol tables.

fixupAstSymbolTablesToSupportAliasedSymbols

Fixup C++ symbol tables to use aliasing symbols for using declarations.

fixupDeclarations

Fixup definingDeclaration and firstNondefiningDeclaration pointers in SgDeclarationStatement.

fixupEnumValues

fixupFileInfoInconsistanties

Checks and fixes up inconsistanties in the settings of Sg_File_Info flags (e.g. isTransformation flag) in the Sg_File_Info object

fixupFortranReferences

Fixup Fortran array vs. function references.

fixupFortranUseDeclarations

Fixup Fortran Use declarations.

fixupFriendDeclarations

fixupFriendTemplateDeclarations

fixupFunctionDefaultArguments

fixupFunctionDefinitions

fixupGlobalFunctionSymbolTable

Fixup the names used build the global function symbol table.

fixupInClassDataInitialization

fixupInitializersUsingIncludeFiles

fixupNullPointersInAST

Fixup specific pointers in the AST that we would like to not have be NULL.

fixupPrettyFunctionVariables

fixupSelfReferentialMacrosInAST

Fixup known macros that reference themselves and cause recursive macro expansion in the generated (unparsed) code.

fixupSourcePositionConstructs

fixupSourcePositionInformation

fixupStorageAccessOfForwardTemplateDeclarations

Fixup the storage access of all compiler‐generated forward declarations (non‐defining declarations) to match that of the defining declaration.

fixupTemplateArguments

fixupTemplateDeclarations

fixupTemplateInstantiations

Fixups template specializations generated by ROSE from template instantiations.

fixupTypeReferences

fixupforGnuBackendCompiler

flattenBlocks

Flatten nested blocks of code in a program. This code requires that variable names in the region being processed are already distinct, and it may extend variable lifetimes to the end of the outer block of code.

frontend

frontendExitStatus

frontendShell

frontierDetectionForTokenStreamMapping

generateAstGraph

generateDOT

generateDOT_withIncludes

generateDOTforMultipleFile

generateGraphOfAST

generateGraphOfIncludeFiles

generateModFile

generateNameQualificationSupport

generatePDF

generateWholeGraphOfAST

generateWholeGraphOfAST overloads

generateWholeGraphOfAST_filteredFrontendSpecificNodes

getAffineIneq

getAffineIneqDesc

getAlgebraicRules

A standard set of algebraic rules for simple optimizations

getAllLiveVarsAt

getAllNodes

getArrayRefsInSubtree

getArrayVarRefsInSubtree

getCallGraph

getDominators

getFiniteDifferencingRules

A standard set of algebraic and finite‐differencing rules

getLiveInVarsAt

getLiveOutVarsAt

getLocalScopeNum

Returns a unique positive integer ID to an SgScopeStatement within a function definition.

getNodeID

getNumCallers

getOpenMPBlockBody

getOperatorFunctionName

getPreprocessorDirectives

getReadVarRefsInSubtree

getRootOfExpression

Get the topmost enclosing expression of a given expression. Needs to be moved.

getStatementOfExpression

Get the statement of an expression. Somewhat smarter than the standard version of this routine, but needs to be merged.

getTokenStream

getVarRefsInSubtree

getVariantName

A global function for getting the string associated with an enum (which is defined in global scope)

getWriteVarRefsInSubtree

get_output_filename

get_type_name

returns the name of type t

graphNodesAfterCopy

hasAddressTaken

Does expression expr potentially have its address taken somewhere in the tree pointed to by root?

initAnalysis

initializeExplicitScopeSupport

Initialize explicit scopes (support function should not be called).

initializeExplicitScopes

Initialize explicit scopes (located only at specific IR nodes).

insertFortranContainsStatement

Insert Fortran "CONTAINS" statement.

intermediateRepresentationNodeGraph

isFortranPairedDirective

isMemberVariable

Internal routine to check whether a given variable declaration is a member variable.

isPotentiallyModified

Is expression expr potentially modified (assigned to, address taken, passed by non‐const reference) somewhere in the tree pointed to by root?

isSgExpression

isSgExpression overloads

isSgInitializedName

isSgInitializedName overloads

isSgStatement

isSgStatement overloads

isTypeConsidered

isVarExpr

is_id

is_num

is_operator

is_space

joinMangledQualifiers

Joins two sets of mangled qualifiers to form a new mangled qualifier.

joinMangledQualifiersToString

Joins two sets of mangled qualifiers to form a new mangled qualifier.

linearize_subtree

makeEdge

Utility function to make CFG Edges

mangleExpression

Mangles a constant expression, needed for template arguments.

mangleFunctionName

Returns a mangled form of a C++ function name, as an SgName object.

mangleFunctionNameToString

Returns a mangled form of special C++ function names (excl. qualifiers).

mangleLocalScopeToString

Produces a mangled name for a scope statement.

mangleQualifiers

Mangles a chain of qualifiers, returning an SgName object.

mangleQualifiersToString

Mangles a chain of qualifiers followed from a given scope.

mangleSgValueExp

Mangles a boolean expression.

mangleTemplate

mangleTemplate overloads

mangleTemplateArgsToString

mangleTemplateArgsToString overloads

mangleTemplateFunction

Mangles an instantiated template function or member function, returning a SgName object.

mangleTemplateFunctionToString

Mangles an instantiated template function or template member function.

mangleTemplateToString

mangleTemplateToString overloads

mangleTranslationUnitQualifiers

If the declaration has translation unit scope (as opposed to program scope), mangle the translation unit name.

mangleTypes

Mangles a list of types, returning an SgName object.

mangleTypesToString

Mangles a container of types, returning an STL std::string object.

mangleValueExp

Mangles a value expression, as used in a template argument.

markAsCompilerGenerated

Mark an AST subtree as compiler generated (used for instatiated templates generated by ROSE as specializations).

markBackendSpecificFunctionsAsCompilerGenerated

Mark an backend specific functions as compiler generated.

markForOutputInCodeGeneration

Mark an AST subtree as compiler generated and to be output in the source file (code generation phase).

markLhsValues

Mark relavant expressions as l‐values explicitly.

markOverloadedTemplateInstantiations

Mark any template instatiations that are overloaded (we can't output these since g++ can't resolve them).

markSharedDeclarationsForOutputInCodeGeneration

Mark an AST subtree to be unparsed using an alternative file (for multi‐file unparsing).

markTemplateInstantiationsForOutput

Fixups template instantiations generated by ROSE from template declarations.

markTemplateSpecializationsForOutput

markTransformationsForOutput

Fixups transformations (which are often marked at a high level and need to be marked properly through their subtree).

mlogAssertFail_C

mlogLevelToString_CXX

mlogMore_C

mlog_C

moveForDeclaredVariables

Move variables declared in a for statement to just outside that statement.

myStatementInsert

Insert a new statement before or after a target statement. If allowForInit is true, the new statement can be inserted into the initializer of a for statement. Needs to be merged

normalizeTypedefSequenceLists

omp_exprparser_parse

omp_exprparser_parser_init

omp_get_wtick

omp_simd_write_arm

omp_simd_write_intel

operator&

Bitwise conjunction operators

operator&=

Bitwise conjunction assignment operators

operator*

Multiplication operators

operator+

Addition operators

operator‐

Unary minus operators

operator/

operator|

Bitwise disjunction operators

operator|=

Bitwise disjunction assignment operators

outputFirstAndLastIncludeFileInfo

outputMap

outputPredefinedMacros

Output at least some of the predefined macro settings.

p_AddOp

Match an addition operation

p_CommaOp

Match a comma operation

p_MultiplyOp

Match a multiplication operation

p_PlusAssignOp

Match an add‐assign operation

p_int

Match a particular integer

p_value

Match any constant into a variable

p_var

Match anything into a variable

parseArraySectionExpression

parseExpression

parseOmpArraySection

parseOmpExpression

parseOmpVariable

parseOpenACC

parseOpenMP

parseOpenMPFortran

patact

Create a PatternActionRule

pcloseFromVector

peek_ch

peek_id

peek_next

popenReadFromVector

postProcessingSupport

Postprocessing that is not likely to be handled in the legacy frontend/Sage III translation.

printAffineInequalities

printConstrGraphAnalysisStates

printDivAnalysisStates

printDominatorAnalysisStates

printLiveDeadVarsAnalysisStates

printNodeConstAnalysisStates

printSeqStructAnalysisStates

printSgnAnalysisStates

processTemplateHandlingOptions

Fixup template instantiations to unmark them for output followingsemantics of gnu template options

propagateHiddenListData

Propagate hidden list information for variables, types, and class elaboration.

pushTestIntoBody

Rewrites a while or for loop so that the official test is changed to "true" and what had previously been the test is now an if‐break combination (with an inverted condition) at the beginning of the loop body

queryIsImportantForSliceType

queryIsImportantForSliceTypeWithCalls

read_ch

read_graph

read_id

read_list

Read a list of items of type ItemGen, they are separated using 'sep'

read_num

read_operator

rebindVariableAndLabelReferences

Change all variable and label references to point to new symbols, created to point to the matching declaration found in the program. This needs to be moved into somewhere in FixSgTree.

removeEmptyElses

removeInitializedNamePtr

removeNullStatements

Remove all null statements (those with only an integer constant or a null expression)

removeUnusedVariables

Remove unused variables in a scope

removeVariableDeclaration

Remove the declaration of a given variable

renameLabels

Rename all labels in a block of code.

renameVariables

Rename all variables in a block of code, and ensure that all variable references point to the correct declarations.

replaceAssignmentStmtWithStatement

Replace an assignment statement with the result of a statement generator. Assumptions: from has assignment expr at top level of statement from is not in the test of a loop or if statement not currently traversing from

replaceChild

Replace a child of a node.

replaceExpressionWithExpression

Replace the expression "from" with another expression "to", wherever it appears in the AST. The expression "from" is not deleted, and may be reused elsewhere in the AST.

replaceNonAlphaNum

reportNodesMarkedAsModified

resetConstantFoldedValues

This function acts in two different ways

resetContructorInitilizerLists

resetFileInfoParentPointersInMemoryPool

This traversal calls ResetFileInfoParentPointersInMemoryPool Memory Pool traversal.

resetNamesInAST

resetParentPointers

Interface function to reset parent pointers.

resetParentPointersInMemoryPool

This traversal calles ResetParentPointersInMemoryPool Memory Pool traversal.

resetParentPointersOfClassOrNamespaceDeclarations

This is a top level function not called recursively.

resetSourcePositionToGeneratedCode

resetTemplateNames

Sets names of template classes (calls custom traversal).

resetTypesInAST

resolveLogicalBinaryOpType

resolveRoseClangPaths

resolveRosePaths

rewrite

Rewrite a node and its children recursively using a rule. Iterate until no more changes can be made.

roseInstallPrefix

Find the path of the ROSE install prefix.

rosePathIsWithinTree

rose_dynamic_library_exists

rose_getline

Reads a line of text from a stream.

rose_strtoull

Convert a string to an unsigned long integer.

runAffineIneqPlacer

runNodeConstAnalysis

runPlaceUniqueIDs

saveCFGsToDots

setTrueFalseIneq

affineInequalitiesPlacer *

shortCircuitingTransformation

simpleCopyAndConstantPropagation

In code with declarations such as "int foo = bar", where foo and bar are not modified, replace "foo" with "bar" and remove the declaration

simpleFrontierDetectionForTokenStreamMapping

simpleIndexFiniteDifferencing

Do a simple form of finite differencing on all functions contained within root (which should be a project, file, or function definition).

simpleUndoFiniteDifferencingOne

Propagate definitions of a variable to its uses. Assumptions: var is only assigned at the top level of body nothing var depends on is assigned within body Very simple algorithm designed to only handle simplest cases

sla

sla_set_debug

systemFromVector

testAstForUniqueNodes

testForCycleInTemplateArgumentsOfTemplateDeclaration

toStringForRTI

topLevelResetParentPointer

This is a top level function not called recursively.

trimSpaces

Returns the input std::string stripped of leading and trailing spaces.

unescapeString

unparseDeclarationToString

Unparse the declaration as a string for use in prototypes within the AST rewrite mechanism prefix mechanism

unparseDirectory

Support for handling directories of files in ROSE (useful for code generation).

unparseFile

User callable function available if compilation using the backend compiler is not required.

unparseFileList

Support for refactored handling directories of files.

unparseIncludedFiles

User callable function available if compilation using the backend compiler is not required.

unparseProject

User callable function available if compilation using the backend compiler is not required.

unparseScopeStatementWithoutBasicBlockToString

Unparse the header of the scope statement (used in the prefix generation to permit context to be accounted for the in generation of AST fragements from strings, e.g. for cases in SgSwitchStatement).

unparseStatementWithoutBasicBlockToString

Unparse header of statements that have bodies (but are not scopes) (e.g. SgDefaultOptionStmt)

unparse_alignas

unparse_register_name

unsetNodesMarkedAsModified

version_message

version_number

writeList

write_graph

write_graph2

write_graph_node_edge

xomp_acc_init

xomp_beyond_block_reduction_double

xomp_beyond_block_reduction_float

xomp_beyond_block_reduction_int

xomp_deviceDataEnvironmentAddVariable

xomp_deviceDataEnvironmentEnter

xomp_deviceDataEnvironmentExit

xomp_deviceDataEnvironmentGetInheritedVariable

xomp_deviceDataEnvironmentPrepareVariable

xomp_deviceMalloc

xomp_freeArrayPointer

xomp_freeDevice

xomp_freeHost

xomp_get_max1DBlock

xomp_get_maxSegmentsPerDimensionOf2DBlock

xomp_get_maxThreadsPerBlock

xomp_get_max_devices

xomp_get_max_threads_per_dimesion_2D

xomp_get_num_devices

xomp_hostMalloc

xomp_init

xomp_mallocArray

xomp_memcpyDeviceToDevice

xomp_memcpyDeviceToHost

xomp_memcpyDynamicDeviceToHost

xomp_memcpyDynamicHostToDevice

xomp_memcpyHostToDevice

xomp_memcpyHostToHost

xomp_set_default_device

xomp_time_stamp

operator<<

Stream insertion operators

operator==

Equality operators

operator!=

Inequality operators

operator<

Less‐than operators

operator<=

Less‐than‐or‐equal operators

operator>

Greater‐than operators

operator>=

Greater‐than‐or‐equal operators