diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-09-10 01:29:16 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-09-10 01:29:16 +0000 |
commit | 3ef1c8759a20167457eb7fd82ebcaffe7ccaa1d1 (patch) | |
tree | ffcb01b1621bcedb427d701cfaee9ea9a19b0a2c /lib/Target/ARM/ARMISelLowering.cpp | |
parent | 920a2089d9b737820631bc6de4c4fb9fa9ad1e07 (diff) | |
download | external_llvm-3ef1c8759a20167457eb7fd82ebcaffe7ccaa1d1.zip external_llvm-3ef1c8759a20167457eb7fd82ebcaffe7ccaa1d1.tar.gz external_llvm-3ef1c8759a20167457eb7fd82ebcaffe7ccaa1d1.tar.bz2 |
Teach if-converter to be more careful with predicating instructions that would
take multiple cycles to decode.
For the current if-converter clients (actually only ARM), the instructions that
are predicated on false are not nops. They would still take machine cycles to
decode. Micro-coded instructions such as LDM / STM can potentially take multiple
cycles to decode. If-converter should take treat them as non-micro-coded
simple instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r-- | lib/Target/ARM/ARMISelLowering.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index d4198a5..637c6e3 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -177,6 +177,7 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM) : TargetLowering(TM, createTLOF(TM)) { Subtarget = &TM.getSubtarget<ARMSubtarget>(); RegInfo = TM.getRegisterInfo(); + Itins = TM.getInstrItineraryData(); if (Subtarget->isTargetDarwin()) { // Uses VFP for Thumb libfuncs if available. @@ -749,8 +750,7 @@ Sched::Preference ARMTargetLowering::getSchedulingPreference(SDNode *N) const { if (TID.mayLoad()) return Sched::Latency; - const InstrItineraryData &Itins = getTargetMachine().getInstrItineraryData(); - if (!Itins.isEmpty() && Itins.getStageLatency(TID.getSchedClass()) > 2) + if (!Itins->isEmpty() && Itins->getStageLatency(TID.getSchedClass()) > 2) return Sched::Latency; return Sched::RegPressure; } |