diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/PreAllocSplitting.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.h | 5 | ||||
| -rw-r--r-- | llvm/lib/Target/X86/X86RegisterInfo.h | 4 |
4 files changed, 19 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/PreAllocSplitting.cpp b/llvm/lib/CodeGen/PreAllocSplitting.cpp index 547c528ca23..33e3e8054ce 100644 --- a/llvm/lib/CodeGen/PreAllocSplitting.cpp +++ b/llvm/lib/CodeGen/PreAllocSplitting.cpp @@ -659,6 +659,8 @@ PreAllocSplitting::SplitRegLiveIntervals(const TargetRegisterClass **RCs) { // by the current barrier. SmallVector<LiveInterval*, 8> Intervals; for (const TargetRegisterClass **RC = RCs; *RC; ++RC) { + if (TII->IgnoreRegisterClassBarriers(*RC)) + continue; std::vector<unsigned> &VRs = MRI->getRegClassVirtRegs(*RC); for (unsigned i = 0, e = VRs.size(); i != e; ++i) { unsigned Reg = VRs[i]; diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 04f10c00885..c08fdd8f206 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -2411,6 +2411,14 @@ ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const { return false; } +bool X86InstrInfo:: +IgnoreRegisterClassBarriers(const TargetRegisterClass *RC) const { + // FIXME: Ignore bariers of x87 stack registers for now. We can't + // allow any loads of these registers before FpGet_ST0_80. + return RC == &X86::CCRRegClass || RC == &X86::RFP32RegClass || + RC == &X86::RFP64RegClass || RC == &X86::RFP80RegClass; +} + const TargetRegisterClass *X86InstrInfo::getPointerRegClass() const { const X86Subtarget *Subtarget = &TM.getSubtarget<X86Subtarget>(); if (Subtarget->is64Bit()) diff --git a/llvm/lib/Target/X86/X86InstrInfo.h b/llvm/lib/Target/X86/X86InstrInfo.h index 17be894a887..dc76f3ec1f9 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.h +++ b/llvm/lib/Target/X86/X86InstrInfo.h @@ -405,6 +405,11 @@ public: virtual bool ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const; + /// IgnoreRegisterClassBarriers - Returns true if pre-register allocation + /// live interval splitting pass should ignore barriers of the specified + /// register class. + bool IgnoreRegisterClassBarriers(const TargetRegisterClass *RC) const; + const TargetRegisterClass *getPointerRegClass() const; // getBaseOpcodeFor - This function returns the "base" X86 opcode for the diff --git a/llvm/lib/Target/X86/X86RegisterInfo.h b/llvm/lib/Target/X86/X86RegisterInfo.h index 93e8613b97b..25d7b07bad1 100644 --- a/llvm/lib/Target/X86/X86RegisterInfo.h +++ b/llvm/lib/Target/X86/X86RegisterInfo.h @@ -94,6 +94,10 @@ public: /// Code Generation virtual methods... /// + + /// getCrossCopyRegClass - Returns a legal register class to copy a register + /// in the specified class to or from. Returns NULL if it is possible to copy + /// between a two registers of the specified class. const TargetRegisterClass * getCrossCopyRegClass(const TargetRegisterClass *RC) const; |

