search for: modulepass

Displaying 20 results from an estimated 610 matches for "modulepass".

2013 Jun 22
2
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
...odes: in NVPTXTargetMachine.cpp bool NVPTXPassConfig::addPreEmitPass() { addPass(createTest()); return false; } in NVPTXTest.h namespace llvm{ class NVPTXTest : public ModulePass { void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); }...
2011 Sep 12
1
[LLVMdev] IVUsers (LoopPass) analysis in a ModulePass?
Hi Tim, > From: Tim Creech <tcreech at umd.edu> > Subject: [LLVMdev] IVUsers (LoopPass) analysis in a ModulePass? > Date: September 1, 2011 11:46:28 AM PDT > To: llvmdev at cs.uiuc.edu > > Hi all, > I have a loadable ModulePass which does transformations, and I would like to > use IVUsers analysis within it. I noticed when I try to do this (via > the usual addRequired<IVUsers>() a...
2013 Jun 24
0
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
...pass, though I don't understand what's their difference and how it works because its documents doesn't exist. But it still doesn't work. Parts of my codes is as follows: in NVPTXTest.h namespace llvm { void initializeNVPTXTestPass(PassRegistry &r); class NVPTXTest : public ModulePass { public: NVPTXTest() : ModulePass(ID){ initializeNVPTXTestPass(*PassRegistry::getPassRegistry()); } void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); ModulePass::getAnalysisUsage(AU); } }; in NVPTXTest.cpp #include "NVPTXTes...
2009 Aug 10
2
[LLVMdev] How to use a FunctionPass in a ModulePass?
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 , it still crashed when I invoked this pass in tool 'opt'. However, if I change my pas...
2018 Jun 12
2
ModulePass cannot be registered as EarlyAsPossible
...ub.com/CompilerTeaching/SimplePass/blob/master/SimplePass.cc in order to create a custom pass. The pass needs to be added before any transformation, so I used EP_EarlyAsPossible extension point to register it. Furthermore, I need to access to every GlobalVariable in the IR, so my pass has to be a ModulePass, like this: struct MyPass : public ModulePass { static char ID; MyPass(): ModulePass(ID) {} virtual bool runOnModule(Module &M) {...} ... } However, every time I try to access to the Module object M inside runOnModule(), clang just crashes. Even a debug message like *out...
2009 Apr 09
3
[LLVMdev] Pass Manager Restriction?
Having a ModulePass that requires a FunctionPass that in turn requires another ModulePass results in an assertion being fired. Is this expected behavior (that seems to be undocumented), or a bug? Specifically, the following code will emit the assertion: [VMCore/PassManager.cpp:1597: virtual void llvm::ModulePass::ass...
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 , it still crashed when I invoked this pass in tool 'opt'. > > However...
2006 May 01
3
[LLVMdev] ModulePasses requiring FunctionPasses
I am trying to write a ModulePass which requires PostDominator sets for every function in the module. Now finding post dominators is a function pass. The link on the llvm.org website says that : "Currently it is illegal for a ModulePass<http://llvm.org/docs/WritingAnLLVMPass.html#ModulePass>to require a FunctionPass &l...
2018 Aug 11
3
ScalarEvolution in a ModulePass
Hey LLVMDev, I'm working on a ModulePass that uses ScalarEvolution along with several other analyses. After some debugging, it looks to me like ScalarEvolutionWrapperPass does not handle memory correctly for this case. Here's my current understanding of the problem. ScalarEvolutionWrapperPass maintains a unique_ptr to a ScalarEvolut...
2013 Jun 24
2
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
Sorry for the delay. Yeah, that error message is a bit confusing. What's happening is that your pass sequence is invalid. Once the IR has been lowered to machine code, its too late to run LLVM IR passes (ModulePass, FunctionPass, CallGraphSCCPass, etc.). At that point, you need to run a Machine*Pass, e.g. MachineFunctionPass. If you need to run an IR level pass, you need to use addIRPasses(). On Mon, Jun 24, 2013 at 11:20 AM, Antony Yu <swpenim at gmail.com> wrote: > I try to use INITIALIZE_PASS...
2011 Mar 01
2
[LLVMdev] cannot build safecode.
...ctory `/host/llvm/projects/llvm-poolalloc/lib/DSA' llvm[2]: Compiling AddressTakenAnalysis.cpp for Debug+Asserts build (PIC) AddressTakenAnalysis.cpp: In constructor ‘llvm::AddressTakenAnalysis::AddressTakenAnalysis()’: AddressTakenAnalysis.cpp:34: error: no matching function for call to ‘llvm::ModulePass::ModulePass(char*)’ /host/llvm/include/llvm/Pass.h:235: note: candidates are: llvm::ModulePass::ModulePass(char&) /host/llvm/include/llvm/Pass.h:220: note: llvm::ModulePass::ModulePass(const llvm::ModulePass&) /bin/rm: cannot remove `/host/llvm/projects/llvm-poolalloc/lib/DSA/Debug+Asserts/...
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 Funct...
2010 Sep 15
2
[LLVMdev] getAnalysis<LoopInfo> from ModulePass
Hi, I wrote tiny ModulePass which iterates over functions and then uses getAnalysis<LoopInfo> in order to get informations about the loop. It compiles smoothly, but whenever I try to run it I got error like this: opt: .. PassAnalysisSupport.h:203: AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*) const...
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 runO...
2013 Jun 21
0
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
Are you sure you are initializing your pass properly? Can you show a stripped down version of your pass? On Fri, Jun 21, 2013 at 7:27 AM, Anthony Yu <swpenim at gmail.com> wrote: > Hello, > > I want to write a modulePass in addPreEmitPass() for NVPTX, but I > encounter an assertion failed when executing clang. > > Here is my error message. > ==== > Pass 'NVPTX Assembly Printer' is not initialized. > Verify if there is a pass dependency cycle. > Required Passes: > llc: /home/pyyu/loca...
2013 Jun 21
2
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
Hello, I want to write a modulePass in addPreEmitPass() for NVPTX, but I encounter an assertion failed when executing clang. Here is my error message. ==== Pass 'NVPTX Assembly Printer' is not initialized. Verify if there is a pass dependency cycle. Required Passes: llc: /home/pyyu/local/llvm/lib/IR/PassManager.cpp:637: void...
2010 Sep 15
0
[LLVMdev] getAnalysis<LoopInfo> from ModulePass
hi, On Wed, Sep 15, 2010 at 8:21 PM, Mariusz Grad <mariusz.grad at gmail.com> wrote: > Hi, > > I wrote tiny ModulePass which iterates over functions and then uses getAnalysis<LoopInfo> in order to get informations about the loop. > It compiles smoothly, but whenever I try to run it I got error like this: > opt: .. PassAnalysisSupport.h:203: AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInf...
2010 Jun 29
1
[LLVMdev] Queries of an invalidated AA ModulePass
...t loopsimplify (Canonicalize > natural loops) doesn't preserve DSAA. It preserves AliasAnalysis, but as > docs/AliasAnalysis.html now mentions, this doesn't actually do anything. > And DSAA clobbers loopsimplify, because the pass manager can't > keep a LoopPass live across a ModulePass run. Given these constraints, > it's not possible for the pass manager to set up LICM's prerequisites. > Thanks for the reply. If I'm understanding you correctly--LICM's prerequisites (perhaps because preserving AA doesn't do anything/work) are presently impossible to sa...
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 a...
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....