124252 Commits

Author SHA1 Message Date
Sanjoy Das
5c152c3599 [RuntimeDyld] Fix indentation and whitespace; NFC
Whitespace-only change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253105 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-14 00:16:15 +00:00
Justin Bogner
2814318a45 AArch64: Default AArch64Subtarget::ReserveX18 to true on darwin
Darwin reserves x18, so it's never ABI compliant to generate code that
uses it. Set the default value based on the OS part of the triple
rather than forcing front-ends to set the +reserve-x18 target feature
in order to build correct code for Darwin.

This will make r243310 redundant, so I'll revert that shortly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253102 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 23:05:46 +00:00
Matthias Braun
f724d184fb MachineScheduler: Print initial pressure in debug dump
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253097 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 22:30:31 +00:00
Matthias Braun
17da66b18b MachineScheduler: Improve debug output for "only one node in readyset"
When there is only 1 node left in the ready queue and it is picked call
the reason "ONLY1" instead of "NOCAND".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253096 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 22:30:29 +00:00
Matthias Braun
ca7d645a60 tablegen: Add a simple heuristic to get better names for pressure sets
Differential Revision: http://reviews.llvm.org/D14597

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253095 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 22:30:27 +00:00
Chad Rosier
2588aa9425 [LIR] Add support for creating memcpys from loops with a negative stride.
This allows us to transform the below loop into a memcpy.

void test(unsigned *__restrict__ a, unsigned *__restrict__ b) {
  for (int i = 2047; i >= 0; --i) {
    a[i] = b[i];
  }
}

This is the memcpy version of r251518, which added support for memset with
negative strided loops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253091 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 21:51:02 +00:00
Colin LeMahieu
3b47b1f0e2 [Hexagon] Fixing memory leak during relaxation by allocating MCInst in MCContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253090 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 21:45:50 +00:00
Reid Kleckner
c6477179dd [WinEH] Fix ESP management with 32-bit __CxxFrameHandler3
The C++ EH personality automatically restores ESP from the C++ EH
registration node after a catchret. I mistakenly thought it was like
SEH, which does not restore ESP.

It makes sense for C++ EH to differ from SEH here because SEH does not
use funclets for catches, and does not allow catching inside of finally.
C++ EH may need to unwind through multiple catch funclets and eventually
catchret to some outer funclet. Therefore, the runtime has to keep track
of which ESP to use with catchret, rather than having the compiler
reload it manually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253084 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 21:27:00 +00:00
Evgeniy Stepanov
e528e5711e [safestack] Rewrite isAllocaSafe using SCEV.
Use ScalarEvolution to calculate memory access bounds.
Handle function calls based on readnone/nocapture attributes.
Handle memory intrinsics with constant size.

This change improves both recall and precision of IsAllocaSafe.
See the new tests (ex. BitCastWide) for the kind of code that was wrongly
classified as safe.

SCEV efficiency seems to be limited by the fact the SafeStack runs late
(in CodeGenPrepare), and many loops are unrolled or otherwise not in LCSSA.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253083 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 21:21:42 +00:00
Akira Hatanaka
6dc74bec88 [Docs] Fix warning "Title underline too short."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253082 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 21:09:57 +00:00
Dan Gohman
061211b22d [WebAssembly] Rename the Const instructions to be upper-case too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253072 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 20:27:45 +00:00
Diego Novillo
dbe26eba86 SamplePGO - Add dump routines for LineLocation, SampleRecord and FunctionSamples
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253071 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 20:24:28 +00:00
Dan Gohman
3015ca5f45 [WebAssembly] Rename memory intrinsics to be upper-case, following convention. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253070 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 20:19:11 +00:00
Cong Hou
59f2cd8a68 [X86][SSE] Combine UNPCKL with vector_shuffle into UNPCKH to save one instruction for sext from v16i8 to v16i16 and v8i16 to v8i32.
This patch is enabling combining UNPCKL with vector_shuffle that moves the upper
half of a vector into the lower half, into a UNPCKH instruction. For example:

t2: v16i8 = vector_shuffle<8,9,10,11,12,13,14,15,u,u,u,u,u,u,u,u> t1, undef:v16i8
t3: v16i8 = X86ISD::UNPCKL undef:v16i8, t2

will be combined to:

t3: v16i8 = X86ISD::UNPCKH undef:v16i8, t1


Differential revision: http://reviews.llvm.org/D14399




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253067 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 19:47:43 +00:00
David Blaikie
6c420832f3 dwarfdump: Add support for dumping the table contents of DWP indexes
This is a recommit of 252842 which was reverted in 252859. The issue was
using %s format specifier for a StringRef - used Format's
left_justify(StringRef, int) instead.

It'd be nice to have __attribute__((format(..))) on llvm::format, but
apparently it's only implemented for c-style variadics, not C++ variadic
templates. Perhaps we could fix that & conditionalize the attribute on
such...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253065 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 19:18:49 +00:00
Chad Rosier
64294426ea Add a comment that should have made my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253063 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 19:13:40 +00:00
Reid Kleckner
54f4d61d68 Add missing triple to WinEH test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253062 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 19:11:12 +00:00
Chad Rosier
2f2a7ed5df [LIR] Factor out the code to compute base ptr for negative strided loops.
This will allow for the code to be reused in the memcpy optimization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253061 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 19:11:07 +00:00
Reid Kleckner
04538c959e [WinEH] Make UnwindHelp a fixed stack object allocated after XMM CSRs
Now the offset of UnwindHelp in our EH tables and the offset that we
store to in the prologue agree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253059 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 19:06:01 +00:00
Colin LeMahieu
6de64e032f [Hexagon] Factoring bundle creation in to a utility function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253056 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 17:42:46 +00:00
Tom Stellard
bcfbdf7afe AMDGPU: Add stony support
Patch by: Alex Deucher

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253053 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 17:06:32 +00:00
Tom Stellard
c552d8f09a ELFYAML: Add support for parsing AMDGPU section attribute flags
Reviewers: silvas

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253052 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 17:06:29 +00:00
Reid Kleckner
84831cda66 [Symbolizer] Don't use PE symbol tables to override PDB symbols
Summary:
PE files are stripped by default, and only contain the names of exported
symbols.

The actual reason that we bother to do this override by default is
actually due to a quirk of the way -gline-tables-only is implemented, so
I phrased the check as "if we are symbolizing from dwarf, do the symtab
override".

This fixes lots of Windows ASan tests that I broke in r250582.

Reviewers: samsonov

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253051 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 17:00:36 +00:00
Sanjay Patel
e3049a74d7 use range-based for loop; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253048 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 16:21:23 +00:00
James Molloy
b5ab3ba365 [ARM] Replace ARMISD::RBIT with ISD::BITREVERSE
ISD::BITREVERSE matches "rbit" completely, so remove ARMISD::RBIT and mark ISD::BITREVERSE as legal, adding a test for lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253047 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 16:05:22 +00:00
Artyom Skrobov
b2446842b9 Fixing a typo in docs/CodeGenerator.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253045 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 15:14:04 +00:00
Zlatko Buljan
055b23b90e [mips][microMIPS] Implement SHRA[_R].PH, SHRAV[_R].PH, SHRAV[_R].QB, SHRAV_R.W, SHRA_R.W, SHRL.PH, SHRL.QB, SHRLV.PH and SHRLV.QB instructions
Differential Revision: http://reviews.llvm.org/D14010


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253041 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 13:14:25 +00:00
Daniel Sanders
3b6bd9d6e0 [mips][ias] Explicitly disable IAS on asm-large-immediate.ll.
NFC at the moment but it will prevent a failure when IAS is enabled by default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253039 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 13:02:31 +00:00
Ulrich Weigand
51dc403e61 [SystemZ] Simplify boolean conditional return statements
Use clang-tidy to simplify conditonal return statements.

Author: LegalizeAdulthood
Differential Revision: http://reviews.llvm.org/D9986


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253038 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 13:00:27 +00:00
Daniel Sanders
98e49f9e4b [mips][ias] Replace invalid assembly insn in test since IAS parses inline assembly.
This is NFC at the moment but will prevent this test from failing when
IAS is the default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253033 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 11:44:00 +00:00
Dan Liew
0d86449557 [lit] Improve error message when lit fails to executable a command by
showing the executable it tried to use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253032 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 11:38:07 +00:00
Dan Liew
74771a338c [lit] Fix bug where `lit.util.which()` would return a directory
instead of executable if the argument was found inside a directory
contained in PATH.

An example where this could cause a problem is if there was a RUN line
that ran the ``test`` command and if the user had a directory in their
PATH that contained a directory called ``test/`` (that occured before
``/usr/bin/``). Lit would try to use the directory as the executable
which would fail with the rather cryptic message.

```
Could not create process due to [Errno 13] Permission denied
```

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253031 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 11:37:25 +00:00
James Molloy
3e8d99c24d [GlobalOpt] Make sure all debug lines end with '\n'
GlobalVariable::print() used to emit a newline. It hasn't for a while now, but these debug lines weren't updated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253030 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 11:05:13 +00:00
James Molloy
b81f7b0bc9 [GlobalOpt] Coding style - remove function names from doxygen comments
Suggested by Mehdi in the review of D14148.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253029 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 11:05:07 +00:00
James Molloy
57e32e94e3 [AArch64] Check the expansion of BITREVERSE in regression test
Something I missed from Hal's review, rightly pointed out by Ben Kramer - we should make sure the expansion is properly checked as it can be easy for bugs to creep in.

I've checked the scalar i8 expansion here and the vector i8 expansion in a previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253024 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 10:05:31 +00:00
James Molloy
3808e8c85d [SDAG] Fix expansion of BITREVERSE
Richard Trieu noted that UBSan detected an overflowing shift, and the obvious fix caused a crash.

What was happening was that the shiftee (1U) was indeed too small for the possible range of shifts it had to handle, but also we were using "VT.getSizeInBits()" to get the maximum type bitwidth, but we wanted "VT.getScalarSizeInBits()" to get the vector lane size instead of the entire vector size.

Use an APInt for the shift and VT.getScalarSizeInBits().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253023 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 10:02:36 +00:00
Sanjoy Das
63f8155d9d [ImplicitNulls] Add some clarifying comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253020 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 08:14:00 +00:00
Colin LeMahieu
e78416caa5 [Hexagon] Fixing leak in padEndloop by allocating in MCContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253019 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 07:58:06 +00:00
NAKAMURA Takumi
08ccc7e7d1 llvm/test/tools/llvm-profdata/text-format-errors.test: Use prepared version of the input file, instead of using echo.
...and s/\C9/\xC9/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253014 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 06:06:58 +00:00
Nathan Slingerland
572e633224 [llvm-profdata] Add check for text profile formats and improve error reporting (2nd try)
Summary:
This change addresses two possible instances of user error / confusion when
merging sampled profile data.

Previously any input that didn't match the raw or processed instrumented format
would automatically be interpreted as instrumented profile text format data.
No error would be reported during the merge.

Example:
If foo-sampled.profdata and bar-sampled.profdata are binary sampled profiles:

Old behavior:
$ llvm-profdata merge foo-sampled.profdata bar-sampled.profdata -output foobar-sampled.profdata
$ llvm-profdata show -sample foobar-sampled.profdata
error: foobar-sampled.profdata:1: Expected 'mangled_name:NUM:NUM', found  lprofi

This change adds basic checks for valid input data when assuming text input.
It also makes error messages related to file format validity more specific about
the assumbed profile data type.

New behavior:
$ llvm-profdata merge foo-sampled.profdata bar-sampled.profdata -o foobar-sampled.profdata
error: foo.profdata: Unrecognized instrumentation profile encoding format
Perhaps you forgot to use the -sample option?

Reviewers: bogner, davidxl, dnovillo

Subscribers: davidxl, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253009 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 03:47:58 +00:00
Kostya Serebryany
1adc6064bc [libFuzzer] more trophies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253006 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 02:44:16 +00:00
Davide Italiano
73922aaade [lib/Linker] Convert assert(false) to llvm_unreachable().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253005 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 02:16:51 +00:00
Kostya Serebryany
ad9ec32c1f [libFuzzer] make libFuzzer build even with a compiler that does not have sanitizer headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253003 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 01:54:40 +00:00
Colin LeMahieu
333bbfc0c5 [Hexagon] NFC. Adding a number of packet correctness tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253000 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 01:46:06 +00:00
Akira Hatanaka
7edcc75a6b Revert r252990.
Some of the buildbots are still failing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252999 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 01:44:32 +00:00
Dan Gohman
3ba85f0622 [WebAssembly] Inline asm support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252997 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 01:42:29 +00:00
NAKAMURA Takumi
b8e1ed86a5 LLVM_ENABLE_MODULES: No need to set -fcxx-modules in trunk, just -fmodules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252996 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 01:26:31 +00:00
Akira Hatanaka
2069c3c898 Provide a way to specify inliner's attribute compatibility and merging.
This reapplies r252949. I've changed the type of FuncName to be
std::string instead of StringRef in emitFnAttrCompatCheck.

Original commit message for r252949:

Provide a way to specify inliner's attribute compatibility and merging
rules using table-gen. NFC.

This commit adds new classes CompatRule and MergeRule to Attributes.td,
which are used to generate code to check attribute compatibility and
merge attributes of the caller and callee.

rdar://problem/19836465


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252990 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 01:23:11 +00:00
Colin LeMahieu
e1fbc7e8ba [Hexagon] Adding relaxation functionality to backend and test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252989 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 01:12:25 +00:00
Dan Gohman
223fb8cb62 [WebAssembly] Un-mangle the conversion instruction names.
This arranges the types in the LLVM instruction names in the same order that
they appear in the WebAssembly opcode names, and eliminates
double-underscores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252988 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-13 00:50:04 +00:00