LLVM  6.0.0svn
PGOMemOPSizeOpt.cpp
Go to the documentation of this file.
1 //===-- PGOMemOPSizeOpt.cpp - Optimizations based on value profiling ===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements the transformation that optimizes memory intrinsics
11 // such as memcpy using the size value profile. When memory intrinsic size
12 // value profile metadata is available, a single memory intrinsic is expanded
13 // to a sequence of guarded specialized versions that are called with the
14 // hottest size(s), for later expansion into more optimal inline sequences.
15 //
16 //===----------------------------------------------------------------------===//
17 
18 #include "llvm/ADT/ArrayRef.h"
19 #include "llvm/ADT/Statistic.h"
20 #include "llvm/ADT/StringRef.h"
21 #include "llvm/ADT/Twine.h"
25 #include "llvm/IR/BasicBlock.h"
26 #include "llvm/IR/CallSite.h"
27 #include "llvm/IR/DerivedTypes.h"
28 #include "llvm/IR/Function.h"
29 #include "llvm/IR/IRBuilder.h"
30 #include "llvm/IR/InstVisitor.h"
31 #include "llvm/IR/InstrTypes.h"
32 #include "llvm/IR/Instruction.h"
33 #include "llvm/IR/Instructions.h"
34 #include "llvm/IR/LLVMContext.h"
35 #include "llvm/IR/PassManager.h"
36 #include "llvm/IR/Type.h"
37 #include "llvm/Pass.h"
38 #include "llvm/PassRegistry.h"
39 #include "llvm/PassSupport.h"
41 #include "llvm/Support/Casting.h"
43 #include "llvm/Support/Debug.h"
49 #include <cassert>
50 #include <cstdint>
51 #include <vector>
52 
53 using namespace llvm;
54 
55 #define DEBUG_TYPE "pgo-memop-opt"
56 
57 STATISTIC(NumOfPGOMemOPOpt, "Number of memop intrinsics optimized.");
58 STATISTIC(NumOfPGOMemOPAnnotate, "Number of memop intrinsics annotated.");
59 
60 // The minimum call count to optimize memory intrinsic calls.
61 static cl::opt<unsigned>
62  MemOPCountThreshold("pgo-memop-count-threshold", cl::Hidden, cl::ZeroOrMore,
63  cl::init(1000),
64  cl::desc("The minimum count to optimize memory "
65  "intrinsic calls"));
66 
67 // Command line option to disable memory intrinsic optimization. The default is
68 // false. This is for debug purpose.
69 static cl::opt<bool> DisableMemOPOPT("disable-memop-opt", cl::init(false),
70  cl::Hidden, cl::desc("Disable optimize"));
71 
72 // The percent threshold to optimize memory intrinsic calls.
73 static cl::opt<unsigned>
74  MemOPPercentThreshold("pgo-memop-percent-threshold", cl::init(40),
76  cl::desc("The percentage threshold for the "
77  "memory intrinsic calls optimization"));
78 
79 // Maximum number of versions for optimizing memory intrinsic call.
80 static cl::opt<unsigned>
81  MemOPMaxVersion("pgo-memop-max-version", cl::init(3), cl::Hidden,
83  cl::desc("The max version for the optimized memory "
84  " intrinsic calls"));
85 
86 // Scale the counts from the annotation using the BB count value.
87 static cl::opt<bool>
88  MemOPScaleCount("pgo-memop-scale-count", cl::init(true), cl::Hidden,
89  cl::desc("Scale the memop size counts using the basic "
90  " block count value"));
91 
92 // This option sets the rangge of precise profile memop sizes.
94 
95 // This option sets the value that groups large memop sizes
97 
98 namespace {
99 class PGOMemOPSizeOptLegacyPass : public FunctionPass {
100 public:
101  static char ID;
102 
103  PGOMemOPSizeOptLegacyPass() : FunctionPass(ID) {
105  }
106 
107  StringRef getPassName() const override { return "PGOMemOPSize"; }
108 
109 private:
110  bool runOnFunction(Function &F) override;
111  void getAnalysisUsage(AnalysisUsage &AU) const override {
115  }
116 };
117 } // end anonymous namespace
118 
120 INITIALIZE_PASS_BEGIN(PGOMemOPSizeOptLegacyPass, "pgo-memop-opt",
121  "Optimize memory intrinsic using its size value profile",
122  false, false)
124 INITIALIZE_PASS_END(PGOMemOPSizeOptLegacyPass, "pgo-memop-opt",
125  "Optimize memory intrinsic using its size value profile",
126  false, false)
127 
129  return new PGOMemOPSizeOptLegacyPass();
130 }
131 
132 namespace {
133 class MemOPSizeOpt : public InstVisitor<MemOPSizeOpt> {
134 public:
135  MemOPSizeOpt(Function &Func, BlockFrequencyInfo &BFI,
137  : Func(Func), BFI(BFI), ORE(ORE), Changed(false) {
138  ValueDataArray =
139  llvm::make_unique<InstrProfValueData[]>(MemOPMaxVersion + 2);
140  // Get the MemOPSize range information from option MemOPSizeRange,
141  getMemOPSizeRangeFromOption(MemOPSizeRange, PreciseRangeStart,
142  PreciseRangeLast);
143  }
144  bool isChanged() const { return Changed; }
145  void perform() {
146  WorkList.clear();
147  visit(Func);
148 
149  for (auto &MI : WorkList) {
150  ++NumOfPGOMemOPAnnotate;
151  if (perform(MI)) {
152  Changed = true;
153  ++NumOfPGOMemOPOpt;
154  DEBUG(dbgs() << "MemOP call: " << MI->getCalledFunction()->getName()
155  << "is Transformed.\n");
156  }
157  }
158  }
159 
160  void visitMemIntrinsic(MemIntrinsic &MI) {
161  Value *Length = MI.getLength();
162  // Not perform on constant length calls.
163  if (dyn_cast<ConstantInt>(Length))
164  return;
165  WorkList.push_back(&MI);
166  }
167 
168 private:
169  Function &Func;
172  bool Changed;
173  std::vector<MemIntrinsic *> WorkList;
174  // Start of the previse range.
175  int64_t PreciseRangeStart;
176  // Last value of the previse range.
177  int64_t PreciseRangeLast;
178  // The space to read the profile annotation.
179  std::unique_ptr<InstrProfValueData[]> ValueDataArray;
180  bool perform(MemIntrinsic *MI);
181 
182  // This kind shows which group the value falls in. For PreciseValue, we have
183  // the profile count for that value. LargeGroup groups the values that are in
184  // range [LargeValue, +inf). NonLargeGroup groups the rest of values.
185  enum MemOPSizeKind { PreciseValue, NonLargeGroup, LargeGroup };
186 
187  MemOPSizeKind getMemOPSizeKind(int64_t Value) const {
188  if (Value == MemOPSizeLarge && MemOPSizeLarge != 0)
189  return LargeGroup;
190  if (Value == PreciseRangeLast + 1)
191  return NonLargeGroup;
192  return PreciseValue;
193  }
194 };
195 
196 static const char *getMIName(const MemIntrinsic *MI) {
197  switch (MI->getIntrinsicID()) {
198  case Intrinsic::memcpy:
199  return "memcpy";
200  case Intrinsic::memmove:
201  return "memmove";
202  case Intrinsic::memset:
203  return "memset";
204  default:
205  return "unknown";
206  }
207 }
208 
209 static bool isProfitable(uint64_t Count, uint64_t TotalCount) {
210  assert(Count <= TotalCount);
211  if (Count < MemOPCountThreshold)
212  return false;
213  if (Count < TotalCount * MemOPPercentThreshold / 100)
214  return false;
215  return true;
216 }
217 
218 static inline uint64_t getScaledCount(uint64_t Count, uint64_t Num,
219  uint64_t Denom) {
220  if (!MemOPScaleCount)
221  return Count;
222  bool Overflowed;
223  uint64_t ScaleCount = SaturatingMultiply(Count, Num, &Overflowed);
224  return ScaleCount / Denom;
225 }
226 
227 bool MemOPSizeOpt::perform(MemIntrinsic *MI) {
228  assert(MI);
229  if (MI->getIntrinsicID() == Intrinsic::memmove)
230  return false;
231 
233  uint64_t TotalCount;
234  if (!getValueProfDataFromInst(*MI, IPVK_MemOPSize, MaxNumPromotions,
235  ValueDataArray.get(), NumVals, TotalCount))
236  return false;
237 
238  uint64_t ActualCount = TotalCount;
239  uint64_t SavedTotalCount = TotalCount;
240  if (MemOPScaleCount) {
241  auto BBEdgeCount = BFI.getBlockProfileCount(MI->getParent());
242  if (!BBEdgeCount)
243  return false;
244  ActualCount = *BBEdgeCount;
245  }
246 
247  ArrayRef<InstrProfValueData> VDs(ValueDataArray.get(), NumVals);
248  DEBUG(dbgs() << "Read one memory intrinsic profile with count " << ActualCount
249  << "\n");
250  DEBUG(
251  for (auto &VD
252  : VDs) { dbgs() << " (" << VD.Value << "," << VD.Count << ")\n"; });
253 
254  if (ActualCount < MemOPCountThreshold)
255  return false;
256  // Skip if the total value profiled count is 0, in which case we can't
257  // scale up the counts properly (and there is no profitable transformation).
258  if (TotalCount == 0)
259  return false;
260 
261  TotalCount = ActualCount;
262  if (MemOPScaleCount)
263  DEBUG(dbgs() << "Scale counts: numerator = " << ActualCount
264  << " denominator = " << SavedTotalCount << "\n");
265 
266  // Keeping track of the count of the default case:
267  uint64_t RemainCount = TotalCount;
268  uint64_t SavedRemainCount = SavedTotalCount;
270  SmallVector<uint64_t, 16> CaseCounts;
271  uint64_t MaxCount = 0;
272  unsigned Version = 0;
273  // Default case is in the front -- save the slot here.
274  CaseCounts.push_back(0);
275  for (auto &VD : VDs) {
276  int64_t V = VD.Value;
277  uint64_t C = VD.Count;
278  if (MemOPScaleCount)
279  C = getScaledCount(C, ActualCount, SavedTotalCount);
280 
281  // Only care precise value here.
282  if (getMemOPSizeKind(V) != PreciseValue)
283  continue;
284 
285  // ValueCounts are sorted on the count. Break at the first un-profitable
286  // value.
287  if (!isProfitable(C, RemainCount))
288  break;
289 
290  SizeIds.push_back(V);
291  CaseCounts.push_back(C);
292  if (C > MaxCount)
293  MaxCount = C;
294 
295  assert(RemainCount >= C);
296  RemainCount -= C;
297  assert(SavedRemainCount >= VD.Count);
298  SavedRemainCount -= VD.Count;
299 
300  if (++Version > MemOPMaxVersion && MemOPMaxVersion != 0)
301  break;
302  }
303 
304  if (Version == 0)
305  return false;
306 
307  CaseCounts[0] = RemainCount;
308  if (RemainCount > MaxCount)
309  MaxCount = RemainCount;
310 
311  uint64_t SumForOpt = TotalCount - RemainCount;
312 
313  DEBUG(dbgs() << "Optimize one memory intrinsic call to " << Version
314  << " Versions (covering " << SumForOpt << " out of "
315  << TotalCount << ")\n");
316 
317  // mem_op(..., size)
318  // ==>
319  // switch (size) {
320  // case s1:
321  // mem_op(..., s1);
322  // goto merge_bb;
323  // case s2:
324  // mem_op(..., s2);
325  // goto merge_bb;
326  // ...
327  // default:
328  // mem_op(..., size);
329  // goto merge_bb;
330  // }
331  // merge_bb:
332 
333  BasicBlock *BB = MI->getParent();
334  DEBUG(dbgs() << "\n\n== Basic Block Before ==\n");
335  DEBUG(dbgs() << *BB << "\n");
336  auto OrigBBFreq = BFI.getBlockFreq(BB);
337 
338  BasicBlock *DefaultBB = SplitBlock(BB, MI);
339  BasicBlock::iterator It(*MI);
340  ++It;
341  assert(It != DefaultBB->end());
342  BasicBlock *MergeBB = SplitBlock(DefaultBB, &(*It));
343  MergeBB->setName("MemOP.Merge");
344  BFI.setBlockFreq(MergeBB, OrigBBFreq.getFrequency());
345  DefaultBB->setName("MemOP.Default");
346 
347  auto &Ctx = Func.getContext();
348  IRBuilder<> IRB(BB);
350  Value *SizeVar = MI->getLength();
351  SwitchInst *SI = IRB.CreateSwitch(SizeVar, DefaultBB, SizeIds.size());
352 
353  // Clear the value profile data.
354  MI->setMetadata(LLVMContext::MD_prof, nullptr);
355  // If all promoted, we don't need the MD.prof metadata.
356  if (SavedRemainCount > 0 || Version != NumVals)
357  // Otherwise we need update with the un-promoted records back.
358  annotateValueSite(*Func.getParent(), *MI, VDs.slice(Version),
359  SavedRemainCount, IPVK_MemOPSize, NumVals);
360 
361  DEBUG(dbgs() << "\n\n== Basic Block After==\n");
362 
363  for (uint64_t SizeId : SizeIds) {
364  BasicBlock *CaseBB = BasicBlock::Create(
365  Ctx, Twine("MemOP.Case.") + Twine(SizeId), &Func, DefaultBB);
366  Instruction *NewInst = MI->clone();
367  // Fix the argument.
368  MemIntrinsic * MemI = dyn_cast<MemIntrinsic>(NewInst);
369  IntegerType *SizeType = dyn_cast<IntegerType>(MemI->getLength()->getType());
370  assert(SizeType && "Expected integer type size argument.");
371  ConstantInt *CaseSizeId = ConstantInt::get(SizeType, SizeId);
372  MemI->setLength(CaseSizeId);
373  CaseBB->getInstList().push_back(NewInst);
374  IRBuilder<> IRBCase(CaseBB);
375  IRBCase.CreateBr(MergeBB);
376  SI->addCase(CaseSizeId, CaseBB);
377  DEBUG(dbgs() << *CaseBB << "\n");
378  }
379  setProfMetadata(Func.getParent(), SI, CaseCounts, MaxCount);
380 
381  DEBUG(dbgs() << *BB << "\n");
382  DEBUG(dbgs() << *DefaultBB << "\n");
383  DEBUG(dbgs() << *MergeBB << "\n");
384 
385  ORE.emit([&]() {
386  using namespace ore;
387  return OptimizationRemark(DEBUG_TYPE, "memopt-opt", MI)
388  << "optimized " << NV("Intrinsic", StringRef(getMIName(MI)))
389  << " with count " << NV("Count", SumForOpt) << " out of "
390  << NV("Total", TotalCount) << " for " << NV("Versions", Version)
391  << " versions";
392  });
393 
394  return true;
395 }
396 } // namespace
397 
400  if (DisableMemOPOPT)
401  return false;
402 
403  if (F.hasFnAttribute(Attribute::OptimizeForSize))
404  return false;
405  MemOPSizeOpt MemOPSizeOpt(F, BFI, ORE);
406  MemOPSizeOpt.perform();
407  return MemOPSizeOpt.isChanged();
408 }
409 
412  getAnalysis<BlockFrequencyInfoWrapperPass>().getBFI();
413  auto &ORE = getAnalysis<OptimizationRemarkEmitterWrapperPass>().getORE();
414  return PGOMemOPSizeOptImpl(F, BFI, ORE);
415 }
416 
417 namespace llvm {
419 
422  auto &BFI = FAM.getResult<BlockFrequencyAnalysis>(F);
424  bool Changed = PGOMemOPSizeOptImpl(F, BFI, ORE);
425  if (!Changed)
426  return PreservedAnalyses::all();
427  auto PA = PreservedAnalyses();
428  PA.preserve<GlobalsAA>();
429  return PA;
430 }
431 } // namespace llvm
Legacy wrapper pass to provide the GlobalsAAResult object.
uint64_t CallInst * C
SymbolTableList< Instruction >::iterator eraseFromParent()
This method unlinks &#39;this&#39; from the containing basic block and deletes it.
Definition: Instruction.cpp:69
void push_back(const T &Elt)
Definition: SmallVector.h:212
static bool PGOMemOPSizeOptImpl(Function &F, BlockFrequencyInfo &BFI, OptimizationRemarkEmitter &ORE)
void setProfMetadata(Module *M, Instruction *TI, ArrayRef< uint64_t > EdgeCounts, uint64_t MaxCount)
AnalysisUsage & addPreserved()
Add the specified Pass class to the set of analyses preserved by this pass.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
Base class for instruction visitors.
Definition: InstVisitor.h:81
DiagnosticInfoOptimizationBase::Argument NV
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Definition: PassManager.h:687
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
BasicBlock * SplitBlock(BasicBlock *Old, Instruction *SplitPt, DominatorTree *DT=nullptr, LoopInfo *LI=nullptr)
Split the specified block at the specified instruction - everything before SplitPt stays in Old and e...
This is the interface for a simple mod/ref and alias analysis over globals.
LLVM_ATTRIBUTE_ALWAYS_INLINE size_type size() const
Definition: SmallVector.h:136
FunctionPass * createPGOMemOPSizeOptLegacyPass()
#define DEBUG_TYPE
void addCase(ConstantInt *OnVal, BasicBlock *Dest)
Add an entry to the switch instruction.
cl::opt< unsigned > MemOPSizeLarge
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
Definition: Function.h:262
STATISTIC(NumFunctions, "Total number of functions")
F(f)
static cl::opt< unsigned > MemOPPercentThreshold("pgo-memop-percent-threshold", cl::init(40), cl::Hidden, cl::ZeroOrMore, cl::desc("The percentage threshold for the " "memory intrinsic calls optimization"))
Value * getLength() const
std::enable_if< std::is_unsigned< T >::value, T >::type SaturatingMultiply(T X, T Y, bool *ResultOverflowed=nullptr)
Multiply two unsigned integers, X and Y, of type T.
Definition: MathExtras.h:785
INITIALIZE_PASS_BEGIN(PGOMemOPSizeOptLegacyPass, "pgo-memop-opt", "Optimize memory intrinsic using its size value profile", false, false) INITIALIZE_PASS_END(PGOMemOPSizeOptLegacyPass
AnalysisUsage & addRequired()
#define INITIALIZE_PASS_DEPENDENCY(depName)
Definition: PassSupport.h:51
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:81
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
Definition: IRBuilder.h:668
Legacy analysis pass which computes BlockFrequencyInfo.
void setName(const Twine &Name)
Change the name of the value.
Definition: Value.cpp:286
Instruction * clone() const
Create a copy of &#39;this&#39; instruction that is identical in all ways except the following: ...
This file provides the interface for IR based instrumentation passes ( (profile-gen, and profile-use).
Type * getType() const
All values are typed, get the type of this value.
Definition: Value.h:245
void setLength(Value *L)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: APInt.h:33
pgo memop opt
void getMemOPSizeRangeFromOption(StringRef Str, int64_t &RangeStart, int64_t &RangeLast)
Definition: InstrProf.cpp:994
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...
static bool runOnFunction(Function &F, bool PostInlining)
initializer< Ty > init(const Ty &Val)
Definition: CommandLine.h:406
bool getValueProfDataFromInst(const Instruction &Inst, InstrProfValueKind ValueKind, uint32_t MaxNumValueData, InstrProfValueData ValueData[], uint32_t &ActualNumValueData, uint64_t &TotalC)
Extract the value profile data from Inst which is annotated with value profile meta data...
Definition: InstrProf.cpp:856
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:153
LLVM Basic Block Representation.
Definition: BasicBlock.h:59
Diagnostic information for applied optimization remarks.
Represent the analysis usage information of a pass.
Analysis pass providing a never-invalidated alias analysis result.
FunctionPass class - This class is used to implement most global optimizations.
Definition: Pass.h:285
static BasicBlock * Create(LLVMContext &Context, const Twine &Name="", Function *Parent=nullptr, BasicBlock *InsertBefore=nullptr)
Creates a new BasicBlock.
Definition: BasicBlock.h:101
Class to represent integer types.
Definition: DerivedTypes.h:40
void annotateValueSite(Module &M, Instruction &Inst, const InstrProfRecord &InstrProfR, InstrProfValueKind ValueKind, uint32_t SiteIndx, uint32_t MaxMDCount=3)
Get the value profile data for value site SiteIdx from InstrProfR and annotate the instruction Inst w...
Definition: InstrProf.cpp:811
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
Definition: PassManager.h:159
static cl::opt< bool > MemOPScaleCount("pgo-memop-scale-count", cl::init(true), cl::Hidden, cl::desc("Scale the memop size counts using the basic " " block count value"))
INITIALIZE_PASS_END(RegBankSelect, DEBUG_TYPE, "Assign register bank of generic virtual registers", false, false) RegBankSelect
void setMetadata(unsigned KindID, MDNode *Node)
Set the metadata of the specified kind to the specified node.
Definition: Metadata.cpp:1214
Intrinsic::ID getIntrinsicID() const
Return the intrinsic ID of this intrinsic.
Definition: IntrinsicInst.h:51
const InstListType & getInstList() const
Return the underlying instruction list container.
Definition: BasicBlock.h:317
Analysis pass which computes BlockFrequencyInfo.
This is the common base class for memset/memcpy/memmove.
Iterator for intrusive lists based on ilist_node.
This is the shared class of boolean and integer constants.
Definition: Constants.h:84
static cl::opt< unsigned > MemOPMaxVersion("pgo-memop-max-version", cl::init(3), cl::Hidden, cl::ZeroOrMore, cl::desc("The max version for the optimized memory " " intrinsic calls"))
iterator end()
Definition: BasicBlock.h:254
static Constant * get(Type *Ty, uint64_t V, bool isSigned=false)
If Ty is a vector type, return a Constant with a splat of the given value.
Definition: Constants.cpp:560
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Definition: Debug.cpp:132
static cl::opt< bool > DisableMemOPOPT("disable-memop-opt", cl::init(false), cl::Hidden, cl::desc("Disable optimize"))
void push_back(pointer val)
Definition: ilist.h:326
SwitchInst * CreateSwitch(Value *V, BasicBlock *Dest, unsigned NumCases=10, MDNode *BranchWeights=nullptr, MDNode *Unpredictable=nullptr)
Create a switch instruction with the specified value, default dest, and with a hint for the number of...
Definition: IRBuilder.h:802
pgo instr Read PGO instrumentation profile
static cl::opt< unsigned > MaxNumPromotions("icp-max-prom", cl::init(3), cl::Hidden, cl::ZeroOrMore, cl::desc("Max number of promotions for a single indirect " "call callsite"))
char & PGOMemOPSizeOptID
cl::opt< std::string > MemOPSizeRange
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
Definition: Casting.h:323
static cl::opt< unsigned > MemOPCountThreshold("pgo-memop-count-threshold", cl::Hidden, cl::ZeroOrMore, cl::init(1000), cl::desc("The minimum count to optimize memory " "intrinsic calls"))
void initializePGOMemOPSizeOptLegacyPassPass(PassRegistry &)
Multiway switch.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
Definition: Value.h:73
BranchInst * CreateBr(BasicBlock *Dest)
Create an unconditional &#39;br label X&#39; instruction.
Definition: IRBuilder.h:773
OptimizationRemarkEmitter legacy analysis pass.
#define DEBUG(X)
Definition: Debug.h:118
IRTranslator LLVM IR MI
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
A container for analyses that lazily runs them and caches their results.
const TerminatorInst * getTerminator() const LLVM_READONLY
Returns the terminator instruction if the block is well formed or null if the block is not well forme...
Definition: BasicBlock.cpp:120
This header defines various interfaces for pass management in LLVM.
const uint64_t Version
Definition: InstrProf.h:867
The optimization diagnostic interface.
const BasicBlock * getParent() const
Definition: Instruction.h:66