History log of /llvm-project/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp (Results 226 – 250 of 753)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# f34115c6 04-Sep-2018 Max Kazantsev <max.kazantsev@azul.com>

[NFC] Add assert to detect LCSSA breaches early

llvm-svn: 341347


# 2cbba563 04-Sep-2018 Max Kazantsev <max.kazantsev@azul.com>

[IndVars] Fix usage of SCEVExpander to not mess with SCEVConstant. PR38674

This patch removes the function `expandSCEVIfNeeded` which behaves not as
it was intended. This function tries to make a lo

[IndVars] Fix usage of SCEVExpander to not mess with SCEVConstant. PR38674

This patch removes the function `expandSCEVIfNeeded` which behaves not as
it was intended. This function tries to make a lookup for exact existing expansion
and only goes to normal expansion via `expandCodeFor` if this lookup hasn't found
anything. As a result of this, if some instruction above the loop has a `SCEVConstant`
SCEV, this logic will return this instruction when asked for this `SCEVConstant` rather
than return a constant value. This is both non-profitable and in some cases leads to
breach of LCSSA form (as in PR38674).

Whether or not it is possible to break LCSSA with this algorithm and with some
non-constant SCEVs is still in question, this is still being investigated. I wasn't
able to construct such a test so far, so maybe this situation is impossible. If it is,
it will go as a separate fix.

Rather than do it, it is always correct to just invoke `expandCodeFor` unconditionally:
it behaves smarter about insertion points, and as side effect of this it will choose a
constant value for SCEVConstants. For other SCEVs it may end up finding a better insertion
point. So it should not be worse in any case.

NOTE: So far the only known case for which this transform may break LCSSA is mapping
of SCEVConstant to an instruction. However there is a suspicion that the entire algorithm
can compromise LCSSA form for other cases as well (yet not proved).

Differential Revision: https://reviews.llvm.org/D51286
Reviewed By: etherzhhb

llvm-svn: 341345

show more ...


# 0c4b84e2 28-Aug-2018 Max Kazantsev <max.kazantsev@azul.com>

[NFC] A loop can never contain Ret instruction

llvm-svn: 340808


Revision tags: llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1, llvmorg-6.0.1, llvmorg-6.0.1-rc3
# 31b98d2e 04-Jun-2018 David Blaikie <dblaikie@gmail.com>

Move Analysis/Utils/Local.h back to Transforms

Review feedback from r328165. Split out just the one function from the
file that's used by Analysis. (As chandlerc pointed out, the original
change onl

Move Analysis/Utils/Local.h back to Transforms

Review feedback from r328165. Split out just the one function from the
file that's used by Analysis. (As chandlerc pointed out, the original
change only moved the header and not the implementation anyway - which
was fine for the one function that was used (since it's a
template/inlined in the header) but not in general)

llvm-svn: 333954

show more ...


Revision tags: llvmorg-6.0.1-rc2
# d34e60ca 14-May-2018 Nicola Zaghen <nicola.zaghen@imgtec.com>

Rename DEBUG macro to LLVM_DEBUG.

The DEBUG() macro is very generic so it might clash with other projects.
The renaming was done as follows:
- git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/

Rename DEBUG macro to LLVM_DEBUG.

The DEBUG() macro is very generic so it might clash with other projects.
The renaming was done as follows:
- git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g'
- git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM
- Manual change to APInt
- Manually chage DOCS as regex doesn't match it.

In the transition period the DEBUG() macro is still present and aliased
to the LLVM_DEBUG() one.

Differential Revision: https://reviews.llvm.org/D43624

llvm-svn: 332240

show more ...


Revision tags: llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2
# 2be39228 21-Mar-2018 David Blaikie <dblaikie@gmail.com>

Fix a couple of layering violations in Transforms

Remove #include of Transforms/Scalar.h from Transform/Utils to fix layering.

Transforms depends on Transforms/Utils, not the other way around. So
r

Fix a couple of layering violations in Transforms

Remove #include of Transforms/Scalar.h from Transform/Utils to fix layering.

Transforms depends on Transforms/Utils, not the other way around. So
remove the header and the "createStripGCRelocatesPass" function
declaration (& definition) that is unused and motivated this dependency.

Move Transforms/Utils/Local.h into Analysis because it's used by
Analysis/MemoryBuiltins.cpp.

llvm-svn: 328165

show more ...


Revision tags: llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1
# c7fc81e6 30-Dec-2017 Benjamin Kramer <benny.kra@googlemail.com>

Use phi ranges to simplify code. No functionality change intended.

llvm-svn: 321585


# 6af4f232 13-Dec-2017 Michael Zolotukhin <mzolotukhin@apple.com>

Remove redundant includes from lib/Transforms.

llvm-svn: 320628


Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2
# fbb6fbf7 02-Nov-2017 Adrian Prantl <aprantl@apple.com>

IndVarSimplify: preserve debug information attached to widened PHI nodes.

This fixes PR35015.

https://bugs.llvm.org/show_bug.cgi?id=35015

Differential Revision: https://reviews.llvm.org/D39345

ll

IndVarSimplify: preserve debug information attached to widened PHI nodes.

This fixes PR35015.

https://bugs.llvm.org/show_bug.cgi?id=35015

Differential Revision: https://reviews.llvm.org/D39345

llvm-svn: 317282

show more ...


Revision tags: llvmorg-5.0.1-rc1
# dd40f5e7 16-Oct-2017 Eugene Zelenko <eugene.zelenko@gmail.com>

[Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

llvm-svn: 315940


# d36f2030 12-Oct-2017 Hongbin Zheng <etherzhhb@gmail.com>

[SimplifyIndVar] Replace IVUsers with loop invariant whenever possible

Differential Revision: https://reviews.llvm.org/D38415

llvm-svn: 315551


Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3
# 38414b57 09-Jun-2017 Serguei Katkov <serguei.katkov@azul.com>

[IndVars] Add an option to be able to disable LFTR

This change adds an option disable-lftr to be able to disable Linear Function Test Replace optimization.
By default option is off so current behavi

[IndVars] Add an option to be able to disable LFTR

This change adds an option disable-lftr to be able to disable Linear Function Test Replace optimization.
By default option is off so current behavior is not changed.

Reviewers: reames, sanjoy, wmi, andreadb, apilipenko
Reviewed By: sanjoy
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D33979

llvm-svn: 305055

show more ...


# 55344aba 03-Jun-2017 Galina Kistanova <gkistanova@gmail.com>

Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.

llvm-svn: 304637


Revision tags: llvmorg-4.0.1-rc2
# e6bca0ee 01-May-2017 Sanjoy Das <sanjoy@playingwithpointers.com>

Rename WeakVH to WeakTrackingVH; NFC

This relands r301424.

llvm-svn: 301812


Revision tags: llvmorg-4.0.1-rc1
# 2cbeb00f 26-Apr-2017 Sanjoy Das <sanjoy@playingwithpointers.com>

Reverts commit r301424, r301425 and r301426

Commits were:

"Use WeakVH instead of WeakTrackingVH in AliasSetTracker's UnkownInsts"
"Add a new WeakVH value handle; NFC"
"Rename WeakVH to WeakTracking

Reverts commit r301424, r301425 and r301426

Commits were:

"Use WeakVH instead of WeakTrackingVH in AliasSetTracker's UnkownInsts"
"Add a new WeakVH value handle; NFC"
"Rename WeakVH to WeakTrackingVH; NFC"

The changes assumed pointers are 8 byte aligned on all architectures.

llvm-svn: 301429

show more ...


# 01de5577 26-Apr-2017 Sanjoy Das <sanjoy@playingwithpointers.com>

Rename WeakVH to WeakTrackingVH; NFC

Summary:
I plan to use WeakVH to mean "nulls itself out on deletion, but does
not track RAUW" in a subsequent commit.

Reviewers: dblaikie, davide

Reviewed By:

Rename WeakVH to WeakTrackingVH; NFC

Summary:
I plan to use WeakVH to mean "nulls itself out on deletion, but does
not track RAUW" in a subsequent commit.

Reviewers: dblaikie, davide

Reviewed By: davide

Subscribers: arsenm, mehdi_amini, mcrosier, mzolotukhin, jfb, llvm-commits, nhaehnle

Differential Revision: https://reviews.llvm.org/D32266

llvm-svn: 301424

show more ...


# 00b34996 20-Mar-2017 Simon Pilgrim <llvm-dev@redking.me.uk>

Use MutableArrayRef for APFloat::convertToInteger

As discussed on D31074, use MutableArrayRef for destination integer buffers to help assert before stack overflows happen.

llvm-svn: 298253


# 610ad9b5 20-Mar-2017 Simon Pilgrim <llvm-dev@redking.me.uk>

Strip trailing whitespace

llvm-svn: 298249


Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3
# 85cd1320 20-Feb-2017 Sanjoy Das <sanjoy@playingwithpointers.com>

[IndVars] Add an assert

We've already checked that the loop is in simplify form before, but a
little paranoia never hurt anyone.

llvm-svn: 295680


Revision tags: llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1
# ca68a3ec 15-Jan-2017 Chandler Carruth <chandlerc@gmail.com>

[PM] Introduce an analysis set used to preserve all analyses over
a function's CFG when that CFG is unchanged.

This allows transformation passes to simply claim they preserve the CFG
and analysis pa

[PM] Introduce an analysis set used to preserve all analyses over
a function's CFG when that CFG is unchanged.

This allows transformation passes to simply claim they preserve the CFG
and analysis passes to check for the CFG being preserved to remove the
fanout of all analyses being listed in all passes.

I've gone through and removed or cleaned up as many of the comments
reminding us to do this as I could.

Differential Revision: https://reviews.llvm.org/D28627

llvm-svn: 292054

show more ...


# 3bab7e1a 11-Jan-2017 Chandler Carruth <chandlerc@gmail.com>

[PM] Separate the LoopAnalysisManager from the LoopPassManager and move
the latter to the Transforms library.

While the loop PM uses an analysis to form the IR units, the current
plan is to have the

[PM] Separate the LoopAnalysisManager from the LoopPassManager and move
the latter to the Transforms library.

While the loop PM uses an analysis to form the IR units, the current
plan is to have the PM itself establish and enforce both loop simplified
form and LCSSA. This would be a layering violation in the analysis
library.

Fundamentally, the idea behind the loop PM is to *transform* loops in
addition to running passes over them, so it really seemed like the most
natural place to sink this was into the transforms library.

We can't just move *everything* because we also have loop analyses that
rely on a subset of the invariants. So this patch splits the the loop
infrastructure into the analysis management that has to be part of the
analysis library, and the transform-aware pass manager.

This also required splitting the loop analyses' printer passes out to
the transforms library, which makes sense to me as running these will
transform the code into LCSSA in theory.

I haven't split the unittest though because testing one component
without the other seems nearly intractable.

Differential Revision: https://reviews.llvm.org/D28452

llvm-svn: 291662

show more ...


# 410eaeb0 11-Jan-2017 Chandler Carruth <chandlerc@gmail.com>

[PM] Rewrite the loop pass manager to use a worklist and augmented run
arguments much like the CGSCC pass manager.

This is a major redesign following the pattern establish for the CGSCC layer to
sup

[PM] Rewrite the loop pass manager to use a worklist and augmented run
arguments much like the CGSCC pass manager.

This is a major redesign following the pattern establish for the CGSCC layer to
support updates to the set of loops during the traversal of the loop nest and
to support invalidation of analyses.

An additional significant burden in the loop PM is that so many passes require
access to a large number of function analyses. Manually ensuring these are
cached, available, and preserved has been a long-standing burden in LLVM even
with the help of the automatic scheduling in the old pass manager. And it made
the new pass manager extremely unweildy. With this design, we can package the
common analyses up while in a function pass and make them immediately available
to all the loop passes. While in some cases this is unnecessary, I think the
simplicity afforded is worth it.

This does not (yet) address loop simplified form or LCSSA form, but those are
the next things on my radar and I have a clear plan for them.

While the patch is very large, most of it is either mechanically updating loop
passes to the new API or the new testing for the loop PM. The code for it is
reasonably compact.

I have not yet updated all of the loop passes to correctly leverage the update
mechanisms demonstrated in the unittests. I'll do that in follow-up patches
along with improved FileCheck tests for those passes that ensure things work in
more realistic scenarios. In many cases, there isn't much we can do with these
until the loop simplified form and LCSSA form are in place.

Differential Revision: https://reviews.llvm.org/D28292

llvm-svn: 291651

show more ...


# 02b1397a 10-Jan-2017 Xin Tong <trent.xin.tong@gmail.com>

Fix a typo and also test a new machine for commit. NFC.

llvm-svn: 291532


# ee5cb65a 07-Jan-2017 Xin Tong <trent.xin.tong@gmail.com>

Fix a typo. NFC

llvm-svn: 291335


Revision tags: llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1
# 7d18a70d 20-Nov-2016 Simon Pilgrim <llvm-dev@redking.me.uk>

Fix spelling mistakes in Transforms comments. NFC.

Identified by Pedro Giffuni in PR27636.

llvm-svn: 287488


12345678910>>...31