OSDN Git Service
Matt Arsenault [Fri, 28 Jun 2013 23:24:10 +0000 (23:24 +0000)]
Fix copypaste error in test.
Thename says it's an i32*, but it was actually creating another i8*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185239
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 28 Jun 2013 23:24:05 +0000 (23:24 +0000)]
Fix extra whitespace / formatting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185238
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 28 Jun 2013 22:54:16 +0000 (22:54 +0000)]
Try to unbreak Linux buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185237
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 28 Jun 2013 22:40:43 +0000 (22:40 +0000)]
Minimize precision loss when computing cyclic probabilities.
Allow block frequencies to exceed 32 bits by using the new
BlockFrequency division function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185236
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 28 Jun 2013 22:29:56 +0000 (22:29 +0000)]
PPC: Ignore spill/restore requests for VRSAVE (except on Darwin)
This fixes PR16418, which reports that a function calling
__builtin_unwind_init() asserts. The cause is that this generates a
spill/restore for VRSAVE, and we support that only on Darwin (because VRSAVE is
only really used on Darwin).
The test case checks only that we don't crash. We can add correctness checks
once someone verifies what behavior the function is supposed to have.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185235
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Malea [Fri, 28 Jun 2013 22:17:57 +0000 (22:17 +0000)]
Replace UNIXy path with os-independent one in DebugIR unit test
- should resolve windows buildbot failure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185232
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 28 Jun 2013 22:07:09 +0000 (22:07 +0000)]
SLP Vectorizer: Add support for trees with external users.
To support this we have to insert 'extractelement' instructions to pick the right lane.
We had this functionality before but I removed it when we moved to the multi-block design because it was too complicated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185230
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Fri, 28 Jun 2013 21:54:25 +0000 (21:54 +0000)]
Fix broken asserts that never fire.
Change assert("text") to assert(0 && "text"). The first case is a const char *
to bool conversion, which always evaluates to true, never triggering the
assert. The second case will always trigger the assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185227
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 28 Jun 2013 21:51:18 +0000 (21:51 +0000)]
Fix a bad overflow check pointed out by Ben.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185226
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Malea [Fri, 28 Jun 2013 21:49:53 +0000 (21:49 +0000)]
Fix Windows/Darwin build error in DebugIR unit tests
- mistakenly used get_current_dir() linux function
- replaced with getcwd/_getcwd as appropriate for current platform
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185225
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Fri, 28 Jun 2013 21:40:16 +0000 (21:40 +0000)]
Revising the MCJIT ObjectCache interface to allow subclasses to avoid retaining references to returned objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185221
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Jun 2013 21:28:01 +0000 (21:28 +0000)]
Remove unused member
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185219
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 28 Jun 2013 21:10:25 +0000 (21:10 +0000)]
Eliminate an assortment of undefined behavior.
Hopefully, this fixes the PPC64 buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185218
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 28 Jun 2013 20:46:27 +0000 (20:46 +0000)]
LoopVectorizer: Refactor the code that checks if it is safe to predicate blocks.
In this code we keep track of pointers that we are allowed to read from, if they are accessed by non-predicated blocks.
We use this list to allow vectorization of conditional loads in predicated blocks because we know that these addresses don't segfault.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185214
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Malea [Fri, 28 Jun 2013 20:37:20 +0000 (20:37 +0000)]
Adding tests for DebugIR pass
- lit tests verify that each line of input LLVM IR gets a !dbg node and a
corresponding entry of metadata that contains the line number
- unit tests verify that DebugIR works as advertised in the interface
- refactored some useful IR generation functionality from the MCJIT unit tests
so it can be reused
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185212
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 28 Jun 2013 20:23:29 +0000 (20:23 +0000)]
R600/SI: Add processor types for each CIK variant
Patch By: Alex Deucher
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185209
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 28 Jun 2013 20:18:14 +0000 (20:18 +0000)]
Fix CodeGen/PowerPC/stack-protector.ll on OpenBSD
On OpenBSD, the stack-smash protection transform uses "__guard_local"
and "__stack_smash_handler" instead of "__stack_chk_guard" and
"__stack_chk_fail". However, CodeGen/PowerPC/stack-protector.ll
doesn't specify a target OS, so on OpenBSD it fails.
Add -mtriple=ppc32-unknown-linux to make the test host-OS agnostic. While
there, convert to FileCheck.
Patch by Matthew Dempsky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185206
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Jun 2013 20:05:11 +0000 (20:05 +0000)]
DebugInfo: PR14728: TLS support
Based on GCC's output for TLS variables (OP_constNu, x@dtpoff,
OP_lo_user), this implements debug info support for TLS in ELF. Verified
that this output is correct/sufficient on Linux (using gold - if you're
using binutils-ld, you'll need something with the fix for
http://sourceware.org/bugzilla/show_bug.cgi?id=15685 in it).
Support on non-ELF is sort of "arbitrary" at the moment - if Apple folks
want to discuss (or just go ahead & implement) how this should work in
MachO, etc, I'm open.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185203
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Jun 2013 20:05:04 +0000 (20:05 +0000)]
DebugInfo: Pass MCSymbolRefExprs for labels instead of MCSymbols
This is a precursor to adding debug info support for TLS which requires
non-default relocations applied to TLS symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185202
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 28 Jun 2013 20:00:07 +0000 (20:00 +0000)]
Fix a PPC rlwimi instruction-selection bug
Under certain (evidently rare) circumstances, this code used to convert OR(a,
AND(x, y)) into OR(a, x). This was incorrect.
While there, I've added a comment to the code immediately above.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185201
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Malea [Fri, 28 Jun 2013 19:19:44 +0000 (19:19 +0000)]
Remove needless include (unistd.h) in DebugIR pass
- should unbreak Windows builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185198
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Malea [Fri, 28 Jun 2013 19:11:40 +0000 (19:11 +0000)]
Add flag to lli to enable debugging of IR when used with MCJIT.
- warn users when -debug-ir is used with old JIT engine (only partial debug
info is available)
For example, to debug an IR file with GDB (that supports JIT registration), do:
$ gdb --args lli -use-mcjit -debug-ir testcase.ll
(gdb) break main
(gdb) run
<Process continues to lli main>
(gdb) continue
<Process continues to testcase.ll main()
(gdb) step
<Now stepping through the LLVM IR in testcase.ll>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185197
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Malea [Fri, 28 Jun 2013 19:07:59 +0000 (19:07 +0000)]
Add missing header for DebugIR
- missed svn add...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185194
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Malea [Fri, 28 Jun 2013 19:05:23 +0000 (19:05 +0000)]
Remove limitation on DebugIR that made it require existing debug metadata.
- Build debug metadata for 'bare' Modules using DIBuilder
- DebugIR can be constructed to generate an IR file (to be seen by a debugger)
or not in cases where the user already has an IR file on disk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185193
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 28 Jun 2013 18:57:01 +0000 (18:57 +0000)]
Fix an off-by-one error. Also make the code a little more explicit in what it
is trying to do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185191
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Jun 2013 18:55:13 +0000 (18:55 +0000)]
DebugInfo: Revise r185189 to avoid subtle 'unsigned += bool'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185190
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Jun 2013 18:47:19 +0000 (18:47 +0000)]
DebugInfo: Simplify the AddressPool representation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185189
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Jun 2013 18:47:14 +0000 (18:47 +0000)]
DebugInfo: constify the AddressPool MCSymbol pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185188
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Briggs [Fri, 28 Jun 2013 18:44:48 +0000 (18:44 +0000)]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185187
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 28 Jun 2013 18:36:42 +0000 (18:36 +0000)]
Add missing case to switch statement - DAGTypeLegalizer::ExpandIntegerResult
should expand ATOMIC_CMP_SWAP nodes the same way that it does for ATOMIC_SWAP.
Since ATOMIC_LOADs on some targets (e.g. older ARM variants) get legalized to
ATOMIC_CMP_SWAPs, the missing case had been causing i64 atomic loads to crash
during isel.
<rdar://problem/
14074644>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185186
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 28 Jun 2013 18:33:19 +0000 (18:33 +0000)]
Stylistic cleanups, no functional change.
- Use static functions instead of anonymous namespace.
- Appease the Doxygen lobby.
- Use 0-based induction variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185185
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 28 Jun 2013 18:23:42 +0000 (18:23 +0000)]
Add a division operator to BlockFrequency.
Allow a BlockFrequency to be divided by a non-zero BranchProbability
with saturating arithmetic. This will be used to compute the frequency
of a loop header given the probability of leaving the loop.
Our long division algorithm already saturates on overflow, so that was a
freebie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185184
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 28 Jun 2013 18:03:54 +0000 (18:03 +0000)]
Remove unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185180
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Fri, 28 Jun 2013 17:58:15 +0000 (17:58 +0000)]
[NVPTX] Select -1 instead of 1 when anyextend'ing i1 types
This makes it more consistent with the ZeroOrNegativeOneBooleanContent flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185179
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Fri, 28 Jun 2013 17:58:13 +0000 (17:58 +0000)]
[NVPTX] Add (1.0 / sqrt(x)) => rsqrt(x) generation when allowable by FP flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185178
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Fri, 28 Jun 2013 17:58:10 +0000 (17:58 +0000)]
[NVPTX] Calling conventions fix
Fix ABI handling for function
returning bool -- use st.param.b32 to return the value
and use ld.param.b32 in caller to load the return value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185177
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Fri, 28 Jun 2013 17:58:07 +0000 (17:58 +0000)]
[NVPTX] Add support for cttz/ctlz/ctpop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185176
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Fri, 28 Jun 2013 17:58:04 +0000 (17:58 +0000)]
[NVPTX] Clean up comparison/select/convert patterns and factor out PTX instructions from their patterns
Test case is no breakage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185175
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Fri, 28 Jun 2013 17:57:59 +0000 (17:57 +0000)]
[NVPTX] Remove i8 register class. PTX support for i8 (.b8, .u8, .s8) is rather poor and we're better off just ignoring it and letting LLVM expand all i8 ops out to i16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185174
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Fri, 28 Jun 2013 17:57:55 +0000 (17:57 +0000)]
[NVPTX] Add support for vectorized function return values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185173
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Fri, 28 Jun 2013 17:57:53 +0000 (17:57 +0000)]
[NVPTX] Clean up handling of formal arguments and enable generation of vector parameter loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185172
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Fri, 28 Jun 2013 17:57:51 +0000 (17:57 +0000)]
[NVPTX] Add infrastructure for vector loads/stores of parameters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185171
91177308-0d34-0410-b5e6-
96231b3b80d8
Weiming Zhao [Fri, 28 Jun 2013 17:26:02 +0000 (17:26 +0000)]
Bug 13662: Enable GPRPair for all i64 operands of inline asm on ARM
This patch assigns paired GPRs for inline asm with
64-bit data on ARM. It's enabled for both ARM and Thumb to support modifiers
like %H, %Q, %R.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185169
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 28 Jun 2013 17:14:48 +0000 (17:14 +0000)]
LoopVectorize: Pull dyn_cast into setDebugLocFromInst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185168
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 28 Jun 2013 16:37:52 +0000 (16:37 +0000)]
Fix bugpoint execution/reference output file name
sys::fs::unique_file will now loop infinitely if provided with a file name
without '%' characters and the input file already exists. As a result, bugpoint
cannot use a fixed file name for the execution output (including the reference
output).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185166
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 28 Jun 2013 16:26:54 +0000 (16:26 +0000)]
LoopVectorize: Use static function instead of DebugLocSetter class
I used the class to safely reset the state of the builder's debug location. I
think I have caught all places where we need to set the debug location to a new
one. Therefore, we can replace the class by a function that just sets the debug
location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185165
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 28 Jun 2013 15:47:08 +0000 (15:47 +0000)]
R600: Add local memory support via LDS
Reviewed-by: Vincent Lejeune<vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185162
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 28 Jun 2013 15:46:59 +0000 (15:46 +0000)]
R600: Add support for GROUP_BARRIER instruction
Reviewed-by: Vincent Lejeune<vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185161
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 28 Jun 2013 15:46:53 +0000 (15:46 +0000)]
R600: Add ALUInst bit to tablegen definitions v2
v2:
- Remove functions left over from a previous rebase.
Reviewed-by: Vincent Lejeune<vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185160
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 28 Jun 2013 15:29:25 +0000 (15:29 +0000)]
ARM: ensure fixed-point conversions have sane types
We were generating intrinsics for NEON fixed-point conversions that didn't
exist (e.g. float -> i16). There are two cases to consider:
+ iN is smaller than float. In this case we can do the conversion but need an
extend or truncate as well.
+ iN is larger than float. In this case using the NEON conversion would be
incorrect so we don't perform any combining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185158
91177308-0d34-0410-b5e6-
96231b3b80d8
Tilmann Scheller [Fri, 28 Jun 2013 15:09:46 +0000 (15:09 +0000)]
ARM: Fix pseudo-instructions for SRS (Store Return State).
The mapping between SRS pseudo-instructions and SRS native instructions was incorrect, the correct mapping is:
srsfa -> srsib
srsea -> srsia
srsfd -> srsdb
srsed -> srsda
This fixes <rdar://problem/
14214734>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185155
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 28 Jun 2013 15:08:29 +0000 (15:08 +0000)]
llvm-symbolizer: don't leave dangling pointers after flushing LLVMSymbolizer. Add a destructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185154
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 28 Jun 2013 14:25:52 +0000 (14:25 +0000)]
llvm-symbolizer: skip leading underscore in Mach-O symbol table entries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185151
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 28 Jun 2013 12:06:25 +0000 (12:06 +0000)]
llvm-symbolizer: make name demangling a public static method of LLVMSymbolizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185143
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 28 Jun 2013 10:55:41 +0000 (10:55 +0000)]
Improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185141
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 28 Jun 2013 09:44:05 +0000 (09:44 +0000)]
Make a switch in createBinary fully-covered. Add forgotten macho_dsym_companion case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185139
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 28 Jun 2013 08:15:40 +0000 (08:15 +0000)]
llvm-symbolizer: add support for Mach-O universal binaries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185137
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hagglund [Fri, 28 Jun 2013 06:54:05 +0000 (06:54 +0000)]
Suppress GCC "control reaches end of non-void function" warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185136
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 28 Jun 2013 05:43:10 +0000 (05:43 +0000)]
Debug Info: clean up usage of Verify.
No functionality change.
It should suffice to check the type of a debug info metadata, instead of
calling Verify. For cases where we know the type of a DI metadata, use
assert.
Also update testing cases to make them conform to the format of DI classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185135
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 28 Jun 2013 04:24:32 +0000 (04:24 +0000)]
Integrate Assembler: Support X86_64_DTPOFF64 relocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185131
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 28 Jun 2013 03:48:47 +0000 (03:48 +0000)]
Improvements to unique_file and createUniqueDirectory.
* Don't try to create parent directories in unique_file. It had two problem:
* It violates the contract that it is atomic. If the directory creation
success and the file creation fails, we would return an error but the
file system was modified.
* When creating a temporary file clang would have to first check if the
parent directory existed or not to avoid creating one when it was not
supposed to.
* More efficient implementations of createUniqueDirectory and the unique_file
that produces only the file name. Now all 3 just call into a static
function passing what they want (name, file or directory).
Clang also has to be updated, so tests might fail if a bot picks up this commit
and not the corresponding clang one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185126
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 28 Jun 2013 01:29:35 +0000 (01:29 +0000)]
Convert tests to FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185124
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 28 Jun 2013 01:05:47 +0000 (01:05 +0000)]
Don't ask for a mode when we are not keeping the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185123
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 28 Jun 2013 00:38:54 +0000 (00:38 +0000)]
LoopVectorize: Preserve debug location info
radar://
14169017
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185122
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 28 Jun 2013 00:25:40 +0000 (00:25 +0000)]
Fix using arg_end() - arg_begin() instead of arg_size()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185121
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 28 Jun 2013 00:25:36 +0000 (00:25 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185120
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 27 Jun 2013 22:50:59 +0000 (22:50 +0000)]
Rename DIBuilder::createNullPtrType to createUnspecifiedType and introduce
a zero-argument createNullPtrType function for creating the canonical
nullptr type.
Differential Revision: http://llvm-reviews.chandlerc.com/D1050
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185114
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 27 Jun 2013 22:48:08 +0000 (22:48 +0000)]
At the request of Richard Smith, swapped the order of cold/builtin so it is in alphabetical order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185113
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 27 Jun 2013 21:58:19 +0000 (21:58 +0000)]
Revert "Revert "[APFloat] Removed APFloat constructor which initialized to either zero/NaN but allowed you to arbitrarily set the category of the float.""
This reverts commit r185099.
Looks like both the ppc-64 and mips bots are still failing after I reverted this
change.
Since:
1. The mips bot always performs a clean build,
2. The ppc64-bot failed again after a clean build (I asked the ppc-64
maintainers to clean the bot which they did... Thanks Will!),
I think it is safe to assume that this change was not the cause of the failures
that said builders were seeing. Thus I am recomitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185111
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 27 Jun 2013 20:40:11 +0000 (20:40 +0000)]
Revert "[APFloat] Removed APFloat constructor which initialized to either zero/NaN but allowed you to arbitrarily set the category of the float."
This reverts commit r185095. This is causing a FileCheck failure on
the 3dnow intrinsics on at least the mips/ppc bots but not on the x86
bots.
Reverting while I figure out what is going on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185099
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Thu, 27 Jun 2013 20:31:06 +0000 (20:31 +0000)]
LoopVectorize: Cache edge masks created during if-conversion
Otherwise, we end up with an exponential IR blowup.
Fixes PR16472.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185097
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 27 Jun 2013 20:19:13 +0000 (20:19 +0000)]
Remove unnecessary conditional checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185096
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 27 Jun 2013 19:50:52 +0000 (19:50 +0000)]
[APFloat] Removed APFloat constructor which initialized to either zero/NaN but allowed you to arbitrarily set the category of the float.
The category which an APFloat belongs to should be dependent on the
actual value that the APFloat has, not be arbitrarily passed in by the
user. This will prevent inconsistency bugs where the category and the
actual value in APFloat differ.
I also fixed up all of the references to this constructor (which were
only in LLVM).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185095
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 27 Jun 2013 19:38:13 +0000 (19:38 +0000)]
Improve the compression of the tablegen DiffLists by introducing a new sort
algorithm when assigning EnumValues to the synthesized registers.
The current algorithm, LessRecord, uses the StringRef compare_numeric
function. This function compares strings, while handling embedded numbers.
For example, the R600 backend registers are sorted as follows:
T1
T1_W
T1_X
T1_XYZW
T1_Y
T1_Z
T2
T2_W
T2_X
T2_XYZW
T2_Y
T2_Z
In this example, the 'scaling factor' is dEnum/dN = 6 because T0, T1, T2
have an EnumValue offset of 6 from one another. However, in other parts
of the register bank, the scaling factors are different:
dEnum/dN = 5:
KC0_128_W
KC0_128_X
KC0_128_XYZW
KC0_128_Y
KC0_128_Z
KC0_129_W
KC0_129_X
KC0_129_XYZW
KC0_129_Y
KC0_129_Z
The diff lists do not work correctly because different kinds of registers have
different 'scaling factors'. This new algorithm, LessRecordRegister, tries to
enforce a scaling factor of 1. For example, the registers are now sorted as
follows:
T1
T2
T3
...
T0_W
T1_W
T2_W
...
T0_X
T1_X
T2_X
...
KC0_128_W
KC0_129_W
KC0_130_W
...
For the Mips and R600 I see a 19% and 6% reduction in size, respectively. I
did see a few small regressions, but the differences were on the order of a
few bytes (e.g., AArch64 was 16 bytes). I suspect there will be even
greater wins for targets with larger register files.
Patch reviewed by Jakob.
rdar://
14006013
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185094
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 27 Jun 2013 17:57:40 +0000 (17:57 +0000)]
[Support/Registry.h] Include llvm/Support/Compiler.h.
Because Registry.h is using the LLVM_DELETED_FUNCTION macro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185087
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 27 Jun 2013 17:54:10 +0000 (17:54 +0000)]
Get rid of the unused class member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185086
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 27 Jun 2013 17:52:04 +0000 (17:52 +0000)]
CostModel: improve the cost model for load/store of non power-of-two types such as <3 x float>, which are popular in graphics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185085
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 27 Jun 2013 17:00:38 +0000 (17:00 +0000)]
R600: Remove alu-split.ll test
The purpose of this test was to check boundary conditions for the size
of an ALU clause. This test is very sensitive to changes to the
optimizer or scheduler, because it requires an exact number of ALU
instructions in order to remain valid. It's not good to have a test
this sensitive, because it is confusing to developers who implement
optimizations and then 'break' the test.
I'm not sure if there is a good way to test these limits using lit, but
if I can come up with replacement test that isn't as sensitive I'll add
it back to the tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185084
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Thu, 27 Jun 2013 15:11:55 +0000 (15:11 +0000)]
LoopVectorize: Use vectorized loop invariant gep index anchored in loop
Use vectorized instruction instead of original instruction anchored in the
original loop.
Fixes PR16452 and t2075.c of PR16455.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185081
91177308-0d34-0410-b5e6-
96231b3b80d8
Serge Pavlov [Thu, 27 Jun 2013 14:35:03 +0000 (14:35 +0000)]
Use MCFillFragment for zero-initialized data.
It fixes PR16338 (ICE when compiling very large two-dimensional array).
Differential Revision: http://llvm-reviews.chandlerc.com/D1043
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185080
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Thu, 27 Jun 2013 11:49:26 +0000 (11:49 +0000)]
Add a Subtarget feature 'v8fp' to the ARM backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185073
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 27 Jun 2013 11:26:41 +0000 (11:26 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185072
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 27 Jun 2013 11:07:42 +0000 (11:07 +0000)]
Don't cast away constness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185071
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Thu, 27 Jun 2013 09:49:34 +0000 (09:49 +0000)]
[SystemZ] Fix some embarrassing test typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185070
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Thu, 27 Jun 2013 09:42:10 +0000 (09:42 +0000)]
[SystemZ] Allow LA and LARL to be rematerialized
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185069
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Thu, 27 Jun 2013 09:38:48 +0000 (09:38 +0000)]
[SystemZ] Allow immediate moves to be rematerialized
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185068
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Thu, 27 Jun 2013 09:27:40 +0000 (09:27 +0000)]
[SystemZ] Add conditional store patterns
Add pseudo conditional store instructions, so that we use:
branch foo:
store
foo:
instead of:
load
branch foo:
move
foo:
store
z196 has real 32-bit and 64-bit conditional stores, but we don't use
any z196 instructions yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185065
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 27 Jun 2013 08:47:12 +0000 (08:47 +0000)]
Add more owners to CODE_OWNERS.TXT (Kostya Serebryany: AddressSanitizer and ThreadSanitizer; Evgeniy Stepanov: MemorySanitizer)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185064
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Thu, 27 Jun 2013 06:40:18 +0000 (06:40 +0000)]
Update testing case to make DI nodes have the correct format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185061
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 27 Jun 2013 06:09:14 +0000 (06:09 +0000)]
Add CXXFLAGS back to the Link command.
This is essentially reverting one piece of 184793 to try to fix one of Apple's
buildbots. I will check with Eric to see if this is OK or if we need to find
some other solution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185060
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 27 Jun 2013 03:45:31 +0000 (03:45 +0000)]
Add a convenience createUniqueDirectory function.
There are a few valid situation where we care about the structure inside a
directory, but not about the directory itself. A simple example is for unit
testing directory traversal.
PathV1 had a function like this, add one to V2 and port existing users of the
created temp file and delete it hack to using it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185059
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Thu, 27 Jun 2013 01:01:11 +0000 (01:01 +0000)]
Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185052
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Thu, 27 Jun 2013 00:45:41 +0000 (00:45 +0000)]
LoopVectorize: Don't store a reversed value in the vectorized value map
When we store values for reversed induction stores we must not store the
reversed value in the vectorized value map. Another instruction might use this
value.
This fixes 3 test cases of PR16455.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185051
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 27 Jun 2013 00:42:00 +0000 (00:42 +0000)]
[APFloat] Added unittest for APFloat.divide that checks special cases, result categories, and result statuses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185050
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 27 Jun 2013 00:25:01 +0000 (00:25 +0000)]
Added support for the Builtin attribute.
The Builtin attribute is an attribute that can be placed on function call site that signal that even though a function is declared as being a builtin,
rdar://problem/
13727199
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185049
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 27 Jun 2013 00:14:13 +0000 (00:14 +0000)]
No need to use a Set when a vector would do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185047
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 27 Jun 2013 00:00:45 +0000 (00:00 +0000)]
Removed two logging printf statements from the APFloat tests... = /.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185045
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 26 Jun 2013 23:55:26 +0000 (23:55 +0000)]
[APFloat] Added unittest for APFloat.multiply that checks special cases, result categories, and result status.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185044
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Wed, 26 Jun 2013 23:55:23 +0000 (23:55 +0000)]
[APFloat] Added unittest for APFloat.subtract that checks special cases, result categories, and result status.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185043
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 26 Jun 2013 23:44:45 +0000 (23:44 +0000)]
SLP: When searching for vectorization opportunities scan the blocks in post-order because we grow chains upwards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185041
91177308-0d34-0410-b5e6-
96231b3b80d8