[LLVMdev] adding support for -ffixed-<reg>
Chris Lattner
clattner at apple.com
Wed Oct 3 09:54:19 PDT 2012
On Oct 3, 2012, at 12:13 AM, 陳韋任 (Wei-Ren Chen) <chenwj at iis.sinica.edu.tw> wrote:
> Hi Chris,
>
>> From the design perspective, I think it would make sense to represent this in
>> LLVM IR with named metadata (http://llvm.org/docs/LangRef.html#
>> namedmetadatastructure) like "!llvm.fixedregs". This could then be picked up
>> by the code generator, installed as preallocated registers (Jakob would be the
>> one to ask how best to do this).
>
> -ffixed-<reg> and global register seems do the same thing, they both
> reserve register from being used by the compiler. IIRC, you don't want
> to add global register support before. If so, why would you think
> -ffixed-<reg> is O.K.?
I'm not opposed to implementing support for global register variables, we just didn't have a way to model it well before. Now we do!
-Chris
More information about the llvm-dev
mailing list