search for: testinline

Displaying 5 results from an estimated 5 matches for "testinline".

2010 Jan 08
4
[LLVMdev] Inlining
...tcc i32 @foo(i32 %arg) noinline { %result = mul i32 %arg, 7 ret i32 %result } define i32 @main(i32 %argc, i8 **%argv) { %retVal = call fastcc i32 @foo(i32 6) noinline ret i32 %retVal } --- and after my Makefile executed the following commands: gemini:~/Projects/Nil/nil(0)$ make testInline.s testInline llvm-as testInline.ll llc -O0 -f testInline.bc cc testInline.s -o testInline rm testInline.bc gemini:~/Projects/Nil/nil(0)$ we can compute that Very Important Number gemini:~/Projects/Nil/nil(0)$ ./testInline ; echo $? 42 gemini:~/Projects/Nil/nil(0)$ and the generated assembly...
2010 Jan 08
4
[LLVMdev] Inlining
...does some pretty neat > machine-code and object-file optimizations, but it does not apply > high-level optimizations like CSE or inlining. 'opt' is the tool > which does IR-to-IR optimization. A vital clue, but I'm still not getting it: --- gemini:~/Projects/Nil/nil(0)$ make testInline.optdis.ll llvm-as testInline.ll opt -always-inline testInline.bc -o testInline.optbc llvm-dis -f testInline.optbc -o testInline.optdis.ll rm testInline.bc testInline.optbc gemini:~/Projects/Nil/nil(0)$ cat testInline.optdis.ll ; ModuleID = 'testInline.optbc' define linkonce fastcc i32 @foo...
2010 Jan 08
0
[LLVMdev] Inlining
On Jan 8, 2010, at 1:52 PM, Dustin Laurence wrote: > gemini:~/Projects/Nil/nil(0)$ make testInline.s testInline > llvm-as testInline.ll > llc -O3 -f testInline.bc 'llc' is an IR-to-assembly compiler; at -O3 it does some pretty neat machine-code and object-file optimizations, but it does not apply high-level optimizations like CSE or inlining. 'opt' is the tool which doe...
2010 Jan 09
0
[LLVMdev] Inlining
...bject-file optimizations, but it does not apply >> high-level optimizations like CSE or inlining. 'opt' is the tool >> which does IR-to-IR optimization. >> > > A vital clue, but I'm still not getting it: > > --- > gemini:~/Projects/Nil/nil(0)$ make testInline.optdis.ll > llvm-as testInline.ll > opt -always-inline testInline.bc -o testInline.optbc > llvm-dis -f testInline.optbc -o testInline.optdis.ll > rm testInline.bc testInline.optbc > gemini:~/Projects/Nil/nil(0)$ cat testInline.optdis.ll > ; ModuleID = 'testInline.optbc' &g...
2010 Jan 09
2
[LLVMdev] Inlining
On 01/08/2010 09:17 PM, Nick Lewycky wrote: > Try using 'internal' linkage instead of 'linkonce'. That did it, thanks. --- gemini:~/Projects/LLVM/Tests/Inline(0)$ cat testInline.optdis.ll ; ModuleID = 'testInline.optbc' define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readnone { ret i32 42 } gemini:~/Projects/LLVM/Tests/Inline(0)$ --- > If you're sure you > really want linkonce then you'd need to use linkonce_odr to get inlining > her...