[LLVMdev] proposal to simplify isel/asmprinter interaction with globals
Evan Cheng
evan.cheng at apple.com
Mon Jun 22 11:49:07 PDT 2009
On Jun 20, 2009, at 7:30 PM, Chris Lattner wrote:
>
>
> My proposed fix for this is to add an 'unsigned char' slot to
> MachineOperand that holds a target-specific enum value. The code in
> asmprinter would be reduced to:
>
> switch (theoperandenum) {
> case X86::MO_Flag_non_lazy_ptr:
> O << "$non_lazy_ptr";
> break;
> case X86::MO_Flag_TLSGD:
> O << "@TLSGD";
> break;
> case X86::MO_Flag_NTPOFF:
> O << "@NTPOFF";
> break;
>
>
> etc. The possible set of suffixes and modifiers are all target-
> specific, so the main code generator would just pass them through (as
> it does now).
>
> Does anyone have any objections to this?
Can you reorg MachineOperand fields while you are at it? :-) Right now
each MachineOperand uses 8 bits for type, followed by 5 bits for
various flags, then a whole 8-bit for subreg. If we use just 3-bit
for subreg (should be enough?), the target independent part will just
take up 16-bits and leave plenty of room for target flags.
Evan
>
> -Chris
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list