oota-llvm.git
14 years agoFix old GCC build error.
Jakob Stoklund Olesen [Sat, 20 Nov 2010 01:24:43 +0000 (01:24 +0000)]
Fix old GCC build error.

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

14 years agoAdd more Thumb add instruction encodings.
Bill Wendling [Sat, 20 Nov 2010 01:18:47 +0000 (01:18 +0000)]
Add more Thumb add instruction encodings.

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

14 years agoAdd Thumb encodings for some add instructions.
Bill Wendling [Sat, 20 Nov 2010 01:00:29 +0000 (01:00 +0000)]
Add Thumb encodings for some add instructions.

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

14 years agoAdd more encodings for Thumb instructions.
Bill Wendling [Sat, 20 Nov 2010 00:53:35 +0000 (00:53 +0000)]
Add more encodings for Thumb instructions.

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

14 years agoDetemplatize NodeRef.
Jakob Stoklund Olesen [Sat, 20 Nov 2010 00:49:00 +0000 (00:49 +0000)]
Detemplatize NodeRef.

It is now possible to navigate the B+-tree using NodeRef::subtree() and
NodeRef::size() without knowing the key and value template types used in the
tree.

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

14 years agoRename NodeBase::{key,val} as {first,second} and swap the BranchNode arrays such
Jakob Stoklund Olesen [Sat, 20 Nov 2010 00:48:57 +0000 (00:48 +0000)]
Rename NodeBase::{key,val} as {first,second} and swap the BranchNode arrays such
that the noderefs are the first member in the object.

This is in preparation of detemplatization of tree navigation.

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

14 years agoHave the getAddrMode3OpValue() function in ARMCodeEmitter.cpp produce the same
Bill Wendling [Sat, 20 Nov 2010 00:26:37 +0000 (00:26 +0000)]
Have the getAddrMode3OpValue() function in ARMCodeEmitter.cpp produce the same
value that the one in ARMMCCodeEmitter.cpp does.

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

14 years agoCheck for _setjmp too, because it's also used.
Bill Wendling [Sat, 20 Nov 2010 00:03:09 +0000 (00:03 +0000)]
Check for _setjmp too, because it's also used.

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

14 years agoImplement IntervalMap destructor.
Jakob Stoklund Olesen [Fri, 19 Nov 2010 23:28:59 +0000 (23:28 +0000)]
Implement IntervalMap destructor.

Key and value objects may not be destructed instantly when they are erased from
the container, but they will be destructed eventually by the IntervalMap
destructor.

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

14 years agoImplement IntervalMap::clear().
Jakob Stoklund Olesen [Fri, 19 Nov 2010 23:28:57 +0000 (23:28 +0000)]
Implement IntervalMap::clear().

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

14 years agoSupport backwards iteration starting from end().
Jakob Stoklund Olesen [Fri, 19 Nov 2010 23:28:53 +0000 (23:28 +0000)]
Support backwards iteration starting from end().

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

14 years agoAdd test for PR 8111. By Frits van Bommel.
Dale Johannesen [Fri, 19 Nov 2010 23:23:22 +0000 (23:23 +0000)]
Add test for PR 8111.  By Frits van Bommel.

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

14 years agoFix ARM LDR* post-indexed operand encoding.
Jim Grosbach [Fri, 19 Nov 2010 23:14:43 +0000 (23:14 +0000)]
Fix ARM LDR* post-indexed operand encoding.

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

14 years agoEncodings for the compare instructions.
Bill Wendling [Fri, 19 Nov 2010 23:14:32 +0000 (23:14 +0000)]
Encodings for the compare instructions.

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

14 years agoThe Vm and Vn register fields must be the same for a register-register vmov.
Owen Anderson [Fri, 19 Nov 2010 23:12:43 +0000 (23:12 +0000)]
The Vm and Vn register fields must be the same for a register-register vmov.

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

14 years agoFix a cut-n-paste-error.
Evan Cheng [Fri, 19 Nov 2010 23:01:16 +0000 (23:01 +0000)]
Fix a cut-n-paste-error.

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

14 years agoDocument the new GVN number table structure.
Owen Anderson [Fri, 19 Nov 2010 22:48:40 +0000 (22:48 +0000)]
Document the new GVN number table structure.

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

14 years agoOperand names
Jim Grosbach [Fri, 19 Nov 2010 22:43:08 +0000 (22:43 +0000)]
Operand names

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

14 years agotrailing whitespace
Jim Grosbach [Fri, 19 Nov 2010 22:42:55 +0000 (22:42 +0000)]
trailing whitespace

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

14 years agoDon't need to save piecemeal now.
Eric Christopher [Fri, 19 Nov 2010 22:39:56 +0000 (22:39 +0000)]
Don't need to save piecemeal now.

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

14 years agoUpdate comment.
Eric Christopher [Fri, 19 Nov 2010 22:37:58 +0000 (22:37 +0000)]
Update comment.

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

14 years agoAdd encodings for some of the thumb ADD instructions. Tests will come once the
Bill Wendling [Fri, 19 Nov 2010 22:37:33 +0000 (22:37 +0000)]
Add encodings for some of the thumb ADD instructions. Tests will come once the
asm parser can handle them.

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

14 years agoUpdate comment.
Eric Christopher [Fri, 19 Nov 2010 22:36:41 +0000 (22:36 +0000)]
Update comment.

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

14 years agoClarify operand names.
Jim Grosbach [Fri, 19 Nov 2010 22:36:02 +0000 (22:36 +0000)]
Clarify operand names.

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

14 years agoAdd a test for CodeGenPrepare's ability to look through PHI nodes when performing
Owen Anderson [Fri, 19 Nov 2010 22:34:53 +0000 (22:34 +0000)]
Add a test for CodeGenPrepare's ability to look through PHI nodes when performing
addressing mode folding, introduced in r119853.

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

14 years agoRefactor address mode handling into a single struct (ala x86), this
Eric Christopher [Fri, 19 Nov 2010 22:30:02 +0000 (22:30 +0000)]
Refactor address mode handling into a single struct (ala x86), this
should give allow a wider range of addressing modes.

No functional change.

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

14 years agoFix encoding for ARM MLS instruction.
Jim Grosbach [Fri, 19 Nov 2010 22:22:37 +0000 (22:22 +0000)]
Fix encoding for ARM MLS instruction.

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

14 years agoWhen folding addressing modes in CodeGenPrepare, attempt to look through PHI nodes
Owen Anderson [Fri, 19 Nov 2010 22:15:03 +0000 (22:15 +0000)]
When folding addressing modes in CodeGenPrepare, attempt to look through PHI nodes
if all the operands of the PHI are equivalent.  This allows CodeGenPrepare to undo
unprofitable PRE transforms.

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

14 years agoAdd ARM encoding information for STRD.
Jim Grosbach [Fri, 19 Nov 2010 22:14:31 +0000 (22:14 +0000)]
Add ARM encoding information for STRD.

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

14 years agoShuffle things around a bit to keep like things together. Tidy up formatting.
Jim Grosbach [Fri, 19 Nov 2010 22:06:57 +0000 (22:06 +0000)]
Shuffle things around a bit to keep like things together. Tidy up formatting.

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

14 years agoRevert accidental commit.
Bill Wendling [Fri, 19 Nov 2010 22:06:18 +0000 (22:06 +0000)]
Revert accidental commit.

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

14 years agoChange long binary encodings to use hex instead. It's more readable. Also
Bill Wendling [Fri, 19 Nov 2010 22:02:18 +0000 (22:02 +0000)]
Change long binary encodings to use hex instead. It's more readable. Also
initialize missing bit.

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

14 years agoPrefetch has a MemOperand now. FileCheckize a test.
Dale Johannesen [Fri, 19 Nov 2010 21:49:38 +0000 (21:49 +0000)]
Prefetch has a MemOperand now.  FileCheckize a test.
This finishes up 8460971.

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

14 years agoFactor out operand encoding bits for ARM addressing mode 2 store instructions.
Jim Grosbach [Fri, 19 Nov 2010 21:35:06 +0000 (21:35 +0000)]
Factor out operand encoding bits for ARM addressing mode 2 store instructions.

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

14 years agoDelete another dead class.
Jim Grosbach [Fri, 19 Nov 2010 21:16:08 +0000 (21:16 +0000)]
Delete another dead class.

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

14 years agowhitespace tweak.
Jim Grosbach [Fri, 19 Nov 2010 21:14:37 +0000 (21:14 +0000)]
whitespace tweak.

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

14 years agoFix a use after free. Patch by Frits van Bommel.
Rafael Espindola [Fri, 19 Nov 2010 21:14:29 +0000 (21:14 +0000)]
Fix a use after free. Patch by Frits van Bommel.

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

14 years agoRefactor PICSTR* instructions to really be pseudos. Nuke dead classes.
Jim Grosbach [Fri, 19 Nov 2010 21:14:02 +0000 (21:14 +0000)]
Refactor PICSTR* instructions to really be pseudos. Nuke dead classes.

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

14 years agoRename ARM .td class AIldst1 to AI2ldst for consistency with the other classes.
Jim Grosbach [Fri, 19 Nov 2010 21:07:51 +0000 (21:07 +0000)]
Rename ARM .td class AIldst1 to AI2ldst for consistency with the other classes.

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

14 years agoAdd ARM binary encoding information for the rest of the indexed loads.
Jim Grosbach [Fri, 19 Nov 2010 19:41:26 +0000 (19:41 +0000)]
Add ARM binary encoding information for the rest of the indexed loads.

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

14 years agoRename methods for clarity instead of brevity. No functional changes.
Jakob Stoklund Olesen [Fri, 19 Nov 2010 19:10:39 +0000 (19:10 +0000)]
Rename methods for clarity instead of brevity. No functional changes.

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

14 years agoMake isScalarToVector to return false if the node is a scalar. This will prevent
Mon P Wang [Fri, 19 Nov 2010 19:08:12 +0000 (19:08 +0000)]
Make isScalarToVector to return false if the node is a scalar. This will prevent
DAGCombine from making an illegal transformation of bitcast of a scalar to a
vector into a scalar_to_vector.

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

14 years agoInclude raw_ostream.h unconditionally even if it is only used for debug code.
Jakob Stoklund Olesen [Fri, 19 Nov 2010 18:51:46 +0000 (18:51 +0000)]
Include raw_ostream.h unconditionally even if it is only used for debug code.

We don't want any clients acidentally depending on this and then failing in a
-Asserts build.

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

14 years agoAdded support for the Mach-O .symbol_resolver directive. rdar://8673046
Kevin Enderby [Fri, 19 Nov 2010 18:39:33 +0000 (18:39 +0000)]
Added support for the Mach-O .symbol_resolver directive.  rdar://8673046

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

14 years agoRemove dead code.
Jim Grosbach [Fri, 19 Nov 2010 18:18:37 +0000 (18:18 +0000)]
Remove dead code.

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

14 years agoARM LDRD binary encoding.
Jim Grosbach [Fri, 19 Nov 2010 18:16:46 +0000 (18:16 +0000)]
ARM LDRD binary encoding.

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

14 years agoRemove hard tabs.
Jim Grosbach [Fri, 19 Nov 2010 18:01:37 +0000 (18:01 +0000)]
Remove hard tabs.

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

14 years agoRemove trailing whitespace.
Jim Grosbach [Fri, 19 Nov 2010 17:11:02 +0000 (17:11 +0000)]
Remove trailing whitespace.

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

14 years agoAvoid release build warnings.
Benjamin Kramer [Fri, 19 Nov 2010 16:36:02 +0000 (16:36 +0000)]
Avoid release build warnings.

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

14 years agoFix decoding ambiguities of stdrex and ldrex.
Owen Anderson [Fri, 19 Nov 2010 13:11:50 +0000 (13:11 +0000)]
Fix decoding ambiguities of stdrex and ldrex.

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

14 years agoSilence warning about an uninitialized variable.
Benjamin Kramer [Fri, 19 Nov 2010 11:37:26 +0000 (11:37 +0000)]
Silence warning about an uninitialized variable.

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

14 years agoRemove threading of Xor over selects and phis, with an explanation
Duncan Sands [Fri, 19 Nov 2010 09:20:39 +0000 (09:20 +0000)]
Remove threading of Xor over selects and phis, with an explanation
of why such threading is pointless.

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

14 years agoSimplify, no functionality change.
Duncan Sands [Fri, 19 Nov 2010 08:33:20 +0000 (08:33 +0000)]
Simplify, no functionality change.

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

14 years agoAdd a MCLineSectionOrder vector so that we produce the line tables in a
Rafael Espindola [Fri, 19 Nov 2010 07:41:23 +0000 (07:41 +0000)]
Add a MCLineSectionOrder vector so that we produce the line tables in a
deterministic order.

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

14 years agoThese instructions are thumb2 only.
Evan Cheng [Fri, 19 Nov 2010 06:28:11 +0000 (06:28 +0000)]
These instructions are thumb2 only.

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

14 years agoFix an obvious oversight.
Evan Cheng [Fri, 19 Nov 2010 06:15:10 +0000 (06:15 +0000)]
Fix an obvious oversight.

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

14 years agoDon't attempt trivial coalescing for sub-register copies.
Jakob Stoklund Olesen [Fri, 19 Nov 2010 05:45:24 +0000 (05:45 +0000)]
Don't attempt trivial coalescing for sub-register copies.

Patch by Krister Wombell!

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

14 years agoWork around GCC 4.0 build error:
Jakob Stoklund Olesen [Fri, 19 Nov 2010 05:36:51 +0000 (05:36 +0000)]
Work around GCC 4.0 build error:

llvm/include/llvm/ADT/IntervalMap.h:334: error: '((llvm::IntervalMapImpl::DesiredNodeBytes / static_cast<unsigned int>(((2 * sizeof (KeyT)) + sizeof (ValT)))) >? 3u)' is not a valid template argument for type 'unsigned int' because it is a non-constant expression

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

14 years agoAdd an assert.
Rafael Espindola [Fri, 19 Nov 2010 04:55:36 +0000 (04:55 +0000)]
Add an assert.

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

14 years agoAdd ADT/IntervalMap.
Jakob Stoklund Olesen [Fri, 19 Nov 2010 04:47:19 +0000 (04:47 +0000)]
Add ADT/IntervalMap.

This is a sorted interval map data structure for small keys and values with
automatic coalescing and bidirectional iteration over coalesced intervals.

Except for coalescing intervals, it provides similar functionality to std::map.
It is however much more compact for small keys and values, and hopefully faster
too.

The container object itself can hold the first few intervals without any
allocations, then it switches to a cache conscious B+-tree representation. A
recycling allocator can be shared between many containers, even between
containers holding different types.

The IntervalMap is initially intended to be used with SlotIndex intervals for:

- Backing store for LiveIntervalUnion that is smaller and faster than std::set.

- Backing store for LiveInterval with less overhead than std::vector for typical
  intervals and O(N log N) merging of large intervals. 99% of virtual registers
  need 4 entries or less and would benefit from the small object optimization.

- Backing store for LiveDebugVariable which doesn't exist yet, but will track
  debug variables during register allocation.

This is a work in progress. Missing items are:

- Performance metrics.
- erase().
- insert() shrinkage.
- clear().
- More performance metrics.
- Simplification and detemplatization.

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

14 years agoFix llvm-gcc boostrap on OS X by avoiding printing sleb and uleb when
Rafael Espindola [Fri, 19 Nov 2010 04:10:13 +0000 (04:10 +0000)]
Fix llvm-gcc boostrap on OS X by avoiding printing sleb and uleb when
possible.

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

14 years agounittests/CMakeLists.txt: [PR8225] Tweak linking JITTests on MSVC to add JITTests...
NAKAMURA Takumi [Fri, 19 Nov 2010 03:19:42 +0000 (03:19 +0000)]
unittests/CMakeLists.txt: [PR8225] Tweak linking JITTests on MSVC to add JITTests.def.

CMake can pass *.def to link.exe.

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

14 years agounittests/CMakeLists.txt: Suppress building ValueMapTest on MSVC older than 10(VS2010).
NAKAMURA Takumi [Fri, 19 Nov 2010 03:19:32 +0000 (03:19 +0000)]
unittests/CMakeLists.txt: Suppress building ValueMapTest on MSVC older than 10(VS2010).

MSVC9 and 8 cannot compile ValueMapTest.cpp due to their bug.
See issue#331418 in Visual Studio.

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

14 years agolit.GoogleTest: On case-insensitive filesystem, matching should be case-insensitive...
NAKAMURA Takumi [Fri, 19 Nov 2010 03:19:26 +0000 (03:19 +0000)]
lit.GoogleTest: On case-insensitive filesystem, matching should be case-insensitive when directory name is checked with test_sub_dir.

On MSVS8, ${CMAKE_CFG_INTDIR}, aka $(OutDir), has capitalized name(eg. Debug), although $(OutDir) is made with lower case(eg. debug).

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

14 years agoCMakeLists.txt: On MSVS10, touch LLVM.sln as workaround, w/e project files are change...
NAKAMURA Takumi [Fri, 19 Nov 2010 03:19:18 +0000 (03:19 +0000)]
CMakeLists.txt: On MSVS10, touch LLVM.sln as workaround, w/e project files are changed, to avoid the Dialog Hell. Thanks to Oscar.

FIXME: This could be removed with future version of CMake.

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

14 years agoChange some methods in MCDwarf.cpp to be able to handle an arbitrary
Rafael Espindola [Fri, 19 Nov 2010 02:26:16 +0000 (02:26 +0000)]
Change some methods in MCDwarf.cpp to be able to handle an arbitrary
MCStreamer instead of just MCObjectStreamer. Address changes cannot
be as efficient as we have to use DW_LNE_set_addres, but at least
most of the logic is shared.

This will be used so that, with CodeGen still using EmitDwarfLocDirective,
llvm-gcc is able to produce debug_line sections without needing an
assembler that supports .loc.

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

14 years agoAdd MC encodings for some Thumb instructions. Test for a few of them. The "bx
Bill Wendling [Fri, 19 Nov 2010 01:33:10 +0000 (01:33 +0000)]
Add MC encodings for some Thumb instructions. Test for a few of them. The "bx
lr" instruction cannot be tested just yet. It requires matching a "condition
code", but adding one of those makes things go south quickly...

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

14 years agoRevert "Add ADT/IntervalMap.", GCC doesn't like it.
Jakob Stoklund Olesen [Fri, 19 Nov 2010 01:21:03 +0000 (01:21 +0000)]
Revert "Add ADT/IntervalMap.", GCC doesn't like it.

This reverts r119772.

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

14 years agoAdd ADT/IntervalMap.
Jakob Stoklund Olesen [Fri, 19 Nov 2010 01:14:40 +0000 (01:14 +0000)]
Add ADT/IntervalMap.

This is a sorted interval map data structure for small keys and values with
automatic coalescing and bidirectional iteration over coalesced intervals.

Except for coalescing intervals, it provides similar functionality to std::map.
It is however much more compact for small keys and values, and hopefully faster
too.

The container object itself can hold the first few intervals without any
allocations, then it switches to a cache conscious B+-tree representation. A
recycling allocator can be shared between many containers, even between
containers holding different types.

The IntervalMap is initially intended to be used with SlotIndex intervals for:

- Backing store for LiveIntervalUnion that is smaller and faster than std::set.

- Backing store for LiveInterval with less overhead than std::vector for typical
  intervals and O(N log N) merging of large intervals. 99% of virtual registers
  need 4 entries or less and would benefit from the small object optimization.

- Backing store for LiveDebugVariable which doesn't exist yet, but will track
  debug variables during register allocation.

This is a work in progress. Missing items are:

- Performance metrics.
- erase().
- insert() shrinkage.
- clear().
- More performance metrics.
- Simplification and detemplatization.

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

14 years agoAligned and unaligned copies of the same string
Dale Johannesen [Fri, 19 Nov 2010 00:48:58 +0000 (00:48 +0000)]
Aligned and unaligned copies of the same string
were not hashing to the same value.  Analysis
and patch by Frits van Bommel!

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

14 years agoUse array_pod_sort because the list is contiguous.
Bill Wendling [Fri, 19 Nov 2010 00:38:19 +0000 (00:38 +0000)]
Use array_pod_sort because the list is contiguous.

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

14 years agoProvide Thumb2 encodings for strex and ldrex.
Owen Anderson [Fri, 19 Nov 2010 00:28:38 +0000 (00:28 +0000)]
Provide Thumb2 encodings for strex and ldrex.

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

14 years agoMinor cleanups to a few llvm_unreachable() calls.
Jim Grosbach [Fri, 19 Nov 2010 00:27:09 +0000 (00:27 +0000)]
Minor cleanups to a few llvm_unreachable() calls.

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

14 years agoAn 'unreachable' shouldn't have a '0 &&' prefix.
Bill Wendling [Fri, 19 Nov 2010 00:05:15 +0000 (00:05 +0000)]
An 'unreachable' shouldn't have a '0 &&' prefix.

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

14 years agoAdd support for parsing the writeback ("!") token.
Bill Wendling [Thu, 18 Nov 2010 23:43:05 +0000 (23:43 +0000)]
Add support for parsing the writeback ("!") token.

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

14 years agoFix .o emission of ARM movt/movw. MCSymbolRefExpr::VK_ARM_(HI||LO)16 for the .o path...
Jason W Kim [Thu, 18 Nov 2010 23:37:15 +0000 (23:37 +0000)]
Fix .o emission of ARM movt/movw. MCSymbolRefExpr::VK_ARM_(HI||LO)16 for the .o path now works for ARM.
Note: lo16AllZero remains in ARMInstrInfo.td - It can be factored out when Thumb movt is repaired.
Existing tests cover this update.

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

14 years agoGive the exclamation point a name instead of a number.
Bill Wendling [Thu, 18 Nov 2010 23:36:54 +0000 (23:36 +0000)]
Give the exclamation point a name instead of a number.

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

14 years agoMore tests.
Owen Anderson [Thu, 18 Nov 2010 23:30:10 +0000 (23:30 +0000)]
More tests.

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

14 years agoFix encodings for pkhbt, and fix some tests where I accidentally tested ARM mode...
Owen Anderson [Thu, 18 Nov 2010 23:29:56 +0000 (23:29 +0000)]
Fix encodings for pkhbt, and fix some tests where I accidentally tested ARM mode instead of Thumb2.

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

14 years agoMove getInitialFrameState() to TargetFrameInfo
Anton Korobeynikov [Thu, 18 Nov 2010 23:25:52 +0000 (23:25 +0000)]
Move getInitialFrameState() to TargetFrameInfo

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

14 years agoARM Encoding information for UXTAH and friends.
Jim Grosbach [Thu, 18 Nov 2010 23:24:22 +0000 (23:24 +0000)]
ARM Encoding information for UXTAH and friends.

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

14 years agoFix bug in DAGCombiner for ARM that was trying to do a ShiftCombine on illegal types...
Tanya Lattner [Thu, 18 Nov 2010 22:06:46 +0000 (22:06 +0000)]
Fix bug in DAGCombiner for ARM that was trying to do a ShiftCombine on illegal types (vector should be split first).
Added test case.

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

14 years agoDon't allocate the SmallVector of Registers. It gets messy figuring out who
Bill Wendling [Thu, 18 Nov 2010 21:50:54 +0000 (21:50 +0000)]
Don't allocate the SmallVector of Registers. It gets messy figuring out who
should delete what when the object gets copied around. It's also making valgrind
upset.

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

14 years agoProvide Thumb2 encodings for mov's that come from MOVCC SDNodes.
Owen Anderson [Thu, 18 Nov 2010 21:46:31 +0000 (21:46 +0000)]
Provide Thumb2 encodings for mov's that come from MOVCC SDNodes.

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

14 years agoAdd ARM encoding information for LDRH post-increment.
Jim Grosbach [Thu, 18 Nov 2010 21:43:37 +0000 (21:43 +0000)]
Add ARM encoding information for LDRH post-increment.

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

14 years agoChange the 'x' type modifier for Neon intrinsics to force a signed integer.
Bob Wilson [Thu, 18 Nov 2010 21:43:22 +0000 (21:43 +0000)]
Change the 'x' type modifier for Neon intrinsics to force a signed integer.
This makes it symmetric with the 'u' modifier that forces an unsigned type.
This is needed for unsigned vector shifts, where the shift amount still needs
to be signed.  PR8482 (Radar 8603521).

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

14 years agoMove hasFP() and few related hooks to TargetFrameInfo.
Anton Korobeynikov [Thu, 18 Nov 2010 21:19:35 +0000 (21:19 +0000)]
Move hasFP() and few related hooks to TargetFrameInfo.

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

14 years agoFix thinko: we must turn select(anyext, sext) into sext(select)
Duncan Sands [Thu, 18 Nov 2010 21:16:28 +0000 (21:16 +0000)]
Fix thinko: we must turn select(anyext, sext) into sext(select)
not anyext(select).  Spotted by Frits van Bommel.

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

14 years agoSplit up ARM LowerShift function.
Bob Wilson [Thu, 18 Nov 2010 21:16:28 +0000 (21:16 +0000)]
Split up ARM LowerShift function.
This function was being called from two different places for completely
unrelated reasons.  During type legalization, it was called to expand 64-bit
shift operations.  During operation legalization, it was called to handle
Neon vector shifts.  The vector shift code was not written to check for
illegal types, since it was assumed to be only called after type legalization.
Fixed this by splitting off the 64-bit shift expansion into a separate
function.  I don't have a particular testcase for this; I just noticed it
by inspection.

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

14 years agoMore Thumb2 encodings.
Owen Anderson [Thu, 18 Nov 2010 21:15:19 +0000 (21:15 +0000)]
More Thumb2 encodings.

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

14 years agoFill out the set of Thumb2 multiplication operator encodings.
Owen Anderson [Thu, 18 Nov 2010 20:32:18 +0000 (20:32 +0000)]
Fill out the set of Thumb2 multiplication operator encodings.

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

14 years agoThe DAGCombiner was threading select over pairs of extending loads even
Duncan Sands [Thu, 18 Nov 2010 20:05:18 +0000 (20:05 +0000)]
The DAGCombiner was threading select over pairs of extending loads even
if the extension types were not the same.  The result was that if you
fed a select with sext and zext loads, as in the testcase, then it
would get turned into a zext (or sext) of the select, which is wrong
in the cases when it should have been an sext (resp. zext).  Reported
and diagnosed by Sebastien Deldon.

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

14 years agoFactor code for testing whether replacing one value with another
Duncan Sands [Thu, 18 Nov 2010 19:59:41 +0000 (19:59 +0000)]
Factor code for testing whether replacing one value with another
preserves LCSSA form out of ScalarEvolution and into the LoopInfo
class.  Use it to check that SimplifyInstruction simplifications
are not breaking LCSSA form.  Fixes PR8622.

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

14 years agoMissed the _RET versions of LDMIA.
Bill Wendling [Thu, 18 Nov 2010 19:44:29 +0000 (19:44 +0000)]
Missed the _RET versions of LDMIA.

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

14 years agoRewrite stack callee saved spills and restores to use push/pop instructions.
Eric Christopher [Thu, 18 Nov 2010 19:40:05 +0000 (19:40 +0000)]
Rewrite stack callee saved spills and restores to use push/pop instructions.
Remove movePastCSLoadStoreOps and associated code for simple pointer
increments. Update routines that depended upon other opcodes for save/restore.

Adjust all testcases accordingly.

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

14 years agoFix an order-of-deallocation issue where the AttrListImpl could be deallocated before...
Owen Anderson [Thu, 18 Nov 2010 18:59:13 +0000 (18:59 +0000)]
Fix an order-of-deallocation issue where the AttrListImpl could be deallocated before the global
LLVMContext, causing memory errors.  Patch by Peter Collingbourne.

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

14 years agoUse thread-safe statics to avoid a static constructor here. This isn't thread-safe...
Owen Anderson [Thu, 18 Nov 2010 18:49:05 +0000 (18:49 +0000)]
Use thread-safe statics to avoid a static constructor here.  This isn't thread-safe on MSVC, but we don't
support threaded LLVM there anyways.

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

14 years agoOops, missed this file when remaing ExpandPseudos to ExpandISelPseudos.
Dan Gohman [Thu, 18 Nov 2010 18:48:28 +0000 (18:48 +0000)]
Oops, missed this file when remaing ExpandPseudos to ExpandISelPseudos.

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

14 years agoRename ExpandPseudos to ExpandISelPseudos to help clarify its role.
Dan Gohman [Thu, 18 Nov 2010 18:45:06 +0000 (18:45 +0000)]
Rename ExpandPseudos to ExpandISelPseudos to help clarify its role.

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

14 years agoCompletely rework the datastructure GVN uses to represent the value number to leader...
Owen Anderson [Thu, 18 Nov 2010 18:32:40 +0000 (18:32 +0000)]
Completely rework the datastructure GVN uses to represent the value number to leader mapping.  Previously,
this was a tree of hashtables, and a query recursed into the table for the immediate dominator ad infinitum
if the initial lookup failed.  This led to really bad performance on tall, narrow CFGs.

We can instead replace it with what is conceptually a multimap of value numbers to leaders (actually
represented by a hashtable with a list of Value*'s as the value type), and then
determine which leader from that set to use very cheaply thanks to the DFS numberings maintained by
DominatorTree.  Because there are typically few duplicates of a given value, this scan tends to be
quite fast.  Additionally, we use a custom linked list and BumpPtr allocation to avoid any unnecessary
allocation in representing the value-side of the multimap.

This change brings with it a 15% (!) improvement in the total running time of GVN on 403.gcc, which I
think is pretty good considering that includes all the "real work" being done by MemDep as well.

The one downside to this approach is that we can no longer use GVN to perform simple conditional progation,
but that seems like an acceptable loss since we now have LVI and CorrelatedValuePropagation to pick up
the slack.  If you see conditional propagation that's not happening, please file bugs against LVI or CVP.

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