Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] whether these transformations are doable and how?"
2010 Apr 15
3
[LLVMdev] whether these transformations are doable and how?
Thanks for all the replies which are really helpful.
one more question regarding transformation:
4. Given an instruction %x1 = I1, can I replace the rhs "I1" with "I2"
and get a new instruction %x1 = I2? Alternatively, I can add a new
instruction %x2 = I2, and replace all uses of %x1 with %x2, and then delete
%x1 = I1, but it seems the former is simpler or faster if
2010 Apr 13
0
[LLVMdev] whether these transformations are doable and how?
> 3. can I modify a function to take extra formal parameters? can I update
> all calls of the original function to take extra actual paramters? The
> function might be called across multiple modules. It seems this has to be
> done at both ModulePass and FunctionPass levels.
>
Check out DeadArgumentElimination pass. It does opposite of what you
want, but you'll get an idea.
2010 Apr 09
0
[LLVMdev] whether these transformations are doable and how?
Ning Wang wrote:
> Hi folk,
>
> I'm a newbie to llvm, please first forgive my naive questions. I want
> to instrument llvm code to do some run-time monitoring work. After
> reading some of the llvm documentation, it begins clear to me that I
> can do the instrumentation in a transformation pass. There are
> several things I want to do in the transformation pass, but
2010 Apr 15
0
[LLVMdev] whether these transformations are doable and how?
On Wed, Apr 14, 2010 at 5:45 PM, Neal N. Wang <neal.wang at gmail.com> wrote:
> Thanks for all the replies which are really helpful.
>
> one more question regarding transformation:
>
> 4. Given an instruction %x1 = I1, can I replace the rhs "I1" with "I2"
> and get a new instruction %x1 = I2? Alternatively, I can add a new
> instruction %x2 =
2011 Aug 09
2
[LLVMdev] Adding a module in a pass
On 2011-08-09 16:48, John Criswell wrote:
> On 8/9/11 6:49 AM, Bjorn Reese wrote:
>> I have an optimization pass (FunctionPass) where I need to add global
>> constructors.
>>
>> For cleaness sake I decided to add these in my own module. My module
>> is created in my FunctionPass constructor:
>
> This is not how I would do it. A FunctionPass has
2011 Aug 09
0
[LLVMdev] Adding a module in a pass
On 8/9/11 9:15 AM, Bjorn Reese wrote:
> On 2011-08-09 16:48, John Criswell wrote:
>> On 8/9/11 6:49 AM, Bjorn Reese wrote:
>>> I have an optimization pass (FunctionPass) where I need to add global
>>> constructors.
>>>
>>> For cleaness sake I decided to add these in my own module. My module
>>> is created in my FunctionPass constructor:
2012 Oct 17
2
[LLVMdev] please advise on PassManager
Hello,
I've recently changed AddressSanitizer (asan) compiler pass from ModulePass
to FunctionPass and it could a bit of mayhem.
The problem is that asan FunctionPass instruments a function foo, then foo
gets inlined into bar, then bar gets instrumented
and thus the code of foo gets instrumented twice (which causes run-time
crash).
This happens only at -O0; at -O1 we get the correct order of
2010 Jul 17
2
[LLVMdev] llvm.dbg.declare
Hi folk,
In the Source Level Debugging document, llvm.dbg.declare takes two
paramters. "The first argument is the alloca for the variable, cast to a
{}*. The second argument is the llvm.dbg.variable containing the description
of the variable." The second parameter corresponds to DIVariable, what is
the corresponding LLVM class of the first parameter? I want to find which
2007 Dec 03
1
[LLVMdev] Using Function Passes from Module Passes
Dear All,
I'm having some problems using a function pass from a Module pass. My
code is as follows:
DominatorTree & domTree;
...
Function &F = *I; // I is an interator from using Module::begin()
...
domTree = getAnalysis<DominatorTree>(F);
When I compile this code, I get the following error:
/home/vadve/criswell/src/llvm22/include/llvm/Pass.h: In member function
2014 Oct 07
2
[LLVMdev] Debug Info and DFSan
Here's a basic patch which would solve it in sort of the same way as the
other optimizations I was fixing (just special case the debug info & fix it
up). I can work up a test case for this as well, or you can, if you
like/this seems reasonable.
On Tue, Oct 7, 2014 at 2:30 PM, Peter Collingbourne <peter at pcc.me.uk> wrote:
> On Tue, Oct 07, 2014 at 12:20:55PM -0700, David
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
2014 Oct 07
2
[LLVMdev] Debug Info and DFSan
On Tue, Oct 7, 2014 at 2:51 PM, Peter Collingbourne <peter at pcc.me.uk> wrote:
> Looks good, thanks!
>
> Can you write the test case, please? You probably have more experience
> writing debug info tests than I do.
>
Sure - though how would I get the pre-dfsan .ll file to produce this
behavior? I've tried compiling to a .ll file without dfsan, then feeling
that .ll
2012 Oct 17
0
[LLVMdev] please advise on PassManager
On Oct 17, 2012, at 7:34 AM, Kostya Serebryany <kcc at google.com> wrote:
> Hello,
>
> I've recently changed AddressSanitizer (asan) compiler pass from ModulePass to FunctionPass and it could a bit of mayhem.
>
> The problem is that asan FunctionPass instruments a function foo, then foo gets inlined into bar, then bar gets instrumented
> and thus the code of foo
2011 Nov 21
1
[LLVMdev] ModulePass and Strings
Hi everybody,
I am writing an LLVM pass and I want to iterate over the whole module
(including global variables), that's why I use ModulePass instead of
FunctionPass. But I don't know how to do it. Using Module::iterator seams
to iterate only over functions. But I need to iterate over all the
Instructions in the module. How should I do such an iteration?
Also, I would like to find all the
2014 Apr 04
3
[LLVMdev] Add a new information and preserve it in LLVM
Hello,
I am trying to add some thing into LLVM, while I encountered some problems.
So my situation is that I have some information W, some transform passes may change it, after these passes, I need the new W. What I did is to create an analysis pass similar to scalar-evolution or loopinfo, I can get the information by using getAnalysis<W>(); and preserve this information W by using
2010 Nov 30
3
[LLVMdev] LLVM Inliner
On Nov 29, 2010, at 1:17 AM, Duncan Sands wrote:
> Hi David,
>
>> Interesting -- LLVM does perform on the fly cleanups during inlining
>> transformation -- this will make summary update precise. One thing I notice from
>> the debug pass dump is that the 'deduce function attribute' pass happens before
>> the clean up -- Is it intended?
>
> you are
2010 Jul 19
0
[LLVMdev] llvm.dbg.declare
On Sat, Jul 17, 2010 at 12:00 AM, Neal N. Wang <neal.wang at gmail.com> wrote:
> Hi folk,
>
> In the Source Level Debugging document, llvm.dbg.declare takes two
> paramters. "The first argument is the alloca for the variable, cast to a
> {}*. The second argument is the llvm.dbg.variable containing the description
> of the variable." The second parameter
2014 Oct 07
2
[LLVMdev] Debug Info and DFSan
On Tue, Oct 7, 2014 at 12:18 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
>
> On Tue, Oct 7, 2014 at 12:10 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
>>
>>
>> On Tue, Oct 7, 2014 at 11:48 AM, Peter Collingbourne <peter at pcc.me.uk>
>> wrote:
>>
>>> On Tue, Oct 07, 2014 at 10:04:30AM -0700, David Blaikie wrote:
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
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>.