[llvm] f33a6dc - [PPC][NFC] add an option for GatherAllAliasesMaxDepth (#87071)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 1 17:40:31 PDT 2024


Author: Chen Zheng
Date: 2024-04-02T08:40:28+08:00
New Revision: f33a6dcf959238e82f6ad45333e3547d8cfcfe38

URL: https://github.com/llvm/llvm-project/commit/f33a6dcf959238e82f6ad45333e3547d8cfcfe38
DIFF: https://github.com/llvm/llvm-project/commit/f33a6dcf959238e82f6ad45333e3547d8cfcfe38.diff

LOG: [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.

Added: 
    

Modified: 
    llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 7436b202fba0d9..43e4a34a9b3483 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 ************************************


        


More information about the llvm-commits mailing list