diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-07-01 01:24:25 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-07-01 01:24:25 +0000 |
| commit | 5e9ae090d8afd994c8c8e81779dd2c074ecf9369 (patch) | |
| tree | b5fed8f6e04af0e3faa46bb68f7c342017e7907c /lib/CodeGen/CalcSpillWeights.cpp | |
| parent | c4f24eb584f6b4dba3caba2ed766c7c4bf1bf8af (diff) | |
Don't inflate register classes used by inline asm.
The constraints are represented by the register class of the original
virtual register created for the inline asm. If the register class were
included in the operand descriptor, we might be able to do this.
For now, just give up on regclass inflation when inline asm is involved.
No test case, this bug hasn't happened yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134226 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CalcSpillWeights.cpp')
| -rw-r--r-- | lib/CodeGen/CalcSpillWeights.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CalcSpillWeights.cpp b/lib/CodeGen/CalcSpillWeights.cpp index 74c43ccbe5..e6b3bbca20 100644 --- a/lib/CodeGen/CalcSpillWeights.cpp +++ b/lib/CodeGen/CalcSpillWeights.cpp @@ -203,6 +203,9 @@ void VirtRegAuxInfo::CalculateRegClass(unsigned reg) { // TRI doesn't have accurate enough information to model this yet. if (I.getOperand().getSubReg()) return; + // Inline asm instuctions don't remember their constraints. + if (I->isInlineAsm()) + return; const TargetRegisterClass *OpRC = TII->getRegClass(I->getDesc(), I.getOperandNo(), TRI); if (OpRC) |
