[PATCH] D139334: Reduce IROutliner Compile time by reducing the number of time the CodeExtractorCache is rebuilt.
Andrew Litteken via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 08:40:19 PST 2022
AndrewLitteken created this revision.
AndrewLitteken added a reviewer: paquette.
Herald added subscribers: ormris, hiraditya.
Herald added a project: All.
AndrewLitteken requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Currently, in the IROutliner, we rebuild the CodeExtractorCache for every function when it needs to be analyzed for cost, or when it is outlined. For large pieces of code, this takes a long time.
We can instead build the caches at the beginning of the run and then adapt the cache as necessary. This required making the ache accessible from the CodeExtractor, and then adapting the IROutliner to build everything at once, and then reference it when necessary, removing instructions that were no longer in the original functions once they are outlined.
This reduces compile time significantly. F25504545: Screen Shot 2022-10-04 at 10.31.19 AM.png <https://reviews.llvm.org/F25504545>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D139334
Files:
llvm/include/llvm/Transforms/IPO/IROutliner.h
llvm/include/llvm/Transforms/Utils/CodeExtractor.h
llvm/lib/Transforms/IPO/IROutliner.cpp
llvm/lib/Transforms/Utils/CodeExtractor.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139334.480119.patch
Type: text/x-patch
Size: 8122 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221205/c83488c5/attachment.bin>
More information about the llvm-commits
mailing list