124885 Commits

Author SHA1 Message Date
Andrew Kaylor
5779341a6d Move branch folding test to a better location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254640 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 19:41:25 +00:00
Andrew Kaylor
44a7fca432 Fix buildbot failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254636 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 19:30:38 +00:00
Rafael Espindola
2272eac949 Simplify test. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254631 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 19:10:55 +00:00
Easwaran Raman
fd1c9c5043 Test commit.
Remove blank spaces at the end of comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254630 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 19:03:20 +00:00
Andrew Kaylor
c4b843ccb7 [WinEH] Avoid infinite loop in BranchFolding for multiple single block funclets
Differential Revision: http://reviews.llvm.org/D14996



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254629 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 18:55:28 +00:00
Chris Bieneman
0123bc6bea [CMake] Add option LLVM_EXTERNALIZE_DEBUGINFO
Summary: This adds support for generating dSYM files and stripping debug info from executables and dylibs. It also supports passing -object_path_lto to the linker to generate dSYMs for LTO builds.

Reviewers: bogner, friss

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254627 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 18:45:39 +00:00
David Blaikie
d61481245d dwarfdump: Correctly indentify the indicies for DWP records
The indicies are one-based, not zero-based, per the spec.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254626 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 18:41:59 +00:00
Teresa Johnson
1c14f2864d [ThinLTO] Appending linkage fixes
Summary:
Fix import from module with appending var, which cannot be imported. The
first fix is to remove an overly-aggressive error check.

The second fix is to deal with restructuring introduced to the module
linker yesterday in r254418 (actually, this fix was included already
in r254559, just added some additional cleanup).

Test by Mehdi Amini.

Reviewers: joker.eph, rafael

Subscribers: joker.eph, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254624 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 18:20:05 +00:00
Krzysztof Parzyszek
83c34652ff [Hexagon] Remove variable unused in NDEBUG build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254623 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 17:53:34 +00:00
Matthias Braun
23a903a517 AArch64FastISel: Use cbz/cbnz to branch on i1
In the case of a conditional branch without a preceding cmp we used to emit
a "and; cmp; b.eq/b.ne" sequence, use tbz/tbnz instead.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254621 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 17:19:58 +00:00
Krzysztof Parzyszek
5d94a27cae Friendly takeover of the Hexagon backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254620 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 17:07:12 +00:00
Krzysztof Parzyszek
55c790e29c [Hexagon] Implement CONCAT_VECTORS for HVX using V6_vcombine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254617 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 16:47:20 +00:00
Colin LeMahieu
44386caaac [Hexagon] NFC Using canonicalizePacket to compound/duplex/pad packets rather than doing it separately. This also ensures the integrated assembler path matches the assembly parser path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254616 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 16:37:21 +00:00
Rafael Espindola
7fc4331080 Simplify ValueMap handling.
We now just return values and let ValueMap handle the map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254615 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 16:36:16 +00:00
Krzysztof Parzyszek
695e5cca23 [Hexagon] Fix instruction descriptor flags for memory access size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254613 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 15:41:33 +00:00
Rafael Espindola
90ebc9e320 Don't pass member variables to member functions. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254610 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 14:48:20 +00:00
Rafael Espindola
927e4ae257 Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254609 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 14:35:15 +00:00
Marina Yatsina
3a64f1988f [X86] MS inline asm: produce error when encountering "<type> ptr <reg name>"
Currently "<type> ptr <reg name>" treated as <reg name> in MS inline asm, ignoring the "<type> ptr" completely and possibly ignoring the intention of the user.
Fixed llvm to produce an error when encountering "<type> ptr <reg name>" operands.

For example: andpd xmm1,xmmword ptr xmm1 --> andpd xmm1, xmm1 
though andpd has 2 possible matching formats - andpd xmm, xmm/m128

Patch by: ziv.izhar@intel.com
Differential Revision: http://reviews.llvm.org/D14607



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254607 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 12:17:03 +00:00
Zlatko Buljan
1051eae13a [mips][DSP] Add DSPr1 and DSPr2 tests for the standard encodings
Differential Revision: http://reviews.llvm.org/D15141


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254598 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 09:56:39 +00:00
Marina Yatsina
7ee142e3f6 [X86] Add support for fcomip, fucomip for Intel syntax
According to x86 spec, fcomip and fucomip should be supported for Intel syntax.

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




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254595 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 08:55:33 +00:00
Andy Gibbs
e95d304fd3 Fix class SCEVPredicate has virtual functions and accessible non-virtual destructor.
It is not enough to simply make the destructor virtual since there is a g++ 4.7
issue (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53613) that throws the
error "looser throw specifier for ... overridding ~SCEVPredicate() noexcept".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254592 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 08:20:20 +00:00
Craig Topper
15766ec566 [TableGen] Remove an assumption about the order of encodings in the MVT::SimpleValueType enum. Instead of assuming the types are sorted by size, scan the typeset arrays to find the smallest/largest type. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254589 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 05:57:37 +00:00
Tom Stellard
d26f921796 AMDGPU/SI: Emit constant arrays in the .hsrodata_readonly_agent section
Summary: This is done only when targeting HSA.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254587 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 03:34:32 +00:00
Matthias Braun
033f871101 Revert "ScheduleDAGInstrs: Rework schedule graph builder."
This works mostly fine but breaks some stage 1 builders when compiling
compiler-rt on i386. Revert for further investigation as I can't see an
obvious cause/fix.

This reverts commit r254577.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254586 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 03:01:10 +00:00
Mehdi Amini
e3c21d3c16 clang-format FunctionImport after refactoring (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254585 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 02:58:14 +00:00
Mehdi Amini
2d8142d991 Rename Set variable to be plural
Thanks Sean Silva for catching this.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254584 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 02:40:39 +00:00
Mehdi Amini
690d7b2a89 Refactor FunctionImporter::importFunctions with a helper function to process the Worklist (NFC)
This precludes some more functional changes to perform bulk imports.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254583 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 02:37:33 +00:00
Mehdi Amini
8466beff26 Adapt comment and rename variable in ModuleLinker to describe more accurately the actual use.
Thanks Sean Silva for the suggestion.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254582 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 02:37:30 +00:00
Mehdi Amini
d4c7e117aa Remove "ExportingModule" from ThinLTO Index (NFC)
There is no real reason the index has to have the concept of an
exporting Module. We should be able to have one single unique
instance of the Index, and it should be read-only after creation
for the whole ThinLTO processing.
The linker plugin should be able to process multiple modules (in
parallel or in sequence) with the same index.

The only reason the ExportingModule was present seems to be to
implement hasExportedFunctions() that is used by the Module linker
to decide what to do with the current Module.
For now I replaced it with a query to the map of Modules path to
see if this module was declared in the Index and consider that if
it is the case then it is probably exporting function.
On the long term the Linker interface needs to evolve and this
call should not be needed anymore.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254581 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 02:37:23 +00:00
Joerg Sonnenberger
c0ebe8e842 Add a TODO item that the nop handling before FP conditional branches is
not enough for SPARCv7.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254580 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 02:35:24 +00:00
Matthias Braun
c0a189c379 ScheduleDAGInstrs: Rework schedule graph builder.
The new algorithm remembers the uses encountered while walking backwards
until a matching def is found. Contrary to the previous version this:
- Works without LiveIntervals being available
- Allows to increase the precision to subregisters/lanemasks
  (not used for now)

The changes in the AMDGPU tests are necessary because the R600 scheduler
is not stable with respect to the order of nodes in the ready queues.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254577 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 02:05:27 +00:00
Matthias Braun
26ddca1969 RegisterPressure: Use range based for, fix else style; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254575 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 01:44:45 +00:00
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