126332 Commits

Author SHA1 Message Date
Sanjay Patel
d24b395f8b getParent()->getParent() == getFunction() and clang-format ; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257399 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 22:24:35 +00:00
Sanjay Patel
b6612e5802 don't repeat function names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257396 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 22:14:42 +00:00
Rafael Espindola
102130d17c Add a missing error handling to llvm-lto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257395 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 22:08:22 +00:00
Dan Gohman
1235eb2fc6 [WebAssembly] Reorganize address offset folding.
Always expect tglobaladdr and texternalsym to be wrapped in
WebAssemblywrapper nodes. Also, split out a regPlusGA from regPlusImm so
that it can special-case global addresses, as they can be folded in more
cases.

Unfortunately this doesn't enable any new optimizations yet due to
SelectionDAG limitations. I'll be submitting changes to the SelectionDAG
infrastructure, along with tests, in a separate patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257394 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 22:05:44 +00:00
Matt Arsenault
6e3a667705 AMDGPU: Implement {{s|u}}int_to_fp i64 -> f32
The old lowering for uint_to_fp failed opencl conformance.
It might be OK for fast math mode, but I'm not sure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257393 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 22:01:48 +00:00
Lang Hames
7ab54fc926 XFAIL the LLI remote JIT tests on Win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257391 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 21:41:34 +00:00
Teresa Johnson
37ec4dcde3 Split resolveCycles(bool AllowTemps) into two interfaces and document
Address review feedback from r255909.

Move body of resolveCycles(bool AllowTemps) to
resolveRecursivelyImpl(bool AllowTemps). Revert resolveCycles back
to asserting on temps, and add new resolveNonTemporaries interface
to invoke the new implementation with AllowTemps=true. Document
the differences between these interfaces, specifically the effect
on RAUW support and uniquing. Call appropriate interface from
ValueMapper.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257389 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 21:37:41 +00:00
Pete Cooper
37aa498e31 BumpPtrAllocator::Reset should also poison the first slab which doesn't get deallocated.
When asan is enabled, we poison slabs as we allocate them, and only unpoison the pieces
we need from the slab.

However, in Reset, we were failing to reset the state of the slab back to being poisoned.

Patch by b17 c0de.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257388 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 21:28:03 +00:00
Matt Arsenault
ea5802f212 AMDGPU: Cleanup udiv test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257387 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 21:18:40 +00:00
Matt Arsenault
7717a8b940 AMDGPU: Fix crash with dispatch.ptr intrinsic with non-HSA target
It might be better to let this be a select failure instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257386 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 21:18:33 +00:00
Ahmed Bougacha
94dab4de4b [X86] Add AVX512 testcase for r248965/PR24512.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257385 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 21:16:21 +00:00
Reid Kleckner
0bd34e693f Revert "[Windows] Simplify assertion code. NFC."
This reverts commit r254363.

load64BitDebugHelp() has the side effect of loading dbghelp and setting
globals. It should be called in no-asserts builds as well as debug
builds.

llvm_unreachable is also not appropriate here, since we actually want to
return if dbghelp couldn't be loaded in a non-asserts build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257384 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 21:07:48 +00:00
Lang Hames
169ee125af [ORC] Add explicit move construction/assignment to
OrcRemoteTargetClient::ObjectAllocs.

More MSVC bot appeasement.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257382 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 20:52:33 +00:00
Reid Kleckner
b973616c17 Update the VS getting started docs to reflect the current state of support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257381 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 20:51:57 +00:00
Reid Kleckner
b79da9cb4a Use ::GetVersionEx directly rather than the Win8.1 SDK helpers
This removes ifdefs and fixes the build for users of the Win8.0 SDK,
which I happen to be. Upgrading is not hard, but executing the same code
everywhere seems better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257379 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 20:35:45 +00:00
Lang Hames
2133a4e140 [ORC] More MSVC error wrangling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257377 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 20:25:25 +00:00
Dimitry Andric
35b01daadc Ensure -mcpu=xscale works for arm targets, after rL252903 and rL252904
After these revisions, for arm targets, the -mcpu=xscale option caused
an error: "the clang compiler does not support '-mcpu=xscale'".  Adding
"v5e" as a SUB_ARCH in ARMTargetParser.def helps.

Submitted by: Andrew Turner
Differential Revision: http://reviews.llvm.org/D16043


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257376 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 20:12:53 +00:00
Adhemerval Zanella
e25b385a34 [sanitizer] [msan] Fix origin store of array types
This patch fixes the memory sanitizer origin store instrumentation for
array types.  This can be triggered by cases where frontend lowers
function return to array type instead of aggregation.

For instance, the C code:

--
struct mypair {
 int64_t x;
 int y;
};

mypair my_make_pair(int64_t x, int y)  {
 mypair p;
 p.x = x;
 p.y = y;
 return p;
}

int foo (int p)
{
  mypair z = my_make_pair(p, 0);
  return z.y + z.x;
}
--

It will be lowered with target set to aarch64-linux and -O0 to:

--
[...]
define i32 @_Z3fooi(i32 %p) #0 {
[...]
%call = call [2 x i64] @_Z12my_make_pairxi(i64 %conv, i32 0)
%1 = bitcast %struct.mypair* %z to [2 x i64]*
store [2 x i64] %call, [2 x i64]* %1, align 8
[...]
--

The origin store will emit a 'icmp' to test each store value again the
TLS origin array.  However since 'icmp' does not support ArrayType the
memory instrumentation phase will bail out with an error.

This patch change it by using the same strategy used for struct type on
array.

It fixes the 'test/msan/insertvalue_origin.cc' for aarch64 (the -O0 case).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257375 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 19:55:27 +00:00
Lang Hames
b843a2acf7 [Orc] Fix missing return.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257373 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 19:40:25 +00:00
Lang Hames
ada56848f5 [Orc] Add explicit move construction/assignment to RCMemoryManager.
Yet another attempt to pacify MSVC.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257372 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 19:39:49 +00:00
David Blaikie
c45bf3b4bf Fix some GCC 4.7 issues with the new Orc remote JIT support
I'm still seeing GCC ICE locally, but figured I'd throw this at the wall
& see if it sticks for the bots at least. Will continue investigating
the ICE in any case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257367 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 19:26:01 +00:00
Chen Li
f96d126faa Code refactoring for commit r257278.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257366 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 19:20:53 +00:00
Chad Rosier
bc71008095 [NFC] Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257365 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 19:17:36 +00:00
Lang Hames
57ad02c289 [ORC] Explicitly delete copy constructors for RCMemoryManager::Alloc.
More MSVC bot appeasement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257364 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 19:05:45 +00:00
Lang Hames
d357cbfd50 [Orc] Include <system_error> in OrcTargetClient.
Another shot at appeasing the clang-x86_64-ubuntu-gdb-75 builder.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257362 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 18:48:37 +00:00
Lang Hames
373208cd3f lli/ChildTarget now depends on OrcJIT. Add that component to the Makefile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257360 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 17:44:07 +00:00
Lang Hames
c6eb1a443f Remove the remote-JIT small code model tests for now. They're causing
intermittent XPASSes on some builders.

These can be reinstated when we have proper support for small-code model in
the JIT.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257359 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 17:38:25 +00:00
Lang Hames
27bceca193 [Orc] More explicit move construction/assignment to appease MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257358 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 17:32:03 +00:00
Lang Hames
a769f56ac5 XFAIL the remote small code model tests on x86. Small code model is not properly
supported, and only worked previously because we weren't really running them
out-of-process.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257355 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 17:09:58 +00:00
Matt Arsenault
3f2e0d9a1f AMDGPU: int_to_fp test cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257354 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 17:02:10 +00:00
Matt Arsenault
68f559ea61 AMDGPU: Fix ctlz combine for sub 32-bit types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257353 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 17:02:06 +00:00
Matt Arsenault
f12a12cd25 AMDGPU: Pattern match ffbh pattern to instruction.
The hardware instruction's output on 0 is -1 rather than 32.
Eliminate a test and select to -1. This removes an extra instruction
from the compatability function with HSAIL's firstbit instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257352 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 17:02:00 +00:00
Lang Hames
d9ff2aaafd [LLI] Remove dependence on RemoteTarget.cpp from ChildTarget's Makefile.
RemoteTarget.cpp was removed in r257343.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257351 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 17:00:31 +00:00
Lang Hames
392fee2351 [ORC] Pacify MSVC by adding explicit move construction/assignment to
OrcRemoteTargetServer::Allocator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257350 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 16:56:24 +00:00
Lang Hames
f1e6e63761 [ORC] Change 'auto' to 'std::error_code' to try to coax GCC builder into
providing a more helpful error diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257349 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 16:52:11 +00:00
Matt Arsenault
01a6cb6ce3 AMDGPU: Custom lower i64 ctlz
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257348 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 16:50:29 +00:00
Matt Arsenault
68196ac357 Mips: Remove lowerSELECT_CC
This is the same as the default expansion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257346 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 16:44:48 +00:00
Matt Arsenault
3bbc287300 LegalizeDAG: Expand ctlz with ctlz_zero_undef if legal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257345 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 16:37:46 +00:00
Matt Arsenault
4a3afd23ce AMDGPU: Remove dead target dag combine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257344 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 16:37:40 +00:00
Lang Hames
b20e09ca99 [LLI] Replace the LLI remote-JIT support with the new ORC remote-JIT components.
The new ORC remote-JITing support provides a superset of the old code's
functionality, so we can replace the old stuff. As a bonus, a couple of
previously XFAILed tests have started passing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257343 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 16:35:55 +00:00
Silviu Baranga
5f064bbdab Revert r257164 - it has caused spec2k6 failures in LTO mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257340 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 16:19:38 +00:00
Daniel Sanders
58a84d9b9c [mips] Never select JAL for calls to an absolute immediate address.
Summary:
It actually takes an offset into the current PC-region.

This fixes the 'expr' command in lldb.

Reviewers: vkalintiris, jaydeep, bhushan

Subscribers: dsanders, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257339 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 15:57:46 +00:00
Krzysztof Parzyszek
274cad5260 [Hexagon] Add check for nullptr in getFixupNoBits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257338 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 15:51:53 +00:00
Krzysztof Parzyszek
934777b603 [Hexagon] Add implicit uses of GP to GP-relative loads and stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257337 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 15:49:58 +00:00
Krzysztof Parzyszek
98b55cb591 [Hexagon] Mark D14 and GP as reserved registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257336 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 15:47:41 +00:00
Alexey Bataev
a14bfb5ac3 [X86] Reduce complexity of the LEA optimization pass, by Andrey Turetsky.
In the OptimizeLEA pass keep instructions' positions in the basic block saved and use them for calculation of the distance between two instructions instead of std::distance. This reduces complexity of the pass from O(n^3) to O(n^2) and thus the compile time.
Differential Revision: http://reviews.llvm.org/D15692


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257328 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 11:52:29 +00:00
Junmo Park
f756623784 [BranchFolding] Set correct mem refs (2nd try)
This is a recommit of r257253 which was reverted in r257270.
Previous testcase can make failure on some targets due to using opt with O3 option.

Original Summary:
Merge MBBICommon and MBBI's MMOs.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257317 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 07:15:38 +00:00
Lang Hames
cdd3d384cd [ORC] Move ORC RPC helper classes that rely on partial specialization into a
non-template base class.

Hopefully this should fix the issues with the windows bots arrising from
r257305.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257316 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 05:44:39 +00:00
Craig Topper
d05b60850b [TableGen] Allow asm writer to use up to 3 OpInfo tables instead of 2. This allows x86 to use 56 total bits made up of a 32-bit, 16-bit, and 8-bit table. Previously we were using 64 total bits.
This saves 14K from the x86 table size. And saves space on other targets as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257315 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 05:13:41 +00:00
Craig Topper
db6f0c6ae0 [TableGen] Remove unnecessary 0 terminator from an array that only existed to prevent ending an array with a comma. But that's perfectly legal and not something we need to prevent. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257314 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 05:13:38 +00:00