diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-09-02 17:12:55 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-09-02 17:12:55 +0000 |
commit | 9b041c92efb5b0f6e74e154f0a6151968dc1ab58 (patch) | |
tree | f6f6605e8f4c3c79ee12c2b3089fdadfa6173249 /lib/CodeGen/CriticalAntiDepBreaker.cpp | |
parent | b1fcfbe89bd155fb88485b2a3a995adba3994003 (diff) | |
download | llvm-9b041c92efb5b0f6e74e154f0a6151968dc1ab58.tar.gz llvm-9b041c92efb5b0f6e74e154f0a6151968dc1ab58.tar.bz2 llvm-9b041c92efb5b0f6e74e154f0a6151968dc1ab58.tar.xz |
Anti-dependency breaking needs to be careful not to use reserved regs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112832 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CriticalAntiDepBreaker.cpp')
-rw-r--r-- | lib/CodeGen/CriticalAntiDepBreaker.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CriticalAntiDepBreaker.cpp b/lib/CodeGen/CriticalAntiDepBreaker.cpp index 98d4d41320..335d2d8e9b 100644 --- a/lib/CodeGen/CriticalAntiDepBreaker.cpp +++ b/lib/CodeGen/CriticalAntiDepBreaker.cpp @@ -330,6 +330,8 @@ CriticalAntiDepBreaker::findSuitableFreeRegister(MachineInstr *MI, for (TargetRegisterClass::iterator R = RC->allocation_order_begin(MF), RE = RC->allocation_order_end(MF); R != RE; ++R) { unsigned NewReg = *R; + // Don't consider non-allocatable registers + if (!AllocatableSet.test(NewReg)) continue; // Don't replace a register with itself. if (NewReg == AntiDepReg) continue; // Don't replace a register with one that was recently used to repair |