#
818b1ab8 |
| 19-Sep-2022 |
Max Kazantsev <mkazantsev@azul.com> |
[SCEV][NFC] Remove unused parameter from forgetLoopDispositions
Let's be honest about it, we don't drop loop dispositions for particular loops. Remove the parameter that misleadingly makes it appare
[SCEV][NFC] Remove unused parameter from forgetLoopDispositions
Let's be honest about it, we don't drop loop dispositions for particular loops. Remove the parameter that misleadingly makes it apparent that we do.
show more ...
|
#
e5581df6 |
| 17-Sep-2022 |
Yaxun (Sam) Liu <yaxun.liu@amd.com> |
[SimplifyCFG] accumulate bonus insts cost
SimplifyCFG folds
bool foo() { if (cond1) return false; if (cond2) return false; return true; }
as
bool foo() { if (cond1 | cond2) return false
[SimplifyCFG] accumulate bonus insts cost
SimplifyCFG folds
bool foo() { if (cond1) return false; if (cond2) return false; return true; }
as
bool foo() { if (cond1 | cond2) return false return true; }
'cond2' is called 'bonus insts' in branch folding since they introduce overhead since the original CFG could do early exit but the folded CFG always executes them. SimplifyCFG calculates the costs of 'bonus insts' of a folding a BB into its predecessor BB which shares the destination. If it is below bonus-inst-threshold, SimplifyCFG will fold that BB into its predecessor and cond2 will always be executed.
When SimplifyCFG calculates the cost of 'bonus insts', it only consider 'bonus' insts in the current BB to be considered for folding. This causes issue for unrolled loops which share destinations, e.g.
bool foo(int *a) { for (int i = 0; i < 32; i++) if (a[i] > 0) return false; return true; }
After unrolling, it becomes
bool foo(int *a) { if(a[0]>0) return false if(a[1]>0) return false; //... if(a[31]>0) return false; return true; }
SimplifyCFG will merge each BB with its predecessor BB, and ends up with 32 'bonus insts' which are always executed, which is much slower than the original CFG.
The root cause is that SimplifyCFG does not consider the accumulated cost of 'bonus insts' which are folded from different BB's.
This patch fixes that by introducing a ValueMap to track costs of 'bonus insts' coming from different BB's into the same BB, and cuts off if the accumulated cost exceeds a threshold.
Reviewed by: Artem Belevich, Florian Hahn, Nikita Popov, Matt Arsenault
Differential Revision: https://reviews.llvm.org/D132408
show more ...
|
Revision tags: llvmorg-15.0.0 |
|
#
b18ff9c4 |
| 28-Aug-2022 |
Kazu Hirata <kazu@google.com> |
[Transform] Use range-based for loops (NFC)
|
#
56ea4f9b |
| 28-Aug-2022 |
Kazu Hirata <kazu@google.com> |
[Transforms] Qualify auto in range-based for loops (NFC)
Identified with readability-qualified-auto.
|
Revision tags: llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
#
11079e88 |
| 15-Jul-2022 |
Nikita Popov <npopov@redhat.com> |
[IR] Don't treat callbr as indirect terminator
Callbr is no longer an indirect terminator in the sense that is relevant here (that it's successors cannot be updated). The primary effect of this chan
[IR] Don't treat callbr as indirect terminator
Callbr is no longer an indirect terminator in the sense that is relevant here (that it's successors cannot be updated). The primary effect of this change is that callbr no longer prevents formation of loop simplify form.
I decided to drop the isIndirectTerminator() method entirely and replace it with isa<IndirectBrInst>() checks. I assume this method was added to abstract over indirectbr and callbr, but it never really caught on, and there is nothing left to abstract anymore at this point.
Differential Revision: https://reviews.llvm.org/D129849
show more ...
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5 |
|
#
b8c2781f |
| 09-Jun-2022 |
Simon Moll <moll@cs.uni-saarland.de> |
[NFC] format InstructionSimplify & lowerCaseFunctionNames
Clang-format InstructionSimplify and convert all "FunctionName"s to "functionName". This patch does touch a lot of files but gets done with
[NFC] format InstructionSimplify & lowerCaseFunctionNames
Clang-format InstructionSimplify and convert all "FunctionName"s to "functionName". This patch does touch a lot of files but gets done with the cleanup of InstructionSimplify in one commit.
This is the alternative to the less invasive clang-format only patch: D126783
Reviewed By: spatel, rengolin
Differential Revision: https://reviews.llvm.org/D126889
show more ...
|
Revision tags: llvmorg-14.0.4, llvmorg-14.0.3, 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 |
|
#
a494ae43 |
| 01-Mar-2022 |
serge-sans-paille <sguelton@redhat.com> |
Cleanup includes: TransformsUtils
Estimation on the impact on preprocessor output: before: 1065307662 after: 1064800684
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-
Cleanup includes: TransformsUtils
Estimation on the impact on preprocessor output: before: 1065307662 after: 1064800684
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D120741
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 |
|
#
d1abf481 |
| 20-Nov-2021 |
Kazu Hirata <kazu@google.com> |
[llvm] Use range-based for loops (NFC)
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2 |
|
#
735a5904 |
| 14-Aug-2021 |
Nikita Popov <nikita.ppv@gmail.com> |
[MemorySSA] Remove -enable-mssa-loop-dependency option
This option has been enabled by default for quite a while now. The practical impact of removing the option is that MSSA use cannot be disabled
[MemorySSA] Remove -enable-mssa-loop-dependency option
This option has been enabled by default for quite a while now. The practical impact of removing the option is that MSSA use cannot be disabled in default pipelines (both LPM and NPM) and in manual LPM invocations. NPM can still choose to enable/disable MSSA using loop vs loop-mssa.
The next step will be to require MSSA for LICM and drop the AST-based implementation entirely.
Differential Revision: https://reviews.llvm.org/D108075
show more ...
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init |
|
#
25a3130d |
| 19-Jul-2021 |
Johannes Doerfert <johannes@jdoerfert.de> |
[Local] Do not introduce a new `llvm.trap` before `unreachable`
This is the second attempt to remove the `llvm.trap` insertion after https://reviews.llvm.org/rGe14e7bc4b889dfaffb7180d176a03311df2d4a
[Local] Do not introduce a new `llvm.trap` before `unreachable`
This is the second attempt to remove the `llvm.trap` insertion after https://reviews.llvm.org/rGe14e7bc4b889dfaffb7180d176a03311df2d4ae6 reverted the first one. It is not clear what the exact issue was back then and it might already be gone by now, it has been >5 years after all.
Replaces D106299.
Differential Revision: https://reviews.llvm.org/D106308
show more ...
|
Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1 |
|
#
6b9524a0 |
| 06-May-2021 |
Arthur Eubanks <aeubanks@google.com> |
[NewPM] Don't mark AA analyses as preserved
Currently all AA analyses marked as preserved are stateless, not taking into account their dependent analyses. So there's no need to mark them as preserve
[NewPM] Don't mark AA analyses as preserved
Currently all AA analyses marked as preserved are stateless, not taking into account their dependent analyses. So there's no need to mark them as preserved, they won't be invalidated unless their analyses are.
SCEVAAResults was the one exception to this, it was treated like a typical analysis result. Make it like the others and don't invalidate unless SCEV is invalidated.
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D102032
show more ...
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2 |
|
#
be23012d |
| 07-Feb-2021 |
Kazu Hirata <kazu@google.com> |
[Transforms/Utils] Use range-based for loops (NFC)
|
Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2 |
|
#
e53472de |
| 21-Jan-2021 |
Kazu Hirata <kazu@google.com> |
[Transforms] Use llvm::append_range (NFC)
|
Revision tags: llvmorg-11.1.0-rc1 |
|
#
c043f505 |
| 19-Dec-2020 |
Roman Lebedev <lebedev.ri@gmail.com> |
[SimplifyCFG] Teach FoldBranchToCommonDest() to preserve DomTree, part 1
... for conditional branch case
|
Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
#
1da60f1d |
| 17-Nov-2020 |
Kazu Hirata <kazu@google.com> |
[Transforms] Use pred_empty (NFC)
|
#
70a495c7 |
| 30-Oct-2020 |
Pedro Tammela <pctammela@gmail.com> |
[NFC][LoopSimplify] modernize for loops over LoopInfo
This patch modifies two for loops to use the range based syntax. Since they are equivalent, this patch is tagged NFC.
Differential Revision: ht
[NFC][LoopSimplify] modernize for loops over LoopInfo
This patch modifies two for loops to use the range based syntax. Since they are equivalent, this patch is tagged NFC.
Differential Revision: https://reviews.llvm.org/D90069
show more ...
|
Revision tags: 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 |
|
#
44ab60f7 |
| 20-Jul-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
[LoopSimplify] Use SmallPtrSet and range for loops more. NFCI.
|
Revision tags: llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1 |
|
#
76c5cb05 |
| 18-May-2020 |
Nicolai Hähnle <nicolai.haehnle@amd.com> |
DomTree: Remove getChildren() accessor
Summary: Avoid exposing details about how children are stored. This will enable subsequent type-erasure changes.
New methods are introduced to cover common ac
DomTree: Remove getChildren() accessor
Summary: Avoid exposing details about how children are stored. This will enable subsequent type-erasure changes.
New methods are introduced to cover common access patterns.
Change-Id: Idb5f4b1b9c84e4cc71ddb39bb52a388682f5674f
Reviewers: arsenm, RKSimon, mehdi_amini, courbet
Subscribers: qcolombet, sdardis, wdng, hiraditya, jrtc27, zzheng, atanasyan, asbirlea, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83083
show more ...
|
#
2e5940cf |
| 04-Jun-2020 |
serge-sans-paille <sguelton@redhat.com> |
Correctly report modified status for LoopSimplify
Differential Revision: https://reviews.llvm.org/D81235
|
#
6c848843 |
| 19-May-2020 |
Sameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com> |
[LoopSimplify] don't separate nested loops with convergent calls
Summary: When a loop has multiple backedges, loop simplification attempts to separate them out into nested loops. This results in inc
[LoopSimplify] don't separate nested loops with convergent calls
Summary: When a loop has multiple backedges, loop simplification attempts to separate them out into nested loops. This results in incorrect control flow in the presence of some functions like a GPU barrier. This change skips the transformation when such "convergent" function calls are present in the loop body.
Reviewed By: nhaehnle
Differential Revision: https://reviews.llvm.org/D80078
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
05da2fe5 |
| 13-Nov-2019 |
Reid Kleckner <rnk@google.com> |
Sink all InitializePasses.h includes
This file lists every pass in LLVM, and is included by Pass.h, which is very popular. Every time we add, remove, or rename a pass in LLVM, it caused lots of reco
Sink all InitializePasses.h includes
This file lists every pass in LLVM, and is included by Pass.h, which is very popular. Every time we add, remove, or rename a pass in LLVM, it caused lots of recompilation.
I found this fact by looking at this table, which is sorted by the number of times a file was changed over the last 100,000 git commits multiplied by the number of object files that depend on it in the current checkout: recompiles touches affected_files header 342380 95 3604 llvm/include/llvm/ADT/STLExtras.h 314730 234 1345 llvm/include/llvm/InitializePasses.h 307036 118 2602 llvm/include/llvm/ADT/APInt.h 213049 59 3611 llvm/include/llvm/Support/MathExtras.h 170422 47 3626 llvm/include/llvm/Support/Compiler.h 162225 45 3605 llvm/include/llvm/ADT/Optional.h 158319 63 2513 llvm/include/llvm/ADT/Triple.h 140322 39 3598 llvm/include/llvm/ADT/StringRef.h 137647 59 2333 llvm/include/llvm/Support/Error.h 131619 73 1803 llvm/include/llvm/Support/FileSystem.h
Before this change, touching InitializePasses.h would cause 1345 files to recompile. After this change, touching it only causes 550 compiles in an incremental rebuild.
Reviewers: bkramer, asbirlea, bollu, jdoerfert
Differential Revision: https://reviews.llvm.org/D70211
show more ...
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3 |
|
#
0eaee545 |
| 15-Aug-2019 |
Jonas Devlieghere <jonas@devlieghere.com> |
[llvm] Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of
[llvm] Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo.
llvm-svn: 369013
show more ...
|
Revision tags: llvmorg-9.0.0-rc2 |
|
#
172838df |
| 01-Aug-2019 |
Alina Sbirlea <asbirlea@google.com> |
[MemorySSA] Set LoopSimplify to preserve MemorySSA in the NPM, if analysis exists.
Summary: LoopSimplify is preserved in the legacy pass manager, but not in the new pass manager. Update LoopSimplify
[MemorySSA] Set LoopSimplify to preserve MemorySSA in the NPM, if analysis exists.
Summary: LoopSimplify is preserved in the legacy pass manager, but not in the new pass manager. Update LoopSimplify to preserve MemorySSA conditionally when the analysis is available (same behavior as the legacy pass manager).
Reviewers: chandlerc
Subscribers: mehdi_amini, jlebar, Prazek, george.burgess.iv, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65418
llvm-svn: 367594
show more ...
|
Revision tags: llvmorg-9.0.0-rc1, llvmorg-10-init |
|
#
db101864 |
| 12-Jul-2019 |
Alina Sbirlea <asbirlea@google.com> |
[MemorySSA] Use SetVector to avoid nondeterminism.
Summary: Use a SetVector for DeadBlockSet. Resolves PR42574.
Reviewers: george.burgess.iv, uabelho, dblaikie
Subscribers: jlebar, Prazek, mgrang,
[MemorySSA] Use SetVector to avoid nondeterminism.
Summary: Use a SetVector for DeadBlockSet. Resolves PR42574.
Reviewers: george.burgess.iv, uabelho, dblaikie
Subscribers: jlebar, Prazek, mgrang, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64601
llvm-svn: 365970
show more ...
|
Revision tags: llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1 |
|
#
80c6e796 |
| 14-May-2019 |
Alina Sbirlea <asbirlea@google.com> |
[MemorySSA] LoopSimplify preserves MemorySSA only when flag is flipped.
LoopSimplify can preserve MemorySSA after r360270. But the MemorySSA analysis is retrieved and preserved only when the EnableM
[MemorySSA] LoopSimplify preserves MemorySSA only when flag is flipped.
LoopSimplify can preserve MemorySSA after r360270. But the MemorySSA analysis is retrieved and preserved only when the EnableMSSALoopDependency is set to true. Use the same conditional to mark the pass as preserved, otherwise subsequent passes will get an invalid analysis. Resolves PR41853.
llvm-svn: 360697
show more ...
|