Michael J. Spencer [Mon, 10 Sep 2012 19:04:02 +0000 (19:04 +0000)]
[Object] Extract Elf_Ehdr. Patch by Hemant Kulkarni!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163532
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 10 Sep 2012 18:51:09 +0000 (18:51 +0000)]
Stack Coloring: Handle the case where END markers come before BEGIN markers properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163530
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Mon, 10 Sep 2012 18:33:51 +0000 (18:33 +0000)]
Enhance PR11334 fix to support extload from v2f32/v4f32
- Fix an remaining issue of PR11674 as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163528
91177308-0d34-0410-b5e6-
96231b3b80d8
Sergei Larin [Mon, 10 Sep 2012 17:31:34 +0000 (17:31 +0000)]
Add "blocked" heuristic to the Hexagon MI scheduler.
Improve AQ instruction selection in the Hexagon MI scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163523
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Mon, 10 Sep 2012 17:00:37 +0000 (17:00 +0000)]
Fold multiply by 0 or 1 when in UnsafeFPMath mode in SelectionDAG::getNode().
This folding happens as early as possible for performance reasons, and to make sure it isn't foiled by other transforms (e.g. forming FMAs).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163519
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Mon, 10 Sep 2012 16:56:31 +0000 (16:56 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163518
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Mon, 10 Sep 2012 16:36:16 +0000 (16:36 +0000)]
Add boolean simplification support from CMOV
- If a boolean value is generated from CMOV and tested as boolean value,
simplify the use of test result by referencing the original condition.
RDRAND intrinisc is one of such cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163516
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Mon, 10 Sep 2012 14:01:21 +0000 (14:01 +0000)]
Fix an assertion failure when optimising a shufflevector incorrectly into concat_vectors, and a followup bug with SelectionDAG::getNode() creating nodes with invalid types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163511
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 10 Sep 2012 13:20:00 +0000 (13:20 +0000)]
Minor cleanup. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163510
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 10 Sep 2012 13:17:58 +0000 (13:17 +0000)]
Stack Coloring: Debug prints to print the slot number and not the array index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163509
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 10 Sep 2012 12:47:38 +0000 (12:47 +0000)]
Stack Coloring: When searching for disjoint regions, do not compare intervals twice or to theirself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163508
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 10 Sep 2012 12:39:35 +0000 (12:39 +0000)]
Stack Coloring: Add support for multiple regions of the same slot, within a single basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163507
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Mon, 10 Sep 2012 12:13:11 +0000 (12:13 +0000)]
The VPSHUFB 256-bit instruction may be generated when one of input vector is undefined or zeroinitializer.
I've added the "zeroinitializer" case in this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163506
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 10 Sep 2012 11:52:14 +0000 (11:52 +0000)]
Make helper function static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163504
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 10 Sep 2012 11:52:08 +0000 (11:52 +0000)]
Move bypassSlowDivision into the llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163503
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 10 Sep 2012 11:52:00 +0000 (11:52 +0000)]
c bindings: revert LLVMConstInlineAsm to always use the default asm dialect.
- The C API should be stable
- InlineAsm::AsmDialect is not exposed to C
- The function didn't match the prototype so this was unreachable code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163502
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Mon, 10 Sep 2012 10:32:29 +0000 (10:32 +0000)]
GTest on Android needs a custom tmpdir path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163501
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 10 Sep 2012 08:51:46 +0000 (08:51 +0000)]
Fix a typo in the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163496
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 10 Sep 2012 08:44:15 +0000 (08:44 +0000)]
Add an assertion that the frame index is indeed inside the declared lifetime region.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163495
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 10 Sep 2012 08:43:23 +0000 (08:43 +0000)]
Teach the DAGBuilder about lifetime markers which are generated from PHINodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163494
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 10 Sep 2012 07:44:22 +0000 (07:44 +0000)]
Fix style issues from r163302 pointed out by Evan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163491
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 9 Sep 2012 23:41:11 +0000 (23:41 +0000)]
Move spaces to the right places. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163485
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 9 Sep 2012 23:40:55 +0000 (23:40 +0000)]
Add missing space before {. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163484
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 9 Sep 2012 22:58:45 +0000 (22:58 +0000)]
Teach DAG combiner to constant fold fneg of a BUILD_VECTOR of constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163483
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sun, 9 Sep 2012 20:34:25 +0000 (20:34 +0000)]
Fixing a type width warning with MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163481
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 9 Sep 2012 16:44:05 +0000 (16:44 +0000)]
DSE: Poking holes into a SetVector is expensive, avoid it if possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163480
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 9 Sep 2012 11:56:14 +0000 (11:56 +0000)]
LiveVariables: Compute a set of defs and kills to speed up updating LV during critical edge splitting.
Previously we checked if the register is def'd in a block via the def/use list a
nd walked the list of kills to check if the register is killed in a block. Both
of these checks can be made much cheaper by walking the block first and
recording all defs and kills.
This reduces the compile time of the test case from PR13651 from 40s to 15s at
-O2. The compile time is still dominated by LV updating but now the main culprit
is SparseBitVector's slowness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163478
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 8 Sep 2012 17:42:27 +0000 (17:42 +0000)]
Add instruction selection for ffloor of vectors when SSE4.1 or AVX is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163473
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 8 Sep 2012 12:07:24 +0000 (12:07 +0000)]
lit: Util.which(): Use os.path.isfile() instead of os.path.exists(), or it hits to the directory.
For example, which('loop-convert') returns 'loop-convert' when the directory 'loop-convert' exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163469
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 8 Sep 2012 07:46:05 +0000 (07:46 +0000)]
Use 256-bit alignment for constant pool value for 256-bit vector FNEG lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163463
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 8 Sep 2012 07:31:51 +0000 (07:31 +0000)]
Add support for lowering FABS of vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163461
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 8 Sep 2012 04:58:43 +0000 (04:58 +0000)]
Set operation action for FFLOOR to Expand for all vector types for X86. Set FFLOOR of v4f32 to Expand for ARM. v2f64 was already correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163458
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 8 Sep 2012 04:32:13 +0000 (04:32 +0000)]
Revert "Add -exact-match option to FileCheck to allow clients to do exact matches without using regular expressions."
Turns out I did not need it after all. If we find a use for it in the future, we
can resurrect it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163457
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 8 Sep 2012 04:25:29 +0000 (04:25 +0000)]
Add operator< for FoldingSetNodeID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163454
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 8 Sep 2012 00:07:26 +0000 (00:07 +0000)]
Remove an incorrect assert during branch weight propagation.
Patch and test case by Alastair Murray!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163437
91177308-0d34-0410-b5e6-
96231b3b80d8
Anshuman Dasgupta [Fri, 7 Sep 2012 21:35:43 +0000 (21:35 +0000)]
Refactored DFA generator. Merged transition class into state class.
Patch by Ivan Llopard!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163424
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Rosenberg [Fri, 7 Sep 2012 21:34:50 +0000 (21:34 +0000)]
Add IRC handle entry to CREDITS.TXT as a test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163423
91177308-0d34-0410-b5e6-
96231b3b80d8
Sandeep Patel [Fri, 7 Sep 2012 21:20:20 +0000 (21:20 +0000)]
Correct an unfortunately necessary typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163422
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 7 Sep 2012 21:08:01 +0000 (21:08 +0000)]
Fix alignment of .comm and .lcomm on mingw32.
For some reason .lcomm uses byte alignment and .comm log2 alignment so we can't
use the same setting for both. Fix this by reintroducing the LCOMM enum.
I verified this against mingw's gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163420
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Fri, 7 Sep 2012 20:38:18 +0000 (20:38 +0000)]
Initial relocations test for the Mips standalone assembler.
This is not an exhaustive set, but something we can build on.
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163419
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 7 Sep 2012 20:23:29 +0000 (20:23 +0000)]
Fix indent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163416
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 7 Sep 2012 18:56:10 +0000 (18:56 +0000)]
Contrary to what the documentation says, .lcomm alignment on COFF is in bytes, not power of 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163405
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 7 Sep 2012 18:16:38 +0000 (18:16 +0000)]
Update function names to conform to guidelines. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163401
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 7 Sep 2012 17:34:15 +0000 (17:34 +0000)]
Custom DAGCombine for and/or/xor are for all ARMs.
The 'select' transformations apply to all ARM architectures and don't
require hasV6T2Ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163396
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 7 Sep 2012 17:25:13 +0000 (17:25 +0000)]
MC: Overhaul handling of .lcomm
- Darwin lied about not supporting .lcomm and turned it into zerofill in the
asm parser. Push the zerofill-conversion down into macho-specific code.
- This makes the tri-state LCOMMType enum superfluous, there are no targets
without .lcomm.
- Do proper error reporting when trying to use .lcomm with alignment on a target
that doesn't support it.
- .comm and .lcomm alignment was parsed in bytes on COFF, should be power of 2.
- Fixes PR13755 (.lcomm crashes on ELF).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163395
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 7 Sep 2012 14:51:35 +0000 (14:51 +0000)]
PR13754: llvm-mc/x86 crashes on .cfi directives without the % prefix for registers.
gas accepts this and it seems to be common enough to be worth supporting. This
doesn't affect the parsing of reg operands outside of .cfi directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163390
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 7 Sep 2012 09:47:42 +0000 (09:47 +0000)]
MipsAsmParser: Fix a couple of string use-after-frees and misuses of classof.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163383
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Fri, 7 Sep 2012 09:24:13 +0000 (09:24 +0000)]
yet another attempt at fixing @OCAMLOPT@ for sed.
Patch by Rick Foos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163380
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 7 Sep 2012 08:22:57 +0000 (08:22 +0000)]
SimplifyCFG: ValidLookupTableConstant should be static
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163378
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 7 Sep 2012 06:47:16 +0000 (06:47 +0000)]
Add -exact-match option to FileCheck to allow clients to do exact matches without using regular expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163371
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 7 Sep 2012 05:13:00 +0000 (05:13 +0000)]
Stop emitting lifetime region info when stack coloring is not enabled in O0
- this should fix PR13780
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163370
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Fri, 7 Sep 2012 01:42:38 +0000 (01:42 +0000)]
The Mips standalone assembler aliased instruction support.
The assembler can alias one instruction into another based
on the operands. For example the jump instruction "J" takes
and immediate operand, but if the operand is a register the
assembler will change it into a jump register "JR" instruction.
These changes are in the instruction td file.
Test cases included
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163368
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Fri, 7 Sep 2012 00:48:02 +0000 (00:48 +0000)]
The Mips standalone assembler intial directive support.
Actually these are just stubs for parsing the directives.
Semantic support will come later.
Test cases included
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163364
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Fri, 7 Sep 2012 00:23:42 +0000 (00:23 +0000)]
The Mips standalone assembler fpu instruction support.
Test cases included
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163363
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 6 Sep 2012 23:32:48 +0000 (23:32 +0000)]
Re-work bit/bits value resolving in tblgen
- This patch is inspired by the failure of the following code snippet
which is used to convert enumerable values into encoding bits to
improve the readability of td files.
class S<int s> {
bits<2> V = !if(!eq(s, 8), {0, 0},
!if(!eq(s, 16), {0, 1},
!if(!eq(s, 32), {1, 0},
!if(!eq(s, 64), {1, 1}, {?, ?}))));
}
Later, PR8330 is found to report not exactly the same bug relevant
issue to bit/bits values.
- Instead of resolving bit/bits values separately through
resolveBitReference(), this patch adds getBit() for all Inits and
resolves bit value by resolving plus getting the specified bit. This
unifies the resolving of bit with other values and removes redundant
logic for resolving bit only. In addition,
BitsInit::resolveReferences() is optimized to take advantage of this
origanization by resolving VarBitInit's variable reference first and
then getting bits from it.
- The type interference in '!if' operator is revised to support possible
combinations of int and bits/bit in MHS and RHS.
- As there may be illegal assignments from integer value to bit, says
assign 2 to a bit, but we only check this during instantiation in some
cases, e.g.
bit V = !if(!eq(x, 17), 0, 2);
Verbose diagnostic message is generated when invalid value is
resolveed to help locating the error.
- PR8330 is fixed as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163360
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 6 Sep 2012 23:31:29 +0000 (23:31 +0000)]
Remove unused variable introduced by r163346.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163359
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 6 Sep 2012 22:55:11 +0000 (22:55 +0000)]
Don't include stdint.h directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163354
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 6 Sep 2012 21:07:57 +0000 (21:07 +0000)]
Explicitly erase the file from disk if something bad happened. <rdar://problem/
12184899>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163349
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Thu, 6 Sep 2012 20:00:02 +0000 (20:00 +0000)]
The Mips standalone assembler memory instruction support.
This includes sb,sc,sh,sw,lb,lw,lbu,lh,lhu,ll,lw
Test case included
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163346
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Thu, 6 Sep 2012 19:55:56 +0000 (19:55 +0000)]
Release build: guard dump functions with "ifndef NDEBUG"
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163344
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 6 Sep 2012 19:51:21 +0000 (19:51 +0000)]
TiedTo is an integer, not a bool.
Thanks, Andy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163343
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Thu, 6 Sep 2012 19:06:06 +0000 (19:06 +0000)]
Release build: guard dump functions with "ifndef NDEBUG"
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163339
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 6 Sep 2012 18:15:23 +0000 (18:15 +0000)]
Allow overlaps between virtreg and physreg live ranges.
The RegisterCoalescer understands overlapping live ranges where one
register is defined as a copy of the other. With this change, register
allocators using LiveRegMatrix can do the same, at least for copies
between physical and virtual registers.
When a physreg is defined by a copy from a virtreg, allow those live
ranges to overlap:
%CL<def> = COPY %vreg11:sub_8bit; GR32_ABCD:%vreg11
%vreg13<def,tied1> = SAR32rCL %vreg13<tied0>, %CL<imp-use,kill>
We can assign %vreg11 to %ECX, overlapping the live range of %CL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163336
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 6 Sep 2012 18:15:18 +0000 (18:15 +0000)]
Handle overlapping regunit intervals in LiveIntervals::addKillFlags().
We will soon allow virtual register live ranges to overlap regunit live
ranges when the physreg is defined as a copy of the virtreg:
%EAX = COPY %vreg5
FOO %vreg5
BAR %EAX<kill>
There is no real interference since %vreg5 and %EAX have the same value
where they overlap.
This patch prevents addKillFlags from adding virtreg kill flags to FOO
where the assigned physreg is overlapping the virtual register live
range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163335
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 6 Sep 2012 18:15:15 +0000 (18:15 +0000)]
Clear kill flags while computing live ranges.
Kill flags are difficult to maintain, and liveness queries are better
handled by live intervals.
Kill flags are reinserted after register allocation by addKillFlags().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163334
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Thu, 6 Sep 2012 15:42:13 +0000 (15:42 +0000)]
Dont cast away const needlessly. Found by gcc48 -Wcast-qual.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163324
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 6 Sep 2012 15:27:12 +0000 (15:27 +0000)]
Diagnose invalid alignments on duplicating VLDn instructions.
Patch by Chris Lidbury.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163323
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 6 Sep 2012 15:17:49 +0000 (15:17 +0000)]
Check for invalid alignment values when decoding VLDn/VSTn (single ln) instructions.
Patch by Chris Lidbury.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163321
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Thu, 6 Sep 2012 14:41:53 +0000 (14:41 +0000)]
BasicAA: Recognize cyclic NoAlias phis
Enhances basic alias analysis to recognize phis whose first incoming values are
NoAlias and whose other incoming values are just the phi node itself through
some amount of recursion.
Example: With this change basicaa reports that ptr_phi and ptr_phi2 do not alias
each other.
bb:
ptr = ptr2 + 1
loop:
ptr_phi = phi [bb, ptr], [loop, ptr_plus_one]
ptr2_phi = phi [bb, ptr2], [loop, ptr2_plus_one]
...
ptr_plus_one = gep ptr_phi, 1
ptr2_plus_one = gep ptr2_phi, 1
This enables the elimination of one load in code like the following:
extern int foo;
int test_noalias(int *ptr, int num, int* coeff) {
int *ptr2 = ptr;
int result = (*ptr++) * (*coeff--);
while (num--) {
*ptr2++ = *ptr;
result += (*coeff--) * (*ptr++);
}
*ptr = foo;
return result;
}
Part 2/2 of fix for PR13564.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163319
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 6 Sep 2012 14:36:55 +0000 (14:36 +0000)]
Use correct part of complex operand to encode VST1 alignment.
Patch by Chris Lidbury.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163318
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Thu, 6 Sep 2012 14:31:51 +0000 (14:31 +0000)]
BasicAA: GEPs of NoAlias'ing base ptr with equivalent indices are NoAlias
If we can show that the base pointers of two GEPs don't alias each other using
precise analysis and the indices and base offset are equal then the two GEPs
also don't alias each other.
This is primarily needed for the follow up patch that analyses NoAlias'ing PHI
nodes.
Part 1/2 of fix for PR13564.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163317
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 6 Sep 2012 14:27:06 +0000 (14:27 +0000)]
Disable stack coloring by default in order to resolve the i386 failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163316
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 6 Sep 2012 14:15:52 +0000 (14:15 +0000)]
Tablegen: Add OperandWithDefaultOps Operand type
This Operand type takes a default argument, and is initialized to
this value if it does not appear in a patter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163315
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Thu, 6 Sep 2012 12:42:01 +0000 (12:42 +0000)]
AVX2 optimization.
Added generation of VPSHUB instruction for <32 x i8> vector shuffle when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163312
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 6 Sep 2012 11:13:55 +0000 (11:13 +0000)]
Fix a few old-GCC warnings. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163309
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 6 Sep 2012 10:33:33 +0000 (10:33 +0000)]
Fix the test by specifying an exact cpu model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163307
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Thu, 6 Sep 2012 10:32:08 +0000 (10:32 +0000)]
Fix self-host; ensure signedness is consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163306
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 6 Sep 2012 10:10:35 +0000 (10:10 +0000)]
Fix switch_to_lookup_table.ll test from r163302.
The lookup tables did not get built in a deterministic order.
This makes them get built in the order that the corresponding phi nodes
were found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163305
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Thu, 6 Sep 2012 09:55:02 +0000 (09:55 +0000)]
Improve codegen for BUILD_VECTORs on ARM.
If we have a BUILD_VECTOR that is mostly a constant splat, it is often better to splat that constant then insertelement the non-constant lanes instead of insertelementing every lane from an undef base.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163304
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 6 Sep 2012 09:43:28 +0000 (09:43 +0000)]
Build lookup tables for switches (PR884)
This adds a transformation to SimplifyCFG that attemps to turn switch
instructions into loads from lookup tables. It works on switches that
are only used to initialize one or more phi nodes in a common successor
basic block, for example:
int f(int x) {
switch (x) {
case 0: return 5;
case 1: return 4;
case 2: return -2;
case 5: return 7;
case 6: return 9;
default: return 42;
}
This speeds up the code by removing the hard-to-predict jump, and
reduces code size by removing the code for the jump targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163302
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 6 Sep 2012 09:17:37 +0000 (09:17 +0000)]
Add a new optimization pass: Stack Coloring, that merges disjoint static allocations (allocas). Allocas are known to be
disjoint if they are marked by disjoint lifetime markers (@llvm.lifetime.XXX intrinsics).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163299
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Thu, 6 Sep 2012 09:16:01 +0000 (09:16 +0000)]
Optimize codegen for VSETLNi{8,16,32} operating on Q registers. Degenerate to a VSETLN on D registers, instead of an (INSERT_SUBREG (VSETLN (EXTRACT_SUBREG ))) sequence to help the register coalescer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163298
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 6 Sep 2012 07:11:22 +0000 (07:11 +0000)]
Remove duplicated helper function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163295
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 6 Sep 2012 06:09:01 +0000 (06:09 +0000)]
Use iPTR instead of i32 for extract_subvector/insert_subvector index in lowering and patterns. This makes it consistent with the incoming DAG nodes from the DAG builder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163293
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 6 Sep 2012 05:15:01 +0000 (05:15 +0000)]
Add patterns for converting stores of subvector_extracts of lower 128-bits of a 256-bit vector to VMOVAPSmr/VMOVUPSmr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163292
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 6 Sep 2012 03:24:09 +0000 (03:24 +0000)]
Revert "Enable MCJIT tests on Darwin."
This reverts commit 163278.
Works OK on x86_64, but not i386. Will re-enable when that's cleared up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163290
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 6 Sep 2012 03:02:56 +0000 (03:02 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163289
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 6 Sep 2012 03:01:43 +0000 (03:01 +0000)]
Unix/Signals.inc: Fix a typo. Thanks to Dani Berg!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163288
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Thu, 6 Sep 2012 02:31:34 +0000 (02:31 +0000)]
There are some Mips instructions that are lowered by the
assembler such as shifts greater than 32. In the case
of direct object, the code gen needs to do this lowering
since the assembler is not involved.
With the advent of the llvm-mc assembler, it also needs
to do the same lowering.
This patch makes that specific lowering code accessible
to both the direct object output and the assembler.
This patch does not affect generated output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163287
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 6 Sep 2012 00:59:08 +0000 (00:59 +0000)]
Update function names to conform to guidelines.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163279
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 6 Sep 2012 00:59:06 +0000 (00:59 +0000)]
Enable MCJIT tests on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163278
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Thu, 6 Sep 2012 00:43:26 +0000 (00:43 +0000)]
Mips specific llvm assembler support for branch and jump instructions.
Test case included.
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163277
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 6 Sep 2012 00:12:55 +0000 (00:12 +0000)]
Don't include stdint.h directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163276
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 5 Sep 2012 23:58:04 +0000 (23:58 +0000)]
Remove predicated pseudo-instructions.
These pseudos are no longer needed now that it is possible to represent
predicated instructions in SSA form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163275
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 5 Sep 2012 23:58:02 +0000 (23:58 +0000)]
Use predication instead of pseudo-opcodes when folding into MOVCC.
Now that it is possible to dynamically tie MachineInstr operands,
predicated instructions are possible in SSA form:
%vreg3<def> = SUBri %vreg1, -
2147483647, pred:14, pred:%noreg, %opt:%noreg
%vreg4<def,tied1> = MOVCCr %vreg3<tied0>, %vreg1, %pred:12, pred:%CPSR
Becomes a predicated SUBri with a tied imp-use:
SUBri %vreg1, -
2147483647, pred:13, pred:%CPSR, opt:%noreg, %vreg1<imp-use,tied0>
This means that any instruction that is safe to move can be folded into
a MOVCC, and the *CC pseudo-instructions are no longer needed.
The test case changes reflect that Thumb2SizeReduce recognizes the
predicated instructions. It didn't understand the pseudos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163274
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 5 Sep 2012 23:57:37 +0000 (23:57 +0000)]
[ms-inline asm] Use the asm dialect from the MI to set the parser dialect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163273
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 5 Sep 2012 23:52:20 +0000 (23:52 +0000)]
Add missing file for test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163272
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 5 Sep 2012 23:48:54 +0000 (23:48 +0000)]
Teach libObject about some more ELF relocations. llvm-objdump -r now knows
every relocation in C++ hello world built with debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163271
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Wed, 5 Sep 2012 23:45:58 +0000 (23:45 +0000)]
JumpThreading: when default destination is the destination of some cases in a
switch, make sure we include the value for the cases when calculating edge
value from switch to the default destination.
rdar://
12241132
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163270
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Wed, 5 Sep 2012 23:34:03 +0000 (23:34 +0000)]
Mips specific llvm assembler support for ALU instructions. This includes
register support. Test case included.
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163268
91177308-0d34-0410-b5e6-
96231b3b80d8