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 | 0cf9a820e435a74ef93930dcaf8917323f2f99be (patch) | |
| tree | ffcb01b1621bcedb427d701cfaee9ea9a19b0a2c /lib/Target/TargetInstrInfo.cpp | |
| parent | 3288f13270360d667bf13f6393435cfa4e282c2c (diff) | |
| download | external_llvm-0cf9a820e435a74ef93930dcaf8917323f2f99be.zip external_llvm-0cf9a820e435a74ef93930dcaf8917323f2f99be.tar.gz external_llvm-0cf9a820e435a74ef93930dcaf8917323f2f99be.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/TargetInstrInfo.cpp')
| -rw-r--r-- | lib/Target/TargetInstrInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/TargetInstrInfo.cpp b/lib/Target/TargetInstrInfo.cpp index 118afd4..47cd0fb 100644 --- a/lib/Target/TargetInstrInfo.cpp +++ b/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; |
