summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetInstrInfo.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-09-10 01:29:16 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-09-10 01:29:16 +0000
commitbf4070756f4acbae9a556c56003f0dd71521288e (patch)
tree73c9f913ec61f913b9eff7f8f6cd745bc94cb2ad /llvm/lib/Target/TargetInstrInfo.cpp
parent516484c71e6322a3d17ce91c7107afefb35e972f (diff)
downloadbcm5719-llvm-bf4070756f4acbae9a556c56003f0dd71521288e.tar.gz
bcm5719-llvm-bf4070756f4acbae9a556c56003f0dd71521288e.zip
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. llvm-svn: 113570
Diffstat (limited to 'llvm/lib/Target/TargetInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/TargetInstrInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/TargetInstrInfo.cpp b/llvm/lib/Target/TargetInstrInfo.cpp
index 118afd48c9f..47cd0fbe163 100644
--- a/llvm/lib/Target/TargetInstrInfo.cpp
+++ b/llvm/lib/Target/TargetInstrInfo.cpp
@@ -50,12 +50,12 @@ TargetInstrInfo::~TargetInstrInfo() {
unsigned
TargetInstrInfo::getNumMicroOps(const MachineInstr *MI,
- const InstrItineraryData &ItinData) const {
- if (ItinData.isEmpty())
+ const InstrItineraryData *ItinData) const {
+ if (!ItinData || ItinData->isEmpty())
return 1;
unsigned Class = MI->getDesc().getSchedClass();
- unsigned UOps = ItinData.Itineratries[Class].NumMicroOps;
+ unsigned UOps = ItinData->Itineratries[Class].NumMicroOps;
if (UOps)
return UOps;
OpenPOWER on IntegriCloud