#
a6d2a8d6 |
| 06-Apr-2021 |
Philip Reames <listmail@philipreames.com> |
Add a subclass of IntrinsicInst for llvm.assume [nfc]
Add the subclass, update a few places which check for the intrinsic to use idiomatic dyn_cast, and update the public interface of AssumptionCach
Add a subclass of IntrinsicInst for llvm.assume [nfc]
Add the subclass, update a few places which check for the intrinsic to use idiomatic dyn_cast, and update the public interface of AssumptionCache to use the new class. A follow up change will do the same for the newer assumption query/bundle mechanisms.
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 |
|
#
22ebbc47 |
| 05-Feb-2021 |
Sidharth Baveja <sidharth.baveja@ibm.com> |
LoopUnrollAndJam] Only allow loops with single exit(ing) blocks
Summary: This resolves an issue posted on Bugzilla. https://bugs.llvm.org/show_bug.cgi?id=48764 In this issue, the loop had multiple
LoopUnrollAndJam] Only allow loops with single exit(ing) blocks
Summary: This resolves an issue posted on Bugzilla. https://bugs.llvm.org/show_bug.cgi?id=48764 In this issue, the loop had multiple exit blocks, which resulted in the function getExitBlock to return a nullptr, which resulted in hitting the assert. This patch ensures that loops which only have one exit block as allowed to be unrolled and jammed.
Reviewed By: Whitney, Meinersbur, dmgreen
Differential Revision: https://reviews.llvm.org/D95806
show more ...
|
Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init |
|
#
1238378f |
| 23-Jan-2021 |
Kazu Hirata <kazu@google.com> |
[llvm] Use pop_back_val (NFC)
|
Revision tags: llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, 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 |
|
#
aa994d98 |
| 11-Aug-2020 |
Whitney Tsang <whitneyt@ca.ibm.com> |
[NFC][LoopUnrollAndJam] Use BasicBlock::replacePhiUsesWith instead of static function updatePHIBlocks.
Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D85673
|
Revision tags: llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
#
15b6730f |
| 28-May-2020 |
Sidharth Baveja <Sidharth.Baveja@ibm.com> |
Create utility function to Merge Adjacent Basic Blocks
Summary: The following code from /llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp can be used by other transformations:
while (!MergeBlocks.emp
Create utility function to Merge Adjacent Basic Blocks
Summary: The following code from /llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp can be used by other transformations:
while (!MergeBlocks.empty()) { BasicBlock *BB = *MergeBlocks.begin(); BranchInst *Term = dyn_cast<BranchInst>(BB->getTerminator()); if (Term && Term->isUnconditional() && L->contains(Term->getSuccessor(0))) { BasicBlock *Dest = Term->getSuccessor(0); BasicBlock *Fold = Dest->getUniquePredecessor(); if (MergeBlockIntoPredecessor(Dest, &DTU, LI)) { // Don't remove BB and add Fold as they are the same BB assert(Fold == BB); (void)Fold; MergeBlocks.erase(Dest); } else MergeBlocks.erase(BB); } else MergeBlocks.erase(BB); } Hence it should be separated into its own utility function.
Authored By: sidbav Reviewer: Whitney, Meinersbur, asbirlea, dmgreen, etiotto Reviewed By: asbirlea Subscribers: hiraditya, zzheng, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D80583
show more ...
|
#
70d4a202 |
| 27-May-2020 |
David Green <david.green@arm.com> |
[UnJ] Update LI for inner nested loops
This makes sure to correctly register the loop info of the children of unroll and jammed loops. It re-uses some code from the unroller for registering subloops
[UnJ] Update LI for inner nested loops
This makes sure to correctly register the loop info of the children of unroll and jammed loops. It re-uses some code from the unroller for registering subloops.
Differential Revision: https://reviews.llvm.org/D80619
show more ...
|
Revision tags: llvmorg-10.0.1-rc1 |
|
#
0a52401a |
| 06-May-2020 |
Whitney Tsang <whitneyt@ca.ibm.com> |
[LoopUnrollAndJam] Changed safety checks to consider more than 2-levels loop nest.
Summary: As discussed in https://reviews.llvm.org/D73129.
Example Before unroll and jam:
for A for B
[LoopUnrollAndJam] Changed safety checks to consider more than 2-levels loop nest.
Summary: As discussed in https://reviews.llvm.org/D73129.
Example Before unroll and jam:
for A for B for C D E After unroll and jam (currently):
for A A' for B for C D B' for C' D' E E' After unroll and jam (Ideal):
for A A' for B B' for C C' D D' E E' This is the first patch to change unroll and jam to work in the ideal way. This patch change the safety checks needed to make sure is safe to unroll and jam in the ideal way.
Reviewer: dmgreen, jdoerfert, Meinersbur, kbarton, bmahjour, etiotto Reviewed By: Meinersbur Subscribers: fhahn, hiraditya, zzheng, llvm-commits, anhtuyen, prithayan Tag: LLVM Differential Revision: https://reviews.llvm.org/D76132
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 |
|
#
0789f280 |
| 25-Feb-2020 |
Roman Lebedev <lebedev.ri@gmail.com> |
[NFC][SCEV] Piping to pass TTI into SCEVExpander::isHighCostExpansionHelper()
Summary: Future patches will make use of TTI to perform cost-model-driven `SCEVExpander::isHighCostExpansionHelper()` Th
[NFC][SCEV] Piping to pass TTI into SCEVExpander::isHighCostExpansionHelper()
Summary: Future patches will make use of TTI to perform cost-model-driven `SCEVExpander::isHighCostExpansionHelper()` This is a fully NFC patch to make things reviewable.
Reviewers: reames, mkazantsev, wmi, sanjoy
Reviewed By: mkazantsev
Subscribers: hiraditya, zzheng, javed.absar, dmgreen, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73704
show more ...
|
Revision tags: llvmorg-10.0.0-rc2 |
|
#
a5b6480d |
| 12-Feb-2020 |
Anh Tuyen Tran <anhtuyen@ca.ibm.com> |
[NFC] Remove extra headers included in Loop Unroll and LoopUnrollAndJam files
Summary: This refactor patch removes some header files which are not needed and also add some to meet IWYU principles.
[NFC] Remove extra headers included in Loop Unroll and LoopUnrollAndJam files
Summary: This refactor patch removes some header files which are not needed and also add some to meet IWYU principles.
Reviewers: rnk (Reid Kleckner), Meinersbur (Michael Kruse), dmgreen (Dave Green)
Reviewed By: dmgreen (Dave Green), rnk (Reid Kleckner), Meinersbur (Michael Kruse)
Subscribers: dmgreen (Dave Green), Whitney (Whitney Tsang), hiraditya (Aditya Kumar), zzheng (Z. Zheng), llvm-commits, LLVM
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D73498
show more ...
|
Revision tags: llvmorg-10.0.0-rc1 |
|
#
cd0cff43 |
| 28-Jan-2020 |
Whitney Tsang <whitneyt@ca.ibm.com> |
[NFCI][LoopUnrollAndJam] Minor changes.
Summary: 1. Add assertions. 2. Verify more analyses. These changes are moved out of https://reviews.llvm.org/D73129 to simplify that review.
Reviewer: dmgree
[NFCI][LoopUnrollAndJam] Minor changes.
Summary: 1. Add assertions. 2. Verify more analyses. These changes are moved out of https://reviews.llvm.org/D73129 to simplify that review.
Reviewer: dmgreen, jdoerfert, Meinersbur, kbarton, bmahjour, etiotto Reviewed By: dmgreen Subscribers: fhahn, hiraditya, zzheng, llvm-commits, prithayan, anhtuyen Tag: LLVM Differential Revision: https://reviews.llvm.org/D73204
show more ...
|
#
2b335e9a |
| 23-Jan-2020 |
Whitney Tsang <whitneyt@ca.ibm.com> |
[LoopUnroll] Remove remapInstruction().
Summary: LoopUnroll can reuse the RemapInstruction() in ValueMapper, or remapInstructionsInBlocks() in CloneFunction, depending on the needs. There is no need
[LoopUnroll] Remove remapInstruction().
Summary: LoopUnroll can reuse the RemapInstruction() in ValueMapper, or remapInstructionsInBlocks() in CloneFunction, depending on the needs. There is no need to have its own version in LoopUnroll.
By calling RemapInstruction() without TypeMapper or Materializer and with Flags (RF_NoModuleLevelChanges | RF_IgnoreMissingLocals), it does the same as remapInstruction(). remapInstructionsInBlocks() calls RemapInstruction() exactly as described.
Looking at the history, I cannot find any obvious reason to have its own version. Reviewer: dmgreen, jdoerfert, Meinersbur, kbarton, bmahjour, etiotto, foad, aprantl Reviewed By: jdoerfert Subscribers: hiraditya, zzheng, llvm-commits, prithayan, anhtuyen Tag: LLVM Differential Revision: https://reviews.llvm.org/D73277
show more ...
|
Revision tags: llvmorg-11-init |
|
#
99f74a64 |
| 04-Jan-2020 |
Florian Hahn <flo@fhahn.com> |
[SCEV] Remove unused ScalarEvolutionExpander.h includes (NFC).
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
60cb193a |
| 03-Nov-2019 |
Dávid Bolvanský <david.bolvansky@gmail.com> |
[LoopUnrollAndJam] Fixed null check after dereferencing warning. NFCI.
|
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 |
|
#
f9cdb98f |
| 29-Aug-2019 |
Florian Hahn <flo@fhahn.com> |
[LoopUnrollAndJam] Use Lazy strategy for DTU.
We can also apply the earlier updates to the lazy DTU, instead of applying them directly.
Reviewers: kuhar, brzycki, asbirlea, SjoerdMeijer
Reviewed B
[LoopUnrollAndJam] Use Lazy strategy for DTU.
We can also apply the earlier updates to the lazy DTU, instead of applying them directly.
Reviewers: kuhar, brzycki, asbirlea, SjoerdMeijer
Reviewed By: brzycki, asbirlea, SjoerdMeijer
Differential Revision: https://reviews.llvm.org/D66918
llvm-svn: 370391
show more ...
|
Revision tags: llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2 |
|
#
bfceed49 |
| 04-Jun-2019 |
Alina Sbirlea <asbirlea@google.com> |
[Utils] Clean another duplicated util method.
Summary: Following the cleanup in D48202, method foldBlockIntoPredecessor has the same behavior. Replace its uses with MergeBlockIntoPredecessor. Remove
[Utils] Clean another duplicated util method.
Summary: Following the cleanup in D48202, method foldBlockIntoPredecessor has the same behavior. Replace its uses with MergeBlockIntoPredecessor. Remove foldBlockIntoPredecessor.
Reviewers: chandlerc, dmgreen
Subscribers: jlebar, javed.absar, zzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62751
llvm-svn: 362538
show more ...
|
Revision tags: llvmorg-8.0.1-rc1 |
|
#
2312a06c |
| 12-Apr-2019 |
Alina Sbirlea <asbirlea@google.com> |
[SCEV] Add option to forget everything in SCEV.
Summary: Create a method to forget everything in SCEV. Add a cl::opt and PassManagerBuilder option to use this in LoopUnroll.
Motivation: Certain Hal
[SCEV] Add option to forget everything in SCEV.
Summary: Create a method to forget everything in SCEV. Add a cl::opt and PassManagerBuilder option to use this in LoopUnroll.
Motivation: Certain Halide applications spend a very long time compiling in forgetLoop, and prefer to forget everything and rebuild SCEV from scratch. Sample difference in compile time reduction: 21.04 to 14.78 using current ToT release build. Testcase showcasing this cannot be opensourced and is fairly large.
The option disabled by default, but it may be desirable to enable by default. Evidence in favor (two difference runs on different days/ToT state):
File Before (s) After (s) clang-9.bc 7267.91 6639.14 llvm-as.bc 194.12 194.12 llvm-dis.bc 62.50 62.50 opt.bc 1855.85 1857.53
File Before (s) After (s) clang-9.bc 8588.70 7812.83 llvm-as.bc 196.20 194.78 llvm-dis.bc 61.55 61.97 opt.bc 1739.78 1886.26
Reviewers: sanjoy
Subscribers: mehdi_amini, jlebar, zzheng, javed.absar, dmgreen, jdoerfert, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60144
llvm-svn: 358304
show more ...
|
Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2 |
|
#
ec026302 |
| 24-Jan-2019 |
Mircea Trofin <mtrofin@google.com> |
[llvm] Clarify responsiblity of some of DILocation discriminator APIs
Summary: Renamed setBaseDiscriminator to cloneWithBaseDiscriminator, to match similar APIs. Also changed its behavior to copy ov
[llvm] Clarify responsiblity of some of DILocation discriminator APIs
Summary: Renamed setBaseDiscriminator to cloneWithBaseDiscriminator, to match similar APIs. Also changed its behavior to copy over the other discriminator components, instead of eliding them.
Renamed cloneWithDuplicationFactor to cloneByMultiplyingDuplicationFactor, which more closely matches what this API does.
Reviewers: dblaikie, wmi
Reviewed By: dblaikie
Subscribers: zzheng, llvm-commits
Differential Revision: https://reviews.llvm.org/D56220
llvm-svn: 351996
show more ...
|
Revision tags: llvmorg-8.0.0-rc1 |
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
#
b53eeb6f |
| 21-Dec-2018 |
Mircea Trofin <mtrofin@google.com> |
[llvm] API for encoding/decoding DWARF discriminators.
Summary: Added a pair of APIs for encoding/decoding the 3 components of a DWARF discriminator described in http://lists.llvm.org/pipermail/llvm
[llvm] API for encoding/decoding DWARF discriminators.
Summary: Added a pair of APIs for encoding/decoding the 3 components of a DWARF discriminator described in http://lists.llvm.org/pipermail/llvm-dev/2016-October/106532.html: the base discriminator, the duplication factor (useful in profile-guided optimization) and the copy index (used to identify copies of code in cases like loop unrolling)
The encoding packs 3 unsigned values in 32 bits. This CL addresses 2 issues: - communicates overflow back to the user - supports encoding all 3 components together. Current APIs assume a sequencing of events. For example, creating a new discriminator based on an existing one by changing the base discriminator was not supported.
Reviewers: davidxl, danielcdh, wmi, dblaikie
Reviewed By: dblaikie
Subscribers: zzheng, dmgreen, aprantl, JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D55681
llvm-svn: 349973
show more ...
|
#
72448525 |
| 12-Dec-2018 |
Michael Kruse <llvm@meinersbur.de> |
[Unroll/UnrollAndJam/Vectorizer/Distribute] Add followup loop attributes.
When multiple loop transformation are defined in a loop's metadata, their order of execution is defined by the order of thei
[Unroll/UnrollAndJam/Vectorizer/Distribute] Add followup loop attributes.
When multiple loop transformation are defined in a loop's metadata, their order of execution is defined by the order of their respective passes in the pass pipeline. For instance, e.g.
#pragma clang loop unroll_and_jam(enable) #pragma clang loop distribute(enable)
is the same as
#pragma clang loop distribute(enable) #pragma clang loop unroll_and_jam(enable)
and will try to loop-distribute before Unroll-And-Jam because the LoopDistribute pass is scheduled after UnrollAndJam pass. UnrollAndJamPass only supports one inner loop, i.e. it will necessarily fail after loop distribution. It is not possible to specify another execution order. Also,t the order of passes in the pipeline is subject to change between versions of LLVM, optimization options and which pass manager is used.
This patch adds 'followup' attributes to various loop transformation passes. These attributes define which attributes the resulting loop of a transformation should have. For instance,
!0 = !{!0, !1, !2} !1 = !{!"llvm.loop.unroll_and_jam.enable"} !2 = !{!"llvm.loop.unroll_and_jam.followup_inner", !3} !3 = !{!"llvm.loop.distribute.enable"}
defines a loop ID (!0) to be unrolled-and-jammed (!1) and then the attribute !3 to be added to the jammed inner loop, which contains the instruction to distribute the inner loop.
Currently, in both pass managers, pass execution is in a fixed order and UnrollAndJamPass will not execute again after LoopDistribute. We hope to fix this in the future by allowing pass managers to run passes until a fixpoint is reached, use Polly to perform these transformations, or add a loop transformation pass which takes the order issue into account.
For mandatory/forced transformations (e.g. by having been declared by #pragma omp simd), the user must be notified when a transformation could not be performed. It is not possible that the responsible pass emits such a warning because the transformation might be 'hidden' in a followup attribute when it is executed, or it is not present in the pipeline at all. For this reason, this patche introduces a WarnMissedTransformations pass, to warn about orphaned transformations.
Since this changes the user-visible diagnostic message when a transformation is applied, two test cases in the clang repository need to be updated.
To ensure that no other transformation is executed before the intended one, the attribute `llvm.loop.disable_nonforced` can be added which should disable transformation heuristics before the intended transformation is applied. E.g. it would be surprising if a loop is distributed before a #pragma unroll_and_jam is applied.
With more supported code transformations (loop fusion, interchange, stripmining, offloading, etc.), transformations can be used as building blocks for more complex transformations (e.g. stripmining+stripmining+interchange -> tiling).
Reviewed By: hfinkel, dmgreen
Differential Revision: https://reviews.llvm.org/D49281 Differential Revision: https://reviews.llvm.org/D55288
llvm-svn: 348944
show more ...
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1 |
|
#
9c90ec2f |
| 16-Oct-2018 |
Max Kazantsev <max.kazantsev@azul.com> |
[NFC] Make LoopSafetyInfo abstract to allow alternative implementations
llvm-svn: 344592
|
#
edb12a83 |
| 15-Oct-2018 |
Chandler Carruth <chandlerc@gmail.com> |
[TI removal] Make variables declared as `TerminatorInst` and initialized by `getTerminator()` calls instead be declared as `Instruction`.
This is the biggest remaining chunk of the usage of `getTerm
[TI removal] Make variables declared as `TerminatorInst` and initialized by `getTerminator()` calls instead be declared as `Instruction`.
This is the biggest remaining chunk of the usage of `getTerminator()` that insists on the narrow type and so is an easy batch of updates. Several files saw more extensive updates where this would cascade to requiring API updates within the file to use `Instruction` instead of `TerminatorInst`. All of these were trivial in nature (pervasively using `Instruction` instead just worked).
llvm-svn: 344502
show more ...
|
Revision tags: llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2 |
|
#
6cb64787 |
| 15-Aug-2018 |
David Green <david.green@arm.com> |
[UnJ] Rename hasInvariantIterationCount to hasIterationCountInvariantInParent NFC
This hopefully describes the API of the function more precisely.
llvm-svn: 339762
|
#
530b8d1c |
| 15-Aug-2018 |
Max Kazantsev <max.kazantsev@azul.com> |
[NFC] Refactoring of LoopSafetyInfo, step 1
Turn structure into class, encapsulate methods, add clarifying comments.
Differential Revision: https://reviews.llvm.org/D50693 Reviewed By: reames
llvm
[NFC] Refactoring of LoopSafetyInfo, step 1
Turn structure into class, encapsulate methods, add clarifying comments.
Differential Revision: https://reviews.llvm.org/D50693 Reviewed By: reames
llvm-svn: 339752
show more ...
|
#
395b80cd |
| 11-Aug-2018 |
David Green <david.green@arm.com> |
[UnJ] Create a hasInvariantIterationCount function. NFC
Pulled out a separate function for some code that calculates if an inner loop iteration count is invariant to it's outer loop.
Differential R
[UnJ] Create a hasInvariantIterationCount function. NFC
Pulled out a separate function for some code that calculates if an inner loop iteration count is invariant to it's outer loop.
Differential Revision: https://reviews.llvm.org/D50063
llvm-svn: 339500
show more ...
|