diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-06-15 22:24:22 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-06-15 22:24:22 +0000 |
commit | 13dffcb76658d9b5ce615f3e5d3f46722e1292df (patch) | |
tree | 5c682e17b98831926a6aa3b3f6b1b114efd766eb | |
parent | f14a6e5f13fedb97e6955151d3f4fb7a3c2bc0cc (diff) | |
download | bcm5719-llvm-13dffcb76658d9b5ce615f3e5d3f46722e1292df.tar.gz bcm5719-llvm-13dffcb76658d9b5ce615f3e5d3f46722e1292df.zip |
Accept null PhysReg arguments to checkRegMaskInterference.
Calling checkRegMaskInterference(VirtReg) checks if VirtReg crosses any
regmask operands, regardless of the registers they clobber.
llvm-svn: 158563
-rw-r--r-- | llvm/lib/CodeGen/LiveRegMatrix.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/LiveRegMatrix.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveRegMatrix.cpp b/llvm/lib/CodeGen/LiveRegMatrix.cpp index 61e1432b0e2..cdb17768129 100644 --- a/llvm/lib/CodeGen/LiveRegMatrix.cpp +++ b/llvm/lib/CodeGen/LiveRegMatrix.cpp @@ -110,7 +110,7 @@ bool LiveRegMatrix::checkRegMaskInterference(LiveInterval &VirtReg, // The BitVector is indexed by PhysReg, not register unit. // Regmask interference is more fine grained than regunits. // For example, a Win64 call can clobber %ymm8 yet preserve %xmm8. - return !RegMaskUsable.empty() && !RegMaskUsable.test(PhysReg); + return !RegMaskUsable.empty() && (!PhysReg || !RegMaskUsable.test(PhysReg)); } bool LiveRegMatrix::checkRegUnitInterference(LiveInterval &VirtReg, diff --git a/llvm/lib/CodeGen/LiveRegMatrix.h b/llvm/lib/CodeGen/LiveRegMatrix.h index 4c3e7d47821..019a5f5877e 100644 --- a/llvm/lib/CodeGen/LiveRegMatrix.h +++ b/llvm/lib/CodeGen/LiveRegMatrix.h @@ -124,7 +124,8 @@ public: /// Check for regmask interference only. /// Return true if VirtReg crosses a regmask operand that clobbers PhysReg. - bool checkRegMaskInterference(LiveInterval &VirtReg, unsigned PhysReg); + /// If PhysReg is null, check if VirtReg crosses any regmask operands. + bool checkRegMaskInterference(LiveInterval &VirtReg, unsigned PhysReg = 0); /// Check for regunit interference only. /// Return true if VirtReg overlaps a fixed assignment of one of PhysRegs's |