Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0 |
|
#
f32e5bdc |
| 05-Sep-2024 |
Mircea Trofin <mtrofin@google.com> |
[NFC] Rename the `Nr` abbreviation to `Num` (#107151)
It's more clear. (This isn't exhaustive).
|
Revision tags: llvmorg-19.1.0-rc4 |
|
#
1991aa6b |
| 30-Aug-2024 |
Mircea Trofin <mtrofin@google.com> |
Reapply "[nfc][mlgo] Incrementally update DominatorTreeAnalysis in FunctionPropertiesAnalysis (#104867) (#106309)
Reverts c992690179eb5de6efe47d5c8f3a23f2302723f2.
The problem is that if there is
Reapply "[nfc][mlgo] Incrementally update DominatorTreeAnalysis in FunctionPropertiesAnalysis (#104867) (#106309)
Reverts c992690179eb5de6efe47d5c8f3a23f2302723f2.
The problem is that if there is a sequence "{delete A->B} {delete A->B}
{insert A->B}" the net result is "{delete A->B}", which is not what we
want.
Duplicate successors may happen in cases like switch statements (as
shown in the unit test).
The second problem was that in `invoke` cases, some edges we speculate may get deleted don't, but are also not reachable from the inlined call site's basic block. We just need to check which edges are actually not present anymore.
The fix is to sanitize the list of deletes, just like we do for inserts.
show more ...
|
#
c9926901 |
| 27-Aug-2024 |
Hans Wennborg <hans@chromium.org> |
Revert "[nfc][mlgo] Incrementally update DominatorTreeAnalysis in FunctionPropertiesAnalysis (#104867)"
This seems to cause asserts in our builds:
llvm/include/llvm/Support/GenericDomTreeConstruc
Revert "[nfc][mlgo] Incrementally update DominatorTreeAnalysis in FunctionPropertiesAnalysis (#104867)"
This seems to cause asserts in our builds:
llvm/include/llvm/Support/GenericDomTreeConstruction.h:927: static void llvm::DomTreeBuilder::SemiNCAInfo<llvm::DominatorTreeBase<BasicBlock, false>>::DeleteEdge(DomTreeT &, const BatchUpdatePtr, const NodePtr, const NodePtr) [DomTreeT = llvm::DominatorTreeBase<BasicBlock, false>]: Assertion `!IsSuccessor(To, From) && "Deleted edge still exists in the CFG!"' failed.
and
llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp:390: DominatorTree &llvm::FunctionPropertiesUpdater::getUpdatedDominatorTree(FunctionAnalysisManager &) const: Assertion `DT.getNode(BB)' failed.
See comment on the PR.
> We need the dominator tree analysis for loop info analysis, which we need to get features like most nested loop and number of top level loops. Invalidating and recomputing these from scratch after each successful inlining can sometimes lead to lengthy compile times. We don't need to recompute from scratch, though, since we have some boundary information about where the changes to the CFG happen; moreover, for dom tree, the API supports incrementally updating the analysis result. > > This change addresses the dom tree part. The loop info is still recomputed from scratch. This does reduce the compile time quite significantly already, though (~5x in a specific case) > > The loop info change might be more involved and would follow in a subsequent PR.
This reverts commit a2a5508bdae7d115b6c3ace461beb7a987a44407 and the follow-up commit cdd11d694a406a98a16d6265168ee2fbe1b6a87c.
show more ...
|
#
cdd11d69 |
| 23-Aug-2024 |
Mircea Trofin <mtrofin@google.com> |
Fix bot failures after PR #104867
An assert was left over after addressing feedback. In the process of fixing, realized the way I addressed the feedback was also incomplete.
|
#
a2a5508b |
| 23-Aug-2024 |
Mircea Trofin <mtrofin@google.com> |
[nfc][mlgo] Incrementally update DominatorTreeAnalysis in FunctionPropertiesAnalysis (#104867)
We need the dominator tree analysis for loop info analysis, which we need to get features like most nes
[nfc][mlgo] Incrementally update DominatorTreeAnalysis in FunctionPropertiesAnalysis (#104867)
We need the dominator tree analysis for loop info analysis, which we need to get features like most nested loop and number of top level loops. Invalidating and recomputing these from scratch after each successful inlining can sometimes lead to lengthy compile times. We don't need to recompute from scratch, though, since we have some boundary information about where the changes to the CFG happen; moreover, for dom tree, the API supports incrementally updating the analysis result.
This change addresses the dom tree part. The loop info is still recomputed from scratch. This does reduce the compile time quite significantly already, though (~5x in a specific case)
The loop info change might be more involved and would follow in a subsequent PR.
show more ...
|
Revision tags: llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init |
|
#
7b57a1b4 |
| 21-Jun-2024 |
Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> |
[llvm] format and terminate namespaces with closing comment (#94917)
Namespaces are terminated with a closing comment in the majority of the
codebase so do the same here for consistency. Also forma
[llvm] format and terminate namespaces with closing comment (#94917)
Namespaces are terminated with a closing comment in the majority of the
codebase so do the same here for consistency. Also format code within
some namespaces to make clang-format happy.
show more ...
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3 |
|
#
2d854dd3 |
| 11-Oct-2023 |
Fangrui Song <i@maskray.me> |
Move global namespace cl::opt inside llvm:: or internalize them
|
Revision tags: llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4 |
|
#
aad3641e |
| 23-Aug-2023 |
Aiden Grossman <agrossman154@yahoo.com> |
[FunctionPropertiesAnalysis] Add CFG and call properties
This patch adds in a couple more properties related to call instructions and the CFG within the function that should expose a little bit more
[FunctionPropertiesAnalysis] Add CFG and call properties
This patch adds in a couple more properties related to call instructions and the CFG within the function that should expose a little bit more about the characteristics of the function.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D158681
show more ...
|
Revision tags: llvmorg-17.0.0-rc3 |
|
#
b8f191e0 |
| 15-Aug-2023 |
Aiden Grossman <agrossman154@yahoo.com> |
[FunctionPropertiesAnalysis] Add operand type counts
This patch adds operand type counts to the detailed function properties analysis. This is intended to enable more interesting and detailed compar
[FunctionPropertiesAnalysis] Add operand type counts
This patch adds operand type counts to the detailed function properties analysis. This is intended to enable more interesting and detailed comparisons across different languages on specific metrics (like usage of inline assembly or global values).
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D158018
show more ...
|
Revision tags: llvmorg-17.0.0-rc2 |
|
#
fe6bb84c |
| 08-Aug-2023 |
Aiden Grossman <agrossman154@yahoo.com> |
[FunctionPropertiesAnalysis] Add detailed analysis
This patch adds more detailed function properties gated behind a command line flag for use primarily in experimentation and gathering statistics on
[FunctionPropertiesAnalysis] Add detailed analysis
This patch adds more detailed function properties gated behind a command line flag for use primarily in experimentation and gathering statistics on the functions in a module or project. The runtime cost should be minimal as the computation is only done when the flag is set. There will be a slight memory overhead when the ML inliner is enabled, but it should be fairly small at a handful of bytes per function.
This is an adapted form of https://reviews.llvm.org/D109661.
Reviewed By: mtrofin
Differential Revision: https://reviews.llvm.org/D157358
show more ...
|
Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5 |
|
#
01c5ec3d |
| 17-May-2023 |
Mircea Trofin <mtrofin@google.com> |
[NFC] Surface the validation of FunctionPropertiesAnalysis
Avoids relying on `assert` for some of the validation.
Differential Revision: https://reviews.llvm.org/D150827
|
Revision tags: llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6 |
|
#
3f8e4169 |
| 15-Jun-2022 |
Mircea Trofin <mtrofin@google.com> |
[FunctionPropertiesAnalysis] Generalize support for unreachable
Generalized support for subgraphs that get rendered unreachable, for both `call` and `invoke` cases.
Differential Revision: https://r
[FunctionPropertiesAnalysis] Generalize support for unreachable
Generalized support for subgraphs that get rendered unreachable, for both `call` and `invoke` cases.
Differential Revision: https://reviews.llvm.org/D127921
show more ...
|
Revision tags: llvmorg-14.0.5 |
|
#
22a1f998 |
| 08-Jun-2022 |
Mircea Trofin <mtrofin@google.com> |
FunctionPropertiesAnalysis: handle callsite BBs that lose edges
There could be successors that were reached before but now are only reachable from elsewhere in the CFG.
Suppose the following diamon
FunctionPropertiesAnalysis: handle callsite BBs that lose edges
There could be successors that were reached before but now are only reachable from elsewhere in the CFG.
Suppose the following diamond CFG (lines are arrows pointing down): A / \ B C \ / D There's a call site in C that is inlined. Upon doing that, it turns out it expands to: call void @llvm.trap() unreachable D isn't reachable from C anymore, but we did discount it when we set up FunctionPropertiesUpdater, so we need to re-include it here.
The patch also updates loop accounting to use LoopInfo rather than traverse BBs.
Differential Revision: https://reviews.llvm.org/D127353
show more ...
|
#
7e7021ca |
| 10-Jun-2022 |
Mircea Trofin <mtrofin@google.com> |
[mlgo] Update FunctionPropertyCache after invalidating analyses
The update depends on LoopInfo, so we need that refreshed first, not after.
Differential Revision: https://reviews.llvm.org/D127467
|
#
b8c39eb2 |
| 08-Jun-2022 |
Mircea Trofin <mtrofin@google.com> |
Fix FunctionPropertiesAnalysis updating callsite in 1-BB loop
If the callsite is in a single BB loop, we need to exclude the BB from the successor set (in which it'd be a member), because that set f
Fix FunctionPropertiesAnalysis updating callsite in 1-BB loop
If the callsite is in a single BB loop, we need to exclude the BB from the successor set (in which it'd be a member), because that set forms a boundary at which we stop traversing the CFG, when re-ingesting BBs after inlining; but after inlining, the callsite BB's new successors should be visited.
Reviewed By: kazu
Differential Revision: https://reviews.llvm.org/D127178
show more ...
|
Revision tags: llvmorg-14.0.4 |
|
#
f46dd19b |
| 03-May-2022 |
Mircea Trofin <mtrofin@google.com> |
[mlgo] Incrementally update FunctionPropertiesInfo during inlining
Re-computing FunctionPropertiesInfo after each inlining may be very time consuming: in certain cases, e.g. large caller with lots o
[mlgo] Incrementally update FunctionPropertiesInfo during inlining
Re-computing FunctionPropertiesInfo after each inlining may be very time consuming: in certain cases, e.g. large caller with lots of callsites, and when the overall IR doesn't increase (thus not tripping a size bloat threshold).
This patch addresses this by incrementally updating FunctionPropertiesInfo.
Differential Revision: https://reviews.llvm.org/D125841
show more ...
|
Revision tags: llvmorg-14.0.3 |
|
#
49942d59 |
| 28-Apr-2022 |
Mircea Trofin <mtrofin@google.com> |
[NFC] remove const from FunctionPropertiesAnalysis::run, keep on Result
The goal in 75881d8b023e was just modifying what `Result` is, didn't need to also modify ::run.
|
#
75881d8b |
| 28-Apr-2022 |
Mircea Trofin <mtrofin@google.com> |
[NFC] const-ed the return type of FunctionPropertiesAnalysis
The result is a data bag, this makes sure it's signaled to a user that the data can't be mutated when, for example, doing something like:
[NFC] const-ed the return type of FunctionPropertiesAnalysis
The result is a data bag, this makes sure it's signaled to a user that the data can't be mutated when, for example, doing something like:
auto &R = FAM.getResult<FunctionPropertiesAnalysis>(F) ... R.Uses++
show more ...
|
Revision tags: llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
#
71c3a551 |
| 28-Feb-2022 |
serge-sans-paille <sguelton@redhat.com> |
Cleanup includes: LLVMAnalysis
Number of lines output by preprocessor: before: 1065940348 after: 1065307662
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Diff
Cleanup includes: LLVMAnalysis
Number of lines output by preprocessor: before: 1065940348 after: 1065307662
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D120659
show more ...
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1 |
|
#
e3d3dbd3 |
| 10-Jan-2021 |
Kazu Hirata <kazu@google.com> |
[llvm] Ensure newlines at the end of files (NFC)
This patch eliminates pesky "No newline at end of file" messages from git diff.
|
Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1 |
|
#
3ac828b8 |
| 23-Jul-2020 |
Eric Christopher <echristo@gmail.com> |
Use llvm::size rather than an empty loop to get the number of top level loops.
|
#
06283661 |
| 23-Jul-2020 |
Tarindu Jayatilaka <tarindujayatilaka@gmail.com> |
Add new function properties to FunctionPropertiesAnalysis
Added LoadInstCount, StoreInstCount, MaxLoopDepth, LoopCount
Reviewed By: jdoerfert, mtrofin
Differential Revision: https://reviews.llvm
Add new function properties to FunctionPropertiesAnalysis
Added LoadInstCount, StoreInstCount, MaxLoopDepth, LoopCount
Reviewed By: jdoerfert, mtrofin
Differential Revision: https://reviews.llvm.org/D82283
show more ...
|
#
ee6f0e10 |
| 23-Jul-2020 |
Tarindu Jayatilaka <tarindujayatilaka@gmail.com> |
Add a Printer to the FunctionPropertiesAnalysis
A printer pass and a lit test case was added.
Reviewed By: mtrofin
Differential Revision: https://reviews.llvm.org/D82523
|
#
2f56046d |
| 23-Jul-2020 |
Tarindu Jayatilaka <tarindujayatilaka@gmail.com> |
Refactor FunctionPropertiesAnalysis
this separates `analyze` logic from `FunctionPropertiesAnalysis`
Reviewed By: mtrofin
Differential Revision: https://reviews.llvm.org/D82521
|
#
418121c3 |
| 22-Jul-2020 |
Tarindu Jayatilaka <tarindujayatilaka@gmail.com> |
Reapply "Rename InlineFeatureAnalysis to FunctionPropertiesAnalysis"
(This reverts commit a5e0194709c40212694370e0ea789a1ca14548b5, and corrects author).
Rename the pass to be able to extend it to
Reapply "Rename InlineFeatureAnalysis to FunctionPropertiesAnalysis"
(This reverts commit a5e0194709c40212694370e0ea789a1ca14548b5, and corrects author).
Rename the pass to be able to extend it to function properties other than inliner features.
Reviewed By: mtrofin
Differential Revision: https://reviews.llvm.org/D82044
show more ...
|