similar to: [LLVMdev] How to use a FunctionPass in a ModulePass?

Displaying 20 results from an estimated 700 matches similar to: "[LLVMdev] How to use a FunctionPass in a ModulePass?"

2009 Aug 10
0
[LLVMdev] How to use a FunctionPass in a ModulePass?
On Mon, Aug 10, 2009 at 3:35 AM, gauss<gausszhch at gmail.com> wrote: > Hi, all: > > I wanted to use a FunctionPass (e.g. MemoryDependenceAnalysis) in a > ModulePass, and then I used the method > "getAnalysis<MemoryDependenceAnalysis>(llvm::Function *)"  described at > http://llvm.org/docs/WritingAnLLVMPass.html#ModulePass to get the > FunctionPass. But ,
2009 Aug 11
1
[LLVMdev] How to use a FunctionPass in a ModulePass?
Hi, Devang. Thank you for your reply. But in my case, my ModulePass requires another FunctionPass (e.g. MemoryDependenceAnalysis) rather than the opposite direction. Is it also limited? - gauss Devang Patel-2 wrote: > > On Mon, Aug 10, 2009 at 3:35 AM, gauss<gausszhch at gmail.com> wrote: >> Hi, all: >> >> I wanted to use a FunctionPass (e.g.
2009 May 23
0
[LLVMdev] why RegisterPass<TargetData> initialize itself twice in my system
HI, Developers: I linked libLTO.so in $LLVMROOT/Debug/lib however, my program crashes in assertion at 149line [Pass.cpp] void RegisterPass(const PassInfo &PI) { bool Inserted = PassInfoMap.insert(std::make_pair(PI.getTypeInfo(),&PI)).second; assert(Inserted && "Pass registered multiple times!"); } i confirm that there is only one static variable
2006 Oct 08
1
[LLVMdev] modulepass requiring a functionpass
I have a ModulePass, which we'll call MP, that generates a dependency graph for an entire program. I want MP to require the UnifyFunctionExitNodes pass, which is a FunctionPass. Since its not possible to make a ModulePass depend on a FunctionPass, is my only choice to make MP a FunctionPass in which the runOnFunction() routine does nothing, and the doFinalization routine does all the
2007 Apr 16
1
[LLVMdev] ModulePass that requires FunctionPass
Hi All, I've installed pass manager changes that allow ModulePass to require FunctionPass. Try it, and let me know if you run into errors/bugs. Thanks, - Devang
2007 Apr 26
0
[LLVMdev] ModulePass that requires FunctionPass
On Apr 25, 2007, at 4:53 PM, Zhiru Zhang wrote: > Hi Devang, > > You recently mentioned that the pass manager now allows a ModulePass > to require a FunctionPass. I just tried it but ran into errors. Could > you please take a look to see if I did anything wrong? Thanks! I can reproduce this crash. Please file bugzilla PR and I'll fix this soon. - Devang
2008 Oct 28
1
[LLVMdev] Requiring a ModulePass to be run from a FunctionPass
Hi, I have a FunctionPass that requires a ModulePass using addRequiredById(). When I start opt it infloops somewhere in PMDataManager::findAnalysisPass. Should I open a bug, or is this a known issue (i.e. I am doing something wrong)? Is there a workaround? My modulepass just assigns unique numbers to basicblocks (like StableBasicBlockNumbering, but unique per Module) I could do that with a
2013 Oct 31
0
[LLVMdev] Get Different Result for ScalarEvolution through ModulePass and FunctionPass
Hi there, I write two pass, a module pass, named "MP", and a FunctionPass, "FP". Then I use this pass to print the scalar evolution information in two ways: 1.employ FP to process function directly 2.call MP, iterate on functions, then call FP on them sample code is that: *MP:* *bool runOnModule(Module &M)* *{* *for(Module::iterator itr = M.begin(); itr != M.end();
2011 May 30
1
[LLVMdev] about writing a functionpass requiring a modulepass
---------- Forwarded message ---------- From: Qingan Li <ww345ww at gmail.com> Date: 2011/5/30 Subject: To: llvmdev at cs.uiuc.edu Hi, I wrote an analysis pass, myPass, inherited from both ModulePass and ProfileInfo, and this pass requires the CallGraph, i.e., * class myPass : public ModulePass, public ProfileInfo { ...};* * void myPass::getAnalysisUsage(AnalysisUsage &AU) const
2007 Apr 25
2
[LLVMdev] ModulePass that requires FunctionPass
Hi Devang, You recently mentioned that the pass manager now allows a ModulePass to require a FunctionPass. I just tried it but ran into errors. Could you please take a look to see if I did anything wrong? Thanks! Basically I changed the HelloWorld sample pass to be a ModulePass and tried to use the LoopInfo pass inside the runOnModule routine. See below for the source code and error messages.
2010 Feb 02
3
[LLVMdev] Problem in Adding a pass to LLVM
Hi, I am trying to add alias analysis in llvm. I created a file ProfileAlias.cpp in llvm source at the place where Andersens.cpp is there. ProfileAlias.cpp does nothing at present just empty definitions of required functions. When I build llvm I get the following error: /home/ambika/llvm1/llvm-obj/Release/lib/libLLVMipa.a(ProfileAlias.o): In function `llvm::createProfileAliasPass()':
2009 Feb 26
0
[LLVMdev] MemoryDependenceAnalysis in ModulePass
Hi, I'm having some trouble using the MemoryDependenceAnalysis pass within a ModulePass. If I use addRequired and getAnalysis, it works properly within a FunctionPass, but opt aborts when I try to do the same in a ModulePass, with the following error: opt: /x/jeffhao/llvm/llvm/include/llvm/Target/TargetData.h:114: llvm::TargetData::TargetData(): Assertion '0 &&
2015 Oct 09
2
Get instance of CallGraph of a module in the pass
Hello, I want an instance of CallGraph in my pass. By looking at -dot-callgraph source, I've tried something like this: CallGraphWrapperPass *CGWP = new CallGraphWrapperPass(); PM.add(CGWP); CallGraph *CG = &CGWP->getCallGraph(); PM.add(new MyPass(CG)); I get the following error: /home/riyad/installs/llvm-3.7.0/include/llvm/PassSupport.h:95:38: error: no matching constructor for
2009 Sep 14
1
[LLVMdev] Can we use llvm-gcc to compile large project and generate IR?
Hi, all. I have written a pass to do some inter-procedure work. Then I tried to apply it to currently existing software. But I failed to compile most of them using llvm-gcc. When I run * ./configure CC=llvm-gcc CFLAGS="-emit-llvm -c"*, it reports "*cannot run C compiled programs*" and so on and then exit. ( I use CFLAGS="-emit-llvm -c" to produce LLVM bitcode
2017 Jun 28
2
Building llvm with clang and lld on arm and the llvm arm backend relocation on position independent code
> On 27 Jun 2017, at 13:25, Peter Smith <peter.smith at linaro.org> wrote: > > Hello Alessandro, > > Despite the statement in the HowToCrossCompileLLVM guide "If you’re > using Clang as the cross-compiler, there is a problem in the LLVM ARM > back-end that is producing absolute relocations on > position-independent code (R_ARM_THM_MOVW_ABS_NC), so for now, you
2009 Jul 30
2
[LLVMdev] How to produce a "Intrinsic Function" call instruction?
Hi, all. I have noticed that LLVM supports some Intrinsic Functions such as *"** llvm.sadd.with.overflow"* described in http://llvm.org/docs/LangRef.html#int_sadd_overflow. We can use these functions and needn't define the function bodies. For example, I can manually insert codes: * %res = call {i32, i1} @llvm.sadd.with.overflow.i32(i32 %a, i32 %b) %sum = extractvalue
2009 Sep 16
0
[LLVMdev] FunctionPass Analysis is not saved after ModulePasses run?
Hi, I have a problem with the following scenario: I use the ProfileEstimatorPass to get ProfileInfo and verifiy this info with the ProfileVerifierPass. (Please bear with me, its not about the profiling but about the Pass interaction.) Then the LowerSetJumpPass is executed and I want to verify that the esimtated ProfileInfo survives this pass by calling again the ProfileVerifierPass. This is what
2009 Sep 16
1
[LLVMdev] FunctionPass Analysis is not saved after ModulePasses run?
Hi, I have a problem with the following scenario: I use the ProfileEstimatorPass to get ProfileInfo and verifiy this info with the ProfileVerifierPass. (Please bear with me, its not about the profiling but about the Pass interaction.) Then the LowerSetJumpPass is executed and I want to verify that the esimtated ProfileInfo survives this pass by calling again the ProfileVerifierPass. This is what
2017 Jun 28
3
Building llvm with clang and lld on arm and the llvm arm backend relocation on position independent code
Oh, so it looks like I hit a bit of a wall there :-) I’ll take a look thanks. That bug talks about R_ARM_THM_CALL which I assume are thumb related. Will your implementation fix also R_ARM_CALL errors? > On 28 Jun 2017, at 17:15, Peter Smith <peter.smith at linaro.org> wrote: > > Hello Alessandro, > > The LLD ARM port doesn't currently support range extension thunks,
2017 Jun 28
2
Building llvm with clang and lld on arm and the llvm arm backend relocation on position independent code
The bottom of the bug has the revision numbers (e.g. D34035). That one corresponds to e.g. https://reviews.llvm.org/D34035 There's also https://reviews.llvm.org/D34634 which contains all of Peter's patches, but it's not going to rebase cleanly once the individual patches start going in. On 6/28/17, 10:56 AM, "Alessandro Pistocchi" <apukfreelance at gmail.com> wrote: