Chris Lattner
17b56423d9
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.
llvm-svn: 97432
2010-03-01 02:15:34 +00:00
Chris Lattner
ac55b2ddbc
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.
llvm-svn: 97431
2010-03-01 01:54:19 +00:00
Chris Lattner
44432b5fd6
simplify some code now that chain/flag results are not stored in
...
the vtlist for emitnode.
llvm-svn: 97429
2010-02-28 23:00:47 +00:00
Chris Lattner
3501066119
don't emit useless functions. These were producing
...
warnings in release-assert builds if there were no cases.
llvm-svn: 97428
2010-02-28 22:57:03 +00:00
Mikhail Glushenkov
47b3719d4b
80-col violations/trailing whitespace.
...
llvm-svn: 97427
2010-02-28 22:54:30 +00:00
Chris Lattner
4408939f12
eliminate GetInt1/2
...
llvm-svn: 97426
2010-02-28 22:38:43 +00:00
Chris Lattner
afa7d2eacc
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.
llvm-svn: 97425
2010-02-28 22:37:22 +00:00
Chris Lattner
d49712e905
change a few opcodes to use VBRs instead of embedding
...
immediate sizes into the opcode.
llvm-svn: 97423
2010-02-28 22:14:32 +00:00
Chris Lattner
34440d39ab
move all the opcodes out of DAGISelHeader.h (which gets
...
#included into the middle of each isel class) into a real
header.
llvm-svn: 97421
2010-02-28 21:58:42 +00:00
Chris Lattner
f571d51b6a
resolve a fixme by using hte new flag.
...
llvm-svn: 97420
2010-02-28 21:56:16 +00:00
Chris Lattner
6f5b656bbf
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.
llvm-svn: 97419
2010-02-28 21:53:42 +00:00
Chris Lattner
61a0c6674e
enhance the new isel to handle the 'node already exists'
...
case of MorphNodeTo directly.
llvm-svn: 97417
2010-02-28 21:36:14 +00:00
Chris Lattner
2cda94eb86
use MorphNodeTo instead of SelectNodeTo. SelectNodeTo
...
is just a silly wrapper around MorphNodeTo.
llvm-svn: 97416
2010-02-28 20:55:18 +00:00
Chris Lattner
9599b6a5e9
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.
llvm-svn: 97415
2010-02-28 20:49:53 +00:00
Erick Tryzelaar
264323d31e
Add support getting the operands of a User to ocaml.
...
llvm-svn: 97414
2010-02-28 20:45:03 +00:00
Erick Tryzelaar
ff1a75de6d
Add support for global aliases to ocaml.
...
llvm-svn: 97413
2010-02-28 20:44:58 +00:00
Erick Tryzelaar
c0bff2bbc9
Add support for inserting inline asm to ocaml.
...
llvm-svn: 97412
2010-02-28 20:44:53 +00:00
Chris Lattner
74db1864da
add some random nounwinds.
...
llvm-svn: 97411
2010-02-28 20:36:49 +00:00
Chris Lattner
bbb7d72497
I'm removing andersaa after the branch is made.
...
llvm-svn: 97409
2010-02-28 18:57:59 +00:00
Chris Lattner
f6124c5583
simplify this code, return only ever has zero or one operands.
...
llvm-svn: 97408
2010-02-28 18:53:13 +00:00
John McCall
f3fa6eb2ad
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.
llvm-svn: 97382
2010-02-28 12:49:50 +00:00
John McCall
b6e6dd63ad
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.
llvm-svn: 97381
2010-02-28 09:55:58 +00:00
Erick Tryzelaar
7d687cbb84
Add support for getting a null pointer.
...
llvm-svn: 97380
2010-02-28 09:46:27 +00:00
Erick Tryzelaar
17cb74d29a
Add a way to look up a type by it's name in a module.
...
llvm-svn: 97379
2010-02-28 09:46:21 +00:00
Erick Tryzelaar
ab9a70c845
Add replace_all_uses_with to ocaml.
...
llvm-svn: 97378
2010-02-28 09:46:16 +00:00
Erick Tryzelaar
c6e78e3503
Add support for global variables in an address space for llvm-c and ocaml.
...
llvm-svn: 97377
2010-02-28 09:46:13 +00:00
Erick Tryzelaar
08d9f8e8fe
Add indirect br support to llvm-c and ocaml.
...
llvm-svn: 97376
2010-02-28 09:46:06 +00:00
Erick Tryzelaar
9401ea01cc
Add metadata functions to llvm-c and ocaml.
...
llvm-svn: 97375
2010-02-28 09:45:59 +00:00
Chris Lattner
a6e6c1681f
remove redundant instruction.
...
llvm-svn: 97374
2010-02-28 07:23:21 +00:00
Erick Tryzelaar
f7bbb83b17
Add the new builder arthmetic instructions to llvm-c and ocaml.
...
llvm-svn: 97372
2010-02-28 05:51:43 +00:00
Erick Tryzelaar
9c6bd15491
Add the new union arthmetic instructions to llvm-c and ocaml.
...
llvm-svn: 97371
2010-02-28 05:51:33 +00:00
Erick Tryzelaar
b405437c48
Add generic binary op and cast builder functions.
...
llvm-svn: 97370
2010-02-28 05:51:27 +00:00
Erick Tryzelaar
6faa3e69cf
Rename ocaml vmcore tests to make it easier to insert tests.
...
llvm-svn: 97369
2010-02-28 05:51:21 +00:00
Erick Tryzelaar
6aacf8ecde
Fix incorrect uses of an ocaml llbuilder without extracting it from ocaml.
...
llvm-svn: 97368
2010-02-28 05:51:16 +00:00
Erick Tryzelaar
5baff36f22
Remove malloc and free from the ocaml bindings.
...
llvm-svn: 97367
2010-02-28 05:51:09 +00:00
Bob Wilson
6d8360b3d8
Revert r97245 which seems to be causing performance problems.
...
llvm-svn: 97366
2010-02-28 05:34:05 +00:00
John McCall
69bc985550
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.
llvm-svn: 97364
2010-02-28 02:51:25 +00:00
Chris Lattner
ecc2545545
enhance EmitNodeMatcher to keep track of the recorded slot numbers
...
it will populate.
llvm-svn: 97363
2010-02-28 02:41:25 +00:00
Chris Lattner
6b967885bc
add infrastructure to support forming selectnodeto. Not used yet
...
because I have to go on another detour first.
llvm-svn: 97362
2010-02-28 02:31:26 +00:00
Dan Gohman
0799a41c48
Don't try to replace physical registers when doing CSE.
...
llvm-svn: 97360
2010-02-28 01:33:43 +00:00
Dan Gohman
4b0dac5a8d
Add a flag to addPassesToEmit* to disable the Verifier pass run
...
after LSR, so that clients can opt in.
llvm-svn: 97357
2010-02-28 00:41:59 +00:00
Chris Lattner
9f3d4dff50
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.
llvm-svn: 97355
2010-02-28 00:22:30 +00:00
Dan Gohman
3177cfd002
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.
llvm-svn: 97354
2010-02-28 00:17:42 +00:00
Dan Gohman
303190c3a2
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.
llvm-svn: 97352
2010-02-28 00:08:44 +00:00
Dan Gohman
3d9622fa97
Add nounwinds.
...
llvm-svn: 97349
2010-02-27 23:53:53 +00:00
Dan Gohman
99c6bcbc13
The mayHaveSideEffects flag is no longer used.
...
llvm-svn: 97348
2010-02-27 23:47:46 +00:00
Chris Lattner
424f0b580d
change CheckOpcodeMatcher to hold the SDNodeInfo instead of
...
the opcode name. This gives the optimizer more semantic info.
llvm-svn: 97346
2010-02-27 21:48:43 +00:00
Chris Lattner
a574e6c6cf
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.
llvm-svn: 97345
2010-02-27 21:15:32 +00:00
Chris Lattner
c204d184a1
add another case from the ppc backend. This is obviously a huge and
...
dissatisfying hack. TODO: Improve it. :)
llvm-svn: 97317
2010-02-27 08:19:47 +00:00
Chris Lattner
d35abb1c89
fix an incorrect (overly conservative) predicate.
...
llvm-svn: 97316
2010-02-27 08:18:55 +00:00