public class AliasAnalysis extends AnalysisPass
Switch off alias analysis intentionally using option level 0 on the command line.
The default for alias analysis is to provide alias information
using advanced interprocedural points-to analysis. See
IPPointsToAnalysis
. Points-to analysis in Cetus is
flow as well as context sensitive i.e. the analysis provides
pointer relationships at every program point using
limited context information as well. Alias analysis can use the
sets of pointer relationships at the relevant program
point to create accurate alias sets. Interprocedural
points-to analysis further helps crucial disambiguation,
especially in the case of arrays.
The advanced interprocedural analyzer is supplemented by a
simple array-argument disambiguation analysis,
ArrayParameterAnalysis
.
Constructor and Description |
---|
AliasAnalysis(Program program) |
Modifier and Type | Method and Description |
---|---|
void |
displayAliasMap()
Deprecated.
|
java.util.Set |
get_alias_set(Statement cur_stmt,
Symbol symbol)
Returns the alias set for the given input symbol, which includes the
input symbol itself.
|
java.lang.String |
getPassName() |
boolean |
isAliased(Statement stmt,
Symbol a,
java.util.Set<Symbol> bset)
Returns true if the given Symbol, a, is aliased to any symbol in the
set of Symbols, bset.
|
boolean |
isAliased(Statement stmt,
Symbol a,
Symbol b)
Returns true if Symbol a is aliased to Symbol b at the given statement.
|
boolean |
isAliasedToUniverse() |
void |
start()
This provides the high-level driver for Alias analysis.
|
run
public AliasAnalysis(Program program)
public java.lang.String getPassName()
getPassName
in class AnalysisPass
public void start()
For other global alias analyses, this procedure traverses the IR and collects whole program alias sets. These can be supported by user-provided information regarding interprocedural assumptions.
start
in class AnalysisPass
public java.util.Set get_alias_set(Statement cur_stmt, Symbol symbol)
For advanced analysis, it uses the interface to interprocedural points-to analysis. Alias sets are created from the map returned by the points-to analyzer.
cur_stmt
- Statement used to request flow-sensitive alias
information using advanced points-to analysissymbol
- The variable symbol for which alias sets are being
requested.@Deprecated public void displayAliasMap()
public boolean isAliased(Statement stmt, Symbol a, Symbol b)
public boolean isAliased(Statement stmt, Symbol a, java.util.Set<Symbol> bset)
public boolean isAliasedToUniverse()