Commit Graph

99377 Commits

Author SHA1 Message Date
Chandler Carruth
070764ee85 Use a heavier hammer when --enable-libcpp is passed to bypass the tests
which catch buggy versions of libstdc++. While libc++ would pass them,
we don't actually update the state in the configure script to use libc++
when we pass --enable-libcpp, the logic for that is in the
Makefiles. So just completely skip the library test when that configure
flag is passed.

Hopefully this will be enough to fix the darwin bots at last, and thanks
to Duncan Smith for getting things set up so I can watch the bots myself
on lab.llvm.org and see any failures!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199334 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 21:21:48 +00:00
Andrea Di Biagio
36280bde58 Update test/CodeGen/X86/vbinop-simplify-bug.ll.
Redirect the output of llc to /dev/null.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199329 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 20:16:14 +00:00
Andrea Di Biagio
3cab648f22 [DAGCombiner] Fix a wrong check in method SimplifyVBinOp.
This fixes a regression intruced by r199135.

Revision 199135 tried to simplify part of the logic in method
DAGCombiner::SimplifyVBinOp introducing calls to method BuildVectorSDNode::isConstant().

However, that revision wrongly changed the check performed by method
SimplifyVBinOp to identify dag nodes that can be folded.
Before revision 199135, that method only tried to simplify vector binary operations
if both operands were build_vector of Constant/ConstantFP/Undef only.

After revision 199135, method SimplifyVBinop tried to
simplify also vector binary operations with only one constant operand.

This fixes the problem restoring the old behavior of SimplifyVBinOp.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199328 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 19:51:32 +00:00
Rafael Espindola
1fca78a9b1 Return an ErrorOr<Binary *> from createBinary.
I did write a version returning ErrorOr<OwningPtr<Binary> >, but it is too
cumbersome to use without std::move. I will keep the patch locally and submit
when we switch to c++11.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199326 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 19:37:43 +00:00
Chandler Carruth
0893113a05 Sink the autoconf check for sufficiently modern host toolchain below the
enable flag that selects the C++ standard library to use with the host
toolchain. Otherwise we end up testing the wrong config.

I'm not really happy about this placement, but its pragmatic and should
unblock the Apple builders.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199325 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 19:19:13 +00:00
Kevin Enderby
96f3b25e8a Update the X86 assembler for .intel_syntax to accept
the | and & bitwise operators.

rdar://15570412


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199323 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 19:05:24 +00:00
Rafael Espindola
03f1cb72a4 Make sure we create a new archive by deleting any stale ones first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199319 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 16:56:57 +00:00
Zoran Jovanovic
814c8910f2 LL and SC decoder method fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199316 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 13:17:33 +00:00
Zoran Jovanovic
f5c2d3896b Added support for LWU microMIPS instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199315 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 13:01:18 +00:00
Chandler Carruth
9ac0e23865 Fix a bug in r199313 where I failed to restore CXXFLAGS. Doh! Not
*quite* ready to just slam C++11 on by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199314 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 10:34:30 +00:00
Chandler Carruth
9c62b5eabb Add a check to configure that the libstdc++ selected by Clang isn't
libstdc++v4.6. This is quite hard to test directly, so we test for it by
checking a known missing feature in that version that was added in v4.7.

This should prevent users from upgrading Clang but not GCC and hosting
with a too-old GCC's libstdc++ and getting strange and hard to debug
errors when we switch to C++11 by default.

Also, switch several of the macros I introduced to use AC_LANG_SOURCE
rather than AC_LANG_PROGRAM as we don't need configure's help writing
our main function (and we don't need such a function at all for most of
the tests).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199313 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 10:31:15 +00:00
David Majnemer
f62176f047 WinCOFF: Transform IR expressions featuring __ImageBase into image relative relocations
MSVC on x64 requires that we create image relative symbol
references to refer to RTTI data. Seeing as how there is no way to
explicitly make reference to a given relocation type in LLVM IR, pattern
match expressions of the form &foo - &__ImageBase.

Differential Revision: http://llvm-reviews.chandlerc.com/D2523


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199312 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 09:16:42 +00:00
Renato Golin
f433beee88 Revert 199262 - MCJIT remote still failing on ARM
Disabling remote MCJIT tests on ARM again, as they're still failing when
self-hosting on ARM, despite all my tests. At least now we have more info
on what message it's breaking and what is going on. Investigating.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199310 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 09:09:46 +00:00
Renato Golin
fdd4da1f8b Re-disable MCJIT remote tests on ARM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199309 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 09:09:39 +00:00
NAKAMURA Takumi
7871309054 Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199305 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 08:21:38 +00:00
Kostya Serebryany
3846ce9490 replace LeakSanitizerIsTurnedOffForTheCurrentProcess with __lsan_is_turned_off, but this time hide it under __has_feature(address_sanitizer); also include <sanitizer/lsan_interface.h>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199303 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 07:59:37 +00:00
Elena Demikhovsky
a1bcd56f68 Fixed identation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199301 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 07:18:11 +00:00
Andrew Trick
d5a74a754d Fix PR18449: SCEV needs more precise max BECount for multi-exit loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199299 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 06:42:11 +00:00
Craig Topper
33ce2bd3de Add OpSize16 to the two byte forms of INC/DEC that we only use in 64-bit mode and a 64-bit only LEA. Even though we'll not be in 16-bit mode when we use them it makes their tables consistent with their 32-bit counterparts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199297 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 05:20:59 +00:00
Jiangning Liu
b6db372c96 For AArch64, lowering sext_inreg and generate optimized code by using SXTL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199296 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 05:08:01 +00:00
Craig Topper
38e6f7301d Simplify x86 disassembler table handling of when to use TYPE_Rv/TYPE_R16/TYPE_R32 now that HasOpSizePrefix only means 16-bit instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199295 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 05:02:02 +00:00
Hans Wennborg
89fa06ba0f Switch-to-lookup tables: set threshold to 3 cases
There has been an old FIXME to find the right cut-off for when it's worth
analyzing and potentially transforming a switch to a lookup table.

The switches always have two or more cases. I could not measure any speed-up
by transforming a switch with two cases. A switch with three cases gets a nice
speed-up, and I couldn't measure any compile-time regression, so I think this
is the right threshold.

In a Clang self-host, this causes 480 new switches to be transformed,
and reduces the final binary size with 8 KB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199294 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 05:00:27 +00:00
Rafael Espindola
27a41c1547 Check the error code and save a call to sys::fs::exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199293 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 04:49:50 +00:00
Arnold Schwaighofer
e96fec2e43 LoopVectorize: Only strip casts from integer types when replacing symbolic
strides

Fixes PR18480.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199291 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 03:35:46 +00:00
Rafael Espindola
574df95d7a Fix uninitialized variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199288 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 03:27:26 +00:00
Rafael Espindola
f6cb056e41 Only mark functions as micromips.
The GNU as behavior is a bit different and very strange. It will mark any
label that contains an instruction. We can implement that, but using the
type looks more natural since gas will not mark a function if a .word is
used to output the instructions!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199287 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 03:07:12 +00:00
Hans Wennborg
268226b9f3 LangRef.rst: fix LangRef data layout text about m specifier, take 2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199286 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 02:49:17 +00:00
Hans Wennborg
37a98536bd LangRef: attempt to fix line breaks
The line breaks around the "m:<mangling>" text in the Data Layout section
look weird. Let's see if this helps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199285 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 02:30:37 +00:00
Weiming Zhao
2a0c41756b PR 18466: Fix ARM Pseudo Expansion
When expanding neon pseudo stores, it may miss the implicit uses of sub
regs, which may cause post RA scheduler reorder instructions that
breakes anti dependency.

For example:
  VST1d64QPseudo %R0<kill>, 16, %Q9_Q10, pred:14, pred:%noreg
  will be expanded to
    VST1d64Q %R0<kill>, 16, %D18, pred:14, pred:%noreg;

An instruction that defines %D20 may be scheduled before the store by
mistake.

This patches adds implicit uses for such case. For the example above, it
emits:
  VST1d64Q %R0<kill>, 8, %D18, pred:14, pred:%noreg, %Q9_Q10<imp-use>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199282 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 01:32:12 +00:00
Rafael Espindola
0be7e6ffb1 Make parseBitcodeFile return an ErrorOr<Module *>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199279 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 01:08:23 +00:00
Eric Christopher
cd94a7676a Make sure we emit a relocation to the debug_ranges section in the
presence of CU ranges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199276 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 00:04:29 +00:00
Rafael Espindola
1dc66089e6 Return an error_code from materializeAllPermanently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199275 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 23:51:27 +00:00
Rafael Espindola
06a3bddb36 Use error_code in Module::materializeAll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199269 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 23:02:01 +00:00
Renato Golin
70aa0556d4 Fix Remote MCJIT on Windows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199268 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 22:59:11 +00:00
Eric Christopher
8a1418a242 Add testcase for r199263 forgotten in commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199267 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 22:57:52 +00:00
Tim Northover
196c8e5fbb ARM: correctly determine final tBX_LR in Thumb1 functions
The changes caused by folding an sp-adjustment into a "pop" previously
disrupted the forward search for the final real instruction in a
terminating block. This switches to a backward search (skipping debug
instrs).

This fixes PR18399.

Patch by Zhaoshi.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199266 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 22:53:28 +00:00
Tim Northover
4e1247b836 AArch64: don't try to handle [SU]MUL_LOHI nodes
We should set them to expand for now since there are no patterns
dealing with them. Actually, there are no instructions either so I
doubt they'll ever be acceptable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199265 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 22:53:22 +00:00
Joey Gouly
808054f81f Add the lld root to llvm-lit, so llvm-lit can be used
to run lld tests individually.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199264 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 22:52:24 +00:00
Eric Christopher
6389abdd02 Enable use of ranges for translation units in the presence of
-ffunction-sections and update comments and TODOs about other
places that we should enable this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199263 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 22:44:17 +00:00
Renato Golin
b59bdadd34 Re-enable remote MCJIT tests on ARMv7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199262 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 22:43:49 +00:00
Renato Golin
83ece7a499 Sanitize MCJIT remote execution
MCJIT remote execution (ChildTarget+RemoteTargetExternal) protocol was in
dire need of refactoring. It was fail-prone, had no error reporting and
implemented the same message logic on every single function.

This patch rectifies it, and makes it work on ARM, where it was randomly
failing. Other architectures shall profit from this change as well, making
their buildbots and releases more reliable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199261 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 22:43:43 +00:00
Matt Arsenault
0445dc203b Do pointer cast simplifications on addrspacecast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199254 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 20:00:45 +00:00
Matt Arsenault
e16fa983bf Remove a check for an illegal condition.
Bitcasts can't be between address spaces anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199253 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 19:56:57 +00:00
Lang Hames
5f33cbc414 Add FPExt option to CCValAssign::LocInfo. When generating calling-convention
promotion code, Tablegen will now select FPExt for floating point promotions
(previously it had returned AExt, which is not valid for floating point types).

Any out-of-tree targets that were relying on AExt being returned for FP
promotions will need to update their code check for FPExt instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199252 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 19:56:36 +00:00
Rafael Espindola
abcf5f971a Revert "[AArch64] Added vselect patterns with float and double types"
This reverts commit r199242.

It is causing CodeGen/AArch64/neon-bsl.ll to fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199248 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 19:24:08 +00:00
Matt Arsenault
60ecc44266 Make nocapture analysis work with addrspacecast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199246 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 19:11:52 +00:00
Rafael Espindola
1c3e47c07a Fix a low hanging use of hasRawTextSupport.
This also fixes the placement of the function label comment. It was being
placed next to the mips16 directive instead of next to the label.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199245 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 18:57:12 +00:00
Duncan P. N. Exon Smith
3e4542b2ca Reapply "LTO: add API to set strategy for -internalize"
Reapply r199191, reverted in r199197 because it carelessly broke
Other/link-opts.ll.  The problem was that calling
createInternalizePass("main") would select
createInternalizePass(bool("main")) instead of
createInternalizePass(ArrayRef<const char *>("main")).  This commit
fixes the bug.

The original commit message follows.

Add API to LTOCodeGenerator to specify a strategy for the -internalize
pass.

This is a new attempt at Bill's change in r185882, which he reverted in
r188029 due to problems with the gold linker.  This puts the onus on the
linker to decide whether (and what) to internalize.

In particular, running internalize before outputting an object file may
change a 'weak' symbol into an internal one, even though that symbol
could be needed by an external object file --- e.g., with arclite.

This patch enables three strategies:

- LTO_INTERNALIZE_FULL: the default (and the old behaviour).
- LTO_INTERNALIZE_NONE: skip -internalize.
- LTO_INTERNALIZE_HIDDEN: only -internalize symbols with hidden
  visibility.

LTO_INTERNALIZE_FULL should be used when linking an executable.

Outputting an object file (e.g., via ld -r) is more complicated, and
depends on whether hidden symbols should be internalized.  E.g., for
ld -r, LTO_INTERNALIZE_NONE can be used when -keep_private_externs, and
LTO_INTERNALIZE_HIDDEN can be used otherwise.  However,
LTO_INTERNALIZE_FULL is inappropriate, since the output object file will
eventually need to link with others.

lto_codegen_set_internalize_strategy() sets the strategy for subsequent
calls to lto_codegen_write_merged_modules() and lto_codegen_compile*().

<rdar://problem/14334895>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199244 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 18:52:17 +00:00
Ana Pazos
cba390a29e [AArch64] Added vselect patterns with float and double types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199242 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 18:45:48 +00:00
Rafael Espindola
0972d2777c Handle UIDs and GIDs that don't fit in 6 decimal places.
Newer unix systems have 32 bit uid and gid types, but the archive format was
not updated. Fortunately, these fields are not normally used. Just truncate
the data to fit in 6 chars.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199223 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 17:02:09 +00:00