40#define DEBUG_TYPE "machine-combiner"
42STATISTIC(NumInstCombined,
"Number of machineinst combined");
45class MachineCombinerImpl {
46 const CodeGenOptions &Opts;
62 explicit MachineCombinerImpl(
const CodeGenOptions &Opts) : Opts(Opts) {}
64 MachineTraceMetrics *Traces, ProfileSummaryInfo *PSI,
65 MachineBlockFrequencyInfo *MBFI, RegisterClassInfo *RegClassInfo);
68 bool combineInstructions(MachineBasicBlock *);
69 MachineInstr *getOperandDef(
const MachineOperand &MO);
70 bool isTransientMI(
const MachineInstr *
MI);
71 unsigned getDepth(SmallVectorImpl<MachineInstr *> &InsInstrs,
72 DenseMap<Register, unsigned> &InstrIdxForVirtReg,
74 const MachineBasicBlock &
MBB);
75 unsigned getLatency(MachineInstr *Root, MachineInstr *NewRoot,
77 bool improvesCriticalPathLen(MachineBasicBlock *
MBB, MachineInstr *Root,
79 SmallVectorImpl<MachineInstr *> &InsInstrs,
80 SmallVectorImpl<MachineInstr *> &DelInstrs,
81 DenseMap<Register, unsigned> &InstrIdxForVirtReg,
82 unsigned Pattern,
bool SlackIsAccurate);
83 bool reduceRegisterPressure(MachineInstr &Root, MachineBasicBlock *
MBB,
84 SmallVectorImpl<MachineInstr *> &InsInstrs,
85 SmallVectorImpl<MachineInstr *> &DelInstrs,
87 bool preservesResourceLen(MachineBasicBlock *
MBB,
89 SmallVectorImpl<MachineInstr *> &InsInstrs,
90 SmallVectorImpl<MachineInstr *> &DelInstrs);
91 void instr2instrSC(SmallVectorImpl<MachineInstr *> &Instrs,
92 SmallVectorImpl<const MCSchedClassDesc *> &InstrsSC);
93 std::pair<unsigned, unsigned>
94 getLatenciesForInstrSequences(MachineInstr &
MI,
95 SmallVectorImpl<MachineInstr *> &InsInstrs,
96 SmallVectorImpl<MachineInstr *> &DelInstrs,
105 MachineCombinerLegacy() : MachineFunctionPass(ID) {}
106 void getAnalysisUsage(AnalysisUsage &AU)
const override;
108 StringRef getPassName()
const override {
return "Machine InstCombiner"; }
112char MachineCombinerLegacy::ID = 0;
123void MachineCombinerLegacy::getAnalysisUsage(
AnalysisUsage &AU)
const {
124 AU.setPreservesCFG();
135 MachineInstr *DefInstr =
nullptr;
143bool MachineCombinerImpl::isTransientMI(
const MachineInstr *
MI) {
151 if (!
MI->isFullCopy()) {
153 if (
MI->getOperand(0).getSubReg() || Src.isPhysical() || Dst.isPhysical())
156 auto SrcSub =
MI->getOperand(1).getSubReg();
159 return TRI->getMatchingSuperRegClass(SrcRC, DstRC, SrcSub) !=
nullptr;
162 if (Src.isPhysical() && Dst.isPhysical())
165 if (Src.isVirtual() && Dst.isVirtual()) {
188MachineCombinerImpl::getDepth(SmallVectorImpl<MachineInstr *> &InsInstrs,
189 DenseMap<Register, unsigned> &InstrIdxForVirtReg,
191 const MachineBasicBlock &
MBB) {
192 SmallVector<unsigned, 16> InstrDepth;
196 for (
auto *InstrPtr : InsInstrs) {
198 for (
const MachineOperand &MO : InstrPtr->all_uses()) {
202 unsigned DepthOp = 0;
203 unsigned LatencyOp = 0;
205 if (
II != InstrIdxForVirtReg.
end()) {
208 MachineInstr *DefInstr = InsInstrs[
II->second];
210 "There must be a definition for a new virtual register");
211 DepthOp = InstrDepth[
II->second];
215 InstrPtr->findRegisterUseOperandIdx(MO.
getReg(),
nullptr);
219 MachineInstr *DefInstr = getOperandDef(MO);
220 if (DefInstr && (
TII->getMachineCombinerTraceStrategy() !=
221 MachineTraceStrategy::TS_Local ||
224 if (!isTransientMI(DefInstr))
230 InstrPtr->findRegisterUseOperandIdx(MO.
getReg(),
234 IDepth = std::max(IDepth, DepthOp + LatencyOp);
238 unsigned NewRootIdx = InsInstrs.size() - 1;
239 return InstrDepth[NewRootIdx];
252MachineCombinerImpl::getLatency(MachineInstr *Root, MachineInstr *NewRoot,
255 unsigned NewRootLatency = 0;
257 for (
const MachineOperand &MO : NewRoot->
all_defs()) {
267 unsigned LatencyOp = 0;
275 LatencyOp = TSchedModel.computeInstrLatency(NewRoot);
277 NewRootLatency = std::max(NewRootLatency, LatencyOp);
279 return NewRootLatency;
286 case MachineCombinerPattern::REASSOC_AX_BY:
287 case MachineCombinerPattern::REASSOC_AX_YB:
288 case MachineCombinerPattern::REASSOC_XA_BY:
289 case MachineCombinerPattern::REASSOC_XA_YB:
290 return CombinerObjective::MustReduceDepth;
300std::pair<unsigned, unsigned>
301MachineCombinerImpl::getLatenciesForInstrSequences(
302 MachineInstr &
MI, SmallVectorImpl<MachineInstr *> &InsInstrs,
303 SmallVectorImpl<MachineInstr *> &DelInstrs,
305 assert(!InsInstrs.
empty() &&
"Only support sequences that insert instrs.");
306 unsigned NewRootLatency = 0;
308 MachineInstr *NewRoot = InsInstrs.
back();
309 for (
unsigned i = 0; i < InsInstrs.
size() - 1; i++)
310 NewRootLatency += TSchedModel.computeInstrLatency(InsInstrs[i]);
311 NewRootLatency += getLatency(&
MI, NewRoot, BlockTrace);
313 unsigned RootLatency = 0;
314 for (
auto *
I : DelInstrs)
315 RootLatency += TSchedModel.computeInstrLatency(
I);
317 return {NewRootLatency, RootLatency};
320bool MachineCombinerImpl::reduceRegisterPressure(
321 MachineInstr &Root, MachineBasicBlock *
MBB,
322 SmallVectorImpl<MachineInstr *> &InsInstrs,
323 SmallVectorImpl<MachineInstr *> &DelInstrs,
unsigned Pattern) {
336bool MachineCombinerImpl::improvesCriticalPathLen(
337 MachineBasicBlock *
MBB, MachineInstr *Root,
339 SmallVectorImpl<MachineInstr *> &InsInstrs,
340 SmallVectorImpl<MachineInstr *> &DelInstrs,
341 DenseMap<Register, unsigned> &InstrIdxForVirtReg,
unsigned Pattern,
342 bool SlackIsAccurate) {
344 unsigned NewRootDepth =
345 getDepth(InsInstrs, InstrIdxForVirtReg, BlockTrace, *
MBB);
348 LLVM_DEBUG(
dbgs() <<
" Dependence data for " << *Root <<
"\tNewRootDepth: "
349 << NewRootDepth <<
"\tRootDepth: " << RootDepth);
356 if (getCombinerObjective(Pattern) == CombinerObjective::MustReduceDepth) {
359 ?
dbgs() <<
"\t and it does it\n"
360 :
dbgs() <<
"\t but it does NOT do it\n");
361 return NewRootDepth < RootDepth;
369 unsigned NewRootLatency, RootLatency;
370 if (
TII->accumulateInstrSeqToRootLatency(*Root)) {
371 std::tie(NewRootLatency, RootLatency) =
372 getLatenciesForInstrSequences(*Root, InsInstrs, DelInstrs, BlockTrace);
374 NewRootLatency = TSchedModel.computeInstrLatency(InsInstrs.
back());
375 RootLatency = TSchedModel.computeInstrLatency(Root);
379 unsigned NewCycleCount = NewRootDepth + NewRootLatency;
380 unsigned OldCycleCount =
381 RootDepth + RootLatency + (SlackIsAccurate ? RootSlack : 0);
383 <<
"\tRootLatency: " << RootLatency <<
"\n\tRootSlack: "
384 << RootSlack <<
" SlackIsAccurate=" << SlackIsAccurate
385 <<
"\n\tNewRootDepth + NewRootLatency = " << NewCycleCount
386 <<
"\n\tRootDepth + RootLatency + RootSlack = "
389 ?
dbgs() <<
"\n\t It IMPROVES PathLen because"
390 :
dbgs() <<
"\n\t It DOES NOT improve PathLen because");
392 <<
", OldCycleCount = " << OldCycleCount <<
"\n");
394 return NewCycleCount <= OldCycleCount;
398void MachineCombinerImpl::instr2instrSC(
399 SmallVectorImpl<MachineInstr *> &Instrs,
400 SmallVectorImpl<const MCSchedClassDesc *> &InstrsSC) {
401 for (
auto *InstrPtr : Instrs) {
402 unsigned Opc = InstrPtr->getOpcode();
403 unsigned Idx =
TII->get(
Opc).getSchedClass();
410bool MachineCombinerImpl::preservesResourceLen(
412 SmallVectorImpl<MachineInstr *> &InsInstrs,
413 SmallVectorImpl<MachineInstr *> &DelInstrs) {
428 instr2instrSC(InsInstrs, InsInstrsSC);
429 instr2instrSC(DelInstrs, DelInstrsSC);
435 unsigned ResLenAfterCombine =
439 << ResLenBeforeCombine
440 <<
" and after: " << ResLenAfterCombine <<
"\n");
442 ResLenAfterCombine <=
443 ResLenBeforeCombine +
TII->getExtendResourceLenLimit()
444 ?
dbgs() <<
"\t\t As result it IMPROVES/PRESERVES Resource Length\n"
445 :
dbgs() <<
"\t\t As result it DOES NOT improve/preserve Resource "
448 return ResLenAfterCombine <=
449 ResLenBeforeCombine +
TII->getExtendResourceLenLimit();
471 unsigned Pattern,
bool IncrementalUpdate) {
481 for (
auto *InstrPtr : InsInstrs)
484 for (
auto *InstrPtr : DelInstrs) {
485 InstrPtr->eraseFromParent();
487 for (
auto *
I = RegUnits.
begin();
I != RegUnits.
end();) {
488 if (
I->MI == InstrPtr)
495 if (IncrementalUpdate)
496 for (
auto *InstrPtr : InsInstrs)
511bool MachineCombinerImpl::combineInstructions(MachineBasicBlock *
MBB) {
515 bool IncrementalUpdate =
false;
517 decltype(BlockIter) LastUpdate;
521 TraceEnsemble = Traces->
getEnsemble(
TII->getMachineCombinerTraceStrategy());
528 bool DoRegPressureReduce =
529 TII->shouldReduceRegisterPressure(
MBB, RegClassInfo);
531 while (BlockIter !=
MBB->
end()) {
532 auto &
MI = *BlockIter++;
533 SmallVector<unsigned, 16> Patterns;
561 if (!
TII->getMachineCombinerPatterns(
MI, Patterns, DoRegPressureReduce))
565 [[maybe_unused]]
long PrevLatencyDiff = std::numeric_limits<long>::max();
567 for (
const auto P : Patterns) {
570 DenseMap<Register, unsigned> InstrIdxForVirtReg;
571 TII->genAlternativeCodeSequence(
MI,
P, InsInstrs, DelInstrs,
576 if (InsInstrs.
empty())
579 LLVM_DEBUG(
if (Opts.machine_combiner_dump_subst_intrs) {
580 dbgs() <<
"\tFor the Pattern (" << (int)P
581 <<
") these instructions could be removed\n";
582 for (auto const *InstrPtr : DelInstrs)
583 InstrPtr->print(dbgs(), false, false,
585 dbgs() <<
"\tThese instructions could replace the removed ones\n";
586 for (auto const *InstrPtr : InsInstrs)
587 InstrPtr->print(dbgs(), false, false,
594 if (Opts.machine_combiner_verify_pattern_order &&
596 auto [NewRootLatency, RootLatency] = getLatenciesForInstrSequences(
598 long CurrentLatencyDiff = ((long)RootLatency) - ((
long)NewRootLatency);
599 assert(CurrentLatencyDiff <= PrevLatencyDiff &&
600 "Current pattern is expected to be better than the previous "
602 PrevLatencyDiff = CurrentLatencyDiff;
605 if (IncrementalUpdate && LastUpdate != BlockIter) {
607 TraceEnsemble->
updateDepths(LastUpdate, BlockIter, RegUnits);
608 LastUpdate = BlockIter;
611 if (DoRegPressureReduce &&
612 getCombinerObjective(
P) ==
613 CombinerObjective::MustReduceRegisterPressure) {
615 Opts.machine_combiner_inc_threshold)) {
617 IncrementalUpdate =
true;
618 LastUpdate = BlockIter;
620 if (reduceRegisterPressure(
MI,
MBB, InsInstrs, DelInstrs,
P)) {
623 RegUnits,
TII,
P, IncrementalUpdate);
634 LLVM_DEBUG(
dbgs() <<
"\t Replacing due to throughput pattern in loop\n");
636 RegUnits,
TII,
P, IncrementalUpdate);
640 }
else if (OptForSize && InsInstrs.
size() < DelInstrs.
size()) {
642 << InsInstrs.
size() <<
" < "
643 << DelInstrs.
size() <<
")\n");
645 RegUnits,
TII,
P, IncrementalUpdate);
657 if (improvesCriticalPathLen(
MBB, &
MI, BlockTrace, InsInstrs, DelInstrs,
658 InstrIdxForVirtReg,
P,
659 !IncrementalUpdate) &&
660 preservesResourceLen(
MBB, BlockTrace, InsInstrs, DelInstrs)) {
662 Opts.machine_combiner_inc_threshold)) {
664 IncrementalUpdate =
true;
665 LastUpdate = BlockIter;
669 RegUnits,
TII,
P, IncrementalUpdate);
678 for (
auto *InstrPtr : InsInstrs)
679 MF->deleteMachineInstr(InstrPtr);
681 InstrIdxForVirtReg.
clear();
685 if (
Changed && IncrementalUpdate)
690bool MachineCombinerImpl::run(
MachineFunction &MF, MachineLoopInfo *MLI,
691 MachineTraceMetrics *Traces,
692 ProfileSummaryInfo *PSI,
693 MachineBlockFrequencyInfo *MBFI,
694 RegisterClassInfo *RegClassInfo) {
699 TSchedModel.
init(STI);
702 this->Traces = Traces;
705 this->RegClassInfo = RegClassInfo;
706 TraceEnsemble =
nullptr;
709 if (!
TII->useMachineCombiner()) {
712 <<
" Skipping pass: Target does not support machine combiner\n");
726 auto *MLI = &getAnalysis<MachineLoopInfoWrapperPass>().getLI();
727 auto *Traces = &getAnalysis<MachineTraceMetricsWrapperPass>().getMTM();
728 auto *PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI();
730 ? &getAnalysis<LazyMachineBlockFrequencyInfoPass>().getBFI()
733 getAnalysis<MachineRegisterClassInfoWrapperPass>().getRCI();
735 .run(MF, MLI, Traces, PSI, MBFI, &RegClassInfo);
745 .getCachedResult<ProfileSummaryAnalysis>(
747 auto *MBFI = (PSI && PSI->hasProfileSummary())
752 .
run(MF, &MLI, &Traces, PSI, MBFI, &RegClassInfo))
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
const AArch64InstrInfo & TII
This file defines the DenseMap class.
===- LazyMachineBlockFrequencyInfo.h - Lazy Block Frequency -*- C++ -*–===//
static void insertDeleteInstructions(MachineBasicBlock *MBB, MachineInstr &MI, SmallVectorImpl< MachineInstr * > &InsInstrs, SmallVectorImpl< MachineInstr * > &DelInstrs, MachineTraceMetrics::Ensemble *TraceEnsemble, LiveRegUnitSet &RegUnits, const TargetInstrInfo *TII, unsigned Pattern, bool IncrementalUpdate)
Inserts InsInstrs and deletes DelInstrs.
Register const TargetRegisterInfo * TRI
Promote Memory to Register
uint64_t IntrinsicInst * II
#define INITIALIZE_PASS_DEPENDENCY(depName)
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
MachineRegisterInfo & MRI
This file defines the 'Statistic' class, which is designed to be an easy way to expose various metric...
#define STATISTIC(VARNAME, DESC)
bool isThroughputPattern(unsigned Pattern) const override
Return true when a code sequence can improve throughput.
CombinerObjective getCombinerObjective(unsigned Pattern) const override
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Represent the analysis usage information of a pass.
Represents analyses that only rely on functions' control flow.
iterator find(const_arg_type_t< KeyT > Val)
Module * getParent()
Get the module that this global value is contained inside of...
This is an alternative analysis pass to MachineBlockFrequencyInfo.
LoopT * getLoopFor(const BlockT *BB) const
Return the inner most loop that BB lives in.
bool hasSuperClassEq(const MCRegisterClass *RC) const
Returns true if RC is a super-class of or equal to this class.
bool contains(MCRegister Reg) const
contains - Return true if the specified register is included in this register class.
const MCSchedModel & getSchedModel() const
Get the machine model for this subtarget's CPU.
An RAII based helper class to modify MachineFunctionProperties when running pass.
const MachineFunction * getParent() const
Return the MachineFunction containing this basic block.
MachineInstrBundleIterator< MachineInstr > iterator
LLVM_ABI StringRef getName() const
Return the name of the corresponding LLVM basic block, or an empty string.
LLVM_ABI bool sizeWithoutDebugLargerThan(unsigned Limit) const
MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic b...
LLVM_ABI PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
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.
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
Function & getFunction()
Return the LLVM function that this machine code represents.
Representation of each machine instruction.
const MachineBasicBlock * getParent() const
filtered_mop_range all_defs()
Returns an iterator range over all operands that are (explicit or implicit) register defs.
LLVM_ABI int findRegisterUseOperandIdx(Register Reg, const TargetRegisterInfo *TRI, bool isKill=false) const
Returns the operand index that is a use of the specific register or -1 if it is not found.
bool isTransient() const
Return true if this is a transient instruction that is either very likely to be eliminated during reg...
LLVM_ABI int findRegisterDefOperandIdx(Register Reg, const TargetRegisterInfo *TRI, bool isDead=false, bool Overlap=false) const
Returns the operand index that is a def of the specified register or -1 if it is not found.
Analysis pass that exposes the MachineLoopInfo for a machine function.
MachineOperand class - Representation of each machine instruction operand.
bool isReg() const
isReg - Tests if this is a MO_Register operand.
MachineInstr * getParent()
getParent - Return the instruction that this operand belongs to.
Register getReg() const
getReg - Returns the register number.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
static reg_iterator reg_end()
const TargetRegisterClass * getRegClass(Register Reg) const
Return the register class of the specified virtual register.
reg_iterator reg_begin(Register RegNo) const
defusechain_iterator< true, true, false, true, false > reg_iterator
reg_iterator/reg_begin/reg_end - Walk all defs and uses of the specified register.
LLVM_ABI LLVM_READONLY MachineInstr * getUniqueVRegDef(Register Reg) const
getUniqueVRegDef - Return the unique machine instr that defines the specified virtual register or nul...
A trace ensemble is a collection of traces selected using the same strategy, for example 'minimum res...
void invalidate(const MachineBasicBlock *MBB)
Invalidate traces through BadMBB.
void updateDepth(TraceBlockInfo &TBI, const MachineInstr &, LiveRegUnitSet &RegUnits)
Updates the depth of an machine instruction, given RegUnits.
void updateDepths(MachineBasicBlock::iterator Start, MachineBasicBlock::iterator End, LiveRegUnitSet &RegUnits)
Updates the depth of the instructions from Start to End.
Trace getTrace(const MachineBasicBlock *MBB)
Get the trace that passes through MBB.
LLVM_ABI unsigned getResourceLength(ArrayRef< const MachineBasicBlock * > Extrablocks={}, ArrayRef< const MCSchedClassDesc * > ExtraInstrs={}, ArrayRef< const MCSchedClassDesc * > RemoveInstrs={}) const
Return the resource length of the trace.
InstrCycles getInstrCycles(const MachineInstr &MI) const
Return the depth and height of MI.
LLVM_ABI unsigned getInstrSlack(const MachineInstr &MI) const
Return the slack of MI.
LLVM_ABI bool isDepInTrace(const MachineInstr &DefMI, const MachineInstr &UseMI) const
A dependence is useful if the basic block of the defining instruction is part of the trace of the use...
LLVM_ABI Ensemble * getEnsemble(MachineTraceStrategy)
Get the trace ensemble representing the given trace selection strategy.
LLVM_ABI void verifyAnalysis() const
LLVM_ABI void invalidate(const MachineBasicBlock *MBB)
Invalidate cached information about MBB.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
An analysis pass based on legacy pass manager to deliver ProfileSummaryInfo.
Analysis providing profile information.
bool hasProfileSummary() const
Returns true if profile summary is available.
constexpr bool isVirtual() const
Return true if the specified register number is in the virtual register namespace.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void push_back(const T &Elt)
iterator erase(iterator I)
erase - Erases an existing element identified by a valid iterator.
const_iterator begin() const
const_iterator end() const
void setUniverse(unsigned U)
setUniverse - Set the universe size which determines the largest key the set can hold.
TargetInstrInfo - Interface to description of machine instruction set.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
Provide an instruction scheduling machine model to CodeGen passes.
LLVM_ABI bool hasInstrSchedModel() const
Return true if this machine model includes an instruction-level scheduling model.
LLVM_ABI void init(const TargetSubtargetInfo *TSInfo, bool EnableSModel=true, bool EnableSItins=true)
Initialize the machine model for instruction scheduling.
LLVM_ABI unsigned computeOperandLatency(const MachineInstr *DefMI, unsigned DefOperIdx, const MachineInstr *UseMI, unsigned UseOperIdx) const
Compute operand latency based on the available machine model.
bool hasInstrSchedModelOrItineraries() const
Return true if this machine model includes an instruction-level scheduling model or cycle-to-cycle it...
TargetSubtargetInfo - Generic base class for all target subtargets.
virtual const TargetInstrInfo * getInstrInfo() const
virtual const TargetRegisterInfo * getRegisterInfo() const =0
Return the target's register information.
PointerTypeMap run(const Module &M)
Compute the PointerTypeMap for the module M.
This is an optimization pass for GlobalISel generic memory operations.
OuterAnalysisManagerProxy< ModuleAnalysisManager, MachineFunction > ModuleAnalysisManagerMachineFunctionProxy
Provide the ModuleAnalysisManager to Function proxy.
LLVM_ABI bool shouldOptimizeForSize(const MachineFunction *MF, ProfileSummaryInfo *PSI, const MachineBlockFrequencyInfo *BFI, PGSOQueryType QueryType=PGSOQueryType::Other)
Returns true if machine function MF is suggested to be size-optimized based on the profile.
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
LLVM_ABI PreservedAnalyses getMachineFunctionPassPreservedAnalyses()
Returns the minimum set of Analyses that all machine function passes must preserve.
LLVM_ABI char & MachineCombinerID
This pass performs instruction combining using trace metrics to estimate critical-path and resource d...
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
CombinerObjective
The combiner's goal may differ based on which pattern it is attempting to optimize.
class LLVM_GSL_OWNER SmallVector
Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference s...
SparseSet< LiveRegUnit, MCRegUnit, MCRegUnitToIndex > LiveRegUnitSet
ArrayRef(const T &OneElt) -> ArrayRef< T >
const CodeGenOptions & getCodeGenOptions(const LLVMContext &C)
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
Machine model for scheduling, bundling, and heuristics.
const MCSchedClassDesc * getSchedClassDesc(unsigned SchedClassIdx) const
unsigned Depth
Earliest issue cycle as determined by data dependencies and instruction latencies from the beginning ...