oota-llvm.git
13 years agoInstCombine: Implement X - A*-B -> X + A*B.
Benjamin Kramer [Mon, 22 Nov 2010 20:31:27 +0000 (20:31 +0000)]
InstCombine: Implement X - A*-B -> X + A*B.

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

13 years agoMake the <ARCH>ELFObjectWriter statics private
Jason W Kim [Mon, 22 Nov 2010 18:57:00 +0000 (18:57 +0000)]
Make the <ARCH>ELFObjectWriter statics private

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

13 years agoFix misplaced statics.
Jason W Kim [Mon, 22 Nov 2010 18:47:05 +0000 (18:47 +0000)]
Fix misplaced statics.

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

13 years agoKill trailing whitespace
Jason W Kim [Mon, 22 Nov 2010 18:42:07 +0000 (18:42 +0000)]
Kill trailing whitespace

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

13 years agoRefactor the ELFRelocationEntry (pull up) and move the arch-specific statics to insid...
Jason W Kim [Mon, 22 Nov 2010 18:41:13 +0000 (18:41 +0000)]
Refactor the ELFRelocationEntry (pull up) and move the arch-specific statics to inside the class where it belongs.

Next step is to rationally break apart the RecordRelocation()

Probably the step will be to have 1 member function for ech slot of the ELFRelocationEntry()

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

13 years agoFix epilogue codegen to avoid leaving the stack pointer in an invalid
Evan Cheng [Mon, 22 Nov 2010 18:12:04 +0000 (18:12 +0000)]
Fix epilogue codegen to avoid leaving the stack pointer in an invalid
state. Previously Thumb2 would restore sp from fp like this:
mov sp, r7
sub, sp, #4
If an interrupt is taken after the 'mov' but before the 'sub', callee-saved
registers might be clobbered by the interrupt handler. Instead, try
restoring directly from sp:
add sp, #4
Or, if necessary (with VLA, etc.) use a scratch register to compute sp and
then restore it:
sub.w r4, r7, #8
mov sp, r7
rdar://8465407

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

13 years agoAdd a newline.
Mikhail Glushenkov [Mon, 22 Nov 2010 17:10:20 +0000 (17:10 +0000)]
Add a newline.

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

13 years agollvmc: Make -march/-mcpu/-mtune behaviour more consistent with gcc.
Mikhail Glushenkov [Mon, 22 Nov 2010 17:10:09 +0000 (17:10 +0000)]
llvmc: Make -march/-mcpu/-mtune behaviour more consistent with gcc.

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

13 years agoIf a GEP index simply advances by multiples of a type of zero size,
Duncan Sands [Mon, 22 Nov 2010 16:32:50 +0000 (16:32 +0000)]
If a GEP index simply advances by multiples of a type of zero size,
then replace the index with zero.

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

13 years agoFix a bug with extractelement on SPU.
Kalle Raiskila [Mon, 22 Nov 2010 16:28:26 +0000 (16:28 +0000)]
Fix a bug with extractelement on SPU.
In the attached testcase, the element was
never extracted (missing rotate).

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

13 years agoAdd basic CFI methods to the streamer interface.
Rafael Espindola [Mon, 22 Nov 2010 14:27:24 +0000 (14:27 +0000)]
Add basic CFI methods to the streamer interface.

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

13 years agoMove the "gep undef" -> "undef" transform from instcombine to
Duncan Sands [Mon, 22 Nov 2010 13:42:49 +0000 (13:42 +0000)]
Move the "gep undef" -> "undef" transform from instcombine to
InstructionSimplify.

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

13 years agoRemove some #includes.
Rafael Espindola [Mon, 22 Nov 2010 11:53:17 +0000 (11:53 +0000)]
Remove some #includes.

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

13 years agoImplement the "if (X == 6 || X == 4)" -> "if ((X|2) == 6)" optimization.
Benjamin Kramer [Mon, 22 Nov 2010 09:45:38 +0000 (09:45 +0000)]
Implement the "if (X == 6 || X == 4)" -> "if ((X|2) == 6)" optimization.

This currently only catches the most basic case, a two-case switch, but can be
extended later.

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

13 years agoDon't keep track of inserted phis in PromoteMemoryToRegister: the information
Duncan Sands [Mon, 22 Nov 2010 09:41:24 +0000 (09:41 +0000)]
Don't keep track of inserted phis in PromoteMemoryToRegister: the information
is never used.  Patch by Cameron Zwarich.

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

13 years agoFix a compiler warning about Kind being used uninitialized
Duncan Sands [Mon, 22 Nov 2010 09:38:00 +0000 (09:38 +0000)]
Fix a compiler warning about Kind being used uninitialized
when assertions are disabled.

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

13 years agoPseudos default to 4byte size, let the instruction size field notice
Eric Christopher [Sun, 21 Nov 2010 23:38:19 +0000 (23:38 +0000)]
Pseudos default to 4byte size, let the instruction size field notice
that branch tables are special.

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

13 years agoImplement ELF object file writing support for the MBlaze backend. Its not perfect...
Wesley Peck [Sun, 21 Nov 2010 22:06:28 +0000 (22:06 +0000)]
Implement ELF object file writing support for the MBlaze backend. Its not perfect yet, but it works for many tests.

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

13 years agoImplement branch analysis in the MBlaze backend.
Wesley Peck [Sun, 21 Nov 2010 21:53:36 +0000 (21:53 +0000)]
Implement branch analysis in the MBlaze backend.

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

13 years agoMake it a little bit more explicit that the MBlaze backend only supports upto
Wesley Peck [Sun, 21 Nov 2010 21:39:46 +0000 (21:39 +0000)]
Make it a little bit more explicit that the MBlaze backend only supports upto
32-bit immediate values.

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

13 years agoFix an error in the MBlaze delay slot filler where instructions that already
Wesley Peck [Sun, 21 Nov 2010 21:36:12 +0000 (21:36 +0000)]
Fix an error in the MBlaze delay slot filler where instructions that already
fill a delay slot are moved to fill a different delay slot.

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

13 years agofix comment
Chris Lattner [Sun, 21 Nov 2010 19:05:34 +0000 (19:05 +0000)]
fix comment

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

13 years agoapparently tailcalls are better on darwin/x86-64 than on linux?
Chris Lattner [Sun, 21 Nov 2010 18:59:20 +0000 (18:59 +0000)]
apparently tailcalls are better on darwin/x86-64 than on linux?

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

13 years agoInitialize MemDep's TD member so buildbots don't trip over an uninitialized pointer...
Benjamin Kramer [Sun, 21 Nov 2010 15:21:46 +0000 (15:21 +0000)]
Initialize MemDep's TD member so buildbots don't trip over an uninitialized pointer (TD is passed to PHITransAddr).

I wonder why this didn't explode earlier.

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

13 years agoAdd a rather pointless InstructionSimplify transform, inspired by recent constant
Duncan Sands [Sun, 21 Nov 2010 13:53:09 +0000 (13:53 +0000)]
Add a rather pointless InstructionSimplify transform, inspired by recent constant
folding improvements: if P points to a type of size zero, turn "gep P, N" into "P".
More generally, if a gep index type has size zero, instcombine could replace the
index with zero, but that is not done here.

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

13 years agoFix spelling.
Duncan Sands [Sun, 21 Nov 2010 12:43:13 +0000 (12:43 +0000)]
Fix spelling.

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

13 years agoMore Thumb encodings.
Bill Wendling [Sun, 21 Nov 2010 11:49:36 +0000 (11:49 +0000)]
More Thumb encodings.

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

13 years agoAdd encoding for ARM "trap" instruction.
Bill Wendling [Sun, 21 Nov 2010 11:05:29 +0000 (11:05 +0000)]
Add encoding for ARM "trap" instruction.

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

13 years agoThe "trap" instruction is one of this which doesn't have a condition code. Hack
Bill Wendling [Sun, 21 Nov 2010 10:56:05 +0000 (10:56 +0000)]
The "trap" instruction is one of this which doesn't have a condition code. Hack
the code to not add a "condition code" if it's trap.

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

13 years ago- Give "trap" the correct encoding, at least according to Darwin's assembler.
Bill Wendling [Sun, 21 Nov 2010 10:55:23 +0000 (10:55 +0000)]
- Give "trap" the correct encoding, at least according to Darwin's assembler.
- Add comments saying where the encodings for other instructions came from.

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

13 years agoapply Dan's fix for PR8268 which allows constant folding to handle indexes over
Chris Lattner [Sun, 21 Nov 2010 08:39:01 +0000 (08:39 +0000)]
apply Dan's fix for PR8268 which allows constant folding to handle indexes over
zero sized elements.  This allows us to compile:

  #include <string>
  void foo() { std::string s; }

into an empty function.

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

13 years agoadd some helper methods for asmprinter flags, from PR8417
Chris Lattner [Sun, 21 Nov 2010 08:30:55 +0000 (08:30 +0000)]
add some helper methods for asmprinter flags, from PR8417

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

13 years agoimplement PR8524, apparently mainline gas accepts movq as an alias for movd
Chris Lattner [Sun, 21 Nov 2010 08:18:57 +0000 (08:18 +0000)]
implement PR8524, apparently mainline gas accepts movq as an alias for movd
when transfering between i64 gprs and mmx regs.

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

13 years agorework some DSE paths to use the newly-public "getPointerDependencyFrom"
Chris Lattner [Sun, 21 Nov 2010 08:06:10 +0000 (08:06 +0000)]
rework some DSE paths to use the newly-public "getPointerDependencyFrom"
method in MemDep instead of inserting an instruction, doing a query,
then removing it.  Neither operation is effectively cached.

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

13 years agothe getLocationForSource/Dest methods can be static.
Chris Lattner [Sun, 21 Nov 2010 08:05:25 +0000 (08:05 +0000)]
the getLocationForSource/Dest methods can be static.

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

13 years agoadd "getLocation" method to AliasAnalysis for getting the source and
Chris Lattner [Sun, 21 Nov 2010 07:51:27 +0000 (07:51 +0000)]
add "getLocation" method to AliasAnalysis for getting the source and
destination location of a memcpy/memmove.  I'm not clear about whether
TBAA works on these, so I'm leaving it out for now.  Dan, please revisit
this when convenient.

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

13 years agoimplement PR8576, deleting dead stores with intervening may-alias stores.
Chris Lattner [Sun, 21 Nov 2010 07:34:32 +0000 (07:34 +0000)]
implement PR8576, deleting dead stores with intervening may-alias stores.

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

13 years agofile checkize
Chris Lattner [Sun, 21 Nov 2010 07:32:40 +0000 (07:32 +0000)]
file checkize

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

13 years agoadd some random notes.
Chris Lattner [Sun, 21 Nov 2010 07:05:31 +0000 (07:05 +0000)]
add some random notes.

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

13 years agoUse by-name rather than by-order operand matching for some NEON encodings.
Owen Anderson [Sun, 21 Nov 2010 06:47:06 +0000 (06:47 +0000)]
Use by-name rather than by-order operand matching for some NEON encodings.

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

13 years agooptimize:
Chris Lattner [Sun, 21 Nov 2010 06:44:42 +0000 (06:44 +0000)]
optimize:
void a(int x) { if (((1<<x)&8)==0) b(); }

into "x != 3", which occurs over 100 times in 403.gcc but in no
other program in llvm-test.

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

13 years agotail calls on x86 are implemented.
Chris Lattner [Sun, 21 Nov 2010 06:10:27 +0000 (06:10 +0000)]
tail calls on x86 are implemented.

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

13 years agoBR_JTadd is ARM-only, so use the proper pseudo class to get the predicate.
Jim Grosbach [Sun, 21 Nov 2010 01:26:01 +0000 (01:26 +0000)]
BR_JTadd is ARM-only, so use the proper pseudo class to get the predicate.

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

13 years agoHandle PCRel relocations with absolute values. Fixes PR8656.
Rafael Espindola [Sun, 21 Nov 2010 00:48:25 +0000 (00:48 +0000)]
Handle PCRel relocations with absolute values. Fixes PR8656.

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

13 years agoImplement PR8644: forwarding a memcpy value to a byval,
Chris Lattner [Sun, 21 Nov 2010 00:28:59 +0000 (00:28 +0000)]
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.

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

13 years agoa byval argument without an align can have an arbitrary alignment
Chris Lattner [Sat, 20 Nov 2010 23:49:06 +0000 (23:49 +0000)]
a byval argument without an align can have an arbitrary alignment
requirement on the input pointer.

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

13 years agoA few more thumb instruction MC encodings.
Bill Wendling [Sat, 20 Nov 2010 22:52:33 +0000 (22:52 +0000)]
A few more thumb instruction MC encodings.

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

13 years agoRewrite address handling to use a structure with all the possible address
Eric Christopher [Sat, 20 Nov 2010 22:38:27 +0000 (22:38 +0000)]
Rewrite address handling to use a structure with all the possible address
mode variables. Handle frame indexes in load/store and allocas again.

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

13 years agoSTRH only needs the additional operand, not t2STRH. Also invert conditional
Eric Christopher [Sat, 20 Nov 2010 22:01:38 +0000 (22:01 +0000)]
STRH only needs the additional operand, not t2STRH. Also invert conditional
to match the one from the load emitter above.

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

13 years agoSimplify code. No change in functionality.
Benjamin Kramer [Sat, 20 Nov 2010 18:43:35 +0000 (18:43 +0000)]
Simplify code. No change in functionality.

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

13 years agoTest commit: Fix two -Asserts mode warnings in StringMap.h.
Frits van Bommel [Sat, 20 Nov 2010 18:37:24 +0000 (18:37 +0000)]
Test commit: Fix two -Asserts mode warnings in StringMap.h.

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

13 years agoMake this compile on case-sensitive file systemsw
Anton Korobeynikov [Sat, 20 Nov 2010 16:14:57 +0000 (16:14 +0000)]
Make this compile on case-sensitive file systemsw

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

13 years agoMove some more hooks to TargetFrameInfo
Anton Korobeynikov [Sat, 20 Nov 2010 15:59:32 +0000 (15:59 +0000)]
Move some more hooks to TargetFrameInfo

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

13 years agoSilence Release build warnings about unused functions.
Benjamin Kramer [Sat, 20 Nov 2010 15:53:24 +0000 (15:53 +0000)]
Silence Release build warnings about unused functions.

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

13 years agoDisable warning C4291 on MSVC. Caused because class AttributeList provides a non...
Francois Pichet [Sat, 20 Nov 2010 15:39:03 +0000 (15:39 +0000)]
Disable warning C4291 on MSVC. Caused because class AttributeList provides a non implemented operator delete without a corresponding new.

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

13 years agoOn X86, MEMBARRIER, MFENCE, SFENCE, LFENCE are not target memory intrinsics,
Duncan Sands [Sat, 20 Nov 2010 11:25:00 +0000 (11:25 +0000)]
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.

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

13 years agoRemoving the useless test that I added recently. It was meant as an example, but...
Andrew Trick [Sat, 20 Nov 2010 07:26:51 +0000 (07:26 +0000)]
Removing the useless test that I added recently. It was meant as an example, but not complicated enough to merit another test.

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

13 years agoRABasic fix. Regalloc is responsible for updating block live ins.
Andrew Trick [Sat, 20 Nov 2010 02:57:05 +0000 (02:57 +0000)]
RABasic fix. Regalloc is responsible for updating block live ins.

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

13 years agoWhitespace.
Andrew Trick [Sat, 20 Nov 2010 02:43:55 +0000 (02:43 +0000)]
Whitespace.

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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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