[PATCH] Move CodeGenPrepare into lib/CodeGen

Lang Hames lhames at gmail.com
Thu Feb 20 11:09:54 PST 2014


Hi All,

Summarizing some discussion about this on IRC: Hal is right, opt
already depends on CodeGen (indirectly via a dependence on the
targets). So I renounce my concern on that point - having opt run CGP
isn't a problem, at least in terms of changing dependencies. As for
bugpoint, it does not currently depend on CodeGen, so that really is a
new dependence. I'm not aware of any problems with that though.

> As one can notice (makefile, CMakeLists) the patch introduces a dependency
> on libLLVMCodeGen for both opt and bugpoint because of that.

Quentin - out of interest, do you actually need to specify the
dependence on CodeGen for opt. From what we discovered it seems like
using CGP from opt should just work?

I think Chandler's point is still valid - if opt and llc depend on the
same libraries it's not clear that there's any value to making them
separate tools. That issue is only loosely related to this patch
though, and shouldn't stop it going in.

Cheers,
Lang.

On Thu, Feb 20, 2014 at 10:20 AM, Hal Finkel <hfinkel at anl.gov> wrote:
> ----- Original Message -----
>> From: "Lang Hames" <lhames at gmail.com>
>> To: "Tom Stellard" <tom at stellard.net>
>> Cc: "Hal Finkel" <hfinkel at anl.gov>, "Commit Messages and Patches for LLVM" <llvm-commits at cs.uiuc.edu>
>> Sent: Thursday, February 20, 2014 12:18:44 PM
>> Subject: Re: [PATCH] Move CodeGenPrepare into lib/CodeGen
>>
>> Hi All,
>>
>> >> I agree, I don't see why we're conflating all of these different
>> >> things. Can we not move the pass into CodeGen, and then deal with
>> >> adding IR-pass-driving features into llc as a follow-up matter?
>> >>
>>
>> Absolutely. Sorry - I should have been clearer, but I'm all for this.
>> I'm just suggesting that making opt depend on CodeGen should be a
>> temporary hack while we teach llc how to run IR -> IR passes neatly.
>> Then the CGP tests should be updated to use llc rather than opt.
>
> opt already depends on CodeGen so that it can use TTI, this is necessary to sensibly run the vectorizer, etc. and that seems unlikely to change.
>
>  -Hal
>
>>
>> - Lang.
>>
>
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory



More information about the llvm-commits mailing list