127814 Commits

Author SHA1 Message Date
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
Krzysztof Parzyszek
866bbdb53b [Hexagon] Mark HVX registers as volatile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260753 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 22:26:44 +00:00
Sanjay Patel
12e0a699e7 fix test to use FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260751 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 22:07:54 +00:00
Derek Schuff
0d7bc82046 [WebAssembly] Update test expectations after r260737
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260750 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 22:05:08 +00:00
Krzysztof Parzyszek
3a028998ba [Hexagon] Recognize more cases in copyPhysReg and stack slot load/store
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260748 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 21:56:41 +00:00
Reid Kleckner
43c4ddff1c [codeview] Describe local variables in registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260746 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 21:48:30 +00:00
Rong Xu
2ee5bb8ea1 [PGO] Add another interface for annotateValueSite
Add another interface to function annotateValueSite() which directly uses the
VauleData array.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260741 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 21:36:17 +00:00
Dan Gohman
f97f532728 [WebAssembly] Fix byval for empty types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260740 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 21:30:18 +00:00
Chad Rosier
a5e85e7117 [AArch64] Enable post-RA MI scheduler for Kryo.
This should have landed in r260686.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260739 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 21:27:33 +00:00
Dan Gohman
73cd89a6f2 [WebAssembly] Fix insertion of a BLOCK in a loop header that also ends a BLOCK.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260737 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 21:19:25 +00:00
Andrew Kaylor
4caa75fcde [WinEH] Prevent EH state numbering from skipping nested cleanup pads that never return
Differential Revision: http://reviews.llvm.org/D17208



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260733 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 21:10:16 +00:00
Chad Rosier
676d257cf2 [LIR] Allow merging of memsets in negatively strided loops.
Last part of PR25166.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260732 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 21:03:23 +00:00
Justin Lebar
55d3581e46 Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260731 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 21:01:37 +00:00
Justin Lebar
d7521eeb5d [SimplifyCFG] Don't fold conditional branches that contain calls to convergent functions.
Summary:
Performing this optimization duplicates the call to the convergent
function and adds new control-flow dependencies, which is a no-no.

Reviewers: jingyue

Subscribers: broune, hfinkel, tra, resistor, joker.eph, arsenm, llvm-commits, mzolotukhin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260730 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 21:01:36 +00:00
Justin Lebar
2109a5cbf9 [LoopRotate] Don't perform loop rotation if the loop header calls a convergent function.
Summary:
Calls to convergent functions can be duplicated, but only if the
duplicates are not control-flow dependent on any additional values.
Loop rotation doesn't meet the bar.

Reviewers: jingyue

Subscribers: mzolotukhin, llvm-commits, arsenm, joker.eph, resistor, tra, hfinkel, broune

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260729 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 21:01:33 +00:00
Justin Lebar
9693e080e3 Add convergent property to CodeMetrics.
Summary: No functional changes.

Reviewers: jingyue, arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260728 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 21:01:31 +00:00
Justin Lebar
7207ae3fba Initialize CodeMetrics' member variables inline with definitions.
Summary: No functional changes.

Reviewers: jingyue

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260727 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 20:59:20 +00:00
Krzysztof Parzyszek
f5b5f89705 [Hexagon] Recognize more instructions in isLoadFromStackSlot/isStoreToStackSlot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260725 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 20:54:15 +00:00
Quentin Colombet
2e463eaffd Get rid of some GLOBAL_ISEL ifdefs that should be harmless for code size.
More to come, but those were easy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260723 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 20:41:24 +00:00
David Majnemer
c1bf0b56b5 Remove unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260722 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 20:33:51 +00:00
Benjamin Kramer
06016cc257 Remove LLVMGetTargetMachineData leftovers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260720 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 20:26:46 +00:00
Argyrios Kyrtzidis
f365222ef2 [ADT] Revert the llvm/ADT/OptionSet.h header and unit test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260714 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 19:47:35 +00:00
Philip Reames
3d165deba8 [GVN] Common code for local and non-local load availability [NFCI]
The attached patch removes all of the block local code for performing X-load forwarding by reusing the code used in the non-local case.

The motivation here is to remove duplication and in the process increase our test coverage of some fairly tricky code. I have some upcoming changes I'll be proposing in this area and wanted to have the code cleaned up a bit first.

Note: The review for this mostly happened in email which didn't make it to phabricator on the 258882 commit thread.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260711 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 19:24:57 +00:00
Chad Rosier
90baf3317e [LIR] Partially revert r252926(NFC), which introduced a very subtle change.
In short, before r252926 we were comparing an unsigned (StoreSize) against an a
APInt (Stride), which is fine and well.  After we were zero extending the Stride
and then converting to an unsigned, which is not the same thing.  Obviously,
Stides can also be negative.  This commit just restores the original behavior.

AFAICT, it's not possible to write a test case to expose the issue because
the code already has checks to make sure the StoreSize can't overflow an
unsigned (which prevents the Stride from overflowing an unsigned as well).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260706 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 19:05:27 +00:00
Philip Reames
2f2bedcc23 [LVI] Exploit nsw/nuw when computing constant ranges
As the title says. Modelled after similar code in SCEV.

This is useful when analysing induction variables in loops which have been canonicalized by other passes. I wrote the tests as non-loops specifically to avoid the generality introduced in http://reviews.llvm.org/D17174. While that can handle many induction variables without *needing* to exploit nsw, there's no reason not to use it if we've already proven it.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260705 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 19:05:16 +00:00
Hans Wennborg
178153ae7a [CMake] don't build libLTO when LLVM_ENABLE_PIC is OFF
When cmake is run with -DLLVM_ENABLE_PIC=OFF, build fails while
linking shared library libLTO.so, because its dependencies are built
with -fno-PIC. More details here: https://llvm.org/bugs/show_bug.cgi?id=26484.
This diff reverts r252652 (git 9fd4377ddb83aee3c049dc8757e7771edbb8ee71),
which removed check NOT LLVM_ENABLE_PIC before disabling build for libLTO.so.

Patch by Igor Sugak!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260703 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 19:02:39 +00:00
Mehdi Amini
32bf97b2b6 GlobalISel is always built since r260566, reflect it in LLVMBuild.txt
Other component could not depends on an optional library in llvm-config

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260701 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 18:43:14 +00:00
Mehdi Amini
1b8de27709 llvm-config: replace assertions with a helpful error message
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260700 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 18:43:10 +00:00
Krzysztof Parzyszek
d832030ace [Hexagon] Add utility functions to detect sign- and zero-extending loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260698 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 18:37:23 +00:00