search for: loopinfowrapperpass

Displaying 20 results from an estimated 29 matches for "loopinfowrapperpass".

2017 Jul 10
2
Problems with registering of ModulePass (with Dependencies)
Hello, I have created a ModulePass, that now needs LoopInfo information. The ModulePass registration is taken from [1]. I use clang to directly invoke it (This is also a hard requirement, because I need the fancy output of clang warnings/remarks). The problem is, that the dependency to the LoopInfoWrapperPass does not seem to work. The error is: --- snip --- clang-4.0: /var/tmp/portage/sys-devel/llvm-4.0.1/work/llvm-4.0.1.src/include/llvm/PassAnalysisSupport.h:236: AnalysisType& llvm::Pass::getAnalysisID(llvm::AnalysisID) const [with AnalysisType = llvm::LoopInfoWrapperPass; llvm::AnalysisID = const...
2018 Feb 07
2
Question about using LoopAccessLegacyAnalysis
...n for the memory access within a loop. I found “LoopAccessLegacyAnalysis” class useful, however I m not able to obtain information from that pass. Here is what I did to get the information: // require pass virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<LoopInfoWrapperPass>(); AU.addRequired<LoopAccessLegacyAnalysis>(); AU.setPreservesAll(); } // processing virtual bool runOnFunction(Function &F) { LoopInfo &li = getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); LoopAccessLegacyAnalysis &lala = getAn...
2016 Mar 21
2
[Inliner] Loop info in the inliner
Hi,It seems inliner does not take into account if a call is inside a loop. I'm trying to figure out if loop-info can be made available to the inliner. When I try to add LoopInfoWrapperPass to Inliner.cpp, diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cppindex 568707d..cb51ea8 100644--- a/llvm/lib/Transforms/IPO/Inliner.cpp+++ b/llvm/lib/Transforms/IPO/Inliner.cpp@@ -14,6 +14,7 @@ //===--------------------------------------------------------------...
2015 Sep 23
4
Find loops in LLVM bytecode
Hi, I want to find simple loops in LLVM bytecode, and extract the basic information of the loop. For example: for (i=0; i<1000; i++) sum += i; I want to extract the bound [0, 1000), the loop variable "i" and the loop body (sum += i). What should I do? I read the LLVM API document, and find some useful classes like "Loop", "LoopInfo". But I do
2019 Jan 31
4
Confusing ERROR with LoopAccessLegacyAnalysis: Pass 'Unnamed pass: implement Pass::getPassName()' is not initialized.
Dear all, I write a new LoopPass which wants to use passes including LoopInfoWrapperPass, ScalarEvolutionWrapperPass and LoopAccessLegacyAnalysis. Therefore, I implement the following code based on LLVM 9.0.0: ===================================================================== bool LoopInformationCollect::runOnLoop(Loop *L, LPPassManager &) { auto &SE = getAnalysis&...
2016 Feb 08
2
LoopIdiomRegognize vs Preserved
Hi, I'm having problems with the LoopIdiomRegognizer crashing on me with An asserting value handle still pointed to this value! UNREACHABLE executed at ../lib/IR/Value.cpp:695! If I remove AU.addPreserved<LoopInfoWrapperPass>(); or AU.addPreserved<AAResultsWrapperPass>(); everything goes well. The C-code triggering this is void foo(int a[10][10]) { int i, j, k; for (i = 0; i < 1; i++) { for (j = 0; j < 2; j++) { for (k = 0; k < 10; k++) { a[j...
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) {
2016 Mar 22
0
[Inliner] Loop info in the inliner
...be effectively blocked on this. Philip On 03/21/2016 11:56 AM, Aditya K via llvm-dev wrote: > Hi, > It seems inliner does not take into account if a call is inside a > loop. I'm trying to figure out if loop-info can be made available to > the inliner. > > When I try to add LoopInfoWrapperPass to Inliner.cpp, > > > diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp > b/llvm/lib/Transforms/IPO/Inliner.cpp > index 568707d..cb51ea8 100644 > --- a/llvm/lib/Transforms/IPO/Inliner.cpp > +++ b/llvm/lib/Transforms/IPO/Inliner.cpp > @@ -14,6 +14,7 @@ > //===------------...
2018 Feb 08
0
Question about using LoopAccessLegacyAnalysis
...loop. I found “LoopAccessLegacyAnalysis” class > useful, however I m not able to obtain information from that pass. Here is > what I did to get the information: > > // require pass > virtual void getAnalysisUsage(AnalysisUsage &AU) const > { > AU.addRequired<LoopInfoWrapperPass>(); > AU.addRequired<LoopAccessLegacyAnalysis>(); > AU.setPreservesAll(); > } > > // processing > virtual bool runOnFunction(Function &F) { > LoopInfo &li = getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); > Loo...
2018 Jan 28
0
Polly Dependency Analysis in MyPass
...using both scopdetection and scopinformation before dependency check but i think link is missing... virtual bool runOnFunction(Function &F) { std::unique_ptr<ScopInfo> Result; std::unique_ptr<ScopDetection> Result2; //polly::ScopDetection pl; auto &LI = getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); auto &RI = getAnalysis<RegionInfoPass>().getRegionInfo(); auto &AA = getAnalysis<AAResultsWrapperPass>().getAAResults(); auto &SE = getAnalysis<ScalarEvolutionWrapperPass>().getSE(); auto &DT = getAnalysis<DominatorTreeWrapperPass&gt...
2016 Feb 09
2
LoopIdiomRegognize vs Preserved
...diomRegognize vs Preserved > > Hi, > > I'm having problems with the LoopIdiomRegognizer crashing on me with > > An asserting value handle still pointed to this value! > UNREACHABLE executed at ../lib/IR/Value.cpp:695! > > If I remove > > AU.addPreserved<LoopInfoWrapperPass>(); > > or > > AU.addPreserved<AAResultsWrapperPass>(); > > everything goes well. > > The C-code triggering this is > > void foo(int a[10][10]) > { > int i, j, k; > > for (i = 0; i < 1; i++) { > for (j = 0; j <...
2019 Mar 26
2
On-the-fly passes
...minatorGetter = [this] (Function &F) -> PostDominatorTree & { return this-> getAnalysis<PostDominatorTreeWrapperPass>(F).getPostDomTree(); }; auto LoopInfoGetter = [this] (Function &F) -> LoopInfo & { return this->getAnalysis<LoopInfoWrapperPass>(F).getLoopInfo(); }; auto SCEVGetter = [this] (Function &F) -> ScalarEvolution & { return this->getAnalysis<ScalarEvolutionWrapperPass>(F).getSE(); }; auto AssumptionCacheGetter = [this] (Function &F) -> AssumptionCache &...
2018 Jan 28
1
Polly Dependency Analysis in MyPass
...on before dependency check but i think link is missing... > > virtual bool runOnFunction(Function &F) > { > > std::unique_ptr<ScopInfo> Result; > std::unique_ptr<ScopDetection> Result2; > //polly::ScopDetection pl; > > auto &LI = getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); > auto &RI = getAnalysis<RegionInfoPass>().getRegionInfo(); > auto &AA = getAnalysis<AAResultsWrapperPass>().getAAResults(); > auto &SE = getAnalysis<ScalarEvolutionWrapperPass>().getSE(); > auto &DT = getAnalysis<Dominat...
2018 Jan 29
1
Polly Dependency Analysis in MyPass
...s? What to modify here? namespace { struct mypass : public FunctionPass { static char ID; mypass() : FunctionPass(ID) { } virtual bool runOnFunction(Function &F) { std::unique_ptr<ScopInfo> Result; std::unique_ptr<ScopDetection> Result2; auto &LI = getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); auto &RI = getAnalysis<RegionInfoPass>().getRegionInfo(); auto &AA = getAnalysis<AAResultsWrapperPass>().getAAResults(); auto &SE = getAnalysis<ScalarEvolutionWrapperPass>().getSE(); auto &DT = getAnalysis<DominatorTreeWrapperPass&gt...
2016 Feb 10
2
LoopIdiomRegognize vs Preserved
...m having problems with the LoopIdiomRegognizer crashing on me with >>> >>> An asserting value handle still pointed to this value! >>> UNREACHABLE executed at ../lib/IR/Value.cpp:695! >>> >>> If I remove >>> >>> AU.addPreserved<LoopInfoWrapperPass>(); >>> >>> or >>> >>> AU.addPreserved<AAResultsWrapperPass>(); >>> >>> everything goes well. >>> >>> The C-code triggering this is >>> >>> void foo(int a[10][10]) >>> { >>>...
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 Jun 13
2
Which PM preferred for llvm 4.0 out-of-source passes?
...r not. For example, I see code in the in-source passes and in the "opt" program to accommodate *both* the legacy PM and the new one. The passes I'm maintaining have the following qualities: - One provides AA - Several of my passes depend on in-source passes: AliasAnalysis, LoopInfoWrapperPass, and MemoryDependencyAnalysis - Some are (conceptually) analysis passes, and some are (conceptually) transform passes. If necessary, I *could* convert my passes to be in-source, but that's pretty suboptimal for me. Thanks, Christian -------------- next part -------------- An HTML attach...
2018 Feb 07
0
Question about using LoopAccessLegacyAnalysis
...for the memory access within a loop. I found “LoopAccessLegacyAnalysis” class useful, however I m not able to obtain information from that pass. Here is what I did to get the information: // require pass virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<LoopInfoWrapperPass>(); AU.addRequired<LoopAccessLegacyAnalysis>(); AU.setPreservesAll(); } // processing virtual bool runOnFunction(Function &F) { LoopInfo &li = getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); LoopAccessLegacyAnalysis &lala =...
2019 Mar 31
2
Unable to find requested analysis info (Interesting Assertion Failture for Specific Target Source Code)
...e(Module &M) { for (auto &F : M) { SE = &getAnalysis<ScalarEvolutionWrapperPass>(F).getSE(); ...... } } 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>(); } ============================================================...
2018 Apr 23
2
Conditional analysis before inliner
Thanks for the answer Eli. I think I was a little too vague in my question. The program has the following structure: void foo() { bar(); } void bar() { for (..) { __builtin_compute() } } We would like to use scalar evolution + loopinfowrapperpass inside instcombine only if __builtin_compute is present. instcombine can convert the loop into a single builtin ie. void bar() { __builtin_wide_compute(); } When the inliner runs on foo(), we want bar() to already have the transformation to reflect the cost of the inlining decision more accurat...