[PATCH] Move CodeGenPrepare into lib/CodeGen

Quentin Colombet qcolombet at apple.com
Wed Feb 19 18:28:50 PST 2014



Envoyé de mon iPhone

> Le 19 févr. 2014 à 17:57, Chandler Carruth <chandlerc at google.com> a écrit :
> 
> 
> On Wed, Feb 19, 2014 at 5:56 PM, Chandler Carruth <chandlerc at google.com> wrote:
>>> CGP is IR to IR pass and I do prefer write unitary test that check against IR =.
>> 
>> We already have a decent number of IR to IR passes in llc. I don't know why CGP is special here. I think all of this is a symptom of the fact that we haven't actually solved the fundamental problems of target-specific IR passes.
>> 
>> If we link lib/CodeGen into the opt tool, we should get rid of llc. It looses all value IMO. Instead, I'm suggesting to give it the actual value it should have had -- the code generator specific testing, including IR-passes that are code generator specific as well as IR -> MI lowering and testing at that layer.
> 
> As it may not have been clear in my prior email, I'm not suggesting that we *stop* testing CGP as an IR-to-IR pass with FileCheck.
> 
> What I'm suggesting is that the hard (but necessary) part of moving CGP to lib/CodeGen is teaching llc to drive IR-to-IR passes sanely for testing them in isolation, just like we've enjoyed with opt since ~forever.
Since, opt is a tool that handle IR to IR transformations, I do not see why the ones that use low level information should not be handled here (maybe with a initializeCodeGenIRToIR).

I am really not familiar with how llc drives the passes, but it does not seem to me like we were supposed to be able to do: llc -opt1 -opt2 etc.

I am not saying it would be bad, I am saying that it seems the functionality is already in opt.

To keep going into that direction, I'd love a tool (opt or other) that would handle IR to IR, IR to MIR (format not defined), and MIR to MIR. My point is making the distinction between code gen-ish passes and transform passes does not make much sense to me.

Thanks,
Quentin


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140219/226b3b74/attachment.html>


More information about the llvm-commits mailing list