[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Jim Laskey
jlaskey at apple.com
Wed Oct 18 12:08:45 PDT 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
DAGCombiner.cpp updated: 1.230 -> 1.231
---
Log message:
Add option for controlling inclusion of global AA.
---
Diffs of the changes: (+12 -6)
DAGCombiner.cpp | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.230 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.231
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.230 Wed Oct 18 07:29:57 2006
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Oct 18 14:08:31 2006
@@ -51,6 +51,10 @@
CombinerAA("combiner-alias-analysis", cl::Hidden,
cl::desc("Turn on alias analysis during testing"));
+ static cl::opt<bool>
+ CombinerGlobalAA("combiner-global-alias-analysis", cl::Hidden,
+ cl::desc("Include global information in alias analysis"));
+
//------------------------------ DAGCombiner ---------------------------------//
class VISIBILITY_HIDDEN DAGCombiner {
@@ -4036,13 +4040,15 @@
// If we know both bases then they can't alias.
if (KnownBase1 && KnownBase2) return false;
- // Use alias analysis information.
- int Overlap1 = Size1 + SrcValueOffset1 + Offset1;
- int Overlap2 = Size2 + SrcValueOffset2 + Offset2;
- AliasAnalysis::AliasResult AAResult =
+ if (CombinerGlobalAA) {
+ // Use alias analysis information.
+ int Overlap1 = Size1 + SrcValueOffset1 + Offset1;
+ int Overlap2 = Size2 + SrcValueOffset2 + Offset2;
+ AliasAnalysis::AliasResult AAResult =
AA.alias(SrcValue1, Overlap1, SrcValue2, Overlap2);
- if (AAResult == AliasAnalysis::NoAlias)
- return false;
+ if (AAResult == AliasAnalysis::NoAlias)
+ return false;
+ }
// Otherwise we have to assume they alias.
return true;
More information about the llvm-commits
mailing list