Commit Graph

126125 Commits

Author SHA1 Message Date
Krzysztof Parzyszek
1f5e82ef66 RDF: Implement register liveness analysis
Compute block live-ins and operand kill flags from the DFG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257480 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 15:56:33 +00:00
Daniel Sanders
1c140c48ae [mips] Correct operand order in DSP's mthi/mtlo
Summary: The result register is the second operand as per the other mt* instructions.

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257478 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 15:15:14 +00:00
Krzysztof Parzyszek
79af24e256 Register Data Flow: data flow graph
Target independent, SSA-based data flow framework for representing
data flow between physical registers.

This commit implements the creation of the actual data flow graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257477 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 15:09:49 +00:00
Benjamin Kramer
44c8b64aac [Hexagon] Make helper function static. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257476 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 14:58:49 +00:00
Rafael Espindola
fe84f6bc6d Fix test on windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257475 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 14:58:40 +00:00
Keno Fischer
7125c9519f [ARM] Fix several state persistence bugs
Summary:
This fixes three bugs, in all of which state is not or incorrecly reset between
objects (i.e. when reusing the same pass manager to create multiple object
files):
1) AttributeSection needs to be reset to nullptr, because otherwise the backend
   will try to emit into the old object file's attribute section causing a
   segmentation fault.
2) MappingSymbolCounter needs to be reset, otherwise the second object file
   will start where the first one left off.
3) The MCStreamer base class resets the Streamer's e_flags settings. Since
   EF_ARM_EABI_VER5 is set on streamer creation, we need to set it again
   after the MCStreamer was rest.

Also rename Reset (uppser case) to EHReset to avoid confusion with
reset (lower case).

Reviewers: rengolin
Differential Revision: http://reviews.llvm.org/D15950

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257473 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 13:38:15 +00:00
Andrey Turetskiy
a20f3c90ff Test commit access - tiny comment and code style fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257472 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 13:34:11 +00:00
Robert Lougher
e5716c4e3a The isel pattern that selects the memory-register form of VCVTPH2PS
(64 to 128-bit) matches against the pattern fragment 'vzmovl_v2i64'
(a zero-extended 64-bit load).

However, a change in r248784 teaches the instruction combiner that only
the lower 64 bits of the input to a 128-bit vcvtph2ps are used.  This means
the instruction combiner will ordinarily optimize away the upper 64-bit
insertelement instruction in the zero-extension and so we no longer select
the memory-register form.  To fix this a new pattern has been added.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257470 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 11:48:25 +00:00
Christof Douma
d6d9c0e008 The --debug-only option now takes a comma separated list of debug types.
This means that the DEBUG_TYPE cannot take a comma anymore. All existing passes
conform to this rule.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257466 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 10:23:13 +00:00
Igor Breger
d5839e5e84 AVX512: VPMOVAPS/PD and VPMOVUPS/PD (load) intrinsic implementation.
Differential Revision: http://reviews.llvm.org/D16042

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257463 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 10:02:32 +00:00
Axel Naumann
98079ab3f1 Explicitly enable OBJECT library "target".
With this, one can build a lib from the objects of other libs:
set(SOURCES
  $<TARGET_OBJECTS:obj.clingInterpreter>
  $<TARGET_OBJECTS:obj.clingMetaProcessor>
  $<TARGET_OBJECTS:obj.clingUtils>
  )

Reviewed by Chris Bieneman - thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257459 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 07:44:58 +00:00
Lang Hames
08529ecce9 [Orc] Comment out debugging output in OrcRemoteTargetClient::reserveMem to see
whether this affects the GCC 4.7 ICE on
http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75 .



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257458 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 07:26:28 +00:00
Andrew Wilkins
a04a818402 Revert r257003
This revision breaks llvm-config if you set
BUILD_SHARED_LIBS=on in a CMake build. Backing
out until the fix is ready to land.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257457 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 07:23:58 +00:00
Lang Hames
deddff8498 [ORC] Remove extraneous '&'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257455 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 07:10:10 +00:00
Lang Hames
86ece97a37 [ORC] Replace some more 'auto' uses with std::error_code.
One of the GCC 4.7 bots doesn't seem to like auto, and is currently suffering
from an ICE. I'm hoping this will help.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257454 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 07:09:41 +00:00
Lang Hames
d696c2c2a2 [Orc] Add overloads of RPC::handle and RPC::expect that take member functions as
handlers.

It is expected that RPC handlers will usually be member functions. Accepting them
directly in handle and expect allows for the remove of a lot of lambdas an
explicit error variables.

This patch also uses this new feature to substantially tidy up the
OrcRemoteTargetServer class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257452 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 06:48:52 +00:00
Justin Bogner
f4afe81203 LoopUnroll: Move the actual unrolling logic to a standalone function. NFC
This is pure code motion - break the actual work out of runOnLoop into
a reusable standalone function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257445 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 05:21:37 +00:00
Dan Gohman
b28bc14f59 [WebAssembly] Implement a prototype instruction encoder and disassembler.
This is using an extremely simple temporary made-up binary format, not the
official binary format (which isn't defined yet).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257440 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 03:32:29 +00:00
Dan Gohman
fa4ea3ca83 [WebAssembly] Register the MC subtarget info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257439 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 03:30:06 +00:00
Dan Gohman
19b6e1f7bd [WebAssembly] Define OperandTypes for decoding immediate values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257438 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 03:09:16 +00:00
Dan Gohman
3a52c6e4b7 [WebAssembly] Define a custom segment type for function definitions.
Since function definitions are not loaded into the address space, PT_LOAD is
inappropriate. PT_WEBASSEMBLY_FUNCTIONS is used to identify where the function
definitions are so that they can be processed at program startup time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257436 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 02:58:12 +00:00
Kostya Serebryany
7b0624d17e [libFuzzer] when a new unit is discovered using a dictionary, print all used dictionary entries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257435 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 02:36:59 +00:00
Kostya Serebryany
71afbb96dc [libFuzzer] add various debug prints. Also don't mutate based on a cmp trace like (a eq a) or (a neq a)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257434 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 02:08:37 +00:00
Dan Gohman
e410c02857 [WebAssembly] Use TSFlags instead of keeping a list of special-case opcodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257433 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 01:45:12 +00:00
NAKAMURA Takumi
1005fa61a4 OrcRemoteTargetServer.h: Suppress a warning. [-Wunused-variable]
FIXME: It may return ErrorOr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257431 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 01:23:43 +00:00
NAKAMURA Takumi
4ca55c12e7 lli: Fix warnings. [-Wsign-compare]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257430 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 01:23:30 +00:00
Manman Ren
70af20f0b3 CXX_FAST_TLS calling convention: performance improvement for x86-64.
This is the same change on x86-64 as r255821 on AArch64.
rdar://9001553


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257428 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 01:08:46 +00:00
Justin Bogner
0a729451cb LoopUnroll: Make canUnrollCompletely static - it doesn't use any state. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257427 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 01:06:32 +00:00
Justin Bogner
1ddf854804 LoopUnroll: Clean up the maze of initialization for unroll parameters. NFC
The layering of where the various loop unroll parameters are
initialized and overridden here was very confusing, making it pretty
difficult to tell just how the various sources interacted. Instead, we
put all of the initialization logic together in a single function so
that it's obvious what overrides what.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257426 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 00:55:26 +00:00
Manman Ren
9f927315d8 CXX_FAST_TLS calling convention: performance improvement for ARM.
This is the same change on ARM as r255821 on AArch64.
rdar://9001553


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257424 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 00:47:18 +00:00
Kostya Serebryany
d89bfb65a8 [libFuzzer] extend the weak memcmp/strcmp/strncmp interceptors to receive the result of the computations. With that, don't do any mutations if memcmp/etc returned 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257423 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 00:43:42 +00:00
Teresa Johnson
132f8670a3 [IRMover] Don't copy personality, etc unless creating def
Function::copyAttributesFrom will copy the personality function, prefix
data and prolog data from the source function to the new function, and
is invoked when the IRMover copies the function prototype. This puts a
reference to a constant in the source module on a function in the dest
module, which causes an error when deleting the source module after
importing, since the personality function in the source module still has
uses (this would presumably also be an issue for the prologue and prefix
data). Remove the copies added to the dest copy when creating the new
prototype, as they are mapped properly when/if we link the function body.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257420 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 00:24:24 +00:00
Lang Hames
6a7de42ac6 [Orc] XFAIL a few remote-jit test cases that I missed in r257391.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257419 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 23:57:39 +00:00
Manman Ren
27e49b014c CXX_FAST_TLS calling convention: Add support for ARM on Darwin.
rdar://9001553


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257417 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 23:50:43 +00:00
Dan Gohman
d73b41ae22 [WebAssembly] Define WebAssembly-specific relocation codes.
Currently WebAssembly has two kinds of relocations; data addresses and
function addresses. This adds ELF relocations for them, as well as an
MC symbol kind to indicate which type of relocation is needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257416 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 23:38:05 +00:00
Reid Kleckner
4e5af8fec0 Avoid the deprecated GetVersionEx API
Apparently the preferred version is the incredibly complicated
VerifyVersionInfoW function.

Rename the function to avoid potential future name clashes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257415 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 23:33:03 +00:00
Sanjay Patel
f8f4df59dc [LibCallSimplifier] use instruction-level fast-math-flags to transform log calls
Also, add tests to verify that we're checking 'fast' on both calls of each transform pair,
tighten the CHECK lines, and give the tests more meaningful names.

This is a continuation of:
http://reviews.llvm.org/rL255555
http://reviews.llvm.org/rL256871
http://reviews.llvm.org/rL256964
http://reviews.llvm.org/rL257400
http://reviews.llvm.org/rL257404



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257414 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 23:31:48 +00:00
Rafael Espindola
8e7d481847 Remove a bugs assert.
There is no reason the value being printed has to be positive.
Fixes pr25802.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257412 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 23:21:45 +00:00
NAKAMURA Takumi
bf913ed665 lli-child-target: Introduce a new dependency on RuntimeDyld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257410 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 23:12:30 +00:00
Sanjay Patel
be014a6bcf [LibCallSimplifier] don't allow sqrt transform unless all ops are unsafe
Fix the FIXME added with:
http://reviews.llvm.org/rL257400



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257404 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 22:50:36 +00:00
Justin Bogner
2ab07ac8fe LoopUnroll: Use the optsize threshold for minsize as well
Currently we're unrolling loops more in minsize than in optsize, which
means -Oz will have a larger code size than -Os. That doesn't make any
sense.

This resolves the FIXME about this in LoopUnrollPass and extends the
optsize test to make sure we use the smaller threshold for minsize as
well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257402 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 22:39:43 +00:00
Sanjay Patel
33ad607b8e more space; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257401 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 22:35:39 +00:00
Sanjay Patel
2234dddb07 [LibCallSimplifier] use instruction-level fast-math-flags to transform sqrt calls
This is a continuation of adding FMF to call instructions:
http://reviews.llvm.org/rL255555

The intent of the patch is to preserve the current behavior of the transform except
that we use the sqrt instruction's 'fast' attribute as a trigger rather than the
function-level attribute.

But this raises a bug noted by the new FIXME comment.

In order to do this transform:
sqrt((x * x) * y) ---> fabs(x) * sqrt(y)

...we need all of the sqrt, the first fmul, and the second fmul to be 'fast'. 
If any of those ops is strict, we should bail out.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257400 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 22:34:19 +00:00
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