Commit Graph

14545 Commits

Author SHA1 Message Date
Petar Jovanovic
6ed4786900 Reland r262337 "calculate builtin_object_size if arg is a removable pointer"
Original commit message:
 calculate builtin_object_size if argument is a removable pointer

 This patch fixes calculating correct value for builtin_object_size function
 when pointer is used only in builtin_object_size function call and never
 after that.

 Patch by Strahinja Petrovic.

 Differential Revision: http://reviews.llvm.org/D17337

Reland the original change with a small modification (first do a null check
and then do the cast) to satisfy ubsan.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263011 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-09 14:12:47 +00:00
Adam Nemet
713ac2f65a [LoopDataPrefetch] Add stats and debug output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262998 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-09 05:33:21 +00:00
Sanjoy Das
f3ceb82abb Return StringRef instead of a naked char*; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262989 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-09 02:34:19 +00:00
Sanjoy Das
4e05e1c0ff [IRCE] Reflow comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262988 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-09 02:34:15 +00:00
Mehdi Amini
ec57137c98 FunctionIndex is not optional for renameModuleForThinLTO(), make it a reference (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262976 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-09 01:37:14 +00:00
Sanjay Patel
be9115f49d fix variable name; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262953 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-08 19:07:42 +00:00
Sanjay Patel
57d9dbefb3 use range-based loop; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262952 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-08 19:06:12 +00:00
Sanjay Patel
94c032fe90 rangify, fix function names; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262940 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-08 17:12:32 +00:00
Sanjay Patel
593168882c don't repeat function names in documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262937 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-08 16:26:39 +00:00
Junmo Park
23c40a726f Revert "[InstCombine] Combine A->B->A BitCast"
This reverts commit r262670 due to compile failure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262916 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-08 07:09:46 +00:00
Peter Collingbourne
fb8bf30df5 Fix evaluation order. Spotted by Alexander Riccio!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262907 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-08 03:50:36 +00:00
Easwaran Raman
8a53057ba3 Revert revisions 262636, 262643, 262679, and 262682.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262883 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-08 00:36:35 +00:00
Anna Zaks
8f023303dc [tsan] Add support for pointer typed atomic stores, loads, and cmpxchg
TSan instrumentation functions for atomic stores, loads, and cmpxchg work on
integer value types. This patch adds casts before calling TSan instrumentation
functions in cases where the value is a pointer.

Differential Revision: http://reviews.llvm.org/D17833

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262876 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-07 23:16:23 +00:00
Adam Nemet
7e94e7eb7e [LoopDataPrefetch] If prefetch distance is not set, skip pass
This lets select sub-targets enable this pass.  The patch implements the
idea from the recent llvm-dev thread:
http://thread.gmane.org/gmane.comp.compilers.llvm.devel/94925

The goal is to enable the LoopDataPrefetch pass for the Cyclone
sub-target only within Aarch64.

Positive and negative tests will be included in an upcoming patch that
enables selective prefetching of large-strided accesses on Cyclone.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262844 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-07 18:35:42 +00:00
Adam Nemet
6b38e591a6 Revert "Enable LoopLoadElimination by default"
This reverts commit r262250.

It causes SPEC2006/gcc to generate wrong result (166.s) in AArch64 when
running with *ref* data set.  The error happens with
"-Ofast -flto -fuse-ld=gold" or "-O3 -fno-strict-aliasing".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262839 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-07 17:38:02 +00:00
Chandler Carruth
9daf569e9c [DFSan] Remove an overly aggressive assert reported in PR26068.
This code has been successfully used to bootstrap libc++ in a no-asserts
mode for a very long time, so the code that follows cannot be completely
incorrect. I've added a test that shows the current behavior for this
kind of code with DFSan. If it is desirable for DFSan to do something
special when processing an invoke of a variadic function, it can be
added, but we shouldn't keep an assert that we've been ignoring due to
release builds anyways.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262829 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-07 14:05:09 +00:00
Rong Xu
5aa1e72861 [PGO] Add a commandline option to control number of the VP annotation metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262750 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-04 22:08:44 +00:00
Easwaran Raman
26fcf9acc2 Fix a use-after-free bug introduced in r262636
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262679 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-04 00:44:01 +00:00
Guozhi Wei
feac4c82c0 [InstCombine] Combine A->B->A BitCast
This patch enhances InstCombine to handle following case:

        A  ->  B    bitcast
        PHI
        B  ->  A    bitcast




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262670 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-03 23:21:38 +00:00
Sanjay Patel
76b12c4bf0 [InstCombine] transform bitcasted bitwise logic ops with constants (PR26702)
Given that we're not actually reducing the instruction count in the included
regression tests, I think we would call this a canonicalization step.

The motivation comes from the example in PR26702:
https://llvm.org/bugs/show_bug.cgi?id=26702

If we hoist the bitwise logic ahead of the bitcast, the previously unoptimizable
example of:

define <4 x i32> @is_negative(<4 x i32> %x) {
  %lobit = ashr <4 x i32> %x, <i32 31, i32 31, i32 31, i32 31>
  %not = xor <4 x i32> %lobit, <i32 -1, i32 -1, i32 -1, i32 -1>
  %bc = bitcast <4 x i32> %not to <2 x i64>
  %notnot = xor <2 x i64> %bc, <i64 -1, i64 -1>
  %bc2 = bitcast <2 x i64> %notnot to <4 x i32>
  ret <4 x i32> %bc2
}

Simplifies to the expected:

define <4 x i32> @is_negative(<4 x i32> %x) {
  %lobit = ashr <4 x i32> %x, <i32 31, i32 31, i32 31, i32 31>
  ret <4 x i32> %lobit
}

Differential Revision: http://reviews.llvm.org/D17583



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262645 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-03 19:19:04 +00:00
Easwaran Raman
b76d92e4ad Infrastructure for PGO enhancements in inliner
This patch provides the following infrastructure for PGO enhancements in inliner:

Enable the use of block level profile information in inliner
Incremental update of block frequency information during inlining
Update the function entry counts of callees when they get inlined into callers.

Differential Revision: http://reviews.llvm.org/D16381



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262636 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-03 18:26:33 +00:00
Dehao Chen
5c299caf16 Use LineLocation instead of CallsiteLocation to index callsite profile.
Summary: With discriminator, LineLocation can uniquely identify a callsite without the need to specifying callee name. Remove Callee function name from the key, and put it in the value (FunctionSamples).

Reviewers: davidxl, dnovillo

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D17827

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262634 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-03 18:09:32 +00:00
Matthew Simpson
72b5335cac [LoopUtils, LV] Fix PR26734
The vectorization of first-order recurrences (r261346) caused PR26734. When
detecting these recurrences, we need to ensure that the previous value is
actually defined inside the loop. This patch includes the fix and test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262624 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-03 16:12:01 +00:00
Amaury Sechet
0f03390710 Explode store of arrays in instcombine
Summary: This is the last step toward supporting aggregate memory access in instcombine. This explodes stores of arrays into a serie of stores for each element, allowing them to be optimized.

Reviewers: joker.eph, reames, hfinkel, majnemer, mgrang

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D17828

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262530 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 22:36:45 +00:00
Amaury Sechet
0158b28774 Unpack array of all sizes in InstCombine
Summary: This is another step toward improving fca support. This unpack load of array in a series of load to array's elements.

Reviewers: chandlerc, joker.eph, majnemer, reames, hfinkel

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15890

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262521 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 21:28:30 +00:00
Daniel Berlin
a60047277d Really fix ASAN leak/etc issues with MemorySSA unittests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262519 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 21:16:28 +00:00
Daniel Berlin
459c79ef7d Revert "Fix ASAN detected errors in code and test" (it was not meant to be committed yet)
This reverts commit 890bbccd600ba1eb050353d06a29650ad0f2eb95.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262512 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 20:36:22 +00:00
Daniel Berlin
2bc88b7640 Fix ASAN detected errors in code and test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262511 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 20:27:29 +00:00
Chandler Carruth
cf88e9244e [AA] Hoist the logic to reformulate various AA queries in terms of other
parts of the AA interface out of the base class of every single AA
result object.

Because this logic reformulates the query in terms of some other aspect
of the API, it would easily cause O(n^2) query patterns in alias
analysis. These could in turn be magnified further based on the number
of call arguments, and then further based on the number of AA queries
made for a particular call. This ended up causing problems for Rust that
were actually noticable enough to get a bug (PR26564) and probably other
places as well.

When originally re-working the AA infrastructure, the desire was to
regularize the pattern of refinement without losing any generality.
While I think it was successful, that is clearly proving to be too
costly. And the cost is needless: we gain no actual improvement for this
generality of making a direct query to tbaa actually be able to
re-use some other alias analysis's refinement logic for one of the other
APIs, or some such. In short, this is entirely wasted work.

To the extent possible, delegation to other API surfaces should be done
at the aggregation layer so that we can avoid re-walking the
aggregation. In fact, this significantly simplifies the logic as we no
longer need to smuggle the aggregation layer into each alias analysis
(or the TargetLibraryInfo into each alias analysis just so we can form
argument memory locations!).

However, we also have some delegation logic inside of BasicAA and some
of it even makes sense. When the delegation logic is baking in specific
knowledge of aliasing properties of the LLVM IR, as opposed to simply
reformulating the query to utilize a different alias analysis interface
entry point, it makes a lot of sense to restrict that logic to
a different layer such as BasicAA. So one aspect of the delegation that
was in every AA base class is that when we don't have operand bundles,
we re-use function AA results as a fallback for callsite alias results.
This relies on the IR properties of calls and functions w.r.t. aliasing,
and so seems a better fit to BasicAA. I've lifted the logic up to that
point where it seems to be a natural fit. This still does a bit of
redundant work (we query function attributes twice, once via the
callsite and once via the function AA query) but it is *exactly* twice
here, no more.

The end result is that all of the delegation logic is hoisted out of the
base class and into either the aggregation layer when it is a pure
retargeting to a different API surface, or into BasicAA when it relies
on the IR's aliasing properties. This should fix the quadratic query
pattern reported in PR26564, although I don't have a stand-alone test
case to reproduce it.

It also seems general goodness. Now the numerous AAs that don't need
target library info don't carry it around and depend on it. I think
I can even rip out the general access to the aggregation layer and only
expose that in BasicAA as it is the only place where we re-query in that
manner.

However, this is a non-trivial change to the AA infrastructure so I want
to get some additional eyes on this before it lands. Sadly, it can't
wait long because we should really cherry pick this into 3.8 if we're
going to go this route.

Differential Revision: http://reviews.llvm.org/D17329

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262490 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 15:56:53 +00:00
George Burgess IV
f3d29244a8 Attempt to fix ASAN failure in a MemorySSA test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262452 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 02:35:04 +00:00
Sanjay Patel
a7693ee508 revert r262424 because there's a *clang test* for AArch64 that checks -O3 asm output
that is broken by this change


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262440 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-02 01:04:09 +00:00
Sanjay Patel
0cd6df9cc1 [InstCombine] convert 'isPositive' and 'isNegative' vector comparisons to shifts (PR26701)
As noted in the code comment, I don't think we can do the same transform that we do for
*scalar* integers comparisons to *vector* integers comparisons because it might pessimize
the general case. 

Exhibit A for an incomplete integer comparison ISA remains x86 SSE/AVX: it only has EQ and GT
for integer vectors.

But we should now recognize all the variants of this construct and produce the optimal code
for the cases shown in:
https://llvm.org/bugs/show_bug.cgi?id=26701
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262424 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 23:55:18 +00:00
Dehao Chen
3ff7d1073c Perform InstructioinCombiningPass before SampleProfile pass.
Summary: SampleProfile pass needs to be performed after InstructionCombiningPass, which helps eliminate un-inlinable function calls.

Reviewers: davidxl, dnovillo

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D17742

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262419 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 22:53:02 +00:00
Owen Anderson
2b8030cd97 Fix an issue where fast math flags were dropped during scalarization.
Most portions of InstCombine properly propagate fast math flags, but
apparently the vector scalarization section was overlooked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262376 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 19:35:52 +00:00
Daniel Berlin
1627603e25 Add the beginnings of an update API for preserving MemorySSA
Summary:
This adds the beginning of an update API to preserve MemorySSA.  In particular,
this patch adds a way to remove memory SSA accesses when instructions are
deleted.

It also adds relevant unit testing infrastructure for MemorySSA's API.

(There is an actual user of this API, i will make that diff dependent on this one.  In practice, a ton of opt passes remove memory instructions, so it's hopefully an obviously useful API :P)

Reviewers: hfinkel, reames, george.burgess.iv

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D17157

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262362 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 18:46:54 +00:00
Petar Jovanovic
7a9adc7562 Revert "calculate builtin_object_size if argument is a removable pointer"
Revert r262337 as "check-llvm ubsan" step failed on
sanitizer-x86_64-linux-fast buildbot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262349 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 16:50:08 +00:00
Petar Jovanovic
71c0d4c97d calculate builtin_object_size if argument is a removable pointer
This patch fixes calculating correct value for builtin_object_size function
when pointer is used only in builtin_object_size function call and never
after that.

Patch by Strahinja Petrovic.

Differential Revision: http://reviews.llvm.org/D17337



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262337 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 14:39:55 +00:00
Sanjay Patel
3f5ed2d9f2 [x86, InstCombine] transform more x86 masked loads to LLVM intrinsics
Continuation of:
http://reviews.llvm.org/rL262269


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262273 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-29 23:59:00 +00:00
Adam Nemet
525f545ba3 [LLE] Fix a comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262270 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-29 23:21:12 +00:00
Sanjay Patel
3a7e753170 [x86, InstCombine] transform x86 AVX masked loads to LLVM intrinsics
The intended effect of this patch in conjunction with:
http://reviews.llvm.org/rL259392
http://reviews.llvm.org/rL260145

is that customers using the AVX intrinsics in C will benefit from combines when
the load mask is constant:

__m128 mload_zeros(float *f) {
  return _mm_maskload_ps(f, _mm_set1_epi32(0));
}

__m128 mload_fakeones(float *f) {
  return _mm_maskload_ps(f, _mm_set1_epi32(1));
}

__m128 mload_ones(float *f) {
  return _mm_maskload_ps(f, _mm_set1_epi32(0x80000000));
}

__m128 mload_oneset(float *f) {
  return _mm_maskload_ps(f, _mm_set_epi32(0x80000000, 0, 0, 0));
}

...so none of the above will actually generate a masked load for optimized code.

This is the masked load counterpart to:
http://reviews.llvm.org/rL262064



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262269 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-29 23:16:48 +00:00
Adam Nemet
2e073f55eb [LLE] Fix SingleSource/Benchmarks/Polybench/stencils/jacobi-2d-imper with Polly
We can actually have dependences between accesses with different
underlying types.  Bail in this case.

A test will follow shortly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262267 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-29 22:53:59 +00:00
Adam Nemet
7ff3ae62d2 Enable LoopLoadElimination by default
Summary:
I re-benchmarked this and results are similar to original results in
D13259:

On ARM64:
  SingleSource/Benchmarks/Polybench/linear-algebra/solvers/dynprog -59.27%
  SingleSource/Benchmarks/Polybench/stencils/adi                   -19.78%

On x86:
  SingleSource/Benchmarks/Polybench/linear-algebra/solvers/dynprog  -27.14%

And of course the original ~20% gain on SPECint_2006/456.hmmer with Loop
Distribution.

In terms of compile time, there is ~5% increase on both
SingleSource/Benchmarks/Misc/oourafft and
SingleSource/Benchmarks/Linkpack/linkpack-pc.  These are both very tiny
loop-intensive programs where SCEV computations dominates compile time.

The reason that time spent in SCEV increases has to do with the design
of the old pass manager.  If a transform pass does not preserve an
analysis we *invalidate* the analysis even if there was *no*
modification made by the transform pass.

This means that currently we don't take advantage of LLE and LV sharing
the same analysis (LAA) and unfortunately we recompute LAA *and* SCEV
for LLE.

(There should be a way to work around this limitation in the case of
SCEV and LAA since both compute things on demand and internally cache
their result.  Thus we could pretend that transform passes preserve
these analyses and manually invalidate them upon actual modification.
On the other hand the new pass manager is supposed to solve so I am not
sure if this is worthwhile.)

Reviewers: hfinkel, dberlin

Subscribers: dberlin, reames, mssimpso, aemerson, joker.eph, llvm-commits

Differential Revision: http://reviews.llvm.org/D16300

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262250 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-29 20:35:11 +00:00
Rong Xu
0158e00998 Minor code cleanup. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262242 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-29 19:16:04 +00:00
Dehao Chen
eb295ed84e Move discriminator assignment to the right place.
Summary: Now discriminator is assigned per-function instead of per-module.

Reviewers: davidxl, dnovillo

Subscribers: dblaikie, llvm-commits

Differential Revision: http://reviews.llvm.org/D17664

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262240 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-29 18:59:48 +00:00
Xinliang David Li
cbdb39cfd0 [PGO] Remove redundant counter copies for avail_extern functions.
Differential Revision: http://reviews.llvm.org/D17654


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262157 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-27 23:11:30 +00:00
Renato Golin
751381e387 Revert "[sancov] do not instrument nodes that are full pre-dominators"
This reverts commit r262103, as it broke all ARM and AArch64 bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262139 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-27 14:19:19 +00:00
Sean Silva
e82b9c2fec [instrprof] Use __{start,stop}_SECNAME on PS4 too.
Summary:
The PS4 linker seems to handle this fine.

Hi David, it seems that indeed most ELF linkers support
__{start,stop}_SECNAME, as our proprietary linker does as well.

This follows the pattern of r250679 w.r.t. the testing.

Maggie, Phillip, Paul: I've tested this with the PS4 SDK 3.5 toolchain
prerelease and it seems to work fine.

Reviewers: davidxl

Subscribers: probinson, phillip.power, MaggieYi

Differential Revision: http://reviews.llvm.org/D17672

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262112 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-27 06:01:26 +00:00
Mike Aizatsky
fd676b1823 [sancov] properly initializing pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262111 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-27 05:50:40 +00:00
Kostya Serebryany
e01ce57c55 [libFuzzer] don't emit callbacks to sanitizer run-time in -fsanitize-coverage=trace-pc mode; update libFuzzer doc for previous commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262110 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-27 05:45:12 +00:00
Chandler Carruth
32bf0088fb [LICM] Teach LICM how to handle cases where the alias set tracker was
merged into a loop that was subsequently unrolled (or otherwise nuked).

In this case it can't merge in the ASTs for any remaining nested loops,
it needs to re-add their instructions dircetly.

The fix is very isolated, but I've pulled the code for merging blocks
into the AST into a single place in the process. The only behavior
change is in the case which would have crashed before.

This fixes a crash reported by Mikael Holmen on the list after r261316
restored much of the loop pass pipelining and allowed us to actually do
this kind of nested transformation sequenc. I've taken that test case
and further reduced it into the somewhat twisty maze of loops in the
included test case. This does in fact trigger the bug even in this
reduced form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262108 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-27 04:34:07 +00:00