diff options
| author | Andrew Trick <atrick@apple.com> | 2012-06-29 03:23:18 +0000 | 
|---|---|---|
| committer | Andrew Trick <atrick@apple.com> | 2012-06-29 03:23:18 +0000 | 
| commit | 1f50152b2d74b2dd7d5fd181abeb7208c82b39f0 (patch) | |
| tree | f7e32c7c042cd06ac7f8dcc464f235a1444d72df /llvm/lib/CodeGen | |
| parent | 099ec015692a4bc9860b2a513742b3b9fa9e76b6 (diff) | |
| download | bcm5719-llvm-1f50152b2d74b2dd7d5fd181abeb7208c82b39f0.tar.gz bcm5719-llvm-1f50152b2d74b2dd7d5fd181abeb7208c82b39f0.zip | |
Make NumMicroOps a variable in the subtarget's instruction itinerary.
The TargetInstrInfo::getNumMicroOps API does not change, but soon it
will be used by MachineScheduler. Now each subtarget can specify the
number of micro-ops per itinerary class. For ARM, this is currently
always dynamic (-1), because it is used for load/store multiple which
depends on the number of register operands.
Zero is now a valid number of micro-ops. This can be used for
nop pseudo-instructions or instructions that the hardware can squash
during dispatch.
llvm-svn: 159406
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/TargetInstrInfoImpl.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp b/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp index 7af08f591f1..54be88a8bb0 100644 --- a/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp +++ b/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp @@ -560,8 +560,8 @@ TargetInstrInfoImpl::getNumMicroOps(const InstrItineraryData *ItinData,      return 1;    unsigned Class = MI->getDesc().getSchedClass(); -  unsigned UOps = ItinData->Itineraries[Class].NumMicroOps; -  if (UOps) +  int UOps = ItinData->Itineraries[Class].NumMicroOps; +  if (UOps >= 0)      return UOps;    // The # of u-ops is dynamically determined. The specific target should | 

