[llvm-commits] [PATCH] Add Pattern ID Information

Villmow, Micah Micah.Villmow at amd.com
Fri Aug 5 16:28:39 PDT 2011



> -----Original Message-----
> From: Jakob Stoklund Olesen [mailto:stoklund at 2pi.dk]
> Sent: Friday, August 05, 2011 4:16 PM
> To: Villmow, Micah
> Cc: Commit Messages and Patches for LLVM
> Subject: Re: [llvm-commits] [PATCH] Add Pattern ID Information
> 
> 
> On Aug 5, 2011, at 4:07 PM, Villmow, Micah wrote:
> 
> >> We added AsmPrinterFlags almost two years ago. In that time, nobody
> has
> >> defined more flags, and the existing ReloadReuse flag is only
> written
> >> by VirtRegRewriter.cpp which isn't even in the default pipeline any
> >> more.
> >>
> > [Villmow, Micah] This is extremely useful for our internal backend. I
> use it
> > to encode per instruction information that does not fit into the
> 'flags'
> > field without having to extend the MachineInstr class.
> 
> I think we discussed this before. You really shouldn't be using
> AsmPrinterFlags to carry anything important, it is intended for
> debugging annotations.
> 
> You would be better off using an immediate operand to encode your extra
> semantics.
[Villmow, Micah] That is not really feasible to add an extra operand to 
hundreds of instructions when there is already a location that store the
15 bits of information that is needed(8 in flags, 7 in AsmPrinterFlags). 
If AsmPrinterFlags isn't needed, then why not extend the flags field to 
the full 16bits and then have LLVM reserve the lower bit for the ReloadReuse bit.

I really see no need in differentiating between AsmPrinterFlags and
Flags and splitting the 16 bits between the two fields restricts the
usability of both.

> 
> /jakob
> 






More information about the llvm-commits mailing list