[PATCH] D43578: -ftime-report switch support in Clang

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 10 06:29:59 PDT 2018


thakis added subscribers: davezarzycki, thakis.
thakis added a comment.

@davezarzycki remarks in https://reviews.llvm.org/D45485 that this breaks the shared build. The proposed fix there is to make several of clang's modules depend on LLVM's IR library ("Core"). This seems weird to me for two reasons, one architectural, one form a build point of view:

1. The modules growing the dep don't really depend on IR, they just need that one bool that happens to be defined there. That bool is called `TimePassesIsEnabled` which is a reasonable bool to live in IR, but this patch starts using that bool for meanings other than "should we time passes?". It instead uses the same bool to decide if clang should print a bunch of timing info. We probably should have a separate bool in clang and key this off that and make -ftime-report set both.

2. From a build PoV, depending on Core means explicitly depending on TableGen processing the Attributes.td and Intrinsics.td files in include/llvm/IR, which needlessly (explicitly) serializes the build.


Repository:
  rL LLVM

https://reviews.llvm.org/D43578





More information about the llvm-commits mailing list