58 #define DEBUG_TYPE "arm-low-overhead-loops" 59 #define ARM_LOW_OVERHEAD_LOOPS_NAME "ARM Low Overhead Loops pass" 79 std::unique_ptr<PredicatedMI> VPST;
80 PredicatedMI *Divergent =
nullptr;
85 VPST = std::make_unique<PredicatedMI>(
MI, Preds);
90 if (!Divergent && !
set_difference(Preds, VPST->Predicates).empty()) {
91 Divergent = &Insts.
back();
92 LLVM_DEBUG(
dbgs() <<
" - has divergent predicate: " << *Divergent->MI);
95 assert(Insts.
size() <= 4 &&
"Too many instructions in VPT block!");
100 bool HasNonUniformPredicate()
const {
101 return Divergent !=
nullptr;
107 return VPST->Predicates.count(MI);
113 return IsPredicatedOn(MI) && VPST->Predicates.size() == 1;
116 unsigned size()
const {
return Insts.
size(); }
119 PredicatedMI *getDivergent()
const {
return Divergent; }
122 struct LowOverheadLoop {
131 VPTBlock *CurrentBlock =
nullptr;
135 bool CannotTailPredicate =
false;
147 CannotTailPredicate = !ValidateMVEInst(MI);
150 bool IsTailPredicationLegal()
const {
153 return !Revert && FoundAllComponents() && VCTP &&
171 bool FoundAllComponents()
const {
172 return Start && Dec && End;
180 return IsTailPredicationLegal() ?
184 unsigned getStartOpcode()
const {
185 bool IsDo = Start->
getOpcode() == ARM::t2DoLoopStart;
186 if (!IsTailPredicationLegal())
187 return IsDo ? ARM::t2DLS : ARM::t2WLS;
193 if (Start)
dbgs() <<
"ARM Loops: Found Loop Start: " << *Start;
194 if (Dec)
dbgs() <<
"ARM Loops: Found Loop Dec: " << *Dec;
195 if (End)
dbgs() <<
"ARM Loops: Found Loop End: " << *End;
196 if (VCTP)
dbgs() <<
"ARM Loops: Found VCTP: " << *VCTP;
197 if (!FoundAllComponents())
198 dbgs() <<
"ARM Loops: Not a low-overhead loop.\n";
199 else if (!(Start && Dec && End))
200 dbgs() <<
"ARM Loops: Failed to find all loop components.\n";
211 std::unique_ptr<ARMBasicBlockUtils> BBUtils =
nullptr;
240 bool RevertNonLoops();
244 bool RevertLoopDec(
MachineInstr *MI,
bool AllowFlags =
false)
const;
246 void RevertLoopEnd(
MachineInstr *MI,
bool SkipCmp =
false)
const;
248 void RemoveLoopUpdate(LowOverheadLoop &LoLoop);
250 void ConvertVPTBlocks(LowOverheadLoop &LoLoop);
254 void Expand(LowOverheadLoop &LoLoop);
266 if (Start->getOperand(0).getReg() == ARM::LR)
269 unsigned CountReg = Start->getOperand(0).getReg();
271 return MI->getOpcode() == ARM::tMOVr &&
272 MI->getOperand(0).getReg() == ARM::LR &&
273 MI->getOperand(1).getReg() == CountReg &&
282 if (
auto *LRDef = RDA->getReachingMIDef(Start, ARM::LR))
283 if (IsMoveLR(LRDef) && RDA->hasSameReachingDef(Start, LRDef, CountReg))
288 if (
auto *LRDef = RDA->getLocalLiveOutMIDef(MBB, ARM::LR))
289 if (IsMoveLR(LRDef) && RDA->hasSameReachingDef(Start, LRDef, CountReg))
294 if (!RDA->isRegUsedAfter(Start, ARM::LR))
303 template<
typename Iterator>
308 if (!MO.isReg() || MO.isUndef() || !MO.getReg())
318 for (
auto I = ++Iterator(From),
E = Iterator(To);
I !=
E; ++
I) {
319 for (
auto &MO :
I->operands())
320 if (MO.isReg() && MO.getReg() && MO.isUse() && Defs.
count(MO.getReg()))
326 bool LowOverheadLoop::ValidateTailPredicate(
MachineInstr *StartInsertPt,
328 assert(VCTP &&
"VCTP instruction expected but is not set");
332 for (
auto &Block : VPTBlocks) {
333 if (Block.IsPredicatedOn(VCTP))
335 if (!Block.HasNonUniformPredicate() || !
isVCTP(Block.getDivergent()->MI)) {
336 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Found unsupported diverging predicate: " 337 << *Block.getDivergent()->MI);
341 for (
auto &PredMI : Insts) {
342 if (PredMI.Predicates.count(VCTP) ||
isVCTP(PredMI.MI))
345 <<
" - which is predicated on:\n";
346 for (
auto *
MI : PredMI.Predicates)
357 Register NumElements = VCTP->getOperand(1).getReg();
363 LLVM_DEBUG(
dbgs() <<
"ARM Loops: VCTP operand is defined in the loop.\n");
373 if (IsSafeToMove<MachineBasicBlock::reverse_iterator>(ElemDef, InsertPt, RDA)) {
374 ElemDef->removeFromParent();
378 }
else if (IsSafeToMove<MachineBasicBlock::iterator>(InsertPt, ElemDef, RDA)) {
379 InsertPt->removeFromParent();
381 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Moved start past: " << *ElemDef);
383 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Unable to move element count to loop " 384 <<
"start instruction.\n");
414 while (MBB != InsertBB) {
415 if (CannotProvideElements(MBB, NumElements)) {
416 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Unable to provide element count.\n");
432 if (!End->getOperand(1).isMBB())
437 if (End->getOperand(1).getMBB() != ML->getHeader()) {
438 LLVM_DEBUG(
dbgs() <<
"ARM Loops: LoopEnd is not targetting header.\n");
446 !BBUtils->
isBBInRange(End, ML->getHeader(), 4094)) {
452 if (Start->getOpcode() == ARM::t2WhileLoopStart &&
454 BBUtils->
getOffsetOf(Start->getOperand(1).getMBB()) ||
455 !BBUtils->
isBBInRange(Start, Start->getOperand(1).getMBB(), 4094))) {
461 InsertPt = Revert ? nullptr : IsSafeToDefineLR(RDA);
463 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Unable to find safe insertion point.\n");
467 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Start insertion point: " << *InsertPt);
469 if (!IsTailPredicationLegal()) {
471 dbgs() <<
"ARM Loops: Didn't find a VCTP instruction.\n";
472 dbgs() <<
"ARM Loops: Tail-predication is not valid.\n");
476 assert(ML->getBlocks().size() == 1 &&
477 "Shouldn't be processing a loop with more than one block");
478 CannotTailPredicate = !ValidateTailPredicate(InsertPt, RDA, MLI);
480 dbgs() <<
"ARM Loops: Couldn't validate tail predicate.\n");
484 if (CannotTailPredicate)
493 VPTBlocks.emplace_back(MI, CurrentPredicate);
494 CurrentBlock = &VPTBlocks.back();
498 else if (MI->
getOpcode() == ARM::MVE_VPSEL ||
520 CurrentPredicate.insert(MI);
523 CurrentBlock->addInst(MI, CurrentPredicate);
526 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Found instruction using vpr: " << *MI);
534 if (IsDef && !IsUse && VCTP && !
isVCTP(MI)) {
535 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Found disjoint vpr def: " << *MI);
560 LLVM_DEBUG(
dbgs() <<
"ARM Loops on " << MF->getName() <<
" ------------- \n");
562 MLI = &getAnalysis<MachineLoopInfo>();
563 RDA = &getAnalysis<ReachingDefAnalysis>();
565 MRI = &MF->getRegInfo();
572 bool Changed =
false;
573 for (
auto ML : *MLI) {
574 if (!ML->getParentLoop())
575 Changed |= ProcessLoop(ML);
577 Changed |= RevertNonLoops();
581 bool ARMLowOverheadLoops::ProcessLoop(
MachineLoop *ML) {
583 bool Changed =
false;
587 Changed |= ProcessLoop(*
I);
591 dbgs() <<
" - " << Preheader->getName() <<
"\n";
593 dbgs() <<
" - " << Preheader->getName() <<
"\n";
595 dbgs() <<
" - " << MBB->getName() <<
"\n";
600 std::function<MachineInstr*(MachineBasicBlock*)> SearchForStart =
602 for (
auto &MI : *MBB) {
606 if (MBB->pred_size() == 1)
607 return SearchForStart(*MBB->pred_begin());
611 LowOverheadLoop LoLoop(ML);
616 LoLoop.Start = SearchForStart(Preheader);
618 LoLoop.Start = SearchForStart(Preheader);
626 for (
auto &MI : *MBB) {
637 LoLoop.Revert =
true;
642 LoLoop.AnalyseMVEInst(&MI);
647 if (!LoLoop.Dec || LoLoop.End || LoLoop.Revert)
659 if (MI.
getOpcode() != ARM::t2LoopDec && MO.isReg() &&
660 MO.getReg() == ARM::LR) {
662 LoLoop.Revert =
true;
670 if (!LoLoop.FoundAllComponents()) {
671 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Didn't find loop start, update, end\n");
675 LoLoop.CheckLegality(BBUtils.get(), RDA, MLI);
684 void ARMLowOverheadLoops::RevertWhile(
MachineInstr *MI)
const {
688 TII->get(ARM::t2CMPri));
692 MIB.
addReg(ARM::NoRegister);
695 unsigned BrOpc = BBUtils->
isBBInRange(MI, DestBB, 254) ?
696 ARM::tBcc : ARM::t2Bcc;
705 bool ARMLowOverheadLoops::RevertLoopDec(
MachineInstr *MI,
706 bool SetFlags)
const {
717 TII->get(ARM::t2SUBri));
735 void ARMLowOverheadLoops::RevertLoopEnd(
MachineInstr *MI,
bool SkipCmp)
const {
742 TII->get(ARM::t2CMPri));
746 MIB.
addReg(ARM::NoRegister);
750 unsigned BrOpc = BBUtils->
isBBInRange(MI, DestBB, 254) ?
751 ARM::tBcc : ARM::t2Bcc;
762 MachineInstr* ARMLowOverheadLoops::ExpandLoopStart(LowOverheadLoop &LoLoop) {
766 bool IsDo = Start->
getOpcode() == ARM::t2DoLoopStart;
767 unsigned Opc = LoLoop.getStartOpcode();
780 if (LoLoop.IsTailPredicationLegal()) {
787 while (!Killed.
empty()) {
792 if (!MO.isReg() || !MO.isKill())
796 if (Kill && RDA->
getNumUses(Kill, MO.getReg()) == 1)
800 for (
auto *MI : Dead)
806 if (InsertPt != Start)
826 void ARMLowOverheadLoops::RemoveLoopUpdate(LowOverheadLoop &LoLoop) {
827 Register ElemCount = LoLoop.VCTP->getOperand(1).getReg();
828 MachineInstr *LastInstrInBlock = &LoLoop.VCTP->getParent()->back();
830 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Trying to remove loop update stmt\n");
832 if (LoLoop.ML->getNumBlocks() != 1) {
837 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Analyzing elemcount in operand: ";
838 LoLoop.VCTP->getOperand(1).dump());
843 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Can't find a def, nothing to do.\n");
848 if (!Def->registerDefIsDead(ARM::CPSR,
TRI)) {
855 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Elemcount is live-out, can't remove stmt\n");
863 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Local uses in block, can't remove stmt\n");
872 if (!Uses.
size() || (Uses.
size() == 1 && Uses[0] == LoLoop.VCTP)) {
873 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Removing loop update instruction: ";
875 Def->eraseFromParent();
879 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Can't remove loop update, it's used by:\n";
880 for (
auto U : Uses) U->dump());
883 void ARMLowOverheadLoops::ConvertVPTBlocks(LowOverheadLoop &LoLoop) {
885 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Removing predicate from: " << *MI);
888 "Expected Then predicate!");
905 for (
auto &Block : LoLoop.getVPTBlocks()) {
907 if (Block.HasNonUniformPredicate()) {
908 PredicatedMI *Divergent = Block.getDivergent();
909 if (
isVCTP(Divergent->MI)) {
913 Block.getVPST()->getOperand(0).setImm(Size);
915 }
else if (Block.IsOnlyPredicatedOn(LoLoop.VCTP)) {
927 RemovePredicate(&*
I);
939 InsertAt->getDebugLoc(),
940 TII->get(ARM::MVE_VPST));
942 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Removing VPST: " << *Block.getVPST());
944 Block.getVPST()->eraseFromParent();
946 }
else if (Block.IsOnlyPredicatedOn(LoLoop.VCTP)) {
951 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Removing VPST: " << *Block.getVPST());
952 Block.getVPST()->eraseFromParent();
953 for (
auto &PredMI : Insts)
954 RemovePredicate(PredMI.MI);
958 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Removing VCTP: " << *LoLoop.VCTP);
959 LoLoop.VCTP->eraseFromParent();
962 void ARMLowOverheadLoops::Expand(LowOverheadLoop &LoLoop) {
965 auto ExpandLoopEnd = [
this](LowOverheadLoop &LoLoop) {
968 unsigned Opc = LoLoop.IsTailPredicationLegal() ?
969 ARM::MVE_LETP : ARM::t2LEUpdate;
977 LoLoop.End->eraseFromParent();
978 LoLoop.Dec->eraseFromParent();
993 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Removing branch: " << *Terminator);
1000 if (LoLoop.Start->getOpcode() == ARM::t2WhileLoopStart)
1001 RevertWhile(LoLoop.Start);
1003 LoLoop.Start->eraseFromParent();
1004 bool FlagsAlreadySet = RevertLoopDec(LoLoop.Dec,
true);
1005 RevertLoopEnd(LoLoop.End, FlagsAlreadySet);
1007 LoLoop.Start = ExpandLoopStart(LoLoop);
1008 RemoveDeadBranch(LoLoop.Start);
1009 LoLoop.End = ExpandLoopEnd(LoLoop);
1010 RemoveDeadBranch(LoLoop.End);
1011 if (LoLoop.IsTailPredicationLegal()) {
1012 RemoveLoopUpdate(LoLoop);
1013 ConvertVPTBlocks(LoLoop);
1018 bool ARMLowOverheadLoops::RevertNonLoops() {
1019 LLVM_DEBUG(
dbgs() <<
"ARM Loops: Reverting any remaining pseudos...\n");
1020 bool Changed =
false;
1022 for (
auto &MBB : *MF) {
1027 for (
auto &
I : MBB) {
1030 else if (
I.getOpcode() == ARM::t2LoopDec)
1032 else if (
I.getOpcode() == ARM::t2LoopEnd)
1041 for (
auto *Start : Starts) {
1042 if (Start->getOpcode() == ARM::t2WhileLoopStart)
1045 Start->eraseFromParent();
1047 for (
auto *Dec : Decs)
1050 for (
auto *End : Ends)
1057 return new ARMLowOverheadLoops();
bool hasSameReachingDef(MachineInstr *A, MachineInstr *B, int PhysReg)
Return whether A and B use the same def of PhysReg.
const MachineInstrBuilder & add(const MachineOperand &MO) const
reference emplace_back(ArgTypes &&... Args)
void getAllInstWithUseBefore(MachineInstr *MI, int PhysReg, SmallVectorImpl< MachineInstr *> &Uses)
Provides all instructions before MI that uses PhysReg.
MachineBasicBlock * getMBB() const
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This class represents lattice values for constants.
#define ARM_LOW_OVERHEAD_LOOPS_NAME
void push_back(const T &Elt)
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
void adjustBBOffsetsAfter(MachineBasicBlock *MBB)
void setIsDef(bool Val=true)
Change a def to a use, or a use to a def.
Describe properties that are true of each instruction in the target description file.
static bool IsSafeToMove(MachineInstr *From, MachineInstr *To, ReachingDefAnalysis *RDA)
MachineInstr & instr_back()
BlockT * getLoopPreheader() const
If there is a preheader for this loop, return it.
bool isRegLiveInExitBlocks(MachineLoop *Loop, int PhysReg)
Return true if PhysReg is live outside the loop, i.e.
iterator insertAfter(iterator I, MachineInstr *MI)
Insert MI into the instruction list after I.
unsigned const TargetRegisterInfo * TRI
iterator_range< mop_iterator > operands()
iterator end()
Get an iterator to the end of the SetVector.
This class provides the reaching def analysis.
const ARMBaseInstrInfo * getInstrInfo() const override
AnalysisUsage & addRequired()
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
const HexagonInstrInfo * TII
unsigned getNumOperands() const
Retuns the total number of operands.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void eraseFromParent()
Unlink 'this' from the containing basic block and delete it.
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
const MachineInstrBuilder & addDef(Register RegNo, unsigned Flags=0, unsigned SubReg=0) const
Add a virtual register definition operand.
void computeAllBlockSizes()
BlockT * getHeader() const
auto reverse(ContainerTy &&C, typename std::enable_if< has_rbegin< ContainerTy >::value >::type *=nullptr) -> decltype(make_range(C.rbegin(), C.rend()))
uint8_t OperandType
Information about the type of the operand.
static unsigned getARMVPTBlockMask(unsigned NumInsts)
S1Ty set_difference(const S1Ty &S1, const S2Ty &S2)
set_difference(A, B) - Return A - B
const MCInstrDesc & getDesc() const
Returns the target instruction descriptor of this MachineInstr.
bool insert(const value_type &X)
Insert a new element into the SetVector.
MachineInstrBundleIterator< MachineInstr, true > reverse_iterator
iterator begin()
Get an iterator to the beginning of the SetVector.
void setReg(Register Reg)
Change the register this operand corresponds to.
instr_iterator insert(instr_iterator I, MachineInstr *M)
Insert MI into the instruction list before I, possibly inside a bundle.
unsigned getNumUses(MachineInstr *MI, int PhysReg)
Provide the number of uses, in the same block as MI, of the register that MI defines.
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
* if(!EatIfPresent(lltok::kw_thread_local)) return false
ParseOptionalThreadLocal := /*empty.
unsigned const MachineRegisterInfo * MRI
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
int findFirstVPTPredOperandIdx(const MachineInstr &MI)
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less...
unsigned getOffsetOf(MachineInstr *MI) const
getOffsetOf - Return the current offset of the specified machine instruction from the start of the fu...
Represent the analysis usage information of a pass.
MachineInstr * getReachingMIDef(MachineInstr *MI, int PhysReg)
Provides the instruction of the closest reaching def instruction of PhysReg that reaches MI...
void setImm(int64_t immVal)
FunctionPass class - This class is used to implement most global optimizations.
std::pair< NoneType, bool > insert(const T &V)
insert - Insert an element into the set if it isn't already there.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
pred_iterator pred_begin()
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
void getReachingLocalUses(MachineInstr *MI, int PhysReg, SmallVectorImpl< MachineInstr *> &Uses)
Provides the uses, in the same block as MI, of register that MI defines.
bool isReachingDefLiveOut(MachineInstr *MI, int PhysReg)
Return whether the reaching def for MI also is live out of its parent block.
bool isRegUsedAfter(MachineInstr *MI, int PhysReg)
Return whether the given register is used after MI, whether it's a local use or a live out...
bool isBBInRange(MachineInstr *MI, MachineBasicBlock *DestBB, unsigned MaxDisp) const
isBBInRange - Returns true if the distance between specific MI and specific BB can fit in MI's displa...
auto size(R &&Range, typename std::enable_if< std::is_same< typename std::iterator_traits< decltype(Range.begin())>::iterator_category, std::random_access_iterator_tag >::value, void >::type *=nullptr) -> decltype(std::distance(Range.begin(), Range.end()))
Get the size of a range.
BlockVerifier::State From
MachineOperand class - Representation of each machine instruction operand.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
bool isVpred(OperandType op)
void setPreservesCFG()
This function should be called by the pass, iff they do not:
unsigned pred_size() const
bool isLayoutSuccessor(const MachineBasicBlock *MBB) const
Return true if the specified MBB will be emitted immediately after this block, such that if this bloc...
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
static bool isLoopStart(MachineInstr &MI)
bool isUnconditionalBranch(QueryType Type=AnyInBundle) const
Return true if this is a branch which always transfers control flow to some other block...
const MachineBasicBlock * getParent() const
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
MachineFunctionProperties & set(Property P)
Representation of each machine instruction.
unsigned getNumBlocks() const
Get the number of blocks in this loop in constant time.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
LLVM_NODISCARD bool empty() const
ArrayRef< BlockT * > getBlocks() const
Get a list of the basic blocks which make up this loop.
const ARMBaseRegisterInfo * getRegisterInfo() const override
static unsigned VCTPOpcodeToLSTP(unsigned Opcode, bool IsDoLoop)
bool isCall() const
Return true if the instruction is a call.
static bool isVCTP(MachineInstr *MI)
bool isReg() const
isReg - Tests if this is a MO_Register operand.
MachineBasicBlock * findLoopPreheader(MachineLoop *L, bool SpeculativePreheader=false) const
Find the block that either is the loop preheader, or could speculatively be used as the preheader...
int getReachingDef(MachineInstr *MI, int PhysReg)
Provides the instruction id of the closest reaching def instruction of PhysReg that reaches MI...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
A vector that has set insertion semantics.
const MCOperandInfo * OpInfo
MachineInstr * getLocalLiveOutMIDef(MachineBasicBlock *MBB, int PhysReg)
Return the local MI that produces the live out value for PhysReg, or nullptr for a non-live out or no...
StringRef - Represent a constant reference to a string, i.e.
Register getReg() const
getReg - Returns the register number.
for(unsigned i=Desc.getNumOperands(), e=OldMI.getNumOperands();i !=e;++i)
const MachineOperand & getOperand(unsigned i) const
FunctionPass * createARMLowOverheadLoopsPass()
const MachineInstrBuilder & addReg(Register RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
Properties which a MachineFunction may have at a given point in time.
Wrapper class representing virtual and physical registers.
INITIALIZE_PASS(ARMLowOverheadLoops, DEBUG_TYPE, ARM_LOW_OVERHEAD_LOOPS_NAME, false, false) MachineInstr *LowOverheadLoop
size_type count(const T &V) const
count - Return 1 if the element is in the set, 0 otherwise.