117 #define DEBUG_TYPE "expand-condsets"
119 using namespace llvm;
139 HexagonExpandCondsets() :
141 LIS(nullptr), CoaLimitActive(
false),
142 TfrLimitActive(
false), CoaCounter(0), TfrCounter(0) {
150 StringRef getPassName()
const override {
return "Hexagon Expand Condsets"; }
170 bool CoaLimitActive, TfrLimitActive;
171 unsigned CoaLimit, TfrLimit, CoaCounter, TfrCounter;
175 Sub(Op.getSubReg()) {}
176 RegisterRef(
unsigned R = 0,
unsigned S = 0) :
Reg(R), Sub(S) {}
179 return Reg == RR.Reg && Sub == RR.Sub;
183 return Reg < RR.Reg || (
Reg == RR.Reg && Sub < RR.Sub);
190 enum { Sub_Low = 0x1, Sub_High = 0x2, Sub_None = (Sub_Low | Sub_High) };
191 enum { Exec_Then = 0x10, Exec_Else = 0x20 };
192 unsigned getMaskForSub(
unsigned Sub);
196 void addRefToMap(RegisterRef RR, ReferenceMap &Map,
unsigned Exec);
197 bool isRefInMap(RegisterRef, ReferenceMap &Map,
unsigned Exec);
200 void updateKillFlags(
unsigned Reg);
201 void updateDeadFlags(
unsigned Reg);
202 void recalculateLiveInterval(
unsigned Reg);
205 bool UpdateKills,
bool UpdateDeads);
211 bool ReadUndef,
bool ImpUse);
217 bool canMoveOver(
MachineInstr &
MI, ReferenceMap &Defs, ReferenceMap &Uses);
222 std::set<unsigned> &UpdRegs);
223 void renameInRange(RegisterRef RO, RegisterRef
RN,
unsigned PredR,
226 bool predicate(
MachineInstr &TfrI,
bool Cond, std::set<unsigned> &UpdRegs);
228 std::set<unsigned> &UpdRegs);
230 bool isIntReg(RegisterRef RR,
unsigned &BW);
232 bool coalesceRegisters(RegisterRef R1, RegisterRef
R2);
234 std::set<unsigned> &UpdRegs);
248 "Hexagon Expand Condsets",
false,
false)
255 unsigned HexagonExpandCondsets::getMaskForSub(
unsigned Sub) {
257 case Hexagon::isub_lo:
258 case Hexagon::vsub_lo:
260 case Hexagon::isub_hi:
261 case Hexagon::vsub_hi:
263 case Hexagon::NoSubRegister:
272 case Hexagon::C2_mux:
273 case Hexagon::C2_muxii:
274 case Hexagon::C2_muxir:
275 case Hexagon::C2_muxri:
276 case Hexagon::PS_pselect:
283 LaneBitmask HexagonExpandCondsets::getLaneMask(
unsigned Reg,
unsigned Sub) {
285 return Sub != 0 ? TRI->getSubRegIndexLaneMask(Sub)
286 :
MRI->getMaxLaneMaskForVReg(Reg);
289 void HexagonExpandCondsets::addRefToMap(RegisterRef RR, ReferenceMap &Map,
291 unsigned Mask = getMaskForSub(RR.Sub) | Exec;
292 ReferenceMap::iterator
F = Map.find(RR.Reg);
294 Map.insert(std::make_pair(RR.Reg, Mask));
299 bool HexagonExpandCondsets::isRefInMap(RegisterRef RR, ReferenceMap &Map,
301 ReferenceMap::iterator F = Map.find(RR.Reg);
304 unsigned Mask = getMaskForSub(RR.Sub) | Exec;
305 if (Mask & F->second)
310 void HexagonExpandCondsets::updateKillFlags(
unsigned Reg) {
315 if (!
Op.isReg() || !
Op.isUse() ||
Op.getReg() !=
Reg)
318 if ((SLM & LM) == SLM) {
329 if (!
I->end.isRegister())
333 auto NextI = std::next(
I);
334 if (NextI !=
E && NextI->start.isRegister()) {
335 MachineInstr *DefI = LIS->getInstructionFromIndex(NextI->start);
336 if (HII->isPredicated(*DefI))
339 bool WholeReg =
true;
343 return F != S.end() &&
I->end == F->end;
349 KillAt(
I->end, S.LaneMask);
355 KillAt(
I->end,
MRI->getMaxLaneMaskForVReg(Reg));
359 void HexagonExpandCondsets::updateDeadsInRange(
unsigned Reg,
LaneBitmask LM,
367 if (!
Op.isReg() || !
Op.isDef())
368 return {
false,
false };
369 unsigned DR =
Op.getReg(), DSR =
Op.getSubReg();
371 return {
false,
false };
374 return { A.
any(), A == SLM };
387 if (
D != Dest && MDT->dominates(
D, Dest))
392 for (
unsigned i = 0; i < Work.size(); ++i) {
409 for (
auto &Seg : Range) {
410 if (!Seg.start.isRegister())
412 MachineInstr *DefI = LIS->getInstructionFromIndex(Seg.start);
414 if (HII->isPredicated(*DefI))
422 for (
auto &SI : PredDefs) {
424 auto P = Range.extendInBlock(Undefs, LIS->getMBBStartIdx(BB),
SI);
425 if (
P.first !=
nullptr ||
P.second)
432 for (
auto &SI : PredDefs) {
448 if (Dominate(Defs, BB))
453 LIS->extendToIndices(Range, ExtTo, Undefs);
462 std::set<RegisterRef> DefRegs;
463 for (
auto &Seg : Range) {
464 if (!Seg.start.isRegister())
466 MachineInstr *DefI = LIS->getInstructionFromIndex(Seg.start);
468 auto P = IsRegDef(
Op);
469 if (
P.second && Seg.end.isDead()) {
471 }
else if (
P.first) {
480 for (
auto &Seg : Range) {
481 if (!Seg.start.isRegister() || !Range.liveAt(Seg.start.getPrevSlot()))
483 MachineInstr *DefI = LIS->getInstructionFromIndex(Seg.start);
484 if (!HII->isPredicated(*DefI))
488 std::set<RegisterRef> ImpUses;
490 if (
Op.isReg() &&
Op.isDef() && DefRegs.count(
Op))
495 for (RegisterRef R : ImpUses)
501 void HexagonExpandCondsets::updateDeadFlags(
unsigned Reg) {
505 updateDeadsInRange(Reg, S.LaneMask, S);
506 LIS->shrinkToUses(S, Reg);
509 LIS->constructMainRangeFromSubranges(LI);
511 updateDeadsInRange(Reg,
MRI->getMaxLaneMaskForVReg(Reg), LI);
515 void HexagonExpandCondsets::recalculateLiveInterval(
unsigned Reg) {
516 LIS->removeInterval(Reg);
517 LIS->createAndComputeVirtRegInterval(Reg);
520 void HexagonExpandCondsets::removeInstr(
MachineInstr &MI) {
521 LIS->RemoveMachineInstrFromMaps(MI);
526 bool Recalc,
bool UpdateKills,
bool UpdateDeads) {
527 UpdateKills |= UpdateDeads;
528 for (
auto R : RegSet) {
530 recalculateLiveInterval(R);
532 MRI->clearKillFlags(R);
539 LIS->getInterval(R).verify();
545 unsigned HexagonExpandCondsets::getCondTfrOpcode(
const MachineOperand &SO,
547 using namespace Hexagon;
555 PhysR = *VC->
begin();
560 unsigned PhysS = (RS.Sub == 0) ? PhysR : TRI->getSubReg(PhysR, RS.Sub);
562 switch (TRI->getRegSizeInBits(*RC)) {
564 return IfTrue ? A2_tfrt : A2_tfrf;
566 return IfTrue ? A2_tfrpt : A2_tfrpf;
579 return IfTrue ? C2_cmoveit : C2_cmoveif;
593 bool PredSense,
bool ReadUndef,
bool ImpUse) {
604 unsigned Opc = getCondTfrOpcode(SrcOp, PredSense);
611 if (RegisterRef(SrcOp) == RegisterRef(DstR, DstSR))
612 SrcState &= ~RegState
::Kill;
614 .addReg(DstR, DstState, DstSR)
619 .addReg(DstR, DstState, DstSR)
624 DEBUG(
dbgs() <<
"created an initial copy: " << *MIB);
631 std::set<unsigned> &UpdRegs) {
632 if (TfrLimitActive) {
633 if (TfrCounter >= TfrLimit)
642 unsigned DR = MD.getReg(), DSR = MD.getSubReg();
643 bool ReadUndef = MD.isUndef();
649 UpdRegs.insert(
Op.getReg());
659 if (RT == RegisterRef(SF)) {
662 MI.
setDesc(HII->get(TargetOpcode::COPY));
676 genCondTfrFor(ST, At, DR, DSR, MP,
true, ReadUndef,
false);
678 genCondTfrFor(SF, At, DR, DSR, MP,
false, ReadUndef,
true);
679 LIS->InsertMachineInstrInMaps(*TfrT);
680 LIS->InsertMachineInstrInMaps(*TfrF);
689 bool HexagonExpandCondsets::isPredicable(
MachineInstr *MI) {
690 if (HII->isPredicated(*MI) || !HII->isPredicable(*MI))
697 if (!
Op.isReg() || !
Op.isDef())
704 if (Mo->isVolatile())
712 MachineInstr *HexagonExpandCondsets::getReachingDefForPred(RegisterRef RD,
719 bool PredValid =
true;
725 if (PredValid && HII->isPredicated(*MI)) {
726 if (MI->
readsRegister(PredR) && (Cond != HII->isPredicatedTrue(*MI)))
733 if (!
Op.isReg() || !
Op.isDef())
736 if (RR.Reg == PredR) {
740 if (RR.Reg != RD.Reg)
745 if (RR.Sub == RD.Sub)
747 if (RR.Sub == 0 || RD.Sub == 0)
761 bool HexagonExpandCondsets::canMoveOver(
MachineInstr &MI, ReferenceMap &Defs,
762 ReferenceMap &Uses) {
776 if (isRefInMap(RR, Defs, Exec_Then))
779 if (
Op.isDef() && isRefInMap(RR, Uses, Exec_Then))
790 if (!IsLoad && !IsStore)
792 if (HII->areMemAccessesTriviallyDisjoint(TheI, ToI))
812 bool Conflict = (L && IsStore) || S;
821 void HexagonExpandCondsets::predicateAt(
const MachineOperand &DefOp,
825 std::set<unsigned> &UpdRegs) {
840 unsigned PredOpc = HII->getCondOpcode(Opc, !Cond);
866 for (
unsigned i = 0; i < NR; ++i)
872 LIS->InsertMachineInstrInMaps(*NewI);
876 UpdRegs.insert(
Op.getReg());
882 void HexagonExpandCondsets::renameInRange(RegisterRef RO, RegisterRef
RN,
890 if (!HII->isPredicated(*MI))
892 if (!MI->
readsRegister(PredR) || (Cond != HII->isPredicatedTrue(*MI)))
896 if (!
Op.isReg() || RO != RegisterRef(
Op))
899 Op.setSubReg(RN.Sub);
901 assert(!
Op.isDef() &&
"Not expecting a def");
909 bool HexagonExpandCondsets::predicate(
MachineInstr &TfrI,
bool Cond,
910 std::set<unsigned> &UpdRegs) {
914 assert(Opc == Hexagon::A2_tfrt || Opc == Hexagon::A2_tfrf);
915 DEBUG(
dbgs() <<
"\nattempt to predicate if-" << (Cond ?
"true" :
"false")
932 unsigned PredR = MP.
getReg();
933 MachineInstr *DefI = getReachingDefForPred(RT, TfrI, PredR, Cond);
934 if (!DefI || !isPredicable(DefI))
937 DEBUG(
dbgs() <<
"Source def: " << *DefI);
942 ReferenceMap Uses, Defs;
948 bool PredValid =
true;
950 if (!I->modifiesRegister(PredR,
nullptr))
962 unsigned Exec = Exec_Then | Exec_Else;
963 if (PredValid && HII->isPredicated(*MI) && MI->
readsRegister(PredR))
964 Exec = (Cond == HII->isPredicatedTrue(*MI)) ? Exec_Then : Exec_Else;
980 ReferenceMap &Map =
Op.isDef() ? Defs : Uses;
981 if (
Op.isDef() &&
Op.isUndef()) {
982 assert(RR.Sub &&
"Expecting a subregister on <def,read-undef>");
988 addRefToMap(RR, Map, Exec);
1005 if (isRefInMap(RT, Defs, Exec_Then) || isRefInMap(RT, Uses, Exec_Else))
1007 RegisterRef RD = MD;
1014 bool CanUp = canMoveOver(TfrI, Defs, Uses);
1015 bool CanDown = canMoveOver(*DefI, Defs, Uses);
1019 if (!canMoveMemTo(*DefI, TfrI,
true))
1022 DEBUG(
dbgs() <<
"Can move up: " << (CanUp ?
"yes" :
"no")
1023 <<
", can move down: " << (CanDown ?
"yes\n" :
"no\n"));
1026 predicateAt(MD, *DefI, PastDefIt, MP, Cond, UpdRegs);
1028 predicateAt(MD, *DefI, TfrIt, MP, Cond, UpdRegs);
1033 renameInRange(RT, RD, PredR, Cond, PastDefIt, TfrIt);
1034 UpdRegs.insert(RT.Reg);
1044 std::set<unsigned> &UpdRegs) {
1045 bool Changed =
false;
1047 for (I = B.
begin(), E = B.
end(); I !=
E; I = NextI) {
1048 NextI = std::next(I);
1049 unsigned Opc = I->getOpcode();
1050 if (Opc == Hexagon::A2_tfrt || Opc == Hexagon::A2_tfrf) {
1051 bool Done = predicate(*I, (Opc == Hexagon::A2_tfrt), UpdRegs);
1055 if (RegisterRef(I->getOperand(0)) == RegisterRef(I->getOperand(2))) {
1056 for (
auto &
Op : I->operands())
1058 UpdRegs.insert(
Op.getReg());
1072 if (RC == &Hexagon::IntRegsRegClass) {
1076 if (RC == &Hexagon::DoubleRegsRegClass) {
1077 BW = (RR.Sub != 0) ? 32 : 64;
1083 bool HexagonExpandCondsets::isIntraBlocks(
LiveInterval &LI) {
1096 bool HexagonExpandCondsets::coalesceRegisters(RegisterRef R1, RegisterRef
R2) {
1097 if (CoaLimitActive) {
1098 if (CoaCounter >= CoaLimit)
1105 if (
MRI->isLiveIn(R1.Reg))
1107 if (
MRI->isLiveIn(R2.Reg))
1118 DEBUG(
dbgs() <<
"compatible registers: ("
1119 << (Overlap ?
"overlap" :
"disjoint") <<
")\n "
1120 <<
PrintReg(R1.Reg, TRI, R1.Sub) <<
" " << L1 <<
"\n "
1121 <<
PrintReg(R2.Reg, TRI, R2.Sub) <<
" " << L2 <<
"\n");
1122 if (R1.Sub || R2.Sub)
1130 if (!isIntraBlocks(L1) && !isIntraBlocks(L2))
1133 MRI->replaceRegWith(R2.Reg, R1.Reg);
1139 VNInfo *NewVN, *OldVN = I->valno;
1140 ValueInfoMap::iterator F = VM.find(OldVN);
1141 if (F == VM.end()) {
1142 NewVN = L1.
getNextValue(I->valno->def, LIS->getVNInfoAllocator());
1143 VM.insert(std::make_pair(OldVN, NewVN));
1151 LIS->removeInterval(R2.Reg);
1153 updateKillFlags(R1.Reg);
1154 DEBUG(
dbgs() <<
"coalesced: " << L1 <<
"\n");
1163 bool HexagonExpandCondsets::coalesceSegments(
1165 std::set<unsigned> &UpdRegs) {
1169 if (!S1.
isReg() && !S2.isReg())
1174 bool Changed =
false;
1176 RegisterRef RD = CI->getOperand(0);
1177 RegisterRef
RP = CI->getOperand(1);
1199 RegisterRef RS = S1;
1200 MachineInstr *RDef = getReachingDefForPred(RS, CI, RP.Reg,
true);
1202 Done = coalesceRegisters(RD, RegisterRef(S1));
1204 UpdRegs.insert(RD.Reg);
1205 UpdRegs.insert(S1.
getReg());
1209 if (!Done && S2.isReg()) {
1210 RegisterRef RS = S2;
1211 MachineInstr *RDef = getReachingDefForPred(RS, CI, RP.Reg,
false);
1213 Done = coalesceRegisters(RD, RegisterRef(S2));
1215 UpdRegs.insert(RD.Reg);
1216 UpdRegs.insert(S2.getReg());
1225 bool HexagonExpandCondsets::runOnMachineFunction(
MachineFunction &MF) {
1231 MDT = &getAnalysis<MachineDominatorTree>();
1232 LIS = &getAnalysis<LiveIntervals>();
1235 DEBUG(LIS->print(
dbgs() <<
"Before expand-condsets\n",
1238 bool Changed =
false;
1239 std::set<unsigned> CoalUpd, PredUpd;
1249 Changed |= coalesceSegments(Condsets, CoalUpd);
1256 std::set<unsigned> KillUpd;
1259 if (
Op.isReg() &&
Op.isUse())
1260 if (!CoalUpd.count(
Op.getReg()))
1261 KillUpd.insert(
Op.getReg());
1263 DEBUG(LIS->print(
dbgs() <<
"After coalescing\n",
1264 MF.getFunction()->getParent()));
1271 Changed |=
split(*MI, PredUpd);
1280 DEBUG(LIS->print(
dbgs() <<
"After splitting\n",
1281 MF.getFunction()->getParent()));
1288 Changed |= predicateInBlock(B, PredUpd);
1289 DEBUG(LIS->print(
dbgs() <<
"After predicating\n",
1290 MF.getFunction()->getParent()));
1292 PredUpd.insert(CoalUpd.begin(), CoalUpd.end());
1297 LIS->print(
dbgs() <<
"After expand-condsets\n",
1298 MF.getFunction()->getParent());
1309 return new HexagonExpandCondsets();
void push_back(const T &Elt)
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
char & HexagonExpandCondsetsID
AnalysisUsage & addPreserved()
Add the specified Pass class to the set of analyses preserved by this pass.
MachineInstr * getParent()
getParent - Return the instruction that this operand belongs to.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
unsigned getRegState(const MachineOperand &RegOp)
Get all register state flags from machine operand RegOp.
int getNumber() const
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a MachineFuncti...
static void updateLiveness(MachineFunction &MF)
Helper function to update the liveness information for the callee-saved registers.
Segments::iterator iterator
LiveInterval - This class represents the liveness of a register, or stack slot.
bool mayStore(QueryType Type=AnyInBundle) const
Return true if this instruction could possibly modify memory.
FunctionPass * createHexagonExpandCondsets()
static bool isVirtualRegister(unsigned Reg)
Return true if the specified register number is in the virtual register namespace.
Address of indexed Jump Table for switch.
const MachineInstrBuilder & add(const MachineOperand &MO) const
bool isPredicable(QueryType Type=AllInBundle) const
Return true if this instruction has a predicate operand that controls execution.
bool hasOrderedMemoryRef() const
Return true if this instruction may have an ordered or volatile memory reference, or if the informati...
A live range for subregisters.
This represents a simple continuous liveness interval for a value.
static std::pair< StringRef, StringRef > split(StringRef Str, char Separator)
Checked version of split, to ensure mandatory subparts.
const Function * getFunction() const
getFunction - Return the LLVM function that this machine code represents
bool isRegister() const
isRegister - Returns true if this is a normal register use/def slot.
iterator_range< mmo_iterator > memoperands()
VNInfo - Value Number Information.
iterator_range< mop_iterator > operands()
This class represents the liveness of a register, stack slot, etc.
void clearKillInfo()
Clears kill flags on all operands.
AnalysisUsage & addRequired()
#define INITIALIZE_PASS_DEPENDENCY(depName)
A description of a memory reference used in the backend.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
expand Hexagon Expand Condsets
Target-dependent index+offset operand.
bool isReg() const
isReg - Tests if this is a MO_Register operand.
iterator_range< subrange_iterator > subranges()
void eraseFromParent()
Unlink 'this' from the containing basic block and delete it.
bool mayLoad(QueryType Type=AnyInBundle) const
Return true if this instruction could possibly read memory.
Name of external global symbol.
iterator begin() const
begin/end - Return all of the registers in this class.
Reg
All possible values of the reg field in the ModR/M byte.
constexpr bool any() const
LLVM_NODISCARD bool empty() const
unsigned getNumOperands() const
Access to explicit operands of the instruction.
void RemoveOperand(unsigned i)
Erase an operand from an instruction, leaving it with one fewer operand than it started with...
const MachineBasicBlock & front() const
bool isDead() const
isDead - Returns true if this is a dead def kill slot.
bool insert(const value_type &X)
Insert a new element into the SetVector.
iterator addSegment(Segment S)
Add the specified Segment to this range, merging segments as appropriate.
Printable PrintReg(unsigned Reg, const TargetRegisterInfo *TRI=nullptr, unsigned SubRegIdx=0)
Prints virtual and physical registers with or without a TRI instance.
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
const MachineBasicBlock * getParent() const
mmo_iterator memoperands_end() const
MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
Address of a global value.
initializer< Ty > init(const Ty &Val)
const MachineInstrBuilder & setMemRefs(MachineInstr::mmo_iterator b, MachineInstr::mmo_iterator e) const
unsigned const MachineRegisterInfo * MRI
const MachineOperand & getOperand(unsigned i) const
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
bool overlaps(const LiveRange &other) const
overlaps - Return true if the intersection of the two live ranges is not empty.
Represent the analysis usage information of a pass.
Address of a basic block.
INITIALIZE_PASS_END(RegBankSelect, DEBUG_TYPE,"Assign register bank of generic virtual registers", false, false) RegBankSelect
static const unsigned End
static cl::opt< unsigned > OptCoaLimit("expand-condsets-coa-limit", cl::init(~0U), cl::Hidden, cl::desc("Max number of segment coalescings"))
bool hasUnmodeledSideEffects() const
Return true if this instruction has side effects that are not modeled by mayLoad / mayStore...
FunctionPass class - This class is used to implement most global optimizations.
iterator_range< pred_iterator > predecessors()
static Expected< BitVector > expand(StringRef S, StringRef Original)
unsigned getSubReg() const
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
void removeSegment(SlotIndex Start, SlotIndex End, bool RemoveDeadValNo=false)
Remove the specified segment from this range.
bool readsRegister(unsigned Reg, const TargetRegisterInfo *TRI=nullptr) const
Return true if the MachineInstr reads the specified register.
void setDesc(const MCInstrDesc &tid)
Replace the instruction descriptor (thus opcode) of the current instruction with a new one...
expand Hexagon Expand false
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...
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
static unsigned getReg(const void *D, unsigned RC, unsigned RegNo)
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
static cl::opt< unsigned > OptTfrLimit("expand-condsets-tfr-limit", cl::init(~0U), cl::Hidden, cl::desc("Max number of mux expansions"))
llvm_unreachable("Unknown RegBank!")
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata * > MDs)
bool operator!=(uint64_t V1, const APInt &V2)
Representation of each machine instruction.
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
static bool isPhysicalRegister(unsigned Reg)
Return true if the specified register number is in the physical register namespace.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
void verify(const MachineRegisterInfo *MRI=nullptr) const
Walks the interval and assert if any invariants fail to hold.
unsigned getReg() const
getReg - Returns the register number.
VNInfo * getNextValue(SlotIndex def, VNInfo::Allocator &VNInfoAllocator)
getNextValue - Create a new value number and return it.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool operator<(int64_t V1, const APSInt &V2)
virtual const TargetInstrInfo * getInstrInfo() const
Module * getParent()
Get the module that this global value is contained inside of...
Floating-point immediate operand.
A vector that has set insertion semantics.
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
void computeSubRangeUndefs(SmallVectorImpl< SlotIndex > &Undefs, LaneBitmask LaneMask, const MachineRegisterInfo &MRI, const SlotIndexes &Indexes) const
For a given lane mask LaneMask, compute indexes at which the lane is marked undefined by subregister ...
bool isIntReg(unsigned Reg)
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
StringRef - Represent a constant reference to a string, i.e.
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
Address of indexed Constant in Constant Pool.
bool operator==(uint64_t V1, const APInt &V2)
INITIALIZE_PASS_BEGIN(HexagonExpandCondsets,"expand-condsets","Hexagon Expand Condsets", false, false) INITIALIZE_PASS_END(HexagonExpandCondsets
bool hasSubRanges() const
Returns true if subregister liveness information is available.
const MachineInstrBuilder & addReg(unsigned RegNo, unsigned flags=0, unsigned SubReg=0) const
Add a new virtual register operand.
SlotIndex - An opaque wrapper around machine indexes.
void initializeHexagonExpandCondsetsPass(PassRegistry &)
MachineInstr::mmo_iterator allocateMemRefsArray(unsigned long Num)
allocateMemRefsArray - Allocate an array to hold MachineMemOperand pointers.
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
mmo_iterator memoperands_begin() const
Access to memory operands of the instruction.