126047 Commits

Author SHA1 Message Date
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
NAKAMURA Takumi
b201aa77b0 Fix examples corresponding to r257302.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257313 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 05:04:20 +00:00
Lang Hames
9705af5059 [Orc] Remove the empty class definitions in RPCUtils.h in the hope of working
around MSVC's C2783 error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257312 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 04:04:20 +00:00
Xinliang David Li
189e8f0b8a Move all decls in coverage namespace into CoverageMapping.h/NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257311 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 03:54:18 +00:00
Lang Hames
140f7b56a0 Orc] Drop PageSize member from Orc architecture support class in favour of
Process::getPageSize() - the former is redundant.

NFC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257310 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 02:41:17 +00:00
Lang Hames
ed650a3bd9 [Orc] Remove the FPRPCChannel class from RPCChannel.h - it requires unistd.h,
which was removed in r257306.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257309 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 02:15:12 +00:00
Craig Topper
b2e58d7b03 [TableGen] Remove a few spaces from AsmMatcher output. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257308 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 02:11:36 +00:00
Lang Hames
542664f869 [Orc] Include the IndirectionUtils header in OrcRemoteTargetClient.
This should fix the modules builder.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257307 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 01:59:35 +00:00
Lang Hames
838d9256d8 [Orc] Remote the <unistd> include introduced in r257305 - it's not needed, and
broke the windows bots.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257306 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 01:55:19 +00:00
Lang Hames
51c60258a4 [Orc] Add support for remote JITing to the ORC API.
This patch adds utilities to ORC for managing a remote JIT target. It consists
of:

1. A very primitive RPC system for making calls over a byte-stream.  See
RPCChannel.h, RPCUtils.h.

2. An RPC API defined in the above system for managing memory, looking up
symbols, creating stubs, etc. on a remote target. See OrcRemoteTargetRPCAPI.h.

3. An interface for creating high-level JIT components (memory managers,
callback managers, stub managers, etc.) that operate over the RPC API. See
OrcRemoteTargetClient.h.

4. A helper class for building servers that can handle the RPC calls. See
OrcRemoteTargetServer.h.

The system is designed to work neatly with the existing ORC components and
functionality. In particular, the ORC callback API (and consequently the
CompileOnDemandLayer) is supported, enabling lazy compilation of remote code.

Assuming this doesn't trigger any builder failures, a follow-up patch will be
committed which tests these utilities by using them to replace LLI's existing
remote-JITing demo code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257305 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 01:40:11 +00:00
Craig Topper
4008b31dfe [AVX-512] Remove another extra space from the Intel syntax asm strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257304 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 01:03:40 +00:00
Craig Topper
7055a08ff3 [AVX-512] Fix test case update missed in r257299.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257303 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 00:56:48 +00:00
Lang Hames
bba386e4fe [Orc] Rename OrcTargetSupport to OrcArchitectureSupport to avoid confusion with
the upcoming remote-target support classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257302 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 00:56:15 +00:00
Craig Topper
5527bd5d51 [AVX-512] Remove more superfluous spaces from asm strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257301 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 00:44:58 +00:00
Craig Topper
8431640567 [AVX-512] Remove unused Round and Itinerary from the maskable_cmp multiclasses. They weren't used and there were extra spaces in the asm string to prepare for the concatenations of the round string that wasn't ever used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257300 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 00:44:56 +00:00
Craig Topper
172de01e7c [AVX-512] Make spacing between comma and {sae} operand consistent in asm strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257299 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 00:44:52 +00:00
Craig Topper
34515e2da6 [X86] Remove extra spaces from MPX instruction asm strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257298 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 00:44:46 +00:00
Lang Hames
59c18117cb [Orc] Add error codes and a new std::error_category for remote-jit errors.
These will be used by an upcoming patch that adds remote-jit support utilities
to ORC.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257297 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 00:34:13 +00:00
Lang Hames
e6dd20c1d7 [RuntimeDyld] Add a notifyObjectLoaded method to RuntimeDyld::MemoryManager.
This is a more generic version of the MCJITMemoryManager::notifyObjectLoaded
method: It provides only a RuntimeDyld reference (rather than an
ExecutionEngine), and so can be used with ORC JIT stacks.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257296 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 23:59:41 +00:00
Xinliang David Li
66a4a1fe87 Move coveragemap_error enum into coverage namespace and InstrProf.h /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257295 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 21:56:33 +00:00
Lang Hames
cb4ab730d6 [RuntimeDyld] Add alignment arguments to the reserveAllocationSpace method of
RuntimeDyld::MemoryManager.

The RuntimeDyld::MemoryManager::reserveAllocationSpace method is called when
object files are loaded, and gives clients a chance to pre-allocate memory for
all segments. Previously only the size of each segment (code, ro-data, rw-data)
was supplied but not the alignment. This hasn't caused any problems so far, as
most clients allocate via the MemoryBlock interface which returns page-aligned
blocks. Adding alignment arguments enables finer grained allocation while still
satisfying alignment restrictions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257294 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 18:51:50 +00:00
Keno Fischer
1f644cd56a [SectionMemoryManager] Don't just drop the RO free list
In r255760, I optimized the SectionMemoryManager to make better use
of virtual memory on platforms where the allocation granularity was
bigger than the protection granularity. As part of this, fixing up
the free list became more complicated and was moved into
`applyMemoryGroupPermissions`. Unfortunately, I forgot to actually
remove the call that drops the free list for RO memory (I did
remove the corresponding one for RX memory), defeating the whole
optimization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257293 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 18:17:12 +00:00
Daniel Berlin
d046f20351 Speed up LiveDebugValues
Summary:
Use proper dataflow ordering to speed convergence.
This will converge the testcase on bug 26055 in 2 iterations.

(data structures speedups to come to make even that faster)

Reviewers: kcc, samsonov, echristo, dblaikie, tvvikram

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257292 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 18:08:32 +00:00
NAKAMURA Takumi
e54dc2a5c8 OrcJITTests//ObjectLinkingLayerTest.cpp: Appease msc18's C2327. It seems definition of nested class would confuse the context.
llvm\unittests\ExecutionEngine\Orc\ObjectLinkingLayerTest.cpp(115) : error C2327: 'llvm::OrcExecutionTest::TM' : is not a type name, static, or enumerator
  llvm\unittests\ExecutionEngine\Orc\ObjectLinkingLayerTest.cpp(115) : error C2065: 'TM' : undeclared identifier

FYI, "this->TM" was valid even before moving class SectionMemoryManagerWrapper.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257290 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 15:56:49 +00:00
Benjamin Kramer
b3cad3ca30 [ADT] Another stab at fixing the PointerEmbeddedInt build for MSVC.
MSVC18 seems to have other problems here, just hardcode uintptr_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257289 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 14:27:26 +00:00
Benjamin Kramer
7eac64cced [ADT] Unbreak PointerEmbeddedInt build with MSVC.
MSVC seems to have problems looking up Value inside of the template. Not
really sure whether that's a bug there or Clang and GCC being too
permissive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257288 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 14:06:29 +00:00
Elena Demikhovsky
d6de44078b Optimized instruction sequence for sitofp operation on X86-32
Optimized sitofp i64 %x to double. The current sequence

movl %ecx, 8(%esp) 
movl %edx, 12(%esp) 
fildll 8(%esp)

is replaced with:

movd %ecx, %xmm0 
movd %edx, %xmm1 
punpckldq %xmm1, %xmm0 
movq %xmm0, 8(%esp)

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257285 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 09:41:22 +00:00
Chandler Carruth
ca4af1ae34 [ADT] Add an abstraction for embedding an integer within a pointer-like
type.

This makes it easy and safe to use a set of flags as one elmenet of
a tagged union with pointers. There is quite a bit of code that has
historically done this by casting arbitrary integers to "pointers" and
assuming that this was safe and reliable. It is neither, and has started
to rear its head by triggering safety asserts in various abstractions
like PointerLikeTypeTraits when the integers chosen are invariably poor
choices for *some* platform and *some* situation. Not to mention the
(hopefully unlikely) prospect of one of these integers actually getting
allocated!

With this, it will be straightforward to build type safe abstractions
like this without being error prone. The abstraction itself is also
remarkably simple thanks to the implicit conversion.

This use case and pattern was also independently created by the folks
working on Swift, and they're going to incrementally add any missing
functionality they find.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257284 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 09:40:13 +00:00
Michael Zuckerman
e496b80d03 [AVX512] add PRORVQ and PRORVD Intrinsic
Differential Revision:http://reviews.llvm.org/D15955



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257283 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 09:16:41 +00:00
Chandler Carruth
560cdb12b5 [ADT] Add a sum type abstraction for pointer-like types.
This is a much more general and powerful form of PointerUnion. It
provides a reasonably complete sum type (from type theory) for
pointer-like types. It has several significant advantages over the
existing PointerUnion infrastructure:

1) It allows more than two pointer types to participate without awkward
   nesting structures.
2) It directly exposes the tag so that it is convenient to write
   switches over the possible members.
3) It can re-use the same type for multiple tag values, something that
   has been worked around by either abusing PointerIntPair or defining
   nonce types and doing unsafe pointer casting.
4) It supports customization of the PointerLikeTypeTraits used for
   specific member types. This means it could (in theory) be used even
   with types that are over-aligned on allocation to expose larger
   numbers of bits to the tag.

All in all, I think it is at least complimentary to the existing
infrastructure, and a strict improvement for some use cases.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257282 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 08:48:23 +00:00
Craig Topper
6d24e7dabe [ADT] Remove 'reinterpreted as a pointer' from some Twine comments. Integers have been stored directly in a union for some time. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257281 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 08:27:13 +00:00
David Majnemer
75771fdb0e Add test for r257279.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257280 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 07:13:33 +00:00
David Majnemer
0b06a2d608 [JumpThreading] Don't forget to report that the IR changed
JumpThreading's runOnFunction is supposed to return true if it made any
changes.  JumpThreading has a call to removeUnreachableBlocks which may
result in changes to the IR but runOnFunction didn't appropriate account
for this possibility, leading to badness.

While we are here, make sure to call LazyValueInfo::eraseBlock in
removeUnreachableBlocks;  JumpThreading preserves LVI.

This fixes PR26096.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257279 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 07:13:04 +00:00
Chen Li
83fa9b85da Fix a control flow problem in commit rL257277.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257278 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 06:13:32 +00:00
Chen Li
a05b979e48 [SimplifyCFG] Extend SimplifyResume to handle phi of trivial landing pad.
Summary:
This is a fix of D13718. D13718 was committed but then reverted because of the following bug:
https://llvm.org/bugs/show_bug.cgi?id=25299

This patch fixes the issue shown in the bug.

Reviewers: majnemer, reames

Subscribers: jevinskie, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257277 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 05:48:01 +00:00
Joseph Tremoulet
f3f9d83b92 [LangRef] Move catchpad to "Other Operators" (NFC)
It is no longer a terminator, so should no longer be grouped with them.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257276 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-10 04:46:10 +00:00