diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-02-13 18:17:04 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-02-13 18:17:04 +0000 |
commit | 3ed4dee530984b7087dd3bbf4cfd8a3f1947c8e0 (patch) | |
tree | a8e90243e414be0485d58309998e737cb646afe1 | |
parent | 9ea7e6e3089efff5611b88cf6591a15c3c9b0a92 (diff) | |
download | external_llvm-3ed4dee530984b7087dd3bbf4cfd8a3f1947c8e0.zip external_llvm-3ed4dee530984b7087dd3bbf4cfd8a3f1947c8e0.tar.gz external_llvm-3ed4dee530984b7087dd3bbf4cfd8a3f1947c8e0.tar.bz2 |
Check regmask interference for -join-physregs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150404 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/RegisterCoalescer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp index 2144137..61dcec2 100644 --- a/lib/CodeGen/RegisterCoalescer.cpp +++ b/lib/CodeGen/RegisterCoalescer.cpp @@ -1426,6 +1426,14 @@ bool RegisterCoalescer::JoinIntervals(CoalescerPair &CP) { return true; } + // Check if a register mask clobbers DstReg. + BitVector UsableRegs; + if (LIS->checkRegMaskInterference(RHS, UsableRegs) && + !UsableRegs.test(CP.getDstReg())) { + DEBUG(dbgs() << "\t\tRegister mask interference.\n"); + return false; + } + for (const unsigned *AS = TRI->getAliasSet(CP.getDstReg()); *AS; ++AS){ if (!LIS->hasInterval(*AS)) continue; |