[PATCH] Move CodeGenPrepare into lib/CodeGen

Chandler Carruth chandlerc at google.com
Wed Feb 19 17:56:22 PST 2014


On Wed, Feb 19, 2014 at 5:52 PM, Quentin Colombet <qcolombet at apple.com>wrote:

> Would it be possible to stop adding this pass from opt and instead have
> llc (and the target machine) add the pass? I don't think we have any real
> reason to want to see CGP output from opt…
>
> Well… I do :).
>
> 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.

More over, CGP is doing some stuff even when TargetLowering is not
> available as demonstrated in some tests.
>

Sure. But we could probably stop handling the "unavailable" state and
simplify CGP as there is really no need to handle both cases once the
layering issues are fully sorted.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140219/0aae2599/attachment.html>


More information about the llvm-commits mailing list