similar to: [LLVMdev] Walking thru CallGraph bottom up

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] Walking thru CallGraph bottom up"

2015 Feb 27
0
[LLVMdev] Walking thru CallGraph bottom up
Dear Simon, Kevin is correct; as far as I can tell, there is no method of getting the functions calling a given function. Instead, you have to start at the main() function and search for the function using a depth-first or breadth-first search. What may make sense is to build a new data structure that has nodes that point from callees to callers once and then use that for your queries.
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
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
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 Mar 02
2
[LLVMdev] Walking thru CallGraph bottom up
Hi Herbie, thanks for you answer and explanation. > > Also, if any of the functions are external, you are completely stuck (unless you put everything together with lld). I am indeed having a problem regarding external function. I my program is just one file everything work and I can access all the functions. However, if it has multiple files I have a lot of unresolved pointers to
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 Nov 20
2
GlobalValue::AvailableExternallyLinkage
> > On Nov 19, 2016, at 14:09, Mehdi Amini <mehdi.amini at apple.com> wrote: > > I assume from your description that you are also updating call sites in the same module so that if foo was calling atoi, after cloning you have foo_parallel that is calling atoi_parallel? > If this is the issue, it depends, I’d probably consider turning the available_externally into internal.
2016 Oct 27
2
How to split module into several ones
Hi all, Can anyone give me advice about an appropriate way for extracting number of functions from module recursively (starting from entry point). Actually it may be more than one entry point so all dependent functions and global values must be extracted. I've tried llvm-extract tool but it can't do work recursively. Maybe it would be good to write some Call Graph pass or something. Any
2014 Aug 18
2
[LLVMdev] generating a dynamic callgraph with llvm-prof
Yes, the latest version can be downloaded from here https://github.com/liuml07/giri . The LLVM instrumentation code is in TracingNoGiri.cpp<https://github.com/liuml07/giri/blob/master/lib/Giri/TracingNoGiri.cpp> file and runtime code in Tracing.cpp. You may need to delete other unnecessary instrumentation code which you don't need. Thanks, Swarup. ________________________________
2018 May 15
2
Pass segmentation fault after llvm_shutdown.
I ran into a similar problem a while ago; see https://reviews.llvm.org/D30107 and https://reviews.llvm.org/D33515 .  You get the unusual stack trace because it's trying to call a destructor in shared library which was already unloaded. I thought we had fixed that, but maybe not?  Looking again, it looks like the patch got reverted and I didn't notice. -Eli On 5/14/2018 10:18 PM,
2016 Nov 19
2
GlobalValue::AvailableExternallyLinkage
Because what is happening is that if function “atoi” gets cloned I don’t have a definition of “atoi_parallel” therefore I get undefined references when linking. I just want to clone and instrument functions implemented in modules of my program. > On Nov 19, 2016, at 13:54, Mehdi Amini <mehdi.amini at apple.com> wrote: > > >> On Nov 19, 2016, at 12:44 PM, Simone Atzeni
2015 Nov 25
4
Compiling for AARCH64 (VMA=42)
Hi, I am trying to compile LLVM for AARCH (VMA=42), here my cmake command: cmake -G "Ninja" -D SANITIZER_AARCH64_VMA=42 .. But I get the following warning: ------------------------------------------------------------------------------------------ CMake Warning: Manually-specified variables were not used by the project: SANITIZER_AARCH64_VMA
2016 Oct 28
1
How to split module into several ones
On 10/27/16 11:18 AM, Aliaksei Zasenka via llvm-dev wrote: > Hi all, > Can anyone give me advice about an appropriate way for extracting > number of functions from module recursively (starting from entry > point). Actually it may be more than one entry point so all dependent > functions and global values must be extracted. > > I've tried llvm-extract tool but it
2017 Nov 30
1
How to count instructions in a function?
Thanks so much John! That works :) Previously I wrote a pass that inherited from CallGraphWrapperPass and used its getCallGraph() function within runOnModule() which resulted in segmentation faults for me. Not sure why that happened, perhaps callgraph wasn't setup by the time runOnModule() was called internally. If you know why, kindly enlighten me and perhaps document the behavior for the
2016 Nov 19
4
GlobalValue::AvailableExternallyLinkage
Thanks Mehdi. My pass clones the functions within a module in order to have the original function and an exact copy of the same function but with a different name, i.e. sum() and sum_parallel(). After my pass I will run ThreadSanitizer instrumentation pass only on the new copy of the functions, i.e. only the “_parallel” functions will be instrumented by tsan. In some programs that I am
2018 May 17
0
Pass segmentation fault after llvm_shutdown.
It's working with trunk though. Do you think the patch will end up in 6.0.1? Thanks. Simone On Tue, May 15, 2018 at 11:18 AM, Friedman, Eli <efriedma at codeaurora.org> wrote: > I ran into a similar problem a while ago; see https://reviews.llvm.org/ > D30107 and https://reviews.llvm.org/D33515 . You get the unusual stack > trace because it's trying to call a destructor
2014 Jun 23
2
[LLVMdev] Call an analysis pass inside a tool pass
Hi, as in the subject, is it possible to call on of the analysis pass present in the LLVM (lib/ folder) within a tool pass (tools/ folder)? Thanks. Best, Simone
2017 Feb 15
2
Problem using Boost Filesystem with Clang
Hi, not sure if this is the right place, but I am experiencing a problem using clang++ (3.9.1) with Boost Filesystem. I have this simple program: ------------------------------------------------------------------------ #include <iostream> #include <boost/filesystem.hpp> using namespace boost::filesystem; int main(int argc, char* argv[]) { if (argc < 2) { std::cout
2017 Nov 29
2
How to count instructions in a function?
Hello, I am trying to count IR instructions in a function for static analysis using llvm pass. In contrast with existing examples, I am trying to include instruction counts of all the callees of the function. Counting the instructions of a function is easy using passes, but iterating through the module's CallGraph is proving to be confusing. I believe I have to use CallGraphWrapperPass to