This is an archive of the discontinued LLVM Phabricator instance.

Rebase D41416 on top of master
Needs ReviewPublic

Authored by SAtacker on Feb 26 2023, 11:04 AM.

Details

Summary

This is a rework of the https://reviews.llvm.org/D41416 to work on master.

Fix provided by Jonas - https://github.com/root-project/root/pull/13139

Signed-off-by: Shreyas Atre <shreyasatre16@gmail.com>
Co-authored by: Jonas Hahnfeld <hahnjo@hahnjo.de>

Diff Detail

Event Timeline

SAtacker created this revision.Feb 26 2023, 11:04 AM
SAtacker created this object with edit policy "Administrators".
Herald added a project: Restricted Project. · View Herald TranscriptFeb 26 2023, 11:04 AM
SAtacker requested review of this revision.Feb 26 2023, 11:04 AM
SAtacker updated this revision to Diff 510840.Apr 4 2023, 9:29 AM
SAtacker removed a reviewer: v.g.vassilev.
SAtacker updated this revision to Diff 519279.May 3 2023, 3:19 PM

Make loadLazySpecializationsImpl a constant time function.

SAtacker updated this revision to Diff 537339.Jul 5 2023, 6:30 AM
SAtacker edited the summary of this revision. (Show Details)
SAtacker updated this revision to Diff 538160.Jul 7 2023, 8:46 AM
SAtacker updated this revision to Diff 547897.Aug 7 2023, 12:07 PM

The hashes and the declIDs are now written in the serialized AST. These are then read back and used to provide the DeclID for LazySpecializations using the ODRHash computed using the already present interface.
Pros: It decreases the compile time when there are multiple specializations of the template upto 50%
Cons: Currently there are 27 failing tests

SAtacker updated this revision to Diff 547930.Aug 7 2023, 1:31 PM

Registered Record Types

SAtacker added a subscriber: v.g.vassilev.
SAtacker added inline comments.
clang/lib/Serialization/ASTWriter.cpp
3198–3230

@v.g.vassilev Can you please verify this?

SAtacker added a comment.EditedAug 8 2023, 5:57 AM

is the graph obtained which compares clang front end execution times. However this patch also leads to 27 test failures which are not intended. Any suggestions would be appreciated.
CC @ChuanqiXu @v.g.vassilev
Repository used to plot github.com/SAtacker/random-template-specls (hardcoded paths of clang-compiler versions, too lazy to change, please let me know if you need any changes)

SAtacker updated this revision to Diff 548183.EditedAug 8 2023, 6:14 AM

[Clang][Modules] Optimized template arguments ODR hash search for modules/PCH

  • Formatting fix
SAtacker updated this revision to Diff 548263.Aug 8 2023, 9:50 AM

Fix call to lazyTemplateSpecialization in Function Template