[PATCH] D146352: Introduce `llvm-min-tblgen` to build public header files

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 09:39:27 PDT 2023


mstorsjo added a comment.

In D146352#4299284 <https://reviews.llvm.org/D146352#4299284>, @chapuni wrote:

> In D146352#4296422 <https://reviews.llvm.org/D146352#4296422>, @mstorsjo wrote:
>
>> I measured the benefit from this patch in another build case; where I just want to build a small set of executables (for testing compiller-rt) in a new build tree; building tools like `FileCheck` is quite quick in general, but `llvm-config` has got surprisingly large numbers of dependencies. With this patch, the number of build steps to build `llvm-config` drops from 248 to 188, and the total cpu time for compiling it drops from ~11 minutes to ~5 minutes.
>
> I don't guess your background. Does it come from the bottleneck in the full version of `llvm-tblgen`?

Yes; building `llvm-config` seems to require building some files that currently require the full `llvm-tblgen`, but after this patch can make do with `llvm-min-tblgen`.



================
Comment at: llvm/cmake/modules/TableGen.cmake:185
+      add_custom_target(${target}-host DEPENDS ${${project}_TABLEGEN_EXE})
+      set(${project}_TABLEGEN_TARGET ${target}-host PARENT_SCOPE)
 
----------------
chapuni wrote:
> mstorsjo wrote:
> > I guess these two lines could be consider a standalone NFC refactoring/cleanup on top of the current code as well?
> It is leftover in my attempts.
> Would it be better to rewind it? I prefer this.
I think the refactoring is good, but I think you could split it out from this patch and apply it directly (or send a separate patch which should be quick and easy to review+approve), and rebase this on top of it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146352/new/

https://reviews.llvm.org/D146352



More information about the llvm-commits mailing list