[LLVMdev] ARM assembly
amir.yazdanbakhsh at gmail.com
Mon Dec 10 08:09:47 PST 2012
I used your code and it works fine. Once I increase the number of variable
it uses the extra registers which I added. I have another problem.
To generate the assembly file for new ARM machine with extra registers,I
follow these steps:
1) clang -emit-llvm main.ll main.c
2) llc -march=arm -o main.s main.bc
In this case it doesn't use the registers which I added to the
architecture. Do you have any ideas?
As far as I know, the generated ll code doesn't depend on the target
(right?), but I see this line in the ll code : target triple =
Could it be the problem?
I really appreciate if anybody can help.
School of Electrical and Computer Engineering
University of Wisconsin-Madison
E-mail: yazdanbakhsh at wisc.edu
On Sun, Dec 9, 2012 at 4:17 PM, Tim Northover <t.p.northover at gmail.com>wrote:
> On Sun, Dec 9, 2012 at 7:48 PM, Evan Cheng <evan.cheng at apple.com> wrote:
> > Sound like you are not enabling optimization. Try with -O3.
> Ah, of course! I'd forgotten about the extra allocas produced by clang.
> To expand a little, the spills you're seeing are (probably)
> specifically created by clang (it creates a shadow variable for each
> local with alloca). "llc" on its own can't get rid of these, so you'll
> either want to give clang "-O3" or run the LLVM bitcode through "opt"
> before "llc".
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev