oota-llvm.git
13 years agoHoist back-copies to the least busy dominator.
Jakob Stoklund Olesen [Wed, 14 Sep 2011 16:45:39 +0000 (16:45 +0000)]
Hoist back-copies to the least busy dominator.

When a back-copy is hoisted to the nearest common dominator, keep
looking up the dominator tree for a less loopy dominator, and place the
back-copy there instead.

Don't do this when a single existing back-copy dominates all the others.
Assume the client knows what he is doing, and keep the dominating
back-copy.

This prevents us from hoisting back-copies into loops in most cases.  If
a value is defined in a loop with multiple exits, we may still hoist
back-copies into that loop.  That is the speed/size tradeoff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139698 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMove state var to private class member.
Jim Grosbach [Wed, 14 Sep 2011 16:37:04 +0000 (16:37 +0000)]
Move state var to private class member.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139697 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd APInt support for converting to/from hexatridecimal strings
Douglas Gregor [Wed, 14 Sep 2011 15:54:46 +0000 (15:54 +0000)]
Add APInt support for converting to/from hexatridecimal strings

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139695 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd integer promotion support for vselect
Nadav Rotem [Wed, 14 Sep 2011 14:42:15 +0000 (14:42 +0000)]
Add integer promotion support for vselect

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139692 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix mem type for VEX.128 form of VROUNDP*. Remove filter preventing VROUND from being...
Craig Topper [Wed, 14 Sep 2011 06:41:26 +0000 (06:41 +0000)]
Fix mem type for VEX.128 form of VROUNDP*. Remove filter preventing VROUND from being recognized by disassembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139691 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake disassembling of VBLEND* print immediate as a XMM/YMM register name. Fixes PR10917.
Craig Topper [Wed, 14 Sep 2011 05:55:28 +0000 (05:55 +0000)]
Make disassembling of VBLEND* print immediate as a XMM/YMM register name. Fixes PR10917.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139690 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd test case for PR10851.
Craig Topper [Wed, 14 Sep 2011 04:36:54 +0000 (04:36 +0000)]
Add test case for PR10851.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139689 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoOne more patch towards JIT support for Mips.
Bruno Cardoso Lopes [Wed, 14 Sep 2011 03:00:41 +0000 (03:00 +0000)]
One more patch towards JIT support for Mips.
- Add TSFlags for the instruction formats. The idea here is to use
  as much encoding as possible from getBinaryCodeForInstr, and having
  TSFLags formats for that would make it easier to encode most part
  of the instructions (since Mips encodings are pretty straightforward)
- Improve the mips mechanism for compilation callback
- Add Mips specific code for invalidating the instruction cache
- Next patch will address wrong tablegen encoding

Commit msg added by my own but the patch is from Sasa Stankovic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139688 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTeach the foldable tables about 128-bit AVX instructions and make the
Bruno Cardoso Lopes [Wed, 14 Sep 2011 02:36:58 +0000 (02:36 +0000)]
Teach the foldable tables about 128-bit AVX instructions and make the
alignment check for 256-bit classes more strict. There're no testcases
but we catch more folding cases for AVX while running single and multi
sources in the llvm testsuite.

Since some 128-bit AVX instructions have different number of operands
than their SSE counterparts, they are placed in different tables.

256-bit AVX instructions should also be added in the table soon. And
there a few more 128-bit versions to handled, which should come in
the following commits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139687 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoVector shuffle mask <i32 4, i32 5, i32 2, i32 3> should yield "movsd", not "movss".
Bruno Cardoso Lopes [Wed, 14 Sep 2011 02:36:14 +0000 (02:36 +0000)]
Vector shuffle mask <i32 4, i32 5, i32 2, i32 3> should yield "movsd", not "movss".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139686 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDon't rely in <algorithm> being pulled in transitively.
Benjamin Kramer [Wed, 14 Sep 2011 01:27:48 +0000 (01:27 +0000)]
Don't rely in <algorithm> being pulled in transitively.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139684 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoObject: make the following changes into SymbolRef
Benjamin Kramer [Wed, 14 Sep 2011 01:22:52 +0000 (01:22 +0000)]
Object: make the following changes into SymbolRef

- Add enum SymbolType and function getSymbolType()
- Add function isGlobal() - it's returns true for symbols that can be used in another objects, such as library functions.
- Rename function getAddress() to getOffset() and add new function getAddress(), because currently getAddress() returns section offset of symbol first byte. new getAddress() return symbol address.
- Change usage SymbolRef::getAddress() to getOffset() in tools/llvm-nm and tools/llvm-objdump.

Patch by Danil Malyshev!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139683 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove unimplemented function prototypes from PathV2. They can be readded when someon...
Benjamin Kramer [Wed, 14 Sep 2011 01:14:36 +0000 (01:14 +0000)]
Remove unimplemented function prototypes from PathV2. They can be readded when someone cares enough.

Patch by Aaron Ballman!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139682 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDWARF: Port support for parsing .debug_aranges section from LLDB and wire it up to...
Benjamin Kramer [Wed, 14 Sep 2011 01:09:52 +0000 (01:09 +0000)]
DWARF: Port support for parsing .debug_aranges section from LLDB and wire it up to llvm-dwarfdump.

This is only one half of it, the part that caches address ranges from the DIEs when .debug_aranges is
not available will be ported soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139680 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoObjectFile: Add support for mach-o-style dSYM companion files.
Benjamin Kramer [Wed, 14 Sep 2011 00:39:22 +0000 (00:39 +0000)]
ObjectFile: Add support for mach-o-style dSYM companion files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139676 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove ancient debug info constructs from test cases, they are not relevant to test...
Devang Patel [Wed, 14 Sep 2011 00:29:50 +0000 (00:29 +0000)]
Remove ancient debug info constructs from test cases, they are not relevant to test case's main objective.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139675 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove unnecessary old test.
Devang Patel [Wed, 14 Sep 2011 00:28:54 +0000 (00:28 +0000)]
Remove unnecessary old test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139674 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDebugInfo: Don't print DIEs multiple times.
Benjamin Kramer [Wed, 14 Sep 2011 00:15:32 +0000 (00:15 +0000)]
DebugInfo: Don't print DIEs multiple times.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139671 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix indenting.
Eric Christopher [Tue, 13 Sep 2011 23:45:39 +0000 (23:45 +0000)]
Fix indenting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139670 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFirst step in supporting #line directives in assembler. This step parses the
Kevin Enderby [Tue, 13 Sep 2011 23:45:18 +0000 (23:45 +0000)]
First step in supporting #line directives in assembler.  This step parses the
#line directives with the needed support in the lexer.  Next will be to build
a simple file/line# table mapping source SMLoc's for later use by diagnostics.
And the last step will be to get the diagnostics to use the mapping for file
and line numbers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139669 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agounittests/Support/DataExtractorTest.cpp: Specify ULL explicitly to a few constants.
NAKAMURA Takumi [Tue, 13 Sep 2011 23:23:49 +0000 (23:23 +0000)]
unittests/Support/DataExtractorTest.cpp: Specify ULL explicitly to a few constants.

It seems i686-cygwin-gcc-4.3 does not accept 64-bit constant without LL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139664 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDistinguish complex mapped values from forced recomputation.
Jakob Stoklund Olesen [Tue, 13 Sep 2011 23:09:04 +0000 (23:09 +0000)]
Distinguish complex mapped values from forced recomputation.

When a ParentVNI maps to multiple defs in a new interval, its live range
may still be derived directly from RegAssign by transferValues().

On the other hand, when instructions have been rematerialized or
hoisted, it may be necessary to completely recompute live ranges using
LiveRangeCalc::extend() to all uses.

Use a bit in the value map to indicate that a live range must be
recomputed.  Rename markComplexMapped() to forceRecompute().

This fixes some live range verification errors when
-split-spill-mode=size hoists back-copies by recomputing source ranges
when RegAssign kills can't be moved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139660 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUpdate tests. Remove irrelevant tests.
Devang Patel [Tue, 13 Sep 2011 23:07:41 +0000 (23:07 +0000)]
Update tests. Remove irrelevant tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139658 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove unnecessary scope resolution operator.
Jim Grosbach [Tue, 13 Sep 2011 22:56:44 +0000 (22:56 +0000)]
Remove unnecessary scope resolution operator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139656 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDelete test cases that generate code for allegrex/psp and cannot be repurposed.
Akira Hatanaka [Tue, 13 Sep 2011 22:29:13 +0000 (22:29 +0000)]
Delete test cases that generate code for allegrex/psp and cannot be repurposed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139652 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoImplement -split-spill-mode=size.
Jakob Stoklund Olesen [Tue, 13 Sep 2011 22:22:39 +0000 (22:22 +0000)]
Implement -split-spill-mode=size.

Whenever the complement interval is defined by multiple copies of the
same value, hoist those back-copies to the nearest common dominator.

This ensures that at most one copy is inserted per value in the
complement inteval, and no phi-defs are needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139651 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix check for unaligned load/store so it doesn't catch over-aligned load/store.
Eli Friedman [Tue, 13 Sep 2011 22:19:59 +0000 (22:19 +0000)]
Fix check for unaligned load/store so it doesn't catch over-aligned load/store.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139649 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoStyle & indentation tweaks.
Benjamin Kramer [Tue, 13 Sep 2011 21:47:32 +0000 (21:47 +0000)]
Style & indentation tweaks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139646 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMake use of Eli's FileCheck sorcery to improve this test.
Owen Anderson [Tue, 13 Sep 2011 21:37:50 +0000 (21:37 +0000)]
Make use of Eli's FileCheck sorcery to improve this test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139645 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd a check to make sure schedulePass() has not deleted stale RequiredPass.
Devang Patel [Tue, 13 Sep 2011 21:13:29 +0000 (21:13 +0000)]
Add a check to make sure schedulePass() has not deleted stale RequiredPass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139642 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoError out on CodeGen of unaligned load/store. Fix test so it isn't accidentally...
Eli Friedman [Tue, 13 Sep 2011 20:50:54 +0000 (20:50 +0000)]
Error out on CodeGen of unaligned load/store.  Fix test so it isn't accidentally testing that case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139641 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoCorrect disassembly printing of Thumb2 post-incremented LDRD and STRD.
Owen Anderson [Tue, 13 Sep 2011 20:46:26 +0000 (20:46 +0000)]
Correct disassembly printing of Thumb2 post-incremented LDRD and STRD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139639 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThere's only 16 regs legal in a register list.
Jim Grosbach [Tue, 13 Sep 2011 20:35:57 +0000 (20:35 +0000)]
There's only 16 regs legal in a register list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139637 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTidy up a few 80 column violations.
Jim Grosbach [Tue, 13 Sep 2011 20:30:37 +0000 (20:30 +0000)]
Tidy up a few 80 column violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139636 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTidy up a bit.
Jim Grosbach [Tue, 13 Sep 2011 20:27:44 +0000 (20:27 +0000)]
Tidy up a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139635 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd pattern used to match MipsLo, which is needed when the instruction selector
Akira Hatanaka [Tue, 13 Sep 2011 20:13:58 +0000 (20:13 +0000)]
Add pattern used to match MipsLo, which is needed when the instruction selector
tries to match a dead MipsLo node (explanation in the link below).

http://article.gmane.org/gmane.comp.compilers.llvm.devel/42757/match=dagcombiner+dead

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139634 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix the assertion which checks the size of the input operand.
Nadav Rotem [Tue, 13 Sep 2011 20:03:38 +0000 (20:03 +0000)]
Fix the assertion which checks the size of the input operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139633 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDisable tests which generate code for allegrex or psp.
Akira Hatanaka [Tue, 13 Sep 2011 20:00:35 +0000 (20:00 +0000)]
Disable tests which generate code for allegrex or psp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139632 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoupdate checked pattern
Nadav Rotem [Tue, 13 Sep 2011 19:59:18 +0000 (19:59 +0000)]
update checked pattern

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139631 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoswap vselect operand order - pr10907
Nadav Rotem [Tue, 13 Sep 2011 19:56:38 +0000 (19:56 +0000)]
swap vselect operand order - pr10907

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139630 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove include of header that doesn't exist (yet).
Benjamin Kramer [Tue, 13 Sep 2011 19:55:32 +0000 (19:55 +0000)]
Remove include of header that doesn't exist (yet).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139629 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoI know copy&paste!
Benjamin Kramer [Tue, 13 Sep 2011 19:49:53 +0000 (19:49 +0000)]
I know copy&paste!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139628 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSketch out a DWARF parser.
Benjamin Kramer [Tue, 13 Sep 2011 19:42:23 +0000 (19:42 +0000)]
Sketch out a DWARF parser.

This introduces a new library to LLVM: libDebugInfo. It will provide debug information
parsing to LLVM. Much of the design and some of the code is taken from the LLDB project.

It also contains an llvm-dwarfdump tool that can dump the abbrevs and DIEs from an
object file. It can be used to write tests for DWARF input and output easily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139627 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd the DataExtractor utility class.
Benjamin Kramer [Tue, 13 Sep 2011 19:42:16 +0000 (19:42 +0000)]
Add the DataExtractor utility class.

It is an endian-aware helper that can read data from a StringRef. It will
come in handy for DWARF parsing. This class is inspired by LLDB's
DataExtractor, but is stripped down to the bare minimum needed for DWARF.

Comes with unit tests!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139626 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd versions 256-bit versions of alignedstore and alignedload, to be
Bruno Cardoso Lopes [Tue, 13 Sep 2011 19:33:03 +0000 (19:33 +0000)]
Add versions 256-bit versions of alignedstore and alignedload, to be
more strict about the alignment checking. This was found by inspection
and I don't have any testcases so far, although the llvm testsuite runs
without any problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139625 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRevert the remaining part of r139528. According to PR10907 the bug seems
Bruno Cardoso Lopes [Tue, 13 Sep 2011 19:33:00 +0000 (19:33 +0000)]
Revert the remaining part of r139528. According to PR10907 the bug seems
to be in the VSELECT operands order, so I'll leave the fix for Nadav.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139624 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd vselect target support for targets that do not support blend but do support
Nadav Rotem [Tue, 13 Sep 2011 19:17:42 +0000 (19:17 +0000)]
Add vselect target support for targets that do not support blend but do support
xor/and/or (For example SSE2).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139623 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSupport for PSP is gone too.
Akira Hatanaka [Tue, 13 Sep 2011 18:55:33 +0000 (18:55 +0000)]
Support for PSP is gone too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139622 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[tablegen] In ClangAttrEmitter.cpp handle SourceLocation arguments to attributes.
Argyrios Kyrtzidis [Tue, 13 Sep 2011 18:41:43 +0000 (18:41 +0000)]
[tablegen] In ClangAttrEmitter.cpp handle SourceLocation arguments to attributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139617 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse a cache to maintain list of machine basic blocks for a given UserValue.
Devang Patel [Tue, 13 Sep 2011 18:40:53 +0000 (18:40 +0000)]
Use a cache to maintain list of machine basic blocks for a given UserValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139616 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd SplitEditor::markOverlappedComplement().
Jakob Stoklund Olesen [Tue, 13 Sep 2011 18:05:29 +0000 (18:05 +0000)]
Add SplitEditor::markOverlappedComplement().

This function is used to flag values where the complement interval may
overlap other intervals.  Call it from overlapIntv, and use the flag to
fully recompute those live ranges in transferValues().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139612 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTeach the Thumb ASM parser that BKPT is allowed in IT blocks, even though it is alway...
Owen Anderson [Tue, 13 Sep 2011 17:59:19 +0000 (17:59 +0000)]
Teach the Thumb ASM parser that BKPT is allowed in IT blocks, even though it is always executed unconditionally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139610 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoEliminate the extendRange() wrapper.
Jakob Stoklund Olesen [Tue, 13 Sep 2011 17:38:57 +0000 (17:38 +0000)]
Eliminate the extendRange() wrapper.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139608 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIt is not necessary to search for mipsallegrex in target triple string.
Akira Hatanaka [Tue, 13 Sep 2011 17:35:28 +0000 (17:35 +0000)]
It is not necessary to search for mipsallegrex in target triple string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139607 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix encoding of Thumb2 shifted register operands with RRX shifts.
Owen Anderson [Tue, 13 Sep 2011 17:34:32 +0000 (17:34 +0000)]
Fix encoding of Thumb2 shifted register operands with RRX shifts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139606 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSwitch extendInBlock() to take a kill slot instead of the last use slot.
Jakob Stoklund Olesen [Tue, 13 Sep 2011 16:47:56 +0000 (16:47 +0000)]
Switch extendInBlock() to take a kill slot instead of the last use slot.

Three out of four clients prefer this interface which is consistent with
extendIntervalEndTo() and LiveRangeCalc::extend().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139604 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUse a separate LiveRangeCalc for the complement in spill modes.
Jakob Stoklund Olesen [Tue, 13 Sep 2011 16:47:53 +0000 (16:47 +0000)]
Use a separate LiveRangeCalc for the complement in spill modes.

The complement interval may overlap the other intervals created, so use
a separate LiveRangeCalc instance to compute its live range.

A LiveRangeCalc instance can only be shared among non-overlapping
intervals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139603 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoMaintain hexadecimal order.
Devang Patel [Tue, 13 Sep 2011 16:39:59 +0000 (16:39 +0000)]
Maintain hexadecimal order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139601 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIn ClangAttrEmitter.cpp emit code that allows attributes to keep their source range.
Argyrios Kyrtzidis [Tue, 13 Sep 2011 16:05:43 +0000 (16:05 +0000)]
In ClangAttrEmitter.cpp emit code that allows attributes to keep their source range.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139598 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoOnly disassembler instructions with vvvv != 1111 if the instruction actually uses...
Craig Topper [Tue, 13 Sep 2011 07:37:44 +0000 (07:37 +0000)]
Only disassembler instructions with vvvv != 1111 if the instruction actually uses the vvvv field to encode an operand. Fixes PR10851.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139591 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemove filter that was preventing MOVDQU/MOVDQA and their VEX forms from being disass...
Craig Topper [Tue, 13 Sep 2011 06:54:58 +0000 (06:54 +0000)]
Remove filter that was preventing MOVDQU/MOVDQA and their VEX forms from being disassembled. Also added encodings for the other register/register form of these instructions. Fixes PR10848.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139588 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix encoding of VMOVDQU to not simultaneously be 'TB OpSize' and 'XS'. 'XS' is correc...
Craig Topper [Tue, 13 Sep 2011 06:39:34 +0000 (06:39 +0000)]
Fix encoding of VMOVDQU to not simultaneously be 'TB OpSize' and 'XS'. 'XS' is correct and seems to have been taking priority.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139587 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[indvars] Revert r139579 until 401.bzip -arch i386 miscompilation is fixed. PR10920.
Andrew Trick [Tue, 13 Sep 2011 05:23:49 +0000 (05:23 +0000)]
[indvars] Revert r139579 until 401.bzip -arch i386 miscompilation is fixed. PR10920.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139583 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoUnbreak msvc.
NAKAMURA Takumi [Tue, 13 Sep 2011 03:58:34 +0000 (03:58 +0000)]
Unbreak msvc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139581 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoDisable IV rewriting by default. See PR10916.
Andrew Trick [Tue, 13 Sep 2011 03:23:21 +0000 (03:23 +0000)]
Disable IV rewriting by default. See PR10916.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139579 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoGeneralize test case to handle multiple indvars modes.
Andrew Trick [Tue, 13 Sep 2011 03:17:25 +0000 (03:17 +0000)]
Generalize test case to handle multiple indvars modes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139578 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoGeneralize this test's CHECK statements to handle different indvars modes.
Andrew Trick [Tue, 13 Sep 2011 02:46:27 +0000 (02:46 +0000)]
Generalize this test's CHECK statements to handle different indvars modes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139577 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThis test only makes sense with -enable-iv-rewrite.
Andrew Trick [Tue, 13 Sep 2011 02:45:26 +0000 (02:45 +0000)]
This test only makes sense with -enable-iv-rewrite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139576 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoZap some junk from the ARM instruction descriptions.
Eli Friedman [Tue, 13 Sep 2011 02:29:58 +0000 (02:29 +0000)]
Zap some junk from the ARM instruction descriptions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139575 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago[indvars] Fix bugs in floating point IV range checks noticed by inspection.
Andrew Trick [Tue, 13 Sep 2011 01:59:32 +0000 (01:59 +0000)]
[indvars] Fix bugs in floating point IV range checks noticed by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139574 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoSilence false positive uninitialized variable warnings from GCC.
Benjamin Kramer [Tue, 13 Sep 2011 01:59:24 +0000 (01:59 +0000)]
Silence false positive uninitialized variable warnings from GCC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139573 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoExtract live range calculations from SplitKit.
Jakob Stoklund Olesen [Tue, 13 Sep 2011 01:34:21 +0000 (01:34 +0000)]
Extract live range calculations from SplitKit.

SplitKit will soon need two copies of these data structures, and the
algorithms will also be useful when LiveIntervalAnalysis becomes
independent of LiveVariables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139572 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd comment to clarify the behavior of a helper in DSE.
Eli Friedman [Tue, 13 Sep 2011 01:28:59 +0000 (01:28 +0000)]
Add comment to clarify the behavior of a helper in DSE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139571 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoCorrect grammar.
Eli Friedman [Tue, 13 Sep 2011 00:44:16 +0000 (00:44 +0000)]
Correct grammar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139565 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix the assembler strings for a couple of atomic instructions. Doesn't really matter...
Eli Friedman [Tue, 13 Sep 2011 00:27:04 +0000 (00:27 +0000)]
Fix the assembler strings for a couple of atomic instructions.  Doesn't really matter much in practice, but it's a bit cleaner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139563 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTidy up a bit.
Jim Grosbach [Mon, 12 Sep 2011 23:36:42 +0000 (23:36 +0000)]
Tidy up a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139559 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoConditionalize indvars test that relies on SCEV expansion of geps,
Andrew Trick [Mon, 12 Sep 2011 23:13:57 +0000 (23:13 +0000)]
Conditionalize indvars test that relies on SCEV expansion of geps,
which is only relevant with canonical IVs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139556 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoChange testcase commandline to be more strict and silence buildbots
Bruno Cardoso Lopes [Mon, 12 Sep 2011 22:59:26 +0000 (22:59 +0000)]
Change testcase commandline to be more strict and silence buildbots

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139554 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix PR10845. SUBREG_TO_REG shouldn't be used when the input and
Bruno Cardoso Lopes [Mon, 12 Sep 2011 22:59:23 +0000 (22:59 +0000)]
Fix PR10845. SUBREG_TO_REG shouldn't be used when the input and
destination types are equal!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139553 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoindvars test only relevant for -enable-iv-rewrite.
Andrew Trick [Mon, 12 Sep 2011 22:59:00 +0000 (22:59 +0000)]
indvars test only relevant for -enable-iv-rewrite.

Otherwise this case is now covered by no-iv-rewrite.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139552 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix a failing ELF Thumb test. I _think_ this is right, but it's not totally clear...
Owen Anderson [Mon, 12 Sep 2011 22:40:31 +0000 (22:40 +0000)]
Fix a failing ELF Thumb test.  I _think_ this is right, but it's not totally clear to me what this test is doing.  Could someone on an ELF platform check?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139549 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoIntroduce a bit of a hack.
Bill Wendling [Mon, 12 Sep 2011 21:56:59 +0000 (21:56 +0000)]
Introduce a bit of a hack.

Splitting a landing pad takes considerable care because of PHIs and other
nasties. The problem is that the jump table needs to jump to the landing pad
block. However, the landing pad block can be jumped to only by an invoke
instruction. So we clone the landingpad instruction into its own basic block,
have the invoke jump to there. The landingpad instruction's basic block's
successor is now the target for the jump table.

But because of PHI nodes, we need to create another basic block for the jump
table to jump to. This is definitely a hack, because the values for the PHI
nodes may not be defined on the edge from the jump table. But that's okay,
because the jump table is simply a construct to mimic what is happening in the
CFG. So the values are mysteriously there, even though there is no value for the
PHI from the jump table's edge (hence calling this a hack).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139545 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agogold plugin: don't report error on non-bitcode (e.g. ELF) files.
Ivan Krasin [Mon, 12 Sep 2011 21:47:50 +0000 (21:47 +0000)]
gold plugin: don't report error on non-bitcode (e.g. ELF) files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139544 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThumb2 POP's don't allow the PC as an operand, and PUSH's don't allow the SP either.
Owen Anderson [Mon, 12 Sep 2011 21:28:46 +0000 (21:28 +0000)]
Thumb2 POP's don't allow the PC as an operand, and PUSH's don't allow the SP either.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139542 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRevert the wrong part of r139528, and fix testcases.
Bruno Cardoso Lopes [Mon, 12 Sep 2011 21:24:07 +0000 (21:24 +0000)]
Revert the wrong part of r139528, and fix testcases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139541 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix encoding of PC-relative LDRSHW with an immediate offset.
Owen Anderson [Mon, 12 Sep 2011 20:36:51 +0000 (20:36 +0000)]
Fix encoding of PC-relative LDRSHW with an immediate offset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139537 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoConditionalize indvars tests that rely on SCEV expansion of geps,
Andrew Trick [Mon, 12 Sep 2011 20:26:34 +0000 (20:26 +0000)]
Conditionalize indvars tests that rely on SCEV expansion of geps,
which is relevant with canonical IVs. Anything else being checked by
these tests is already covered by early CSE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139535 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoChange a bunch of isVolatile() checks to check for atomic load/store as well.
Eli Friedman [Mon, 12 Sep 2011 20:23:13 +0000 (20:23 +0000)]
Change a bunch of isVolatile() checks to check for atomic load/store as well.

No tests; these changes aren't really interesting in the sense that the logic is the same for volatile and atomic.

I believe this completes all of the changes necessary for the optimizer to handle loads and stores correctly.  I'm going to try and come up with some additional testing, though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139533 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoThere's no need to add additional predicate operands when converting a tB to a tBfar...
Owen Anderson [Mon, 12 Sep 2011 20:07:22 +0000 (20:07 +0000)]
There's no need to add additional predicate operands when converting a tB to a tBfar now.  Fixes nightly test failures on armv6 Thumb.  <rdar://problem/10110404>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139531 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix typo.
Eric Christopher [Mon, 12 Sep 2011 19:58:22 +0000 (19:58 +0000)]
Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139530 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoNot sure how CMPPS and CMPPD had already ever worked, I guess it didn't.
Bruno Cardoso Lopes [Mon, 12 Sep 2011 19:30:40 +0000 (19:30 +0000)]
Not sure how CMPPS and CMPPD had already ever worked, I guess it didn't.
However with this fix it does now.

Basically the operand order for the x86 target specific node
is not the same as the instruction, but since the intrinsic need that
specific order at the instruction definition, just change the order
during legalization. Also, there were some wrong invertions of condition
codes, such as GE => LE, GT => LT, fix that too. Fix PR10907.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139528 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoOrganize a bit the operand names for CMPPS and CMPPD
Bruno Cardoso Lopes [Mon, 12 Sep 2011 19:30:36 +0000 (19:30 +0000)]
Organize a bit the operand names for CMPPS and CMPPD

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139527 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRealign BLEND patterns to match the general style for patterns in .td file.
Bruno Cardoso Lopes [Mon, 12 Sep 2011 19:30:33 +0000 (19:30 +0000)]
Realign BLEND patterns to match the general style for patterns in .td file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139526 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix 80-columns
Bruno Cardoso Lopes [Mon, 12 Sep 2011 19:30:29 +0000 (19:30 +0000)]
Fix 80-columns

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139525 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoPort more encoding tests to decoding tests, and correct an improper Thumb2 pre-indexe...
Owen Anderson [Mon, 12 Sep 2011 18:56:30 +0000 (18:56 +0000)]
Port more encoding tests to decoding tests, and correct an improper Thumb2 pre-indexed load decoding this uncovered.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139522 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRemoving indvars tests that directly test canonical IVs and nothing else.
Andrew Trick [Mon, 12 Sep 2011 18:33:08 +0000 (18:33 +0000)]
Removing indvars tests that directly test canonical IVs and nothing else.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139518 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoRename -disable-iv-rewrite to -enable-iv-rewrite=false in preparation for default...
Andrew Trick [Mon, 12 Sep 2011 18:28:44 +0000 (18:28 +0000)]
Rename -disable-iv-rewrite to -enable-iv-rewrite=false in preparation for default change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139517 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoAdd asserts to keep front-ends honest while encoding debug info into LLVM IR using...
Devang Patel [Mon, 12 Sep 2011 18:26:08 +0000 (18:26 +0000)]
Add asserts to keep front-ends honest while encoding debug info into LLVM IR using DIBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139515 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoFix mistake in test runline.
Eli Friedman [Mon, 12 Sep 2011 17:32:58 +0000 (17:32 +0000)]
Fix mistake in test runline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139505 91177308-0d34-0410-b5e6-96231b3b80d8

13 years agoTest case for r139453, WidenIV::GetExtendedOperandRecurrence.
Andrew Trick [Mon, 12 Sep 2011 17:20:57 +0000 (17:20 +0000)]
Test case for r139453, WidenIV::GetExtendedOperandRecurrence.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139504 91177308-0d34-0410-b5e6-96231b3b80d8