[PATCH] D145210: [Pipeline] Adjust PostOrderFunctionAttrs placement in simplification pipeline
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 2 18:56:53 PST 2023
aeubanks created this revision.
Herald added subscribers: ormris, hiraditya.
Herald added a project: All.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
We can infer more attribute information once functions are fully
simplified, so move the PostOrderFunctionAttrs pass after the function
simplification pipeline. However, just doing this can impact
simplification of recursive functions since function simplification
takes advantage of function attributes of callees (some LLVM tests are
actually impacted by this), so keep a copy of PostOrderFunctionAttrs
before the function simplification pipeline that only runs on recursive
functions.
This requires some restructuring of the CGSCC NoRerun feature. We need
to cache the ShouldNotRunFunctionPassesAnalysis analysis after the
simplification is done, which now is after the second
PostOrderFunctionAttrs run, rather than after the function
simplification pipeline.
Compile time impact:
https://llvm-compile-time-tracker.com/compare.php?from=33cf40122279342b50f92a3a53f5c185390b6018&to=1bb2a07875634e508a6bdf2ca1b130f55510f060&stat=instructions:u
Compile time increase from unconditionally running the first PostOrderFunctionAttrs:
https://llvm-compile-time-tracker.com/compare.php?from=1bb2a07875634e508a6bdf2ca1b130f55510f060&to=f4f87e89cc7a35c64e3a103a8036192a84ae002b&stat=instructions:u
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D145210
Files:
llvm/include/llvm/Transforms/IPO/FunctionAttrs.h
llvm/lib/Analysis/CGSCCPassManager.cpp
llvm/lib/Passes/PassBuilderPipelines.cpp
llvm/lib/Transforms/IPO/FunctionAttrs.cpp
llvm/test/Transforms/InstCombine/unused-nonnull.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145210.502039.patch
Type: text/x-patch
Size: 5132 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230303/b5494f9b/attachment.bin>
More information about the llvm-commits
mailing list