#
5f8f34e4 |
| 01-May-2018 |
Adrian Prantl <aprantl@apple.com> |
Remove \brief commands from doxygen comments.
We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they ar
Remove \brief commands from doxygen comments.
We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all.
Patch produced by
for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done
Differential Revision: https://reviews.llvm.org/D46290
llvm-svn: 331272
show more ...
|
Revision tags: llvmorg-6.0.1-rc1 |
|
#
23c2182c |
| 09-Apr-2018 |
Simon Pilgrim <llvm-dev@redking.me.uk> |
Support generic expansion of ordered vector reduction (PR36732)
Without the fast math flags, the llvm.experimental.vector.reduce.fadd/fmul intrinsic expansions must be expanded in order.
This patch
Support generic expansion of ordered vector reduction (PR36732)
Without the fast math flags, the llvm.experimental.vector.reduce.fadd/fmul intrinsic expansions must be expanded in order.
This patch scalarizes the reduction, applying the accumulator at the start of the sequence: ((((Acc + Scl[0]) + Scl[1]) + Scl[2]) + ) ... + Scl[NumElts-1]
Differential Revision: https://reviews.llvm.org/D45366
llvm-svn: 329585
show more ...
|
#
a74f4ae4 |
| 06-Apr-2018 |
Simon Pilgrim <llvm-dev@redking.me.uk> |
Strip trailing whitespace. NFCI.
llvm-svn: 329421
|
Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2 |
|
#
23aed5ef |
| 20-Mar-2018 |
Philip Reames <listmail@philipreames.com> |
[MustExecute] Move isGuaranteedToExecute and related rourtines to Analysis
Next step is to actually merge the implementations and get both implementations tested through the new printer.
llvm-svn:
[MustExecute] Move isGuaranteedToExecute and related rourtines to Analysis
Next step is to actually merge the implementations and get both implementations tested through the new printer.
llvm-svn: 328055
show more ...
|
Revision tags: llvmorg-5.0.2-rc1 |
|
#
8a106272 |
| 16-Mar-2018 |
Philip Reames <listmail@philipreames.com> |
[LICM/mustexec] Extend first iteration must execute logic to fcmps
This builds on the work from https://reviews.llvm.org/D44287. It turned out supporting fcmp was much easier than I realized, so let
[LICM/mustexec] Extend first iteration must execute logic to fcmps
This builds on the work from https://reviews.llvm.org/D44287. It turned out supporting fcmp was much easier than I realized, so let's do that now.
As an aside, our -O3 handling of a floating point IVs leaves a lot to be desired. We do convert the float IV to an integer IV, but do so late enough that many other optimizations are missed (e.g. we don't vectorize).
Differential Revision: https://reviews.llvm.org/D44542
llvm-svn: 327722
show more ...
|
#
a21d5f1e |
| 15-Mar-2018 |
Philip Reames <listmail@philipreames.com> |
[LICM] Ignore exits provably not taken on first iteration when computing must execute
It is common to have conditional exits within a loop which are known not to be taken on some iterations, but not
[LICM] Ignore exits provably not taken on first iteration when computing must execute
It is common to have conditional exits within a loop which are known not to be taken on some iterations, but not necessarily all. This patches extends our reasoning around guaranteed to execute (used when establishing whether it's safe to dereference a location from the preheader) to handle the case where an exit is known not to be taken on the first iteration and the instruction of interest *is* known to be taken on the first iteration.
This case comes up in two major ways: * If we have a range check which we've been unable to eliminate, we frequently know that it doesn't fail on the first iteration. * Pass ordering. We may have a check which will be eliminated through some sequence of other passes, but depending on the exact pass sequence we might never actually do so or we might miss other optimizations from passes run before the check is finally eliminated.
The initial version (here) is implemented via InstSimplify. At the moment, it catches a few cases, but misses a lot too. I added test cases for missing cases in InstSimplify which I'll follow up on separately. Longer term, we should probably wire SCEV through to here to get much smarter loop aware simplification of the first iteration predicate.
Differential Revision: https://reviews.llvm.org/D44287
llvm-svn: 327664
show more ...
|
#
fbffd126 |
| 08-Mar-2018 |
Philip Reames <listmail@philipreames.com> |
[NFC] Factor out a helper function for checking if a block has a potential early implicit exit.
llvm-svn: 327065
|
Revision tags: llvmorg-6.0.0, llvmorg-6.0.0-rc3 |
|
#
0d5f9651 |
| 14-Feb-2018 |
David Green <david.green@arm.com> |
Move llvm::computeLoopSafetyInfo from LICM.cpp to LoopUtils.cpp. NFC
Move computeLoopSafetyInfo, defined in Transforms/Utils/LoopUtils.h, into the corresponding LoopUtils.cpp, as opposed to LICM whe
Move llvm::computeLoopSafetyInfo from LICM.cpp to LoopUtils.cpp. NFC
Move computeLoopSafetyInfo, defined in Transforms/Utils/LoopUtils.h, into the corresponding LoopUtils.cpp, as opposed to LICM where it resides at the moment. This will allow other functions from Transforms/Utils to reference it.
llvm-svn: 325151
show more ...
|
Revision tags: llvmorg-6.0.0-rc2 |
|
#
a097bc69 |
| 04-Feb-2018 |
Chad Rosier <mcrosier@codeaurora.org> |
[LV] Use Demanded Bits and ValueTracking for reduction type-shrinking
The type-shrinking logic in reduction detection, although narrow in scope, is also rather ad-hoc, which has led to bugs (e.g., P
[LV] Use Demanded Bits and ValueTracking for reduction type-shrinking
The type-shrinking logic in reduction detection, although narrow in scope, is also rather ad-hoc, which has led to bugs (e.g., PR35734). This patch modifies the approach to rely on the demanded bits and value tracking analyses, if available. We currently perform type-shrinking separately for reductions and other instructions in the loop. Long-term, we should probably think about computing minimal bit widths in a more complete way for the loops we want to vectorize.
PR35734 Differential Revision: https://reviews.llvm.org/D42309
llvm-svn: 324195
show more ...
|
#
d24ddcd6 |
| 19-Jan-2018 |
Hiroshi Inoue <inouehrs@jp.ibm.com> |
[NFC] fix trivial typos in comments
"the the" -> "the"
llvm-svn: 322934
|
Revision tags: llvmorg-6.0.0-rc1 |
|
#
a757d65c |
| 12-Jan-2018 |
Serguei Katkov <serguei.katkov@azul.com> |
[LoopDeletion] Handle users in unreachable block
This is a fix for PR35884.
When we want to delete dead loop we must clean uses in unreachable blocks otherwise we'll get an assert during deletion o
[LoopDeletion] Handle users in unreachable block
This is a fix for PR35884.
When we want to delete dead loop we must clean uses in unreachable blocks otherwise we'll get an assert during deletion of instructions from the loop.
Reviewers: anna, davide Reviewed By: anna Subscribers: llvm-commits, lebedev.ri Differential Revision: https://reviews.llvm.org/D41943
llvm-svn: 322357
show more ...
|
#
c7fc81e6 |
| 30-Dec-2017 |
Benjamin Kramer <benny.kra@googlemail.com> |
Use phi ranges to simplify code. No functionality change intended.
llvm-svn: 321585
|
#
802e6255 |
| 24-Dec-2017 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make helpers static. No functionality change.
llvm-svn: 321425
|
#
4750c785 |
| 14-Dec-2017 |
Dorit Nuzman <dorit.nuzman@intel.com> |
[LV] Support efficient vectorization of an induction with redundant casts
D30041 extended SCEVPredicateRewriter to improve handling of Phi nodes whose update chain involves casts; PSCEV can now buil
[LV] Support efficient vectorization of an induction with redundant casts
D30041 extended SCEVPredicateRewriter to improve handling of Phi nodes whose update chain involves casts; PSCEV can now build an AddRecurrence for some forms of such phi nodes, under the proper runtime overflow test. This means that we can identify such phi nodes as an induction, and the loop-vectorizer can now vectorize such inductions, however inefficiently. The vectorizer doesn't know that it can ignore the casts, and so it vectorizes them.
This patch records the casts in the InductionDescriptor, so that they could be marked to be ignored for cost calculation (we use VecValuesToIgnore for that) and ignored for vectorization/widening/scalarization (i.e. treated as TriviallyDead).
In addition to marking all these casts to be ignored, we also need to make sure that each cast is mapped to the right vector value in the vector loop body (be it a widened, vectorized, or scalarized induction). So whenever an induction phi is mapped to a vector value (during vectorization/widening/ scalarization), we also map the respective cast instruction (if exists) to that vector value. (If the phi-update sequence of an induction involves more than one cast, then the above mapping to vector value is relevant only for the last cast of the sequence as we allow only the "last cast" to be used outside the induction update chain itself).
This is the last step in addressing PR30654.
llvm-svn: 320672
show more ...
|
Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3 |
|
#
3e069f57 |
| 06-Dec-2017 |
Sanjay Patel <spatel@rotateright.com> |
[LoopUtils] simplify createTargetReduction(); NFCI
llvm-svn: 319946
|
#
1ea7b6f7 |
| 06-Dec-2017 |
Sanjay Patel <spatel@rotateright.com> |
[LoopUtils] fix variable name to match FMF vocabulary; NFC
llvm-svn: 319928
|
Revision tags: llvmorg-5.0.1-rc2 |
|
#
629c4115 |
| 06-Nov-2017 |
Sanjay Patel <spatel@rotateright.com> |
[IR] redefine 'UnsafeAlgebra' / 'reassoc' fast-math-flags and add 'trans' fast-math-flag
As discussed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2016-November/107104.html and again more r
[IR] redefine 'UnsafeAlgebra' / 'reassoc' fast-math-flags and add 'trans' fast-math-flag
As discussed on llvm-dev: http://lists.llvm.org/pipermail/llvm-dev/2016-November/107104.html and again more recently: http://lists.llvm.org/pipermail/llvm-dev/2017-October/118118.html
...this is a step in cleaning up our fast-math-flags implementation in IR to better match the capabilities of both clang's user-visible flags and the backend's flags for SDNode.
As proposed in the above threads, we're replacing the 'UnsafeAlgebra' bit (which had the 'umbrella' meaning that all flags are set) with a new bit that only applies to algebraic reassociation - 'AllowReassoc'.
We're also adding a bit to allow approximations for library functions called 'ApproxFunc' (this was initially proposed as 'libm' or similar).
...and we're out of bits. 7 bits ought to be enough for anyone, right? :) FWIW, I did look at getting this out of SubclassOptionalData via SubclassData (spacious 16-bits), but that's apparently already used for other purposes. Also, I don't think we can just add a field to FPMathOperator because Operator is not intended to be instantiated. We'll defer movement of FMF to another day.
We keep the 'fast' keyword. I thought about removing that, but seeing IR like this: %f.fast = fadd reassoc nnan ninf nsz arcp contract afn float %op1, %op2 ...made me think we want to keep the shortcut synonym.
Finally, this change is binary incompatible with existing IR as seen in the compatibility tests. This statement: "Newer releases can ignore features from older releases, but they cannot miscompile them. For example, if nsw is ever replaced with something else, dropping it would be a valid way to upgrade the IR." ( http://llvm.org/docs/DeveloperPolicy.html#ir-backwards-compatibility ) ...provides the flexibility we want to make this change without requiring a new IR version. Ie, we're not loosening the FP strictness of existing IR. At worst, we will fail to optimize some previously 'fast' code because it's no longer recognized as 'fast'. This should get fixed as we audit/squash all of the uses of 'isFast()'.
Note: an inter-dependent clang commit to use the new API name should closely follow commit.
Differential Revision: https://reviews.llvm.org/D39304
llvm-svn: 317488
show more ...
|
Revision tags: llvmorg-5.0.1-rc1 |
|
#
899809d5 |
| 04-Oct-2017 |
Hans Wennborg <hans@hanshq.net> |
Fix a -Wparentheses warning. NFC.
llvm-svn: 314936
|
#
df3e71e0 |
| 04-Oct-2017 |
Marcello Maggioni <hayarms@gmail.com> |
[LoopDeletion] Move deleteDeadLoop to to LoopUtils. NFC
llvm-svn: 314934
|
#
7ed5856a |
| 15-Sep-2017 |
Alina Sbirlea <asbirlea@google.com> |
Refactor collectChildrenInLoop to LoopUtils [NFC]
Summary: Move to LoopUtils method that collects all children of a node inside a loop.
Reviewers: majnemer, sanjoy
Subscribers: llvm-commits
Diffe
Refactor collectChildrenInLoop to LoopUtils [NFC]
Summary: Move to LoopUtils method that collects all children of a node inside a loop.
Reviewers: majnemer, sanjoy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D37870
llvm-svn: 313322
show more ...
|
Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3 |
|
#
25e2800e |
| 15-Aug-2017 |
Ayal Zaks <ayal.zaks@intel.com> |
[LV] Minor savings to Sink casts to unravel first order recurrence
Two minor savings: avoid copying the SinkAfter map and avoid moving a cast if it is not needed.
Differential Revision: https://rev
[LV] Minor savings to Sink casts to unravel first order recurrence
Two minor savings: avoid copying the SinkAfter map and avoid moving a cast if it is not needed.
Differential Revision: https://reviews.llvm.org/D36408
llvm-svn: 310910
show more ...
|
Revision tags: llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1 |
|
#
a61f4b89 |
| 19-Jul-2017 |
Dinar Temirbulatov <dtemirbulatov@gmail.com> |
[LoopUtils] Add an extra parameter OpValue to propagateIRFlags function, If OpValue is non-null, we only consider operations similar to OpValue when intersecting.
Differential Revision: https://revi
[LoopUtils] Add an extra parameter OpValue to propagateIRFlags function, If OpValue is non-null, we only consider operations similar to OpValue when intersecting.
Differential Revision: https://reviews.llvm.org/D35292
llvm-svn: 308428
show more ...
|
#
2ff59d43 |
| 30-Jun-2017 |
Ayal Zaks <ayal.zaks@intel.com> |
[LV] Sink casts to unravel first order recurrence
Check if a single cast is preventing handling a first-order-recurrence Phi, because the scheduling constraints it imposes on the first-order-recurre
[LV] Sink casts to unravel first order recurrence
Check if a single cast is preventing handling a first-order-recurrence Phi, because the scheduling constraints it imposes on the first-order-recurrence shuffle are infeasible; but they can be made feasible by moving the cast downwards. Record such casts and move them when vectorizing the loop.
Differential Revision: https://reviews.llvm.org/D33058
llvm-svn: 306884
show more ...
|
#
4a000883 |
| 25-Jun-2017 |
Chandler Carruth <chandlerc@gmail.com> |
[LoopSimplify] Re-instate r306081 with a bug fix w.r.t. indirectbr.
This was reverted in r306252, but I already had the bug fixed and was just trying to form a test case.
The original commit factor
[LoopSimplify] Re-instate r306081 with a bug fix w.r.t. indirectbr.
This was reverted in r306252, but I already had the bug fixed and was just trying to form a test case.
The original commit factored the logic for forming dedicated exits inside of LoopSimplify into a helper that could be used elsewhere and with an approach that required fewer intermediate data structures. See that commit for full details including the change to the statistic, etc.
The code looked fine to me and my reviewers, but in fact didn't handle indirectbr correctly -- it left the 'InLoopPredecessors' vector dirty.
If you have code that looks *just* right, you can end up leaking these predecessors into a subsequent rewrite, and crash deep down when trying to update PHI nodes for predecessors that don't exist.
I've added an assert that makes the bug much more obvious, and then changed the code to reliably clear the vector so we don't get this bug again in some other form as the code changes.
I've also added a test case that *does* manage to catch this while also giving some nice positive coverage in the face of indirectbr.
The real code that found this came out of what I think is CPython's interpreter loop, but any code with really "creative" interpreter loops mixing indirectbr and other exit paths could manage to tickle the bug. I was hard to reduce the original test case because in addition to having a particular pattern of IR, the whole thing depends on the order of the predecessors which is in turn depends on use list order. The test case added here was designed so that in multiple different predecessor orderings it should always end up going down the same path and tripping the same bug. I hope. At least, it tripped it for me without manipulating the use list order which is better than anything bugpoint could do...
llvm-svn: 306257
show more ...
|
#
4c6cd4cc |
| 25-Jun-2017 |
Daniel Jasper <djasper@google.com> |
Revert "[LoopSimplify] Factor the logic to form dedicated exits into a utility."
This leads to a segfault. Chandler already has a test case and should be able to recommit with a fix soon.
llvm-svn:
Revert "[LoopSimplify] Factor the logic to form dedicated exits into a utility."
This leads to a segfault. Chandler already has a test case and should be able to recommit with a fix soon.
llvm-svn: 306252
show more ...
|