similar to: [LLVMdev] force inlineing a function using opt

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] force inlineing a function using opt"

2011 Jan 05
0
[LLVMdev] force inlineing a function using opt
If I understand correctly, you're saying that the C source definition of the prologue function is declared as static. If you compile that function to LLVM IR, it will get interal linkage and will not be visible to functions in other compilation units; instead, it will get renamed if there is a function defined with the same name. As such, it will never get inlined as the instrumented code
2011 Mar 07
2
[LLVMdev] matching function call arguments
Hi, I am trying to identify if two functions were called with exactly the same argument. For instance, in the below example, assuming both entry() and exit() functions take a single argument, I would like to know if arg1 in entry() is same as arg1in exit(). int a; struct sa { int b; int c; }; int main () { struct sa s; entry (arg1); ... exit (arg1); return 0; } In
2011 Mar 07
2
[LLVMdev] matching function call arguments
Hi Reid, Thank you for your response. In my analysis, I will always have entry(2) and exit(2). I will not run into cases involving entry (1+1) or entry (fn return values). I am having trouble trying to compare the arguments of entry and exit in the following scenario. #include<stdio.h> #include<stdlib.h> #include<pthread.h> struct sa { int a; pthread_mutex_t *mutex1;
2011 Mar 07
0
[LLVMdev] matching function call arguments
Could you be more precise about what you mean by "identical"? Would entry(2) and entry(1+1) be considered equivalent? If the same Value* is passed to entry and exit, then pointer equality (==) will detect that. Reid On Mon, Mar 7, 2011 at 8:08 AM, Hari Pyla <harip at vt.edu> wrote: > Hi, >  I am trying to identify if two functions were called with exactly the same
2011 Mar 07
0
[LLVMdev] matching function call arguments
On Mon, Mar 7, 2011 at 8:03 PM, Hari Pyla <harip at vt.edu> wrote: >  Thank you for your response. In my analysis, I will always have > entry(2) and exit(2). I will not run into cases involving entry (1+1) or > entry (fn return values). I am having trouble trying to compare the > arguments of entry and exit in the following scenario. > > #include<stdio.h> >
2013 Apr 01
1
XML error: missing security model on virsh migrate
Hi, I am trying to migrate a VM from one node to another and I get the following error message. [user at n0 ~]$ virsh --c qemu:///system migrate --verbose Fedora-17-x86_64-1 qemu+ssh://n1/system error: XML error: missing security model when using multiple labels On both the src and dest nodes, I've disabled SELinux and I have the following libvirt version installed $virsh --connect
2011 Jan 21
1
[LLVMdev] -ffixed option in llvm-gcc
Hi I am trying to register shadow a global variable using -ffixed option in llvm-gcc. I am able to accomplish this using gcc however llvm-gcc seems to ignore this option and generate code using the register. command line: >gcc -Wall -m64 -O3 -pthread -ftls-model=initial-exec -ffixed-r12 test.c -o test >objdump -d ./test | grep r12 >llvm-gcc -Wall -m64 -O3 -pthread
2012 Nov 05
2
[LLVMdev] Adding function attributes
Hello everyone, I am coding a ModulePass in which I want to add an AlwaysInline attribute to every function so that they can be later inlined by the -always-inline pass. However, the changes to the function seem to be lost after exiting my pass because the AlwaysInline attribute is not in the output LLVM IR. Maybe the function iterator passed by the module object actually points to copies of
2012 Nov 05
2
[LLVMdev] Adding function attributes
Hi Duncan, thanks for the quick answer. Yes I'm sure the runOnModule is being called, and when I dump the functions before exiting the method I can see the AlwaysInline attribute. I'll check InlineAlways.cpp and will reimplement as last resource but I still wonder why this is not working. On Mon, Nov 5, 2012 at 5:03 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Arnaldo,
2018 Feb 02
2
Debug info error on bitcode inline modification
Hi, I'm trying to inline function defined in another bitcode module via bitcode modification. I'm linking multiple bitcode modules, setting inline related attributes, applying -always-inline pass, but then debug info error occurs. It seems debug info metadata isn't properly updated on inlining. How can I fix it? I'm using LLVM 3.8.1 on OS X (On below example target is Android but
2010 Apr 21
2
[LLVMdev] Function pointers bitcasted to varargs
Hi all, I had the following function that used function pointers with void arguments, typedef void (*FP)(); void foo() { printf("hello world from foo\n"); } int main() { FP fp; fp = foo; (*fp)(); } The corresponding bitcode, with no optimizations is target datalayout =
2011 Aug 19
2
[LLVMdev] How to halt a program
Guys, I would like to instrument the bytecode that LLVM produces with assertions. I have written the instrumentation code manually, but I do not know how to halt the program in case the assertion is false. I took a look into the bytecode that LLVM produces for a program like: #include <stdlib.h> int main() { exit(1); } And it is like this: define i32 @main() nounwind { entry:
2011 Jun 29
2
[LLVMdev] hello world error
Hi All, I am using llvm-2.9 to cross compile to alpha. I know that alpha is in experimental stage, but i can not get even the "Hello World" program to run on it. Here is what happens, the bitcode file for the hello world program is as follow: ; ModuleID = 'hello.bc' target datalayout =
2012 Nov 05
0
[LLVMdev] Adding function attributes
Hi Arnaldo, > I am coding a ModulePass in which I want to add an AlwaysInline attribute to > every function so that they can be later inlined by the -always-inline pass. why not just do the inlining yourself. The always inliner code is at lib/Transforms/IPO/InlineAlways.cpp, and it's pretty short. > However, the changes to the function seem to be lost after exiting my pass >
2011 Oct 05
2
[LLVMdev] LLVM IR is a compiler IR
All, I should have chimed in earlier, but have been working on two more side-channel variants of this conversation. At the beginning the PNaCl team was strongly pushing for trying to keep platform ABI compatibility on all platforms while taking one portable bitcode stream as input. During the discussions we've had over the past few weeks it became obvious that that is simply not tractable,
2012 Nov 05
0
[LLVMdev] Adding function attributes
Hi Arnaldo, On 05/11/12 10:02, Arnaldo wrote: > Hi Duncan, thanks for the quick answer. > > Yes I'm sure the runOnModule is being called, and when I dump the functions > before exiting the method I can see the AlwaysInline attribute. > > I'll check InlineAlways.cpp and will reimplement as last resource but I still > wonder why this is not working. if you want more
2012 Feb 06
0
[LLVMdev] misc questions on opt and bitcode
On Feb 5, 2012, at 11:32 AM, Arpan Sen wrote: > For the very simple example below, I get Unknown instruction error from lli and llvm-dis, while llc does not print anything. Not sure what is that I am missing here. My llvm-gcc version is i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) > 1-39-155-188:pastebin Babai$ llvm-gcc example.c
2010 Oct 19
0
[LLVMdev] Structure memory layout
On 19 October 2010 07:57, Jin Gu Kang <jaykang10 at imrc.kist.re.kr> wrote: > Frist, I have been implementing common type for struct type on bitcode > at compilation time using llvm-gcc and then changing common type to target > specific types at code generation time using llc (reconstruct StructLayout). Hi Jin, Apart from bitfields and unions, the struct type is pretty much target
2012 Oct 07
2
[LLVMdev] Inserting a function call using LLVM
Hi, I am new to LLVM and interested in using LLVM to work on a research project for my Master's degree. My idea is following - 1. I have a simple C program basic.c - #include <stdio.h> int main() { printf("Hello World"); return 0; } 2. I will generate IR byte code for this basic.c using - llvm-gcc -emit-llvm -S basic.c This will give me basic.s which has IR byte code
2010 May 13
4
[LLVMdev] How to get the variable mapping between the source and llvm bytecode
Hi, I want to know the variable mapping between the source and llvm bytecode. It seems that current llvm debugging information cannot provide this mapping directly. Here is my examples (llvm 2.7). In this exmaple, I want to know the mapping: tmp<--->%4. But current llvm's debugging information can only provide that the instruction "%4 = add nsw i32 %3, 2" is at line 3 in