Skip to content

Commit 49abcd2

Browse files
authored
[CodeGen][PM] Initialize analyses with isAnalysis=true (#118779)
Analyses should be marked as analyses. Otherwise they are prone to get ignored by the legacy analysis cache mechanism and get scheduled redundantly.
1 parent 3d7260b commit 49abcd2

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

llvm/lib/CodeGen/GCMetadata.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ GCFunctionAnalysis::run(Function &F, FunctionAnalysisManager &FAM) {
6666
}
6767

6868
INITIALIZE_PASS(GCModuleInfo, "collector-metadata",
69-
"Create Garbage Collector Module Metadata", false, false)
69+
"Create Garbage Collector Module Metadata", false, true)
7070

7171
// -----------------------------------------------------------------------------
7272

llvm/lib/CodeGen/LiveDebugVariables.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ INITIALIZE_PASS_BEGIN(LiveDebugVariablesWrapperLegacy, DEBUG_TYPE,
8282
INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
8383
INITIALIZE_PASS_DEPENDENCY(LiveIntervalsWrapperPass)
8484
INITIALIZE_PASS_END(LiveDebugVariablesWrapperLegacy, DEBUG_TYPE,
85-
"Debug Variable Analysis", false, false)
85+
"Debug Variable Analysis", false, true)
8686

8787
void LiveDebugVariablesWrapperLegacy::getAnalysisUsage(
8888
AnalysisUsage &AU) const {

llvm/lib/CodeGen/LiveIntervals.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ INITIALIZE_PASS_BEGIN(LiveIntervalsWrapperPass, "liveintervals",
8383
INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
8484
INITIALIZE_PASS_DEPENDENCY(SlotIndexesWrapperPass)
8585
INITIALIZE_PASS_END(LiveIntervalsWrapperPass, "liveintervals",
86-
"Live Interval Analysis", false, false)
86+
"Live Interval Analysis", false, true)
8787

8888
bool LiveIntervalsWrapperPass::runOnMachineFunction(MachineFunction &MF) {
8989
LIS.Indexes = &getAnalysis<SlotIndexesWrapperPass>().getSI();

llvm/lib/CodeGen/LiveRegMatrix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ INITIALIZE_PASS_BEGIN(LiveRegMatrixWrapperLegacy, "liveregmatrix",
4141
INITIALIZE_PASS_DEPENDENCY(LiveIntervalsWrapperPass)
4242
INITIALIZE_PASS_DEPENDENCY(VirtRegMapWrapperLegacy)
4343
INITIALIZE_PASS_END(LiveRegMatrixWrapperLegacy, "liveregmatrix",
44-
"Live Register Matrix", false, false)
44+
"Live Register Matrix", false, true)
4545

4646
void LiveRegMatrixWrapperLegacy::getAnalysisUsage(AnalysisUsage &AU) const {
4747
AU.setPreservesAll();

llvm/lib/CodeGen/LiveStacks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ INITIALIZE_PASS_BEGIN(LiveStacksWrapperLegacy, DEBUG_TYPE,
2525
"Live Stack Slot Analysis", false, false)
2626
INITIALIZE_PASS_DEPENDENCY(SlotIndexesWrapperPass)
2727
INITIALIZE_PASS_END(LiveStacksWrapperLegacy, DEBUG_TYPE,
28-
"Live Stack Slot Analysis", false, false)
28+
"Live Stack Slot Analysis", false, true)
2929

3030
char &llvm::LiveStacksID = LiveStacksWrapperLegacy::ID;
3131

llvm/lib/CodeGen/VirtRegMap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ STATISTIC(NumIdCopies, "Number of identity moves eliminated after rewriting");
6060
char VirtRegMapWrapperLegacy::ID = 0;
6161

6262
INITIALIZE_PASS(VirtRegMapWrapperLegacy, "virtregmap", "Virtual Register Map",
63-
false, false)
63+
false, true)
6464

6565
void VirtRegMap::init(MachineFunction &mf) {
6666
MRI = &mf.getRegInfo();

llvm/lib/Transforms/Utils/LoopSimplify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,8 +777,8 @@ INITIALIZE_PASS_BEGIN(LoopSimplify, "loop-simplify",
777777
INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
778778
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
779779
INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass)
780-
INITIALIZE_PASS_END(LoopSimplify, "loop-simplify",
781-
"Canonicalize natural loops", false, false)
780+
INITIALIZE_PASS_END(LoopSimplify, "loop-simplify", "Canonicalize natural loops",
781+
false, true)
782782

783783
// Publicly exposed interface to pass...
784784
char &llvm::LoopSimplifyID = LoopSimplify::ID;

0 commit comments

Comments
 (0)