search for: modulepasses

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

2013 Jun 22
2
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
I write my pass in a mix way of NVPTXAllocaHoisting, NVPTXSplitBBatBar and transforms/Hello. The following is part of the codes: in NVPTXTargetMachine.cpp bool NVPTXPassConfig::addPreEmitPass() { addPass(createTest()); return false; } in NVPTXTest.h namespace llvm{
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
2013 Jun 24
0
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
I try to use INITIALIZE_PASS instead of RegisterPass<> to register my 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:
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 pass to
2018 Jun 12
2
ModulePass cannot be registered as EarlyAsPossible
...... } However, every time I try to access to the Module object M inside runOnModule(), clang just crashes. Even a debug message like *outs() << M.getName() << '\n';* would cause a segfault. So am I doing something wrong, like EP_EarlyAsPossible is really not to be used with ModulePasses, or is this rather a bug? In case this is not a bug, what would be the best way to manipulate an IR Module as it is coming right out of the frontend? Thanks for your help, Son Tuan Vu -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/piperm...
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::assignPassManager(llvm::PMStack&, llvm::PassManagerType): Assertion
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 ,
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 <http://llvm.org/docs/WritingAnLLVMPass.html#FunctionPass>.
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 ScalarEvolution. Calling getSE() dereferences this pointer.
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
2011 Mar 01
2
[LLVMdev] cannot build safecode.
Hello, I am trying to build llvm-poolalloc and safecode under current trunk llvm. After building llvm, I cannot build poolalloc. I got following error message: make[1]: Entering directory `/host/llvm/projects/llvm-poolalloc/lib' make[2]: Entering directory `/host/llvm/projects/llvm-poolalloc/lib/DSA' llvm[2]: Compiling AddressTakenAnalysis.cpp for Debug+Asserts build (PIC)
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.
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 [with AnalysisType = llvm::LoopInfo]: Assertion `ResultPass &&
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
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
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 llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion
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&
2010 Jun 29
1
[LLVMdev] Queries of an invalidated AA ModulePass
On Tue, Jun 29, 2010 at 1:41 PM, Dan Gohman <gohman at apple.com> wrote: > My best guess is that the problem is that 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
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.
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: