diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-06-18 23:09:54 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-06-18 23:09:54 +0000 |
commit | 86050dc8cc0aaea8c9dfeb89de02cafbd7f48d92 (patch) | |
tree | e3d4931d8b43804f50e973d4c6763ccdb01cbbc3 /lib/Target/ARM/Thumb2InstrInfo.h | |
parent | ef6eb9c7ab7967790566c5e2d47977d89fc060ee (diff) |
Allow ARM if-converter to be run after post allocation scheduling.
- This fixed a number of bugs in if-converter, tail merging, and post-allocation
scheduler. If-converter now runs branch folding / tail merging first to
maximize if-conversion opportunities.
- Also changed the t2IT instruction slightly. It now defines the ITSTATE
register which is read by instructions in the IT block.
- Added Thumb2 specific hazard recognizer to ensure the scheduler doesn't
change the instruction ordering in the IT block (since IT mask has been
finalized). It also ensures no other instructions can be scheduled between
instructions in the IT block.
This is not yet enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106344 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/Thumb2InstrInfo.h')
-rw-r--r-- | lib/Target/ARM/Thumb2InstrInfo.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Target/ARM/Thumb2InstrInfo.h b/lib/Target/ARM/Thumb2InstrInfo.h index 3f233c47868..d5fc3591385 100644 --- a/lib/Target/ARM/Thumb2InstrInfo.h +++ b/lib/Target/ARM/Thumb2InstrInfo.h @@ -20,7 +20,8 @@ #include "Thumb2RegisterInfo.h" namespace llvm { - class ARMSubtarget; +class ARMSubtarget; +class ScheduleHazardRecognizer; class Thumb2InstrInfo : public ARMBaseInstrInfo { Thumb2RegisterInfo RI; @@ -31,6 +32,9 @@ public: // if there is not such an opcode. unsigned getUnindexedOpcode(unsigned Opc) const; + void ReplaceTailWithBranchTo(MachineBasicBlock::iterator Tail, + MachineBasicBlock *NewDest) const; + bool copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, unsigned DestReg, unsigned SrcReg, @@ -60,6 +64,9 @@ public: /// always be able to get register info as well (through this method). /// const Thumb2RegisterInfo &getRegisterInfo() const { return RI; } + + ScheduleHazardRecognizer * + CreateTargetPostRAHazardRecognizer(const InstrItineraryData &II) const; }; } |