oota-llvm.git
14 years agotestcase that goes with r116053
Chris Lattner [Fri, 8 Oct 2010 05:12:30 +0000 (05:12 +0000)]
testcase that goes with r116053

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

14 years agofix a subtle bug I introduced in my refactoring, where we stopped preferring
Chris Lattner [Fri, 8 Oct 2010 05:12:14 +0000 (05:12 +0000)]
fix a subtle bug I introduced in my refactoring, where we stopped preferring
the i8 versions of instructions in some cases.  In test6, we started
generating:

cmpq $0, -8(%rsp)            ## encoding: [0x48,0x81,0x7c,0x24,0xf8,0x00,0x00,0x00,0x00]
                                        ## <MCInst #478 CMP64mi32
                                        ##  <MCOperand Reg:114>
                                        ##  <MCOperand Imm:1>
                                        ##  <MCOperand Reg:0>
                                        ##  <MCOperand Imm:-8>
                                        ##  <MCOperand Reg:0>
                                        ##  <MCOperand Imm:0>>

instead of:

cmpq $0, -8(%rsp)            ## encoding: [0x48,0x83,0x7c,0x24,0xf8,0x00]
                                        ## <MCInst #479 CMP64mi8
                                        ##  <MCOperand Reg:114>
                                        ##  <MCOperand Imm:1>
                                        ##  <MCOperand Reg:0>
                                        ##  <MCOperand Imm:-8>
                                        ##  <MCOperand Reg:0>
                                        ##  <MCOperand Imm:0>>

Fix this and add some comments.

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

14 years agorename test
Chris Lattner [Fri, 8 Oct 2010 05:05:06 +0000 (05:05 +0000)]
rename test

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

14 years agomerge tests
Chris Lattner [Fri, 8 Oct 2010 05:04:58 +0000 (05:04 +0000)]
merge tests

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

14 years agofilecheckize.
Chris Lattner [Fri, 8 Oct 2010 05:02:29 +0000 (05:02 +0000)]
filecheckize.

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

14 years agoreapply: Use the new TB_NOT_REVERSABLE flag instead of special
Chris Lattner [Fri, 8 Oct 2010 03:57:25 +0000 (03:57 +0000)]
reapply: Use the new TB_NOT_REVERSABLE flag instead of special
reapply: reimplement the second half of the or/add optimization.  We should now

with no changes.  Turns out that one missing "Defs = [EFLAGS]" can upset things
a bit.

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

14 years agoreapply the patch reverted in r116033:
Chris Lattner [Fri, 8 Oct 2010 03:54:52 +0000 (03:54 +0000)]
reapply the patch reverted in r116033:
"Reimplement (part of) the or -> add optimization.  Matching 'or' into 'add'"

With a critical fix: the add pseudos clobber EFLAGS.

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

14 years agoFix Formatting.
Michael J. Spencer [Fri, 8 Oct 2010 03:17:21 +0000 (03:17 +0000)]
Fix Formatting.

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

14 years agoMC-COFF: Fix Simple and Complex type. Fixes PR8320.
Michael J. Spencer [Fri, 8 Oct 2010 03:17:11 +0000 (03:17 +0000)]
MC-COFF: Fix Simple and Complex type. Fixes PR8320.

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

14 years agoFix Whitespace.
Michael J. Spencer [Fri, 8 Oct 2010 03:16:56 +0000 (03:16 +0000)]
Fix Whitespace.

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

14 years agoUpdate CMake.
Daniel Dunbar [Fri, 8 Oct 2010 02:30:03 +0000 (02:30 +0000)]
Update CMake.

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

14 years agoRevert "Reimplement (part of) the or -> add optimization. Matching 'or' into
Daniel Dunbar [Fri, 8 Oct 2010 02:07:32 +0000 (02:07 +0000)]
Revert "Reimplement (part of) the or -> add optimization.  Matching 'or' into
'add'", which seems to have broken just about everything.

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

14 years agoRevert "Use the new TB_NOT_REVERSABLE flag instead of special ", which depends
Daniel Dunbar [Fri, 8 Oct 2010 02:07:29 +0000 (02:07 +0000)]
Revert "Use the new TB_NOT_REVERSABLE flag instead of special ", which depends
on r116007, which I am about to revert.

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

14 years agoRevert "reimplement the second half of the or/add optimization. We should now",
Daniel Dunbar [Fri, 8 Oct 2010 02:07:26 +0000 (02:07 +0000)]
Revert "reimplement the second half of the or/add optimization.  We should now",
which depends on r116007, which I am about to revert.

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

14 years agoFix -Asserts warning.
Daniel Dunbar [Fri, 8 Oct 2010 02:07:22 +0000 (02:07 +0000)]
Fix -Asserts warning.

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

14 years agoMove to thumb2 loads, fixes a problem with incoming registers
Eric Christopher [Fri, 8 Oct 2010 01:13:17 +0000 (01:13 +0000)]
Move to thumb2 loads, fixes a problem with incoming registers
as thumb1.

Fixes lencod.

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

14 years agoreimplement the second half of the or/add optimization. We should now
Chris Lattner [Fri, 8 Oct 2010 01:05:10 +0000 (01:05 +0000)]
reimplement the second half of the or/add optimization.  We should now
only end up emitting LEA instead of OR.  If we aren't able to promote
something into an LEA, we should never be emitting it as an ADD.

Add some testcases that we emit "or" in cases where we used to produce
an "add".

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

14 years agoAdd test file for simple ARM binary encodings with MC
Jim Grosbach [Fri, 8 Oct 2010 00:47:59 +0000 (00:47 +0000)]
Add test file for simple ARM binary encodings with MC

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

14 years agoEnable binary encoding of some simple instructions.
Jim Grosbach [Fri, 8 Oct 2010 00:39:21 +0000 (00:39 +0000)]
Enable binary encoding of some simple instructions.

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

14 years agoTry to fix ocaml bindings.
Eric Christopher [Fri, 8 Oct 2010 00:36:21 +0000 (00:36 +0000)]
Try to fix ocaml bindings.

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

14 years agoMake <target>CodeEmitter::getBinaryCodeForInstr() a const method.
Jim Grosbach [Fri, 8 Oct 2010 00:21:28 +0000 (00:21 +0000)]
Make <target>CodeEmitter::getBinaryCodeForInstr() a const method.

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

14 years agoUse the new TB_NOT_REVERSABLE flag instead of special
Chris Lattner [Fri, 8 Oct 2010 00:03:02 +0000 (00:03 +0000)]
Use the new TB_NOT_REVERSABLE flag instead of special
casing FsMOVAPDrr/FsMOVAPSrr.

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

14 years agoMC-COFF: Add test for my last commit.
Michael J. Spencer [Fri, 8 Oct 2010 00:00:28 +0000 (00:00 +0000)]
MC-COFF: Add test for my last commit.

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

14 years agosimplify some map operations.
Chris Lattner [Thu, 7 Oct 2010 23:57:02 +0000 (23:57 +0000)]
simplify some map operations.

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

14 years agoMC-COFF: Handle relaxation in COFF better. Fixes PR8321.
Michael J. Spencer [Thu, 7 Oct 2010 23:55:40 +0000 (23:55 +0000)]
MC-COFF: Handle relaxation in COFF better. Fixes PR8321.

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

14 years agoDelete the FormulaSorter class and inline its one method into its
Dan Gohman [Thu, 7 Oct 2010 23:52:18 +0000 (23:52 +0000)]
Delete the FormulaSorter class and inline its one method into its
one user. This code will be restructured soon and FormulaSorter
is getting in the way.

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

14 years agoFix a spello.
Dan Gohman [Thu, 7 Oct 2010 23:43:09 +0000 (23:43 +0000)]
Fix a spello.

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

14 years agoCharge a formula for explicit multiplies on scaled registers too,
Dan Gohman [Thu, 7 Oct 2010 23:41:58 +0000 (23:41 +0000)]
Charge a formula for explicit multiplies on scaled registers too,
not just base registers.

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

14 years agoUse size_t for consistency.
Dan Gohman [Thu, 7 Oct 2010 23:37:58 +0000 (23:37 +0000)]
Use size_t for consistency.

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

14 years agoWhen merging one use into another, transfer the offsets from
Dan Gohman [Thu, 7 Oct 2010 23:36:45 +0000 (23:36 +0000)]
When merging one use into another, transfer the offsets from
the old use to the new one.

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

14 years agoReimplement (part of) the or -> add optimization. Matching 'or' into 'add'
Chris Lattner [Thu, 7 Oct 2010 23:36:18 +0000 (23:36 +0000)]
Reimplement (part of) the or -> add optimization.  Matching 'or' into 'add'
is general goodness because it allows ORs to be converted to LEA to avoid
inserting copies.  However, this is bad because it makes the generated .s
file less obvious and gives valgrind heartburn (tons of false positives in
bitfield code).

While the general fix should be in valgrind, we can at least try to avoid
emitting ADD instructions that *don't* get promoted to LEA.  This is more
work because it requires introducing pseudo instructions to represents
"add that knows the bits are disjoint", but hey, people really love valgrind.

This fixes this testcase:
https://bugs.kde.org/show_bug.cgi?id=242137#c20

the add r/i cases are coming next.

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

14 years agoAfter splitting, the remaining LiveInterval may be fragmented into multiple
Jakob Stoklund Olesen [Thu, 7 Oct 2010 23:34:34 +0000 (23:34 +0000)]
After splitting, the remaining LiveInterval may be fragmented into multiple
connected components. These components should be allocated different virtual
registers because there is no reason for them to be allocated together.

Add the ConnectedVNInfoEqClasses class to calculate the connected components,
and move values to new LiveIntervals.

Use it from SplitKit::rewrite by creating new virtual registers for the
components.

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

14 years agoFix LSR to keep the RegUseTracker up to date when combining users.
Dan Gohman [Thu, 7 Oct 2010 23:33:43 +0000 (23:33 +0000)]
Fix LSR to keep the RegUseTracker up to date when combining users.
This doesn't usually matter, because the other heuristics usually
succeed regardless, but it's good to keep the register use
bookkeeping consistent.

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

14 years agoRemove LoopIndexSplit pass. It is neither maintained nor used by anyone.
Devang Patel [Thu, 7 Oct 2010 23:29:37 +0000 (23:29 +0000)]
Remove LoopIndexSplit pass. It is neither maintained nor used by anyone.

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

14 years agoUnbreak cmake build.
John Thompson [Thu, 7 Oct 2010 23:12:15 +0000 (23:12 +0000)]
Unbreak cmake build.

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

14 years agoCode refactoring.
Evan Cheng [Thu, 7 Oct 2010 23:12:15 +0000 (23:12 +0000)]
Code refactoring.

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

14 years agoReduce casting in various tables by defining the table
Chris Lattner [Thu, 7 Oct 2010 23:08:41 +0000 (23:08 +0000)]
Reduce casting in various tables by defining the table
with the right types.

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

14 years agoWarn about broken GCCs on ARM due to the problem fixed:
Nick Lewycky [Thu, 7 Oct 2010 22:30:47 +0000 (22:30 +0000)]
Warn about broken GCCs on ARM due to the problem fixed:
http://gcc.gnu.org/ml/gcc-patches/2010-09/msg01070.html

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

14 years agosimplify code: don't build up vector only to assert it is empty.
Chris Lattner [Thu, 7 Oct 2010 22:26:19 +0000 (22:26 +0000)]
simplify code: don't build up vector only to assert it is empty.

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

14 years agoNow with fewer extraneous semicolons!
Owen Anderson [Thu, 7 Oct 2010 22:25:06 +0000 (22:25 +0000)]
Now with fewer extraneous semicolons!

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

14 years agoMove checking for t2MOVCCi16 to the right place.
Jim Grosbach [Thu, 7 Oct 2010 22:14:01 +0000 (22:14 +0000)]
Move checking for t2MOVCCi16 to the right place.

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

14 years agoTrivial MC code emitter shell. No instruction forms actually handled yet.
Jim Grosbach [Thu, 7 Oct 2010 22:12:50 +0000 (22:12 +0000)]
Trivial MC code emitter shell. No instruction forms actually handled yet.

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

14 years agoCorrectly check if a path is a directory. Fix by Brian Korver.
Evan Cheng [Thu, 7 Oct 2010 22:05:57 +0000 (22:05 +0000)]
Correctly check if a path is a directory. Fix by Brian Korver.

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

14 years agoProvie a clearner interface so that FE can decide whether a function has prototype...
Devang Patel [Thu, 7 Oct 2010 22:03:01 +0000 (22:03 +0000)]
Provie a clearner interface so that FE can decide whether a function has prototype or not.

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

14 years agoInclude the auto-generated bits for machine encoding.
Jim Grosbach [Thu, 7 Oct 2010 21:57:55 +0000 (21:57 +0000)]
Include the auto-generated bits for machine encoding.

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

14 years agoFix typo in comment.
Nick Lewycky [Thu, 7 Oct 2010 21:55:16 +0000 (21:55 +0000)]
Fix typo in comment.

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

14 years agoRemember to promote load/store types for stack to register size.
Eric Christopher [Thu, 7 Oct 2010 21:40:18 +0000 (21:40 +0000)]
Remember to promote load/store types for stack to register size.

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

14 years agoconvert test to use the existing classes that the multipatterns
Chris Lattner [Thu, 7 Oct 2010 21:31:03 +0000 (21:31 +0000)]
convert test to use the existing classes that the multipatterns
use.  Since TEST is completely different than all other binops,
don't define a multipattern for it.

This completes factorization of binops.

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

14 years agoconvert cmp to use a multipattern
Chris Lattner [Thu, 7 Oct 2010 20:56:25 +0000 (20:56 +0000)]
convert cmp to use a multipattern

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

14 years agoCanonicalize X86ISD::MOVDDUP nodes to v2f64 to make sure all cases match. Also elimin...
Evan Cheng [Thu, 7 Oct 2010 20:50:20 +0000 (20:50 +0000)]
Canonicalize X86ISD::MOVDDUP nodes to v2f64 to make sure all cases match. Also eliminate unneeded isel patterns. rdar://8520311

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

14 years agoThis file needs ToolOutputFile.h too.
Dan Gohman [Thu, 7 Oct 2010 20:48:46 +0000 (20:48 +0000)]
This file needs ToolOutputFile.h too.

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

14 years agoARM instruction don't have instruction prefixes, so remove the helper functions
Jim Grosbach [Thu, 7 Oct 2010 20:41:30 +0000 (20:41 +0000)]
ARM instruction don't have instruction prefixes, so remove the helper functions
for them from the MCCodeEmitter.

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

14 years agoAdd output stream operator for MCInst.
Jim Grosbach [Thu, 7 Oct 2010 20:38:37 +0000 (20:38 +0000)]
Add output stream operator for MCInst.

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

14 years agoMove tool_output_file into its own file.
Dan Gohman [Thu, 7 Oct 2010 20:32:40 +0000 (20:32 +0000)]
Move tool_output_file into its own file.

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

14 years agoAdd initialization routines for Instrumentation.
Owen Anderson [Thu, 7 Oct 2010 20:17:24 +0000 (20:17 +0000)]
Add initialization routines for Instrumentation.

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

14 years agoreduce redundancy between pattern copies.
Chris Lattner [Thu, 7 Oct 2010 20:14:23 +0000 (20:14 +0000)]
reduce redundancy between pattern copies.

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

14 years agothe opcode for BinOpMI/BinOpMI8 is always the same, remove the argument.
Chris Lattner [Thu, 7 Oct 2010 20:06:24 +0000 (20:06 +0000)]
the opcode for BinOpMI/BinOpMI8 is always the same, remove the argument.

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

14 years agoImprove comment.
Owen Anderson [Thu, 7 Oct 2010 20:05:18 +0000 (20:05 +0000)]
Improve comment.

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

14 years agoAdd initialization routines to InstCombine.
Owen Anderson [Thu, 7 Oct 2010 20:04:55 +0000 (20:04 +0000)]
Add initialization routines to InstCombine.

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

14 years agoconvert adc/sbb to a multipattern. Because the adde/sube nodes
Chris Lattner [Thu, 7 Oct 2010 20:01:55 +0000 (20:01 +0000)]
convert adc/sbb to a multipattern.  Because the adde/sube nodes
are not defined as returning EFLAGS (like add_flag and friends),
the entire multipattern and several of the subclasses need to be
cloned.

This could be handled through better instantiation support in tblgen,
but it isn't meta enough.

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

14 years agoAdd initialization routines for VMCore.
Owen Anderson [Thu, 7 Oct 2010 19:51:21 +0000 (19:51 +0000)]
Add initialization routines for VMCore.

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

14 years agoFix Whitespace.
Michael J. Spencer [Thu, 7 Oct 2010 18:51:10 +0000 (18:51 +0000)]
Fix Whitespace.

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

14 years agoFix warnings on Windows.
Michael J. Spencer [Thu, 7 Oct 2010 18:50:57 +0000 (18:50 +0000)]
Fix warnings on Windows.

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

14 years agoAdd initialization routines for Target.
Owen Anderson [Thu, 7 Oct 2010 18:50:11 +0000 (18:50 +0000)]
Add initialization routines for Target.

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

14 years agoFix obvious mistake pointed out by Michael Spencer.
Jakob Stoklund Olesen [Thu, 7 Oct 2010 18:47:10 +0000 (18:47 +0000)]
Fix obvious mistake pointed out by Michael Spencer.

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

14 years agoPrint more loop info.
Jakob Stoklund Olesen [Thu, 7 Oct 2010 18:47:07 +0000 (18:47 +0000)]
Print more loop info.

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

14 years agoPrint out MBB number when rewriting.
Jakob Stoklund Olesen [Thu, 7 Oct 2010 18:47:05 +0000 (18:47 +0000)]
Print out MBB number when rewriting.

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

14 years agoAdd initialization routines for CodeGen.
Owen Anderson [Thu, 7 Oct 2010 18:41:20 +0000 (18:41 +0000)]
Add initialization routines for CodeGen.

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

14 years agoAdd an implementation of the initialization routine for IPA.
Owen Anderson [Thu, 7 Oct 2010 18:31:27 +0000 (18:31 +0000)]
Add an implementation of the initialization routine for IPA.

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

14 years agoAdd initialization routines for Analysis and IPA.
Owen Anderson [Thu, 7 Oct 2010 18:31:00 +0000 (18:31 +0000)]
Add initialization routines for Analysis and IPA.

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

14 years agogtest: Fix warnings on MinGW.
Michael J. Spencer [Thu, 7 Oct 2010 18:29:44 +0000 (18:29 +0000)]
gtest: Fix warnings on MinGW.

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

14 years agoCMake: Fix warning in gtest.
Michael J. Spencer [Thu, 7 Oct 2010 18:12:54 +0000 (18:12 +0000)]
CMake: Fix warning in gtest.

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

14 years agoAdd an initialization routine for libLLVMipo.a
Owen Anderson [Thu, 7 Oct 2010 18:09:59 +0000 (18:09 +0000)]
Add an initialization routine for libLLVMipo.a

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

14 years agoAdd a header that I forgot to commit.
Owen Anderson [Thu, 7 Oct 2010 18:05:11 +0000 (18:05 +0000)]
Add a header that I forgot to commit.

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

14 years agoCache interval iterators in SplitEditor::addTruncSimpleRange so we only have to
Jakob Stoklund Olesen [Thu, 7 Oct 2010 17:56:39 +0000 (17:56 +0000)]
Cache interval iterators in SplitEditor::addTruncSimpleRange so we only have to
do one find().

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

14 years agoClean up debug printing.
Jakob Stoklund Olesen [Thu, 7 Oct 2010 17:56:35 +0000 (17:56 +0000)]
Clean up debug printing.

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

14 years agoNext step on the getting-rid-of-static-ctors train: begin adding per-library
Owen Anderson [Thu, 7 Oct 2010 17:55:47 +0000 (17:55 +0000)]
Next step on the getting-rid-of-static-ctors train: begin adding per-library
initialization functions that initialize the set of passes implemented in
that library.  Add C bindings for these functions as well.

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

14 years agoFix a warning when building with clang++.
Owen Anderson [Thu, 7 Oct 2010 17:04:18 +0000 (17:04 +0000)]
Fix a warning when building with clang++.

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

14 years agotrailing whitespace
Jim Grosbach [Thu, 7 Oct 2010 16:56:28 +0000 (16:56 +0000)]
trailing whitespace

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

14 years agoAdd the missing cases to the type->registerclass conversion function.
Kalle Raiskila [Thu, 7 Oct 2010 16:32:42 +0000 (16:32 +0000)]
Add the missing cases to the type->registerclass conversion function.

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

14 years agoImplement two virtual functions in SPUTargetLowering.
Kalle Raiskila [Thu, 7 Oct 2010 16:24:35 +0000 (16:24 +0000)]
Implement two virtual functions in SPUTargetLowering.

Before the implementation of isLegalAddressingMode, some rare cases
of code were miscompiled if optimized with the LoopStrengthReduce pass.
It is unclear (to me) if LSR is "allowed" to produce wrong code with a
bad TargetLowering, or if the bug is elsewhere and this patch just
hides it.

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

14 years agoMinor cosmetic change: fix DOSish \r\n.
NAKAMURA Takumi [Thu, 7 Oct 2010 07:21:04 +0000 (07:21 +0000)]
Minor cosmetic change: fix DOSish \r\n.

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

14 years agoMC-COFF: Fix symbol aliases. Fixes PR8251.
Michael J. Spencer [Thu, 7 Oct 2010 06:29:33 +0000 (06:29 +0000)]
MC-COFF: Fix symbol aliases. Fixes PR8251.

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

14 years agotest: Fix binary stdin issues with coff-dump on Windows.
Michael J. Spencer [Thu, 7 Oct 2010 06:29:21 +0000 (06:29 +0000)]
test: Fix binary stdin issues with coff-dump on Windows.

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

14 years agoUse the correct register class for load instructions - fixes
Eric Christopher [Thu, 7 Oct 2010 05:50:44 +0000 (05:50 +0000)]
Use the correct register class for load instructions - fixes
compilation of MultiSource/Benchmarks/Bullet.

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

14 years agoUse the correct register class here.
Eric Christopher [Thu, 7 Oct 2010 05:39:19 +0000 (05:39 +0000)]
Use the correct register class here.

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

14 years agoUse the thumb2 conditional move instruction.
Eric Christopher [Thu, 7 Oct 2010 05:31:49 +0000 (05:31 +0000)]
Use the thumb2 conditional move instruction.

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

14 years agoRemove in-progress assertion, add TODO.
Eric Christopher [Thu, 7 Oct 2010 05:14:08 +0000 (05:14 +0000)]
Remove in-progress assertion, add TODO.

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

14 years agoAdd the header that I accidentally forgot from r115900.
Owen Anderson [Thu, 7 Oct 2010 04:17:38 +0000 (04:17 +0000)]
Add the header that I accidentally forgot from r115900.

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

14 years agoMove the pass initialization helper functions into the llvm namespace, and add
Owen Anderson [Thu, 7 Oct 2010 04:13:08 +0000 (04:13 +0000)]
Move the pass initialization helper functions into the llvm namespace, and add
a header declaring them all.  This is also where we will declare per-library pass-set
initializer functions down the road.

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

14 years agoModel operand cycles of vldm / vstm; also fixes scheduling itineraries of vldr /...
Evan Cheng [Thu, 7 Oct 2010 01:50:48 +0000 (01:50 +0000)]
Model operand cycles of vldm / vstm; also fixes scheduling itineraries of vldr / vstr, etc.

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

14 years agoadd support for isConvertibleToThreeAddress to ArithBinOpEFLAGS,
Chris Lattner [Thu, 7 Oct 2010 01:37:01 +0000 (01:37 +0000)]
add support for isConvertibleToThreeAddress to ArithBinOpEFLAGS,
allowing us to convert ADD over.  deletes 160 lines of .td file.

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

14 years agoFix a few issues in ArithBinOpEFLAGS that made it specific to and.
Chris Lattner [Thu, 7 Oct 2010 01:26:27 +0000 (01:26 +0000)]
Fix a few issues in ArithBinOpEFLAGS that made it specific to and.

Start using ArithBinOpEFLAGS for OR, XOR, and SUB.

This removes 500 lines from the .td file.  Now AND/OR/XOR/SUB are all
defined exactly the same way instead of being close relatives.

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

14 years agoConvert 'and' to single instance of a multipattern
Chris Lattner [Thu, 7 Oct 2010 01:10:20 +0000 (01:10 +0000)]
Convert 'and' to single instance of a multipattern
which instantiates the 34 versions of and all in one
swoop.  The BaseOpc/BaseOpc2/BaseOpc4 stuff should not
be required, but tblgen's feeble brain explodes when I
use Or4<BaseOpc>.V in the multipattern.

No change in the generated .inc files.

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

14 years agoAllow use of the 16-bit literal move instruction in CMOVs for Thumb2 mode.
Jim Grosbach [Thu, 7 Oct 2010 00:53:56 +0000 (00:53 +0000)]
Allow use of the 16-bit literal move instruction in CMOVs for Thumb2 mode.

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

14 years agoadd a new BinOpAI class to represent the immediate form that directly acts on EAX.
Chris Lattner [Thu, 7 Oct 2010 00:43:39 +0000 (00:43 +0000)]
add a new BinOpAI class to represent the immediate form that directly acts on EAX.
This does change the generated .inc files to include the implicit use/def of eax.
Since these instructions are only generated by the assembler and disassembler it
doesn't actually matter though.

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

14 years agoAllow use of the 16-bit literal move instruction in CMOVs for ARM mode.
Jim Grosbach [Thu, 7 Oct 2010 00:42:42 +0000 (00:42 +0000)]
Allow use of the 16-bit literal move instruction in CMOVs for ARM mode.

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

14 years agoadd a bunch of classes for other common patterns.
Chris Lattner [Thu, 7 Oct 2010 00:35:28 +0000 (00:35 +0000)]
add a bunch of classes for other common patterns.
As usual, no change in generated .inc files.

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

14 years agoSince the Hello pass is built as a loadable dynamic library, don't try to convert...
Owen Anderson [Thu, 7 Oct 2010 00:31:16 +0000 (00:31 +0000)]
Since the Hello pass is built as a loadable dynamic library, don't try to convert it to new-style registration yet.

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

14 years agoDefine a new BinOpRI8 class and use it to define the imm8 versions of and.
Chris Lattner [Thu, 7 Oct 2010 00:12:45 +0000 (00:12 +0000)]
Define a new BinOpRI8 class and use it to define the imm8 versions of and.

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