similar to: [LLVMdev] Fetching the functions in C files

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Fetching the functions in C files"

2014 Oct 21
2
[LLVMdev] Fetching the functions in C files
Thanks for the answer John. I checked the llvm-extract and it works, but my concern is if the output of the extract could be saved as .ll instead of .bc. Sort of human-readable format so that I can parse it. Otherwise, it is better to parse the foo.ll file right away instead of using the extract tool. Please correct me if I am wrong. Thanks, -Amir On Tue, Oct 21, 2014 at 7:02 PM, John
2014 Oct 22
2
[LLVMdev] Fetching the functions in C files
Thanks Markus. Having llvm-as to turn the extracted function.bc file to .ll caused an error saying: *llvm-as-3.4: function_bc:1:1: error: expected top-level entity* *BC! #AI29bEBB2I (some more binary)* This error is just the same error that I received while using llvm-extract on a .c file (not .bc or .ll). Do I have to include other things in the command ? I mean generating a function.ll
2015 May 18
3
[LLVMdev] How to write a custom LTO pass?
I'd like to write an inter-modular analysis pass. My understanding is that this should take the form of an LTO pass. However, I have been unable to find any resources on the mechanics of writing and running a custom LTO pass. Does anyone have any pointers? Thanks, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL:
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
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
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
2015 Mar 26
2
[LLVMdev] GSOC project on KCoFI
Hi In my previous mail I mentioned the project on KCoFI( the control FLow integrity methods for commodity hardware http://sva.cs.illinois.edu/pubs/KCoFI-Oakland-2014.pdf ). Will it be more helpful to the community if I do the improvements number #1 and #3 mentioned in my previous mail to the mailing list or if i try to port it to arm architecture? I have decided to go ahead with the improvements
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
2015 Nov 04
2
Confused on how to do a machinefunction pass
Dear John, Thank you so much for your help. I looked at those documents. Could you kindly answer the following questions: Does it mean that I have to make my own backend target in order to write a machine pass even if I want to run a simple machinefunction pass? for example,if I want my pass to get MIPS instructions as an input, I have to copy all the files from mips target and add a file to it
2015 Nov 03
2
Confused on how to do a machinefunction pass
Hi everyone, I am a LLVM newbie. I need to write a machinefunction pass for my project. This should be an analyzer of the machine code to do some profiling. I have written a couple of function passes for front end, but it seems they are completely different. I searched through forum and llvm documents, but couldn't find anything useful or questions were unanswered. Can anyone reference me to
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
2011 Aug 19
2
[LLVMdev] running a module pass via opt on multiple bitcode files
Thanks John. Your approach worked fine for my small toy program. Now, I would like to run my module pass on a huge project (still a single executable) consisting of a few thousand bit code files scattered in many different directories. And some of them are static libraries. Do you still think it's a good idea to manually gather and link them with llvm-ld? I've seen other module pass
2015 Jun 23
3
[LLVMdev] Enabling the gold linker on freebsd
the symlink ld is already pointing to /usr/bin/ld. Also -fuse-ld=gold does not works on clang in freebsd. I am not sure where is the problem?should I remove /usr/bin/ld and create a new symlink to /usr/local/bin/ld.gold? Regards Aditya Verma Junior Undergraduate IDD Computer Sc & Engg IIT(BHU), Varanasi(UP) On Mon, Jun 22, 2015 at 5:25 AM, Rafael EspĂ­ndola < rafael.espindola at
2011 Aug 19
0
[LLVMdev] running a module pass via opt on multiple bitcode files
On 8/19/11 4:36 PM, Jinwook Shin (HOTWING) wrote: > > Thanks John. Your approach worked fine for my small toy program. Now, > I would like to run my module pass on a huge project (still a single > executable) consisting of a few thousand bit code files scattered in > many different directories. And some of them are static libraries. Do > you still think it's a good idea
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 Nov 17
2
Confused on how to do a machinefunction pass
Hi, So, I run my pass in X86 target with llc command and it printed out "hello****". Now I am trying to do the same pass for ARM target. So I did exactly what I did for X86 as mentioned in my previous posts. When I run the following command: llc -march=arm test.ll -o test nothing prints out. I did the same for MIPS target too and I got no result. Can anyone tell me what I'm doing
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
2011 Sep 22
2
[LLVMdev] running a module pass via opt on multiple bitcode files
Thanks John. I appreciate your help. I have taken the libLTO approach and it worked like a charm :) For those who wanted to achieve the same thing, below are the steps I've taken. John -- a small question: I thought I wouldn't need to touch Makefiles at all, but that wasn't the case. Could you take a look at Step 4) and tell me what you think? Thanks! 1) Create your own libLTO and
2015 Nov 04
3
Confused on how to do a machinefunction pass
Thank you so much. That helped alot. Fami On Wed, Nov 4, 2015 at 9:40 AM, John Criswell <jtcriswel at gmail.com> wrote: > On 11/3/15 7:54 PM, fateme Hoseini wrote: > > Dear John, > Thank you so much for your help. I looked at those documents. Could you > kindly answer the following questions: > > Does it mean that I have to make my own backend target in order to write