Allow ARM if-converter to be run after post allocation scheduling.
authorEvan Cheng <evan.cheng@apple.com>
Fri, 18 Jun 2010 23:09:54 +0000 (23:09 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 18 Jun 2010 23:09:54 +0000 (23:09 +0000)
commit86050dc8cc0aaea8c9dfeb89de02cafbd7f48d92
treee3d4931d8b43804f50e973d4c6763ccdb01cbbc3
parentef6eb9c7ab7967790566c5e2d47977d89fc060ee
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
18 files changed:
include/llvm/Target/TargetInstrInfo.h
lib/CodeGen/BranchFolding.cpp
lib/CodeGen/IfConversion.cpp
lib/CodeGen/MachineVerifier.cpp
lib/CodeGen/PostRASchedulerList.cpp
lib/CodeGen/TargetInstrInfoImpl.cpp
lib/Target/ARM/ARMBaseInstrInfo.cpp
lib/Target/ARM/ARMBaseInstrInfo.h
lib/Target/ARM/ARMInstrThumb2.td
lib/Target/ARM/ARMMachineFunctionInfo.h
lib/Target/ARM/ARMRegisterInfo.td
lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/ARM/Thumb2ITBlockPass.cpp
lib/Target/ARM/Thumb2InstrInfo.cpp
lib/Target/ARM/Thumb2InstrInfo.h
test/CodeGen/ARM/ifcvt2.ll
test/CodeGen/Thumb2/thumb2-cbnz.ll
test/CodeGen/Thumb2/thumb2-ifcvt2.ll