Quentin Colombet [Thu, 16 Jan 2014 06:43:55 +0000 (06:43 +0000)]
[cmake] Attempt to fix sanitizer buildbot.
The generation of the native_export_file end up in
several different makefiles. All those makefiles
write the same file, but can be executed concurrently...
and bad things happen!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199356
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 16 Jan 2014 06:31:20 +0000 (06:31 +0000)]
Convert test to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199355
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 16 Jan 2014 06:29:36 +0000 (06:29 +0000)]
Reapply r194218 with fix:
Move copying of global initializers below the cloning of functions.
The BlockAddress doesn't have access to the correct basic blocks until the
functions have been cloned. This causes the BlockAddress to point to the old
values. Just wait until the functions have been cloned before copying the
initializers.
PR13163
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199354
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 16 Jan 2014 06:14:45 +0000 (06:14 +0000)]
Remove use of OpSize for populating VEX_PP field. A prefix encoding is now used instead. Simplify some other code. No functional changes intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199353
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 16 Jan 2014 05:09:32 +0000 (05:09 +0000)]
Attempt to fix the MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199352
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Thu, 16 Jan 2014 04:53:18 +0000 (04:53 +0000)]
BasicAA: We need to check both access sizes when comparing a gep and an
underlying object of unknown size.
Fixes PR18460.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199351
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 16 Jan 2014 04:50:58 +0000 (04:50 +0000)]
Prevent calls to __jit_debug_register_code from being optimized out.
Patch by Andrew MacPherson. I just tweaked the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199350
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Thu, 16 Jan 2014 03:13:19 +0000 (03:13 +0000)]
Don't use DataRefImpl to implement ImportDirectoryEntryRef.
DataRefImpl (a union of two integers and a pointer) is not the ideal data type
to represent a reference to an import directory entity. We should just use the
pointer to the import table and an offset instead to simplify. No functionality
change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199349
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Thu, 16 Jan 2014 01:51:12 +0000 (01:51 +0000)]
Report a warning when dropping outdated debug info metadata.
Use DiagnosticInfo to emit the warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199346
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Thu, 16 Jan 2014 00:47:46 +0000 (00:47 +0000)]
Adjust offsets for max load instruction offsets. This is more pessimistic
than it needs to be by 1 bit but I need to finish some other things so
that all the boundary cases will work in that situation. constpool.c
in test-suite will fail to assemble under our new internal test-suite sync
without this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199343
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 15 Jan 2014 23:46:18 +0000 (23:46 +0000)]
llvm-objdump: Don't print "Import table:" header if there's no import table.
If a binary does not depend on any DLL, it does not contain import table at
all. Printing the section title without contents looks wrong, so we shouldn't
print it in that case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199340
91177308-0d34-0410-b5e6-
96231b3b80d8
David Peixotto [Wed, 15 Jan 2014 22:40:02 +0000 (22:40 +0000)]
Fix parsing of .symver directive on ARM
ARM assembly syntax uses @ for a comment, execpt for the second
parameter of the .symver directive which requires @ as part of the
symbol name. This commit fixes the parsing of this directive by
adding a special case for ARM for this one argumnet.
To make the change we had to move the AllowAtInIdentifier variable
to the MCAsmLexer interface (from AsmLexer) and expose a setter for
the value. The ELFAsmParser then toggles this value when parsing
the second argument to the .symver directive for a target that
uses @ as a comment symbol
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199339
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Wed, 15 Jan 2014 22:04:35 +0000 (22:04 +0000)]
[LTO] Add a hook to map LLVM diagnostics into the clients of LTO.
Add a hook in the C API of LTO so that clients of the code generator can set
their own handler for the LLVM diagnostics.
The handler is defined like this:
typedef void (*lto_diagnostic_handler_t)(lto_codegen_diagnostic_severity_t
severity, const char *diag, void *ctxt)
- severity says how bad this is.
- diag is a string that contains the diagnostic message.
- ctxt is the registered context for this handler.
This hook is more general than the lto_get_error_message, since this function
keeps only the latest message and can only be queried when something went wrong
(no warning for instance).
<rdar://problem/
15517596>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199338
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 15 Jan 2014 21:44:14 +0000 (21:44 +0000)]
Remove support for armv7f slice. <rdar://problem/
12478440>
This was never used for anything so we should just get rid of it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199337
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 15 Jan 2014 21:21:48 +0000 (21:21 +0000)]
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
Andrea Di Biagio [Wed, 15 Jan 2014 20:16:14 +0000 (20:16 +0000)]
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
Andrea Di Biagio [Wed, 15 Jan 2014 19:51:32 +0000 (19:51 +0000)]
[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
Rafael Espindola [Wed, 15 Jan 2014 19:37:43 +0000 (19:37 +0000)]
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
Chandler Carruth [Wed, 15 Jan 2014 19:19:13 +0000 (19:19 +0000)]
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
Kevin Enderby [Wed, 15 Jan 2014 19:05:24 +0000 (19:05 +0000)]
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
Rafael Espindola [Wed, 15 Jan 2014 16:56:57 +0000 (16:56 +0000)]
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
Zoran Jovanovic [Wed, 15 Jan 2014 13:17:33 +0000 (13:17 +0000)]
LL and SC decoder method fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199316
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Wed, 15 Jan 2014 13:01:18 +0000 (13:01 +0000)]
Added support for LWU microMIPS instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199315
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 15 Jan 2014 10:34:30 +0000 (10:34 +0000)]
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
Chandler Carruth [Wed, 15 Jan 2014 10:31:15 +0000 (10:31 +0000)]
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
David Majnemer [Wed, 15 Jan 2014 09:16:42 +0000 (09:16 +0000)]
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
Renato Golin [Wed, 15 Jan 2014 09:09:46 +0000 (09:09 +0000)]
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
Renato Golin [Wed, 15 Jan 2014 09:09:39 +0000 (09:09 +0000)]
Re-disable MCJIT remote tests on ARM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199309
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 15 Jan 2014 08:21:38 +0000 (08:21 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199305
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 15 Jan 2014 07:59:37 +0000 (07:59 +0000)]
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
Elena Demikhovsky [Wed, 15 Jan 2014 07:18:11 +0000 (07:18 +0000)]
Fixed identation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199301
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 15 Jan 2014 06:42:11 +0000 (06:42 +0000)]
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
Craig Topper [Wed, 15 Jan 2014 05:20:59 +0000 (05:20 +0000)]
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
Jiangning Liu [Wed, 15 Jan 2014 05:08:01 +0000 (05:08 +0000)]
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
Craig Topper [Wed, 15 Jan 2014 05:02:02 +0000 (05:02 +0000)]
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
Hans Wennborg [Wed, 15 Jan 2014 05:00:27 +0000 (05:00 +0000)]
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
Rafael Espindola [Wed, 15 Jan 2014 04:49:50 +0000 (04:49 +0000)]
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
Arnold Schwaighofer [Wed, 15 Jan 2014 03:35:46 +0000 (03:35 +0000)]
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
Rafael Espindola [Wed, 15 Jan 2014 03:27:26 +0000 (03:27 +0000)]
Fix uninitialized variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199288
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 15 Jan 2014 03:07:12 +0000 (03:07 +0000)]
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
Hans Wennborg [Wed, 15 Jan 2014 02:49:17 +0000 (02:49 +0000)]
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
Hans Wennborg [Wed, 15 Jan 2014 02:30:37 +0000 (02:30 +0000)]
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
Weiming Zhao [Wed, 15 Jan 2014 01:32:12 +0000 (01:32 +0000)]
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
Rafael Espindola [Wed, 15 Jan 2014 01:08:23 +0000 (01:08 +0000)]
Make parseBitcodeFile return an ErrorOr<Module *>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199279
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 15 Jan 2014 00:04:29 +0000 (00:04 +0000)]
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
Rafael Espindola [Tue, 14 Jan 2014 23:51:27 +0000 (23:51 +0000)]
Return an error_code from materializeAllPermanently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199275
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 14 Jan 2014 23:02:01 +0000 (23:02 +0000)]
Use error_code in Module::materializeAll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199269
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Tue, 14 Jan 2014 22:59:11 +0000 (22:59 +0000)]
Fix Remote MCJIT on Windows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199268
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 14 Jan 2014 22:57:52 +0000 (22:57 +0000)]
Add testcase for r199263 forgotten in commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199267
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 14 Jan 2014 22:53:28 +0000 (22:53 +0000)]
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
Tim Northover [Tue, 14 Jan 2014 22:53:22 +0000 (22:53 +0000)]
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
Joey Gouly [Tue, 14 Jan 2014 22:52:24 +0000 (22:52 +0000)]
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
Eric Christopher [Tue, 14 Jan 2014 22:44:17 +0000 (22:44 +0000)]
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
Renato Golin [Tue, 14 Jan 2014 22:43:49 +0000 (22:43 +0000)]
Re-enable remote MCJIT tests on ARMv7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199262
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Tue, 14 Jan 2014 22:43:43 +0000 (22:43 +0000)]
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
Matt Arsenault [Tue, 14 Jan 2014 20:00:45 +0000 (20:00 +0000)]
Do pointer cast simplifications on addrspacecast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199254
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 14 Jan 2014 19:56:57 +0000 (19:56 +0000)]
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
Lang Hames [Tue, 14 Jan 2014 19:56:36 +0000 (19:56 +0000)]
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
Rafael Espindola [Tue, 14 Jan 2014 19:24:08 +0000 (19:24 +0000)]
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
Matt Arsenault [Tue, 14 Jan 2014 19:11:52 +0000 (19:11 +0000)]
Make nocapture analysis work with addrspacecast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199246
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 14 Jan 2014 18:57:12 +0000 (18:57 +0000)]
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
Duncan P. N. Exon Smith [Tue, 14 Jan 2014 18:52:17 +0000 (18:52 +0000)]
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
Ana Pazos [Tue, 14 Jan 2014 18:45:48 +0000 (18:45 +0000)]
[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
Rafael Espindola [Tue, 14 Jan 2014 17:02:09 +0000 (17:02 +0000)]
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
Zoran Jovanovic [Tue, 14 Jan 2014 16:26:47 +0000 (16:26 +0000)]
Test case micromips-load-effective-address.s renamed to micromips-load-effective-address.ll and moved to test/CodeGen/Mips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199221
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Tue, 14 Jan 2014 15:23:25 +0000 (15:23 +0000)]
Handle dllexport for global aliases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199219
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Tue, 14 Jan 2014 15:22:47 +0000 (15:22 +0000)]
Decouple dllexport/dllimport from linkage
Representing dllexport/dllimport as distinct linkage types prevents using
these attributes on templates and inline functions.
Instead of introducing further mixed linkage types to include linkonce and
weak ODR, the old import/export linkage types are replaced with a new
separate visibility-like specifier:
define available_externally dllimport void @f() {}
@Var = dllexport global i32 1, align 4
Linkage for dllexported globals and functions is now equal to their linkage
without dllexport. Imported globals and functions must be either
declarations with external linkage, or definitions with
AvailableExternallyLinkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199218
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Tue, 14 Jan 2014 15:10:08 +0000 (15:10 +0000)]
AVX-512: optimized scalar compare patterns
removed AVX512SI format, since it is similar to AVX512BI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199217
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hagglund [Tue, 14 Jan 2014 14:09:00 +0000 (14:09 +0000)]
Fix valgrind warning for gcc builds.
Sorry, I don't understand why the warning is generated (a gcc
bug?). Anyhow, the change should improve readablity. No functionality
change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199214
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Tue, 14 Jan 2014 13:17:12 +0000 (13:17 +0000)]
[X86] Fix assertion failure caused by a wrong folding of vector shifts by immediate count.
This fixes a regression intruced by r198113.
Revision r198113 introduced an algorithm that tries to fold a vector shift
by immediate count into a build_vector if the input vector is a known vector
of constants.
However the algorithm only worked under the assumption that the input vector
type and the shift type are exactly the same.
This patch disables the folding of vector shift by immediate count if the
input vector type and the shift value type are not the same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199213
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 14 Jan 2014 13:05:47 +0000 (13:05 +0000)]
ARM: add constraint that RdLo != Rn != RdHi for v5 MLA insts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199212
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 14 Jan 2014 13:05:42 +0000 (13:05 +0000)]
ARM: remove unused UMAALv5 node
It was incorrect anyway, since it didn't have accumulator inputs and wasn't
even supported on v5.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199211
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Tue, 14 Jan 2014 12:38:32 +0000 (12:38 +0000)]
Revert "Decouple dllexport/dllimport from linkage"
Revert this for now until I fix an issue in Clang with it.
This reverts commit r199204.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199207
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Tue, 14 Jan 2014 12:36:54 +0000 (12:36 +0000)]
Revert "Handle dllexport for global aliases"
This reverts commit r199205.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199206
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Tue, 14 Jan 2014 11:55:40 +0000 (11:55 +0000)]
Handle dllexport for global aliases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199205
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Tue, 14 Jan 2014 11:55:03 +0000 (11:55 +0000)]
Decouple dllexport/dllimport from linkage
Representing dllexport/dllimport as distinct linkage types prevents using
these attributes on templates and inline functions.
Instead of introducing further mixed linkage types to include linkonce and
weak ODR, the old import/export linkage types are replaced with a new
separate visibility-like specifier:
define available_externally dllimport void @f() {}
@Var = dllexport global i32 1, align 4
Linkage for dllexported globals and functions is now equal to their linkage
without dllexport. Imported globals and functions must be either
declarations with external linkage, or definitions with
AvailableExternallyLinkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199204
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Tue, 14 Jan 2014 11:53:26 +0000 (11:53 +0000)]
Fix fastcall mangling of dllimported symbols
fastcall requires @ as global prefix instead of _ but getNameWithPrefix
wrongly assumes the OutName buffer is empty and replaces at index 0.
For imported functions this buffer is pre-filled with "__imp_" resulting
in broken "@_imp_foo@0" mangling.
Instead replace at the proper index. We also never have to prepend the
@-prefix because this fastcall mangling is only used on 32-bit Windows
targets which have _ has global prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199203
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 14 Jan 2014 09:40:18 +0000 (09:40 +0000)]
Revert r199191, "LTO: add API to set strategy for -internalize"
Please update also Other/link-opts.ll, in next time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199197
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 14 Jan 2014 08:07:10 +0000 (08:07 +0000)]
Remove stray comma in enum to satisfy -Wpedantic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199194
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 14 Jan 2014 07:41:20 +0000 (07:41 +0000)]
Separate the concept of 16-bit/32-bit operand size controlled by 0x66 prefix and the current mode from the concept of SSE instructions using 0x66 prefix as part of their encoding without being affected by the mode.
This should allow SSE instructions to be encoded correctly in 16-bit mode which r198586 probably broke.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199193
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 14 Jan 2014 06:37:26 +0000 (06:37 +0000)]
LTO: add API to set strategy for -internalize
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@199191
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 14 Jan 2014 06:18:38 +0000 (06:18 +0000)]
Always let value types influence register classes.
When creating a virtual register for a def, the value type should be
used to pick the register class. If we only use the register class
constraint on the instruction, we might pick a too large register class.
Some registers can store values of different sizes. For example, the x86
xmm registers can hold f32, f64, and 128-bit vectors. The three
different value sizes are represented by register classes with identical
register sets: FR32, FR64, and VR128. These register classes have
different spill slot sizes, so it is important to use the right one.
The register class constraint on an instruction doesn't necessarily care
about the size of the value its defining. The value type determines
that.
This fixes a problem where InstrEmitter was picking 32-bit register
classes for 64-bit values on SPARC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199187
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 14 Jan 2014 06:18:34 +0000 (06:18 +0000)]
Switch the NEON register class from QPR to DPair.
The already allocatable DPair superclass contains odd-even D register
pair in addition to the even-odd pairs in the QPR register class. There
is no reason to constrain the set of D register pairs that can be used
for NEON values. Any NEON instructions that require a Q register will
automatically constrain the register class to QPR.
The allocation order for DPair begins with the QPR registers, so
register allocation is unlikely to change much.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199186
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 14 Jan 2014 05:50:19 +0000 (05:50 +0000)]
[PM] Fix stale header blocker, found by Duncan Smith in code review!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199185
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 14 Jan 2014 05:05:18 +0000 (05:05 +0000)]
Remove the last weird subproject, 'privbracket'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199183
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 14 Jan 2014 05:02:38 +0000 (05:02 +0000)]
Add checks to configure for sufficiently modern host compilers. This
requires Clang 3.1 or GCC 4.7. If the compiler isn't Clang or GCC, we
don't try to do any sanity checking, but this give us at least
a reasonable baseline of modern compilers.
Also, I'm not claiming that this is the best way to do compiler version
tests. I'm happy for anyone to suggest better ways of doing this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199182
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 14 Jan 2014 04:25:13 +0000 (04:25 +0000)]
Replace .mips_hack_stocg with ".set micromips" and ".set nomicromips".
This matches what gnu as does and implementing this is easier than arguing
about it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199181
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Seaborn [Tue, 14 Jan 2014 04:20:01 +0000 (04:20 +0000)]
Fix llc to not reuse spill slots in functions that invoke setjmp()
We need to ensure that StackSlotColoring.cpp does not reuse stack
spill slots in functions that call "returns_twice" functions such as
setjmp(), otherwise this can lead to miscompiled code, because a stack
slot would be clobbered when it's still live.
This was already handled correctly for functions that call setjmp()
(though this wasn't covered by a test), but not for functions that
invoke setjmp().
We fix this by changing callsFunctionThatReturnsTwice() to check for
invoke instructions.
This fixes PR18244.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199180
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 14 Jan 2014 04:01:01 +0000 (04:01 +0000)]
Ok, really, for the last time, llvm-gcc is dead Jim.
Also, so is stacker, llvm-tv, etc. Wow.
But will someone please fess up to what projects/privbracket is and why
our autoconf build supports it?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199179
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 14 Jan 2014 03:46:00 +0000 (03:46 +0000)]
llvm-gcc is dead. REALLY. IT'S DEAD JIM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199178
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 14 Jan 2014 01:21:46 +0000 (01:21 +0000)]
Make getTargetStreamer return a possibly null pointer.
This will allow it to be called from target independent parts of the main
streamer that don't know if there is a registered target streamer or not. This
in turn will allow targets to perform extra actions at specified points in the
interface: add extra flags for some labels, extra work during finalization, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199174
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 13 Jan 2014 23:11:48 +0000 (23:11 +0000)]
Remove extra } in documentation comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199162
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Mon, 13 Jan 2014 22:37:35 +0000 (22:37 +0000)]
Clean up RUN command for Assembler/getInt.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199158
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 13 Jan 2014 22:21:34 +0000 (22:21 +0000)]
Factor the option and checking of compiler version better. Put the
option with the others in the top level CMakeLists, and put the check in
HandleLLVMOptions. This will also let it be used from the standalone
Clang builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199149
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 13 Jan 2014 22:05:20 +0000 (22:05 +0000)]
Raise the minimum CMake version to 2.8.8 -- we have a report that the
compiler version checking doesn't work on 2.8.7. This feature was
documented in 2.8.10, but existed for an unknown amount of time before
that.
I'm actually happy to revert this and remove the use of the feature if
there is anyone with a specific problem updating CMake. Please just let
me know. I don't want to re-implement this CMake functionality unless
there is a reason, and this is the only real way to find that out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199148
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Mon, 13 Jan 2014 22:04:55 +0000 (22:04 +0000)]
Fix uninitialized warning in llvm/lib/IR/DataLayout.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199147
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Mon, 13 Jan 2014 21:49:25 +0000 (21:49 +0000)]
[DAG] Refactor ReassociateOps - no functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199146
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 13 Jan 2014 21:47:35 +0000 (21:47 +0000)]
Add a check that the host compiler is modern to CMake, take 1. This is
likely to be reverted and re-applied a few times. The minimum versions
we're aiming at:
GCC 4.7
Clang 3.1
MSVC 17.0 (Visual Studio 2012)
Let me know if something breaks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199145
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Mon, 13 Jan 2014 20:51:35 +0000 (20:51 +0000)]
[DAG] Teach DAG to also reassociate vector operations
This commit teaches DAG to reassociate vector ops, which in turn enables
constant folding of vector op chains that appear later on during custom lowering
and DAG combine.
Reviewed by Andrea Di Biagio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199135
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 13 Jan 2014 20:08:27 +0000 (20:08 +0000)]
Hide the pre-RA-sched= option.
This is a very confusing option for a feature that will go away.
-enable-misched is exposed instead to help triage issues with the new
scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199133
91177308-0d34-0410-b5e6-
96231b3b80d8