similar to: [LLVMdev] Changing pointer addresses in Transform pass

Displaying 20 results from an estimated 30000 matches similar to: "[LLVMdev] Changing pointer addresses in Transform pass"

2010 Aug 12
0
[LLVMdev] Optimization pass questions
Larry, On Wed, Aug 11, 2010 at 4:55 PM, Larry Gritz <lg at larrygritz.com> wrote: > I have a whole slew of questions about optimization passes. Answers to any > or all would be extremely helpful: > > How important are doInitialization/doFinalization? Most of the passes do not use them. > I can't detect any difference if I use them or not. Say, if you are writing
2012 Apr 12
0
[LLVMdev] Function Pass Manager
Hi again, I come back to this issue with an example. It's a pass which does nothing but throw the 'Unable to schedule' error. namespace { struct MyPass : public FunctionPass { static char ID; // Pass identification, replacement for typeid MyPass() : FunctionPass(ID) { initializeMyPassPass(*PassRegistry::getPassRegistry()); } virtual void
2009 Mar 11
3
[LLVMdev] opt -O2/-O3 does not Initialize pass?
Hello, I'm writing a pass that adds a function prototype to the module during doInitialization() and stores the pointer in a global variable. If I run opt with "-O1" or less, everything works fine. However, If I call opt with "-O2" or "-O3" then as soon as runOnFunction() is called, the pointer seems to be NULL. Here is a code that shows the problem:
2013 Feb 08
0
[LLVMdev] llvm metadata transformation pass
Hello ! I have a toolchain of two passes. First one, is a transformation pass that should add metadata to some structures (instructions/variables) and the second pass is an analyzing pass which needs to access the added metadata. The problem is with my adding metadata transformation pass. There might be two problems(or both): First, maybe I don't add correctly metadata.
2013 Feb 13
0
[LLVMdev] write a transformation pass
Hello everyone, I am trying to write a trivial adding metadata transformation pass. I have Test.bc the target on which I want to perform transformations. First, I compile with clang++ my target program and I have my resulting Test.bc. I save it under Test1.bc. As a particular example, I have " %myDimension = alloca %class.ThreeDimension, align 4 ". Second, I apply my pass :
2011 Oct 15
1
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
This gives me: Assertion failed: (0 && "Unable to find on the fly pass"), function getOnTheFlyPass, file PassManager.cpp #include "llvm/Module.h" #include "llvm/Analysis/MemoryDependenceAnalysis.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; struct Hello: public FunctionPass { public: static char ID; Hello(): FunctionPass(ID) {
2015 Apr 21
2
[LLVMdev] Using an alias analysis pass
Hello LLVMdev, I’m using LLVM to do static analysis exclusively (without any code generation). To implement this analysis, I’m using multiple address spaces to disambiguate the purpose of the pointed memory. Since address spaces never alias in my model, I set on to implement an alias analysis pass that would exactly provide this information, as I’m seeing a couple of otherwise dead store that
2018 Mar 09
0
Externally loadable Alias Analysis pass
I am currectly experimenting with -Xclang option.. I have a simple pass (to just print function names). I ran: clang -Xclang -load -Xclang LLVMHello.so t.c but nothing was printed, no output from the pass. when I run: opt -load LLVMHello.so -hello t.ll I get the output from pass (i.e. list of function names) Part of the source ode of the Hello pass: struct Hello : public FunctionPass {
2010 Jul 06
0
[LLVMdev] runtime assert failure when trying to obtain analysis pass info within a transformation pass
I am having problems passing analysis results to transformation passes, so I reduced my testcase into the following bare bone: Pass1: simple FunctionPass, counting functions Pass2: transformation pass, for now, just trying to obtain a reference of Pass1 using AU.getAnalysis<Pass1>() inside its runOnFunction(). When I run it, I get the following runtime error: opt -load
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
2004 Nov 18
0
[LLVMdev] A few beginner level questions..
On Wed, 2004-11-17 at 23:19, Abhijit Ray wrote: > 1. If we run a few passes in a sequence ..is the bytecode file > transformed after each pass in sequence i.e > > if we have > a) opt -pass1 -pass2 -pass3 < in.bc > out.bc > b)opt -pass1 -pass2 < in.bc > tmp.bc > opt -pass3 < tmp.bc > out.bc > > are the above two equivalent ? Yes, they're
2004 Jun 24
0
[LLVMdev] Pass vs. FunctionPass
On Thu, 24 Jun 2004, Vladimir Prus wrote: > I wonder in what cases FunctionPass is better that Pass. For example, > addPassesToEmitAssembly takes PassManger and addPassesToJITCompile takes > FunctionPassManager. Here's a simple way to look at it. Use a Function pass whenever you can. A function pass will always work where a Pass works (it derives from pass as you've noticed),
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
2011 Jun 15
3
[LLVMdev] Cannot use function pass in a module pass
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 following mesage: [***@*** ***]$ opt -load
2012 Aug 22
1
[LLVMdev] Insert Self Written Function Call from a FunctionPass?
Hello all; So my goal is to insert some (self-written) function calls in the LLVM IR. I can achieve it with a ModulePass and using the getOrInsertFunction() call. For a ModulePass I follow the steps- 1. Compile the code (in which call instructions are to be inserted) to LLVM IR 2. Compile the file (which contains the *called* external function ) to LLVM IR 3. Link them together and run the
2011 Jan 31
2
[LLVMdev] llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed.
I have written a new pass, it compiles ok but crashes when i run it with error (llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed.). The pass is : using namespace llvm; namespace { struct Dfl : public FunctionPass { static char ID; Dfl() : FunctionPass(ID) { } virtual bool runOnFunction(Function &F) { bool
2011 Jan 31
0
[LLVMdev] llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed.
llvm/include/llvm/Pass.h:93: llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed. On Mon, Jan 31, 2011 at 3:55 PM, Surinder <surifilms at gmail.com> wrote: > I have written a new pass, it compiles ok but crashes when i run it > with error (llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid > && "pid
2011 Oct 14
0
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
In runOnFunction(), you should check to see if the function F is a declaration before calling getAnalysis(F). Calling getAnalysis<FunctionPass>() on a function that is a declaration will trigger an assertion if the function is just a declaration. To see if a function is a declaration, call its isDeclaration() method (i.e. if (F->isDeclaration()) ... ) -- John T. On 10/13/11 8:09
2004 Jun 24
3
[LLVMdev] Pass vs. FunctionPass
I wonder in what cases FunctionPass is better that Pass. For example, addPassesToEmitAssembly takes PassManger and addPassesToJITCompile takes FunctionPassManager. Another question is about FunctionPassManager::run(Function&) and FunctionPass(Function&). The former calls the later, which is fine, but the latter looks like this: bool FunctionPass::run(Function &F) { if
2008 Apr 23
0
[LLVMdev] newbie with pass registering Problem
Hi John!! >1) Have you ensured that your passes have different arguments to the = >RegisterPass constructor (i.e., they have different names)? Yes, I only write one Pass (Function Pass) and gave it that one name. >2) Are you sure that variable X is only being defined once? There are = >some ways in which you could have unintentionally defined it twice. For = >example, if you