[LLVMdev] RFC: MachineInstr Annotations
Chris Lattner
clattner at apple.com
Tue Aug 4 10:19:08 PDT 2009
On Aug 1, 2009, at 1:20 PM, Dan Gohman wrote:
>> We could also mark instructions as spills but Chris has pointed out
>> that we
>> can probably synthesize that in AsmPrinter with just a little bit of
>> work.
>> The above information can't be inferred from stack layouts or
>> anything else.
>>
>> Thoughts?
>
> I'm ok with this, in abstract. It would be good to put up some
> intimidating
> comments to scare people away from using these flags for anything
> except for the AsmPrinter, because semantics are tricky enough as they
> are right now without new subtle bits to worry about.
I agree that this is a good approach, and that this should only be
used for "random comments", the bits shouldn't have a semantic effect
on the code. Just put a strong comment on them, and that is enough.
> It even occurs to me to suggest putting the bits in a private member
> in
> a class and making AsmPrinter a friend of that class in order to
> discourage accidental misuse, but that may be overreacting :-).
Yeah, probably not necessary ;)
-Chris
More information about the llvm-dev
mailing list