Skip to content

Commit f33a6dc

Browse files
author
Chen Zheng
authored
[PPC][NFC] add an option for GatherAllAliasesMaxDepth (#87071)
GatherAllAliases is time consuming. Add an debug option on PPC to control the complexity of the function. This is useful when debuging compile time related issues.
1 parent 372c275 commit f33a6dc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ static cl::opt<unsigned> PPCMinimumJumpTableEntries(
137137
"ppc-min-jump-table-entries", cl::init(64), cl::Hidden,
138138
cl::desc("Set minimum number of entries to use a jump table on PPC"));
139139

140+
static cl::opt<unsigned> PPCGatherAllAliasesMaxDepth(
141+
"ppc-gather-alias-max-depth", cl::init(18), cl::Hidden,
142+
cl::desc("max depth when checking alias info in GatherAllAliases()"));
143+
140144
STATISTIC(NumTailCalls, "Number of tail calls");
141145
STATISTIC(NumSiblingCalls, "Number of sibling calls");
142146
STATISTIC(ShufflesHandledWithVPERM,
@@ -1512,6 +1516,8 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
15121516
// than the corresponding branch. This information is used in CGP to decide
15131517
// when to convert selects into branches.
15141518
PredictableSelectIsExpensive = Subtarget.isPredictableSelectIsExpensive();
1519+
1520+
GatherAllAliasesMaxDepth = PPCGatherAllAliasesMaxDepth;
15151521
}
15161522

15171523
// *********************************** NOTE ************************************

0 commit comments

Comments
 (0)