OSDN Git Service

android-x86/external-llvm.git
8 years ago[codeview] Only emit function ids for inlined functions
Reid Kleckner [Fri, 18 Mar 2016 18:54:32 +0000 (18:54 +0000)]
[codeview] Only emit function ids for inlined functions

We aren't referencing any other kind of function currently.
Should save a bit on our debug info size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263817 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MCParser] Accept uppercase radix variants 0X and 0B
Colin LeMahieu [Fri, 18 Mar 2016 18:22:07 +0000 (18:22 +0000)]
[MCParser] Accept uppercase radix variants 0X and 0B

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263802 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[sancov] specifying sanitizer coverage dependencies.
Mike Aizatsky [Fri, 18 Mar 2016 17:33:21 +0000 (17:33 +0000)]
[sancov] specifying sanitizer coverage dependencies.

Summary:
These dependencies would be used in the future to reduce the number
of instrumented blocks(http://reviews.llvm.org/rL262103)

This is submitted as a separate CL because of previous problems with
ARM.

Subscribers: aemerson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263797 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-objdump] Print <unknown> in place of instruction text if it couldn't be disasse...
Colin LeMahieu [Fri, 18 Mar 2016 16:26:48 +0000 (16:26 +0000)]
[llvm-objdump] Print <unknown> in place of instruction text if it couldn't be disassembled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263793 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Overload return type of llvm.amdgcn.buffer.load.format
Nicolai Haehnle [Fri, 18 Mar 2016 16:24:40 +0000 (16:24 +0000)]
AMDGPU: Overload return type of llvm.amdgcn.buffer.load.format

Summary:
Allow the selection of BUFFER_LOAD_FORMAT_x and _XY. Do this now before
the frontend patches land in Mesa. Eventually, we may want to automatically
reduce the size of loads at the LLVM IR level, which requires such overloads,
and in some cases Mesa can generate them directly.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263792 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Add llvm.amdgcn.buffer.atomic.* intrinsics
Nicolai Haehnle [Fri, 18 Mar 2016 16:24:31 +0000 (16:24 +0000)]
AMDGPU/SI: Add llvm.amdgcn.buffer.atomic.* intrinsics

Summary:
These intrinsics expose the BUFFER_ATOMIC_* instructions and will be used
by Mesa to implement atomics with buffer semantics. The intrinsic interface
matches that of buffer.load.format and buffer.store.format, except that the
GLC bit is not exposed (it is automatically deduced based on whether the
return value is used).

The change of hasSideEffects is required for TableGen to accept the pattern
that matches the intrinsic.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm, rivanvx, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263791 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: use ComplexPattern for offsets in llvm.amdgcn.buffer.load/store.format
Nicolai Haehnle [Fri, 18 Mar 2016 16:24:20 +0000 (16:24 +0000)]
AMDGPU: use ComplexPattern for offsets in llvm.amdgcn.buffer.load/store.format

Summary:
We cannot easily deduce that an offset is in an SGPR, but the Mesa frontend
cannot easily make use of an explicit soffset parameter either. Furthermore,
it is likely that in the future, LLVM will be in a better position than the
frontend to choose an SGPR offset if possible.

Since there aren't any frontend uses of these intrinsics in upstream
repositories yet, I would like to take this opportunity to change the
intrinsic signatures to a single offset parameter, which is then selected
to immediate offsets or voffsets using a ComplexPattern.

Reviewers: arsenm, tstellarAMD, mareko

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263790 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AMDGPU] Assembler: Change dpp_ctrl syntax to match sp3
Sam Kolton [Fri, 18 Mar 2016 15:35:51 +0000 (15:35 +0000)]
[AMDGPU] Assembler: Change dpp_ctrl syntax to match sp3

Review: http://reviews.llvm.org/D18267

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263789 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Fuzzer] Guard no_sanitize_memory attributes behind __has_feature.
Benjamin Kramer [Fri, 18 Mar 2016 14:19:19 +0000 (14:19 +0000)]
[Fuzzer] Guard no_sanitize_memory attributes behind __has_feature.

Otherwise GCC fails to build it because it doesn't know the attribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263787 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix some typos; NFC
Krzysztof Parzyszek [Fri, 18 Mar 2016 14:08:42 +0000 (14:08 +0000)]
Fix some typos; NFC

Patch by Dongyuan Liu.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263786 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-objdump] Move test case to the X86 sub-directory because it depends on X86...
Simon Atanasyan [Fri, 18 Mar 2016 09:52:12 +0000 (09:52 +0000)]
[llvm-objdump] Move test case to the X86 sub-directory because it depends on X86 target supporting. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263781 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAlways cache resolved paths as it even saves on StringMap lookups.
Pete Cooper [Fri, 18 Mar 2016 05:04:04 +0000 (05:04 +0000)]
Always cache resolved paths as it even saves on StringMap lookups.

Now that the resolved path cache stores the StringRef's, its
best to just always cache the results, even when realpath isn't
used.  This way we'll still avoid the StringMap hashing and lookup.

This also conveniently reorganises this code in a way I need for
a future patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263777 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoadding another optimization opportunity to readme file
Ehsan Amiri [Fri, 18 Mar 2016 04:02:25 +0000 (04:02 +0000)]
adding another optimization opportunity to readme file

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263775 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse StringRef's in resolved path cache to avoid extra internString lookups. NFC.
Pete Cooper [Fri, 18 Mar 2016 03:48:09 +0000 (03:48 +0000)]
Use StringRef's in resolved path cache to avoid extra internString lookups.  NFC.

ResolvedPaths was storing std::string's as a cache. We would then take those strings and look them up in the internString pool to get a unique StringRef for each path.

This patch changes ResolvedPaths to store the StringRef pointing in to the internString pool itself. This way, when getResolvedPath returns a string, we know we have the StringRef we would find in the pool anyway. We can avoid the duplicate memory of the std::string's, and also the time from the lookup.

Unfortunately my profiles show no runtime change here, but it should still save memory allocations which is nice.

Reviewed by Frederic Riss.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263774 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] read corpus dirs recursively
Kostya Serebryany [Fri, 18 Mar 2016 01:36:00 +0000 (01:36 +0000)]
[libFuzzer] read corpus dirs recursively

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263773 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LoopDataPrefetch] Add TTI to limit the number of iterations to prefetch ahead
Adam Nemet [Fri, 18 Mar 2016 00:27:43 +0000 (00:27 +0000)]
[LoopDataPrefetch] Add TTI to limit the number of iterations to prefetch ahead

Summary:
It can hurt performance to prefetch ahead too much.  Be conservative for
now and don't prefetch ahead more than 3 iterations on Cyclone.

Reviewers: hfinkel

Subscribers: llvm-commits, mzolotukhin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263772 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LoopDataPrefetch/Aarch64] Allow selective prefetching of large-strided accesses
Adam Nemet [Fri, 18 Mar 2016 00:27:38 +0000 (00:27 +0000)]
[LoopDataPrefetch/Aarch64] Allow selective prefetching of large-strided accesses

Summary:
And use this TTI for Cyclone.  As it was explained in the original RFC
(http://thread.gmane.org/gmane.comp.compilers.llvm.devel/92758), the HW
prefetcher work up to 2KB strides.

I am also adding tests for this and the previous change (D17943):

* Cyclone prefetching accesses with a large stride
* Cyclone not prefetching accesses with a small stride
* Generic Aarch64 subtarget not prefetching either

Reviewers: hfinkel

Subscribers: aemerson, rengolin, llvm-commits, mzolotukhin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263771 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Aarch64] Add pass LoopDataPrefetch for Cyclone
Adam Nemet [Fri, 18 Mar 2016 00:27:29 +0000 (00:27 +0000)]
[Aarch64] Add pass LoopDataPrefetch for Cyclone

Summary:
This wires up the pass for Cyclone but keeps it off for now because we
need a few more TTIs.

The getPrefetchMinStride value is not very well tuned right now but it
works well with CFP2006/433.milc which motivated this.

Tests will be added as part of the upcoming large-stride prefetching
patch.

Reviewers: t.p.northover

Subscribers: llvm-commits, aemerson, hfinkel, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263770 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] improve -merge functionality
Kostya Serebryany [Fri, 18 Mar 2016 00:23:29 +0000 (00:23 +0000)]
[libFuzzer] improve -merge functionality

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263769 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Support] Refactor Error unit tests to avoid duplicating work.
Lang Hames [Fri, 18 Mar 2016 00:12:37 +0000 (00:12 +0000)]
[Support] Refactor Error unit tests to avoid duplicating work.

Suggested by Dave Blaikie in review for r263749. Thanks Dave!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263768 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[sancov] html report: replacing uncovered functions with function coverage % table.
Mike Aizatsky [Fri, 18 Mar 2016 00:12:14 +0000 (00:12 +0000)]
[sancov] html report: replacing uncovered functions with function coverage % table.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263767 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDebugInfo: Add ability to not emit DW_AT_vtable_elem_location for virtual functions.
Peter Collingbourne [Thu, 17 Mar 2016 23:58:03 +0000 (23:58 +0000)]
DebugInfo: Add ability to not emit DW_AT_vtable_elem_location for virtual functions.

A virtual index of -1u indicates that the subprogram's virtual index is
unrepresentable (for example, when using the relative vtable ABI), so do
not emit a DW_AT_vtable_elem_location attribute for it.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263765 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Support] Address some of dblaikie's feedback for r263749.
Lang Hames [Thu, 17 Mar 2016 23:43:33 +0000 (23:43 +0000)]
[Support] Address some of dblaikie's feedback for r263749.

Fixes some missing std::moves and take Expected<T> by rvalue reference in the
call operator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263764 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "allow lambdas in mapped_iterator"
Mike Aizatsky [Thu, 17 Mar 2016 23:32:20 +0000 (23:32 +0000)]
Revert "allow lambdas in mapped_iterator"

MSVC as usual:

C:\Buildbot\Slave\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\include\llvm/ADT/STLExtras.h(120):
error C2100: illegal indirection
C:\Buildbot\Slave\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\include\llvm/IR/Instructions.h(3966):
note: see reference to class template instantiation
'llvm::mapped_iterator<llvm::User::op_iterator,llvm::CatchSwitchInst::DerefFnTy>'
being compiled

This reverts commit e091dd63f1f34e043748e28ad160d3bc17731168.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263760 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoallow lambdas in mapped_iterator
Mike Aizatsky [Thu, 17 Mar 2016 23:22:22 +0000 (23:22 +0000)]
allow lambdas in mapped_iterator

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263759 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Docs] Fix a typo.
Alexey Samsonov [Thu, 17 Mar 2016 23:08:01 +0000 (23:08 +0000)]
[Docs] Fix a typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263754 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PPC, FastISel] Fix ordered/unordered fcmp
Tim Shen [Thu, 17 Mar 2016 22:27:58 +0000 (22:27 +0000)]
[PPC, FastISel] Fix ordered/unordered fcmp

For fcmp, major concern about the following 6 cases is NaN result. The
comparison result consists of 4 bits, indicating lt, eq, gt and un (unordered),
only one of which will be set. The result is generated by fcmpu
instruction. However, bc instruction only inspects one of the first 3
bits, so when un is set, bc instruction may jump to to an undesired
place.

More specifically, if we expect an unordered comparison and un is set, we
expect to always go to true branch; in such case UEQ, UGT and ULT still
give false, which are undesired; but UNE, UGE, ULE happen to give true,
since they are tested by inspecting !eq, !lt, !gt, respectively.

Similarly, for ordered comparison, when un is set, we always expect the
result to be false. In such case OGT, OLT and OEQ is good, since they are
actually testing GT, LT, and EQ respectively, which are false. OGE, OLE
and ONE are tested through !lt, !gt and !eq, and these are true.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263753 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Support] Add ExitOnError utility to support tools that use the exit-on-error
Lang Hames [Thu, 17 Mar 2016 21:28:49 +0000 (21:28 +0000)]
[Support] Add ExitOnError utility to support tools that use the exit-on-error
idiom.

Most LLVM tool code exits immediately when an error is encountered and prints an
error message to stderr. The ExitOnError class supports this by providing two
call operators - one for Errors, and one for Expected<T>s. Calls to code that
can return Errors (or Expected<T>s) can use these calls to bail out on error,
and otherwise continue as if the operation had succeeded. E.g.

Error foo();
Expected<int> bar();

int main(int argc, char *argv[]) {
  ExitOnError ExitOnErr;

  ExitOnErr.setBanner(std::string("Error in ") + argv[0] + ":");

  // Exit if foo returns an error. No need to manually check error return.
  ExitOnErr(foo());

  // Exit if bar returns an error, otherwise unwrap the contained int and
  // continue.
  int X = ExitOnErr(bar());

  // ...

  return 0;
}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263749 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Support] Make Error::isA<T>() works on success values.
Lang Hames [Thu, 17 Mar 2016 20:35:00 +0000 (20:35 +0000)]
[Support] Make Error::isA<T>() works on success values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263745 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LoopVectorize] Annotate versioned loop with noalias metadata
Adam Nemet [Thu, 17 Mar 2016 20:32:37 +0000 (20:32 +0000)]
[LoopVectorize] Annotate versioned loop with noalias metadata

Summary:
Use the new LoopVersioning facility (D16712) to add noalias metadata in
the vector loop if we versioned with memchecks.  This can enable some
optimization opportunities further down the pipeline (see the included
test or the benchmark improvement quoted in D16712).

The test also covers the bug I had in the initial version in D16712.

The vectorizer did not previously use LoopVersioning.  The reason is
that the vectorizer performs its transformations in single shot.  It
creates an empty single-block vector loop that it then populates with
the widened, if-converted instructions.  Thus creating an intermediate
versioned scalar loop seems wasteful.

So this patch (rather than bringing in LoopVersioning fully) adds a
special interface to LoopVersioning to allow the vectorizer to add
no-alias annotation while still performing its own versioning.

As the vectorizer propagates metadata from the instructions in the
original loop to the vector instructions we also check the pointer in
the original instruction and see if LoopVersioning can add no-alias
metadata based on the issued memchecks.

Reviewers: hfinkel, nadav, mzolotukhin

Subscribers: mzolotukhin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263744 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LoopVersioning] Annotate versioned loop with noalias metadata
Adam Nemet [Thu, 17 Mar 2016 20:32:32 +0000 (20:32 +0000)]
[LoopVersioning] Annotate versioned loop with noalias metadata

Summary:
If we decide to version a loop to benefit a transformation, it makes
sense to record the now non-aliasing accesses in the newly versioned
loop.  This allows non-aliasing information to be used by subsequent
passes.

One example is 456.hmmer in SPECint2006 where after loop distribution,
we vectorize one of the newly distributed loops.  To vectorize we
version this loop to fully disambiguate may-aliasing accesses.  If we
add the noalias markers, we can use the same information in a later DSE
pass to eliminate some dead stores which amounts to ~25% of the
instructions of this hot memory-pipeline-bound loop.  The overall
performance improves by 18% on our ARM64.

The scoped noalias annotation is added in LoopVersioning.  The patch
then enables this for loop distribution.  A follow-on patch will enable
it for the vectorizer.  Eventually this should be run by default when
versioning the loop but first I'd like to get some feedback whether my
understanding and application of scoped noalias metadata is correct.

Essentially my approach was to have a separate alias domain for each
versioning of the loop.  For example, if we first version in loop
distribution and then in vectorization of the distributed loops, we have
a different set of memchecks for each versioning.  By keeping the scopes
in different domains they can conveniently be defined independently
since different alias domains don't affect each other.

As written, I also have a separate domain for each loop.  This is not
necessary and we could save some metadata here by using the same domain
across the different loops.  I don't think it's a big deal either way.

Probably the best is to review the tests first to see if I mapped this
problem correctly to scoped noalias markers.  I have plenty of comments
in the tests.

Note that the interface is prepared for the vectorizer which needs the
annotateInstWithNoAlias API.  The vectorizer does not use LoopVersioning
so we need a way to pass in the versioned instructions.  This is also
why the maps have to become part of the object state.

Also currently, we only have an AA-aware DSE after the vectorizer if we
also run the LTO pipeline.  Depending how widely this triggers we may
want to schedule a DSE toward the end of the regular pass pipeline.

Reviewers: hfinkel, nadav, ashutosh.nema

Subscribers: mssimpso, aemerson, llvm-commits, mcrosier

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263743 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoBitcode: Error out instead of crashing on corrupt metadata
Justin Bogner [Thu, 17 Mar 2016 20:12:06 +0000 (20:12 +0000)]
Bitcode: Error out instead of crashing on corrupt metadata

I hit a crash in the bitcode reader on some corrupt input where an
MDString had somehow been attached to an instruction instead of an
MDNode. This input is pretty bogus, but we shouldn't be crashing on bad
input here.

This change adds error handling in all of the places where we
currently have unchecked casts from Metadata to MDNode, which means
we'll error out instead of crashing for that sort of input.

Unfortunately, I don't have tests. Hitting this requires flipping bits
in the input bitcode, and committing corrupt binary files to catch
these cases is a bit too opaque and unmaintainable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263742 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoARM: stop asserting on weird <3 x Ty> vectors in ISelLowering.
Tim Northover [Thu, 17 Mar 2016 20:10:28 +0000 (20:10 +0000)]
ARM: stop asserting on weird <3 x Ty> vectors in ISelLowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263741 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] deprecate several flags
Kostya Serebryany [Thu, 17 Mar 2016 19:59:39 +0000 (19:59 +0000)]
[libFuzzer] deprecate several flags

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263739 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] add __attribute__((no_sanitize_memory)) to two functions that may be...
Kostya Serebryany [Thu, 17 Mar 2016 19:42:35 +0000 (19:42 +0000)]
[libFuzzer] add __attribute__((no_sanitize_memory)) to two functions that may be called from signal handler(s) or from msan. This will hopefully avoid msan false reports which I can't reproduce

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263737 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[msan fix] unitalized variable
Michael J. Spencer [Thu, 17 Mar 2016 19:16:54 +0000 (19:16 +0000)]
[msan fix] unitalized variable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263736 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[InstCombine] Combine A->B->A BitCast
Guozhi Wei [Thu, 17 Mar 2016 18:47:20 +0000 (18:47 +0000)]
[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@263734 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Statepoints] Export a magic constant into a header; NFC
Sanjoy Das [Thu, 17 Mar 2016 18:42:17 +0000 (18:42 +0000)]
[Statepoints] Export a magic constant into a header; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263733 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[lit] Enqueue tests on a separate thread to not hit limits on parallel queues
Filipe Cabecinhas [Thu, 17 Mar 2016 18:27:33 +0000 (18:27 +0000)]
[lit] Enqueue tests on a separate thread to not hit limits on parallel queues

Summary:
The multiprocessing.Queue.put() call can hang if we try queueing all the
tests before starting to take them out of the queue.
The current implementation hangs if tests exceed 2^^15, on Mac OS X.
This might happen with a ninja check-all if one has a bunch of llvm
projects.

Reviewers: delcypher, bkramer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263731 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AMDGPU] add VI disassembler tests. NFC.
Valery Pykhtin [Thu, 17 Mar 2016 17:56:33 +0000 (17:56 +0000)]
[AMDGPU] add VI disassembler tests. NFC.

Autogenerated from the corresponding assembler tests with a few FIXME added (will fix soon).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263729 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PowerPC] Disable CTR loops optimization for soft float operations
Petar Jovanovic [Thu, 17 Mar 2016 17:11:33 +0000 (17:11 +0000)]
[PowerPC] Disable CTR loops optimization for soft float operations

This patch prevents CTR loops optimization when using soft float operations
inside loop body. Soft float operations use function calls, but function
calls are not allowed inside CTR optimized loops.

Patch by Aleksandar Beserminji.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263727 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[WebAssembly] Stackify code emitted by eliminateFrameIndex and SP writeback
Derek Schuff [Thu, 17 Mar 2016 17:00:29 +0000 (17:00 +0000)]
[WebAssembly] Stackify code emitted by eliminateFrameIndex and SP writeback

Summary:
MRI::eliminateFrameIndex can emit several instructions to do address
calculations; these can usually be stackified. Because instructions with
FI operands can have subsequent operands which may be expression trees,
find the top of the leftmost tree and insert the code before it, to keep
the LIFO property.

Also use stackified registers when writing back the SP value to memory
in the epilog; it's unnecessary because SP will not be used after the
epilog, and it results in better code.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263725 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[COFF] Refactor section alignment calculation
David Majnemer [Thu, 17 Mar 2016 16:55:18 +0000 (16:55 +0000)]
[COFF] Refactor section alignment calculation

Section alignment isn't completely trivial, let it live in one place so
that we may reuse it in LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263722 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoForgot to commit this with r263692
David Majnemer [Thu, 17 Mar 2016 16:55:11 +0000 (16:55 +0000)]
Forgot to commit this with r263692

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263721 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Do not generate s_waitcnt after ds_permute/ds_bpermute
Changpeng Fang [Thu, 17 Mar 2016 16:43:50 +0000 (16:43 +0000)]
AMDGPU/SI: Do not generate s_waitcnt after ds_permute/ds_bpermute

Symmary:
  ds_permute/ds_bpermute do not read memory so s_waitcnt is not needed.

Reviewers
  arsenm, tstellarAMD

Subscribers
  llvm-commits, arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263720 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: mark atomic instructions as sources of divergence
Nicolai Haehnle [Thu, 17 Mar 2016 16:21:59 +0000 (16:21 +0000)]
AMDGPU: mark atomic instructions as sources of divergence

Summary:
As explained by the comment, threads will typically see different values
returned by atomic instructions even if the arguments are equal.

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263719 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Simplified blend-with-zero combining
Simon Pilgrim [Thu, 17 Mar 2016 15:59:36 +0000 (15:59 +0000)]
[X86][SSE] Simplified blend-with-zero combining

We were being too aggressive in trying to combine a shuffle into a blend-with-zero pattern, often resulting in a endless loop of contrasting combines

This patch stops the combine if we already have a blend in place (means we miss some domain corrections)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263717 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agopropagate 'unpredictable' metadata on select instructions
Sanjay Patel [Thu, 17 Mar 2016 15:30:52 +0000 (15:30 +0000)]
propagate 'unpredictable' metadata on select instructions

This is similar to D18133 where we allowed profile weights on select instructions.
This extends that change to also allow the 'unpredictable' attribute of branches to apply to selects.

A test to check that 'unpredictable' metadata is preserved when cloning instructions was checked in at:
http://reviews.llvm.org/rL263648

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263716 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoARM: Revert SVN r253865, 254158, fix windows division
Saleem Abdulrasool [Thu, 17 Mar 2016 14:10:49 +0000 (14:10 +0000)]
ARM: Revert SVN r253865, 254158, fix windows division

The two changes together weakened the test and caused a regression with division
handling in MSVC mode.  They were applied to avoid an assertion being triggered
in the block frequency analysis.  However, the underlying problem was simply
being masked rather than solved properly.  Address the actual underlying problem
and revert the changes.  Rather than analyze the cause of the assertion, the
division failure was assumed to be an overflow.

The underlying issue was a subtle bug in the BB construction in the emission of
the div-by-zero check (WIN__DBZCHK).  We did not construct the proper successor
information in the basic blocks, nor did we update the PHIs associated with the
basic block when we split them.  This would result in assertions being triggered
in the block frequency analysis pass.

Although the original tests are being removed, the tests themselves performed
very little in terms of validation but merely tested that we did not assert when
generating code.  Update this with new tests that actually ensure that we do not
regress on the code generation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263714 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-objdump] Add REQUIRES x86 directive to fix buildbots
Simon Atanasyan [Thu, 17 Mar 2016 11:09:21 +0000 (11:09 +0000)]
[llvm-objdump] Add REQUIRES x86 directive to fix buildbots

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263708 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-objdump] Add '0x' prefix to a target displacement number to accent its hex...
Simon Atanasyan [Thu, 17 Mar 2016 10:43:44 +0000 (10:43 +0000)]
[llvm-objdump] Add '0x' prefix to a target displacement number to accent its hex format

It might be hard to recognize a hexadecimal number without '0x' prefix.
Besides that '0x' prefix corresponds to GNU objdump behaviour.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263705 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] Use `formatImm` call to print immediate value in the `MipsInstPrinter`
Simon Atanasyan [Thu, 17 Mar 2016 10:43:36 +0000 (10:43 +0000)]
[mips] Use `formatImm` call to print immediate value in the `MipsInstPrinter`

That allows, for example, to print hex-formatted immediates using
llvm-objdump --print-imm-hex command line option.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263704 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] Eliminate instances of "potentially uninitialised local variable" warnings...
Scott Egerton [Thu, 17 Mar 2016 10:37:51 +0000 (10:37 +0000)]
[mips] Eliminate instances of "potentially uninitialised local variable" warnings, NFC

Summary:
This should eliminate all occurrences of this within LLVMMipsAsmParser.
This patch is in response to http://reviews.llvm.org/D17983. I was unable
to reproduce the warnings on my machine so please advise if this fixes the
warnings.

Reviewers: ariccio, vkalintiris, dsanders

Subscribers: dblaikie, dsanders, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263703 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove obselete reference to TypeResolve from the tutorial.
Wilfred Hughes [Thu, 17 Mar 2016 10:20:58 +0000 (10:20 +0000)]
Remove obselete reference to TypeResolve from the tutorial.

TypeResolve went away in r134829 in 2011.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263702 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMinor grammar fix in kaleidoscope tutorial.
Wilfred Hughes [Thu, 17 Mar 2016 10:18:13 +0000 (10:18 +0000)]
Minor grammar fix in kaleidoscope tutorial.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263700 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFurther typo fixes in kaleidoscope tutorial.
Wilfred Hughes [Thu, 17 Mar 2016 09:26:45 +0000 (09:26 +0000)]
Further typo fixes in kaleidoscope tutorial.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263697 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix typo in kaleidoscope tutorial.
Wilfred Hughes [Thu, 17 Mar 2016 09:09:07 +0000 (09:09 +0000)]
Fix typo in kaleidoscope tutorial.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263696 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[yaml2obj, COFF] Correctly handle section alignment
David Majnemer [Thu, 17 Mar 2016 05:43:26 +0000 (05:43 +0000)]
[yaml2obj, COFF] Correctly handle section alignment

The section alignment field was marked optional but not provided a
default value: initialize it with 0.

While we are here, ensure that the section alignment is plausible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263692 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Statepoints] Separate out logic for statepoint directives; NFC
Sanjoy Das [Thu, 17 Mar 2016 01:56:10 +0000 (01:56 +0000)]
[Statepoints] Separate out logic for statepoint directives; NFC

This splits out the logic that maps the `"statepoint-id"` attribute into
the actual statepoint ID, and the `"statepoint-num-patch-bytes"`
attribute into the number of patchable bytes the statpeoint is lowered
into.  The new home of this logic is in IR/Statepoint.cpp, and this
refactoring will support similar functionality when lowering calls with
deopt operand bundles in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263685 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Statepoint] Remove unused header; NFC
Sanjoy Das [Thu, 17 Mar 2016 01:15:27 +0000 (01:15 +0000)]
[Statepoint] Remove unused header; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263684 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Statepoints] Minor NFC cleanups
Sanjoy Das [Thu, 17 Mar 2016 00:47:18 +0000 (00:47 +0000)]
[Statepoints] Minor NFC cleanups

Mostly code simplifcations, and bringing up IR/Statepoints.cpp up to
LLVM coding style.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263683 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SelectionDAG] Remove visitStatepoint; NFC
Sanjoy Das [Thu, 17 Mar 2016 00:47:14 +0000 (00:47 +0000)]
[SelectionDAG] Remove visitStatepoint; NFC

This way we have a single entry point into StatepointLowering.  The
method was a direct dispatch to LowerStatepoint anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263682 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRequire allocator parameter to YAML traits.
Pete Cooper [Thu, 17 Mar 2016 00:34:54 +0000 (00:34 +0000)]
Require allocator parameter to YAML traits.

The allocator here can still be a nullptr, but this atleast makes the
single caller which needed nullptr be explicit about it.

Note, lld started always passing a parameter here as of r263680.  If
anything builds out of sync, that would be why errors may occur.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263681 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agouse FileCheck for tighter checking
Sanjay Patel [Wed, 16 Mar 2016 23:39:37 +0000 (23:39 +0000)]
use FileCheck for tighter checking

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263679 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd optional allocator to YAML code to avoid leaking lld atoms.
Pete Cooper [Wed, 16 Mar 2016 23:29:31 +0000 (23:29 +0000)]
Add optional allocator to YAML code to avoid leaking lld atoms.

In lld we allocate atoms on an allocator and so don't run their
destructors.  This means we also shouldn't allocate memory inside
them without that also being on an allocator.

Reviewed by Lang Hames and Rafael Espindola.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263676 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoreduce check strings; no need to check IR comments
Sanjay Patel [Wed, 16 Mar 2016 23:22:01 +0000 (23:22 +0000)]
reduce check strings; no need to check IR comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263675 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agouse FileCheck for tighter checking
Sanjay Patel [Wed, 16 Mar 2016 23:20:20 +0000 (23:20 +0000)]
use FileCheck for tighter checking

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263674 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUpgrade TBAA *before* upgrading intrinsics
Chris Bieneman [Wed, 16 Mar 2016 23:17:54 +0000 (23:17 +0000)]
Upgrade TBAA *before* upgrading intrinsics

Summary: If TBAA is on an intrinsic and it gets upgraded and drops the TBAA we hit an odd assert. We should just upgrade the TBAA first because it doesn't have side-effects.

Reviewers: reames, apilipenko, manmanren

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263673 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix indentation; NFC
Sanjoy Das [Wed, 16 Mar 2016 23:11:21 +0000 (23:11 +0000)]
Fix indentation; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263672 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoExtract out a SelectionDAGBuilder::LowerAsStatepoint; NFC
Sanjoy Das [Wed, 16 Mar 2016 23:08:00 +0000 (23:08 +0000)]
Extract out a SelectionDAGBuilder::LowerAsStatepoint; NFC

Summary:
This is a step towards implementing "direct" lowering of calls and
invokes with deopt operand bundles into STATEPOINT nodes (as opposed to
having them mandatorily pass through RewriteStatepointsForGC, which is
the case today).

This change extracts out a `SelectionDAGBuilder::LowerAsStatepoint`
helper function that is able to lower a "statepoint like thing", and
uses it to lower `gc.statepoint` calls.  This is an NFC now, but in a
later change we will use `LowerAsStatepoint` to directly lower calls and
invokes with operand bundles without going through an intermediate
`gc.statepoint` IR representation.

FYI: I expect `SelectionDAGBuilder::StatepointInfo` will evolve as I add
support for lowering non gc.statepoints, right now it is fairly tightly
coupled with an IR level `gc.statepoint`.

Reviewers: reames, pgavlin, JosephTremoulet

Subscribers: sanjoy, mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263671 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agouse FileCheck for tighter checking
Sanjay Patel [Wed, 16 Mar 2016 22:34:57 +0000 (22:34 +0000)]
use FileCheck for tighter checking

I'm testing out a script that auto-generates the check lines.
It's 98% copied from utils/update_llc_test_checks.py.
If others think this is useful, please let me know.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263668 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agouse FileCheck for tighter checking
Sanjay Patel [Wed, 16 Mar 2016 22:29:07 +0000 (22:29 +0000)]
use FileCheck for tighter checking

I'm testing out a script that auto-generates the check lines.
It's 98% copied from utils/update_llc_test_checks.py.
If others think this is useful, please let me know.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263667 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoVariable name cleanup /NFC
Xinliang David Li [Wed, 16 Mar 2016 22:13:41 +0000 (22:13 +0000)]
Variable name cleanup /NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263666 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTweak some atomics functions in preparation for larger changes; NFC.
James Y Knight [Wed, 16 Mar 2016 22:12:04 +0000 (22:12 +0000)]
Tweak some atomics functions in preparation for larger changes; NFC.

- Rename getATOMIC to getSYNC, as llvm will soon be able to emit both
  '__sync' libcalls and '__atomic' libcalls, and this function is for
  the '__sync' ones.

- getInsertFencesForAtomic() has been replaced with
  shouldInsertFencesForAtomic(Instruction), so that the decision can be
  made per-instruction. This functionality will be used soon.

- emitLeadingFence/emitTrailingFence are no longer called if
  shouldInsertFencesForAtomic returns false, and thus don't need to
  check the condition themselves.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263665 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SelectionDAG] Extract out populateCallLoweringInfo; NFC
Sanjoy Das [Wed, 16 Mar 2016 20:49:31 +0000 (20:49 +0000)]
[SelectionDAG] Extract out populateCallLoweringInfo; NFC

SelectionDAGBuilder::populateCallLoweringInfo is now used instead of
SelectionDAGBuilder::lowerCallOperands.  The populateCallLoweringInfo
interface is more composable in face of design changes like
http://reviews.llvm.org/D18106

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263663 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ProfileData] Make a utility method public, NFC
Vedant Kumar [Wed, 16 Mar 2016 20:49:26 +0000 (20:49 +0000)]
[ProfileData] Make a utility method public, NFC

The swift frontend needs to be able to look up PGO function name
variables based on the original raw function name. That's because it's
not possible to create PGO function name variables while emitting swift
IR. Instead, we have to create the name variables while lowering swift
IR to llvm IR, at which point we fix up all calls to the increment
intrinsic to point to the right name variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263662 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Prevent uniform loops from becoming infinite
Nicolai Haehnle [Wed, 16 Mar 2016 20:14:33 +0000 (20:14 +0000)]
AMDGPU: Prevent uniform loops from becoming infinite

Summary:
Uniform loops where the branch leaving the loop is predicated on VCCNZ
must be skipped if EXEC = 0, otherwise they will be infinite.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263658 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Hexagon] Adding missing break in switch statement. Extra operands would have been...
Colin LeMahieu [Wed, 16 Mar 2016 20:00:38 +0000 (20:00 +0000)]
[Hexagon] Adding missing break in switch statement.  Extra operands would have been appended to the end.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263657 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SLP] Make DataLayout a member variable.
Chad Rosier [Wed, 16 Mar 2016 19:48:42 +0000 (19:48 +0000)]
[SLP] Make DataLayout a member variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263656 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[LSR] Create fewer redundant instructions."
Geoff Berry [Wed, 16 Mar 2016 19:21:47 +0000 (19:21 +0000)]
Revert "[LSR] Create fewer redundant instructions."

This reverts commit r263644.  Investigating bootstrap failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263655 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemoved trailing whitespace
Simon Pilgrim [Wed, 16 Mar 2016 18:37:44 +0000 (18:37 +0000)]
Removed trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263650 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Reduced alignment of widened vector load/stores to better match PR26953 cases
Simon Pilgrim [Wed, 16 Mar 2016 18:32:44 +0000 (18:32 +0000)]
[X86] Reduced alignment of widened vector load/stores to better match PR26953 cases

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263649 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoadd checks for 'unpredictable' metadata preservation
Sanjay Patel [Wed, 16 Mar 2016 18:15:34 +0000 (18:15 +0000)]
add checks for 'unpredictable' metadata preservation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263648 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix function names; NFC
Sanjay Patel [Wed, 16 Mar 2016 18:00:09 +0000 (18:00 +0000)]
fix function names; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263646 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[msan] Add a comment with a bug link.
Evgeniy Stepanov [Wed, 16 Mar 2016 17:39:17 +0000 (17:39 +0000)]
[msan] Add a comment with a bug link.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263645 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LSR] Create fewer redundant instructions.
Geoff Berry [Wed, 16 Mar 2016 17:29:49 +0000 (17:29 +0000)]
[LSR] Create fewer redundant instructions.

Summary:
Fix LSRInstance::HoistInsertPosition() to check the original insert
position block first for a canonical insertion point that is dominated
by all inputs.  This leads to SCEV being able to reuse more instructions
since it currently tracks the instructions it creates for reuse by
keeping a table of <Value, insert point> pairs.

Reviewers: atrick

Subscribers: mcrosier, mzolotukhin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263644 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Regenerated + extended widened vector conversion tests
Simon Pilgrim [Wed, 16 Mar 2016 15:33:43 +0000 (15:33 +0000)]
[X86] Regenerated + extended widened vector conversion tests
- Ensure we test X86 + X64
- sitopfp / uitofp requires testing for SSE2 and SSE42 as well (part of the fix for PR26953)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263640 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Verify instructions in non-debug builds as well
Michel Danzer [Wed, 16 Mar 2016 09:10:42 +0000 (09:10 +0000)]
AMDGPU: Verify instructions in non-debug builds as well

And emit an error if it fails.

This prevents illegal instructions from getting sent to the GPU, which
would potentially result in a hang.

This is a candidate for the stable branch(es).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263627 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Clean up indentation in SIInstrInfo::getDefaultRsrcDataFormat
Michel Danzer [Wed, 16 Mar 2016 09:10:35 +0000 (09:10 +0000)]
AMDGPU/SI: Clean up indentation in SIInstrInfo::getDefaultRsrcDataFormat

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263626 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX512BW: Fix SRA v64i8 lowering. Use PCMPGTM (cmp result in k register) for 512bit...
Igor Breger [Wed, 16 Mar 2016 08:48:26 +0000 (08:48 +0000)]
AVX512BW: Fix SRA v64i8 lowering. Use PCMPGTM (cmp result in k register) for 512bit vector because PCMPGT supported only for 128/256bit.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263624 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Bitcode] Add compatibility test for the 3.8 release
Vedant Kumar [Wed, 16 Mar 2016 05:43:03 +0000 (05:43 +0000)]
[Bitcode] Add compatibility test for the 3.8 release

Fork off compatibility.ll for the 3.8 release. The *.bc file in this
commit was produced using a Release build of the release_38 branch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263620 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[JumpThreading] See through Cast Instructions
Haicheng Wu [Wed, 16 Mar 2016 04:52:52 +0000 (04:52 +0000)]
[JumpThreading] See through Cast Instructions

To capture more jump-thread opportunity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263618 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Support] Update Error unit test to remove implementation specific behaviour.
Lang Hames [Wed, 16 Mar 2016 01:20:54 +0000 (01:20 +0000)]
[Support] Update Error unit test to remove implementation specific behaviour.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263610 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Support] Add the 'Error' class for structured error handling.
Lang Hames [Wed, 16 Mar 2016 01:02:46 +0000 (01:02 +0000)]
[Support] Add the 'Error' class for structured error handling.

This patch introduces the Error classs for lightweight, structured,
recoverable error handling. It includes utilities for creating, manipulating
and handling errors. The scheme is similar to exceptions, in that errors are
described with user-defined types. Unlike exceptions however, errors are
represented as ordinary return types in the API (similar to the way
std::error_code is used).

For usage notes see the LLVM programmer's manual, and the Error.h header.
Usage examples can be found in unittests/Support/ErrorTest.cpp.

Many thanks to David Blaikie, Mehdi Amini, Kevin Enderby and others on the
llvm-dev and llvm-commits lists for lots of discussion and review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263609 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Regenerated widen load tests
Simon Pilgrim [Wed, 16 Mar 2016 00:41:21 +0000 (00:41 +0000)]
[X86] Regenerated widen load tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263608 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE41] Additional tests for extracting zeroable shuffle elements
Simon Pilgrim [Wed, 16 Mar 2016 00:13:36 +0000 (00:13 +0000)]
[X86][SSE41] Additional tests for extracting zeroable shuffle elements

We can currently only match zeroable vector elements of the same size as the shuffle type - these tests demonstrate the problem and a solution will be shortly added in an updated D14261

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263606 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[JumpThreading] Simplify Instructions first in ComputeValueKnownInPredecessors()"
Haicheng Wu [Tue, 15 Mar 2016 23:38:47 +0000 (23:38 +0000)]
Revert "[JumpThreading] Simplify Instructions first in ComputeValueKnownInPredecessors()"

Not sure it handles undef properly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263605 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agollvm-bcanalyzer: Fix handling of attribute group entries
Justin Bogner [Tue, 15 Mar 2016 22:37:25 +0000 (22:37 +0000)]
llvm-bcanalyzer: Fix handling of attribute group entries

These were printing as "UnknownCode3", since we were looking for them
inside PARAMATTR blocks instead of PARAMATTR_GROUP blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263597 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTurn LoopLoadElimination on again
Adam Nemet [Tue, 15 Mar 2016 22:26:12 +0000 (22:26 +0000)]
Turn LoopLoadElimination on again

The latent bug that LLE exposed in the LoopVectorizer was resolved
(PR26952).

The pass can be disabled with -mllvm -enable-loop-load-elim=0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263595 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libfuzzer] speeding up corpus load
Mike Aizatsky [Tue, 15 Mar 2016 21:47:21 +0000 (21:47 +0000)]
[libfuzzer] speeding up corpus load

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263591 91177308-0d34-0410-b5e6-96231b3b80d8