[llvm-dev] Should we split llvm Support and ADT?

Mehdi AMINI via llvm-dev llvm-dev at lists.llvm.org
Sun May 28 20:54:25 PDT 2017


2017-05-26 17:47 GMT-07:00 Zachary Turner via llvm-dev <
llvm-dev at lists.llvm.org>:

> Changing a header file somewhere and having to spend 10 minutes waiting
> for a build leads to a lot of wasted developer time.
>
> The real culprit here is tablegen.  Can we split support and ADT into two
> - the parts that tablegen depends on and the parts that it doesn't?
>

Splitting ADT just based on tablegen usage seems dubious to me. If we need
to go this route, I'd replace as many uses of ADT data structure with STL
ones to begin with to reduce the surface.


2017-05-28 8:25 GMT-07:00 Krzysztof Parzyszek via llvm-dev <
llvm-dev at lists.llvm.org>:

> On 5/26/2017 7:59 PM, Zachary Turner via llvm-dev wrote:
>
>> It's that TableGen depends on Support, so if you change one file in
>> support, support gets recompiled into a new static archive, which
>> triggers a rerun of tablegen on all the tablegen inputs, which is
>> extremely slow.
>>
>
> What exactly is extremely slow? In my experience TableGen itself takes a
> negligible amount of time compared to the rest of the build. This is
> particularly true in cases when something in Support or ADT is modified, as
> this usually triggers recompilation of large parts of LLVM.
>

Tablegen built in debug is really slow though, I remember an out-of-tree
backend where running llvm-tblgen was taking up to 5 min per file!
The CMake option LLVM_OPTIMIZED_TABLEGEN helps a lot with this. Otherwise
LLVM_TABLEGEN is even more efficient, but it's a double-edged sword.

But we could also use the diff-and-copy approach not on the tablegen output
but on the llvm-tblgen binary itself, that way we wouldn't re-run it when
it does not change itself (I'm not sure why CMake does not use this
strategy by default for any file including .o and .a?).

-- 
Mehdi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170528/d7ecf563/attachment.html>


More information about the llvm-dev mailing list