oota-llvm.git
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

14 years agofix PR6414, a nondeterminism issue in IPSCCP which was because
Chris Lattner [Sat, 27 Feb 2010 00:07:42 +0000 (00:07 +0000)]
fix PR6414, a nondeterminism issue in IPSCCP which was because
of a subtle interation in a loop operating in densemap order.

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

14 years agoFix rdar://7694996 a miscompile of 183.equake from my patch yesterday,
Chris Lattner [Fri, 26 Feb 2010 23:42:13 +0000 (23:42 +0000)]
Fix rdar://7694996 a miscompile of 183.equake from my patch yesterday,
confusing the old MAT variable with the new GlobalType one.  This caused
us to promote the @disp global pointer into:

@disp.body = internal global double*** undef

instead of:

@disp.body = internal global [3 x double**] undef

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

14 years agoremove dead code, by this point all uses of CI are gone.
Chris Lattner [Fri, 26 Feb 2010 23:35:25 +0000 (23:35 +0000)]
remove dead code, by this point all uses of CI are gone.

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

14 years agoTest that docs are updating.
Jeffrey Yasskin [Fri, 26 Feb 2010 22:25:06 +0000 (22:25 +0000)]
Test that docs are updating.

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

14 years agoMake APFloat's string-parsing routines a bit safer against very large exponents.
John McCall [Fri, 26 Feb 2010 22:20:41 +0000 (22:20 +0000)]
Make APFloat's string-parsing routines a bit safer against very large exponents.

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

14 years agoA much cleaner (and less code!) way of inserting the correct amount of padding
Bill Wendling [Fri, 26 Feb 2010 22:17:52 +0000 (22:17 +0000)]
A much cleaner (and less code!) way of inserting the correct amount of padding
for alignment into the LSDA. If the TType base offset is emitted, then put the
padding there. Otherwise, put it in the call site table length. There will be no
conflict between the two sites when placing the padding in one place.

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

14 years agoAdded the follwoing 32-bit Thumb instructions for disassembly only:
Johnny Chen [Fri, 26 Feb 2010 22:04:29 +0000 (22:04 +0000)]
Added the follwoing 32-bit Thumb instructions for disassembly only:

o Parallel addition and subtraction, signed/unsigned
o Miscellaneous operations: QADD, QDADD, QSUB, QDSUB
o Unsigned sum of absolute differences [and accumulate]: USAD8, USADA8
o Signed/Unsigned saturate: SSAT, SSAT16, USAT, USAT16
o Signed multiply accumulate long (halfwords): SMLAL<x><y>
o Signed multiply accumulate/subtract [long] (dual): SMLAD[x], SMLALD[X], SMLSD[X], SMLSLD[X]
o Signed dual multiply add/subtract [long]: SMUAD[X], SMUSD[X]

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

14 years agoMerge PPC instructions FMRS and FMRD into a single FMR instruction.
Jakob Stoklund Olesen [Fri, 26 Feb 2010 21:53:24 +0000 (21:53 +0000)]
Merge PPC instructions FMRS and FMRD into a single FMR instruction.

This is possible because F8RC is a subclass of F4RC. We keep FMRSD around so
fextend has a pattern.

Also allow folding of memory operands on FMRSD.

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

14 years agoFix grammaro in a comment.
Dan Gohman [Fri, 26 Feb 2010 21:45:37 +0000 (21:45 +0000)]
Fix grammaro in a comment.

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

14 years agoUse the right svn:keywords value.
Dan Gohman [Fri, 26 Feb 2010 21:39:02 +0000 (21:39 +0000)]
Use the right svn:keywords value.

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

14 years agoAdd Revision keywords to these files, as it's common for them to be
Dan Gohman [Fri, 26 Feb 2010 21:38:04 +0000 (21:38 +0000)]
Add Revision keywords to these files, as it's common for them to be
copied out of the source tree.

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

14 years agoComment typo.
Bill Wendling [Fri, 26 Feb 2010 21:31:01 +0000 (21:31 +0000)]
Comment typo.

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

14 years agodon't build edis if the x86 target isn't enabld.
Chris Lattner [Fri, 26 Feb 2010 21:26:33 +0000 (21:26 +0000)]
don't build edis if the x86 target isn't enabld.

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

14 years agoImprove the vim code for highlighting trailing whitespace and lines
Dan Gohman [Fri, 26 Feb 2010 21:24:46 +0000 (21:24 +0000)]
Improve the vim code for highlighting trailing whitespace and lines
longer than 80 columns. This replaces the heavy-handed "textwidth"
mechanism, and makes the trailing-whitespace highlighting lazy so
that it isn't constantly jumping on the user during typing.

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

14 years agoTest autoupdate.
Tanya Lattner [Fri, 26 Feb 2010 21:23:59 +0000 (21:23 +0000)]
Test autoupdate.

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

14 years agoTest auto update.
Tanya Lattner [Fri, 26 Feb 2010 21:19:09 +0000 (21:19 +0000)]
Test auto update.

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

14 years agoAdd the alignstack keyword.
Dan Gohman [Fri, 26 Feb 2010 21:16:17 +0000 (21:16 +0000)]
Add the alignstack keyword.

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

14 years agoRemove bogus Updated line.
Dan Gohman [Fri, 26 Feb 2010 21:15:49 +0000 (21:15 +0000)]
Remove bogus Updated line.

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

14 years agoUse the right floating point load/store instructions in PPCInstrInfo::foldMemoryOpera...
Jakob Stoklund Olesen [Fri, 26 Feb 2010 21:09:24 +0000 (21:09 +0000)]
Use the right floating point load/store instructions in PPCInstrInfo::foldMemoryOperandImpl().

The PowerPC floating point registers can represent both f32 and f64 via the
two register classes F4RC and F8RC. F8RC is considered a subclass of F4RC to
allow cross-class coalescing. This coalescing only affects whether registers
are spilled as f32 or f64.

Spill slots must be accessed with load/store instructions corresponding to the
class of the spilled register. PPCInstrInfo::foldMemoryOperandImpl was looking
at the instruction opcode which is wrong.

X86 has similar floating point register classes, but doesn't try to fold
memory operands, so there is no problem there.

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

14 years agoRemove dead code
Jakob Stoklund Olesen [Fri, 26 Feb 2010 21:09:20 +0000 (21:09 +0000)]
Remove dead code

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

14 years agoRemove REQUIRES_EH from the suggested set of make variables, since users can
Jeffrey Yasskin [Fri, 26 Feb 2010 20:43:33 +0000 (20:43 +0000)]
Remove REQUIRES_EH from the suggested set of make variables, since users can
build with exceptions even if LLVM is built without.

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

14 years agoReplace a temporary std::string with SmallString.
Benjamin Kramer [Fri, 26 Feb 2010 20:28:29 +0000 (20:28 +0000)]
Replace a temporary std::string with SmallString.

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

14 years agoFix typos in comments.
Dan Gohman [Fri, 26 Feb 2010 20:18:32 +0000 (20:18 +0000)]
Fix typos in comments.

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

14 years agoDelete empty directories.
Dan Gohman [Fri, 26 Feb 2010 20:16:58 +0000 (20:16 +0000)]
Delete empty directories.

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

14 years agoMove dbg_value generation to target-independent FastISel,
Dale Johannesen [Fri, 26 Feb 2010 20:01:55 +0000 (20:01 +0000)]
Move dbg_value generation to target-independent FastISel,
as X86 is currently the only FastISel target.  Per review.

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

14 years agoFurther constify MDNode* references.
Dale Johannesen [Fri, 26 Feb 2010 19:39:56 +0000 (19:39 +0000)]
Further constify MDNode* references.

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

14 years agoAdd type printing for Metadata pseudo.
Dale Johannesen [Fri, 26 Feb 2010 19:38:59 +0000 (19:38 +0000)]
Add type printing for Metadata pseudo.

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

14 years agoMove the EnableFullLoadPRE flag from a separate command-line option to an
Bob Wilson [Fri, 26 Feb 2010 19:09:47 +0000 (19:09 +0000)]
Move the EnableFullLoadPRE flag from a separate command-line option to an
argument of createGVNPass and set it automatically for -O3.

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

14 years agodisable-mem2reg and disable-gvn options should not be used by the driver.
Sanjiv Gupta [Fri, 26 Feb 2010 18:38:44 +0000 (18:38 +0000)]
disable-mem2reg and disable-gvn options should not be used by the driver.

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

14 years agoRemove unused "NoPRE" parameter in GVN and createGVNPass().
Bob Wilson [Fri, 26 Feb 2010 18:35:19 +0000 (18:35 +0000)]
Remove unused "NoPRE" parameter in GVN and createGVNPass().

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

14 years agopass in more section kinds, enough to get the .align 0x90
Chris Lattner [Fri, 26 Feb 2010 18:32:26 +0000 (18:32 +0000)]
pass in more section kinds, enough to get the .align 0x90
stuff to emit optimal nops in the right places.

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

14 years agoThe cloner has nothing to do if any of the main or ISR entrypoints are not
Sanjiv Gupta [Fri, 26 Feb 2010 18:32:18 +0000 (18:32 +0000)]
The cloner has nothing to do if any of the main or ISR entrypoints are not
present in the module.

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

14 years agofix PR6435 another bug from the MallocInst elimination work.
Chris Lattner [Fri, 26 Feb 2010 18:23:13 +0000 (18:23 +0000)]
fix PR6435 another bug from the MallocInst elimination work.

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

14 years agoSet svn:keywords property on docs/Packaging.html.
Jeffrey Yasskin [Fri, 26 Feb 2010 18:07:00 +0000 (18:07 +0000)]
Set svn:keywords property on docs/Packaging.html.

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

14 years agoAdd to the packaging advice.
Jeffrey Yasskin [Fri, 26 Feb 2010 18:03:43 +0000 (18:03 +0000)]
Add to the packaging advice.

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

14 years agoReapply things reverted back in 97220, with the fixed test case.
Sanjiv Gupta [Fri, 26 Feb 2010 17:59:28 +0000 (17:59 +0000)]
Reapply things reverted back in 97220, with the fixed test case.

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

14 years agomovl is a cheaper way to materialize 0 without clobbering EFLAGS than movabsq.
Dan Gohman [Fri, 26 Feb 2010 16:49:27 +0000 (16:49 +0000)]
movl is a cheaper way to materialize 0 without clobbering EFLAGS than movabsq.

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

14 years agoFix XCoreTargetLowering::isLegalAddressingMode() to handle VoidTy.
Richard Osborne [Fri, 26 Feb 2010 16:44:51 +0000 (16:44 +0000)]
Fix XCoreTargetLowering::isLegalAddressingMode() to handle VoidTy.
Previously LoopStrengthReduce would sometimes be unable to find
a legal formula, causing an assertion failure.

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

14 years agoRevert r97211 and r97213 to get the build green again.
Chandler Carruth [Fri, 26 Feb 2010 08:43:09 +0000 (08:43 +0000)]
Revert r97211 and r97213 to get the build green again.

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

14 years agoadd some helpful comments to the emitter
Chris Lattner [Fri, 26 Feb 2010 08:15:02 +0000 (08:15 +0000)]
add some helpful comments to the emitter

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

14 years agoswitch from my nice hashtable based merging solution to a
Chris Lattner [Fri, 26 Feb 2010 08:08:41 +0000 (08:08 +0000)]
switch from my nice hashtable based merging solution to a
gross little neighbor merging implementation.  This one has
the benefit of not violating the ordering of patterns, so it
generates code that passes tests again.

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

14 years agofix same bug in CheckChainCompatibleMatcher::isEqualImpl
Chris Lattner [Fri, 26 Feb 2010 08:06:02 +0000 (08:06 +0000)]
fix same bug in CheckChainCompatibleMatcher::isEqualImpl

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

14 years agofix a nasty bug in CheckTypeMatcher::isEqualImpl
Chris Lattner [Fri, 26 Feb 2010 08:05:36 +0000 (08:05 +0000)]
fix a nasty bug in CheckTypeMatcher::isEqualImpl

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

14 years agofinish off the factoring optimization along the lines of the
Chris Lattner [Fri, 26 Feb 2010 07:36:37 +0000 (07:36 +0000)]
finish off the factoring optimization along the lines of the
current design.  This generates a matcher that successfully
runs, but it turns out that the factoring we're doing violates
the ordering of patterns, so we end up matching (e.g.) movups
where we want movaps.  This won't due, but I'll address this in
a follow on patch.  It's nice to not be on by default yet! :)

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

14 years agoadd a new setNumChildren method for resizing scopes. Tweak getHash() so
Chris Lattner [Fri, 26 Feb 2010 07:35:27 +0000 (07:35 +0000)]
add a new setNumChildren method for resizing scopes.  Tweak getHash() so
that we never return a tombstone value, which (thankfully) triggers an
assert in densemap.

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

14 years agoCurrently in LLVM, names of libcalls are assigned during TargetLowering
Sanjiv Gupta [Fri, 26 Feb 2010 07:31:15 +0000 (07:31 +0000)]
Currently in LLVM, names of libcalls are assigned during TargetLowering
object construction. There is no provision to change them when the
code for a function generated.
So we have to change these names while printing assembly.

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

14 years agofix the matcher in the presence of multiple scopes: we need to save
Chris Lattner [Fri, 26 Feb 2010 07:28:20 +0000 (07:28 +0000)]
fix the matcher in the presence of multiple scopes: we need to save
and restore the entire matcher stack by value.  This is because children
we're testing could do moveparent or other things besides just
scribbling on additions to the stack.

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