[LLVMdev] adding support for -ffixed-<reg>

陳韋任 (Wei-Ren Chen) chenwj at iis.sinica.edu.tw
Wed Oct 3 18:42:23 PDT 2012

On Wed, Oct 03, 2012 at 09:54:19AM -0700, Chris Lattner wrote:
> 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!

  I see. Cool!


Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj

More information about the llvm-dev mailing list