Andrew Trick [Tue, 12 Jul 2011 00:08:50 +0000 (00:08 +0000)]
indvars: Code reorganization in preparation for
LinearFunctionTestReplace rewrite. No functionality.
I've been wanting to group the indvar subphases into sections and
order them by their logical sequence. My next checkin adds functions
related to LFTR, and doing the reorg now should help reviewers. Since,
most of the code in IndVarSimplify.cpp has recently been replaced or
will be replaced soon, obscuring blame should not be an issue. This
seems like an ideal time to shuffle the code around.
I'm happy to take more suggestions for cleaning up the code. Or if
you've been wanting to cleanup anything in this file yourself, now is
a good time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134941
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 11 Jul 2011 23:06:52 +0000 (23:06 +0000)]
Revert r134921, 134917, 134908 and 134907. They're causing failures
in multiple buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134936
91177308-0d34-0410-b5e6-
96231b3b80d8
John Wiegley [Mon, 11 Jul 2011 22:39:46 +0000 (22:39 +0000)]
fix some examples
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134933
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Mon, 11 Jul 2011 22:19:51 +0000 (22:19 +0000)]
Fix LTO after the recent MC subtarget refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134930
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 11 Jul 2011 21:24:15 +0000 (21:24 +0000)]
Most MCCodeEmitter's don't meed MCContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134922
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 11 Jul 2011 20:55:22 +0000 (20:55 +0000)]
Use get(0 Instead of Create()
Respond to some feedback asking for a name change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134921
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 11 Jul 2011 20:40:56 +0000 (20:40 +0000)]
Disassembler doesn't need TargetMachine anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134920
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 11 Jul 2011 20:23:13 +0000 (20:23 +0000)]
struct Init -> class Init.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134917
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 11 Jul 2011 18:59:29 +0000 (18:59 +0000)]
Fix Build
Update the tag for Init to match how it's defined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134908
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Mon, 11 Jul 2011 18:25:51 +0000 (18:25 +0000)]
[AVX] Make Inits Foldable
Manage Inits in a FoldingSet. This provides several benefits:
- Memory for Inits is properly managed
- Duplicate Inits are folded into Flyweights, saving memory
- It enforces const-correctness, protecting against certain classes
of bugs
The above benefits allow Inits to be used in more contexts, which in
turn provides more dynamism to TableGen. This enhanced capability
will be used by the AVX code generator to a fold common patterns
together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134907
91177308-0d34-0410-b5e6-
96231b3b80d8
Shantonu Sen [Mon, 11 Jul 2011 17:57:30 +0000 (17:57 +0000)]
Resynchronize EDInfo.h and EDEmitter.cpp.
The enum names as well as order (i.e. value)
had skewed, which means that consumers of the
tablegen-ed table would see different values than
intended. Make both files have a superset of enums,
and add classification as needed for numMCOperands.
Reviewed by Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134905
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 11 Jul 2011 17:09:57 +0000 (17:09 +0000)]
Fix recognition of ARM 'adcs' mnemonic.
The 'CS' is not a predication suffix in this case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134903
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 11 Jul 2011 16:48:36 +0000 (16:48 +0000)]
Simplify printing of ARM shifted immediates.
Print shifted immediate values directly rather than as a payload+shifter
value pair. This makes for more readable output assembly code, simplifies
the instruction printer, and is consistent with how Thumb immediates are
displayed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134902
91177308-0d34-0410-b5e6-
96231b3b80d8
Garrison Venn [Mon, 11 Jul 2011 16:31:53 +0000 (16:31 +0000)]
Modified demo to work with non const Type parameters as is required by new
type system. However most of these modifications were due to IRBuilder
(IRBuilderBase), not having been modified to NOT return such const qualified
free types. If IRBuilder does not change, as can also be seen in its
instruction creation methods, to use const free types, it may be useful to have
ExceptionDemo drop IRBuilder usage. Modifying builder.getInt32Ty() to
llvm::Type::getInt32Ty(builder.getContext()) is pretty ugly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134901
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 11 Jul 2011 16:21:52 +0000 (16:21 +0000)]
test/CodeGen/PowerPC/vector.ll: Tweak redirection >%t >%t to >%t >>%t. See also r134814 (test/CodeGen/X86/vector.ll).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134900
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Mon, 11 Jul 2011 09:56:20 +0000 (09:56 +0000)]
De-constify Types in StructType::get() and TargetData::getIntPtrType().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134893
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Mon, 11 Jul 2011 08:35:17 +0000 (08:35 +0000)]
Add a missing test for r134882.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134889
91177308-0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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