Chris Lattner
9de0176ef8
tail calls on x86 are implemented.
...
llvm-svn: 119920
2010-11-21 06:10:27 +00:00
Jim Grosbach
e040a46eb3
BR_JTadd is ARM-only, so use the proper pseudo class to get the predicate.
...
llvm-svn: 119918
2010-11-21 01:26:01 +00:00
Rafael Espindola
26cb15a549
Handle PCRel relocations with absolute values. Fixes PR8656.
...
llvm-svn: 119917
2010-11-21 00:48:25 +00:00
Chris Lattner
58f9f58716
Implement PR8644: forwarding a memcpy value to a byval,
...
allowing the memcpy to be eliminated.
Unfortunately, the requirements on byval's without explicit
alignment are really weak and impossible to predict in the
mid-level optimizer, so this doesn't kick in much with current
frontends. The fix is to change clang to set alignment on all
byval arguments.
llvm-svn: 119916
2010-11-21 00:28:59 +00:00
Chris Lattner
d78dbee431
a byval argument without an align can have an arbitrary alignment
...
requirement on the input pointer.
llvm-svn: 119914
2010-11-20 23:49:06 +00:00
Bill Wendling
c31de25137
A few more thumb instruction MC encodings.
...
llvm-svn: 119913
2010-11-20 22:52:33 +00:00
Eric Christopher
0a3c28bd6b
Rewrite address handling to use a structure with all the possible address
...
mode variables. Handle frame indexes in load/store and allocas again.
llvm-svn: 119912
2010-11-20 22:38:27 +00:00
Eric Christopher
d0aec3bf64
STRH only needs the additional operand, not t2STRH. Also invert conditional
...
to match the one from the load emitter above.
llvm-svn: 119911
2010-11-20 22:01:38 +00:00
Benjamin Kramer
ddd1b7b801
Simplify code. No change in functionality.
...
llvm-svn: 119908
2010-11-20 18:43:35 +00:00
Frits van Bommel
da17c921ba
Test commit: Fix two -Asserts mode warnings in StringMap.h.
...
llvm-svn: 119907
2010-11-20 18:37:24 +00:00
Anton Korobeynikov
36590fc72a
Make this compile on case-sensitive file systemsw
...
llvm-svn: 119905
2010-11-20 16:14:57 +00:00
Anton Korobeynikov
4687778398
Move some more hooks to TargetFrameInfo
...
llvm-svn: 119904
2010-11-20 15:59:32 +00:00
Benjamin Kramer
f6fb58a216
Silence Release build warnings about unused functions.
...
llvm-svn: 119903
2010-11-20 15:53:24 +00:00
Francois Pichet
4fd9b685ff
Disable warning C4291 on MSVC. Caused because class AttributeList provides a non implemented operator delete without a corresponding new.
...
llvm-svn: 119902
2010-11-20 15:39:03 +00:00
Duncan Sands
7c601ded34
On X86, MEMBARRIER, MFENCE, SFENCE, LFENCE are not target memory intrinsics,
...
so don't claim they are. They are allocated using DAG.getNode, so attempts
to access MemSDNode fields results in reading off the end of the allocated
memory. This fixes crashes with "llc -debug" due to debug code trying to
print MemSDNode fields for these barrier nodes (since the crashes are not
deterministic, use valgrind to see this). Add some nasty checking to try
to catch this kind of thing in the future.
llvm-svn: 119901
2010-11-20 11:25:00 +00:00
Andrew Trick
cf7fefb25c
Removing the useless test that I added recently. It was meant as an example, but not complicated enough to merit another test.
...
llvm-svn: 119898
2010-11-20 07:26:51 +00:00
Andrew Trick
ada75c5ad1
RABasic fix. Regalloc is responsible for updating block live ins.
...
llvm-svn: 119896
2010-11-20 02:57:05 +00:00
Andrew Trick
799ec1c4d6
Whitespace.
...
llvm-svn: 119895
2010-11-20 02:43:55 +00:00
Jakob Stoklund Olesen
40e78b4da0
Fix old GCC build error.
...
llvm-svn: 119884
2010-11-20 01:24:43 +00:00
Bill Wendling
284326bd69
Add more Thumb add instruction encodings.
...
llvm-svn: 119883
2010-11-20 01:18:47 +00:00
Bill Wendling
fe1de03629
Add Thumb encodings for some add instructions.
...
llvm-svn: 119882
2010-11-20 01:00:29 +00:00
Bill Wendling
e60fd5a9db
Add more encodings for Thumb instructions.
...
llvm-svn: 119881
2010-11-20 00:53:35 +00:00
Jakob Stoklund Olesen
8bf9e546d4
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.
llvm-svn: 119880
2010-11-20 00:49:00 +00:00
Jakob Stoklund Olesen
3864c518c2
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.
llvm-svn: 119879
2010-11-20 00:48:57 +00:00
Bill Wendling
0914d44fa4
Have the getAddrMode3OpValue() function in ARMCodeEmitter.cpp produce the same
...
value that the one in ARMMCCodeEmitter.cpp does.
llvm-svn: 119878
2010-11-20 00:26:37 +00:00
Bill Wendling
54df187f25
Check for _setjmp too, because it's also used.
...
llvm-svn: 119875
2010-11-20 00:03:09 +00:00
Jakob Stoklund Olesen
6ae70b2e0f
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.
llvm-svn: 119873
2010-11-19 23:28:59 +00:00
Jakob Stoklund Olesen
c041268c8c
Implement IntervalMap::clear().
...
llvm-svn: 119872
2010-11-19 23:28:57 +00:00
Jakob Stoklund Olesen
46389fda3b
Support backwards iteration starting from end().
...
llvm-svn: 119871
2010-11-19 23:28:53 +00:00
Dale Johannesen
87a98b57b8
Add test for PR 8111. By Frits van Bommel.
...
llvm-svn: 119870
2010-11-19 23:23:22 +00:00
Jim Grosbach
2aff392af9
Fix ARM LDR* post-indexed operand encoding.
...
llvm-svn: 119869
2010-11-19 23:14:43 +00:00
Bill Wendling
1825cc74f4
Encodings for the compare instructions.
...
llvm-svn: 119868
2010-11-19 23:14:32 +00:00
Owen Anderson
b4fd2c90e9
The Vm and Vn register fields must be the same for a register-register vmov.
...
llvm-svn: 119867
2010-11-19 23:12:43 +00:00
Evan Cheng
a5f048485f
Fix a cut-n-paste-error.
...
llvm-svn: 119866
2010-11-19 23:01:16 +00:00
Owen Anderson
ea326db47b
Document the new GVN number table structure.
...
llvm-svn: 119865
2010-11-19 22:48:40 +00:00
Jim Grosbach
785952e5ac
Operand names
...
llvm-svn: 119864
2010-11-19 22:43:08 +00:00
Jim Grosbach
5876e41c9f
trailing whitespace
...
llvm-svn: 119863
2010-11-19 22:42:55 +00:00
Eric Christopher
35e2d7f610
Don't need to save piecemeal now.
...
llvm-svn: 119862
2010-11-19 22:39:56 +00:00
Eric Christopher
cee83d6e6b
Update comment.
...
llvm-svn: 119861
2010-11-19 22:37:58 +00:00
Bill Wendling
a82fb71324
Add encodings for some of the thumb ADD instructions. Tests will come once the
...
asm parser can handle them.
llvm-svn: 119860
2010-11-19 22:37:33 +00:00
Eric Christopher
558b61e2d4
Update comment.
...
llvm-svn: 119859
2010-11-19 22:36:41 +00:00
Jim Grosbach
7d8df3185f
Clarify operand names.
...
llvm-svn: 119858
2010-11-19 22:36:02 +00:00
Owen Anderson
c0177aeb71
Add a test for CodeGenPrepare's ability to look through PHI nodes when performing
...
addressing mode folding, introduced in r119853.
llvm-svn: 119857
2010-11-19 22:34:53 +00:00
Eric Christopher
fef5f315af
Refactor address mode handling into a single struct (ala x86), this
...
should give allow a wider range of addressing modes.
No functional change.
llvm-svn: 119856
2010-11-19 22:30:02 +00:00
Jim Grosbach
48bf4f8e56
Fix encoding for ARM MLS instruction.
...
llvm-svn: 119855
2010-11-19 22:22:37 +00:00
Owen Anderson
dfb8c3bbfc
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.
llvm-svn: 119853
2010-11-19 22:15:03 +00:00
Jim Grosbach
09d7bfd886
Add ARM encoding information for STRD.
...
llvm-svn: 119852
2010-11-19 22:14:31 +00:00
Jim Grosbach
5a77b8b5c4
Shuffle things around a bit to keep like things together. Tidy up formatting.
...
llvm-svn: 119851
2010-11-19 22:06:57 +00:00
Bill Wendling
c92a5770df
Revert accidental commit.
...
llvm-svn: 119850
2010-11-19 22:06:18 +00:00
Bill Wendling
49a2e2384b
Change long binary encodings to use hex instead. It's more readable. Also
...
initialize missing bit.
llvm-svn: 119849
2010-11-19 22:02:18 +00:00
Dale Johannesen
c9242c577e
Prefetch has a MemOperand now. FileCheckize a test.
...
This finishes up 8460971.
llvm-svn: 119848
2010-11-19 21:49:38 +00:00
Jim Grosbach
6e9aace4f3
Factor out operand encoding bits for ARM addressing mode 2 store instructions.
...
llvm-svn: 119846
2010-11-19 21:35:06 +00:00
Jim Grosbach
09f6823eb6
Delete another dead class.
...
llvm-svn: 119844
2010-11-19 21:16:08 +00:00
Jim Grosbach
e093e5f0dc
whitespace tweak.
...
llvm-svn: 119843
2010-11-19 21:14:37 +00:00
Rafael Espindola
cf14a382ec
Fix a use after free. Patch by Frits van Bommel.
...
llvm-svn: 119842
2010-11-19 21:14:29 +00:00
Jim Grosbach
d6e5c9f2fe
Refactor PICSTR* instructions to really be pseudos. Nuke dead classes.
...
llvm-svn: 119841
2010-11-19 21:14:02 +00:00
Jim Grosbach
4a22eba616
Rename ARM .td class AIldst1 to AI2ldst for consistency with the other classes.
...
llvm-svn: 119840
2010-11-19 21:07:51 +00:00
Jim Grosbach
003c6e700b
Add ARM binary encoding information for the rest of the indexed loads.
...
llvm-svn: 119821
2010-11-19 19:41:26 +00:00
Jakob Stoklund Olesen
8e0cc61f35
Rename methods for clarity instead of brevity. No functional changes.
...
llvm-svn: 119820
2010-11-19 19:10:39 +00:00
Mon P Wang
88ff56caa3
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.
llvm-svn: 119819
2010-11-19 19:08:12 +00:00
Jakob Stoklund Olesen
55964f6a75
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.
llvm-svn: 119818
2010-11-19 18:51:46 +00:00
Kevin Enderby
8be14414f6
Added support for the Mach-O .symbol_resolver directive. rdar://8673046
...
llvm-svn: 119816
2010-11-19 18:39:33 +00:00
Jim Grosbach
c6ac246671
Remove dead code.
...
llvm-svn: 119815
2010-11-19 18:18:37 +00:00
Jim Grosbach
76aed40813
ARM LDRD binary encoding.
...
llvm-svn: 119812
2010-11-19 18:16:46 +00:00
Jim Grosbach
d7a3550a5e
Remove hard tabs.
...
llvm-svn: 119810
2010-11-19 18:01:37 +00:00
Jim Grosbach
2bb49e15a6
Remove trailing whitespace.
...
llvm-svn: 119806
2010-11-19 17:11:02 +00:00
Benjamin Kramer
2e49eaa92f
Avoid release build warnings.
...
llvm-svn: 119804
2010-11-19 16:36:02 +00:00
Owen Anderson
336021f758
Fix decoding ambiguities of stdrex and ldrex.
...
llvm-svn: 119801
2010-11-19 13:11:50 +00:00
Benjamin Kramer
c77ebcc9a5
Silence warning about an uninitialized variable.
...
llvm-svn: 119800
2010-11-19 11:37:26 +00:00
Duncan Sands
b238de0415
Remove threading of Xor over selects and phis, with an explanation
...
of why such threading is pointless.
llvm-svn: 119798
2010-11-19 09:20:39 +00:00
Duncan Sands
af4ad85160
Simplify, no functionality change.
...
llvm-svn: 119797
2010-11-19 08:33:20 +00:00
Rafael Espindola
9900b4802e
Add a MCLineSectionOrder vector so that we produce the line tables in a
...
deterministic order.
llvm-svn: 119795
2010-11-19 07:41:23 +00:00
Evan Cheng
2debc86138
These instructions are thumb2 only.
...
llvm-svn: 119793
2010-11-19 06:28:11 +00:00
Evan Cheng
0eb2994626
Fix an obvious oversight.
...
llvm-svn: 119792
2010-11-19 06:15:10 +00:00
Jakob Stoklund Olesen
4031c5eb48
Don't attempt trivial coalescing for sub-register copies.
...
Patch by Krister Wombell!
llvm-svn: 119791
2010-11-19 05:45:24 +00:00
Jakob Stoklund Olesen
df1c49c16f
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
llvm-svn: 119790
2010-11-19 05:36:51 +00:00
Rafael Espindola
0b4c9aa9a9
Add an assert.
...
llvm-svn: 119788
2010-11-19 04:55:36 +00:00
Jakob Stoklund Olesen
345945e355
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.
llvm-svn: 119787
2010-11-19 04:47:19 +00:00
Rafael Espindola
92ca933f6e
Fix llvm-gcc boostrap on OS X by avoiding printing sleb and uleb when
...
possible.
llvm-svn: 119785
2010-11-19 04:10:13 +00:00
NAKAMURA Takumi
1818edb53f
unittests/CMakeLists.txt: [PR8225] Tweak linking JITTests on MSVC to add JITTests.def.
...
CMake can pass *.def to link.exe.
llvm-svn: 119783
2010-11-19 03:19:42 +00:00
NAKAMURA Takumi
7a953baa1d
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.
llvm-svn: 119782
2010-11-19 03:19:32 +00:00
NAKAMURA Takumi
1801996111
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).
llvm-svn: 119781
2010-11-19 03:19:26 +00:00
NAKAMURA Takumi
148b62cca9
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.
llvm-svn: 119780
2010-11-19 03:19:18 +00:00
Rafael Espindola
b58867ccba
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.
llvm-svn: 119777
2010-11-19 02:26:16 +00:00
Bill Wendling
945b776b6e
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...
llvm-svn: 119774
2010-11-19 01:33:10 +00:00
Jakob Stoklund Olesen
09770251f6
Revert "Add ADT/IntervalMap.", GCC doesn't like it.
...
This reverts r119772.
llvm-svn: 119773
2010-11-19 01:21:03 +00:00
Jakob Stoklund Olesen
6d89171dcc
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.
llvm-svn: 119772
2010-11-19 01:14:40 +00:00
Dale Johannesen
461e704a2c
Aligned and unaligned copies of the same string
...
were not hashing to the same value. Analysis
and patch by Frits van Bommel!
llvm-svn: 119770
2010-11-19 00:48:58 +00:00
Bill Wendling
20b5ea9858
Use array_pod_sort because the list is contiguous.
...
llvm-svn: 119769
2010-11-19 00:38:19 +00:00
Owen Anderson
f53e4d9fd1
Provide Thumb2 encodings for strex and ldrex.
...
llvm-svn: 119768
2010-11-19 00:28:38 +00:00
Jim Grosbach
2aeb8b9361
Minor cleanups to a few llvm_unreachable() calls.
...
llvm-svn: 119767
2010-11-19 00:27:09 +00:00
Bill Wendling
2ecfcbd2aa
An 'unreachable' shouldn't have a '0 &&' prefix.
...
llvm-svn: 119762
2010-11-19 00:05:15 +00:00
Bill Wendling
2063b84297
Add support for parsing the writeback ("!") token.
...
llvm-svn: 119761
2010-11-18 23:43:05 +00:00
Jason W Kim
5a97bd873e
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.
llvm-svn: 119760
2010-11-18 23:37:15 +00:00
Bill Wendling
4a08e563d7
Give the exclamation point a name instead of a number.
...
llvm-svn: 119759
2010-11-18 23:36:54 +00:00
Owen Anderson
690fa953e1
More tests.
...
llvm-svn: 119756
2010-11-18 23:30:10 +00:00
Owen Anderson
3517585249
Fix encodings for pkhbt, and fix some tests where I accidentally tested ARM mode instead of Thumb2.
...
llvm-svn: 119755
2010-11-18 23:29:56 +00:00
Anton Korobeynikov
14ee344944
Move getInitialFrameState() to TargetFrameInfo
...
llvm-svn: 119754
2010-11-18 23:25:52 +00:00
Jim Grosbach
a391c97bd0
ARM Encoding information for UXTAH and friends.
...
llvm-svn: 119753
2010-11-18 23:24:22 +00:00
Tanya Lattner
cd68095650
Fix bug in DAGCombiner for ARM that was trying to do a ShiftCombine on illegal types (vector should be split first).
...
Added test case.
llvm-svn: 119749
2010-11-18 22:06:46 +00:00