diff options
author | Dale Johannesen <dalej@apple.com> | 2008-09-24 01:07:17 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-09-24 01:07:17 +0000 |
commit | 9446407963005f3edfa8ac70e265c81839a416c9 (patch) | |
tree | d5f083d21eb91a360fb9abe380d16fbd60d1689e /include/llvm/CodeGen | |
parent | 93044ceb33ed9ba6acaa9385725074b3cad4899f (diff) | |
download | external_llvm-9446407963005f3edfa8ac70e265c81839a416c9.tar.gz external_llvm-9446407963005f3edfa8ac70e265c81839a416c9.tar.bz2 external_llvm-9446407963005f3edfa8ac70e265c81839a416c9.zip |
Next round of earlyclobber handling. Approach the
RA problem by expanding the live interval of an
earlyclobber def back one slot. Remove
overlap-earlyclobber throughout. Remove
earlyclobber bits and their handling from
live internals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/LiveInterval.h | 10 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineOperand.h | 21 | ||||
-rw-r--r-- | include/llvm/CodeGen/ScheduleDAG.h | 4 |
3 files changed, 4 insertions, 31 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index b346787bd9..0d5acb8392 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/CodeGen/LiveInterval.h @@ -104,19 +104,13 @@ namespace llvm { unsigned reg; // the register or stack slot of this interval // if the top bits is set, it represents a stack slot. float weight; // weight of this interval - // The next 3 fields pack into a single word (on most hosts). - // Logically the first two could be bitfields, but that's slower. - bool isEarlyClobber; // marked earlyclobber in some asm - bool overlapsEarlyClobber; // input to asm that has an earlyclobber unsigned short preference; // preferred register for this interval Ranges ranges; // the ranges in which this register is live VNInfoList valnos; // value#'s public: - LiveInterval(unsigned Reg, float Weight, bool IsSS = false, - bool IsEarlyClobber = false, bool OverlapsEarlyClobber = false) - : reg(Reg), weight(Weight), isEarlyClobber(IsEarlyClobber), - overlapsEarlyClobber(OverlapsEarlyClobber), preference(0) { + LiveInterval(unsigned Reg, float Weight, bool IsSS = false) + : reg(Reg), weight(Weight), preference(0) { if (IsSS) reg = reg | (1U << (sizeof(unsigned)*8-1)); } diff --git a/include/llvm/CodeGen/MachineOperand.h b/include/llvm/CodeGen/MachineOperand.h index c2399beaf6..40876dbfca 100644 --- a/include/llvm/CodeGen/MachineOperand.h +++ b/include/llvm/CodeGen/MachineOperand.h @@ -73,12 +73,6 @@ private: /// model the GCC inline asm '&' constraint modifier. bool IsEarlyClobber : 1; - /// OverlapsEarlyClobber - True if this MO_Register operand is used as an - /// input to an inline asm that has the earlyclobber bit set on some other - /// operand. Flag is not valid for any other case. See gcc doc - /// for description of earlyclobber. - bool OverlapsEarlyClobber : 1; - /// SubReg - Subregister number, only valid for MO_Register. A value of 0 /// indicates the MO_Register has no subReg. unsigned char SubReg; @@ -188,11 +182,6 @@ public: return IsEarlyClobber; } - bool overlapsEarlyClobber() const { - assert(isRegister() && "Wrong MachineOperand accessor"); - return OverlapsEarlyClobber; - } - /// getNextOperandForReg - Return the next MachineOperand in the function that /// uses or defines this register. MachineOperand *getNextOperandForReg() const { @@ -243,11 +232,6 @@ public: IsEarlyClobber = Val; } - void setOverlapsEarlyClobber(bool Val = true) { - assert(isRegister() && "Wrong MachineOperand accessor"); - OverlapsEarlyClobber = Val; - } - //===--------------------------------------------------------------------===// // Accessors for various operand types. //===--------------------------------------------------------------------===// @@ -353,15 +337,13 @@ public: static MachineOperand CreateReg(unsigned Reg, bool isDef, bool isImp = false, bool isKill = false, bool isDead = false, unsigned SubReg = 0, - bool isEarlyClobber = false, - bool overlapsEarlyClobber = false) { + bool isEarlyClobber = false) { MachineOperand Op(MachineOperand::MO_Register); Op.IsDef = isDef; Op.IsImp = isImp; Op.IsKill = isKill; Op.IsDead = isDead; Op.IsEarlyClobber = isEarlyClobber; - Op.OverlapsEarlyClobber = overlapsEarlyClobber; Op.Contents.Reg.RegNo = Reg; Op.Contents.Reg.Prev = 0; Op.Contents.Reg.Next = 0; @@ -408,7 +390,6 @@ public: IsKill = MO.IsKill; IsDead = MO.IsDead; IsEarlyClobber = MO.IsEarlyClobber; - OverlapsEarlyClobber = MO.OverlapsEarlyClobber; SubReg = MO.SubReg; ParentMI = MO.ParentMI; Contents = MO.Contents; diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h index 950d32ba61..06bb036115 100644 --- a/include/llvm/CodeGen/ScheduleDAG.h +++ b/include/llvm/CodeGen/ScheduleDAG.h @@ -361,9 +361,7 @@ namespace llvm { void AddOperand(MachineInstr *MI, SDValue Op, unsigned IIOpNum, const TargetInstrDesc *II, - DenseMap<SDValue, unsigned> &VRBaseMap, - bool overlapsEarlyClobber = false); - + DenseMap<SDValue, unsigned> &VRBaseMap); void AddMemOperand(MachineInstr *MI, const MachineMemOperand &MO); void EmitCrossRCCopy(SUnit *SU, DenseMap<SUnit*, unsigned> &VRBaseMap); |