similar to: [LLVMdev] Cannot use function pass in a module pass

Displaying 20 results from an estimated 200 matches similar to: "[LLVMdev] Cannot use function pass in a module pass"

2011 Jun 16
0
[LLVMdev] Cannot use function pass in a module pass
On 6/15/11 6:46 PM, Alexey Bakhirkin wrote: > Hi. I'm trying to implement a module pass which can be dynamically > loaded by `opt` (against up-to-date llvm from svn). > Despite what the tutorial > (http://llvm.org/docs/WritingAnLLVMPass.html) states in my module pass > I cannot perform getAnalysis and fetch the function pass result. > When trying to do so `opt` fails with the
2011 Jun 16
1
[LLVMdev] Cannot use function pass in a module pass
Thanks, John. There were a couple of function declarations in the module, and 'getAnalysis' failed for those. By the way, what do you mean by "in older versions of LLVM"? I'm quite sure I was using the latest llvm trunk. 2011/6/16 John Criswell <criswell at cs.uiuc.edu>: > On 6/15/11 6:46 PM, Alexey Bakhirkin wrote: >> Hi. I'm trying to implement a module
2016 May 10
2
Some questions about phase ordering in OPT and LLC
> >> You can look at AddOptimizationPasses() in opt.cpp. > > > > As far as I understand, the two passmanager do not interleave their > > passes. It first runs all the function passes and below. Then all the > > module passes. So if you specify: > > > > opt -mymodulepass0 -myfunctionpass -mymodulepass1 > > > > What you actually get is:
2010 Jul 29
1
[LLVMdev] Controlling the order of a FunctionPass
On Jul 23, 2010, at 7:36 AM, John Criswell wrote: > 2) For prerequisite *analysis* passes (like LoopInfo), your ModulePass > can declare them as prerequisites and get access to them using the > getAnalysis<PassName>(Function *) method. Yes, I remember trying this before but was unsuccessful. I made a second attempt just now and am again running into the same issue: bool
2016 May 09
2
Some questions about phase ordering in OPT and LLC
On Mon, May 09, 2016 at 01:07:07PM -0700, Mehdi Amini via llvm-dev wrote: > > > On May 9, 2016, at 10:43 AM, Ricardo Nobre via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > > > Hi, > > > > I'm a PhD student doing phase ordering as part of my PhD topic and I would like to ask some questions about LLVM. > > > > Executing the following
2008 Mar 05
1
[LLVMdev] getAnalysis*() called on an analysis that was not " "'required' by pass!
Hello, I'd appreciate it if anyone can tell me what the error message means and point out what I am doing wrong. Thank you. I am trying to use the result of the DominatorTree analysis in my ModulePass class as explained in the section "Writing an LLVM Pass". http://llvm.org/docs/WritingAnLLVMPass.html#interaction I called the method "addRequired<DominatorTree>()"
2010 Nov 01
2
[LLVMdev] Identify recursion in a call graph
On Oct 30, 2010, at 4:38 AM, Duncan Sands wrote: >> Is there any facility in LLVM to identify recursion in a call graph? ... > use the facilities in SCCIterator.h, or declare your pass to be a > CallGraphSCCPass in which case it will work one strongly connected > component at a time. Converting my ModulePass to a CallGraphSCCPass doesn't seem feasible, so I'll use
2011 Jul 12
3
[LLVMdev] running a module pass via opt on multiple bitcode files
Hi, I'm trying to implement a module pass as a share object to process an entire program as a unit. The target program is built from multiple object files, hence multiple bitcode files. However, it seems that opt does not take the whole program, but just one bitcode file, "test.bc" in the example run shown below. $ opt -load mypass.dylib -mymodulepass < test.bc > /dev/null
2010 Nov 02
0
[LLVMdev] Identify recursion in a call graph
Hi Trevor, > Converting my ModulePass to a CallGraphSCCPass doesn't seem feasible, so I'll > use llvm::scc_iterator. Here's what I have so far: > > bool MyModulePass::isRecursive() { > CallGraphNode* rootNode = getAnalysis<CallGraph>().getRoot(); > for (scc_iterator<CallGraphNode*> SCCI = scc_begin(rootNode), E = > scc_end(rootNode); SCCI != E; ++SCCI)
2011 Jul 12
0
[LLVMdev] running a module pass via opt on multiple bitcode files
On 7/12/11 4:11 PM, Jinwook Shin (HOTWING) wrote: > > Hi, > > I'm trying to implement a module pass as a share object to process an > entire program as a unit. The target program is built from multiple > object files, hence multiple bitcode files. However, it seems that opt > does not take the whole program, but just one bitcode file, "test.bc" > in the
2010 Nov 02
2
[LLVMdev] Identify recursion in a call graph
Hi you basically need to find a cycles in the call graph. Do do this just search google for a graph algorithm, then make it for your problem. See http://en.wikipedia.org/wiki/Cycle_detection. Jeff Kunkel On Tue, Nov 2, 2010 at 4:27 AM, Duncan Sands <baldrick at free.fr> wrote: > Hi Trevor, > > > Converting my ModulePass to a CallGraphSCCPass doesn't seem feasible, so >
2010 Jul 23
0
[LLVMdev] Controlling the order of a FunctionPass
Trevor Harmon wrote: > On Jul 22, 2010, at 2:05 PM, John Criswell wrote: > > >> If you write your pass as a ModulePass, then you can iterate over the >> functions in any order that you want. >> > > I had considered that, but my FunctionPass depends on other passes > processing the functions first: > Two things to consider: 1) The PassManager
2010 Jul 22
3
[LLVMdev] Controlling the order of a FunctionPass
On Jul 22, 2010, at 2:05 PM, John Criswell wrote: > If you write your pass as a ModulePass, then you can iterate over the > functions in any order that you want. I had considered that, but my FunctionPass depends on other passes processing the functions first: void MyPass::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<UnifyFunctionExitNodes>();
2020 Apr 22
3
how to add my own passes to LTO pass
Hi, I have a module pass and I hope to use it to optimize a real-world program. I need LTO,and I have got LTO plugin. But How can I add my passes to LTO Pass. I can't find solution. What should I do? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200422/76d2b046/attachment.html>
2011 Aug 19
2
[LLVMdev] running a module pass via opt on multiple bitcode files
Thanks John. Your approach worked fine for my small toy program. Now, I would like to run my module pass on a huge project (still a single executable) consisting of a few thousand bit code files scattered in many different directories. And some of them are static libraries. Do you still think it's a good idea to manually gather and link them with llvm-ld? I've seen other module pass
2011 Oct 10
0
[LLVMdev] Using analysis results from a CallGraphSCCPass in a ModulePass
Hi, I'm trying to use analysis results from a CallGraphSCCPass in a ModulePass. Here is the relevant code: struct MyCallGraphSCCPass : CallGraphSCCPass { ... bool runOnSCC(CallGraphSCC& scc){...} }; char MyCallGraphSCCPass::ID = 0; static RegisterPass<MyCallGraphSCCPass> X("cgscc", "Dummy CG SCC pass"); struct MyModulePass : public ModulePass {
2009 Mar 24
1
[LLVMdev] Problem with MemoryDependenceAnalysis
actually i only created a new Module pass and tried to getAnalysis of MemoryDependenceAnalysis from it, i didn't use TargetData directly to regenerate the error i am attaching a c file containing an example code to regenerate the error. with its Makefile the command line i used is: opt -time-passes -analyze -load ${LLVM_PATH}/Release/lib/.libs/libMYMODULEPASS.so -MyModulePass < test.bc
2011 Aug 19
0
[LLVMdev] running a module pass via opt on multiple bitcode files
On 8/19/11 4:36 PM, Jinwook Shin (HOTWING) wrote: > > Thanks John. Your approach worked fine for my small toy program. Now, > I would like to run my module pass on a huge project (still a single > executable) consisting of a few thousand bit code files scattered in > many different directories. And some of them are static libraries. Do > you still think it's a good idea
2015 May 19
3
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
Thanks John. Does this solve the problem of analysis availability though? If I still have to run the function analyses manually, I might as well keep rolling with the CallGraphSCCPass. (I probably should have mentioned that this is what I’m using right now.) Félix > Le 2015-05-19 à 10:12:32, John Criswell <jtcriswel at gmail.com> a écrit : > > On 5/18/15 10:45 PM, Félix Cloutier
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