[PATCHES] PR18303: Use appropriate Feature flags for encoding instructions

David Woodhouse dwmw2 at infradead.org
Wed Jan 8 15:48:20 PST 2014


On Wed, 2014-01-08 at 15:02 -0800, Jim Grosbach wrote:
> 
> How hard would it be to do the real deal and remove the
> MCSubtargetInfo from the various target MCCodeEmitter implementations?
> We’ll be passing around the relevant info directly now anyway, so it
> shouldn’t be necessary. Theoretically. ;)

Possibly not too hard, if you actually understand the object hierarchy,
which I'm not sure I do :)

Let's look at where the EncodeInstruction() calls come from. That's
where we'd need the SubtargetInfo.

Most are from implementations of MCObjectStreamer.

Then there's the one in MCAssembler::relaxInstruction() which would need
to save the SubtargetInfo in the MCRelaxableFragment.

One in MCAsmStreamer::AddEncodingComment().

And finally one in AMDGPUAsmPrinter::EmitInstruction().


Where exactly would you want the SubtargetInfo to be stored? In the
MCContext?

-- 
dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140108/07b03f2c/attachment.bin>


More information about the llvm-commits mailing list