Eric Christopher [Fri, 5 Dec 2014 00:22:38 +0000 (00:22 +0000)]
Rename the x86 isTargetMacho to isTargetMachO for uniformity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223421
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 5 Dec 2014 00:22:35 +0000 (00:22 +0000)]
Both of these subtargets have functions that check whether or
not the target is mach-o. Use them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223420
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 5 Dec 2014 00:09:02 +0000 (00:09 +0000)]
Move merging of alignment to a central location. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223418
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 5 Dec 2014 00:02:42 +0000 (00:02 +0000)]
Add a few extra cases to the test. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223417
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 4 Dec 2014 23:56:27 +0000 (23:56 +0000)]
Re-add support to llvm-objdump for Mach-O universal files and archives with -macho
with fixes. Includes the move of tests for llvm-objdump for universal files to an X86
directory. And the fix where it was failing on linux Rafael tracked down with asan.
I had both Jim Grosbach and Adam Hemet look over the second fix since I could not
set up asan to reproduce with the old version but not with the fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223416
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Thu, 4 Dec 2014 23:52:15 +0000 (23:52 +0000)]
[X86] Delete dead code in fcopysign lowering. NFC.
r32900 introduced custom lowering for fcopysign, with two checks to
change the magnitude value's type if it's larger/smaller than the sign
value's type. r32932 replaced that code for the smaller case.
r43205 did the same for the larger case, but left the old code, now dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223415
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 4 Dec 2014 23:31:21 +0000 (23:31 +0000)]
Convert test to use an extra Input file. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223414
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 4 Dec 2014 23:00:50 +0000 (23:00 +0000)]
Revert "Fix UBSan report in StringMap implementation."
This reverts commit r223402. Some bots fail with -Winvalid-offsetof
warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223407
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 4 Dec 2014 22:58:41 +0000 (22:58 +0000)]
Simplify implementation and testcase of r223401 based on feedback from dblaikie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223405
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 4 Dec 2014 22:45:31 +0000 (22:45 +0000)]
Fix UBSan report in StringMap implementation.
Use offsetof() instead of a member access within null pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223402
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 4 Dec 2014 22:29:04 +0000 (22:29 +0000)]
Debug info: If the RegisterCoalescer::reMaterializeTrivialDef() is
eliminating all uses of a vreg, update any DBG_VALUE describing that vreg
to point to the rematerialized register instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223401
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 4 Dec 2014 22:19:28 +0000 (22:19 +0000)]
Add some tests for SimplifyCFG's TurnSwitchRangeIntoICmp(). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223396
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 4 Dec 2014 22:19:25 +0000 (22:19 +0000)]
Add some tests for SimplifyCFG's ConstantFoldTerminator(). NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223395
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 4 Dec 2014 22:16:08 +0000 (22:16 +0000)]
Also use --icf=safe if we are being linked by gold.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223394
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Thu, 4 Dec 2014 21:39:24 +0000 (21:39 +0000)]
Add a FIXME as requested by Renato Golin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223390
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Thu, 4 Dec 2014 21:36:38 +0000 (21:36 +0000)]
Silence warning: variable 'buffer' set but not used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223389
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Thu, 4 Dec 2014 20:36:06 +0000 (20:36 +0000)]
[x86] Fix isOffsetSuitableForCodeModel kernel code model offset
Offset == 0 is a valid offset for kernel code model according to the
x86_64 System V ABI. Found by inspection, no testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223383
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Thu, 4 Dec 2014 20:25:50 +0000 (20:25 +0000)]
[AArch64] Combining Load and IntToFp should check for neon availability
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223382
91177308-0d34-0410-b5e6-
96231b3b80d8
Asiri Rathnayake [Thu, 4 Dec 2014 19:34:59 +0000 (19:34 +0000)]
Fix yet another unseen regression caused by r223113
r223113 added support for ARM modified immediate assembly syntax. Which
assumes all immediate operands are prefixed with a '#'. This assumption
is wrong as per the ARMARM - which recommends that all '#' characters be
treated optional. The current patch fixes this regression and adds a test
case. A follow-up patch will expand the test coverage to other instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223381
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonathan Roelofs [Thu, 4 Dec 2014 19:34:50 +0000 (19:34 +0000)]
Fix thumbv4t indirect calls
So there are a couple of issues with indirect calls on thumbv4t. First, the most
'obvious' instruction, 'blx' isn't available until v5t. And secondly, the
next-most-obvious sequence: 'mov lr, pc; bx rN' doesn't DTRT in thumb code
because the saved off pc has its thumb bit cleared, so when the callee returns
we end up in ARM mode.... yuck.
The solution is to 'bl' to a nearby landing pad with a 'bx rN' in it.
We could cut down on code size by sharing the landing pads between call sites
that are close enough, but for the moment let's do correctness first and look at
performance later.
Patch by: Iain Sandoe
http://reviews.llvm.org/D6519
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223380
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 4 Dec 2014 19:13:45 +0000 (19:13 +0000)]
Add a test case for argument type coercion in an invoke of a vararg function
This would have caught the bug I fixed in 223370.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223378
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 4 Dec 2014 18:33:28 +0000 (18:33 +0000)]
Add a section to Statepoint docs mentioning shared bugzilla search and standard mailing lists
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223374
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 4 Dec 2014 17:54:35 +0000 (17:54 +0000)]
Detect if the linker is gold and if so always use --gc-sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223372
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 4 Dec 2014 17:45:19 +0000 (17:45 +0000)]
Revert "r223364 - Revert r223347 which has caused crashes on bootstrap bots."
Reapply r223347, with a fix to not crash on uninserted instructions (or more
precisely, instructions in uninserted blocks). bugpoint was able to reduce the
test case somewhat, but it is still somewhat large (and relies on setting
things up to be simplified during inlining), so I've not included it here.
Nevertheless, it is clear what is going on and why.
Original commit message:
Restrict somewhat the memory-allocation pointer cmp opt from r223093
Based on review comments from Richard Smith, restrict this optimization from
applying to globals that might resolve lazily to other dynamically-loaded
modules, and also from dynamic allocas (which might be transformed into malloc
calls). In short, take extra care that the compared-to pointer is really
simultaneously live with the memory allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223371
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 4 Dec 2014 17:27:58 +0000 (17:27 +0000)]
Fix a typo: use of cast where dyn_cast was intended
This bug has the effect of converting a test of isGCRelocate(InvokeInst*) from a false return to a crash.
This may be the root cause of the crash Joerg reported against r223137, but I'm still waiting for a clean build of clang to complete to be able to confirm. Once I've confirmed the issue, I'll submit a test case separately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223370
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 4 Dec 2014 17:15:35 +0000 (17:15 +0000)]
test-release.sh: Add a way to specify --build to configure
Summary:
I currently have to specify --build=mips-linux-gnu or --build=mipsel-linux-gnu
to configure in order to successfully recurse a 32-bit build of the compiler on
my mips64-linux-gnu and mips64el-linux-gnu targets. This is a bug and will be
fixed but in the meantime it will be useful to have a way to work around this.
Reviewers: tstellarAMD
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6522
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223369
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 4 Dec 2014 16:59:36 +0000 (16:59 +0000)]
Remove dead code. NFC.
This interface was added 2 years ago but users never developed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223368
91177308-0d34-0410-b5e6-
96231b3b80d8
Asiri Rathnayake [Thu, 4 Dec 2014 14:49:07 +0000 (14:49 +0000)]
Fix a minor regression introduced in r223113
r223113 added support for ARM modified immediate assembly syntax. That patch
has broken support for immediate expressions, as in:
add r0, #(4 * 4)
It wasn't caught because we don't have any tests for this feature. This patch
fixes this regression and adds test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223366
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 4 Dec 2014 14:40:35 +0000 (14:40 +0000)]
Use size_type in the interface exposed by SmallVector.
This matches std::vector and should avoid unnecessary masking to 32 bits
when calling them on o 64 bits system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223365
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Potapenko [Thu, 4 Dec 2014 14:22:27 +0000 (14:22 +0000)]
Revert r223347 which has caused crashes on bootstrap bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223364
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 4 Dec 2014 14:10:20 +0000 (14:10 +0000)]
Revert "[Thumb/Thumb2] Added restrictions on PC, LR, SP in the register list for PUSH/POP/LDM/STM. <Differential Revision: reviews.llvm.org/D6090>"
This reverts commit r223356.
It was failing check-all (MC/ARM/thumb.s in particular).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223363
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Thu, 4 Dec 2014 13:49:51 +0000 (13:49 +0000)]
[X86] Improve a dag-combine that handles a vector extract -> zext sequence.
The current DAG combine turns a sequence of extracts from <4 x i32> followed by zexts into a store followed by scalar loads.
According to measurements by Martin Krastev (see PR 21269) for x86-64, a sequence of an extract, movs and shifts gives better performance. However, for 32-bit x86, the previous sequence still seems better.
Differential Revision: http://reviews.llvm.org/D6501
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223360
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyoti Allur [Thu, 4 Dec 2014 11:52:49 +0000 (11:52 +0000)]
[Thumb/Thumb2] Added restrictions on PC, LR, SP in the register list for PUSH/POP/LDM/STM. <Differential Revision: reviews.llvm.org/D6090>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223356
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Thu, 4 Dec 2014 11:21:44 +0000 (11:21 +0000)]
[X86] Simplify code. NFC.
Replaced some logic that checked if a build_vector node is doing a splat of a
non-undef value with a call to method BuildVectorSDNode::getSplatValue().
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223354
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 4 Dec 2014 11:00:09 +0000 (11:00 +0000)]
test-release.sh: Correct the logged configure command to match the one actually issued.
--disable-timestamps was added to the configure command way back in r142647 but
the command that echos this command to the log was not updated at the time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223351
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hagglund [Thu, 4 Dec 2014 10:36:42 +0000 (10:36 +0000)]
Use DomTree in MachineSink to sink over diamonds.
According to a previous FIXME comment we now not only look at MBB
successors, but also handle code sinking past them:
x = computation
if () {} else {}
use x
The instruction could be sunk over the whole diamond for the
if/then/else (or loop, etc), allowing it to be sunk into other blocks
after that.
Modified test added in r204522, due to one spill less present.
Minor fixes in comments.
Patch provided by Jonas Paulsson. Reviewed by Hal Finkel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223350
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 4 Dec 2014 09:44:01 +0000 (09:44 +0000)]
[InstCombine] Minor optimization for bswap with binary ops
Added instcombine optimizations for BSWAP with AND/OR/XOR ops:
OP( BSWAP(x), BSWAP(y) ) -> BSWAP( OP(x, y) )
OP( BSWAP(x), CONSTANT ) -> BSWAP( OP(x, BSWAP(CONSTANT) ) )
Since its just a one liner, I've also added BSWAP to the DAGCombiner equivalent as well:
fold (OP (bswap x), (bswap y)) -> (bswap (OP x, y))
Refactored bswap-fold tests to use FileCheck instead of just checking that the bswaps had gone.
Differential Revision: http://reviews.llvm.org/D6407
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223349
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Thu, 4 Dec 2014 09:40:44 +0000 (09:40 +0000)]
Masked Load / Store Intrinsics - the CodeGen part.
I'm recommiting the codegen part of the patch.
The vectorizer part will be send to review again.
Masked Vector Load and Store Intrinsics.
Introduced new target-independent intrinsics in order to support masked vector loads and stores. The loop vectorizer optimizes loops containing conditional memory accesses by generating these intrinsics for existing targets AVX2 and AVX-512. The vectorizer asks the target about availability of masked vector loads and stores.
Added SDNodes for masked operations and lowering patterns for X86 code generator.
Examples:
<16 x i32> @llvm.masked.load.v16i32(i8* %addr, <16 x i32> %passthru, i32 4 /* align */, <16 x i1> %mask)
declare void @llvm.masked.store.v8f64(i8* %addr, <8 x double> %value, i32 4, <8 x i1> %mask)
Scalarizer for other targets (not AVX2/AVX-512) will be done in a separate patch.
http://reviews.llvm.org/D6191
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223348
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 4 Dec 2014 09:22:28 +0000 (09:22 +0000)]
Restrict somewhat the memory-allocation pointer cmp opt from r223093
Based on review comments from Richard Smith, restrict this optimization from
applying to globals that might resolve lazily to other dynamically-loaded
modules, and also from dynamic allocas (which might be transformed into malloc
calls). In short, take extra care that the compared-to pointer is really
simultaneously live with the memory allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223347
91177308-0d34-0410-b5e6-
96231b3b80d8
Jean-Daniel Dupas [Thu, 4 Dec 2014 09:20:13 +0000 (09:20 +0000)]
Add missing test file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223346
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Thu, 4 Dec 2014 08:30:39 +0000 (08:30 +0000)]
clang-formatted ranged loops and assignment, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223344
91177308-0d34-0410-b5e6-
96231b3b80d8
Jean-Daniel Dupas [Thu, 4 Dec 2014 07:37:02 +0000 (07:37 +0000)]
Add mach-o LC_RPATH support to llvm-objdump
Summary: Add rpath load command support in Mach-O object and update llvm-objdump to use it.
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6512
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223343
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 4 Dec 2014 05:20:33 +0000 (05:20 +0000)]
[X86] Clean up whitespace as well as minor coding style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223339
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 4 Dec 2014 04:33:32 +0000 (04:33 +0000)]
Revert "Add missing test dependency and use a more canonical target name."
This reverts commit r223336.
NAKAMURA Takumi did the same thing in r223332!
Sorry about the noise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223337
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 4 Dec 2014 04:30:56 +0000 (04:30 +0000)]
Add missing test dependency and use a more canonical target name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223336
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Thu, 4 Dec 2014 04:28:38 +0000 (04:28 +0000)]
[Hexagon] Adding lit exception if Hexagon isn't built.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223335
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Thu, 4 Dec 2014 03:41:21 +0000 (03:41 +0000)]
[Hexagon] Marking some instructions as CodeGenOnly=0 and adding disassembly tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223334
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 4 Dec 2014 01:34:11 +0000 (01:34 +0000)]
Introduce "llvm-ranlib" as a name of targets since Object/archive-symtab.test requires llvm-ranlib.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223332
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 4 Dec 2014 01:27:53 +0000 (01:27 +0000)]
Sort by alphabetical order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223331
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 4 Dec 2014 00:56:38 +0000 (00:56 +0000)]
[X86] Restore X86 base pointer after call to llvm.eh.sjlj.setjmp
Commit on
- This patch fixes the bug described in
http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-May/062343.html
The fix allocates an extra slot just below the GPRs and stores the base pointer
there. This is done only for functions containing llvm.eh.sjlj.setjmp that also
need a base pointer. Because code containing llvm.eh.sjlj.setjmp saves all of
the callee-save GPRs in the prologue, the offset to the extra slot can be
computed before prologue generation runs.
Impact at run-time on affected functions is::
- One extra store in the prologue, The store saves the base pointer.
- One extra load after a llvm.eh.sjlj.setjmp. The load restores the base pointer.
Because the extra slot is just above a gap between frame-pointer-relative and
base-pointer-relative chunks of memory, there is no impact on other offset
calculations other than ensuring there is room for the extra slot.
http://reviews.llvm.org/D6388
Patch by Arch Robison <arch.robison@intel.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223329
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 4 Dec 2014 00:46:20 +0000 (00:46 +0000)]
[PowerPC] 'cc' should be an alias only to 'cr0'
We had mistakenly believed that GCC's 'cc' referred to the entire
condition-code register (cr0 through cr7) -- and implemented this in r205630 to
fix PR19326, but 'cc' is actually an alias only to 'cr0'. This is causing LLVM
to clobber too much with legacy code with inline asm using the 'cc' clobber.
Fixes PR21451.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223328
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 4 Dec 2014 00:45:23 +0000 (00:45 +0000)]
Minor typo and link fixes for Statepoint documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223327
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 4 Dec 2014 00:26:39 +0000 (00:26 +0000)]
HexagonMCInst.h: Qualify constants explicitly to appease msc17.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223325
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 4 Dec 2014 00:23:58 +0000 (00:23 +0000)]
For copy, cmake needs the full path to llvm-ar.
This should fix the windows build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223324
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 4 Dec 2014 00:06:57 +0000 (00:06 +0000)]
Allow target to specify prefix for labels
Use the MCAsmInfo instead of the DataLayout, and allow
specifying a custom prefix for labels specifically. HSAIL
requires that labels begin with @, but global symbols with &.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223323
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 4 Dec 2014 00:01:48 +0000 (00:01 +0000)]
A few more checks for gc.statepoints in the Verifier
This is simply a grab bag of unrelated checks:
- A statepoint call can't be marked readonly or readnone
- We don't currently support inline asm or varadic target functions. Both could be supported, but don't currently work.
- I forgot to check that the number of call arguments actually matched the wrapped callee in my previous change. Included here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223322
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 4 Dec 2014 00:00:36 +0000 (00:00 +0000)]
Add missing dependency on llvm-ar. Should hopefully fix the bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223321
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 3 Dec 2014 23:40:13 +0000 (23:40 +0000)]
[PowerPC] Fix inline asm memory operands not to use r0
On PowerPC, inline asm memory operands might be expanded as 0($r), where $r is
a register containing the address. As a result, this register cannot be r0, and
we need to enforce this register subclass constraint to prevent miscompiling
the code (we'd get this constraint for free with the usual instruction
definitions, but that scheme has no knowledge of how we end up printing inline
asm memory operands, and so here we need to do it 'by hand'). We can accomplish
this within the current address-mode selection framework by introducing an
explicit COPY_TO_REGCLASS node.
Fixes PR21443.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223318
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Wed, 3 Dec 2014 23:38:08 +0000 (23:38 +0000)]
[RegAllocFast] Handle implicit definitions conservatively.
Prior to this commit, physical registers defined implicitly were considered free
right after their definition, i.e.. like dead definitions. Therefore, their uses
had to immediately follow their definitions, otherwise the related register may
be reused to allocate a virtual register.
This commit fixes this assumption by keeping implicit definitions alive until
they are actually used. The downside is that if the implicit definition was dead
(and not marked at such), we block an otherwise available register. This is
however conservatively correct and makes the fast register allocator much more
robust in particular regarding the scheduling of the instructions.
Fixes PR21700.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223317
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Dec 2014 23:29:34 +0000 (23:29 +0000)]
This reverts commit r223306 and r223277.
The code is using uninitialized memory and failing on linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223315
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 3 Dec 2014 23:28:26 +0000 (23:28 +0000)]
[msan] allow -fsanitize-coverage=N together with -fsanitize=memory, llvm part
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223312
91177308-0d34-0410-b5e6-
96231b3b80d8
Jacques Pienaar [Wed, 3 Dec 2014 23:21:02 +0000 (23:21 +0000)]
Test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223310
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Dec 2014 23:17:24 +0000 (23:17 +0000)]
Make llvm-ar a real build target and install it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223309
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Matthews [Wed, 3 Dec 2014 23:01:35 +0000 (23:01 +0000)]
Add a test-case for lit xunit output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223307
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 3 Dec 2014 23:00:16 +0000 (23:00 +0000)]
Move tests for llvm-objdump for universal files to X86 directory to fix build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223306
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Matthews [Wed, 3 Dec 2014 22:59:15 +0000 (22:59 +0000)]
Don't allow test-suite names with . in them in xml output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223305
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Dec 2014 22:36:37 +0000 (22:36 +0000)]
Split the set of identified struct types into opaque and non-opaque ones.
The non-opaque part can be structurally uniqued. To keep this to just
a hash lookup, we don't try to unique cyclic types.
Also change the type mapping algorithm to be optimistic about a type
not being recursive and only create a new type when proven to be wrong.
This is not as strong as trying to speculate that we can keep the source
type, but is simpler (no speculation to revert) and more powerfull
than what we had before (we don't copy non-recursive types at least).
I initially wrote this to try to replace the name based type merging.
It is not strong enough to replace it, but is is a useful addition.
With this patch the number of named struct types is a clang lto bootstrap goes
from 49674 to 15986.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223278
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 3 Dec 2014 22:29:40 +0000 (22:29 +0000)]
Add support to llvm-objdump for Mach-O universal files and archives with -macho.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223277
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 3 Dec 2014 22:28:05 +0000 (22:28 +0000)]
fix typos, grammar, formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223276
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Wed, 3 Dec 2014 22:23:24 +0000 (22:23 +0000)]
Strength Verifier checks around the types involved in a statepoint
Add checks that the types in a gc.statepoint sequence match the wrapper callee and that relocating a pointer doesn't change it's type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223275
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 3 Dec 2014 22:10:39 +0000 (22:10 +0000)]
correct spelling, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223274
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 3 Dec 2014 21:46:33 +0000 (21:46 +0000)]
[SimplifyLibCalls] Improve double->float shrinking to consider constants
This allows cases like float x; fmin(1.0, x); to be optimized to fminf(1.0f, x);
rdar://
19049359
Differential Revision: http://reviews.llvm.org/D6496
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223270
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 3 Dec 2014 21:46:29 +0000 (21:46 +0000)]
[SimplifyLibCalls] Enable double to float shrinking for copysign
rdar://
19049359
Differential Revision: http://reviews.llvm.org/D6495
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223269
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 3 Dec 2014 21:40:25 +0000 (21:40 +0000)]
[Hexagon] Converting member InstrDesc to static variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223268
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 3 Dec 2014 20:58:23 +0000 (20:58 +0000)]
Fix grammar-o.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223265
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 3 Dec 2014 20:23:22 +0000 (20:23 +0000)]
[Hexagon] Converting subclass members to an implicit operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223264
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 3 Dec 2014 19:58:49 +0000 (19:58 +0000)]
range-for some things
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223263
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 3 Dec 2014 19:58:48 +0000 (19:58 +0000)]
Simplify CodeGenRegBank::inferMatchingSuperRegClass & its caller by passing an iterator rather than index
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223262
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 3 Dec 2014 19:58:45 +0000 (19:58 +0000)]
Simplify ownership of RegClasses by using list<CodeGenRegisterClass> instead of vector<CodeGenRegisterClass*>
This complicates a few algorithms due to not having random access, but
not by a huge degree I don't think (open to debate/design
discussion/etc).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223261
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 3 Dec 2014 19:58:41 +0000 (19:58 +0000)]
Range-for some stuff related to RegClasses, and comment cases where range-for isn't suitable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223260
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Wed, 3 Dec 2014 19:53:15 +0000 (19:53 +0000)]
Make the Verifier more strict about gc.statepoints
The recently added documentation for statepoints claimed that we checked the parameters of the various intrinsics for validity. This patch adds the code to actually do so. I also removed a couple of redundant checks for conditions which are checked elsewhere in the Verifier and simplified the logic using the helper functions from Statepoint.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223259
91177308-0d34-0410-b5e6-
96231b3b80d8
Will Schmidt [Wed, 3 Dec 2014 18:46:30 +0000 (18:46 +0000)]
Add TableGen info for Power8.
This is based on the Power7 version, with units added and renamed to match P8.
Differential Revision: http://reviews.llvm.org/D6358
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223257
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Wed, 3 Dec 2014 18:39:44 +0000 (18:39 +0000)]
Change the name to be in style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223255
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 3 Dec 2014 18:35:11 +0000 (18:35 +0000)]
Fix sphinx error from Statepoints.rst
It was complaining it wasn't included in any toctree
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223254
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 3 Dec 2014 18:27:08 +0000 (18:27 +0000)]
R600/SI: Move SIInsertWaits into AMDGPUPassConfig::addPreSched2()
This pass needs to be run after PrologEpilogInserter, because
that pass may inserter spill code which reads or writes memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223253
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 3 Dec 2014 18:27:05 +0000 (18:27 +0000)]
R600/SI: Don't run SI passes on R600 subtargets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223252
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 3 Dec 2014 17:49:26 +0000 (17:49 +0000)]
AArch64: fix wrong-endian parameter passing.
The blocked arguments code didn't take account of the hacks needed to support
it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223247
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 3 Dec 2014 17:36:39 +0000 (17:36 +0000)]
[NFC] Fixing pendantic warning extra semicolons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223246
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 3 Dec 2014 17:35:39 +0000 (17:35 +0000)]
[Hexagon] [NFC] Moving function implementations out of header. Clang-formatting files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223245
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 3 Dec 2014 17:32:44 +0000 (17:32 +0000)]
Fix test to use the right metadata node (reapply r223239 plus a fix) and also to use the correct path to the GCNO file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223244
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 3 Dec 2014 17:31:43 +0000 (17:31 +0000)]
[Hexagon] [NFC] Renaming *packetStart to *packetBegin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223243
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Potapenko [Wed, 3 Dec 2014 16:03:08 +0000 (16:03 +0000)]
Revert r223239, which broke some bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223240
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Potapenko [Wed, 3 Dec 2014 15:15:58 +0000 (15:15 +0000)]
Fix the metadata number used by llvm.gcov to match the number of the inserted metadata node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223239
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 3 Dec 2014 14:44:16 +0000 (14:44 +0000)]
Silencing several "multiple copy constructors" warnings from MSVC; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223238
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 3 Dec 2014 14:39:58 +0000 (14:39 +0000)]
Silencing a 32-bit implicit conversion warning in MSVC; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223237
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Wed, 3 Dec 2014 14:15:53 +0000 (14:15 +0000)]
msan] Add compile-time checks for missing origins.
This change makes MemorySanitizer instrumentation a bit more strict
about instructions that have no origin id assigned to them.
This would have caught the bug that was fixed in r222918.
This is re-commit of r222997, reverted in r223211, with 3 more
missing origins added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223236
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Wed, 3 Dec 2014 10:39:15 +0000 (10:39 +0000)]
InstCombine: simplify signed range checks
Try to convert two compares of a signed range check into a single unsigned compare.
Examples:
(icmp sge x, 0) & (icmp slt x, n) --> icmp ult x, n
(icmp slt x, 0) | (icmp sgt x, n) --> icmp ugt x, n
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223224
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 3 Dec 2014 09:37:50 +0000 (09:37 +0000)]
[PowerPC] Print all inline-asm consts as signed numbers
Almost all immediates in PowerPC assembly (both 32-bit and 64-bit) are signed
numbers, and it is important that we print them as such. To make sure that
happens, we change PPCTargetLowering::LowerAsmOperandForConstraint so that it
does all intermediate checks on a signed-extended int64_t value, and then
creates the resulting target constant using MVT::i64. This will ensure that all
negative values are printed as negative values (mirroring what is done in other
backends to achieve the same sign-extension effect).
This came up in the context of inline assembly like this:
"add%I2 %0,%0,%2", ..., "Ir"(-1ll)
where we used to print:
addi 3,3,
4294967295
and gcc would print:
addi 3,3,-1
and gas accepts both forms, but our builtin assembler (correctly) does not. Now
we print -1 like gcc does.
While here, I replaced a bunch of custom integer checks with isInt<16> and
friends from MathExtras.h.
Thanks to Paul Hargrove for the bug report.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223220
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Wed, 3 Dec 2014 08:12:26 +0000 (08:12 +0000)]
Emit ABI_FP_rounding attribute.
LLVM understands a -enable-sign-dependent-rounding-fp-math codegen option. When
the user has specified this option, the Tag_ABI_FP_rounding attribute should be
emitted with value 1. This option currently does not appear to disable
transformations and optimizations that assume default floating point rounding
behavior, AFAICT, but the intention should be recorded in the build attributes,
regardless of what the compiler actually does with the intention.
Change-Id: If838578df3dc652b6f2796b8d152545674bcb30e
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223218
91177308-0d34-0410-b5e6-
96231b3b80d8
Charlie Turner [Wed, 3 Dec 2014 07:59:50 +0000 (07:59 +0000)]
Add tests for default value of Tag_ABI_FP_rounding.
Change-Id: I051866d073fc6ce87ce3e693a3762da6d81f4393
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223217
91177308-0d34-0410-b5e6-
96231b3b80d8