oota-llvm.git
12 years agoDe-constify Types in FunctionType::get().
Jay Foad [Mon, 11 Jul 2011 07:56:41 +0000 (07:56 +0000)]
De-constify Types in FunctionType::get().

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

12 years agoRemove mentions of type planes.
Jay Foad [Mon, 11 Jul 2011 07:28:49 +0000 (07:28 +0000)]
Remove mentions of type planes.

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

12 years ago- Eliminate MCCodeEmitter's dependency on TargetMachine. It now uses MCInstrInfo
Evan Cheng [Mon, 11 Jul 2011 03:57:24 +0000 (03:57 +0000)]
- Eliminate MCCodeEmitter's dependency on TargetMachine. It now uses MCInstrInfo
  and MCSubtargetInfo.
- Added methods to update subtarget features (used when targets automatically
  detect subtarget features or switch modes).
- Teach X86Subtarget to update MCSubtargetInfo features bits since the
  MCSubtargetInfo layer can be shared with other modules.
- These fixes .code 16 / .code 32 support since mode switch is updated in
  MCSubtargetInfo so MC code emitter can do the right thing.

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

12 years agoDon't duplicate the work done by a gep into a "bitcast" if the gep has
Rafael Espindola [Mon, 11 Jul 2011 03:43:47 +0000 (03:43 +0000)]
Don't duplicate the work done by a gep into a "bitcast" if the gep has
more than one use.

Fixes PR10322.

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

12 years agoFix <rdar://problem/9751331>.
Cameron Zwarich [Mon, 11 Jul 2011 01:29:42 +0000 (01:29 +0000)]
Fix <rdar://problem/9751331>.

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

12 years agoSilence -Wunused-variable in release builds.
Chandler Carruth [Sun, 10 Jul 2011 09:45:35 +0000 (09:45 +0000)]
Silence -Wunused-variable in release builds.

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

12 years agoMake the destructor virtual to silence GCC's -Wnon-virtual-dtor. Let me
Chandler Carruth [Sun, 10 Jul 2011 08:38:12 +0000 (08:38 +0000)]
Make the destructor virtual to silence GCC's -Wnon-virtual-dtor. Let me
know if there is some problem with this destructor being virtual...

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

12 years agoUse BranchProbability instead of floating points in IfConverter.
Jakub Staszak [Sun, 10 Jul 2011 02:58:07 +0000 (02:58 +0000)]
Use BranchProbability instead of floating points in IfConverter.

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

12 years ago- Make BranchProbability constructor public.
Jakub Staszak [Sun, 10 Jul 2011 02:12:39 +0000 (02:12 +0000)]
- Make BranchProbability constructor public.
- Add getCompl() method.

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

12 years agoDon't analyze block if it's not considered for ifcvt anymore.
Jakub Staszak [Sun, 10 Jul 2011 02:00:16 +0000 (02:00 +0000)]
Don't analyze block if it's not considered for ifcvt anymore.

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

12 years agofinish a thought.
Chris Lattner [Sun, 10 Jul 2011 00:29:18 +0000 (00:29 +0000)]
finish a thought.

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

12 years agoMove the loads after the calls so that the fix for
Rafael Espindola [Sat, 9 Jul 2011 23:53:58 +0000 (23:53 +0000)]
Move the loads after the calls so that the fix for
PR10292 doesn't show that the loads don't alias
the allocas.

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

12 years agoUse CHECK-NEXT.
Rafael Espindola [Sat, 9 Jul 2011 22:56:50 +0000 (22:56 +0000)]
Use CHECK-NEXT.

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

12 years agoRemove tests for APIs that were removed.
Nick Lewycky [Sat, 9 Jul 2011 18:55:51 +0000 (18:55 +0000)]
Remove tests for APIs that were removed.

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

12 years agoUpdate OCaml bindings. Opaque types are gone, type holders are gone and the
Nick Lewycky [Sat, 9 Jul 2011 18:29:33 +0000 (18:29 +0000)]
Update OCaml bindings. Opaque types are gone, type holders are gone and the
module operations that operate on type names are gone.

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

12 years agothe various ConstantExpr::get*Ty methods existed to work with issues around
Chris Lattner [Sat, 9 Jul 2011 18:23:52 +0000 (18:23 +0000)]
the various ConstantExpr::get*Ty methods existed to work with issues around
type refinement.  Zap them now that type refinement is toast.

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

12 years agodon't load element before checking to see if it is valid.
Chris Lattner [Sat, 9 Jul 2011 18:23:26 +0000 (18:23 +0000)]
don't load element before checking to see if it is valid.

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

12 years agoEliminate the WriteTypeSymbolic function. Now that types know
Chris Lattner [Sat, 9 Jul 2011 18:03:13 +0000 (18:03 +0000)]
Eliminate the WriteTypeSymbolic function.  Now that types know
their names, we don't need a module around to print them.

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

12 years agostop using WriteTypeSymbolic.
Chris Lattner [Sat, 9 Jul 2011 18:02:13 +0000 (18:02 +0000)]
stop using WriteTypeSymbolic.

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

12 years agoremove the DerivedType which isn't adding value anymore.
Chris Lattner [Sat, 9 Jul 2011 17:59:15 +0000 (17:59 +0000)]
remove the DerivedType which isn't adding value anymore.

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

12 years agoLand the long talked about "type system rewrite" patch. This
Chris Lattner [Sat, 9 Jul 2011 17:41:24 +0000 (17:41 +0000)]
Land the long talked about "type system rewrite" patch.  This
patch brings numerous advantages to LLVM.  One way to look at it
is through diffstat:
 109 files changed, 3005 insertions(+), 5906 deletions(-)

Removing almost 3K lines of code is a good thing.  Other advantages
include:

1. Value::getType() is a simple load that can be CSE'd, not a mutating
   union-find operation.
2. Types a uniqued and never move once created, defining away PATypeHolder.
3. Structs can be "named" now, and their name is part of the identity that
   uniques them.  This means that the compiler doesn't merge them structurally
   which makes the IR much less confusing.
4. Now that there is no way to get a cycle in a type graph without a named
   struct type, "upreferences" go away.
5. Type refinement is completely gone, which should make LTO much MUCH faster
   in some common cases with C++ code.
6. Types are now generally immutable, so we can use "Type *" instead
   "const Type *" everywhere.

Downsides of this patch are that it removes some functions from the C API,
so people using those will have to upgrade to (not yet added) new API.
"LLVM 3.0" is the right time to do this.

There are still some cleanups pending after this, this patch is large enough
as-is.

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

12 years agoadd a #include
Chris Lattner [Sat, 9 Jul 2011 17:00:38 +0000 (17:00 +0000)]
add a #include

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

12 years agofix a really bad bug that would cause nested cursors to break,
Chris Lattner [Sat, 9 Jul 2011 17:00:12 +0000 (17:00 +0000)]
fix a really bad bug that would cause nested cursors to break,
used by the new bitcode reader.

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

12 years agomore tests not making the jump into the brave new world.
Chris Lattner [Sat, 9 Jul 2011 16:57:10 +0000 (16:57 +0000)]
more tests not making the jump into the brave new world.

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

12 years agoremove some crufy old tests that aren't adding much value
Chris Lattner [Sat, 9 Jul 2011 16:55:16 +0000 (16:55 +0000)]
remove some crufy old tests that aren't adding much value

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

12 years agoremove a test that doesn't make sense in the new world.
Chris Lattner [Sat, 9 Jul 2011 16:52:42 +0000 (16:52 +0000)]
remove a test that doesn't make sense in the new world.

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

12 years agotest/CodeGen/X86/vector.ll: Tweak temporary output to appease Win32 hosts.
NAKAMURA Takumi [Sat, 9 Jul 2011 10:22:28 +0000 (10:22 +0000)]
test/CodeGen/X86/vector.ll: Tweak temporary output to appease Win32 hosts.

With Lit (not bash) in a test, multiple redirects >%t might open(%t, "w") multiple. It can be avoided if latter redirect is >>%t.

It might work even if ">/dev/null" were used.

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

12 years agoWindows/DynamicLibrary.inc: Fix trivial warnings. Thanks to John Myers!
NAKAMURA Takumi [Sat, 9 Jul 2011 08:41:20 +0000 (08:41 +0000)]
Windows/DynamicLibrary.inc: Fix trivial warnings. Thanks to John Myers!

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

12 years agolit/LitConfig.py: Demote Win32 message "Unable to find 'bash.exe'" from Warning to...
NAKAMURA Takumi [Sat, 9 Jul 2011 07:19:50 +0000 (07:19 +0000)]
lit/LitConfig.py: Demote Win32 message "Unable to find 'bash.exe'" from Warning to Note.

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

12 years agoRevert accidental commit.
Evan Cheng [Sat, 9 Jul 2011 06:26:27 +0000 (06:26 +0000)]
Revert accidental commit.

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

12 years agoChange createAsmParser to take a MCSubtargetInfo instead of triple,
Evan Cheng [Sat, 9 Jul 2011 05:47:46 +0000 (05:47 +0000)]
Change createAsmParser to take a MCSubtargetInfo instead of triple,
CPU, and feature string. Parsing some asm directives can change
subtarget state (e.g. .code 16) and it must be reflected in other
modules (e.g. MCCodeEmitter). That is, the MCSubtargetInfo instance
must be shared.

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

12 years agoOops, didn't mean to commit that.
Jakob Stoklund Olesen [Sat, 9 Jul 2011 01:02:44 +0000 (01:02 +0000)]
Oops, didn't mean to commit that.

Spills should be hoisted out of loops, but we don't want to hoist them
to dominating blocks at the same loop depth. That could cause the spills
to be executed more often.

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

12 years agoAdded test cases for GVN signed intrinsics recognition, r134777.
Lang Hames [Sat, 9 Jul 2011 00:36:54 +0000 (00:36 +0000)]
Added test cases for GVN signed intrinsics recognition, r134777.

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

12 years agoAdded recognition for signed add/sub/mul with overflow intrinsics to GVN as per Chris...
Lang Hames [Sat, 9 Jul 2011 00:25:11 +0000 (00:25 +0000)]
Added recognition for signed add/sub/mul with overflow intrinsics to GVN as per Chris and Frits suggestion.

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

12 years agoHoist spills within a basic block.
Jakob Stoklund Olesen [Sat, 9 Jul 2011 00:25:03 +0000 (00:25 +0000)]
Hoist spills within a basic block.

Try to move spills as early as possible in their basic block. This can
help eliminate interferences by shortening the live range being
spilled.

This fixes PR10221.

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

12 years agoReally force on 64bit for 64-bit targets. Should fix remaining failures on unknown...
Eli Friedman [Fri, 8 Jul 2011 23:43:01 +0000 (23:43 +0000)]
Really force on 64bit for 64-bit targets.  Should fix remaining failures on unknown x86/non-x86 targets.

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

12 years agoRevert earlier unnecessary hack. Make sure we correctly force on 64bit and cmov...
Eli Friedman [Fri, 8 Jul 2011 23:07:42 +0000 (23:07 +0000)]
Revert earlier unnecessary hack.  Make sure we correctly force on 64bit and cmov for 64-bit targets.

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

12 years agoFix indentation.
Evan Cheng [Fri, 8 Jul 2011 22:49:55 +0000 (22:49 +0000)]
Fix indentation.

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

12 years agoFix comment.
Evan Cheng [Fri, 8 Jul 2011 22:49:42 +0000 (22:49 +0000)]
Fix comment.

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

12 years agoAdd an fma TableGen node.
Cameron Zwarich [Fri, 8 Jul 2011 22:49:34 +0000 (22:49 +0000)]
Add an fma TableGen node.

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

12 years agoAdd support for ARM / Thumb mode switching with .code 16 and .code 32.
Evan Cheng [Fri, 8 Jul 2011 22:36:29 +0000 (22:36 +0000)]
Add support for ARM / Thumb mode switching with .code 16 and .code 32.

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

12 years agoUpdate comments for SandyBridge CPU identifiers.
Bob Wilson [Fri, 8 Jul 2011 22:33:59 +0000 (22:33 +0000)]
Update comments for SandyBridge CPU identifiers.

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

12 years agoMark tBRIND as predicable.
Jim Grosbach [Fri, 8 Jul 2011 22:33:49 +0000 (22:33 +0000)]
Mark tBRIND as predicable.

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

12 years agoRestore old behavior. Always auto-detect features unless cpu or features are specified.
Evan Cheng [Fri, 8 Jul 2011 22:30:25 +0000 (22:30 +0000)]
Restore old behavior. Always auto-detect features unless cpu or features are specified.

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

12 years agoFix broken x86_64 tests which specify non-64-bit cpu's.
Evan Cheng [Fri, 8 Jul 2011 22:29:33 +0000 (22:29 +0000)]
Fix broken x86_64 tests which specify non-64-bit cpu's.

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

12 years agoPseudo-ize tBRIND.
Jim Grosbach [Fri, 8 Jul 2011 22:25:23 +0000 (22:25 +0000)]
Pseudo-ize tBRIND.

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

12 years agoDefault 64-bit target features and SSE2 on when a triple specifies x86-64. Clean...
Eli Friedman [Fri, 8 Jul 2011 22:16:47 +0000 (22:16 +0000)]
Default 64-bit target features and SSE2 on when a triple specifies x86-64.  Clean up all the other hacks which are now unnecessary.

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

12 years agoUse add instead of accumulate.
Cameron Zwarich [Fri, 8 Jul 2011 22:13:55 +0000 (22:13 +0000)]
Use add instead of accumulate.

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

12 years agoRecognize Intel CPUs with Family=6 and Model=44.
Bob Wilson [Fri, 8 Jul 2011 22:09:35 +0000 (22:09 +0000)]
Recognize Intel CPUs with Family=6 and Model=44.
According to Intel Application Note 485, this value is used for
"Intel Core i7 and Intel Xeon processor".  Just include it with the other
"corei7-avx" entries.

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

12 years agoReapply a fixed version of r133285.
Bob Wilson [Fri, 8 Jul 2011 22:09:33 +0000 (22:09 +0000)]
Reapply a fixed version of r133285.
This tightens up checking for overflow in alloca sizes, based on feedback
from Duncan and John about the change in r132926.

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

12 years agoMake tBX_RET and tBX_RET_vararg predicable.
Jim Grosbach [Fri, 8 Jul 2011 21:50:04 +0000 (21:50 +0000)]
Make tBX_RET and tBX_RET_vararg predicable.

The normal tBX instruction is predicable, so there's no reason the
pseudos for using it as a return shouldn't be. Gives us some nice code-gen
improvements as can be seen by the test changes. In particular, several
tests now have to disable if-conversion because it works too well and defeats
the test.

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

12 years agoAdd _allrem, _aullrem and _allmul to the runtime for MSVC.
Julien Lerouge [Fri, 8 Jul 2011 21:40:25 +0000 (21:40 +0000)]
Add _allrem, _aullrem and _allmul to the runtime for MSVC.
http://llvm.org/bugs/show_bug.cgi?id=10305

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

12 years agoAdd an intrinsic and codegen support for fused multiply-accumulate. The intent
Cameron Zwarich [Fri, 8 Jul 2011 21:39:21 +0000 (21:39 +0000)]
Add an intrinsic and codegen support for fused multiply-accumulate. The intent
is to use this for architectures that have a native FMA instruction.

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

12 years agoFor non-x86 host, used generic as CPU name.
Evan Cheng [Fri, 8 Jul 2011 21:14:14 +0000 (21:14 +0000)]
For non-x86 host, used generic as CPU name.

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

12 years agoPseudo-ize tBX_RET and tBX_RET_vararg.
Jim Grosbach [Fri, 8 Jul 2011 21:10:35 +0000 (21:10 +0000)]
Pseudo-ize tBX_RET and tBX_RET_vararg.

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

12 years agoPlug a leak by giving the AsmParser ownership of the MCSubtargetInfo.
Benjamin Kramer [Fri, 8 Jul 2011 21:06:23 +0000 (21:06 +0000)]
Plug a leak by giving the AsmParser ownership of the MCSubtargetInfo.

Found by valgrind.

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

12 years agoShuffle productions around a bit.
Jim Grosbach [Fri, 8 Jul 2011 21:04:05 +0000 (21:04 +0000)]
Shuffle productions around a bit.

No functional change.

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

12 years agoBe more aggressive about following hints.
Jakob Stoklund Olesen [Fri, 8 Jul 2011 20:46:18 +0000 (20:46 +0000)]
Be more aggressive about following hints.

RAGreedy::tryAssign will now evict interference from the preferred
register even when another register is free.

To support this, add the EvictionCost struct that counts how many hints
are broken by an eviction. We don't want to break one hint just to
satisfy another.

Rename canEvict to shouldEvict, and add the first bit of eviction policy
that doesn't depend on spill weights: Always make room in the preferred
register as long as the evictees can be split and aren't already
assigned to their preferred register.

Also make the CSR avoidance more accurate. When looking for a cheaper
register it is OK to use a new volatile register. Only CSR aliases that
have never been used before should be avoided.

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

12 years agoUse tPseudoExpand for tTAILJMPrND and tTAILJMPr.
Jim Grosbach [Fri, 8 Jul 2011 20:39:19 +0000 (20:39 +0000)]
Use tPseudoExpand for tTAILJMPrND and tTAILJMPr.

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

12 years agoUse tPseudoExpand for tTAILJMPd and tTAILJMPdND.
Jim Grosbach [Fri, 8 Jul 2011 20:32:21 +0000 (20:32 +0000)]
Use tPseudoExpand for tTAILJMPd and tTAILJMPdND.

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

12 years agoSilence compiler warning.
Benjamin Kramer [Fri, 8 Jul 2011 20:18:13 +0000 (20:18 +0000)]
Silence compiler warning.

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

12 years agoAdd more info to FIXME.
Jim Grosbach [Fri, 8 Jul 2011 20:18:11 +0000 (20:18 +0000)]
Add more info to FIXME.

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

12 years agoMove Thumb tail call pseudos to Thumb.td file.
Jim Grosbach [Fri, 8 Jul 2011 20:13:35 +0000 (20:13 +0000)]
Move Thumb tail call pseudos to Thumb.td file.

Fix a FIXME.

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

12 years agoFix dangling pointer.
Eli Friedman [Fri, 8 Jul 2011 20:07:05 +0000 (20:07 +0000)]
Fix dangling pointer.

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

12 years agoTargetAsmParser doesn't need reference to Target.
Evan Cheng [Fri, 8 Jul 2011 19:33:14 +0000 (19:33 +0000)]
TargetAsmParser doesn't need reference to Target.

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

12 years agoRemove unused copy of UpdateInlinedAtInfo.
Benjamin Kramer [Fri, 8 Jul 2011 19:32:06 +0000 (19:32 +0000)]
Remove unused copy of UpdateInlinedAtInfo.

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

12 years agoUse ARMPseudoExpand for ARM tail calls.
Jim Grosbach [Fri, 8 Jul 2011 18:50:22 +0000 (18:50 +0000)]
Use ARMPseudoExpand for ARM tail calls.

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

12 years agoShuffle productions around a bit.
Jim Grosbach [Fri, 8 Jul 2011 18:26:27 +0000 (18:26 +0000)]
Shuffle productions around a bit.

No functional change.

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

12 years agoUse ARMPseudoExpand for BLr9, BLr9_pred, BXr9, and BXr9_pred.
Jim Grosbach [Fri, 8 Jul 2011 18:15:12 +0000 (18:15 +0000)]
Use ARMPseudoExpand for BLr9, BLr9_pred, BXr9, and BXr9_pred.

TableGen'erated MC lowering pseudo-expansion.

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

12 years agoFix a dangling reference. Patch by Dave Abrahams. pr10311
Evan Cheng [Fri, 8 Jul 2011 18:04:22 +0000 (18:04 +0000)]
Fix a dangling reference. Patch by Dave Abrahams. pr10311

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

12 years agoRefactor. It is inliner's responsibility to update line number information.
Devang Patel [Fri, 8 Jul 2011 18:01:31 +0000 (18:01 +0000)]
Refactor. It is inliner's responsibility to update line number information.

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

12 years agoAdd CMake support for the new TableGen file introduced in r134705.
Chandler Carruth [Fri, 8 Jul 2011 17:54:08 +0000 (17:54 +0000)]
Add CMake support for the new TableGen file introduced in r134705.

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

12 years agoUse TableGen'erated pseudo lowering for ARM.
Jim Grosbach [Fri, 8 Jul 2011 17:40:42 +0000 (17:40 +0000)]
Use TableGen'erated pseudo lowering for ARM.

Hook up the TableGen lowering for simple pseudo instructions for ARM and
use it for a subset of the many pseudos the backend has as proof of concept.

More conversions to come.

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

12 years agoTableGen'erated MC lowering for simple pseudo-instructions.
Jim Grosbach [Fri, 8 Jul 2011 17:36:35 +0000 (17:36 +0000)]
TableGen'erated MC lowering for simple pseudo-instructions.

This allows the (many) pseudo-instructions we have that map onto a single
real instruction to have their expansion during MC lowering handled
automatically instead of the current cumbersome manual expansion required.
These sorts of pseudos are common when an instruction is used in situations
that require different MachineInstr flags (isTerminator, isBranch, et. al.)
than the generic instruction description has. For example, using a move
to the PC to implement a branch.

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

12 years agoRefactor.
Devang Patel [Fri, 8 Jul 2011 17:09:57 +0000 (17:09 +0000)]
Refactor.

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

12 years agoMake provision to have floating point constants in .debug_loc expressions.
Devang Patel [Fri, 8 Jul 2011 16:49:43 +0000 (16:49 +0000)]
Make provision to have floating point constants in .debug_loc expressions.

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

12 years agoApparently we can't expect a BinaryOperator here.
Benjamin Kramer [Fri, 8 Jul 2011 12:08:24 +0000 (12:08 +0000)]
Apparently we can't expect a BinaryOperator here.

Should fix llvm-gcc selfhost.

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

12 years agocmake/modules/LLVMLibDeps.cmake: Update to appease cmake builds.
NAKAMURA Takumi [Fri, 8 Jul 2011 10:45:15 +0000 (10:45 +0000)]
cmake/modules/LLVMLibDeps.cmake: Update to appease cmake builds.

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

12 years agoEmit a more efficient magic number multiplication for exact sdivs.
Benjamin Kramer [Fri, 8 Jul 2011 10:31:30 +0000 (10:31 +0000)]
Emit a more efficient magic number multiplication for exact sdivs.

We have to do this in DAGBuilder instead of DAGCombiner, because the exact bit is lost after building.

  struct foo { char x[24]; };
  long bar(struct foo *a, struct foo *b) { return a-b; }
is now compiled into
  movl 4(%esp), %eax
  subl 8(%esp), %eax
  sarl $3, %eax
  imull $-1431655765, %eax, %eax
instead of
  movl 4(%esp), %eax
  subl 8(%esp), %eax
  movl $715827883, %ecx
  imull %ecx
  movl %edx, %eax
  shrl $31, %eax
  sarl $2, %edx
  addl %eax, %edx
  movl %edx, %eax

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

12 years agoEliminate asm parser's dependency on TargetMachine:
Evan Cheng [Fri, 8 Jul 2011 01:53:10 +0000 (01:53 +0000)]
Eliminate asm parser's dependency on TargetMachine:
- Each target asm parser now creates its own MCSubtatgetInfo (if needed).
- Changed AssemblerPredicate to take subtarget features which tablegen uses
  to generate asm matcher subtarget feature queries. e.g.
  "ModeThumb,FeatureThumb2" is translated to
  "(Bits & ModeThumb) != 0 && (Bits & FeatureThumb2) != 0".

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

12 years agoMake GVN look through extractvalues for recognised intrinsics. GVN can then CSE ops...
Lang Hames [Fri, 8 Jul 2011 01:50:54 +0000 (01:50 +0000)]
Make GVN look through extractvalues for recognised intrinsics. GVN can then CSE ops that match values produced by the intrinsics.

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

12 years agoRaise assertion when MachineOperand has unexpected target flag.
Akira Hatanaka [Fri, 8 Jul 2011 00:42:35 +0000 (00:42 +0000)]
Raise assertion when MachineOperand has unexpected target flag.

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

12 years agoMake sure variable Kind is assigned a value to suppress warning.
Akira Hatanaka [Fri, 8 Jul 2011 00:26:25 +0000 (00:26 +0000)]
Make sure variable Kind is assigned a value to suppress warning.

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

12 years agoFix more register allocation sensitive tests.
Jakob Stoklund Olesen [Fri, 8 Jul 2011 00:24:06 +0000 (00:24 +0000)]
Fix more register allocation sensitive tests.

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

12 years agoRemove a test that no longer makes sense.
Jakob Stoklund Olesen [Fri, 8 Jul 2011 00:24:03 +0000 (00:24 +0000)]
Remove a test that no longer makes sense.

It was testing a linear scan feature:

  Test if linearscan is unfavoring registers for allocation to allow
  more reuse of reloads from stack slots.

The greedy register allocator doesn't access any stack slots in this
function, so the linear scan feature was not being tested.

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

12 years agoLet the inline asm 'q' constraint match float, and on 64-bit double too.
Nick Lewycky [Fri, 8 Jul 2011 00:19:27 +0000 (00:19 +0000)]
Let the inline asm 'q' constraint match float, and on 64-bit double too.
Fixes PR9602!

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

12 years agoGo ahead and emit the barrier on x86-64 even without sse2. The
Eric Christopher [Fri, 8 Jul 2011 00:04:56 +0000 (00:04 +0000)]
Go ahead and emit the barrier on x86-64 even without sse2. The
processor supports it just fine.

Fixes PR9675 and rdar://9740801

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

12 years agoLower MachineInstr to MC Inst and print to .s files.
Akira Hatanaka [Thu, 7 Jul 2011 23:56:50 +0000 (23:56 +0000)]
Lower MachineInstr to MC Inst and print to .s files.

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

12 years agoFix CMake build's library dependencies.
Chandler Carruth [Thu, 7 Jul 2011 23:45:45 +0000 (23:45 +0000)]
Fix CMake build's library dependencies.

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

12 years agoHandle fpcr register.
Eric Christopher [Thu, 7 Jul 2011 22:54:12 +0000 (22:54 +0000)]
Handle fpcr register.

Part of PR10299 and rdar://9740322

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

12 years agoAdd support for the X86 'l' constraint.
Eric Christopher [Thu, 7 Jul 2011 22:29:07 +0000 (22:29 +0000)]
Add support for the X86 'l' constraint.

Fixes PR10149 and rdar://9738585

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

12 years agoRemove a FIXME. All of the standard ones are in the list.
Eric Christopher [Thu, 7 Jul 2011 22:29:03 +0000 (22:29 +0000)]
Remove a FIXME. All of the standard ones are in the list.

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

12 years agoRemove unnecessary newline.
Akira Hatanaka [Thu, 7 Jul 2011 22:06:18 +0000 (22:06 +0000)]
Remove unnecessary newline.

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

12 years agoAdd DEBUG message.
Devang Patel [Thu, 7 Jul 2011 21:44:42 +0000 (21:44 +0000)]
Add DEBUG message.

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

12 years agoAdd Mode64Bit feature and sink it down to MC layer.
Evan Cheng [Thu, 7 Jul 2011 21:06:52 +0000 (21:06 +0000)]
Add Mode64Bit feature and sink it down to MC layer.

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

12 years agoMove a function out-of-line.
Bill Wendling [Thu, 7 Jul 2011 21:05:13 +0000 (21:05 +0000)]
Move a function out-of-line.

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

12 years agoRather than having printMemOperand change the way memory operands are printed
Akira Hatanaka [Thu, 7 Jul 2011 20:54:20 +0000 (20:54 +0000)]
Rather than having printMemOperand change the way memory operands are printed
based on a modifier, split it into two functions.

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

12 years agoThis patch adds a flag in MCAsmInfo that indicates whether dwarf register
Akira Hatanaka [Thu, 7 Jul 2011 20:30:33 +0000 (20:30 +0000)]
This patch adds a flag in MCAsmInfo that indicates whether dwarf register
numbers should be printed instead of symbolic register names in
MCAsmStreamer::EmitRegisterName. This is necessary because some versions of
GNU assembler won't accept code in which symbolic register names are used in
cfi directives. There is no change in behavior unless the flag is explicitly
set to true by a backend.

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

12 years agoDefine class MipsMCInstLower.
Akira Hatanaka [Thu, 7 Jul 2011 20:24:54 +0000 (20:24 +0000)]
Define class MipsMCInstLower.

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

12 years agoChange visibility of MipsAsmPrinter.
Akira Hatanaka [Thu, 7 Jul 2011 20:10:52 +0000 (20:10 +0000)]
Change visibility of MipsAsmPrinter.

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