126144 Commits

Author SHA1 Message Date
Krzysztof Parzyszek
5c562302c2 [Hexagon] Implement RDF-based post-RA optimizations
- Handle simple cases of register copies (what current RDF CP allows).
- Hexagon-specific dead code elimination: handles dead address updates
  in post-increment instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257504 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 19:09:01 +00:00
Sanjay Patel
44d6fd556f [LibCallSimplifier] use instruction-level fast-math-flags to transform pow(x, 0.5) calls
Also, propagate the FMF to the newly created sqrt() call.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257503 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 19:06:35 +00:00
Lang Hames
05e78944a1 [ORC] More cleanup, partially aimed at working around GCC ICE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257501 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 19:01:49 +00:00
Sanjay Patel
70b3436457 rangify; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257500 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 18:47:59 +00:00
Reid Kleckner
f0fc5dbf97 Auto-link with ole32.dll to simplify building LLVM.dll
Patch by Jakob Bornecrantz

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257499 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 18:33:49 +00:00
Lang Hames
9859617d8c [Orc] Replace lambda with a helper method.
This is good cleanup, but I'm also hoping it'll fix some more GCC ICEs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257498 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 18:17:23 +00:00
Sanjay Patel
bd8623ae5c function names start with a lower case letter ; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257496 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 18:03:37 +00:00
Teresa Johnson
411162c2db Fix bot failure from r257493: remove extraneous temp file read
This was left from an earlier version of the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257494 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:53:59 +00:00
Teresa Johnson
51ec8b2357 [ThinLTO] Handle an external call from an import to an alias in dest
The findExternalCalls routine ignores calls to functions already
defined in the dest module. This was not handling the case where
the definition in the current module is actually an alias to a
function call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257493 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:48:44 +00:00
Sanjay Patel
75660cfed9 [LibCallSimplifier] use instruction-level fast-math-flags to transform pow(exp(x)) calls
See also:
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
http://reviews.llvm.org/rL257414



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257491 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:30:37 +00:00
Krzysztof Parzyszek
04a98e25aa RDF: Copy propagation
This is a very limited implementation of DFG-based copy propagation.
It only handles actual COPY instructions (does not handle other equivalents
such as add-immediate with a 0 operand).
The major limitation is that it does not update the DFG: that will be the
change required to make it more robust (hopefully coming up soon).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257490 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:23:48 +00:00
Tom Stellard
e395458a4f AMDGPU: Emit note directive for HSA even if there are no functions
Reviewers: arsenm, echristo

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257488 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:18:17 +00:00
Lang Hames
09c7fb3a60 [Orc] Clang-format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257487 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:06:32 +00:00
Lang Hames
dab4109a7b [Orc] Take another shot at working around the GCC 4.7 ICE in
http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/27486



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257486 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:04:12 +00:00
Krzysztof Parzyszek
76580abdf6 RDF: Dead code elimination
Utility class to perform DFG-based dead code elimination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257485 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:01:16 +00:00
Sanjay Patel
51ea8ac887 consolidate exp/exp2 tests
The transform is identical, so keep the tests together and save some overhead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257484 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 17:00:38 +00:00
Krzysztof Parzyszek
f0ce2c50e1 Fix compiler warnings from r257477
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257483 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 16:51:55 +00:00
Kostya Serebryany
53ff84bf11 [libFuzzer] add a macro LLVM_FUZZER_DEFINES_SANITIZER_WEAK_HOOOKS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257482 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 16:50:18 +00:00
Sanjay Patel
f70661c843 Add/edit tests to include instruction-level FMF on calls
Prepatory patch before changing LibCallSimplifier to use the FMF.
Also, tighten the CHECK lines and give the tests more meaningful names.
Similar changes to:
http://reviews.llvm.org/rL257414



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257481 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-12 16:50:17 +00:00
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