Commit Graph

127892 Commits

Author SHA1 Message Date
Amaury Sechet
1ca39a4149 Get constant cloning out of CloneValue so it can be used when creating globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260848 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14 09:30:42 +00:00
Amaury Sechet
6e0e354551 Move clone_params around
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260846 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14 09:14:30 +00:00
Amaury Sechet
a1d1faf8dd Fix star alignment in Core.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260845 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14 08:58:49 +00:00
Craig Topper
487820cc86 [TableGen] Remove constant string argument from a method that's only called once. We can just hardcode the string inside. There already other things that make the method not reusable. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14 05:22:01 +00:00
Chandler Carruth
6f603acaaa [PM/AA] Wire BasicAA's new pass manager class up to the pass registry.
This ensures that all of the various pieces are working. The next patch
will wire up commandline-driven alias analysis chain building and allow
BasicAA to work with the AAManager.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260838 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 23:46:24 +00:00
Chandler Carruth
26bf6ea447 [PM/AA] Actually wire the AAManager I built for the new pass manager
into the new pass manager and fix the latent bugs there.

This lets everything live together nicely, but it isn't really useful
yet. I never finished wiring the AA layer up for the new pass manager,
and so subsequent patches will change this to do that wiring and get AA
stuff more fully integrated into the new pass manager. Turns out this is
necessary even to get functionattrs ported over. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260836 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 23:32:00 +00:00
Duncan P. N. Exon Smith
9b2a3ba3ec Support: Fix incremental build when re-configuring targets
r180893 added an indirect include of llvm/Config/Targets.def to
llvm/Support/CodeGen.h, which in turn is included by things like
llvm/IR/Module.h.  After a full build of LLVM and Clang, ninja had to
rebuild 1274 files after reconfiguring.

This commit strips CodeGen.h back down to just a pile of enums and moves
the expensive includes over to CodeGenCWrappers.h (which is only
included in two places).  This gets ninja down to 88 files if you
reconfigure with, e.g., -DLLVM_TARGETS_TO_BUILD=X86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260835 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 22:58:43 +00:00
Simon Pilgrim
34963650b8 [X86][AVX] Lower shuffles as repeated lane shuffles then lane-crossing shuffles
This patch attempts to represent a shuffle as a repeating shuffle (recognisable by is128BitLaneRepeatedShuffleMask) with the source input(s) in their original lanes, followed by a single permutation of the 128-bit lanes to their final destinations.

On AVX2 we can additionally attempt to match using 64-bit sub-lane permutation. AVX2 can also now match a similar 'broadcasted' repeating shuffle.

This patch has several benefits:

 * Avoids prematurely matching with lowerVectorShuffleByMerging128BitLanes which can require both inputs to have their input lanes permuted before shuffling.
 * Can replace PERMPS/PERMD instructions - although these are useful for cross-lane unary shuffling, they require their shuffle mask to be pre-loaded (and increase register pressure).
 * Matching the repeating shuffle makes use of a lot of existing shuffle lowering.

There is an outstanding minor AVX1 regression (combine_unneeded_subvector1 in vector-shuffle-combining.ll) of a previously 128-bit shuffle + subvector splat being converted to a subvector splat + (2 instruction) 256-bit shuffle, I intend to fix this in a followup patch for review.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260834 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 21:54:04 +00:00
Craig Topper
ea5732dc11 Remove Proc feature flags for X86 processors that are used to inherit features from one processor to another. This exposed extra features to the -mattr command line that we shouldn't. Replace with just inherited listconcats.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260832 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 21:35:37 +00:00
Craig Topper
9a4d26a079 [TableGen] Fix comment about 64-bit type I missed when I removed the underlying type in r260808.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260830 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 17:58:14 +00:00
Kostya Serebryany
2d7392fe48 [libFuzzer] remove std::vector operations from hot paths, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260829 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 17:56:51 +00:00
Sanjay Patel
5fb1d32848 [x86-64] allow mfence even with -mno-sse (PR23203)
As shown in:
https://llvm.org/bugs/show_bug.cgi?id=23203
...we currently die because lowering believes that mfence is allowed without SSE2 on x86-64,
but the instruction def doesn't know that.

I don't know if allowing mfence without SSE is right, but if not, at least now it's consistently wrong. :)

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260828 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 17:26:29 +00:00
Benjamin Kramer
026259738d [APInt] No need for a copy when taking min/max of an APInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260827 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 17:23:27 +00:00
Benjamin Kramer
34ae7b5808 [ConstantFolding] Reduce APInt and APFloat copying.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260826 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 16:54:14 +00:00
Benjamin Kramer
8d6707c823 [AggressiveAntiDepBreaker] Skip some unnecessary BitVector copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260825 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 16:39:39 +00:00
Benjamin Kramer
7a3eeaef9e Use ArrayRef to hide SmallVector details, kill a useless vector copy along the way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260824 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 16:01:12 +00:00
Krzysztof Parzyszek
712fa7e936 [Hexagon] Replace use of "std::map::emplace" with "insert"
Gcc 4.7.2-4 does not seem to have "emplace" in its implementation of map.
This should fix the build failure on polly-amd64-linux.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260816 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 14:06:01 +00:00
Chandler Carruth
2c37b35a91 [attrs] Move the norecurse deduction to operate on the node set rather
than the SCC object, and have it scan the instruction stream directly
rather than relying on call records.

This makes the behavior of this routine consistent between libc routines
and LLVM intrinsics for libc routines. We can go and start teaching it
about those being norecurse, but we should behave the same for the
intrinsic and the libc routine rather than differently. I chatted with
James Molloy and the inconsistency doesn't seem intentional and likely
is due to intrinsic calls not being modelled in the call graph analyses.

This also fixes a bug where we would deduce norecurse on optnone
functions, when generally we try to handle optnone functions as-if they
were replaceable and thus unanalyzable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260813 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 08:47:51 +00:00
NAKAMURA Takumi
ae2af9f101 HexagonFrameLowering.cpp: Appease msc18 to give an explicit constructor SlotInfo() instead of member initializers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260812 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 07:29:49 +00:00
Kostya Serebryany
49429cee7f [libFuzzer] don't require seed in fuzzer::Mutate, instead use the global Fuzzer object for fuzzer::Mutate. This makes custom mutators fast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260810 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 06:24:18 +00:00
Craig Topper
dcbac18d6e [TableGen] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260809 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 06:03:32 +00:00
Craig Topper
c46e309ffa No need to make the subtarget feature bit enum a uint64_t. This was a leftover from when the feature bit enum contained masks instead of bit indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260808 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 06:03:29 +00:00
Matthias Braun
7eaa93aa2b LiveIntervalAnalysis: Remove LiveVariables requirement
This requirement was a huge hack to keep LiveVariables alive because it
was optionally used by TwoAddressInstructionPass and PHIElimination.
However we have AnalysisUsage::addUsedIfAvailable() which we can use in
those passes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260806 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 04:35:31 +00:00
Matt Arsenault
626ceb277f AMDGPU: Prepare for reducing private element size.
Tests for the new scalarize all private access options will be
included with a future commit.

The only functional change is to make the split/scalarize behavior
for private access of > 4 element vectors to be consistent
with the flat/global handling. This makes the spilling worse
in the two changed tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260804 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 04:18:53 +00:00
Kostya Serebryany
5a08f1b013 [libFuzzer] remove the C++-ish variant of FuzzerDriver from the interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260801 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 03:59:26 +00:00
Kostya Serebryany
d1eacb8ffc [libFuzzer] simplify CTOR of MutationDispatcher
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260800 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 03:46:26 +00:00
Kostya Serebryany
1d35d47455 [libFuzzer] get rid of MutationDispatcher::Impl (simplify the code; NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260799 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 03:37:24 +00:00
Kostya Serebryany
efb0cc7640 [libFuzzer] get rid of UserSuppliedFuzzer; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260798 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 03:25:16 +00:00
Kostya Serebryany
728ca1266f [libFuzzer] simplify the code around Random. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260797 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 03:00:53 +00:00
Kostya Serebryany
f71ac00d01 [libFuzzer] remove UserSuppliedFuzzer from the interface (it was a bad idea).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260796 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 02:39:30 +00:00
Kostya Serebryany
e6d7e3d948 [libFuzzer] provide a plain C interface for custom mutators (experimental)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260794 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 02:29:38 +00:00
Tom Stellard
224ee47ca1 AMDGPU/SI: Add llvm.amdgcn.mov.dpp intrinsic
This intrinsic will be used to expose dpp functionality to higher-level
languages. It will map to the dpp version of v_mov_b32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260792 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 02:09:49 +00:00
Keno Fischer
11adcc4de0 [Cloning] Clone every Function's Debug Info
Summary:
Export the CloneDebugInfoMetadata utility, which clones all debug info
associated with a function into the first module. Also use this function
in CloneModule on each function we clone (the CloneFunction entrypoint
already does this).

Without this, cloning a module will lead to DI quality regressions,
especially since r252219 reversed the Function <-> DISubprogram edge
(before we could get lucky and have this edge preserved if the
DISubprogram itself was, e.g. due to location metadata).

This was verified to fix missing debug information in julia and
a unittest to verify the new behavior is included.

Patch by Yichao Yu! Thanks!

Reviewers: loladiro, pcc
Differential Revision: http://reviews.llvm.org/D17165

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260791 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 02:04:29 +00:00
Matt Arsenault
e31b74e98b Add AMDGPU related triple vendors/OSes
As support expands to more runtimes, we'll need to
distinguish between more than just HSA and unknown.
This also lets us stop using unknown everywhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260790 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 01:56:21 +00:00
Davide Italiano
be38c61412 [llvm-size] Remove variable used only once.
The use of auto and the name were very weird anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260789 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 01:52:47 +00:00
Davide Italiano
2ad5a3cea4 [llvm-size] Make error handling uniform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260786 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 01:38:16 +00:00
Matt Arsenault
0bbac93e5d AMDGPU: Cleanup includes and random macros
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260784 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 01:24:08 +00:00
Matt Arsenault
53ea122b3d AMDGPU: Add intrinsics for sin/cos
These provide direct access to the hardware instruction without
the unit version required like llvm.sin/llvm.cos lowering requires.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260782 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 01:19:56 +00:00
Matt Arsenault
a4c1dc826a AMDGPU: Rename intrinsic to better match instruction name
Also fixes missing f32 test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260780 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 01:03:00 +00:00
Tom Stellard
61b6c32d08 AMDGPU/SI: Add instruction defs for VOP1 DPP instructions
Reviewers: nhaustov, cfang, arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260774 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 00:51:31 +00:00
Matt Arsenault
58bc131398 AMDGPU: Fix broken condition causing warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260773 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 00:36:10 +00:00
Tom Stellard
20f44b5628 AMDGPU/SI: Organize intrinsics by subtarget
Reviewers: arsenm

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260771 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 00:29:57 +00:00
Pirama Arumuga Nainar
d313df118a Don't combine fp_round (fp_round x) if f80 to f16 is generated
Summary:
This patch skips DAG combine of fp_round (fp_round x) if it results in
an fp_round from f80 to f16.

fp_round from f80 to f16 always generates an expensive (and as yet,
unimplemented) libcall to __truncxfhf2.  This prevents selection of
native f16 conversion instructions from f32 or f64.  Moreover, the first
(value-preserving) fp_round from f80 to either f32 or f64 may become a
NOP in platforms like x86.

Reviewers: ab

Subscribers: srhines, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260769 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 00:08:05 +00:00
Alexey Samsonov
9afad92e6b Fix Windows buildbot breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260766 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 23:51:06 +00:00
Tom Stellard
98ef447825 AMDGPU/SI: Detect uniform branches and emit s_cbranch instructions
Reviewers: arsenm

Subscribers: mareko, MatzeB, qcolombet, arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260765 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 23:45:29 +00:00
Yunzhong Gao
6784b3ca2d Disable the vzeroupper insertion pass on PS4.
Differential Revision: http://reviews.llvm.org/D16837



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260764 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 23:37:57 +00:00
Justin Bogner
f801d8b322 cmake: Simplify the iOS.cmake toolchain
- Remove a comment that was clearly copy pasted from Android.cmake and
  isn't relevant.
- Remove the toolchain's sensitivity to the environment. It's less
  error prone to just allow users to set CMAKE_OSX_SYSROOT if they
  want to use a custom SDK.
- Stop explicitly setting -mios-version-min to the default value. It
  just adds needless complexity.

This makes building the native tablegen work for me even when SDKROOT
is set in the environment (or passed in as -DCMAKE_OSX_SYSROOT).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260763 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 23:36:05 +00:00
Derek Schuff
ba4e9d05f5 [WebAssembly] Report more meaningful error messages for some unsupported
ops.

Computed gotos and RETURNADDR may never be supported; we can do
FRAMEADDR in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260759 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 22:56:03 +00:00
Krzysztof Parzyszek
b762ae1118 [Hexagon] Optimize stack slot spills
Replace spills to memory with spills to registers, if possible. This
applies mostly to predicate registers (both scalar and vector), since
they are very limited in number. A spill of a predicate register may
happen even if there is a general-purpose register available. In cases
like this the stack spill/reload may be eliminated completely.

This optimization will consider all stack objects, regardless of where
they came from and try to match the live range of the stack slot with
a dead range of a register from an appropriate register class.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260758 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 22:53:35 +00:00
David Majnemer
ffc8ad133a [llvm-pdbdump] Start to decode some streams
We can decode a little bit of the first stream now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260754 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 22:27:44 +00:00