search for: dominatortreewrapperpass

Displaying 20 results from an estimated 20 matches for "dominatortreewrapperpass".

2018 Jan 28
4
Polly Dependency Analysis in MyPass
Hello, I need to analyze dependencies in my llvm ir by using polly. i created a new pass called mypass there i added polly dependency analysis pass but when i execute this pass in gdb i get no data. Why is that so? My code is follows; namespace { struct mypass : public FunctionPass { static char ID; mypass() : FunctionPass(ID) { } virtual bool runOnFunction(Function &F) {
2018 Jan 28
0
Polly Dependency Analysis in MyPass
...ysis<LoopInfoWrapperPass>().getLoopInfo(); auto &RI = getAnalysis<RegionInfoPass>().getRegionInfo(); auto &AA = getAnalysis<AAResultsWrapperPass>().getAAResults(); auto &SE = getAnalysis<ScalarEvolutionWrapperPass>().getSE(); auto &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree(); Result2.reset(new ScopDetection(F, DT, SE, LI, RI, AA)); auto &SD2 = getAnalysis<polly::ScopDetectionWrapperPass>().getSD(); auto &SE2 = getAnalysis<ScalarEvolutionWrapperPass>().getSE(); auto &LI2 = getAnalysis<LoopInfoWrapperPass>().g...
2015 May 20
3
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
So I got very mixed results. With the CallGraphSCCPass, both `addRequired<DominatorTreeWrapperPass>` and `addRequired<MemoryDependenceAnalysis>` fail at runtime. The LLVM core has just two CallGraphSCCPasses and neither uses neither analyses, so it's hard to find a valid example. I transformed the pass into a ModulePass, using scc_iterator as shown in CGPassManager to process funct...
2019 Mar 26
2
On-the-fly passes
...I've created. To support both the legacy and new pass managers, I've abstracted away the code to get the passes it depends on: bool MyPass::runOnModule(Module &M) override { auto DominatorGetter = [this] (Function &F) -> DominatorTree & { return this->getAnalysis<DominatorTreeWrapperPass>(F).getDomTree(); }; auto PostDominatorGetter = [this] (Function &F) -> PostDominatorTree & { return this-> getAnalysis<PostDominatorTreeWrapperPass>(F).getPostDomTree(); }; auto LoopInfoGetter = [this] (Function &F) -> LoopInfo &a...
2018 Jan 28
1
Polly Dependency Analysis in MyPass
...perPass>().getLoopInfo(); > auto &RI = getAnalysis<RegionInfoPass>().getRegionInfo(); > auto &AA = getAnalysis<AAResultsWrapperPass>().getAAResults(); > auto &SE = getAnalysis<ScalarEvolutionWrapperPass>().getSE(); > auto &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree(); > Result2.reset(new ScopDetection(F, DT, SE, LI, RI, AA)); > > > > auto &SD2 = getAnalysis<polly::ScopDetectionWrapperPass>().getSD(); > > > > auto &SE2 = getAnalysis<ScalarEvolutionWrapperPass>().getSE(); > auto &LI2...
2015 May 19
3
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
...;> I have one analysis pass that I want to perform on call graph SCCs. However, for each function in the SCC, I need function-level analyses, like the dominator tree and the memory dependency analysis. >> >> I’ve been told before <http://stackoverflow.com/questions/30059622/using-dominatortreewrapperpass-in-callgraphsccpass> that these were not available from a CallGraphSCCPass. What would be the best approach for me to access this information? Should I run the passes manually, or is there another, more pass-scheduler-friendly approach? > > I would write a ModulePass that simply iterates...
2018 Jan 29
1
Polly Dependency Analysis in MyPass
...ysis<LoopInfoWrapperPass>().getLoopInfo(); auto &RI = getAnalysis<RegionInfoPass>().getRegionInfo(); auto &AA = getAnalysis<AAResultsWrapperPass>().getAAResults(); auto &SE = getAnalysis<ScalarEvolutionWrapperPass>().getSE(); auto &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree(); Result2.reset(new ScopDetection(F, DT, SE, LI, RI, AA)); auto &SD2 = getAnalysis<polly::ScopDetectionWrapperPass>().getSD(); auto &SE2 = getAnalysis<ScalarEvolutionWrapperPass>().getSE(); auto &LI2 = getAnalysis<LoopInfoWrapperPass>().getLoo...
2015 May 19
2
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
Hi all, I have one analysis pass that I want to perform on call graph SCCs. However, for each function in the SCC, I need function-level analyses, like the dominator tree and the memory dependency analysis. I’ve been told before <http://stackoverflow.com/questions/30059622/using-dominatortreewrapperpass-in-callgraphsccpass> that these were not available from a CallGraphSCCPass. What would be the best approach for me to access this information? Should I run the passes manually, or is there another, more pass-scheduler-friendly approach? Félix -------------- next part -------------- An HTML atta...
2018 Jan 29
0
Polly Dependency Analysis in MyPass
How do you compile the code? Within the Polly subdirectory using CMake? How do you run your pass. Using "opt -mypass inputfile.ll"? Michael 2018-01-28 9:30 GMT-06:00 hameeza ahmed via llvm-dev <llvm-dev at lists.llvm.org>: > Hello, > > I need to analyze dependencies in my llvm ir by using polly. i created a new > pass called mypass there i added polly dependency
2017 Aug 07
2
vrp
...M, Anastasiya Ruzhanskaya via llvm-dev <llvm-dev at lists.llvm.org> wrote: > I am trying to print it like this (maybe here is smth wrong?) > > > LazyValueInfo &LV = getAnalysis<LazyValueInfoWrapperPass>().getLVI(); > DominatorTree &DT = > getAnalysis<DominatorTreeWrapperPass>().getDomTree(); > LV.printLVI(F, DT, llvm::outs()); The value analysis in llvm is lazy (hence, LVI), so you're trying to print an empty cache, I guess. > for (BasicBlock &BB : F) { > for (Instruction &I : BB) { > if (Value* v = dyn_cast<Value>(&...
2018 Jan 24
0
Memory leaks in LegacyPassManager depending on order of addRequired passes
...div>void getAnalysisUsage(AnalysisUsage &AU) const override {<br> AU.addRequired<TargetLibraryInfoWrapperPass>();<br> AU.addRequired<TargetTransformInfoWrapperPass>();<br> AU.addRequired<BlockFrequencyInfoWrapperPass>();<br> AU.addRequired<DominatorTreeWrapperPass>();<br> }</div> <div><br>and changing it to add BlockFrequencyInfoWrapperPass after DominatorTreeWrapperPass fixes the issue.<br>The leak comes from line 1032 of lib/IR/LegacyPassManager.cpp: Pass *AnalysisPass = PI->createPass();<br>AnalysisPass is then pa...
2019 Oct 30
2
How to make ScalarEvolution recompute SCEV values?
Hello all, I’m pretty new to LLVM. I'm writing a pass for loop optimization. I clone and rearrange loops, setting the cloned loop as the original loop’s parent. This can be done multiple times, until there is no more work to do. The trouble is, after the first time I do this, the cloned loop's SCEVs become unknown types when they should be AddRecExpr. If I re-run the whole pass on the
2019 Mar 31
2
Unable to find requested analysis info (Interesting Assertion Failture for Specific Target Source Code)
...} } return false; } void MYPass::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<LoopInfoWrapperPass>(); AU.addRequired<ScalarEvolutionWrapperPass>(); AU.addRequired<LoopAccessLegacyAnalysis>(); AU.addRequired<DominatorTreeWrapperPass>(); AU.addRequired<OptimizationRemarkEmitterWrapperPass>(); } =================================================================== Then, I got the assert failure when running the pass on the following code ======================Target Code with Assertion Failure====================...
2014 May 15
4
[LLVMdev] SROA is slow when compiling a large basic block
...led once per every promotable alloca and iterates over the whole list to determine the order of loads and stores in the basic block that access the alloca. This is the list of ideas I have considered or implemented that can possibly solve my problem: 1. In SROA::getAnalysisUsage, always require DominatorTreeWrapperPass. This will enable SROA::promoteAllocas to use mem2reg, which is fast because it caches the per basic-block ordering of the relevant loads and stores. If it's important to avoid always computing the dominator tree, computing it conditionally based on whether there is a huge basic block in the fu...
2017 Aug 07
2
vrp
...m.org> wrote: >> > I am trying to print it like this (maybe here is smth wrong?) >> > >> > >> > LazyValueInfo &LV = getAnalysis<LazyValueInfoWrapp >> erPass>().getLVI(); >> > DominatorTree &DT = >> > getAnalysis<DominatorTreeWrapperPass>().getDomTree(); >> > LV.printLVI(F, DT, llvm::outs()); >> >> The value analysis in llvm is lazy (hence, LVI), so you're trying to >> print an empty cache, I guess. >> >> > for (BasicBlock &BB : F) { >> > for (Instruction &...
2017 Aug 07
2
vrp
Hello, I am trying to figure out, what vrp propagation does in llvm. I tried this program: #include <stdio.h> int main() { int s = 0; int j = 0; for (int i = 0; i < 100; i++) { j = j+i+1; s+=j; } return (s+j); } And got this under optimized version ( I don't want everything to be eliminated) define i32 @main()
2015 Jul 02
2
[LLVMdev] input and output values from a loop
Hi there, I want to get input and output values from a loop. For this I am doing something like this: DominatorTree &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree(); CodeExtractor Extractor(DT, *L); Extractor.findInputsOutputs(inputs, outputs); When I print the input and output values for the following test code: void aFunc(void) { int sum=0; puts("aFunc()"); for (int i = 0; i < 10; i++) { int fact...
2017 Jun 13
9
RFC: Dynamic dominators
...rogrammers tend to just recompute it after changing the CFG (by not AU.addPreserved()'ing the DomTree). This causes DomTree calculation to fire very often even if only a very small portion of it gets really affected by the changes in CFG. As an example, when optimizing a Full LTO clang bitcode, DominatorTreeWrapperPass alone calls DT.recalculate over 6.5 million times, which takes 20s on my machine. Using an incremental algorithm it would be much easier to keep an up-to-date DomTree without custom update logic, which will save us the time currently spent during DomTree recalculations and reduce the number of bug...
2017 Jun 13
2
RFC: Dynamic dominators
...(by not AU.addPreserved()'ing the > > DomTree). This causes DomTree calculation to fire very often even if only > > a > > very small portion of it gets really affected by the changes in CFG. As > > an > > example, when optimizing a Full LTO clang bitcode, > > DominatorTreeWrapperPass > > alone calls DT.recalculate over 6.5 million times, which takes 20s on my > > machine. > > > > Using an incremental algorithm it would be much easier to keep an > > up-to-date DomTree without custom update logic, which will save us the > > time > > curre...
2014 May 15
2
[LLVMdev] SROA is slow when compiling a large basic block
...lation time. But making LoadAndStorePromoter::run faster is sufficient to reduce the compilation time (at least in my case). > > This is the list of ideas I have considered or implemented that can > possibly solve my problem: > > > 1. In SROA::getAnalysisUsage, always require DominatorTreeWrapperPass. > This will enable SROA::promoteAllocas to use mem2reg, which is fast because > it caches the per basic-block ordering of the relevant loads and stores. If > it's important to avoid always computing the dominator tree, computing it > conditionally based on whether there is a huge b...