Functions
Name |
Description |
This does all post‐processing fixup and translation of the Sage III AST. |
|
Generate a dot graph named 'fileName' from a call graph |
|
Traverse an entire AST, where op is invoked on each AST node to gather information. |
|
Traverse and transform an entire AST, where op is invoked to transform each sub‐Tree. |
|
Optional init functions, mostly used for working with omni RTL |
|
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. |
|
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. |
|
Checks whether appropriate nodes of an AST are marked as compiler‐generated. |
|
Checks whether appropriate nodes of an AST are marked as front‐end specific. |
|
Checks whether the physical source position information is consistant in the Sg_File_Info object |
|
Check for consistancy of isTransformation flags for nodes marked as a transformation. |
|
Combined procedure for cleaning up code after inlining. Does not do variable renaming or block flattening, however. |
|
Convert something like "int a = foo();" into "int a; a = foo();" |
|
A helper function to copy a mapped variable from src to desc |
|
Detect nodes marked as transformations (should not be present coming out of the frontend translation). |
|
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)). |
|
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. |
|
|
|
Are two expressions equal (using a deep comparison)? |
|
Are corresponding expressions in two lists equal (using a deep comparison)? |
|
* 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.* |
|
Get all variable names declared within a scope, in the correct order for destruction |
|
Returns the function definition containing the specified statement. |
|
Find the path of a ROSE support file from the build tree. |
|
Find the path of a ROSE support file from the source tree. |
|
Find all variables referenced in a region |
|
Workaround for ROSE bug. Should be used whenever expressions in a program are modified. |
|
Fixup all SgDeclarationStatement to have a consistant scope (between the defining and all non‐defining declarations). |
|
Fixup all SgDeclarationStatement references to defining and non‐defining declarations. |
|
Fixup global and local symbol tables. |
|
Fixup C++ symbol tables to use aliasing symbols for using declarations. |
|
Fixup definingDeclaration and firstNondefiningDeclaration pointers in SgDeclarationStatement. |
|
Checks and fixes up inconsistanties in the settings of Sg_File_Info flags (e.g. isTransformation flag) in the Sg_File_Info object |
|
Fixup Fortran array vs. function references. |
|
Fixup Fortran Use declarations. |
|
Fixup the names used build the global function symbol table. |
|
Fixup specific pointers in the AST that we would like to not have be NULL. |
|
Fixup known macros that reference themselves and cause recursive macro expansion in the generated (unparsed) code. |
|
Fixup the storage access of all compiler‐generated forward declarations (non‐defining declarations) to match that of the defining declaration. |
|
Fixups template specializations generated by ROSE from template instantiations. |
|
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. |
|
|
|
A standard set of algebraic rules for simple optimizations |
|
A standard set of algebraic and finite‐differencing rules |
|
Returns a unique positive integer ID to an SgScopeStatement within a function definition. |
|
Get the topmost enclosing expression of a given expression. Needs to be moved. |
|
Get the statement of an expression. Somewhat smarter than the standard version of this routine, but needs to be merged. |
|
A global function for getting the string associated with an enum (which is defined in global scope) |
|
returns the name of type t |
|
Does expression expr potentially have its address taken somewhere in the tree pointed to by root? |
|
Initialize explicit scopes (support function should not be called). |
|
Initialize explicit scopes (located only at specific IR nodes). |
|
Insert Fortran "CONTAINS" statement. |
|
Internal routine to check whether a given variable declaration is a member variable. |
|
Is expression expr potentially modified (assigned to, address taken, passed by non‐const reference) somewhere in the tree pointed to by root? |
|
|
|
|
|
|
|
Joins two sets of mangled qualifiers to form a new mangled qualifier. |
|
Joins two sets of mangled qualifiers to form a new mangled qualifier. |
|
Utility function to make CFG Edges |
|
Mangles a constant expression, needed for template arguments. |
|
Returns a mangled form of a C++ function name, as an SgName object. |
|
Returns a mangled form of special C++ function names (excl. qualifiers). |
|
Produces a mangled name for a scope statement. |
|
Mangles a chain of qualifiers, returning an SgName object. |
|
Mangles a chain of qualifiers followed from a given scope. |
|
Mangles a boolean expression. |
|
|
|
|
|
Mangles an instantiated template function or member function, returning a SgName object. |
|
Mangles an instantiated template function or template member function. |
|
|
|
If the declaration has translation unit scope (as opposed to program scope), mangle the translation unit name. |
|
Mangles a list of types, returning an SgName object. |
|
Mangles a container of types, returning an STL std::string object. |
|
Mangles a value expression, as used in a template argument. |
|
Mark an AST subtree as compiler generated (used for instatiated templates generated by ROSE as specializations). |
|
Mark an backend specific functions as compiler generated. |
|
Mark an AST subtree as compiler generated and to be output in the source file (code generation phase). |
|
Mark relavant expressions as l‐values explicitly. |
|
Mark any template instatiations that are overloaded (we can't output these since g++ can't resolve them). |
|
Mark an AST subtree to be unparsed using an alternative file (for multi‐file unparsing). |
|
Fixups template instantiations generated by ROSE from template declarations. |
|
Fixups transformations (which are often marked at a high level and need to be marked properly through their subtree). |
|
Move variables declared in a for statement to just outside that statement. |
|
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 |
|
Bitwise conjunction operators |
|
Bitwise conjunction assignment operators |
|
Multiplication operators |
|
Addition operators |
|
Unary minus operators |
|
Bitwise disjunction operators |
|
Bitwise disjunction assignment operators |
|
Output at least some of the predefined macro settings. |
|
Match an addition operation |
|
Match a comma operation |
|
Match a multiplication operation |
|
Match an add‐assign operation |
|
Match a particular integer |
|
Match any constant into a variable |
|
Match anything into a variable |
|
Create a PatternActionRule |
|
Postprocessing that is not likely to be handled in the legacy frontend/Sage III translation. |
|
Fixup template instantiations to unmark them for output followingsemantics of gnu template options |
|
Propagate hidden list information for variables, types, and class elaboration. |
|
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 |
|
Read a list of items of type ItemGen, they are separated using 'sep' |
|
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. |
|
Remove all null statements (those with only an integer constant or a null expression) |
|
Remove unused variables in a scope |
|
Remove the declaration of a given variable |
|
Rename all labels in a block of code. |
|
Rename all variables in a block of code, and ensure that all variable references point to the correct declarations. |
|
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 |
|
Replace a child of a node. |
|
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. |
|
This function acts in two different ways |
|
This traversal calls ResetFileInfoParentPointersInMemoryPool Memory Pool traversal. |
|
Interface function to reset parent pointers. |
|
This traversal calles ResetParentPointersInMemoryPool Memory Pool traversal. |
|
This is a top level function not called recursively. |
|
Sets names of template classes (calls custom traversal). |
|
Rewrite a node and its children recursively using a rule. Iterate until no more changes can be made. |
|
Find the path of the ROSE install prefix. |
|
Reads a line of text from a stream. |
|
Convert a string to an unsigned long integer. |
|
affineInequalitiesPlacer * |
|
In code with declarations such as "int foo = bar", where foo and bar are not modified, replace "foo" with "bar" and remove the declaration |
|
Do a simple form of finite differencing on all functions contained within root (which should be a project, file, or function definition). |
|
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 |
|
This is a top level function not called recursively. |
|
Returns the input std::string stripped of leading and trailing spaces. |
|
Unparse the declaration as a string for use in prototypes within the AST rewrite mechanism prefix mechanism |
|
Support for handling directories of files in ROSE (useful for code generation). |
|
User callable function available if compilation using the backend compiler is not required. |
|
Support for refactored handling directories of files. |
|
User callable function available if compilation using the backend compiler is not required. |
|
User callable function available if compilation using the backend compiler is not required. |
|
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). |
|
Unparse header of statements that have bodies (but are not scopes) (e.g. SgDefaultOptionStmt) |
|
Stream insertion operators |
|
Equality operators |
|
Inequality operators |
|
Less‐than operators |
|
Less‐than‐or‐equal operators |
|
Greater‐than operators |
|
Greater‐than‐or‐equal operators |