124703 Commits

Author SHA1 Message Date
Xinliang David Li
aeaec5e3f9 [PGO] Add v2 format compatibility test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254572 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 01:05:31 +00:00
Justin Bogner
51b567dc4b MC: Make sure to clear *all* of MCMachOStreamer's state
The CreatedADWARFSection flag was added in r232842, but isn't cleared
properly when resetting the streamer's state. Fix that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254571 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 00:52:20 +00:00
Derek Schuff
4231469f1d [WebAssembly] Add a test for wasm-store-results pass
Differential Revision: http://reviews.llvm.org/D15167

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254570 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 00:50:30 +00:00
Dan Gohman
66e256e46e [WebAssembly] Assert that byval and nest are not used for return types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254567 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 23:40:03 +00:00
David Majnemer
ff6afa9836 Rename a header guard to be more appropriate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254566 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 23:28:27 +00:00
David Majnemer
ce27c66bb4 Forgot to add this file with r254562.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254565 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 23:09:05 +00:00
Krzysztof Parzyszek
413d8cd25e [Hexagon] Improve lowering of instructions to the MC layer
- Add extenders when necessary.
- Handle some basic relocations.

This should fix the failure in tools/clang/test/CodeGenCXX/crash.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254564 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 23:08:29 +00:00
David Majnemer
1114aa2fc6 Move EH-specific helper functions to a more appropriate place
No functionality change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254562 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 23:06:39 +00:00
Alexey Samsonov
66c86b0417 Fixup for r254547: use format_hex() to simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254560 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 22:59:22 +00:00
Rafael Espindola
4744e8bfd8 Switch the linker to having a whitelist of GVs.
This replaces DoNotLinkFromSource with ValuesToLink. It also moves the
computation of ValuesToLink earlier.

It is a bit simpler and an important step in slitting the linker into an
ir mover and a linker proper.

The test change is because we now avoid creating dead declarations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254559 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 22:59:04 +00:00
Mike Aizatsky
ba2d199d49 Libfuzzer: do not pass null into user function
Differential Revision: http://reviews.llvm.org/D15098

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254558 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 22:43:53 +00:00
Reid Kleckner
de603060b9 Use std::string instead of strdup() and free() in WinCodeViewLineTables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254557 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 22:34:30 +00:00
Rafael Espindola
44b9991550 Delete what is now duplicated code.
Having to import an alias as declaration is not thinlto specific.

The test difference are because when we already have a decl and we are
not importing it, we just leave the decl alone.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254556 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 22:22:24 +00:00
David Blaikie
dc56408249 [llvm-dwp] Include only the non-empty columns in the cu_index
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254555 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 22:01:56 +00:00
Xinliang David Li
ed192380fc [PGO] Allow input value node list to be null
This is to handle the case when vp node linked
list array is laziliy initialized at runtime 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254551 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 21:47:43 +00:00
Cong Hou
aaaedd7f8f Fix a typo in LoopVectorize.cpp. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254549 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 21:33:47 +00:00
Alexey Samsonov
dae9c83029 [PowerPC] Remove wild call to RegScavenger::initRegState().
This call should in fact be made by RegScavenger::enterBasicBlock()
called below. The first call does nothing except for triggering UB,
indicated by UBSan (passing nullptr to memset()).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254548 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 21:25:28 +00:00
Alexey Samsonov
9343bd9aff [Hexagon] Remove std::hex in favor of format().
std::hex is not used anywhere in LLVM code base except for this place,
and it has a known undefined behavior (at least in libstdc++ 4.9.3):
https://llvm.org/bugs/show_bug.cgi?id=18156, which fires in UBSan
bootstrap of LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254547 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 21:13:43 +00:00
Kyle Butt
d3f55e582b Tests: PPC: remove unnecessary metadata. NFC
Remove unnecessary metadata from a test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254544 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 21:08:03 +00:00
Rafael Espindola
e39a7a6933 Also copy private linkage globals when needed.
This was an omission when handling COFF style comdats with local keys.
Should fix the sanitizer-windows bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254543 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 20:57:33 +00:00
Alexey Samsonov
78c3317f0f Re-enable UBSan tests for SystemZ: PR20980 was fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254542 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 20:46:51 +00:00
Rafael Espindola
8855924964 Don't copy information from aliasee to alias.
They are independent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254541 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 20:03:17 +00:00
Tom Stellard
27cbe8f717 AMDGPU/SI: Correctly emit agent global segment variables when targeting HSA
Differential Revision: http://reviews.llvm.org/D14508

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254540 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 19:47:57 +00:00
Krzysztof Parzyszek
4855629115 [Hexagon] Remove TFRI_V4 instruction, use existing A2_tfrsi instead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254539 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 19:44:35 +00:00
Rafael Espindola
21fca5ddce Fix linking when we copy over only a decl.
We were failing to copy the fact that the GV is weak and in the case of
an alias, producing invalid IR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254538 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 19:30:52 +00:00
Kyle Butt
325a79d6e9 [CodeGen]: Fix bad interaction with AntiDep breaking and inline asm.
AggressiveAntiDepBreaker was renaming registers specified by the user
for inline assembly. While this will work for compiler-specified
registers, it won't work for user-specified registers, and at the time
this runs, I don't currently see a way to distinguish them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254532 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 18:58:51 +00:00
Kyle Butt
b8f6117b7f Test Commit: iteratee
Remove whitespace from blank lines. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254531 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 18:53:33 +00:00
Fiona Glaser
8afe0eb7ca Fix accidental off by one change
Didn't break any tests, but did unnecessary extra work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254529 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 18:46:23 +00:00
Tom Stellard
6e3c74fe8d AMDGPU: Fix msan test failure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254527 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 18:35:23 +00:00
Fiona Glaser
2b2fb7fbf2 Scheduler / Regalloc: use unique_ptr[] instead of std::vector
vector.resize() is significantly slower than memset in many STLs
and the cost of initializing these vectors is significant on targets
with many registers. Since we don't need the overhead of a vector,
use a simple unique_ptr instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254526 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 18:32:59 +00:00
Nathan Slingerland
1c2b998913 [llvm-profdata] Change instr prof counter overflow to saturate rather than discard
Summary: This changes overflow handling during instrumentation profile merge. Rathar than throwing away records that would result in counter overflow, merged counts are instead clamped to the maximum representable value. A warning about counter overflow is still surfaced to the user as before.

Reviewers: dnovillo, davidxl, silvas

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254525 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 18:19:24 +00:00
Tim Northover
57b1a9599b AArch64: use ldxp/stxp pair to implement 128-bit atomic loads.
The ARM ARM is clear that 128-bit loads are only guaranteed to have been atomic
if there has been a corresponding successful stxp. It's less clear for AArch32, so
I'm leaving that alone for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254524 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 18:12:57 +00:00
Dan Gohman
454061bf3a [WebAssembly] Fix comments to say "LIFO" instead of "FIFO" when describing a stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254523 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 18:08:49 +00:00
Tom Stellard
26ecf8e5ac AMDGPU/SI: Don't emit group segment global variables
Summary: Only global or readonly segment variables should appear in object files.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254519 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 17:00:42 +00:00
David Majnemer
26a5db075f Do (A == C1 || A == C2) -> (A & ~(C1 ^ C2)) == C1 rather than (A == C1 || A == C2) -> (A | (C1 ^ C2)) == C2 when C1 ^ C2 is a power of 2.
Differential Revision: http://reviews.llvm.org/D14223

Patch by Amaury SECHET!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254518 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 16:15:07 +00:00
Rafael Espindola
f43a53680a Add an interesting case we already get right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254514 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 15:02:43 +00:00
Andy Gibbs
f9aa57da75 Rollback r254508 and r254511 to fix buildbots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254513 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 14:36:48 +00:00
Michael Zuckerman
a933a559f6 By intel spec
|9B DD /7| FSTSW m2byte| Valid Valid Store FPU status word at m2byteafter checking for pending unmasked floating-point exceptions.|
|9B DF E0| FSTSW AX| Valid Valid Store FPU status word in AX register after checking for pending unmasked floating-point exceptions.|
|DD /7 |FNSTSW *m2byte| Valid Valid Store FPU status word at m2bytewithout checking for pending unmasked floating-point exceptions.|
|DF E0 |FNSTSW *AX| Valid Valid Store FPU status word in AX register without checking for pending unmasked floating-point exceptions|

m2byte is word register, and therefor instruction operand need to be change from f32mem to i16mem.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254512 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 14:34:34 +00:00
Andy Gibbs
3fe37662ad Fix buildbots broken by r254508
g++ 4.7 does not allow an inline defaulted virtual destructor to be overridden,
giving the error "looser throw specifier for ... overridding ~SCEVPredicate()
noexcept (true)" (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53613).

The work-around given in the bug report above has been utilised here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254511 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 14:22:18 +00:00
Andy Gibbs
3304e8735e Fix class SCEVPredicate has virtual functions and accessible non-virtual destructor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254508 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 13:41:24 +00:00
Christof Douma
7f4f6f5059 [AArch64]: Add support for Cortex-A35
Adds support for the new Cortex-A35 ARMv8-A core.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254503 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 11:53:44 +00:00
Nemanja Ivanovic
8364ade5d9 Patch to fix a crash in the PowerPC back end due to ISD::ROTL and ISD::ROTR
not being expanded. Test case included.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254501 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 10:36:24 +00:00
Hrvoje Varga
044b4b4a43 [mips][microMIPS] Implement PREPEND, RADDU.W.QB, RDDSP, REPL.PH, REPL.QB, REPLV.PH, REPLV.QB and MTHLIP instructions
Differential Revision: http://reviews.llvm.org/D14527


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254496 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 09:31:24 +00:00
Simon Pilgrim
68cb3950c0 [X86][FMA] Optimize FNEG(FMUL) Patterns
On FMA targets, we can avoid having to load a constant to negate a float/double multiply by instead using a FNMSUB (-(X*Y)-0)

Fix for PR24366

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254495 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 09:07:55 +00:00
Elena Demikhovsky
cd9551564b AVX-512: Updated cost of FP/SINT/UINT conversion operations
I checked and updated the cost of AVX-512 conversion operations. Added cost of conversion operations in DQ mode.
Conversion of illegal types that requires vector split is not calculated right now (like for other X86 targets).

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254494 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 08:59:47 +00:00
Asaf Badouh
d4f2260f2d [X86][AVX512] add comi with Sae
add builtin_ia32_vcomisd and builtin_ia32_vcomisd

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254493 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 08:17:51 +00:00
David Blaikie
cf0403d373 [llvm-dwp] Don't rely on implicit move assignment operator (MSVC won't synthesize one)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254492 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 07:09:26 +00:00
Akira Hatanaka
ec268660c8 [AttributeSet] Overload AttributeSet::addAttribute to reduce compile
time.

The new overloaded function is used when an attribute is added to a
large number of slots of an AttributeSet (for example, to function
parameters). This is much faster than calling AttributeSet::addAttribute
once per slot, because AttributeSet::getImpl (which calls
FoldingSet::FIndNodeOrInsertPos) is called only once per function
instead of once per slot.

With this commit, clang compiles a file which used to take over 22
minutes in just 13 seconds.

rdar://problem/23581000

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254491 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 06:58:49 +00:00
Craig Topper
1bd8c8c635 [X86] Change getZeroVector to take an MVT instead of EVT. One minor change needed to only try to perform 256-it shuffle combines on legal vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254490 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 06:39:19 +00:00
David Blaikie
5001b2a939 [llvm-dwp] Emit a rather fictional debug_cu_index
This is very rudimentary support for debug_cu_index, but it is enough to
allow llvm-dwarfdump to find the offsets for  contributions and
correctly dump debug_info.

It will need to actually find the real signature of the unit and build
the real hash table with the right number of buckets, as per the DWP
specification.

It will also need to be expanded to cover the tu_index as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254489 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-02 06:21:34 +00:00