| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 268280
|
|
|
|
| |
llvm-svn: 268279
|
|
|
|
|
|
|
|
| |
This was meant to check unit stride for both the load and the store.
Thanks to Roman Shirokiy for noticing this.
llvm-svn: 268251
|
|
|
|
|
|
|
|
|
|
| |
If a guard call being lowered by LowerGuardIntrinsics has the
`!make.implicit` metadata attached, then reattach the metadata to the
branch in the resulting expanded form of the intrinsic. This allows us
to implement null checks as guards and still get the benefit of implicit
null checks.
llvm-svn: 268148
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
support multiple induction variables
This patch enable loop reroll for the following case:
for(int i=0; i<N; i += 2) {
S += *a++;
S += *a++;
};
Differential Revision: http://reviews.llvm.org/D16550
llvm-svn: 268147
|
|
|
|
| |
llvm-svn: 268142
|
|
|
|
|
|
|
|
|
| |
This moves some logic added to EarlyCSE in rL268120 into
`llvm::isInstructionTriviallyDead`. Adds a test case for DCE to
demonstrate that passes other than EarlyCSE can now pick up on the new
information.
llvm-svn: 268126
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This change teaches EarlyCSE some basic properties of guard intrinsics:
- Guard intrinsics read all memory, but don't write to any memory
- After a guard has executed, the condition it was guarding on can be
assumed to be true
- Guard intrinsics on a constant `true` are no-ops
Reviewers: reames, hfinkel
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D19578
llvm-svn: 268120
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the cmake build to enable them.
Summary:
Historically, we had a switch in the Makefiles for turning on "expensive
checks". This has never been ported to the cmake build, but the
(dead-ish) code is still around.
This will also make it easier to turn it on in buildbots.
Reviewers: chandlerc
Subscribers: jyknight, mzolotukhin, RKSimon, gberry, llvm-commits
Differential Revision: http://reviews.llvm.org/D19723
llvm-svn: 268050
|
|
|
|
|
|
|
| |
The option -Rpass=loop-distribute now reports the loops that were
distributed.
llvm-svn: 268006
|
|
|
|
|
|
| |
Next patch will add another use for 'Function' inside the class.
llvm-svn: 268005
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I closely followed the precedents set by the vectorizer:
* With -Rpass-missed, the loop is reported with further details pointing
to -Rpass--analysis.
* -Rpass-analysis reports the details why distribution has failed.
* Regardless of -Rpass*, when distribution fails for a loop where
distribution was forced with the pragma, a warning is produced according
to -Wpass-failed. In this case the analysis info is also printed even
without -Rpass-analysis.
llvm-svn: 267952
|
|
|
|
|
|
|
|
|
|
|
| |
The next patch will start using these for -Rpass-analysis so they won't
be internal-only anymore.
Move the 'Skipping; ' prefix that some of the message are using into the
'fail' function. We don't want to include this prefix in
the -Rpass-analysis report.
llvm-svn: 267951
|
|
|
|
|
|
| |
This will form the basis to emit optimization remarks (-Rpass*).
llvm-svn: 267950
|
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D18828
Patch by Aditya Kumar!
llvm-svn: 267898
|
|
|
|
|
|
| |
Made in preparation for adding MemorySSA support to EarlyCSE.
llvm-svn: 267893
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: mcrosier
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D19617
llvm-svn: 267890
|
|
|
|
|
|
|
|
|
| |
"inferattrs" will deduce the attribute, but it will be too late for
many optimizations. Set it ourselves when creating the call.
Differential Revision: http://reviews.llvm.org/D17598
llvm-svn: 267762
|
|
|
|
| |
llvm-svn: 267761
|
|
|
|
|
|
|
|
|
|
| |
This is required to use this function from isSafeToSpeculativelyExecute
Reviewed By: hfinkel
Differential Revision: http://reviews.llvm.org/D16231
llvm-svn: 267692
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
D19403 adds a new pragma for loop distribution. This change adds
support for the corresponding metadata that the pragma is translated to
by the FE.
As part of this I had to rethink the flag -enable-loop-distribute. My
goal was to be backward compatible with the existing behavior:
A1. pass is off by default from the optimization pipeline
unless -enable-loop-distribute is specified
A2. pass is on when invoked directly from opt (e.g. for unit-testing)
The new pragma/metadata overrides these defaults so the new behavior is:
B1. A1 + enable distribution for individual loop with the pragma/metadata
B2. A2 + disable distribution for individual loop with the pragma/metadata
The default value whether the pass is on or off comes from the initiator
of the pass. From the PassManagerBuilder the default is off, from opt
it's on.
I moved -enable-loop-distribute under the pass. If the flag is
specified it overrides the default from above.
Then the pragma/metadata can further modifies this per loop.
As a side-effect, we can now also use -enable-loop-distribute=0 from opt
to emulate the default from the optimization pipeline. So to be precise
this is the new behavior:
C1. pass is off by default from the optimization pipeline
unless -enable-loop-distribute or the pragma/metadata enables it
C2. pass is on when invoked directly from opt
unless -enable-loop-distribute=0 or the pragma/metadata disables it
Reviewers: hfinkel
Subscribers: joker.eph, mzolotukhin, llvm-commits
Differential Revision: http://reviews.llvm.org/D19431
llvm-svn: 267672
|
|
|
|
| |
llvm-svn: 267653
|
|
|
|
|
|
|
|
|
| |
In the case where isLegalAddressingMode is used for cases
not related to addressing modes, such as pure adds and muls,
it should not be using address space 0. LSR already passes -1
as the address space in these cases.
llvm-svn: 267645
|
|
|
|
|
|
|
|
|
|
| |
This splits out the per-loop functionality from the Pass class.
With this the fact whether the loop is forced-distribute with the new
metadata/pragma can be cached in the per-loop class rather than passed
around.
llvm-svn: 267643
|
|
|
|
| |
llvm-svn: 267631
|
|
|
|
|
|
| |
Also move the explanatory comment with it.
llvm-svn: 267628
|
|
|
|
|
|
|
|
|
|
| |
We need the default ratio to be sufficiently large that it triggers transforms
based on block frequency info (BFI) and plays well with the recently introduced
BranchProbability used by CGP.
Differential Revision: http://reviews.llvm.org/D19435
llvm-svn: 267615
|
|
|
|
| |
llvm-svn: 267614
|
|
|
|
|
|
|
|
|
| |
We would report that the function changed despite creating no new
allocas or performing any promotion.
This fixes PR27316.
llvm-svn: 267507
|
|
|
|
| |
llvm-svn: 267430
|
|
|
|
|
|
|
|
|
|
| |
support.
The original commit was reverted because of a buildbot problem with LazyCallGraph::SCC handling (not related to the OptBisect handling).
Differential Revision: http://reviews.llvm.org/D19172
llvm-svn: 267231
|
|
|
|
| |
llvm-svn: 267199
|
|
|
|
|
|
| |
This will make the port to the new PM easier to follow.
llvm-svn: 267198
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This change will shorten memset if the beginning of memset is overwritten by later stores.
Reviewers: hfinkel, eeckstein, dberlin, mcrosier
Subscribers: mgrang, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D18906
llvm-svn: 267197
|
|
|
|
|
|
|
| |
Also add a very basic test, since apparently there aren't any tests
for DCE whatsoever to add the new pass version to.
llvm-svn: 267196
|
|
|
|
| |
llvm-svn: 267187
|
|
|
|
|
|
|
|
| |
We take the intersection of overflow flags while CSE'ing.
This permits us to consider two instructions with different overflow
behavior to be replaceable.
llvm-svn: 267153
|
|
|
|
|
|
|
|
| |
This reverts commit r267022, due to an ASan failure:
http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_check/1549
llvm-svn: 267115
|
|
|
|
|
|
|
| |
We assumed that flags were only present on binary operators. This is
not true, they may also be present on calls and fcmps.
llvm-svn: 267113
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EarlyCSE had inconsistent behavior with regards to flag'd instructions:
- In some cases, it would pessimize if the available instruction had
different flags by not performing CSE.
- In other cases, it would miscompile if it replaced an instruction
which had no flags with an instruction which has flags.
Fix this by being more consistent with our flag handling by utilizing
andIRFlags.
llvm-svn: 267111
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements a optimization bisect feature, which will allow optimizations to be selectively disabled at compile time in order to track down test failures that are caused by incorrect optimizations.
The bisection is enabled using a new command line option (-opt-bisect-limit). Individual passes that may be skipped call the OptBisect object (via an LLVMContext) to see if they should be skipped based on the bisect limit. A finer level of control (disabling individual transformations) can be managed through an addition OptBisect method, but this is not yet used.
The skip checking in this implementation is based on (and replaces) the skipOptnoneFunction check. Where that check was being called, a new call has been inserted in its place which checks the bisect limit and the optnone attribute. A new function call has been added for module and SCC passes that behaves in a similar way.
Differential Revision: http://reviews.llvm.org/D19172
llvm-svn: 267022
|
|
|
|
|
|
|
| |
The decl is in LoopUtils.h. I think that this was added to
LoopVersioningLICM.cpp by mistake.
llvm-svn: 267014
|
|
|
|
|
|
|
|
| |
"Into" was misleading. I am also planning to use this helper to look
for loop metadata and return the argument, so find seems like a better
name.
llvm-svn: 267013
|
|
|
|
| |
llvm-svn: 266905
|
|
|
|
|
|
| |
Phabricator Revision: http://reviews.llvm.org/D19277
llvm-svn: 266904
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
operands.
This patch improves SimplifyCFG to catch cases like:
if (a < b) {
if (a > b) <- known to be false
unreachable;
}
Phabricator Revision: http://reviews.llvm.org/D18905
llvm-svn: 266767
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D18679
llvm-svn: 266699
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removed some unused headers, replaced some headers with forward class declarations.
Found using simple scripts like this one:
clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap'
Patch by Eugene Kosov <claprix@yandex.ru>
Differential Revision: http://reviews.llvm.org/D19219
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266595
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently there isn't test coverage for all of these. I'd appreciate
if someone with could reproduce and send me something to reduce, but for
now I've just looked for users of RemapInstruction and MapValue and
ensured they don't accidentally insert nullptr. Here is one of the
bootstraps that caught:
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11494
llvm-svn: 266567
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
unless TTI::hasBranchDivergence() is true.
Summary:
This lets us add this pass to the IR pass manager unconditionally; it
will simply not do anything on targets without branch divergence.
Reviewers: tra
Subscribers: llvm-commits, jingyue, rnk, chandlerc
Differential Revision: http://reviews.llvm.org/D18625
llvm-svn: 266398
|