Commit Graph

123715 Commits

Author SHA1 Message Date
Richard Diamond
6c6be14bb5 Fix llvm-config to adapt to the install environment.
Summary:
This patch does a couple of things:

  - Adds a new argument `--shared-mode` which accepts a list of components and prints whether or not the provided components need to be linked statically or shared.
  - Fixes `--libnames` when CMake BUILD_SHARED_LIBS is used.
  - Fixes `--libnames`, `--libs`, and `--libfiles` for dylib when static components aren't installed.
  - Fixes `--libnames`, `--libs`, `--libfiles`, and `--components` to use LLVM_DYLIB_COMPONENTS as the component manifest for dylib linking.
  - Uses the host platform's usual convention for filename extensions and such, instead of always defaulting to Unix-izms.

Because I don't own a Mac, I am not able to test the Mac platform dependent stuff locally. If someone would be willing to run a build for me on their machine (unless there's a better option), I'd appreciate it.

Reviewers: jfb, brad.king, whitequark, beanz

Subscribers: beanz, jauhien, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252532 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 23:15:38 +00:00
Reid Kleckner
963c9c6d07 Combine ifdefs around dl_iterate_phdr in Unix/Signals.inc
This avoids the need to have two dummy implementations of
findModulesAndOffsets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252531 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 23:10:29 +00:00
David Majnemer
c30d240fb8 [WinEH] Don't emit CATCHRET from visitCatchPad
Instead, emit a CATCHPAD node which will get selected to a target
specific sequence.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252528 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 23:07:48 +00:00
Chris Bieneman
5d89904858 Deprecate Autoconf
As per the very positive feedback from llvm-dev (http://lists.llvm.org/pipermail/llvm-dev/2015-November/092150.html), this commit officially deprecates the LLVM autoconf-based build system.

Anyone still using it should switch to CMake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252520 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 21:54:55 +00:00
Sanjay Patel
9c673d9c54 specify triple so Windows bots won't be sad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252519 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 21:53:58 +00:00
Rafael Espindola
9e4d3eb47d Add templated read/write to support::endian.
Expose read and write functions that take endianess as a template
parameter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252517 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 21:34:45 +00:00
Sanjay Patel
0e9a62e34f [x86] try harder to match bitwise 'or' into an LEA
The motivation for this patch starts with the epic fail example in PR18007:
https://llvm.org/bugs/show_bug.cgi?id=18007

...unfortunately, this patch makes no difference for that case, but it solves some
simpler cases. We'll get there some day. :)

The current 'or' matching code was using computeKnownBits() via 
isBaseWithConstantOffset() -> MaskedValueIsZero(), but that's an unnecessarily limited use. 
We can do more by copying the logic in ValueTracking's haveNoCommonBitsSet(), so we can 
treat the 'or' as if it was an 'add'.

There's a TODO comment here because we should lift the bit-checking logic into a helper
function, so it's not duplicated in DAGCombiner.

An example of the better LEA matching:

leal (%rdi,%rdi), %eax
andl $1, %esi
orl %esi, %eax

Becomes:

andl $1, %esi
leal (%rsi,%rdi,2), %eax

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252515 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 21:16:49 +00:00
Colin LeMahieu
7fcebdc82b [Hexagon] Separating statement to match what clang-format would do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252513 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 21:06:28 +00:00
Reid Kleckner
c324f8dc3e [WinEH] Tweak funclet prologue/epilogue insertion to pass verifier
For some reason we'd never run MachineVerifier on WinEH code, and you
explicitly have to ask for it with llc. I added it to a few test cases
to get some coverage.

Fixes PR25461.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252512 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 21:04:00 +00:00
Andrew Kaylor
805b66a27c [WinEH] Re-committing r252249 (Clone funclets with multiple parents) with additional fixes for determinism problems
Differential Revision: http://reviews.llvm.org/D14454



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252508 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 19:59:02 +00:00
Reid Kleckner
c04d564033 [Hexagon] Fix -Wmicrosoft-enum-value warning with explicit enum type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252505 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 19:44:38 +00:00
Mike Aizatsky
da4cf2cda9 Windows-specific test for sys::path::remove_dots.
Differential Revision: http://reviews.llvm.org/D14503

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252504 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 19:36:53 +00:00
Sanjay Patel
034a965d5a don't repeat function names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252502 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 19:18:26 +00:00
Sanjay Patel
ea45c5101b fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252500 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 18:59:30 +00:00
Mike Aizatsky
8cda80ad24 Moving FileManager::removeDotPaths to llvm::sys::path::remove_dots
Differential Revision: http://reviews.llvm.org/D14393

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252499 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 18:56:31 +00:00
Adhemerval Zanella
98e40b8ddf [sanitizer] Use same shadow offset for ASAN on aarch64
This patch makes ASAN for aarch64 use the same shadow offset for all
currently supported VMAs (39 and 42 bits).  The shadow offset is the
same for 39-bit (36).  Similar to ppc64 port, aarch64 transformation
also requires to use an add instead of 'or' for 42-bit VMA.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252495 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 18:03:48 +00:00
Dehao Chen
b16171eac2 Add discriminators for call instructions that are from the same line and same basic block.
Summary: Call instructions that are from the same line and same basic block needs to have separate discriminators to distinguish between different callsites.

Reviewers: davidxl, dnovillo, dblaikie

Subscribers: dblaikie, probinson, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252492 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 17:30:38 +00:00
Chad Rosier
01eac64506 Simplify. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252491 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 16:56:06 +00:00
Oliver Stannard
1cff5e8007 GlobalOpt should maintain externally_initialized when splitting aggregates
When GlobalOpt splits an internal, global variable with an aggregate type, it
should propagate the externally_initialized flag to the newly created globals.

This makes the pass safe for our downstream use of this flag, while still
allowing some useful optimisations (such as removing dead parts of the split
aggregate) to be performed.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252490 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 16:47:16 +00:00
Jonathan Roelofs
e5e54367e7 Create Makefile variables for 'share' and 'libexec'
in preparation for a Clang commit.

http://reviews.llvm.org/D14405


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252473 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 16:10:00 +00:00
James Molloy
ae263d48b0 [LoopVectorize] Address post-commit feedback on r250032
Implemented as many of Michael's suggestions as were possible:
  * clang-format the added code while it is still fresh.
  * tried to change Value* to Instruction* in many places in computeMinimumValueSizes - unfortunately there are several places where Constants need to be handled so this wasn't possible.
  * Reduce the pass list on loop-vectorization-factors.ll.
  * Fix a bug where we were querying MinBWs for I->getOperand(0) but using MinBWs[I].

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252469 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 14:32:05 +00:00
Silviu Baranga
9517cbd9fb Allow LLE/LD and the loop versioning infrastructure to use SCEV predicates
Summary:
LAA currently generates a set of SCEV predicates that must be checked by users.
In the case of Loop Distribute/Loop Load Elimination, no such predicates could have
been emitted, since we don't allow stride versioning. However, in the future there
could be SCEV predicates that will need to be checked.

This change adds support for SCEV predicate versioning in the Loop Distribute, Loop
Load Eliminate and the loop versioning infrastructure.

Reviewers: anemet

Subscribers: mssimpso, sanjoy, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252467 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 13:26:09 +00:00
Charlie Turner
1e9e8c6572 [AArch64] Add UABDL patterns for log2 shuffle.
Summary:
This matches the sum-of-absdiff patterns emitted by the vectoriser using log2 shuffles.

Relies on D14207 to be able to match the `extract_subvector(..., 0)`

Reviewers: t.p.northover, jmolloy

Subscribers: aemerson, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252465 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 13:10:52 +00:00
Charlie Turner
e6e427c6b3 [AArch64] Handle extract_subvector(..., 0) in ISel.
Summary:
Lowering this pattern early to an `EXTRACT_SUBREG` was making it impossible to match larger patterns in tblgen that use `extract_subvector(..., 0)` as part of the their input pattern.

It seems like there will exist somewhere a better way of specifying this pattern over all relevant register value types, but I didn't manage to find it.

Reviewers: t.p.northover, jmolloy

Subscribers: aemerson, llvm-commits, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252464 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 12:45:11 +00:00
Renato Golin
f60aec48e9 [EABI] Add LLVM support for -meabi flag
"GCC requires the freestanding environment provide memcpy, memmove, memset
and memcmp": https://gcc.gnu.org/onlinedocs/gcc-5.2.0/gcc/Standards.html

Hence in GNUEABI targets LLVM should not convert 'memops' to their equivalent
'__aeabi_memops'. This convertion violates GCC contract.

The -meabi flag controls whether or not LLVM will modify 'memops' in GNUEABI
targets.

Without -meabi: use the triple default EABI.
With -meabi=default: use the triple default EABI.
With -meabi=gnu: use 'memops'.
With -meabi=4 or -meabi=5: use '__aeabi_memops'.
With -meabi set to an unknown value: same as -meabi=default.

Patch by Vinicius Tinti.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252462 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 12:40:30 +00:00
Renato Golin
a7fb0ca802 Revert "[ARM] Combine CMOV into BFI where possible"
This reverts commit r252057, as it broke ARM self-hosting buildbots, probably
due to a code-gen fault.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252460 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 12:19:10 +00:00
Oliver Stannard
b32894764b [CodeGen] Always promote f16 if not legal
We don't currently have any runtime library functions for operations on
f16 values (other than conversions to and from f32 and f64), so we
should always promote it to f32, even if that is not a legal type. In
that case, the f32 values would be softened to f32 library calls.

SoftenFloatRes_FP_EXTEND now needs to check the promoted operand's type,
as it may ne a no-op or require a different library call.

getCopyFromParts and getCopyToParts now need to cope with a
floating-point value stored in a larger integer part, as is the case for
any target that needs to store an f16 value in a 32-bit integer
register.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252459 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 11:03:18 +00:00
Colin LeMahieu
a9275b1c24 [Hexagon] Adding override to methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252453 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 07:10:24 +00:00
Colin LeMahieu
71c7876d91 [Hexagon] Removing XFAIL on Hexagon target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252450 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 06:15:55 +00:00
Colin LeMahieu
e729adbfcd [Hexagon] Fixing warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252448 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 05:47:56 +00:00
Colin LeMahieu
24a89ad9eb [Hexagon] Removing extra gen line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252447 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 05:31:39 +00:00
Colin LeMahieu
19f12a43a3 [Hexagon] Maybe the makefile?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252446 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 05:16:08 +00:00
Colin LeMahieu
35536b9c03 [Hexagon] Adding LLVMBuild.txt reference to HexagonAsmParser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252444 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 04:31:02 +00:00
Colin LeMahieu
c0aef701cc [Hexagon] Enabling ASM parsing on Hexagon backend and adding instruction parsing tests. General updating of the code emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252443 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 04:07:48 +00:00
Mehdi Amini
dd77c4496e Add a method to the BitcodeReader to parse only the identification block
Summary: Mimic parseTriple(); and exposes it to LTOModule.cpp

Reviewers: dexonsmith, rafael

Subscribers: llvm-commits

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252442 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 02:46:41 +00:00
Colin LeMahieu
503438e3f6 [AsmParser] Generalize matching for grammars without mnemonic-lead statements
Differential Revision: http://reviews.llvm.org/D14257

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252440 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 00:46:46 +00:00
Colin LeMahieu
1539acf27c [AsmParser] Backends can parameterize ASM tokenization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252439 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 00:31:07 +00:00
Colin LeMahieu
ca453aba57 [AsmParser] Provide target direct access to mnemonic token. Allow assignment parsing to be hooked by target. Allow target to specify if identifier is a label.
Differential Revision:  http://reviews.llvm.org/D14255

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252435 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 00:15:45 +00:00
Xinliang David Li
ec3b8e9653 [PGO] Instr func name var creation code refactoring
Move the code from cfe to LLMV and become shared interfaces.
There is no functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252433 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 00:01:22 +00:00
Colin LeMahieu
84774ba424 [AsmParser] Allow tokens to be put back in to the token stream.
Differential Revision: http://reviews.llvm.org/D14252

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252432 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-08 23:48:23 +00:00
Maksim Panchenko
8b804197e0 [RuntimeDyld] Add support for R_X86_64_PC8 relocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252423 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-08 19:34:17 +00:00
NAKAMURA Takumi
92ca4a0cd3 Appease hosts without HAVE_BACKTRACE nor ENABLE_BACKTRACES.
llvm/lib/Support/Signals.cpp:66:13: warning: unused function 'printSymbolizedStackTrace' [-Wunused-function]
  llvm/lib/Support/Signals.cpp:52:13: warning: function 'findModulesAndOffsets' has internal linkage but is not defined [-Wundefined-internal]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252418 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-08 09:45:06 +00:00
Hal Finkel
455a0bcfcc [PowerPC] Fix LoopPreIncPrep not to depend on SCEV constant simplifications
Under most circumstances, if SCEV can simplify X-Y to a constant, then it can
also simplify Y-X to a constant. However, there is no guarantee that this is
always true, and concensus is not to consider that a correctness bug in SCEV
(although it is undesirable).

PPCLoopPreIncPrep gathers pointers used to access memory (via loads, stores and
prefetches) into buckets, where in each bucket the relative pointer offsets are
constant. We used to keep each bucket as a multimap, where SCEV's subtraction
operation was used to define the ordering predicate. Instead, use a fixed SCEV
base expression for each bucket, record the constant offsets from that base
expression, and adjust it later, if desirable, once all pointers have been
collected.

Doing it this way should be more compile-time efficient than the previous
scheme (in addition to making the implementation less sensitive to SCEV
simplification quirks).

Fixes PR25170.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252417 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-08 08:04:40 +00:00
David Majnemer
08a70b0f2b [LoopStrengthReduce] Don't bother fixing up PHIs from EH Pad preds
We cannot really insert fixup code into a PHI's predecessor.

This fixes PR25445.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252416 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-08 05:04:07 +00:00
David Majnemer
d9aac4c473 Make bugpoint ehpad/token friendly
Tokens shouldn't be blindly replaced with undef/null.  Also, don't try
to remove EH pad instructions from the top of basic blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252414 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-08 04:16:12 +00:00
David Majnemer
a3e5642aba [WinEH] Update PHIs of CATCHRET successors
The TailDuplication machine pass ran across a malformed CFG: a PHI node
referred it's predecessor's predecessor instead of it's predecessor.
This occurred because we split the edge in X86ISelLowering when we
processed the CATCHRET but forgot to do something about the PHI nodes.

This fixes PR25444.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252413 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-08 02:36:00 +00:00
Yaron Keren
0d0bb8e27b Erase unused FunctionDIs variables after r252219.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252401 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-07 10:21:25 +00:00
Akira Hatanaka
2ff41cea41 [Bitcode] Add enums for call instruction markers and flags. NFC.
This commit adds enums in LLVMBitCodes.h to improve readability and
maintainability. This is a follow-up to r252368 which was discussed
here:

http://reviews.llvm.org/D12923


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252395 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-07 02:48:49 +00:00
Nico Weber
d5e4538cdc Try to fix build more -- like r252392 but for WebAssembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252394 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-07 02:47:31 +00:00
Sanjoy Das
226fd8ff51 Unbreak the build
My code clashed with some ilist iterator changes upstream.  Fix by
adding an explicit "&*" coercion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252392 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-07 02:26:53 +00:00