|
clang 24.0.0git
|
Basic CIR alias analysis based on pointer provenance and distinct allocation sites. More...
#include "clang/CIR/Dialect/Analysis/CIRBasicAliasAnalysis.h"
Public Member Functions | |
| CIRBasicAliasAnalysis (mlir::Operation *op) | |
| CIRBasicAliasAnalysis (CIRBasicAliasAnalysis &&)=default | |
| mlir::AliasResult | alias (mlir::Value lhs, mlir::Value rhs) |
| Return the aliasing behavior between two values. | |
| mlir::ModRefResult | getModRef (mlir::Operation *op, mlir::Value location) |
| Return the modify-reference behavior of op on location. | |
Basic CIR alias analysis based on pointer provenance and distinct allocation sites.
Conservative defaults (MayAlias / ModRef) are returned for cases that are not yet handled.
Definition at line 30 of file CIRBasicAliasAnalysis.h.
|
inlineexplicit |
Definition at line 32 of file CIRBasicAliasAnalysis.h.
Referenced by CIRBasicAliasAnalysis().
|
default |
References CIRBasicAliasAnalysis().
| mlir::AliasResult CIRBasicAliasAnalysis::alias | ( | mlir::Value | lhs, |
| mlir::Value | rhs ) |
Return the aliasing behavior between two values.
Both values are traced back to the object they point into and to their byte offset within it. Pointers into provably different objects don't alias, and pointers at the same offset into the same object must alias. MayAlias is returned whenever a more precise answer cannot be determined. Every value queried is assumed to be dereferenced. Results for pointers that are only compared or stored are not meaningful.
Definition at line 241 of file CIRBasicAliasAnalysis.cpp.
References areDistinctObjects(), and decomposePointer().
Referenced by getModRef().
| mlir::ModRefResult CIRBasicAliasAnalysis::getModRef | ( | mlir::Operation * | op, |
| mlir::Value | location ) |
Return the modify-reference behavior of op on location.
Returns ModRef conservatively. CIR ops that carry explicit memory-effect attributes or that are known to be pure/read-only can be handled here.
Definition at line 283 of file CIRBasicAliasAnalysis.cpp.
References alias().