aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/VirtRegMap.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2023-10-11 09:53:00 +0100
committerGitHub <noreply@github.com>2023-10-11 09:53:00 +0100
commitb78f3ea7df3c5ed9410a18ad9dd80cbb875364fc (patch)
treed00b015c8699615b9989c4881210b2e5f4a4048e /llvm/lib/CodeGen/VirtRegMap.cpp
parent2888fa4313dcdd6e82ae423d53fd653d58682752 (diff)
downloadllvm-b78f3ea7df3c5ed9410a18ad9dd80cbb875364fc.zip
llvm-b78f3ea7df3c5ed9410a18ad9dd80cbb875364fc.tar.gz
llvm-b78f3ea7df3c5ed9410a18ad9dd80cbb875364fc.tar.bz2
Clean up strange uses of getAnalysisIfAvailable (#65729)
After a pass calls addRequired<X>() it is strange to call getAnalysisIfAvailable<X>() because analysis X should always be available. Use getAnalysis<X>() instead.
Diffstat (limited to 'llvm/lib/CodeGen/VirtRegMap.cpp')
-rw-r--r--llvm/lib/CodeGen/VirtRegMap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp
index c1c6ce2..6e29a41 100644
--- a/llvm/lib/CodeGen/VirtRegMap.cpp
+++ b/llvm/lib/CodeGen/VirtRegMap.cpp
@@ -261,7 +261,7 @@ bool VirtRegRewriter::runOnMachineFunction(MachineFunction &fn) {
Indexes = &getAnalysis<SlotIndexes>();
LIS = &getAnalysis<LiveIntervals>();
VRM = &getAnalysis<VirtRegMap>();
- DebugVars = getAnalysisIfAvailable<LiveDebugVariables>();
+ DebugVars = &getAnalysis<LiveDebugVariables>();
LLVM_DEBUG(dbgs() << "********** REWRITE VIRTUAL REGISTERS **********\n"
<< "********** Function: " << MF->getName() << '\n');
LLVM_DEBUG(VRM->dump());