69#define DEBUG_TYPE "hexagon-load-store-widening"
73 cl::desc(
"Limit block size to analyze in load/store widening pass"));
77struct HexagonLoadStoreWidening {
78 enum WideningMode { Store, Load };
79 const HexagonInstrInfo *TII;
80 const HexagonRegisterInfo *TRI;
81 MachineRegisterInfo *MRI;
86 HexagonLoadStoreWidening(
const HexagonInstrInfo *TII,
87 const HexagonRegisterInfo *TRI,
89 MachineFunction *MF,
bool StoreMode)
90 : TII(TII), TRI(TRI), MRI(MRI), AA(AA), MF(MF),
91 Mode(StoreMode ? WideningMode::Store : WideningMode::Load),
92 HII(MF->getSubtarget<HexagonSubtarget>().getInstrInfo()) {}
98 const unsigned MaxWideSize = 8;
99 const HexagonInstrInfo *HII =
nullptr;
101 using InstrSet = SmallPtrSet<MachineInstr *, 16>;
102 using InstrGroup = SmallVector<MachineInstr *, 8>;
103 using InstrGroupList = SmallVector<InstrGroup, 8>;
105 InstrSet ProcessedInsts;
107 unsigned getBaseAddressRegister(
const MachineInstr *
MI);
109 int64_t getPostIncrementValue(
const MachineInstr *
MI);
110 bool handledInstType(
const MachineInstr *
MI);
112 void createGroup(MachineInstr *BaseInst, InstrGroup &Group);
113 void createGroups(MachineBasicBlock &
MBB, InstrGroupList &StoreGroups);
114 bool processBasicBlock(MachineBasicBlock &
MBB);
115 bool processGroup(InstrGroup &Group);
117 InstrGroup &OG,
unsigned &TotalSize,
unsigned MaxSize);
118 bool createWideInsts(InstrGroup &OG, InstrGroup &NG,
unsigned TotalSize);
119 bool createWideStores(InstrGroup &OG, InstrGroup &NG,
unsigned TotalSize);
120 bool createWideLoads(InstrGroup &OG, InstrGroup &NG,
unsigned TotalSize);
121 bool replaceInsts(InstrGroup &OG, InstrGroup &NG);
122 bool areAdjacent(
const MachineInstr *
S1,
const MachineInstr *S2);
123 bool canSwapInstructions(
const MachineInstr *
A,
const MachineInstr *
B);
124 MachineInstr *widenLoadStoreAddAsl(
Register NewPairReg,
125 const MachineInstr *FirstMem,
132 HexagonStoreWidening() : MachineFunctionPass(ID) {}
134 StringRef getPassName()
const override {
return "Hexagon Store Widening"; }
136 void getAnalysisUsage(AnalysisUsage &AU)
const override {
142 bool runOnMachineFunction(MachineFunction &MFn)
override {
147 const HexagonInstrInfo *
TII =
ST.getInstrInfo();
148 const HexagonRegisterInfo *
TRI =
ST.getRegisterInfo();
150 AliasAnalysis *AA = &getAnalysis<AAResultsWrapperPass>().getAAResults();
152 return HexagonLoadStoreWidening(
TII,
TRI, MRI, AA, &MFn,
true).run();
159 HexagonLoadWidening() : MachineFunctionPass(ID) {}
161 StringRef getPassName()
const override {
return "Hexagon Load Widening"; }
163 void getAnalysisUsage(AnalysisUsage &AU)
const override {
169 bool runOnMachineFunction(MachineFunction &MFn)
override {
174 const HexagonInstrInfo *
TII =
ST.getInstrInfo();
175 const HexagonRegisterInfo *
TRI =
ST.getRegisterInfo();
177 AliasAnalysis *AA = &getAnalysis<AAResultsWrapperPass>().getAAResults();
178 return HexagonLoadStoreWidening(
TII,
TRI, MRI, AA, &MFn,
false).run();
182char HexagonStoreWidening::ID = 0;
183char HexagonLoadWidening::ID = 0;
188 "Hexagon Store Widening",
false,
false)
200 assert(!
MI->memoperands_empty() &&
"Expecting memory operands");
201 return **
MI->memoperands_begin();
205HexagonLoadStoreWidening::getBaseAddressRegister(
const MachineInstr *
MI) {
206 assert(HexagonLoadStoreWidening::handledInstType(
MI) &&
"Unhandled opcode");
209 const MachineOperand &MO =
MI->getOperand(
Base);
210 assert(MO.
isReg() &&
"Expecting register operand");
214int64_t HexagonLoadStoreWidening::getOffset(
const MachineInstr *
MI) {
215 assert(HexagonLoadStoreWidening::handledInstType(
MI) &&
"Unhandled opcode");
225 const MachineOperand &MO =
MI->getOperand(
Offset);
238HexagonLoadStoreWidening::getPostIncrementValue(
const MachineInstr *
MI) {
239 unsigned Base, PostIncIdx;
241 const MachineOperand &MO =
MI->getOperand(PostIncIdx);
247inline bool HexagonLoadStoreWidening::handledInstType(
const MachineInstr *
MI) {
248 unsigned Opc =
MI->getOpcode();
249 if (
Mode == WideningMode::Store) {
251 case Hexagon::S4_storeirb_io:
252 case Hexagon::S4_storeirh_io:
253 case Hexagon::S4_storeiri_io:
254 case Hexagon::S2_storeri_io:
256 return MI->getOperand(0).isReg();
257 case Hexagon::S2_storeri_pi:
258 return MI->getOperand(1).isReg();
265 case Hexagon::L2_loadri_io:
267 return !
MI->memoperands_empty() &&
MI->getOperand(1).isReg() &&
268 MI->getOperand(2).isImm();
269 case Hexagon::L2_loadri_pi:
270 return !
MI->memoperands_empty() &&
MI->getOperand(2).isReg();
279 for (
const auto &
Op :
MI->operands()) {
289bool HexagonLoadStoreWidening::canSwapInstructions(
const MachineInstr *
A,
290 const MachineInstr *
B) {
291 DenseSet<Register> ARegDefs;
292 DenseSet<Register> ARegUses;
294 if (
A->mayLoadOrStore() &&
B->mayLoadOrStore() &&
295 (
A->mayStore() ||
B->mayStore()) &&
A->mayAlias(AA, *
B,
true))
297 for (
const auto &BOp :
B->operands()) {
300 if ((BOp.isDef() || BOp.readsReg()) && ARegDefs.
contains(BOp.getReg()))
302 if (BOp.isDef() && ARegUses.
contains(BOp.getReg()))
317void HexagonLoadStoreWidening::createGroups(MachineBasicBlock &
MBB,
318 InstrGroupList &StoreGroups) {
323 MachineInstr *
MI = &(*I);
324 if (!handledInstType(
MI))
333 StoreGroups.push_back(
G);
340void HexagonLoadStoreWidening::createGroup(MachineInstr *BaseInst,
342 assert(handledInstType(BaseInst) &&
"Unexpected instruction");
343 unsigned BaseReg = getBaseAddressRegister(BaseInst);
355 MachineInstr *
MI = &(*I);
358 if (
MI->isCall() ||
MI->hasUnmodeledSideEffects() ||
359 MI->hasOrderedMemoryRef())
362 if (!handledInstType(
MI)) {
363 if (
MI->mayLoadOrStore())
371 for (
auto GI : Group)
372 if (GI->mayAlias(AA, *
MI,
true))
374 if (
Mode == WideningMode::Load) {
378 for (
auto MemI :
Other)
379 if (!canSwapInstructions(
MI, MemI))
385 for (
auto MemI :
Other) {
386 if (std::distance(Group.back()->getIterator(), MemI->getIterator()) <=
389 for (
auto GI : Group)
390 if (!canSwapInstructions(MemI, GI))
395 unsigned BR = getBaseAddressRegister(
MI);
406bool HexagonLoadStoreWidening::areAdjacent(
const MachineInstr *
S1,
407 const MachineInstr *S2) {
408 if (!handledInstType(
S1) || !handledInstType(S2))
417 return (Off1 >= 0) ? Off1 + S1MO.
getSize().
getValue() == unsigned(Off2)
418 : int(Off1 + S1MO.
getSize().getValue()) == Off2;
427bool HexagonLoadStoreWidening::selectInsts(InstrGroup::iterator Begin,
428 InstrGroup::iterator End,
429 InstrGroup &OG,
unsigned &TotalSize,
431 assert(Begin != End &&
"No instructions to analyze");
432 assert(OG.empty() &&
"Old group not empty on entry");
434 if (std::distance(Begin, End) <= 1)
437 MachineInstr *FirstMI = *Begin;
439 const MachineMemOperand &FirstMMO =
getMemTarget(FirstMI);
445 unsigned FirstOffset =
getOffset(FirstMI);
451 if (SizeAccum >= MaxSize)
456 if (SizeAccum >= Alignment) {
458 dbgs() <<
"Size of load/store greater than equal to its alignment\n");
468 unsigned OffsetOrIncVal = 0;
470 OffsetOrIncVal = getPostIncrementValue(FirstMI);
472 OffsetOrIncVal = FirstOffset;
473 if ((2 * SizeAccum - 1) & OffsetOrIncVal) {
474 LLVM_DEBUG(
dbgs() <<
"Instruction cannot be widened as the offset/postinc"
475 <<
" value: " << getPostIncrementValue(FirstMI)
476 <<
" is invalid in the widened version\n");
480 OG.push_back(FirstMI);
481 MachineInstr *
S1 = FirstMI;
485 unsigned Pow2Num = 1;
486 unsigned Pow2Size = SizeAccum;
494 for (InstrGroup::iterator
I = Begin + 1;
I != End; ++
I) {
495 MachineInstr *S2 = *
I;
498 if (!areAdjacent(
S1, S2))
507 if (SizeAccum + S2Size > std::min(MaxSize, Alignment))
514 Pow2Size = SizeAccum;
516 if ((2 * Pow2Size - 1) & FirstOffset)
530 TotalSize = Pow2Size;
536bool HexagonLoadStoreWidening::createWideInsts(InstrGroup &OG, InstrGroup &NG,
537 unsigned TotalSize) {
538 if (
Mode == WideningMode::Store) {
539 return createWideStores(OG, NG, TotalSize);
541 return createWideLoads(OG, NG, TotalSize);
552MachineInstr *HexagonLoadStoreWidening::widenLoadStoreAddAsl(
561 MachineInstr *AddaslDef =
nullptr;
562 if (Register::isVirtualRegister(BaseReg))
566 while (AddaslDef && AddaslDef->
getOpcode() == Hexagon::COPY) {
567 const MachineOperand &Src = AddaslDef->
getOperand(1);
568 if (!Src.isReg() || !Register::isVirtualRegister(Src.getReg()))
573 if (!AddaslDef || AddaslDef->
getOpcode() != Hexagon::S2_addasl_rrri ||
574 (OffMO.isImm() && OffMO.getImm() != 0))
578 if (ImmVal > 3 || ImmVal < 0)
581 MachineInstr *WidenedInstr =
nullptr;
587 const TargetRegisterClass *Reg2RC = MRI->
getRegClass(Reg2);
591 if ((Hexagon::DoubleRegsRegClass.hasSubClassEq(Reg2RC) && Reg2SubReg == 0) ||
592 (!Hexagon::DoubleRegsRegClass.hasSubClassEq(Reg2RC) &&
593 !Hexagon::IntRegsRegClass.hasSubClassEq(Reg2RC)))
597 MachineInstrBuilder MIB;
599 if (
Mode == WideningMode::Load) {
605 .
addReg(Reg2, {}, Reg2SubReg)
608 MIB =
BuildMI(*MF,
DL,
TII->get(Hexagon::S4_storerd_rr))
610 .
addReg(Reg2, {}, Reg2SubReg)
619 WidenedInstr = *&MIB;
626bool HexagonLoadStoreWidening::createWideStores(InstrGroup &OG, InstrGroup &NG,
627 unsigned TotalSize) {
632 if (TotalSize > MaxWideSize)
637 bool HaveImm =
false;
638 bool HaveReg =
false;
640 for (MachineInstr *
MI : OG) {
655 Mask = (0xFFFFFFFFFFFFFFFFU >> (64 - NBits));
656 Val = (SO.
getImm() & Mask) << Shift;
669 if (HaveImm && HaveReg) {
670 LLVM_DEBUG(
dbgs() <<
"Cannot merge store register and store imm\n");
674 MachineInstr *FirstSt = OG.front();
677 MachineMemOperand *NewM =
684 auto SecondSt = OG.back();
686 MachineOperand FReg =
692 MachineOperand
SReg = SecondSt->getOperand(2);
694 "Cannot merge store register and store imm");
695 const MCInstrDesc &CombD =
TII->get(Hexagon::A2_combinew);
698 MachineInstr *CombI =
BuildMI(*MF,
DL, CombD, VReg).
add(SReg).
add(FReg);
701 if (FirstSt->
getOpcode() == Hexagon::S2_storeri_pi) {
702 const MCInstrDesc &StD =
TII->get(Hexagon::S2_storerd_pi);
708 StI = widenLoadStoreAddAsl(VReg, FirstSt,
DL);
710 const MCInstrDesc &StD =
TII->get(Hexagon::S2_storerd_io);
724 if (TotalSize == 8) {
726 uint64_t
Mask = 0xFFFFFFFFU;
727 int LowerAcc = int(Mask & Acc);
728 int UpperAcc = Acc >> 32;
733 const MCInstrDesc &TfrD =
TII->get(Hexagon::A2_tfrsi);
734 const TargetRegisterClass *RC =
TII->getRegClass(TfrD, 0);
738 const MCInstrDesc &CombD =
TII->get(Hexagon::A4_combineir);
741 .
addReg(VReg, RegState::Kill);
745 const MCInstrDesc &CombD =
TII->get(Hexagon::A4_combineii);
749 const MCInstrDesc &StD =
TII->get(Hexagon::S2_storerd_io);
752 }
else if (Acc < 0x10000) {
754 unsigned WOpc = (TotalSize == 2) ? Hexagon::S4_storeirh_io
755 : (TotalSize == 4) ? Hexagon::S4_storeiri_io
757 assert(WOpc &&
"Unexpected size");
759 int Val = (TotalSize == 2) ? int16_t(Acc) : int(Acc);
760 const MCInstrDesc &StD =
TII->get(WOpc);
764 const MCInstrDesc &TfrD =
TII->get(Hexagon::A2_tfrsi);
765 const TargetRegisterClass *RC =
TII->getRegClass(TfrD, 0);
770 unsigned WOpc = (TotalSize == 2) ? Hexagon::S2_storerh_io
771 : (TotalSize == 4) ? Hexagon::S2_storeri_io
773 assert(WOpc &&
"Unexpected size");
775 const MCInstrDesc &StD =
TII->get(WOpc);
788bool HexagonLoadStoreWidening::createWideLoads(InstrGroup &OG, InstrGroup &NG,
789 unsigned TotalSize) {
794 if (TotalSize > MaxWideSize)
796 assert(OG.size() == 2 &&
"Expecting two elements in Instruction Group.");
798 MachineInstr *FirstLd = OG.front();
800 MachineMemOperand *NewM =
805 MachineOperand &MRBase =
815 if (FirstLd->
getOpcode() == Hexagon::L2_loadri_pi) {
826 MachineInstr *RR = widenLoadStoreAddAsl(NewMR, FirstLd,
DL);
841 auto getHalfReg = [&](MachineInstr *DoubleReg,
unsigned SubReg,
842 MachineInstr *DstReg) {
843 Register DestReg = DstReg->getOperand(0).getReg();
844 return BuildMI(*MF,
DL,
TII->get(Hexagon::COPY), DestReg)
848 MachineInstr *LdI_lo = getHalfReg(LdI, Hexagon::isub_lo, FirstLd);
849 MachineInstr *LdI_hi = getHalfReg(LdI, Hexagon::isub_hi, OG.back());
850 NG.push_back(LdI_lo);
851 NG.push_back(LdI_hi);
861bool HexagonLoadStoreWidening::replaceInsts(InstrGroup &OG, InstrGroup &NG) {
863 dbgs() <<
"Replacing:\n";
885 if (
Mode == WideningMode::Load) {
887 for (
auto &
I : *
MBB) {
888 if (OldMemInsts.count(&
I)) {
894 assert((InsertAt !=
MBB->
end()) &&
"Cannot locate any load from the group");
902 if (OldMemInsts.count(&(*
I))) {
903 InsertAt = (*I).getIterator();
908 assert((
I !=
MBB->
rend()) &&
"Cannot locate any store from the group");
910 for (
auto I = NG.rbegin();
I != NG.rend(); ++
I)
915 I->eraseFromParent();
923bool HexagonLoadStoreWidening::processGroup(InstrGroup &Group) {
925 InstrGroup::iterator
I = Group.begin(),
E = Group.end();
927 unsigned CollectedSize;
933 bool Succ = selectInsts(
I++,
E, OG, CollectedSize, MaxWideSize) &&
934 createWideInsts(OG, NG, CollectedSize) && replaceInsts(OG, NG);
938 assert(OG.size() > 1 &&
"Created invalid group");
939 assert(std::distance(
I,
E) + 1 >=
int(OG.size()) &&
"Too many elements");
954bool HexagonLoadStoreWidening::processBasicBlock(MachineBasicBlock &
MBB) {
962 createGroups(
MBB, SGs);
964 auto Less = [
this](
const MachineInstr *
A,
const MachineInstr *
B) ->
bool {
967 for (
auto &
G : SGs) {
968 assert(
G.size() > 1 &&
"Group with fewer than 2 elements");
977bool HexagonLoadStoreWidening::run() {
987 return new HexagonStoreWidening();
991 return new HexagonLoadWidening();
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
const HexagonInstrInfo * TII
static cl::opt< unsigned > MaxMBBSizeForLoadStoreWidening("max-bb-size-for-load-store-widening", cl::Hidden, cl::init(1000), cl::desc("Limit block size to analyze in load/store widening pass"))
hexagon widen Hexagon Store false hexagon widen Hexagon Load static false const MachineMemOperand & getMemTarget(const MachineInstr *MI)
Register const TargetRegisterInfo * TRI
Promote Memory to Register
This file provides utility analysis objects describing memory locations.
#define INITIALIZE_PASS_DEPENDENCY(depName)
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
static cl::opt< RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode > Mode("regalloc-enable-advisor", cl::Hidden, cl::init(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default), cl::desc("Enable regalloc advisor mode"), cl::values(clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default, "default", "Default"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Release, "release", "precompiled"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Development, "development", "for training")))
static void addDefsUsesToList(const MachineInstr &MI, DenseSet< Register > &RegDefs, DenseSet< Register > &RegUses)
This file defines the SmallPtrSet class.
static unsigned getSize(unsigned Kind)
A wrapper pass to provide the legacy pass manager access to a suitably prepared AAResults object.
AnalysisUsage & addRequired()
AnalysisUsage & addPreserved()
Add the specified Pass class to the set of analyses preserved by this pass.
Implements a dense probed hash-table based set.
FunctionPass class - This class is used to implement most global optimizations.
bool isPostIncrement(const MachineInstr &MI) const override
Return true for post-incremented instructions.
bool getBaseAndOffsetPosition(const MachineInstr &MI, unsigned &BasePos, unsigned &OffsetPos) const override
For instructions with a base and offset, return the position of the base register and offset operands...
constexpr bool isValid() const
TypeSize getValue() const
LLVM_ABI instr_iterator insert(instr_iterator I, MachineInstr *M)
Insert MI into the instruction list before I, possibly inside a bundle.
reverse_iterator rbegin()
iterator insertAfter(iterator I, MachineInstr *MI)
Insert MI into the instruction list after I.
MachineInstrBundleIterator< MachineInstr > iterator
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
MachineMemOperand * getMachineMemOperand(MachinePointerInfo PtrInfo, MachineMemOperand::Flags f, LLT MemTy, Align base_alignment, const AAMDNodes &AAInfo=AAMDNodes(), const MDNode *Ranges=nullptr, SyncScope::ID SSID=SyncScope::System, AtomicOrdering Ordering=AtomicOrdering::NotAtomic, AtomicOrdering FailureOrdering=AtomicOrdering::NotAtomic)
getMachineMemOperand - Allocate a new MachineMemOperand.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
Function & getFunction()
Return the LLVM function that this machine code represents.
const MachineInstrBuilder & addReg(Register RegNo, RegState Flags={}, unsigned SubReg=0) const
Add a new virtual register operand.
const MachineInstrBuilder & addImm(int64_t Val) const
Add a new immediate operand.
const MachineInstrBuilder & add(const MachineOperand &MO) const
const MachineInstrBuilder & addDef(Register RegNo, RegState Flags={}, unsigned SubReg=0) const
Add a virtual register definition operand.
Representation of each machine instruction.
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
const MachineBasicBlock * getParent() const
bool memoperands_empty() const
Return true if we don't have any memory operands which described the memory access done by this instr...
const DebugLoc & getDebugLoc() const
Returns the debug location id of this MachineInstr.
LLVM_ABI void dump() const
const MachineOperand & getOperand(unsigned i) const
LLVM_ABI void addMemOperand(MachineFunction &MF, MachineMemOperand *MO)
Add a MachineMemOperand to the machine instruction.
A description of a memory reference used in the backend.
LocationSize getSize() const
Return the size in bytes of the memory reference.
const MachinePointerInfo & getPointerInfo() const
Flags getFlags() const
Return the raw flags of the source value,.
LLVM_ABI Align getAlign() const
Return the minimum known alignment in bytes of the actual memory reference.
LocationSize getSizeInBits() const
Return the size in bits of the memory reference.
AAMDNodes getAAInfo() const
Return the AA tags for the memory reference.
unsigned getSubReg() const
bool isReg() const
isReg - Tests if this is a MO_Register operand.
void setIsKill(bool Val=true)
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
Register getReg() const
getReg - Returns the register number.
@ MO_Immediate
Immediate operand.
@ MO_GlobalAddress
Address of a global value.
@ MO_Register
Register operand.
int64_t getOffset() const
Return the offset from the symbol in this operand.
const TargetRegisterClass * getRegClass(Register Reg) const
Return the register class of the specified virtual register.
LLVM_ABI MachineInstr * getVRegDef(Register Reg) const
getVRegDef - Return the machine instr that defines the specified virtual register or null if none is ...
LLVM_ABI Register createVirtualRegister(const TargetRegisterClass *RegClass, StringRef Name="")
createVirtualRegister - Create and return a new virtual register in the function with the specified r...
LLVM_ABI MachineInstr * getUniqueVRegDef(Register Reg) const
getUniqueVRegDef - Return the unique machine instr that defines the specified virtual register or nul...
size_type count(ConstPtrType Ptr) const
count - Return 1 if the specified pointer is in the set, 0 otherwise.
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
void push_back(const T &Elt)
std::pair< iterator, bool > insert(const ValueT &V)
bool contains(const_arg_type_t< ValueT > V) const
Check if the set contains the given element.
self_iterator getIterator()
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
constexpr std::underlying_type_t< E > Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
@ BR
Control flow instructions. These all have token chains.
initializer< Ty > init(const Ty &Val)
PointerTypeMap run(const Module &M)
Compute the PointerTypeMap for the module M.
BaseReg
Stack frame base register. Bit 0 of FREInfo.Info.
This is an optimization pass for GlobalISel generic memory operations.
MachineInstrBuilder BuildMI(MachineFunction &MF, const MIMetadata &MIMD, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
constexpr RegState getKillRegState(bool B)
constexpr from_range_t from_range
static Error getOffset(const SymbolRef &Sym, SectionRef Sec, uint64_t &Result)
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
void sort(IteratorTy Start, IteratorTy End)
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
FunctionPass * createHexagonLoadWidening()
DWARFExpression::Operation Op
AAResults AliasAnalysis
Temporary typedef for legacy code that uses a generic AliasAnalysis pointer or reference.
FunctionPass * createHexagonStoreWidening()
constexpr uint64_t value() const
This is a hole in the type system and should not be abused.