History log of /llvm-project/llvm/lib/Analysis/ScalarEvolution.cpp (Results 751 – 775 of 2089)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2
# 5f620877 02-Dec-2019 Nicola Zaghen <nicola.zaghen@imgtec.com>

[DataLayout] Fix occurrences that size and range of pointers are assumed to be the same.

GEP index size can be specified in the DataLayout, introduced in D42123. However, there were still places
in

[DataLayout] Fix occurrences that size and range of pointers are assumed to be the same.

GEP index size can be specified in the DataLayout, introduced in D42123. However, there were still places
in which getIndexSizeInBits was used interchangeably with getPointerSizeInBits. This notably caused issues
with Instcombine's visitPtrToInt; but the unit tests was incorrect, so this remained undiscovered.

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

Patch by Joseph Faulls!

show more ...


# 9a20c79d 03-Dec-2019 Roman Lebedev <lebedev.ri@gmail.com>

[NFC][KnownBits] Add getMinValue() / getMaxValue() methods

As it can be seen from accompanying cleanup, it is not unheard of
to write `~Known.Zero` meaning "what maximal value can this KnownBits
pro

[NFC][KnownBits] Add getMinValue() / getMaxValue() methods

As it can be seen from accompanying cleanup, it is not unheard of
to write `~Known.Zero` meaning "what maximal value can this KnownBits
produce". But i think `~Known.Zero` isn't *that* self-explanatory,
as compared to a method with a name.

Note that not all `~Known.Zero` places were cleaned up,
only those where this arguably improves things.

show more ...


Revision tags: llvmorg-9.0.1-rc1
# 259ca041 19-Nov-2019 Daniil Suchkov <suc-daniil@yandex.ru>

[SCEV] Make SCEV verification available from command line with new PM

New pass manager doesn't use verifyAnalysis, so currently there is no
way to call SCEV verification from command line when new P

[SCEV] Make SCEV verification available from command line with new PM

New pass manager doesn't use verifyAnalysis, so currently there is no
way to call SCEV verification from command line when new PM is used.
This patch adds a pass that allows you to do that.

Reviewers: reames, fhahn, sanjoy.google, nikic

Reviewed By: fhahn

Subscribers: hiraditya, javed.absar, llvm-commits

Tags: #llvm

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

show more ...


# 70d173fb 21-Nov-2019 Philip Reames <listmail@philipreames.com>

[SCEV] Add a mode to skip classification when printing analysis

For the various trip-count tests, the classification isn't useful and makes the auto-generated tests super verbose. By skipping it, w

[SCEV] Add a mode to skip classification when printing analysis

For the various trip-count tests, the classification isn't useful and makes the auto-generated tests super verbose. By skipping it, we make the auto-gen tests closer to the manually written ones. Up next: auto-genning a bunch of the existings tests.

show more ...


# f1a9a832 21-Nov-2019 Philip Reames <listmail@philipreames.com>

[SCEV] Be robust against IR generated by simple-loop-unswitch

Simple loop unswitch likes to leave around unsimplified and/or/xors. SCEV today bails out on these idioms which is unfortunate in genera

[SCEV] Be robust against IR generated by simple-loop-unswitch

Simple loop unswitch likes to leave around unsimplified and/or/xors. SCEV today bails out on these idioms which is unfortunate in general, and specifically for the unswitch interaction.

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

show more ...


# 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 ...


# 9bfa5ab3 06-Nov-2019 Philip Reames <listmail@philipreames.com>

[LoopPred] Fix two subtle issues found by inspection

This patch fixes two issues noticed by inspection when going to enable the loop predication code in IndVarSimplify.

Issue 1 - Both the LoopPredi

[LoopPred] Fix two subtle issues found by inspection

This patch fixes two issues noticed by inspection when going to enable the loop predication code in IndVarSimplify.

Issue 1 - Both the LoopPredication transform, and the already on by default optimizeLoopExits transform, modify the exit count of the exits they modify. (either to 0 or Infinity) Looking at the code more closely, this was not reflected into SCEV and we were instead running later transforms with incorrect SCEVs. Fixing this requires forgetting the loop, weakening a too strong assert, and updating SCEV to not pessimize results when a loop is provable untaken. I haven't been able to find a test case to demonstrate the miscompile.

Issue 2 - For modules without a data layout, we can end up with unsized pointer typed exit counts. Just bail out of this case.

I think these are the last two issues which need addressed before we enable this by default. The code has already survived a decent amount of fuzzing without revealing either of the above.

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

show more ...


# decd8c48 03-Nov-2019 Dávid Bolvanský <david.bolvansky@gmail.com>

[SCEV] Fixed 'Uninitialized variable 'ContainsAddRec' used.' warning. NFCI.


# 34f68253 25-Oct-2019 Philip Reames <listmail@philipreames.com>

[SCEV] Expose and use maximum constant exit counts for individual loop exits

We were already going to all of the trouble of computing maximum constant exit counts for each loop exit, we might as wel

[SCEV] Expose and use maximum constant exit counts for individual loop exits

We were already going to all of the trouble of computing maximum constant exit counts for each loop exit, we might as well expose them through the API. The change in IndVars is mostly to demonstrate that the wired up code works, but it als very slightly strengthens the transform. The strengthened case is rather narrow though: it requires one exactly analyzeable exit, one imprecisely analyzeable exit (with the upper bound less than the precise one), and one unanalyzeable exit. I coudn't construct a reasonably stable test case.

This does increase the memory usage of the BackedgeTakenCount by a factor of 2 in the worst case.

I also noticed the loop in IndVars is O(#Exits ^ 2). This doesn't change with this patch. A future patch will cache this result inside of SCEV to avoid requering.

show more ...


# 0e8fc21c 25-Oct-2019 David Blaikie <dblaikie@gmail.com>

Fix Clang -Wcovered-switch-default warning by moving llvm_unreachable default to after the switch


# c27010ef 25-Oct-2019 Philip Reames <listmail@philipreames.com>

[SCEV] Start reworking backedge taken count APIs to unify max handling [NFC]

This is a first step in figuring out a proper API for maximum (non constant) exit counts. This may evolve a bit as we ge

[SCEV] Start reworking backedge taken count APIs to unify max handling [NFC]

This is a first step in figuring out a proper API for maximum (non constant) exit counts. This may evolve a bit as we get experience with the API needs; suggestions very welcome. This patch just tried to provide a framework that we can later add maximum too in a clean and obvious way.

show more ...


# 3cc4835c 21-Oct-2019 Guillaume Chatelet <gchatelet@google.com>

Use Align for TFL::TransientStackAlignment

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/

Use Align for TFL::TransientStackAlignment

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: arsenm, dschuff, jyknight, sdardis, jvesely, nhaehnle, sbc100, jgravelle-google, hiraditya, aheejin, fedor.sergeev, jrtc27, atanasyan, llvm-commits

Tags: #llvm

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

llvm-svn: 375398

show more ...


# 1d509201 19-Oct-2019 Philip Reames <listmail@philipreames.com>

[SCEV] Simplify umin/max of zext and sext of the same value

This is a common idiom which arises after induction variables are widened, and we have two or more exit conditions. Interestingly, we don

[SCEV] Simplify umin/max of zext and sext of the same value

This is a common idiom which arises after induction variables are widened, and we have two or more exit conditions. Interestingly, we don't have instcombine or instsimplify support for this either.

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

llvm-svn: 375349

show more ...


# 77fbf069 11-Oct-2019 Florian Hahn <flo@fhahn.com>

[SCEV] Add stricter verification option.

Currently -verify-scev only fails if there is a constant difference
between two BE counts. This misses a lot of cases.

This patch adds a -verify-scev-strict

[SCEV] Add stricter verification option.

Currently -verify-scev only fails if there is a constant difference
between two BE counts. This misses a lot of cases.

This patch adds a -verify-scev-strict options, which fails for any
non-zero differences, if used together with -verify-scev.

With the stricter checking, some unit tests fail because
of mis-matches, especially around IndVarSimplify.

If there is no reason I am missing for just checking constant deltas, I
am planning on looking into the various failures.

Reviewers: efriedma, sanjoy.google, reames, atrick

Reviewed By: sanjoy.google

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

llvm-svn: 374535

show more ...


# 58e8c793 30-Sep-2019 Tim Northover <tnorthover@apple.com>

Revert "[SCEV] add no wrap flag for SCEVAddExpr."

This reverts r366419 because the analysis performed is within the context of
the loop and it's only valid to add wrapping flags to "global" expressi

Revert "[SCEV] add no wrap flag for SCEVAddExpr."

This reverts r366419 because the analysis performed is within the context of
the loop and it's only valid to add wrapping flags to "global" expressions if
they're always correct.

llvm-svn: 373184

show more ...


# d89f2d87 19-Sep-2019 Shoaib Meenai <smeenai@fb.com>

[Analysis] Allow -scalar-evolution-max-iterations more than once

At present, `-scalar-evolution-max-iterations` is a `cl::Optional`
option, which means it demands to be passed exactly zero or one ti

[Analysis] Allow -scalar-evolution-max-iterations more than once

At present, `-scalar-evolution-max-iterations` is a `cl::Optional`
option, which means it demands to be passed exactly zero or one times.
Our build system makes it pretty tricky to guarantee this. We often
accidentally pass the flag more than once (but always with the same
value) which results in an error, after which compilation fails:

```
clang (LLVM option parsing): for the -scalar-evolution-max-iterations option: may only occur zero or one times!
```

It seems reasonable to allow -scalar-evolution-max-iterations to be
passed more than once. Quoting the [[ http://llvm.org/docs/CommandLine.html#controlling-the-number-of-occurrences-required-and-allowed | documentation ]]:

> The cl::ZeroOrMore modifier ... indicates that your program will allow the option to be specified zero or more times.
> ...
> If an option is specified multiple times for an option of the cl::opt class, only the last value will be retained.

Original patch by: Enrico Bern Hardy Tanuwidjaja <etanuwid@fb.com>

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

llvm-svn: 372346

show more ...


Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5
# bdf60847 12-Sep-2019 Philip Reames <listmail@philipreames.com>

[SCEV] Add smin support to getRangeRef

We were failing to compute trip counts (both exact and maximum) for any loop which involved a comparison against either an umin or smin. It looks like this sim

[SCEV] Add smin support to getRangeRef

We were failing to compute trip counts (both exact and maximum) for any loop which involved a comparison against either an umin or smin. It looks like this simply got missed when we added smin/umin to SCEV. (Note: umin was submitted separately earlier today. Turned out two folks hit this at the same time.)

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

llvm-svn: 371776

show more ...


# a31ee376 12-Sep-2019 Florian Hahn <flo@fhahn.com>

[SCEV] Support SCEVUMinExpr in getRangeRef.

This patch adds support for SCEVUMinExpr to getRangeRef,
similar to the support for SCEVUMaxExpr.

Reviewers: sanjoy.google, efriedma, reames, nikic

Revi

[SCEV] Support SCEVUMinExpr in getRangeRef.

This patch adds support for SCEVUMinExpr to getRangeRef,
similar to the support for SCEVUMaxExpr.

Reviewers: sanjoy.google, efriedma, reames, nikic

Reviewed By: sanjoy.google

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

llvm-svn: 371768

show more ...


Revision tags: llvmorg-9.0.0-rc4
# 9c27b59c 07-Sep-2019 Teresa Johnson <tejohnson@google.com>

Change TargetLibraryInfo analysis passes to always require Function

Summary:
This is the first change to enable the TLI to be built per-function so
that -fno-builtin* handling can be migrated to use

Change TargetLibraryInfo analysis passes to always require Function

Summary:
This is the first change to enable the TLI to be built per-function so
that -fno-builtin* handling can be migrated to use function attributes.
See discussion on D61634 for background. This is an enabler for fixing
handling of these options for LTO, for example.

This change should not affect behavior, as the provided function is not
yet used to build a specifically per-function TLI, but rather enables
that migration.

Most of the changes were very mechanical, e.g. passing a Function to the
legacy analysis pass's getTLI interface, or in Module level cases,
adding a callback. This is similar to the way the per-function TTI
analysis works.

There was one place where we were looking for builtins but not in the
context of a specific function. See FindCXAAtExit in
lib/Transforms/IPO/GlobalOpt.cpp. I'm somewhat concerned my workaround
could provide the wrong behavior in some corner cases. Suggestions
welcome.

Reviewers: chandlerc, hfinkel

Subscribers: arsenm, dschuff, jvesely, nhaehnle, mehdi_amini, javed.absar, sbc100, jgravelle-google, eraman, aheejin, steven_wu, george.burgess.iv, dexonsmith, jfb, asbirlea, gchatelet, llvm-commits

Tags: #llvm

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

llvm-svn: 371284

show more ...


Revision tags: llvmorg-9.0.0-rc3
# 7b051517 14-Aug-2019 Philip Reames <listmail@philipreames.com>

[SCEV] Rename getMaxBackedgeTakenCount to getConstantMaxBackedgeTakenCount [NFC]

llvm-svn: 368930


Revision tags: llvmorg-9.0.0-rc2
# 03edcd68 07-Aug-2019 Nikolai Bozhenov <nikolai.bozhenov@intel.com>

[SCEV] Return zero from computeConstantDifference(X, X)

Without this patch computeConstantDifference returns None for cases like
these:

computeConstantDifference(%x, %x)
computeConstantDifferen

[SCEV] Return zero from computeConstantDifference(X, X)

Without this patch computeConstantDifference returns None for cases like
these:

computeConstantDifference(%x, %x)
computeConstantDifference({%x,+,16}, {%x,+,16})

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

llvm-svn: 368193

show more ...


Revision tags: llvmorg-9.0.0-rc1, llvmorg-10-init
# c38e3efe 18-Jul-2019 Chen Zheng <czhengsz@cn.ibm.com>

[SCEV] add no wrap flag for SCEVAddExpr.
Differential Revision: https://reviews.llvm.org/D64868

llvm-svn: 366419


# b251cc0d 12-Jul-2019 Fangrui Song <maskray@google.com>

Delete dead stores

llvm-svn: 365903


# 627095ec 11-Jul-2019 Chen Zheng <czhengsz@cn.ibm.com>

[SCEV] teach SCEV symbolical execution about overflow intrinsics folding.
Differential Revision: https://reviews.llvm.org/D64422

llvm-svn: 365726


Revision tags: llvmorg-8.0.1, llvmorg-8.0.1-rc4
# 39e7a97a 03-Jul-2019 Philip Reames <listmail@philipreames.com>

[SCEV] Preserve flags on add/muls in getSCEVATScope

We haven't changed the set of users, just specialized an operand for those users. Given that, the previous wrap flags must still be correct.

Sor

[SCEV] Preserve flags on add/muls in getSCEVATScope

We haven't changed the set of users, just specialized an operand for those users. Given that, the previous wrap flags must still be correct.

Sorry for the lack of test case. Noticed this while working on something else, and haven't figured out to exercise this standalone.

llvm-svn: 365053

show more ...


1...<<31323334353637383940>>...84