oota-llvm.git
14 years agostop using generated sdnodexforms.
Chris Lattner [Mon, 1 Mar 2010 19:38:53 +0000 (19:38 +0000)]
stop using generated sdnodexforms.

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

14 years agonote that andersaa was removed in 2.7
Chris Lattner [Mon, 1 Mar 2010 19:29:17 +0000 (19:29 +0000)]
note that andersaa was removed in 2.7

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

14 years agoremove anders-aa from mainline, it isn't maintained and is
Chris Lattner [Mon, 1 Mar 2010 19:24:17 +0000 (19:24 +0000)]
remove anders-aa from mainline, it isn't maintained and is
tantalyzing enough that people keep trying to use it.

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

14 years agoAdded STRHT for disassembly only and fixed a bug in AI3sthpo class where the W
Johnny Chen [Mon, 1 Mar 2010 19:22:00 +0000 (19:22 +0000)]
Added STRHT for disassembly only and fixed a bug in AI3sthpo class where the W
bit should be set to 0 instead of 1.

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

14 years agoRemove this test because it checks wheter optimizer handled @llvm.dbg.global_variable...
Devang Patel [Mon, 1 Mar 2010 19:14:25 +0000 (19:14 +0000)]
Remove this test because it checks wheter optimizer handled @llvm.dbg.global_variable appropriately or not. LLVM does not use this scheme to encode debug info for global variables any more.

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

14 years agoRemove test to check bugfix in handing debug info for global variables using intrinsi...
Devang Patel [Mon, 1 Mar 2010 19:09:55 +0000 (19:09 +0000)]
Remove test to check bugfix in handing debug info for global variables using intrinsics. Now, debug info for global variable is encoded using metadata. The old code path is now history and there is no need to have a test to check a bug fix in old code path.

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

14 years agoTurn on the new isel by default. Here are some fun numbers
Chris Lattner [Mon, 1 Mar 2010 19:05:25 +0000 (19:05 +0000)]
Turn on the new isel by default.  Here are some fun numbers
with a release-asserts build on x86-64-darwin10:

LLC Size:
Old: 15,426,852
New: 12,759,140  (down 2.7M)

LLI Size:
Old: 9,926,876
New: 8,864,292   (down 1.1M)

X86ISelDAGToDAG.o size:
Old: 1,401,232
New:   162,868   (down 1.3M)

Time to build X86ISelDAGToDAG.o:
Old: 67.147u 2.060s 1:09.78
New:  4.234u 0.387s 0:04.77

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

14 years agoRemove dead test.
Devang Patel [Mon, 1 Mar 2010 19:04:23 +0000 (19:04 +0000)]
Remove dead test.

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

14 years agoReplace test case that uses @llvm.dbg.* intrinsic with a test that uses metadata.
Devang Patel [Mon, 1 Mar 2010 19:02:51 +0000 (19:02 +0000)]
Replace test case that uses @llvm.dbg.* intrinsic with a test that uses metadata.

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

14 years agoMissed a \n in previous commit.
Torok Edwin [Mon, 1 Mar 2010 19:00:55 +0000 (19:00 +0000)]
Missed a \n in previous commit.

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

14 years agoAdd command-line flag to tblgen to turn off generating comments for the new
Torok Edwin [Mon, 1 Mar 2010 18:49:10 +0000 (18:49 +0000)]
Add command-line flag to tblgen to turn off generating comments for the new
isel (defaults it to generate comments).
This reduces the size of the generated source file.

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

14 years agoAccelerate isel dispatch for tables that start with a top-level
Chris Lattner [Mon, 1 Mar 2010 18:47:11 +0000 (18:47 +0000)]
Accelerate isel dispatch for tables that start with a top-level
OPC_SwitchOpcode to use a table lookup instead of having to go
through the interpreter for this.

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

14 years agoThese two tests check whether oprimizer safely ignores @llvm.dbg.stoppoint intrinsic...
Devang Patel [Mon, 1 Mar 2010 18:45:28 +0000 (18:45 +0000)]
These two tests check whether oprimizer safely ignores @llvm.dbg.stoppoint intrinsic or not. This intrinsic is not used anymore.

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

14 years agoDon't potentially read past the end of the fill data when making a NaN from
John McCall [Mon, 1 Mar 2010 18:38:45 +0000 (18:38 +0000)]
Don't potentially read past the end of the fill data when making a NaN from
an APInt.

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

14 years agoThis test checks whether LICM ignores @llvm.dbg.stoppoint intrinsics appropriately...
Devang Patel [Mon, 1 Mar 2010 18:32:27 +0000 (18:32 +0000)]
This test checks whether LICM ignores @llvm.dbg.stoppoint intrinsics appropriately or not. Now, llvm does not use this intrinsic. Remove this test.

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

14 years agoRewrite test to test VLA using new debug info encoding scheme.
Devang Patel [Mon, 1 Mar 2010 18:30:58 +0000 (18:30 +0000)]
Rewrite test to test VLA using new debug info encoding scheme.

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

14 years agoRemove this generic debug info intrinsic test. LLVM does not use this llvm.dbg.stoppo...
Devang Patel [Mon, 1 Mar 2010 18:30:08 +0000 (18:30 +0000)]
Remove this generic debug info intrinsic test. LLVM does not use this llvm.dbg.stoppoint intrinsic anymore. There are tests to check new implementation, which attaches location information directly with an instruction using metadata.

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

14 years agoFix optimization of ISD::TRUNCATE on vector operands. Based on a patch
Dan Gohman [Mon, 1 Mar 2010 17:59:21 +0000 (17:59 +0000)]
Fix optimization of ISD::TRUNCATE on vector operands. Based on a patch
by Micah Villmow for PR6335.

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

14 years agoAdd explicit keywords.
Dan Gohman [Mon, 1 Mar 2010 17:56:46 +0000 (17:56 +0000)]
Add explicit keywords.

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

14 years agoAdd a comment.
Dan Gohman [Mon, 1 Mar 2010 17:56:04 +0000 (17:56 +0000)]
Add a comment.

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

14 years agoAdd some debug output to LoopSimplify.
Dan Gohman [Mon, 1 Mar 2010 17:55:27 +0000 (17:55 +0000)]
Add some debug output to LoopSimplify.

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

14 years agoAdd the alignstack keyword.
Dan Gohman [Mon, 1 Mar 2010 17:53:39 +0000 (17:53 +0000)]
Add the alignstack keyword.

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

14 years agoLLVM instruction syntax doesn't have trailing semicolons.
Dan Gohman [Mon, 1 Mar 2010 17:53:15 +0000 (17:53 +0000)]
LLVM instruction syntax doesn't have trailing semicolons.

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

14 years agosvn:ignore fixes.
Dan Gohman [Mon, 1 Mar 2010 17:52:16 +0000 (17:52 +0000)]
svn:ignore fixes.

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

14 years agoSpelling fixes.
Dan Gohman [Mon, 1 Mar 2010 17:51:02 +0000 (17:51 +0000)]
Spelling fixes.

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

14 years agoSpelling fixes.
Dan Gohman [Mon, 1 Mar 2010 17:49:51 +0000 (17:49 +0000)]
Spelling fixes.

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

14 years agoWhitespace cleanups.
Dan Gohman [Mon, 1 Mar 2010 17:47:21 +0000 (17:47 +0000)]
Whitespace cleanups.

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

14 years agoUse Doxygen comment syntax.
Dan Gohman [Mon, 1 Mar 2010 17:45:15 +0000 (17:45 +0000)]
Use Doxygen comment syntax.

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

14 years agoThis is now done.
Dan Gohman [Mon, 1 Mar 2010 17:43:57 +0000 (17:43 +0000)]
This is now done.

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

14 years agoFix a missing newline in debug output.
Dan Gohman [Mon, 1 Mar 2010 17:42:55 +0000 (17:42 +0000)]
Fix a missing newline in debug output.

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

14 years agoPrune #includes.
Dan Gohman [Mon, 1 Mar 2010 17:42:17 +0000 (17:42 +0000)]
Prune #includes.

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

14 years agoFix spelling.
Dan Gohman [Mon, 1 Mar 2010 17:41:39 +0000 (17:41 +0000)]
Fix spelling.

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

14 years agoDon't print "Modified" for passes which haven't modified anything.
Dan Gohman [Mon, 1 Mar 2010 17:34:28 +0000 (17:34 +0000)]
Don't print "Modified" for passes which haven't modified anything.

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

14 years agoAdd JIT support to the TODO list (test commit)
Nathan Keynes [Mon, 1 Mar 2010 10:40:41 +0000 (10:40 +0000)]
Add JIT support to the TODO list (test commit)

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

14 years agoEmit type checks late instead of early, this encourages
Chris Lattner [Mon, 1 Mar 2010 07:54:59 +0000 (07:54 +0000)]
Emit type checks late instead of early, this encourages
structural matching code to be factored and shared this
shrinks the X86 isel table from 86537 to 83890 bytes.

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

14 years agosome trivial microoptimizations.
Chris Lattner [Mon, 1 Mar 2010 07:43:08 +0000 (07:43 +0000)]
some trivial microoptimizations.

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

14 years agoEmit a redundant check for immediates at root context, e.g. (imm 0).
Chris Lattner [Mon, 1 Mar 2010 07:27:07 +0000 (07:27 +0000)]
Emit a redundant check for immediates at root context, e.g. (imm 0).
This allows formation of OpcodeSwitch for top level patterns, in
particular on X86.  This saves about 1K of data space in the x86
table and makes the dispatch much more efficient.

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

14 years agoeliminate the CheckMultiOpcodeMatcher code and have each
Chris Lattner [Mon, 1 Mar 2010 07:17:40 +0000 (07:17 +0000)]
eliminate the CheckMultiOpcodeMatcher code and have each
ComplexPattern at the root be generated multiple times, once
for each opcode they are part of.  This encourages factoring
because the opcode checks get treated just like everything
else in the matcher.

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

14 years agoadd a new OPC_SwitchOpcode which is semantically equivalent
Chris Lattner [Mon, 1 Mar 2010 06:59:22 +0000 (06:59 +0000)]
add a new OPC_SwitchOpcode which is semantically equivalent
to a scope where every child starts with a CheckOpcode, but
executes more efficiently.  Enhance DAGISelMatcherOpt to
form it.

This also fixes a bug in CheckOpcode: apparently the SDNodeInfo
objects are not pointer comparable, we have to compare the
enum name.

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

14 years agopull MarkFlagResult out from between an EmitNode/CompleteMatch
Chris Lattner [Mon, 1 Mar 2010 02:33:14 +0000 (02:33 +0000)]
pull MarkFlagResult out from between an EmitNode/CompleteMatch
pair.  This encourages MorphNodeTo formation, this gets us 200
more MorphNodeTo's on X86 and shrinks the table a bit.

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

14 years agoenhance RecordNode and RecordChild comments to indicate what
Chris Lattner [Mon, 1 Mar 2010 02:24:17 +0000 (02:24 +0000)]
enhance RecordNode and RecordChild comments to indicate what
slot they're recording into, no functionality change.

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

14 years agoEmit redundant opcode checks for andimm and orimm tests at root
Chris Lattner [Mon, 1 Mar 2010 02:15:34 +0000 (02:15 +0000)]
Emit redundant opcode checks for andimm and orimm tests at root
so that we get grouping at the top level.

Add an optimization to reorder type check & record nodes
after opcode checks.  We prefer to expose tree shape
matching which improves grouping and will enhance the next
optimization.

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

14 years agoinline the node transforms and node predicates into the generated
Chris Lattner [Mon, 1 Mar 2010 01:54:19 +0000 (01:54 +0000)]
inline the node transforms and node predicates into the generated
dispatcher method.  This eliminates the dependence of the new isel's
generated code on the old isel's predicates, however some random
hand written isel code still uses them.

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

14 years agosimplify some code now that chain/flag results are not stored in
Chris Lattner [Sun, 28 Feb 2010 23:00:47 +0000 (23:00 +0000)]
simplify some code now that chain/flag results are not stored in
the vtlist for emitnode.

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

14 years agodon't emit useless functions. These were producing
Chris Lattner [Sun, 28 Feb 2010 22:57:03 +0000 (22:57 +0000)]
don't emit useless functions.  These were producing
warnings in release-assert builds if there were no cases.

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

14 years ago80-col violations/trailing whitespace.
Mikhail Glushenkov [Sun, 28 Feb 2010 22:54:30 +0000 (22:54 +0000)]
80-col violations/trailing whitespace.

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

14 years agoeliminate GetInt1/2
Chris Lattner [Sun, 28 Feb 2010 22:38:43 +0000 (22:38 +0000)]
eliminate GetInt1/2

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

14 years agohoist the new isel interpreter out of DAGISelHeader.h
Chris Lattner [Sun, 28 Feb 2010 22:37:22 +0000 (22:37 +0000)]
hoist the new isel interpreter out of DAGISelHeader.h
(which gets #included into the middle of each
target's DAGISel class) into a .cpp file where it is
only compiled once.

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

14 years agochange a few opcodes to use VBRs instead of embedding
Chris Lattner [Sun, 28 Feb 2010 22:14:32 +0000 (22:14 +0000)]
change a few opcodes to use VBRs instead of embedding
immediate sizes into the opcode.

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

14 years agomove all the opcodes out of DAGISelHeader.h (which gets
Chris Lattner [Sun, 28 Feb 2010 21:58:42 +0000 (21:58 +0000)]
move all the opcodes out of DAGISelHeader.h (which gets
#included into the middle of each isel class) into a real
header.

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

14 years agoresolve a fixme by using hte new flag.
Chris Lattner [Sun, 28 Feb 2010 21:56:16 +0000 (21:56 +0000)]
resolve a fixme by using hte new flag.

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

14 years agoenhance the EmitNode/MorphNodeTo operands to take a bit that
Chris Lattner [Sun, 28 Feb 2010 21:53:42 +0000 (21:53 +0000)]
enhance the EmitNode/MorphNodeTo operands to take a bit that
specifies whether there is an output flag or not.  Use this
instead of redundantly encoding the chain/flag results in the
output vtlist.

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

14 years agoenhance the new isel to handle the 'node already exists'
Chris Lattner [Sun, 28 Feb 2010 21:36:14 +0000 (21:36 +0000)]
enhance the new isel to handle the 'node already exists'
case of MorphNodeTo directly.

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

14 years agouse MorphNodeTo instead of SelectNodeTo. SelectNodeTo
Chris Lattner [Sun, 28 Feb 2010 20:55:18 +0000 (20:55 +0000)]
use MorphNodeTo instead of SelectNodeTo.  SelectNodeTo
is just a silly wrapper around MorphNodeTo.

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

14 years agoenhance the new isel to use SelectNodeTo for most patterns,
Chris Lattner [Sun, 28 Feb 2010 20:49:53 +0000 (20:49 +0000)]
enhance the new isel to use SelectNodeTo for most patterns,
even some the old isel didn't.  There are several parts of
this that make me feel dirty, but it's no worse than the
old isel.  I'll clean up the parts I can do without ripping
out the old one next.

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

14 years agoAdd support getting the operands of a User to ocaml.
Erick Tryzelaar [Sun, 28 Feb 2010 20:45:03 +0000 (20:45 +0000)]
Add support getting the operands of a User to ocaml.

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

14 years agoAdd support for global aliases to ocaml.
Erick Tryzelaar [Sun, 28 Feb 2010 20:44:58 +0000 (20:44 +0000)]
Add support for global aliases to ocaml.

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

14 years agoAdd support for inserting inline asm to ocaml.
Erick Tryzelaar [Sun, 28 Feb 2010 20:44:53 +0000 (20:44 +0000)]
Add support for inserting inline asm to ocaml.

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

14 years agoadd some random nounwinds.
Chris Lattner [Sun, 28 Feb 2010 20:36:49 +0000 (20:36 +0000)]
add some random nounwinds.

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

14 years agoI'm removing andersaa after the branch is made.
Chris Lattner [Sun, 28 Feb 2010 18:57:59 +0000 (18:57 +0000)]
I'm removing andersaa after the branch is made.

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

14 years agosimplify this code, return only ever has zero or one operands.
Chris Lattner [Sun, 28 Feb 2010 18:53:13 +0000 (18:53 +0000)]
simplify this code, return only ever has zero or one operands.

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

14 years agoProperly clear all the extra bits in a significand when making a NaN from an
John McCall [Sun, 28 Feb 2010 12:49:50 +0000 (12:49 +0000)]
Properly clear all the extra bits in a significand when making a NaN from an
APInt.  Be certain to set the integer bit in an x87 extended-precision
significand so that we don't accidentally make a pseudo-NaN.

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

14 years agoAdd an override to StringRef::getAsInteger which parses into an APInt.
John McCall [Sun, 28 Feb 2010 09:55:58 +0000 (09:55 +0000)]
Add an override to StringRef::getAsInteger which parses into an APInt.
It gets its own implementation totally divorced from the (presumably
performance-sensitive) routines which parse into a uint64_t.

Add APInt::operator|=(uint64_t), which is situationally much better than
using a full APInt.

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

14 years agoAdd support for getting a null pointer.
Erick Tryzelaar [Sun, 28 Feb 2010 09:46:27 +0000 (09:46 +0000)]
Add support for getting a null pointer.

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

14 years agoAdd a way to look up a type by it's name in a module.
Erick Tryzelaar [Sun, 28 Feb 2010 09:46:21 +0000 (09:46 +0000)]
Add a way to look up a type by it's name in a module.

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

14 years agoAdd replace_all_uses_with to ocaml.
Erick Tryzelaar [Sun, 28 Feb 2010 09:46:16 +0000 (09:46 +0000)]
Add replace_all_uses_with to ocaml.

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

14 years agoAdd support for global variables in an address space for llvm-c and ocaml.
Erick Tryzelaar [Sun, 28 Feb 2010 09:46:13 +0000 (09:46 +0000)]
Add support for global variables in an address space for llvm-c and ocaml.

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

14 years agoAdd indirect br support to llvm-c and ocaml.
Erick Tryzelaar [Sun, 28 Feb 2010 09:46:06 +0000 (09:46 +0000)]
Add indirect br support to llvm-c and ocaml.

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

14 years agoAdd metadata functions to llvm-c and ocaml.
Erick Tryzelaar [Sun, 28 Feb 2010 09:45:59 +0000 (09:45 +0000)]
Add metadata functions to llvm-c and ocaml.

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

14 years agoremove redundant instruction.
Chris Lattner [Sun, 28 Feb 2010 07:23:21 +0000 (07:23 +0000)]
remove redundant instruction.

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

14 years agoAdd the new builder arthmetic instructions to llvm-c and ocaml.
Erick Tryzelaar [Sun, 28 Feb 2010 05:51:43 +0000 (05:51 +0000)]
Add the new builder arthmetic instructions to llvm-c and ocaml.

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

14 years agoAdd the new union arthmetic instructions to llvm-c and ocaml.
Erick Tryzelaar [Sun, 28 Feb 2010 05:51:33 +0000 (05:51 +0000)]
Add the new union arthmetic instructions to llvm-c and ocaml.

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

14 years agoAdd generic binary op and cast builder functions.
Erick Tryzelaar [Sun, 28 Feb 2010 05:51:27 +0000 (05:51 +0000)]
Add generic binary op and cast builder functions.

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

14 years agoRename ocaml vmcore tests to make it easier to insert tests.
Erick Tryzelaar [Sun, 28 Feb 2010 05:51:21 +0000 (05:51 +0000)]
Rename ocaml vmcore tests to make it easier to insert tests.

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

14 years agoFix incorrect uses of an ocaml llbuilder without extracting it from ocaml.
Erick Tryzelaar [Sun, 28 Feb 2010 05:51:16 +0000 (05:51 +0000)]
Fix incorrect uses of an ocaml llbuilder without extracting it from ocaml.

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

14 years agoRemove malloc and free from the ocaml bindings.
Erick Tryzelaar [Sun, 28 Feb 2010 05:51:09 +0000 (05:51 +0000)]
Remove malloc and free from the ocaml bindings.

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

14 years agoRevert r97245 which seems to be causing performance problems.
Bob Wilson [Sun, 28 Feb 2010 05:34:05 +0000 (05:34 +0000)]
Revert r97245 which seems to be causing performance problems.

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

14 years agoTeach APFloat how to create both QNaNs and SNaNs and with arbitrary-width
John McCall [Sun, 28 Feb 2010 02:51:25 +0000 (02:51 +0000)]
Teach APFloat how to create both QNaNs and SNaNs and with arbitrary-width
payloads.  APFloat's internal folding routines always make QNaNs now,
instead of sometimes making QNaNs and sometimes SNaNs depending on the
type.

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

14 years agoenhance EmitNodeMatcher to keep track of the recorded slot numbers
Chris Lattner [Sun, 28 Feb 2010 02:41:25 +0000 (02:41 +0000)]
enhance EmitNodeMatcher to keep track of the recorded slot numbers
it will populate.

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

14 years agoadd infrastructure to support forming selectnodeto. Not used yet
Chris Lattner [Sun, 28 Feb 2010 02:31:26 +0000 (02:31 +0000)]
add infrastructure to support forming selectnodeto.  Not used yet
because I have to go on another detour first.

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

14 years agoDon't try to replace physical registers when doing CSE.
Dan Gohman [Sun, 28 Feb 2010 01:33:43 +0000 (01:33 +0000)]
Don't try to replace physical registers when doing CSE.

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

14 years agoAdd a flag to addPassesToEmit* to disable the Verifier pass run
Dan Gohman [Sun, 28 Feb 2010 00:41:59 +0000 (00:41 +0000)]
Add a flag to addPassesToEmit* to disable the Verifier pass run
after LSR, so that clients can opt in.

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

14 years agoGeneralize my hack to use SDNodeInfo to find out when a
Chris Lattner [Sun, 28 Feb 2010 00:22:30 +0000 (00:22 +0000)]
Generalize my hack to use SDNodeInfo to find out when a
node is always guaranteed to have a particular type
instead of hacking in ISD::STORE explicitly.  This allows
us to use implied types for a broad range of nodes, even
target specific ones.

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

14 years agoImplement XMM subregs.
Dan Gohman [Sun, 28 Feb 2010 00:17:42 +0000 (00:17 +0000)]
Implement XMM subregs.

Extracting the low element of a vector is now done with EXTRACT_SUBREG,
and the zero-extension performed by load movss is now modeled with
SUBREG_TO_REG, and so on.

Register-to-register movss and movsd are no longer considered copies;
they are two-address instructions which insert a scalar into a vector.

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

14 years agoDon't unconditionally suppress hoisting of instructions with implicit
Dan Gohman [Sun, 28 Feb 2010 00:08:44 +0000 (00:08 +0000)]
Don't unconditionally suppress hoisting of instructions with implicit
defs or uses. The regular def and use checking below covers them, and
can be more precise. It's safe to hoist an instruction with a dead
implicit def if the register isn't live into the loop header.

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

14 years agoAdd nounwinds.
Dan Gohman [Sat, 27 Feb 2010 23:53:53 +0000 (23:53 +0000)]
Add nounwinds.

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

14 years agoThe mayHaveSideEffects flag is no longer used.
Dan Gohman [Sat, 27 Feb 2010 23:47:46 +0000 (23:47 +0000)]
The mayHaveSideEffects flag is no longer used.

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

14 years agochange CheckOpcodeMatcher to hold the SDNodeInfo instead of
Chris Lattner [Sat, 27 Feb 2010 21:48:43 +0000 (21:48 +0000)]
change CheckOpcodeMatcher to hold the SDNodeInfo instead of
the opcode name.  This gives the optimizer more semantic info.

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

14 years agoremove a bogus pattern, which had the same pattern as STDU
Chris Lattner [Sat, 27 Feb 2010 21:15:32 +0000 (21:15 +0000)]
remove a bogus pattern, which had the same pattern as STDU
but codegen'd differently.  This really wanted to use some
sort of subreg to get the low 4 bytes of the G8RC register
or something.  However, it's invalid and nothing is testing
it, so I'm just zapping the bogosity.

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

14 years agoadd another case from the ppc backend. This is obviously a huge and
Chris Lattner [Sat, 27 Feb 2010 08:19:47 +0000 (08:19 +0000)]
add another case from the ppc backend.  This is obviously a huge and
dissatisfying hack.  TODO: Improve it. :)

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

14 years agofix an incorrect (overly conservative) predicate.
Chris Lattner [Sat, 27 Feb 2010 08:18:55 +0000 (08:18 +0000)]
fix an incorrect (overly conservative) predicate.

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

14 years agofix logic in DEBUG.
Chris Lattner [Sat, 27 Feb 2010 08:13:23 +0000 (08:13 +0000)]
fix logic in DEBUG.

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

14 years agoteach the optimizer that opcode == ISD::STORE is contradictory
Chris Lattner [Sat, 27 Feb 2010 08:11:15 +0000 (08:11 +0000)]
teach the optimizer that opcode == ISD::STORE  is contradictory
with getType() == MVT::i32 etc.  Teach it that two different
integer constants are contradictory.  This cuts 1K off the X86
table, down to 98k

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

14 years agofix grammaro's pointed out by daniel
Chris Lattner [Sat, 27 Feb 2010 07:50:40 +0000 (07:50 +0000)]
fix grammaro's pointed out by daniel

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

14 years agoTeach the grouper some simple tricks about looking contradictory
Chris Lattner [Sat, 27 Feb 2010 07:49:13 +0000 (07:49 +0000)]
Teach the grouper some simple tricks about looking contradictory
predicates.  For example if we have:

Scope:
  CheckType i32
    ABC
  CheckType f32
    DEF
  CheckType i32
    GHI

Then we know that we can transform this into:
Scope:
  CheckType i32
    Scope
      ABC
      GHI
  CheckType f32
    DEF

This reorders the check for the 'GHI' predicate above
the check for the 'DEF' predidate.  However it is safe to do this
in this situation because we know that a node cannot have both an
i32 and f32 type.

We're now doing more factoring that the old isel did.

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

14 years agoRe-apply 97040 with fix. This survives a ppc self-host llvm-gcc bootstrap.
Evan Cheng [Sat, 27 Feb 2010 07:36:59 +0000 (07:36 +0000)]
Re-apply 97040 with fix. This survives a ppc self-host llvm-gcc bootstrap.

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

14 years agouse DEBUG instead of DebugFlag directly so that this
Chris Lattner [Sat, 27 Feb 2010 06:51:44 +0000 (06:51 +0000)]
use DEBUG instead of DebugFlag directly so that this
respects -debug-only=something-else.

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

14 years agoimplement a new optimization to sink pattern predicates (like isSSE1)
Chris Lattner [Sat, 27 Feb 2010 06:22:57 +0000 (06:22 +0000)]
implement a new optimization to sink pattern predicates (like isSSE1)
as deeply into the pattern as we can get away with.  In pratice, this
means "all the way to to the emitter code, but not across
ComplexPatterns".  This substantially increases the amount of factoring
we get.

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

14 years agoThe TType is always absptr on Mach-O...at least for now.
Bill Wendling [Sat, 27 Feb 2010 01:05:51 +0000 (01:05 +0000)]
The TType is always absptr on Mach-O...at least for now.

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

14 years agoFix the ocaml bindings for the bitcode reader.
Jeffrey Yasskin [Sat, 27 Feb 2010 00:25:18 +0000 (00:25 +0000)]
Fix the ocaml bindings for the bitcode reader.
llvm_get_module_provider() was returning a value of the wrong type.

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