[PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare

Matheus Izvekov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 13 03:54:16 PDT 2022


mizvekov added a comment.

In D112374#3647530 <https://reviews.llvm.org/D112374#3647530>, @nikic wrote:

> FYI this change had a noticeable compile-time impact (http://llvm-compile-time-tracker.com/compare.php?from=ee88c0cf09969ba44307068797e12533b94768a6&to=bdc6974f92304f4ed542241b9b89ba58ba6b20aa&stat=instructions), is that expected? Largest regressions are in kimwitu++, where error.cc and gutil.cc regress by 2%.

It was expected that there would be some amount of compile time impact.

How do you think these are representative / translate to real world impact?
Any opinions on trade vs benefit?

The impact this patch causes on a TU would be slightly lower, basically equivalent to simply using name qualifications whenever possible.

So if you had a program like this:

  struct A {};
  
  A a;

The impact this patch causes should be smaller than simply rewriting it to:

  struct A {};
  
  struct A a;

or

  struct A {};
  
  ::A a;

Where qualifications already exist or a more prevalent, I would expect the impact to be none or lesser.

In other words, I would not expect to make worst cases significantly worse.

So I would have suspected this not to be of much impact in scenarios where compilation time is already critical, like complex programs that use qualifications more heavily, or where most of the time is spent instantiating templates for example.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112374



More information about the cfe-commits mailing list