| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
insertelement instructions.
llvm-svn: 182976
|
| |
|
|
|
|
| |
PR/16177
llvm-svn: 182919
|
| |
|
|
| |
llvm-svn: 182909
|
| |
|
|
|
|
| |
pointer of StringRef.
llvm-svn: 182820
|
| |
|
|
| |
llvm-svn: 182819
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- llvm.loop.parallel metadata has been renamed to llvm.loop to be more generic
by making the root of additional loop metadata.
- Loop::isAnnotatedParallel now looks for llvm.loop and associated
llvm.mem.parallel_loop_access
- document llvm.loop and update llvm.mem.parallel_loop_access
- add support for llvm.vectorizer.width and llvm.vectorizer.unroll
- document llvm.vectorizer.* metadata
- add utility class LoopVectorizerHints for getting/setting loop metadata
- use llvm.vectorizer.width=1 to indicate already vectorized instead of
already_vectorized
- update existing tests that used llvm.loop.parallel and
llvm.vectorizer.already_vectorized
Reviewed by: Nadav Rotem
llvm-svn: 182802
|
| |
|
|
|
|
|
|
| |
ValueMaterializer.
Extend LinkModules to pass a ValueMaterializer to RemapInstruction and friends to lazily create Functions for lazily linked globals. This is a big win when linking small modules with large (mostly unused) library modules.
llvm-svn: 182776
|
| |
|
|
| |
llvm-svn: 182771
|
| |
|
|
| |
llvm-svn: 182680
|
| |
|
|
|
|
|
|
| |
across CFG edges since even if it is safe to remove RR pairs, we may still be able to move a retain/release into a loop.
rdar://13949644
llvm-svn: 182670
|
| |
|
|
|
|
|
|
| |
the pass via the usage of a global data structure.
rdar://13750319
llvm-svn: 182669
|
| |
|
|
|
|
|
|
| |
it, don't assert on those cases.
Fixes PR16139.
llvm-svn: 182656
|
| |
|
|
| |
llvm-svn: 182640
|
| |
|
|
|
|
|
|
| |
as the BinaryOperator, *not* in the block where the IRBuilder is currently
inserting into. Fixes a bug where scalarizePHI would create instructions
that would not dominate all uses.
llvm-svn: 182639
|
| |
|
|
|
|
|
|
|
|
|
| |
- move AsmWriter.h from public headers into lib
- marked all AssemblyWriter functions as non-virtual; no need to override them
- DebugIR now "plugs into" AssemblyWriter with an AssemblyAnnotationWriter helper
- exposed flags to control hiding of a) debug metadata b) debug intrinsic calls
C/R: Paul Redmond
llvm-svn: 182617
|
| |
|
|
| |
llvm-svn: 182590
|
| |
|
|
|
|
| |
from 3 to 2 to match the rest of ObjCARCOpts.
llvm-svn: 182557
|
| |
|
|
|
|
|
|
|
|
|
|
| |
function.
We are not working on a DAG and I ran into a number of problems when I enabled the vectorizations of 'diamond-trees' (trees that share leafs).
* Imroved the numbering API.
* Changed the placement of new instructions to the last root.
* Fixed a bug with external tree users with non-zero lane.
* Fixed a bug in the placement of in-tree users.
llvm-svn: 182508
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The earlier change list introduced the following inst combines:
B * (uitofp i1 C) —> select C, B, 0
A * (1 - uitofp i1 C) —> select C, 0, A
select C, 0, B + select C, A, 0 —> select C, A, B
Together these 3 changes would simplify :
A * (1 - uitofp i1 C) + B * uitofp i1 C
down to :
select C, B, A
In practice we found that the first two substitutions can have a
negative effect on performance, because they reduce opportunities to
use FMA contractions; between the two options FMAs are often the
better choice. This change list amends the previous one to enable
just these inst combines:
select C, B, 0 + select C, 0, A —> select C, B, A
A * (1 - uitofp i1 C) + B * uitofp i1 C —> select C, B, A
llvm-svn: 182499
|
| |
|
|
|
|
|
|
|
|
| |
The Value pointers we store in the induction variable list can be RAUW'ed by a
call to SCEVExpander::expandCodeFor, use a TrackingVH instead. Do the same thing
in some other places where we store pointers that could potentially be RAUW'ed.
Fixes PR16073.
llvm-svn: 182485
|
| |
|
|
|
|
|
| |
This stuff is used on platforms where MSan does not have a proper VarArg
implementation (anything other than x86_64 at the moment).
llvm-svn: 182375
|
| |
|
|
| |
llvm-svn: 182315
|
| |
|
|
|
|
| |
As discussed, LoopUtils.h is a better name.
llvm-svn: 182314
|
| |
|
|
|
|
|
|
|
|
|
| |
Other passes, PPC counter-loop formation for example, also need to add loop
preheaders outside of the regular loop simplification pass. This makes
InsertPreheaderForLoop a global function so that it can be used by other
passes.
No functionality change intended.
llvm-svn: 182299
|
| |
|
|
|
|
|
|
| |
We might encouter single edge PHIs - handle them with an identity select.
Fixes PR15990.
llvm-svn: 182199
|
| |
|
|
| |
llvm-svn: 182164
|
| |
|
|
| |
llvm-svn: 182100
|
| |
|
|
|
|
| |
They are always defined in the main executable.
llvm-svn: 181994
|
| |
|
|
|
|
|
|
|
| |
We only want to check this once, not for every conditional block in the loop.
No functionality change (except that we don't perform a check redudantly
anymore).
llvm-svn: 181942
|
| |
|
|
|
|
| |
consistent about their usage of periods.
llvm-svn: 181901
|
| |
|
|
|
|
| |
No functionality change.
llvm-svn: 181862
|
| |
|
|
|
|
|
|
|
|
|
|
| |
InstCombine can be uncooperative to vectorization and sink loads into
conditional blocks. This prevents vectorization.
Undo this optimization if there are unconditional memory accesses to the same
addresses in the loop.
radar://13815763
llvm-svn: 181860
|
| |
|
|
| |
llvm-svn: 181848
|
| |
|
|
|
|
|
|
|
|
|
| |
CXAAtExitFn was set outside a loop and before optimizations where functions
can be deleted. This patch will set CXAAtExitFn inside the loop and after
optimizations.
Seg fault when running LTO because of accesses to a deleted function.
rdar://problem/13838828
llvm-svn: 181838
|
| |
|
|
| |
llvm-svn: 181760
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We used to give up if we saw two integer inductions. After this patch, we base
further induction variables on the chosen one like we do in the reverse
induction and pointer induction case.
Fixes PR15720.
radar://13851975
llvm-svn: 181746
|
| |
|
|
|
|
| |
pointer is known positive.
llvm-svn: 181745
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if and only if we are both KnownSafeBU/KnownSafeTD rather than just either or.
In the presense of a block being initialized, the frontend will emit the
objc_retain on the original pointer and the release on the pointer loaded from
the alloca. The optimizer will through the provenance analysis realize that the
two are related (albiet different), but since we only require KnownSafe in one
direction, will match the inner retain on the original pointer with the guard
release on the original pointer. This is fixed by ensuring that in the presense
of allocas we only unconditionally remove pointers if both our retain and our
release are KnownSafe (i.e. we are KnownSafe in both directions) since we must
deal with the possibility that the frontend will emit what (to the optimizer)
appears to be unbalanced retain/releases.
An example of the miscompile is:
%A = alloca
retain(%x)
retain(%x) <--- Inner Retain
store %x, %A
%y = load %A
... DO STUFF ...
release(%y)
call void @use(%x)
release(%x) <--- Guarding Release
getting optimized to:
%A = alloca
retain(%x)
store %x, %A
%y = load %A
... DO STUFF ...
release(%y)
call void @use(%x)
rdar://13750319
llvm-svn: 181743
|
| |
|
|
|
|
| |
Suppresses an unused-variable warning in -Asserts builds.
llvm-svn: 181733
|
| |
|
|
|
|
| |
get{TopDown,BottomUp}PtrState will create a new PtrState object if it does not find a PtrState for Arg.
llvm-svn: 181726
|
| |
|
|
|
|
|
|
|
|
|
| |
OptimizeIndividualCalls.
This makes the statistics gathering completely independent of the actual
optimization occuring, preventing any sort of bleeding over from occuring.
Additionally, it simplifies a switch statement in the non-statistic gathering case.
llvm-svn: 181719
|
| |
|
|
|
|
| |
read in asserts.
llvm-svn: 181689
|
| |
|
|
| |
llvm-svn: 181684
|
| |
|
|
|
|
|
|
| |
multiple users.
The external user does not have to be in lane #0. We have to save the lane for each scalar so that we know which vector lane to extract.
llvm-svn: 181674
|
| |
|
|
|
|
|
|
| |
round of vectorization.
Testcase in the next commit.
llvm-svn: 181673
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two transforms in visitUrem that conflict with each other.
*) One, if a divisor is a power of two, subtracts one from the divisor
and turns it into a bitwise-and.
*) The other unwraps both operands if they are surrounded by zext
instructions.
Flipping the order allows the subtraction to go beneath the sign
extension.
llvm-svn: 181668
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the widest induction type encountered for the cannonical induction variable.
We used to turn the following loop into an empty loop because we used i8 as
induction variable type and truncated 1024 to 0 as trip count.
int a[1024];
void fail() {
int reverse_induction = 1023;
unsigned char forward_induction = 0;
while ((reverse_induction) >= 0) {
forward_induction++;
a[reverse_induction] = forward_induction;
--reverse_induction;
}
}
radar://13862901
llvm-svn: 181667
|
| |
|
|
|
|
| |
No functionality change intended.
llvm-svn: 181666
|
| |
|
|
|
|
| |
No functionality change intended.
llvm-svn: 181665
|
| |
|
|
|
|
|
| |
Use isKnownToBeAPowerOfTwo in visitUrem so that we may more aggressively
fold away urem instructions.
llvm-svn: 181661
|