llvm.org GIT mirror llvm / 7a1fc7a
Add combiner-aa-only-func (debug only) This option (which is !NDEBUG only) allows restricting the use of alias analysis in DAGCombiner to a specific function. This has proved extremely valuable to isolating bugs related to this feature, and mirrors the misched-only-func option provided by the new instruction scheduler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200088 91177308-0d34-0410-b5e6-96231b3b80d8 Hal Finkel 6 years ago
1 changed file(s) with 22 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
5454 static cl::opt
5555 CombinerGlobalAA("combiner-global-alias-analysis", cl::Hidden,
5656 cl::desc("Enable DAG combiner's use of IR alias analysis"));
57
58 #ifndef NDEBUG
59 static cl::opt
60 CombinerAAOnlyFunc("combiner-aa-only-func", cl::Hidden,
61 cl::desc("Only use DAG-combiner alias analysis in this"
62 " function"));
63 #endif
5764
5865 /// Hidden option to stress test load slicing, i.e., when this option
5966 /// is enabled, load slicing bypasses most of its profitability guards.
77287735
77297736 bool UseAA = CombinerAA.getNumOccurrences() > 0 ? CombinerAA :
77307737 TLI.getTargetMachine().getSubtarget().useAA();
7738 #ifndef NDEBUG
7739 if (CombinerAAOnlyFunc.getNumOccurrences() &&
7740 CombinerAAOnlyFunc != DAG.getMachineFunction().getName())
7741 UseAA = false;
7742 #endif
77317743 if (UseAA && LD->isUnindexed()) {
77327744 // Walk up chain skipping non-aliasing memory nodes.
77337745 SDValue BetterChain = FindBetterChain(N, Chain);
93169328
93179329 bool UseAA = CombinerAA.getNumOccurrences() > 0 ? CombinerAA :
93189330 TLI.getTargetMachine().getSubtarget().useAA();
9331 #ifndef NDEBUG
9332 if (CombinerAAOnlyFunc.getNumOccurrences() &&
9333 CombinerAAOnlyFunc != DAG.getMachineFunction().getName())
9334 UseAA = false;
9335 #endif
93199336 if (UseAA && ST->isUnindexed()) {
93209337 // Walk up chain skipping non-aliasing memory nodes.
93219338 SDValue BetterChain = FindBetterChain(N, Chain);
1105011067
1105111068 bool UseAA = CombinerGlobalAA.getNumOccurrences() > 0 ? CombinerGlobalAA :
1105211069 TLI.getTargetMachine().getSubtarget().useAA();
11070 #ifndef NDEBUG
11071 if (CombinerAAOnlyFunc.getNumOccurrences() &&
11072 CombinerAAOnlyFunc != DAG.getMachineFunction().getName())
11073 UseAA = false;
11074 #endif
1105311075 if (UseAA && SrcValue1 && SrcValue2) {
1105411076 // Use alias analysis information.
1105511077 int64_t MinOffset = std::min(SrcValueOffset1, SrcValueOffset2);