78 #define LDIST_NAME "loop-distribute" 79 #define DEBUG_TYPE LDIST_NAME 83 cl::desc(
"Turn on DominatorTree and LoopInfo verification " 84 "after Loop Distribution"),
88 "loop-distribute-non-if-convertible",
cl::Hidden,
89 cl::desc(
"Whether to distribute into a loop that may not be " 90 "if-convertible by the loop vectorizer"),
95 cl::desc(
"The maximum number of SCEV checks allowed for Loop " 99 "loop-distribute-scev-check-threshold-with-pragma",
cl::init(128),
102 "The maximum number of SCEV checks allowed for Loop " 103 "Distribution for loop marked with #pragma loop distribute(enable)"));
107 cl::desc(
"Enable the new, experimental LoopDistribution Pass"),
110 STATISTIC(NumLoopsDistributed,
"Number of loops distributed");
116 class InstPartition {
121 : DepCycle(DepCycle), OrigLoop(L) {
126 bool hasDepCycle()
const {
return DepCycle; }
132 InstructionSet::iterator
begin() {
return Set.
begin(); }
133 InstructionSet::iterator
end() {
return Set.
end(); }
134 InstructionSet::const_iterator
begin()
const {
return Set.
begin(); }
135 InstructionSet::const_iterator
end()
const {
return Set.
end(); }
136 bool empty()
const {
return Set.empty(); }
140 void moveTo(InstPartition &Other) {
141 Other.Set.insert(Set.begin(), Set.end());
143 Other.DepCycle |= DepCycle;
148 void populateUsedSet() {
152 for (
auto *
B : OrigLoop->getBlocks())
153 Set.insert(
B->getTerminator());
158 while (!Worklist.empty()) {
163 if (I && OrigLoop->contains(I->
getParent()) && Set.insert(I).second)
164 Worklist.push_back(I);
178 LI, DT, ClonedLoopBlocks);
184 const Loop *getClonedLoop()
const {
return ClonedLoop; }
189 const Loop *getDistributedLoop()
const {
190 return ClonedLoop ? ClonedLoop : OrigLoop;
198 void remapInstructions() {
204 void removeUnusedInsts() {
207 for (
auto *Block : OrigLoop->getBlocks())
208 for (
auto &Inst : *Block)
209 if (!Set.count(&Inst)) {
212 NewInst = cast<Instruction>(VMap[NewInst]);
214 assert(!isa<BranchInst>(NewInst) &&
215 "Branches are marked used early on");
221 for (
auto *Inst :
reverse(Unused)) {
222 if (!Inst->use_empty())
224 Inst->eraseFromParent();
230 dbgs() <<
" (cycle)\n";
236 void printBlocks()
const {
237 for (
auto *BB : getDistributedLoop()->getBlocks())
253 Loop *ClonedLoop =
nullptr;
267 class InstPartitionContainer {
272 : L(L), LI(LI), DT(DT) {}
275 unsigned getSize()
const {
return PartitionContainer.size(); }
281 if (PartitionContainer.empty() || !PartitionContainer.back().hasDepCycle())
282 PartitionContainer.emplace_back(Inst, L,
true);
284 PartitionContainer.back().add(Inst);
292 void addToNewNonCyclicPartition(
Instruction *Inst) {
293 PartitionContainer.emplace_back(Inst, L);
301 void mergeAdjacentNonCyclic() {
302 mergeAdjacentPartitionsIf(
303 [](
const InstPartition *
P) {
return !P->hasDepCycle(); });
308 void mergeNonIfConvertible() {
309 mergeAdjacentPartitionsIf([&](
const InstPartition *Partition) {
310 if (Partition->hasDepCycle())
314 bool seenStore =
false;
316 for (
auto *Inst : *Partition)
317 if (isa<StoreInst>(Inst)) {
327 void mergeBeforePopulating() {
328 mergeAdjacentNonCyclic();
330 mergeNonIfConvertible();
340 bool mergeToAvoidDuplicatedLoads() {
344 LoadToPartitionT LoadToPartition;
345 ToBeMergedT ToBeMerged;
350 for (PartitionContainerT::iterator I = PartitionContainer.begin(),
351 E = PartitionContainer.end();
358 if (isa<LoadInst>(Inst)) {
360 LoadToPartitionT::iterator LoadToPart;
362 std::tie(LoadToPart, NewElt) =
363 LoadToPartition.insert(std::make_pair(Inst, PartI));
366 <<
"Merging partitions due to this load in multiple " 367 <<
"partitions: " << PartI <<
", " << LoadToPart->second
374 ToBeMerged.unionSets(PartI, &*PartJ);
375 }
while (&*PartJ != LoadToPart->second);
379 if (ToBeMerged.empty())
384 for (ToBeMergedT::iterator I = ToBeMerged.begin(),
E = ToBeMerged.end();
389 auto PartI = I->getData();
390 for (
auto PartJ :
make_range(std::next(ToBeMerged.member_begin(I)),
391 ToBeMerged.member_end())) {
392 PartJ->moveTo(*PartI);
397 PartitionContainer.remove_if(
398 [](
const InstPartition &P) {
return P.empty(); });
405 void setupPartitionIdOnInstructions() {
407 for (
const auto &Partition : PartitionContainer) {
410 InstToPartitionIdT::iterator Iter;
412 std::tie(Iter, NewElt) =
413 InstToPartitionId.insert(std::make_pair(Inst, PartitionID));
423 void populateUsedSet() {
424 for (
auto &P : PartitionContainer)
435 assert(Pred &&
"Preheader does not have a single predecessor");
437 assert(ExitBlock &&
"No single exit block");
440 assert(!PartitionContainer.empty() &&
"at least two partitions expected");
444 "preheader not empty");
450 unsigned Index = getSize() - 1;
451 for (
auto I = std::next(PartitionContainer.rbegin()),
452 E = PartitionContainer.rend();
456 NewLoop = Part->cloneLoopWithPreheader(TopPH, Pred, Index, LI, DT);
458 Part->getVMap()[ExitBlock] = TopPH;
459 Part->remapInstructions();
466 for (
auto Curr = PartitionContainer.cbegin(),
467 Next = std::next(PartitionContainer.cbegin()),
468 E = PartitionContainer.cend();
469 Next !=
E; ++Curr, ++Next)
471 Next->getDistributedLoop()->getLoopPreheader(),
472 Curr->getDistributedLoop()->getExitingBlock());
476 void removeUnusedInsts() {
477 for (
auto &Partition : PartitionContainer)
478 Partition.removeUnusedInsts();
491 unsigned N = RtPtrCheck->
Pointers.size();
493 for (
unsigned I = 0; I <
N; ++
I) {
498 int &Partition = PtrToPartitions[
I];
504 int ThisPartition = this->InstToPartitionId[Inst];
506 Partition = ThisPartition;
508 else if (Partition == -1)
510 else if (Partition != (
int)ThisPartition)
513 assert(Partition != -2 &&
"Pointer not belonging to any partition");
516 return PtrToPartitions;
521 for (
const auto &P : PartitionContainer) {
522 OS <<
"Partition " << Index++ <<
" (" << &P <<
"):\n";
531 const InstPartitionContainer &Partitions) {
532 Partitions.print(OS);
537 void printBlocks()
const {
539 for (
const auto &P : PartitionContainer) {
540 dbgs() <<
"\nPartition " << Index++ <<
" (" << &P <<
"):\n";
546 using PartitionContainerT = std::list<InstPartition>;
549 PartitionContainerT PartitionContainer;
553 InstToPartitionIdT InstToPartitionId;
561 template <
class UnaryPredicate>
562 void mergeAdjacentPartitionsIf(UnaryPredicate
Predicate) {
563 InstPartition *PrevMatch =
nullptr;
564 for (
auto I = PartitionContainer.begin(); I != PartitionContainer.end();) {
566 if (PrevMatch ==
nullptr && DoesMatch) {
569 }
else if (PrevMatch !=
nullptr && DoesMatch) {
570 I->moveTo(*PrevMatch);
571 I = PartitionContainer.erase(I);
586 class MemoryInstructionDependences {
592 unsigned NumUnsafeDependencesStartOrEnd = 0;
599 AccessesType::const_iterator
begin()
const {
return Accesses.
begin(); }
600 AccessesType::const_iterator
end()
const {
return Accesses.
end(); }
602 MemoryInstructionDependences(
605 Accesses.append(Instructions.
begin(), Instructions.
end());
608 for (
auto &Dep : Dependences)
609 if (Dep.isPossiblyBackward()) {
613 ++Accesses[Dep.Source].NumUnsafeDependencesStartOrEnd;
614 --Accesses[Dep.Destination].NumUnsafeDependencesStartOrEnd;
621 AccessesType Accesses;
625 class LoopDistributeForLoop {
629 : L(L), F(F), LI(LI), DT(DT), SE(SE), ORE(ORE) {
639 <<
"\" checking " << *L <<
"\n");
642 return fail(
"MultipleExitBlocks",
"multiple exit blocks");
644 return fail(
"NotLoopSimplifyForm",
645 "loop is not in loop-simplify form");
655 return fail(
"MemOpsCanBeVectorized",
656 "memory operations are safe for vectorization");
659 if (!Dependences || Dependences->empty())
660 return fail(
"NoUnsafeDeps",
"no unsafe dependences to isolate");
662 InstPartitionContainer Partitions(L, LI, DT);
687 int NumUnsafeDependencesActive = 0;
688 for (
auto &InstDep : MID) {
692 if (NumUnsafeDependencesActive ||
693 InstDep.NumUnsafeDependencesStartOrEnd > 0)
694 Partitions.addToCyclicPartition(I);
696 Partitions.addToNewNonCyclicPartition(I);
697 NumUnsafeDependencesActive += InstDep.NumUnsafeDependencesStartOrEnd;
698 assert(NumUnsafeDependencesActive >= 0 &&
699 "Negative number of dependences active");
708 for (
auto *Inst : DefsUsedOutside)
709 Partitions.addToNewNonCyclicPartition(Inst);
712 if (Partitions.getSize() < 2)
713 return fail(
"CantIsolateUnsafeDeps",
714 "cannot isolate unsafe dependencies");
718 Partitions.mergeBeforePopulating();
720 if (Partitions.getSize() < 2)
721 return fail(
"CantIsolateUnsafeDeps",
722 "cannot isolate unsafe dependencies");
725 Partitions.populateUsedSet();
730 if (Partitions.mergeToAvoidDuplicatedLoads()) {
731 LLVM_DEBUG(
dbgs() <<
"\nPartitions merged to ensure unique loads:\n" 733 if (Partitions.getSize() < 2)
734 return fail(
"CantIsolateUnsafeDeps",
735 "cannot isolate unsafe dependencies");
743 return fail(
"TooManySCEVRuntimeChecks",
744 "too many SCEV run-time checks needed.\n");
749 Partitions.setupPartitionIdOnInstructions();
758 auto PtrToPartition = Partitions.computePartitionSetForPointers(*LAI);
760 const auto &AllChecks = RtPtrChecking->
getChecks();
761 auto Checks = includeOnlyCrossPartitionChecks(AllChecks, PtrToPartition,
768 LVer.setAliasChecks(std::move(Checks));
770 LVer.versionLoop(DefsUsedOutside);
771 LVer.annotateLoopWithNoAlias();
776 Partitions.cloneLoops();
780 Partitions.removeUnusedInsts();
789 ++NumLoopsDistributed;
794 <<
"distributed loop";
802 bool Forced = isForced().getValueOr(
false);
810 <<
"loop not distributed: use -Rpass-analysis=loop-distribute for " 820 <<
"loop not distributed: " << Message);
827 "explicitly specified loop distribution"));
846 includeOnlyCrossPartitionChecks(
852 copy_if(AllChecks, std::back_inserter(Checks),
854 for (
unsigned PtrIdx1 : Check.first->Members)
855 for (
unsigned PtrIdx2 : Check.second->Members)
871 PtrToPartition, PtrIdx1, PtrIdx2))
888 assert(Op && mdconst::hasa<ConstantInt>(*Op) &&
"invalid metadata");
889 IsForced = mdconst::extract<ConstantInt>(*Op)->getZExtValue();
922 for (
Loop *TopLevelLoop : *LI)
929 bool Changed =
false;
930 for (
Loop *L : Worklist) {
931 LoopDistributeForLoop
LDL(L, &F, LI, DT, SE, ORE);
936 Changed |= LDL.processLoop(GetLAA);
959 auto *LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
960 auto *LAA = &getAnalysis<LoopAccessLegacyAnalysis>();
961 auto *DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
962 auto *SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE();
963 auto *ORE = &getAnalysis<OptimizationRemarkEmitterWrapperPass>().getORE();
964 std::function<const LoopAccessInfo &(Loop &)> GetLAA =
967 return runImpl(F, LI, DT, SE, ORE, GetLAA);
999 std::function<const LoopAccessInfo &(Loop &)> GetLAA =
1005 bool Changed =
runImpl(F, &LI, &DT, &SE, &ORE, GetLAA);
Legacy wrapper pass to provide the GlobalsAAResult object.
static bool Check(DecodeStatus &Out, DecodeStatus In)
void push_back(const T &Elt)
const_iterator end(StringRef path)
Get end iterator over path.
void printChecks(raw_ostream &OS, const SmallVectorImpl< PointerCheck > &Checks, unsigned Depth=0) const
Print Checks.
Tracking metadata reference owned by Metadata.
const MemoryDepChecker & getDepChecker() const
the Memory Dependence Checker which can determine the loop-independent and loop-carried dependences b...
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...
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Compute iterated dominance frontiers using a linear time algorithm.
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.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
OutputIt copy_if(R &&Range, OutputIt Out, UnaryPredicate P)
Provide wrappers to std::copy_if which take ranges instead of having to pass begin/end explicitly...
static cl::opt< unsigned > PragmaDistributeSCEVCheckThreshold("loop-distribute-scev-check-threshold-with-pragma", cl::init(128), cl::Hidden, cl::desc("The maximum number of SCEV checks allowed for Loop " "Distribution for loop marked with #pragma loop distribute(enable)"))
const RuntimePointerChecking * getRuntimePointerChecking() const
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
The main scalar evolution driver.
static cl::opt< bool > LDistVerify("loop-distribute-verify", cl::Hidden, cl::desc("Turn on DominatorTree and LoopInfo verification " "after Loop Distribution"), cl::init(false))
BlockT * getLoopPreheader() const
If there is a preheader for this loop, return it.
Analysis pass providing the TargetTransformInfo.
STATISTIC(NumFunctions, "Total number of functions")
SmallVector< Instruction *, 4 > getInstructionsForAccess(Value *Ptr, bool isWrite) const
Return the list of instructions that use Ptr to read or write memory.
The adaptor from a function pass to a loop pass computes these analyses and makes them available to t...
Analysis pass which computes a DominatorTree.
Checks memory dependences among accesses to the same underlying object to determine whether there vec...
void verify(const DominatorTreeBase< BlockT, false > &DomTree) const
iterator begin()
Instruction iterator methods.
AnalysisUsage & addRequired()
#define INITIALIZE_PASS_DEPENDENCY(depName)
bool verify(VerificationLevel VL=VerificationLevel::Full) const
verify - checks if the tree is correct.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Diagnostic information for optimization failures.
static bool arePointersInSamePartition(const SmallVectorImpl< int > &PtrToPartition, unsigned PtrIdx1, unsigned PtrIdx2)
Check if pointers are in the same partition.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
friend const_iterator begin(StringRef path, Style style)
Get begin iterator over path.
Analysis pass that exposes the LoopInfo for a function.
SmallVector< Instruction *, 8 > findDefsUsedOutsideOfLoop(Loop *L)
Returns the instructions that use values defined in the loop.
BlockT * getHeader() const
auto reverse(ContainerTy &&C, typename std::enable_if< has_rbegin< ContainerTy >::value >::type *=nullptr) -> decltype(make_range(C.rbegin(), C.rend()))
const SmallVectorImpl< Instruction * > & getMemoryInstructions() const
The vector of memory access instructions.
static cl::opt< bool > DistributeNonIfConvertible("loop-distribute-non-if-convertible", cl::Hidden, cl::desc("Whether to distribute into a loop that may not be " "if-convertible by the loop vectorizer"), cl::init(false))
This header provides classes for managing per-loop analyses.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree...
void replaceUsesOfWith(Value *From, Value *To)
Replace uses of one Value with another.
static bool runImpl(Function &F, LoopInfo *LI, DominatorTree *DT, ScalarEvolution *SE, OptimizationRemarkEmitter *ORE, std::function< const LoopAccessInfo &(Loop &)> &GetLAA)
Shared implementation between new and old PMs.
static bool runOnFunction(Function &F, bool PostInlining)
initializer< Ty > init(const Ty &Val)
friend const_iterator end(StringRef path)
Get end iterator over path.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
A set of analyses that are preserved following a run of a transformation pass.
* if(!EatIfPresent(lltok::kw_thread_local)) return false
ParseOptionalThreadLocal := /*empty.
bool needsChecking(const CheckingPtrGroup &M, const CheckingPtrGroup &N) const
Decide if we need to add a check between two groups of pointers, according to needsChecking.
const BasicBlock * getSinglePredecessor() const
Return the predecessor of this block if it has a single predecessor block.
LLVM Basic Block Representation.
This is an important class for using LLVM in a threaded context.
void changeImmediateDominator(DomTreeNodeBase< NodeT > *N, DomTreeNodeBase< NodeT > *NewIDom)
changeImmediateDominator - This method is used to update the dominator tree information when a node's...
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This analysis provides dependence information for the memory accesses of a loop.
INITIALIZE_PASS_BEGIN(LoopDistributeLegacy, LDIST_NAME, ldist_name, false, false) FunctionPass *llvm
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator begin()
This file contains the declarations for the subclasses of Constant, which represent the different fla...
A manager for alias analyses.
EquivalenceClasses - This represents a collection of equivalence classes and supports three efficient...
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.
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
const PredicatedScalarEvolution & getPSE() const
Used to add runtime SCEV checks.
BlockT * getExitBlock() const
If getExitBlocks would return exactly one block, return that block.
static UndefValue * get(Type *T)
Static factory methods - Return an 'undef' object of the specified type.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
DebugLoc getStartLoc() const
Return the debug location of the start of this loop.
std::pair< const CheckingPtrGroup *, const CheckingPtrGroup * > PointerCheck
A memcheck which made up of a pair of grouped pointers.
Optional< const MDOperand * > findStringMetadataForLoop(Loop *TheLoop, StringRef Name)
Find string metadata for loop.
Fast - This calling convention attempts to make calls as fast as possible (e.g.
INITIALIZE_PASS_END(RegBankSelect, DEBUG_TYPE, "Assign register bank of generic virtual registers", false, false) RegBankSelect
static cl::opt< unsigned > DistributeSCEVCheckThreshold("loop-distribute-scev-check-threshold", cl::init(8), cl::Hidden, cl::desc("The maximum number of SCEV checks allowed for Loop " "Distribution"))
A function analysis which provides an AssumptionCache.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
const SmallVectorImpl< Dependence > * getDependences() const
Returns the memory dependences.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements...
bool isAlwaysTrue() const override
Implementation of the SCEVPredicate interface.
const SCEVUnionPredicate & getUnionPredicate() const
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Predicate
Predicate - These are "(BI << 5) | BO" for various predicates.
void initializeLoopDistributeLegacyPass(PassRegistry &)
Drive the analysis of memory accesses in the loop.
This class emits a version of the loop where run-time checks ensure that may-alias pointers can't ove...
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
static const char ldist_name[]
Holds information about the memory runtime legality checks to verify that a group of pointers do not ...
Analysis pass that exposes the ScalarEvolution for a function.
unsigned getComplexity() const override
We estimate the complexity of a union predicate as the size number of predicates in the union...
bool isLoopSimplifyForm() const
Return true if the Loop is in the form that the LoopSimplify form transforms loops to...
This analysis provides dependence information for the memory accesses of a loop.
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator end()
Dependece between memory access instructions.
Represents a single loop in the control flow graph.
StringRef getName() const
Return a constant reference to the value's name.
const Function * getParent() const
Return the enclosing method, or null if none.
SmallVector< PointerInfo, 2 > Pointers
Information about the pointers that may require checking.
iterator_range< value_op_iterator > operand_values()
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
void preserve()
Mark an analysis as preserved.
void diagnose(const DiagnosticInfo &DI)
Report a message to the currently installed diagnostic handler.
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
Analysis pass providing the TargetLibraryInfo.
iterator_range< df_iterator< T > > depth_first(const T &G)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class represents a composition of other SCEV predicates, and is the class that most clients will...
static cl::opt< bool > EnableLoopDistribute("enable-loop-distribute", cl::Hidden, cl::desc("Enable the new, experimental LoopDistribution Pass"), cl::init(false))
LLVM Value Representation.
static bool blockNeedsPredication(BasicBlock *BB, Loop *TheLoop, DominatorTree *DT)
Return true if the block BB needs to be predicated in order for the loop to be vectorized.
Loop * cloneLoopWithPreheader(BasicBlock *Before, BasicBlock *LoopDomBB, Loop *OrigLoop, ValueToValueMapTy &VMap, const Twine &NameSuffix, LoopInfo *LI, DominatorTree *DT, SmallVectorImpl< BasicBlock *> &Blocks)
Clones a loop OrigLoop.
This class implements an extremely fast bulk output stream that can only output to a stream...
The legacy pass manager's analysis pass to compute loop information.
print Print MemDeps of function
StringRef - Represent a constant reference to a string, i.e.
A container for analyses that lazily runs them and caches their results.
Legacy analysis pass which computes a DominatorTree.
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...
This header defines various interfaces for pass management in LLVM.
const SmallVector< PointerCheck, 4 > & getChecks() const
Returns the checks that generateChecks created.
Dependence - This class represents a dependence between two memory memory references in a function...
for(unsigned i=Desc.getNumOperands(), e=OldMI.getNumOperands();i !=e;++i)
bool canVectorizeMemory() const
Return true we can analyze the memory accesses in the loop and there are no memory dependence cycles...
static void fail(const SDLoc &DL, SelectionDAG &DAG, const Twine &Msg)
FunctionPass * createLoopDistributePass()
const BasicBlock * getParent() const
void remapInstructionsInBlocks(const SmallVectorImpl< BasicBlock *> &Blocks, ValueToValueMapTy &VMap)
Remaps instructions in Blocks using the mapping in VMap.
An analysis over an "outer" IR unit that provides access to an analysis manager over an "inner" IR un...