Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] How to write a custom LTO pass?"
2015 May 19
2
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
Hi all,
I have one analysis pass that I want to perform on call graph SCCs. However, for each function in the SCC, I need function-level analyses, like the dominator tree and the memory dependency analysis.
I’ve been told before <http://stackoverflow.com/questions/30059622/using-dominatortreewrapperpass-in-callgraphsccpass> that these were not available from a CallGraphSCCPass. What would
2015 May 19
3
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
Thanks John.
Does this solve the problem of analysis availability though? If I still have to run the function analyses manually, I might as well keep rolling with the CallGraphSCCPass. (I probably should have mentioned that this is what I’m using right now.)
Félix
> Le 2015-05-19 à 10:12:32, John Criswell <jtcriswel at gmail.com> a écrit :
>
> On 5/18/15 10:45 PM, Félix Cloutier
2015 May 20
3
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
So I got very mixed results.
With the CallGraphSCCPass, both `addRequired<DominatorTreeWrapperPass>` and `addRequired<MemoryDependenceAnalysis>` fail at runtime. The LLVM core has just two CallGraphSCCPasses and neither uses neither analyses, so it's hard to find a valid example.
I transformed the pass into a ModulePass, using scc_iterator as shown in CGPassManager to process
2016 Jan 06
3
whole linux kernel bitcode
Hi all,
I'm trying to generate whole program bitcode files for linux kernel
and do interprocedural
analysis on kernel.
I use llvmlinux to compile kernel with clang and generate a bunch of
bitcode files successfully.
I need to link all these bitcode files together into a single bitcode file,
so that I can run whole program analysis.
Should I use libLTO to link all these bitcode files
2015 Feb 25
2
[LLVMdev] Walking thru CallGraph bottom up
Thanks John.
I guess I will use a ModulePass, so when I am implementing the “runOnModule” function,
do I have to loop through all the functions, for each functions all the BasicBlocks and for each BasicBlock all the instructions
or given the Module I have to call the CallGraph directly?
Is there an example out there? I can’t find anything.
Thanks.
Simone
> On Feb 24, 2015, at 13:29, John
2016 Mar 11
6
big module for a project
Hi All,
I am using clang to compile Mysql source code. Because I want to do some inter-procedural analysis, hopefully, I want to get a .o(bitcode) file(a module) containing all possible function declarations and definitions. Is it possible to do that ? Or you guys have some suggestions?
To be clear, like Mysql, there is a mysqld routine, which is a major routine. I want to mysqld.o(which is
2014 Dec 02
2
[LLVMdev] Cloned Functions Are Not the Same
I am trying to use CloneFunction to clone every IR function in a program,
give the cloned versions a prefix and call the clones from the original
functions (redirect the calls).
Surprisingly, I see that after the LTO optimizations, the number of machine
basic blocks in the two functions differ in some cases.
Is this reasonable at all, given that the two functions must be exactly the
same in the
2008 Dec 08
3
[LLVMdev] Tutorial on writing Link Time Optimization Passes?
Hi,
Is there a tutorial on how to get started with writing link-time
optimization passes? The documentation at
http://www.llvm.org/docs/LinkTimeOptimization.html explains the design
of the LTO interface, but does not explain where to start writing
code. Would my pass go inside libLTO.a or is it separate from
libLTO.a? What I would like to be able to do is traverse through the
entire
2009 Dec 04
4
[LLVMdev] Transparent LTO on Mac OS X
Are you building llvm-gcc yourself? If so, what version?
Xcode releases include an older llvm-gcc and libLTO.dylib, which may not understand bitcode generated by newer self-built compilers.
If you are only using llvm-gcc from the Xcode tools release, use the driver from:
/Developer/usr/bin/llvm-gcc-4.2
If you are building llvm-gcc yourself, try, in this order:
1) sudo ln -s
2009 Dec 04
0
[LLVMdev] Transparent LTO on Mac OS X
Shantonu Sen wrote:
> Are you building llvm-gcc yourself? If so, what version?
>
> Xcode releases include an older llvm-gcc and libLTO.dylib, which may not understand bitcode generated by newer self-built compilers.
>
Thanks. A bitcode format mismatch was the problem. I'm not sure if the
problem stems from the fact that the bitcode was generated for the wrong
architecture
2015 Feb 24
2
[LLVMdev] Walking thru CallGraph bottom up
Hi all,
I would like to create a Pass that given an IR instruction walks starting from that instruction up to the main function
to identify all the functions call that have been made to call that instruction.
Is it possible? What kind of Pass should I create?
Thanks
Best,
Simone
Simone Atzeni
simone.at at gmail.com
+1 (801) 696-8373
2015 Feb 27
2
[LLVMdev] Walking thru CallGraph bottom up
Hi Simon,
> From: Simone Atzeni <simone.at at gmail.com>
> To: John Criswell <jtcriswel at gmail.com>
> Cc: llvmdev at cs.uiuc.edu
> Subject: Re: [LLVMdev] Walking thru CallGraph bottom up
> Message-ID: <318EBA41-2040-4EFE-B330-5813C817C2A2 at gmail.com>
> Content-Type: text/plain; charset="windows-1252"
>
> I think I got it and the example is
2015 Feb 25
0
[LLVMdev] Walking thru CallGraph bottom up
On 2/25/15 10:51 AM, Simone Atzeni wrote:
> Thanks John.
>
> I guess I will use a ModulePass, so when I am implementing the “runOnModule” function,
> do I have to loop through all the functions, for each functions all the BasicBlocks and for each BasicBlock all the instructions
If you know the Instruction, you can get it's basic block using
Instruction::getParent(), and then get
2009 Dec 04
1
[LLVMdev] Transparent LTO on Mac OS X
I'm confused. libLTO takes bitcode files as input and creates a native object file as output. Why would libLTO create bitcode as output? If so, you're changing the existing API contract. Or are you creating an out-of-band bitcode file, in which case the linker would never see it.
ld doesn't have bitcode support, it has libLTO support, and libLTO is what processes the bitcode.
2015 May 06
5
[LLVMdev] (Possibly buggy?) doFinalization method behavior of FunctionPass
On 5/6/15 10:19 AM, Kuperstein, Michael M wrote:
>
> Hello Cristiano,
>
> I don’t think doFinalization() is really meant to be used this way.
>
My understanding is that doInitialization() and doFinalization() are
designed specifically for modifying the LLVM IR (otherwise, why would a
mutable reference to the Function be provided)?
If that is not the case, then there is either a
2014 Oct 21
2
[LLVMdev] Fetching the functions in C files
Hello Everyone,
Just subscribed to the mailing list.
I was wondering how I am going to fetch each functions of a specific source
code file (c/c++) using the LLVM framework. For instance, I would like to
apply certain passes using llvm-opt on certain functions not the whole
file.
I would appreciate any hints or idea leading me about the starting point.
Regards,
-Amir
-------------- next part
2008 Dec 08
0
[LLVMdev] Tutorial on writing Link Time Optimization Passes?
The documentation you're looking for is:
http://llvm.org/docs/WritingAnLLVMPass.html
If you're doing an optimization that runs at link-time, you'll probably
be writing a ModulePass. You can run any pass at any time over any
bitcode file with 'opt -mypass file.bc'. If you want to add it to the
list of passes that run when linking via libLTO or llvm-ld, you can add
it to
2009 Dec 04
2
[LLVMdev] Transparent LTO on Mac OS X
Dear All,
I'm trying to use transparent link-time optimization on Mac OS X.
I've got Xcode 3.2 installed, and I'm trying to compile code with
llvm-gcc -O4. However, I get the following error:
gcc -O4 -o dftables .libs/dftables.o
ld: warning: in .libs/dftables.o, file is not of required architecture
Undefined symbols:
"_main", referenced from:
start in crt1.10.6.o
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:
2014 Mar 30
2
[LLVMdev] Running an IR pass after all IR passes
Thank you very much John.
With an environment variable I need to take some special care, but it looks
like the only way to go.
On Sun, Mar 30, 2014 at 11:07 AM, John Criswell <criswell at illinois.edu>wrote:
> Dear Rahman,
>
> I think your best option is to modify the code in libLTO so that it runs
> your pass when you want it to run. I believe the file you want to modify