141533 Commits

Author SHA1 Message Date
Peter Collingbourne
66a1cdb578 LTO: Remove Symbol::getIRName().
Its only use was in the LTO implementation. Also document
Symbol::getName().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288302 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 02:51:12 +00:00
Kostya Serebryany
0719114a69 revert r288283 as it causes debug info (line numbers) to be lost in instrumented code. also revert r288299 which was a workaround for the problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288300 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 02:06:56 +00:00
Kostya Serebryany
aa777036e4 [libFuzzer] temporary disable a part of the test broken by r288283
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288299 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 01:33:44 +00:00
Derek Schuff
a95cded1a3 [WebAssembly] Emit .import_global assembler directives
Support a new assembler directive, .import_global, to declare imported
global variables (i.e. those with external linkage and no
initializer). The linker turns these into wasm imports.

Patch by Jacob Gravelle

Differential Revision: https://reviews.llvm.org/D26875

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288296 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 00:11:15 +00:00
Matthias Braun
29c7b3a03e Move most EH from MachineModuleInfo to MachineFunction
Most of the exception handling members in MachineModuleInfo is actually
per function data (talks about the "current function") so it is better
to keep it at the function instead of the module.

This is a necessary step to have machine module passes work properly.

Also:
- Rename TidyLandingPads() to tidyLandingPads()
- Use doxygen member groups instead of "//===- EH ---"... so it is clear
  where a group ends.
- I had to add an ugly const_cast at two places in the AsmPrinter
  because the available MachineFunction pointers are const, but the code
  wants to call tidyLandingPads() in between
  (markFunctionEnd()/endFunction()).

Differential Revision: https://reviews.llvm.org/D27227

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288293 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 23:49:01 +00:00
Matthias Braun
40485c228c Move VariableDbgInfo from MachineModuleInfo to MachineFunction
VariableDbgInfo is per function data, so it makes sense to have it with
the function instead of the module.

This is a necessary step to have machine module passes work properly.

Differential Revision: https://reviews.llvm.org/D27186

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288292 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 23:48:50 +00:00
Matthias Braun
14250381b8 Move FrameInstructions from MachineModuleInfo to MachineFunction
This is per function data so it is better kept at the function instead
of the module.

This is a necessary step to have machine module passes work properly.

Differential Revision: https://reviews.llvm.org/D27185

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288291 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 23:48:42 +00:00
Matthias Braun
26256fb2f9 MCStreamer: Use "cfi" for CFI related temp labels.
Choosing a "cfi" name makes the intend a bit clearer in an assembly dump
and more importantly the assembly dumps are slightly more stable as the
numbers don't move around anymore when unrelated code calls
createTempSymbol() more or less often.
As they are temp labels the name doesn't influence the generated object
code.

Differential Revision: https://reviews.llvm.org/D27244

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288290 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 23:48:26 +00:00
Peter Collingbourne
5c1bc63307 llvm-lto2: Simpler workaround for PR30396.
Maintain the command line resolutions as a map to a list of resolutions
rather than a single resolution, and apply the resolutions in the order
observed. This is not only simpler but allows us to test the scenario where
the two symbols have different resolutions.

Differential Revision: https://reviews.llvm.org/D27285

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288288 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 23:19:05 +00:00
Paul Robinson
561ad767af [PS4] Tighten up a triple check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288286 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 23:14:27 +00:00
Eugene Zelenko
e6159142c4 Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288285 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 23:10:42 +00:00
Paul Robinson
241e6793ec Recommit r288212: Emit 'no line' information for interesting 'orphan' instructions.
The LLDB tests are now ready for this patch.

DWARF specifies that "line 0" really means "no appropriate source
location" in the line table.  Use this for branch targets and some
other cases that have no specified source location, to prevent
inheriting unfortunate line numbers from physically preceding
instructions (which might be from completely unrelated source).

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288283 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 22:49:55 +00:00
Kostya Serebryany
b89fb12b58 [libFuzzer] extend -rss_limit_mb to crash instantly on a single malloc that exceeds the limit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288281 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 22:39:35 +00:00
David Callahan
bcdc161524 Only computeRelativePath() on new members
Summary:
When using thin archives, and processing the same archive multiple times, we were mangling existing entries.  The root cause is that we were calling computeRelativePath() more than once.   Here, we only call it when adding new members to an archive.

Note that D27218 changes the way thin archives are printed, and will break the new unit test included here.  Depending on which one lands first, the other will need to be slightly modified.

Reviewers: rafael, davide

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D27217

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288280 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 22:32:58 +00:00
Joel Jones
3143430807 [AArch64] Refactor LSE support as feature separate from V8.1a support.
Summary:
This is preparation for ThunderX processors that have Large
System Extension (LSE) atomic instructions, but not the 
other instructions introduced by V8.1a.
This will mimic changes to GCC as described here:
https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00388.html

LSE instructions are: LD/ST<op>, CAS*, SWP

Reviewers: t.p.northover, echristo, jmolloy, rengolin

Subscribers: aemerson, mehdi_amini

Differential Revision: https://reviews.llvm.org/D26621


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288279 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 22:25:24 +00:00
Evgeny Stupachenko
e18cb89a65 Fix LSR best register search algorithm.
Summary:
Fix a case when first register in a search has maximum
RegUses.getUsedByIndices(Reg).count()

Reviewers: qcolombet

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

From: Evgeny Stupachenko <evstupac@gmail.com>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288278 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 22:23:51 +00:00
Matthias Braun
76914be1f4 Clarify rules for reserved regs, fix aarch64 ones.
No test case necessary as the problematic condition is checked with the
newly introduced assertAllSuperRegsMarked() function.

Differential Revision: https://reviews.llvm.org/D26648

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288277 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 22:17:10 +00:00
Kostya Serebryany
297c443f76 [libFuzzer] extend -print_coverage to print the comma-separated list of covered dirs. Note: the Windows stub for DirName is left unimplemented
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288276 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 21:53:32 +00:00
Zachary Turner
12889449a8 [LibFuzzer] Add Windows implementations of some IO functions.
This patch moves some posix specific file i/o code into a new
file, FuzzerIOPosix.cpp, and provides implementations for these
functions on Windows in FuzzerIOWindows.cpp.  This is another
incremental step towards getting libfuzzer working on Windows,
although it still should not be expected to be fully working.

Patch by Marcos Pividori
Differential Revision: https://reviews.llvm.org/D27233

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288275 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 21:44:26 +00:00
Michael Kuperstein
39c1e3d2d7 [LoopUnroll] Implement profile-based loop peeling
This implements PGO-driven loop peeling.

The basic idea is that when the average dynamic trip-count of a loop is known,
based on PGO, to be low, we can expect a performance win by peeling off the
first several iterations of that loop.
Unlike unrolling based on a known trip count, or a trip count multiple, this
doesn't save us the conditional check and branch on each iteration. However,
it does allow us to simplify the straight-line code we get (constant-folding,
etc.). This is important given that we know that we will usually only hit this
code, and not the actual loop.

This is currently disabled by default.

Differential Revision: https://reviews.llvm.org/D25963


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288274 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 21:13:57 +00:00
Sanjay Patel
b34fe0f02f [InstCombine] allow more narrowing transforms for logic ops
We had a limited version of this for scalar 'and'; this expands
the transform to 'or' and 'xor' and allows vectors types too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288273 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 20:48:54 +00:00
Sanjay Patel
ba32f788d8 [InstCombine] add tests to show potentially missed logic+trunc transforms; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288270 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 20:20:49 +00:00
Quentin Colombet
acd3866873 CODE_OWNERS: Take ownership of Loop Strenght Reduce.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288268 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 19:55:49 +00:00
Mehdi Amini
19ef8ff90c [git-llvm] Use --force-interactive when commiting to enable SVN to prompt password
When svn does not know the password and it has to prompt, it needs to query.
However it won't when invoked from the Python script and instead fails with:

svn: E215004: Authentication failed and interactive prompting is disabled; see the --force-interactive option

Differential Revision: https://reviews.llvm.org/D27274

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288266 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 19:12:53 +00:00
Mehdi Amini
09d3a40b84 Fix macro check for ABI breacking check: should use #if instead of #ifndef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288265 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 19:08:41 +00:00
Zachary Turner
1a3900e81e [LibFuzzer] Split up some functions among different headers.
In an effort to get libfuzzer working on Windows, we need to make
a distinction between what functions require platform specific
code (e.g. different code on Windows vs Linux) and what code
doesn't.  IO functions, for example, tend to be platform
specific.

This patch separates out some of the functions which will need
to have platform specific implementations into different headers,
so that we can then provide different implementations for each
platform.

Aside from that, this patch contains no functional change.  It
is purely a re-organization.

Patch by Marcos Pividori
Differential Revision: https://reviews.llvm.org/D27230

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288264 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 19:06:14 +00:00
Matt Arsenault
ee3dedb147 AMDGPU: Move mir tests into mir test directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288262 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 18:50:26 +00:00
Sanjay Patel
785e64db06 [InstCombine] update test to use FileCheck and auto-generate checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288261 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 18:49:56 +00:00
Simon Pilgrim
3a87393b34 [X86][SSE] Added tests showing missed combines of ANDs with shuffles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288259 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 18:15:10 +00:00
Eugene Zelenko
c02caf5200 Fix some Clang-tidy and Include What You Use warnings; other minor fixes (NFC).
This preparation to remove SetVector.h dependency on SmallSet.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288256 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 17:48:10 +00:00
Sanjay Patel
5ed39f2608 [InstCombine] auto-generate checks for select+bitwise logic tests; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288254 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 17:07:21 +00:00
Silviu Baranga
88948ad1d3 [AArch64] Fix useful bits detection for BFM instructions
Summary:
When computing useful bits for a BFM instruction, we need
to take into consideration the case where both operands
of the BFM are equal and provide data that we need to track.

Not doing this can cause us to miss useful bits.
    
Fixes PR31138 (https://llvm.org/bugs/show_bug.cgi?id=31138)

Reviewers: t.p.northover, jmolloy

Subscribers: evandro, gberry, srhines, pirama, mcrosier, aemerson, llvm-commits, rengolin

Differential Revision: https://reviews.llvm.org/D27130

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288253 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 17:04:22 +00:00
Derek Schuff
7a578c9156 [WebAssembly] Add llvm-objdump support for wasm file format
This is the first part of an effort to add wasm binary
support across all llvm tools.

Patch by Sam Clegg

Differential Revision: https://reviews.llvm.org/D26172

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288251 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 16:49:11 +00:00
Simon Pilgrim
b8f993f339 [X86][SSE] Add support for target shuffle constant folding
Initial support for target shuffle constant folding in cases where all shuffle inputs are constant. We may be able to relax this and merge shuffles with only some constant inputs in the future.

I've added the helper function getTargetConstantBitsFromNode (based off a similar function in X86ShuffleDecodeConstantPool.cpp) that could be reused for other cases requiring constant vector extraction.

Differential Revision: https://reviews.llvm.org/D27220

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288250 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 16:33:46 +00:00
Zachary Turner
3ed9686965 [LibFuzzer] Add macro flags for Posix and Windows.
This is the beginning of an effort to get libfuzzer working on
Windows.  This is a NFC to just add some macros for platform
detection on Windows.

Patch by Marcos Pividori
Differential Revision: https://reviews.llvm.org/D27229

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288249 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 16:32:54 +00:00
Nicolai Haehnle
989c694b9f [SelectionDAG] Refactor TargetLowering::expandMUL (NFC)
Summary: Further preparation for the expansion of MUL_LOHI added in D24956.

Reviewers: efriedma, RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D27064

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288248 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 16:26:33 +00:00
Pavel Labath
731473a9e8 [Support] Use HAVE_DLOPEN to guard dlopen(3) usage
Summary:
The usage was previously guarded by HAVE_DLFCN. This breaks on Android with
LLVM_BUILD_STATIC as the platform does not provide a static version of libdl.
Using HAVE_DLOPEN fixes it as the code will only get used if we are actually able
to link an executable using dlopen.

Reviewers: rafael, beanz

Subscribers: tberghammer, danalbert, llvm-commits

Differential Revision: https://reviews.llvm.org/D26504

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288246 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 15:34:29 +00:00
Sanjay Patel
ec0235a568 [AArch64] use exact checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288245 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 15:00:43 +00:00
Krzysztof Parzyszek
398063c8f7 [PowerPC] Preserve machine dominator tree in PPCVSXFMAMutate
It is needed by LiveIntervalAnalysis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288243 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 13:31:09 +00:00
Simon Pilgrim
080d2a96df Updated test with -verify-machineinstrs to check for PR21931
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288242 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 13:21:12 +00:00
Simon Pilgrim
bdf16bd55d [X86][SSE] Add tests demonstrating missed opportunities to combine 64-bit element unpacks with horizontal pair ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288240 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 11:30:33 +00:00
Benjamin Kramer
bf60ce0ebd Apply clang-tidy's 'performance-faster-string-find' check to LLVM.
No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288235 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 10:01:11 +00:00
Jonas Devlieghere
fc89a6a1e9 Revert 'Test commit as per developer policy'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288233 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 08:24:43 +00:00
Jonas Devlieghere
bc02eec1d3 Test commit as per developer policy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288232 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 08:06:23 +00:00
Adam Nemet
d52ad61e79 Revert "[GVN] Basic optimization remark support"
This reverts commit r288210.

The failure on the stage2 LTO build is back.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288226 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 01:14:35 +00:00
Lang Hames
db04d03093 [RuntimeDyld] Skip undefined symbols when building the symbol table.
Storing these in the symbol table (with zero values) is just wasted space.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288225 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 01:12:07 +00:00
Nemanja Ivanovic
502534bc2a [PowerPC] Improvements for BUILD_VECTOR Vol. 2
This patch corresponds to review:
https://reviews.llvm.org/D26023

This patch adds support for converting a vector of loads into a single load if
the loads are consecutive (in either direction).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288219 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 23:57:54 +00:00
Nemanja Ivanovic
17f24fa4e1 [PowerPC] Improvements for BUILD_VECTOR Vol. 2
This patch corresponds to review:
https://reviews.llvm.org/D25980

This is the 2nd patch in a series of 4 that improve the lowering and combining
for BUILD_VECTOR nodes on PowerPC. This particular patch combines a build vector
of fp-to-int conversions into an fp-to-int conversion of a build vector of fp
values. For example:
Converts (build_vector (fp_to_[su]i $A), (fp_to_[su]i $B), ...)
Into (fp_to_[su]i (build_vector $A, $B, ...))).
Which is a natural match for much cleaner code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288218 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 23:36:03 +00:00
Peter Collingbourne
e8971cbe03 Add another missing dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288217 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 23:22:55 +00:00
Paul Robinson
b31b2ecb10 Revert r288212 due to lldb failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288216 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 23:20:35 +00:00