This is an archive of the discontinued LLVM Phabricator instance.

[libcxx][dsl] Cache the result of compilerMacros()
AbandonedPublic

Authored by arichardson on Oct 6 2020, 2:15 AM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Summary

This function is called about 80 times during test startup and most of
the invokes the same compiler command. Avoiding running a new process and
parsing the output into a python dict by caching the output. This
noticeably speeds up running a single lit test: for me this patch changes
the time it takes to run lit with --no-execute for a single test from
~7 seconds to ~5.5 seconds.

Diff Detail

Event Timeline

arichardson created this revision.Oct 6 2020, 2:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 6 2020, 2:15 AM
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald Transcript
arichardson requested review of this revision.Oct 6 2020, 2:15 AM

Thanks for opening these reviews. I proposed a unified approach to solve this problem in https://reviews.llvm.org/D89003, please let me know what you think.

arichardson abandoned this revision.Oct 9 2020, 2:38 AM

Better solution (D89003) has been committed.