summaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocPBQP.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2012-10-04 04:50:53 +0000
committerLang Hames <lhames@gmail.com>2012-10-04 04:50:53 +0000
commit442c59f0a2fc3e596d0ce1f13b4a6849b2f46cc4 (patch)
tree685492d53099d9e3eb5fd397c4c18c9269242084 /lib/CodeGen/RegAllocPBQP.cpp
parent96098782d183c0d013fa066874e52e18518c32a5 (diff)
downloadllvm-442c59f0a2fc3e596d0ce1f13b4a6849b2f46cc4.tar.gz
llvm-442c59f0a2fc3e596d0ce1f13b4a6849b2f46cc4.tar.bz2
llvm-442c59f0a2fc3e596d0ce1f13b4a6849b2f46cc4.tar.xz
Fix reg mask slot test, and preserve LiveIntervals and VirtRegMap in the PBQP
allocator. Fixes PR13945. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165201 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocPBQP.cpp')
-rw-r--r--lib/CodeGen/RegAllocPBQP.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocPBQP.cpp b/lib/CodeGen/RegAllocPBQP.cpp
index fcdbce75d9..f2473681a5 100644
--- a/lib/CodeGen/RegAllocPBQP.cpp
+++ b/lib/CodeGen/RegAllocPBQP.cpp
@@ -231,7 +231,7 @@ std::auto_ptr<PBQPRAProblem> PBQPBuilder::build(MachineFunction *mf,
continue;
// vregLI crosses a regmask operand that clobbers preg.
- if (!regMaskOverlaps.empty() && !regMaskOverlaps.test(preg))
+ if (!regMaskOverlaps.empty() && regMaskOverlaps.test(preg))
continue;
// vregLI overlaps fixed regunit interference.
@@ -432,6 +432,7 @@ void RegAllocPBQP::getAnalysisUsage(AnalysisUsage &au) const {
au.addRequired<SlotIndexes>();
au.addPreserved<SlotIndexes>();
au.addRequired<LiveIntervals>();
+ au.addPreserved<LiveIntervals>();
//au.addRequiredID(SplitCriticalEdgesID);
if (customPassID)
au.addRequiredID(*customPassID);
@@ -443,6 +444,7 @@ void RegAllocPBQP::getAnalysisUsage(AnalysisUsage &au) const {
au.addRequired<MachineLoopInfo>();
au.addPreserved<MachineLoopInfo>();
au.addRequired<VirtRegMap>();
+ au.addPreserved<VirtRegMap>();
MachineFunctionPass::getAnalysisUsage(au);
}