aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Zheng <czhengsz@cn.ibm.com>2024-04-02 08:40:28 +0800
committerGitHub <noreply@github.com>2024-04-02 08:40:28 +0800
commitf33a6dcf959238e82f6ad45333e3547d8cfcfe38 (patch)
treebc3791043c60c34b6a195ce96dd92f4452addfa1
parent372c275800140f35a697f12a2e83d94d5603eaf5 (diff)
downloadllvm-f33a6dcf959238e82f6ad45333e3547d8cfcfe38.zip
llvm-f33a6dcf959238e82f6ad45333e3547d8cfcfe38.tar.gz
llvm-f33a6dcf959238e82f6ad45333e3547d8cfcfe38.tar.bz2
[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.
-rw-r--r--llvm/lib/Target/PowerPC/PPCISelLowering.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 7436b20..43e4a34 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -137,6 +137,10 @@ static cl::opt<unsigned> PPCMinimumJumpTableEntries(
"ppc-min-jump-table-entries", cl::init(64), cl::Hidden,
cl::desc("Set minimum number of entries to use a jump table on PPC"));
+static cl::opt<unsigned> PPCGatherAllAliasesMaxDepth(
+ "ppc-gather-alias-max-depth", cl::init(18), cl::Hidden,
+ cl::desc("max depth when checking alias info in GatherAllAliases()"));
+
STATISTIC(NumTailCalls, "Number of tail calls");
STATISTIC(NumSiblingCalls, "Number of sibling calls");
STATISTIC(ShufflesHandledWithVPERM,
@@ -1512,6 +1516,8 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
// than the corresponding branch. This information is used in CGP to decide
// when to convert selects into branches.
PredictableSelectIsExpensive = Subtarget.isPredictableSelectIsExpensive();
+
+ GatherAllAliasesMaxDepth = PPCGatherAllAliasesMaxDepth;
}
// *********************************** NOTE ************************************