oota-llvm.git
14 years agoBe less stingy as to how many selects and phi nodes we
Duncan Sands [Thu, 7 Jan 2010 05:48:42 +0000 (05:48 +0000)]
Be less stingy as to how many selects and phi nodes we
are prepared to look through.

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

14 years agoMore trivial optimizations to a function well outside the critical path
Douglas Gregor [Thu, 7 Jan 2010 02:24:06 +0000 (02:24 +0000)]
More trivial optimizations to a function well outside the critical path

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

14 years agohandle ConstantVector while I'm in here.
Chris Lattner [Thu, 7 Jan 2010 01:20:20 +0000 (01:20 +0000)]
handle ConstantVector while I'm in here.

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

14 years agofix a globalopt crash on 'bullet' (handling evaluation of a store
Chris Lattner [Thu, 7 Jan 2010 01:16:21 +0000 (01:16 +0000)]
fix a globalopt crash on 'bullet' (handling evaluation of a store
to an element of a vector in a static ctor) which occurs with an
unrelated patch I'm testing.  Annoyingly, EvaluateStoreInto basically
does exactly the same stuff as InsertElement constant folding, but it
now handles vectors, and you can't insertelement into a vector.  It
would be 'really nice' if GEP into a vector were not legal.

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

14 years agoFix a minor regression from my dag combiner changes. One more place which needs to...
Evan Cheng [Thu, 7 Jan 2010 00:54:06 +0000 (00:54 +0000)]
Fix a minor regression from my dag combiner changes. One more place which needs to look pass truncates.

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

14 years agoSwitch StringRef::edit_distance over to using raw pointers, since both
Douglas Gregor [Thu, 7 Jan 2010 00:51:54 +0000 (00:51 +0000)]
Switch StringRef::edit_distance over to using raw pointers, since both
std::vector and llvm::SmallVector have annoying performance
tradeoffs. No, I don't expect this to matter, and now it won't.

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

14 years agoAdd comments.
Jakob Stoklund Olesen [Thu, 7 Jan 2010 00:51:04 +0000 (00:51 +0000)]
Add comments.

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

14 years ago80 column violations
Jim Grosbach [Wed, 6 Jan 2010 23:54:42 +0000 (23:54 +0000)]
80 column violations

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

14 years agoAllow double defs after tail duplication.
Jakob Stoklund Olesen [Wed, 6 Jan 2010 23:52:46 +0000 (23:52 +0000)]
Allow double defs after tail duplication.

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

14 years agoAdd Target hook to duplicate machine instructions.
Jakob Stoklund Olesen [Wed, 6 Jan 2010 23:47:07 +0000 (23:47 +0000)]
Add Target hook to duplicate machine instructions.

Some instructions refer to unique labels, and so cannot be trivially cloned
with CloneMachineInstr.

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

14 years agoAddressing mode 6 (load/store) instructions can't encode an immediate offset
Jim Grosbach [Wed, 6 Jan 2010 23:45:18 +0000 (23:45 +0000)]
Addressing mode 6 (load/store) instructions can't encode an immediate offset
for stack references.

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

14 years agoAnti-dependency breaking needs to be careful regarding instructions with
Jim Grosbach [Wed, 6 Jan 2010 22:21:25 +0000 (22:21 +0000)]
Anti-dependency breaking needs to be careful regarding instructions with
multiple register definitions.

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

14 years agoMove the object size intrinsic optimization to inst-combine and make
Eric Christopher [Wed, 6 Jan 2010 20:04:44 +0000 (20:04 +0000)]
Move the object size intrinsic optimization to inst-combine and make
it work for any integer size return type.

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

14 years agoComment.
Evan Cheng [Wed, 6 Jan 2010 19:43:21 +0000 (19:43 +0000)]
Comment.

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

14 years agoTeach dag combine to fold the following transformation more aggressively:
Evan Cheng [Wed, 6 Jan 2010 19:38:29 +0000 (19:38 +0000)]
Teach dag combine to fold the following transformation more aggressively:
(OP (trunc x), (trunc y)) -> (trunc (OP x, y))

Unfortunately this simple change causes dag combine to infinite looping. The problem is the shrink demanded ops optimization tend to canonicalize expressions in the opposite manner. That is badness. This patch disable those optimizations in dag combine but instead it is done as a late pass in sdisel.

This also exposes some deficiencies in dag combine and x86 setcc / brcond lowering. Teach them to look pass ISD::TRUNCATE in various places.

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

14 years agoFix struct/class mismatch
Douglas Gregor [Wed, 6 Jan 2010 17:16:00 +0000 (17:16 +0000)]
Fix struct/class mismatch

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

14 years agoWhen parsing function-local metadata, create a function-local MDNode
Victor Hernandez [Wed, 6 Jan 2010 17:00:21 +0000 (17:00 +0000)]
When parsing function-local metadata, create a function-local MDNode

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

14 years ago80 column and whitespace cleanup
Jim Grosbach [Wed, 6 Jan 2010 16:48:02 +0000 (16:48 +0000)]
80 column and whitespace cleanup

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

14 years agoFix a README item: have functionattrs look through selects and
Duncan Sands [Wed, 6 Jan 2010 15:37:47 +0000 (15:37 +0000)]
Fix a README item: have functionattrs look through selects and
phi nodes when deciding which pointers point to local memory.
I actually checked long ago how useful this is, and it isn't
very: it hardly ever fires in the testsuite, but since Chris
wants it here it is!

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

14 years agoFormatting.
Mikhail Glushenkov [Wed, 6 Jan 2010 09:20:39 +0000 (09:20 +0000)]
Formatting.

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

14 years agoFixed malformed -*- lines in PBQP headers.
Lang Hames [Wed, 6 Jan 2010 08:53:34 +0000 (08:53 +0000)]
Fixed malformed -*- lines in PBQP headers.

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

14 years agoPartially address a README by having functionattrs consider calls to
Duncan Sands [Wed, 6 Jan 2010 08:45:52 +0000 (08:45 +0000)]
Partially address a README by having functionattrs consider calls to
memcpy, memset and other intrinsics that only access their arguments
to be readnone if the intrinsic's arguments all point to local memory.
This improves the testcase in the README to readonly, but it could in
theory be made readnone, however this would involve more sophisticated
analysis that looks through the memcpy.

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

14 years agoThis is testing a darwin specific feature, so only turn
Duncan Sands [Wed, 6 Jan 2010 05:49:26 +0000 (05:49 +0000)]
This is testing a darwin specific feature, so only turn
it on for darwin (it fails on linux).

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

14 years agotweaks suggested by Duncan
Chris Lattner [Wed, 6 Jan 2010 05:32:15 +0000 (05:32 +0000)]
tweaks suggested by Duncan

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

14 years agoReenable debug info on PPC. Works well enough to
Dale Johannesen [Wed, 6 Jan 2010 02:21:00 +0000 (02:21 +0000)]
Reenable debug info on PPC.  Works well enough to
bootstrap.

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

14 years agoMake sure debug info hook gets called when emitting
Dale Johannesen [Wed, 6 Jan 2010 02:20:18 +0000 (02:20 +0000)]
Make sure debug info hook gets called when emitting
synonyms for PPC.

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

14 years agoTeach instcombine's sext elimination logic to be more aggressive.
Chris Lattner [Wed, 6 Jan 2010 01:56:21 +0000 (01:56 +0000)]
Teach instcombine's sext elimination logic to be more aggressive.
Previously, instcombine would only promote an expression tree to
the larger type if doing so eliminated two casts.  This is because
a need to manually do the sign extend after the promoted expression
tree with two shifts.  Now, we keep track of whether the result of
the computation is going to be properly sign extended already.  If
so, we can unconditionally promote the expression, which allows us
to zap more sext's.

This implements rdar://6598839 (aka gcc pr38751)

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

14 years agoAdd <imp-def> and <imp-kill> operands when replacing virtual sub-register defs and...
Jakob Stoklund Olesen [Wed, 6 Jan 2010 00:29:28 +0000 (00:29 +0000)]
Add <imp-def> and <imp-kill> operands when replacing virtual sub-register defs and kills.

An instruction like this:

  %reg1097:1<def> = VMOVSR %R3<kill>, 14, %reg0

Must be replaced with this when substituting physical registers:

  %S0<def> = VMOVSR %R3<kill>, 14, %reg0, %D0<imp-def>

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

14 years agoThe previous code could potentially cause a cycle. Allow ordering w.r.t. a 0 order.
Bill Wendling [Wed, 6 Jan 2010 00:23:35 +0000 (00:23 +0000)]
The previous code could potentially cause a cycle. Allow ordering w.r.t. a 0 order.

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

14 years agoOnly check the ordering if there is an ordering for each nodes.
Bill Wendling [Wed, 6 Jan 2010 00:09:23 +0000 (00:09 +0000)]
Only check the ordering if there is an ordering for each nodes.

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

14 years agoAdd a semi-primitive form of scheduling via the "SDNode ordering" to the
Bill Wendling [Tue, 5 Jan 2010 23:48:12 +0000 (23:48 +0000)]
Add a semi-primitive form of scheduling via the "SDNode ordering" to the
bottom-up scheduler. We prefer the lower order number.

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

14 years agosimplify this code.
Chris Lattner [Tue, 5 Jan 2010 23:00:30 +0000 (23:00 +0000)]
simplify this code.

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

14 years agoMove this test from test/Transforms/IndVarSimplify to
Dan Gohman [Tue, 5 Jan 2010 22:52:54 +0000 (22:52 +0000)]
Move this test from test/Transforms/IndVarSimplify to
test/CodeGen/X86, as doesn't use -indvars, and it does use
llc -march=x86-64.

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

14 years agoDon't assign the shift the same type as the variable being shifted. This could
Bill Wendling [Tue, 5 Jan 2010 22:39:10 +0000 (22:39 +0000)]
Don't assign the shift the same type as the variable being shifted. This could
result in illegal types for the SHL operator.

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

14 years agoUndo r92785, it caused test failure.
Johnny Chen [Tue, 5 Jan 2010 22:37:28 +0000 (22:37 +0000)]
Undo r92785, it caused test failure.

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

14 years agomake this a static function instead of a method.
Chris Lattner [Tue, 5 Jan 2010 22:30:42 +0000 (22:30 +0000)]
make this a static function instead of a method.

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

14 years agoDon't use the ISD::NodeType enum for SDNode opcodes, as CodeGen
Dan Gohman [Tue, 5 Jan 2010 22:26:32 +0000 (22:26 +0000)]
Don't use the ISD::NodeType enum for SDNode opcodes, as CodeGen
uses several kinds of opcode values which are not declared within
that enum. This fixes PR5946.

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

14 years agoRe-add parsing of function-local metadata; this time with testcase.
Victor Hernandez [Tue, 5 Jan 2010 22:22:14 +0000 (22:22 +0000)]
Re-add parsing of function-local metadata; this time with testcase.

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

14 years agomore rearrangement and cleanup, fix my test failure.
Chris Lattner [Tue, 5 Jan 2010 22:21:18 +0000 (22:21 +0000)]
more rearrangement and cleanup, fix my test failure.

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

14 years agocleanup
Chris Lattner [Tue, 5 Jan 2010 22:07:33 +0000 (22:07 +0000)]
cleanup

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

14 years agoremove two trunc xforms that are subsumed by EvaluateInDifferentType.
Chris Lattner [Tue, 5 Jan 2010 22:01:41 +0000 (22:01 +0000)]
remove two trunc xforms that are subsumed by EvaluateInDifferentType.
The only difference is that EvaluateInDifferentType checks to ensure
they are profitable before doing them :)

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

14 years agomerge some tests.
Chris Lattner [Tue, 5 Jan 2010 21:54:09 +0000 (21:54 +0000)]
merge some tests.

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

14 years agoAdd Rt2 to the asm format string for 32-bit Thumb load/store register dual
Johnny Chen [Tue, 5 Jan 2010 21:51:46 +0000 (21:51 +0000)]
Add Rt2 to the asm format string for 32-bit Thumb load/store register dual
instructions.  Thumb does not have the restriction that t2 = t+1.

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

14 years agomerge cast2 into cast.ll
Chris Lattner [Tue, 5 Jan 2010 21:48:13 +0000 (21:48 +0000)]
merge cast2 into cast.ll

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

14 years agoAllow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}
Devang Patel [Tue, 5 Jan 2010 21:47:32 +0000 (21:47 +0000)]
Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}

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

14 years agoremove useless test.
Chris Lattner [Tue, 5 Jan 2010 21:46:22 +0000 (21:46 +0000)]
remove useless test.

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

14 years agoanother example.
Chris Lattner [Tue, 5 Jan 2010 21:43:08 +0000 (21:43 +0000)]
another example.

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

14 years agoDon't specify CR sub-registers as implicit defs of BL instructions.
Jakob Stoklund Olesen [Tue, 5 Jan 2010 21:38:37 +0000 (21:38 +0000)]
Don't specify CR sub-registers as implicit defs of BL instructions.

It is enough to give the super registers CR0, CR1, ..., and specifying the
sub-registers as well causes confusion in the liveness computations.

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

14 years agoremove a useless negative test, add a rdar # to an xfail that I'm working on.
Chris Lattner [Tue, 5 Jan 2010 21:37:44 +0000 (21:37 +0000)]
remove a useless negative test, add a rdar # to an xfail that I'm working on.

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

14 years agoclean up tests.
Chris Lattner [Tue, 5 Jan 2010 21:32:59 +0000 (21:32 +0000)]
clean up tests.

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

14 years agojust remove this xform which is subsumed by others.
Chris Lattner [Tue, 5 Jan 2010 21:16:30 +0000 (21:16 +0000)]
just remove this xform which is subsumed by others.

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

14 years agoFix comment for CheckDebugInfoIntrinsics
Victor Hernandez [Tue, 5 Jan 2010 21:13:46 +0000 (21:13 +0000)]
Fix comment for CheckDebugInfoIntrinsics

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

14 years agomove a trunc-specific transform out of commonIntCastTransforms into visitTrunc.
Chris Lattner [Tue, 5 Jan 2010 21:11:17 +0000 (21:11 +0000)]
move a trunc-specific transform out of commonIntCastTransforms into visitTrunc.

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

14 years agoRestore dump() methods to Loop and MachineLoop.
Dan Gohman [Tue, 5 Jan 2010 21:08:02 +0000 (21:08 +0000)]
Restore dump() methods to Loop and MachineLoop.

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

14 years agoMove remaining stuff to the isInteger predicate.
Benjamin Kramer [Tue, 5 Jan 2010 21:05:54 +0000 (21:05 +0000)]
Move remaining stuff to the isInteger predicate.

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

14 years agomove a zext specific xform out of commonIntCastTransforms into visitZExt and moderniz...
Chris Lattner [Tue, 5 Jan 2010 21:04:47 +0000 (21:04 +0000)]
move a zext specific xform out of commonIntCastTransforms into visitZExt and modernize it.

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

14 years agoRemove livein checks from machine code verifier.
Jakob Stoklund Olesen [Tue, 5 Jan 2010 20:59:36 +0000 (20:59 +0000)]
Remove livein checks from machine code verifier.

A phi operand that is implicitly defined in a predecessor becomes an undefined
register after phi elimination. This causes a lot of false positives when the
verifier is checking if live-in registers are live-out from all predecessors.

Removing the verifier checks seems like a better solution than insisting on
IMPLICIT_DEF instructions in predecessor blocks.

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

14 years agomove a trunc-specific xform out of commonIntCastTransforms into visitTrunc
Chris Lattner [Tue, 5 Jan 2010 20:57:30 +0000 (20:57 +0000)]
move a trunc-specific xform out of commonIntCastTransforms into visitTrunc

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

14 years agoreduce indentation
Chris Lattner [Tue, 5 Jan 2010 20:56:24 +0000 (20:56 +0000)]
reduce indentation

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

14 years agoRegenerate
Anton Korobeynikov [Tue, 5 Jan 2010 20:45:43 +0000 (20:45 +0000)]
Regenerate

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

14 years agoProper deduce z/System LLVM target from target triple when
Anton Korobeynikov [Tue, 5 Jan 2010 20:45:13 +0000 (20:45 +0000)]
Proper deduce z/System LLVM target from target triple when
--enable-targets=host is specified.

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

14 years agoNamedMDNode is a collection MDNodes.
Devang Patel [Tue, 5 Jan 2010 20:41:31 +0000 (20:41 +0000)]
NamedMDNode is a collection MDNodes.

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

14 years agoConvert a ton of simple integer type equality tests to the new predicate.
Benjamin Kramer [Tue, 5 Jan 2010 20:07:06 +0000 (20:07 +0000)]
Convert a ton of simple integer type equality tests to the new predicate.

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

14 years agoAdd a new predicate for integer type equality tests.
Benjamin Kramer [Tue, 5 Jan 2010 20:04:48 +0000 (20:04 +0000)]
Add a new predicate for integer type equality tests.

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

14 years agoAdd an !eq() operator to TableGen. It operates on strings only.
David Greene [Tue, 5 Jan 2010 19:11:42 +0000 (19:11 +0000)]
Add an !eq() operator to TableGen.  It operates on strings only.
Use !cast<string>() to compare other types of objects.

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

14 years agoAdd an entry on SmallBitVector.
Dan Gohman [Tue, 5 Jan 2010 18:24:00 +0000 (18:24 +0000)]
Add an entry on SmallBitVector.

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

14 years agooptimize comparisons against cttz/ctlz/ctpop, patch by Alastair Lynn!
Chris Lattner [Tue, 5 Jan 2010 18:09:56 +0000 (18:09 +0000)]
optimize comparisons against cttz/ctlz/ctpop, patch by Alastair Lynn!

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

14 years agoDelete useless trailing semicolons.
Dan Gohman [Tue, 5 Jan 2010 17:55:26 +0000 (17:55 +0000)]
Delete useless trailing semicolons.

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

14 years agoNick Lewycky pointed out that this code makes changes unconditionally.
Dan Gohman [Tue, 5 Jan 2010 17:50:58 +0000 (17:50 +0000)]
Nick Lewycky pointed out that this code makes changes unconditionally.

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

14 years agoHave TableGen emit code that uses dbgs() rather than errs().
David Greene [Tue, 5 Jan 2010 17:47:41 +0000 (17:47 +0000)]
Have TableGen emit code that uses dbgs() rather than errs().

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

14 years agoIf a scope has only one instruction then first instruction is also the last instruction.
Devang Patel [Tue, 5 Jan 2010 16:59:17 +0000 (16:59 +0000)]
If a scope has only one instruction then first instruction is also the last instruction.

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

14 years agoSet Changed properly after calling DeleteDeadPHIs.
Dan Gohman [Tue, 5 Jan 2010 16:31:45 +0000 (16:31 +0000)]
Set Changed properly after calling DeleteDeadPHIs.

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

14 years agoUse do+while instead of while for loops which obviously have a
Dan Gohman [Tue, 5 Jan 2010 16:27:25 +0000 (16:27 +0000)]
Use do+while instead of while for loops which obviously have a
non-zero trip count. Use SmallVector's pop_back_val().

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

14 years agoFix indentation.
Dan Gohman [Tue, 5 Jan 2010 16:20:55 +0000 (16:20 +0000)]
Fix indentation.

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

14 years agoMake RecursivelyDeleteTriviallyDeadInstructions,
Dan Gohman [Tue, 5 Jan 2010 15:45:31 +0000 (15:45 +0000)]
Make RecursivelyDeleteTriviallyDeadInstructions,
RecursivelyDeleteDeadPHINode, and DeleteDeadPHIs return a flag
indicating whether they made any changes.

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

14 years agoSome versions of GCC don't like non-static data members in sizeof
Dan Gohman [Tue, 5 Jan 2010 15:28:21 +0000 (15:28 +0000)]
Some versions of GCC don't like non-static data members in sizeof
in this context.

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

14 years agoAdd a SmallBitVector class, which mimics BitVector but uses only
Dan Gohman [Tue, 5 Jan 2010 15:04:49 +0000 (15:04 +0000)]
Add a SmallBitVector class, which mimics BitVector but uses only
a single pointer (PointerIntPair) member. In "small" mode, the
pointer field is reinterpreted as a set of bits. In "large" mode,
the pointer points to a heap-allocated object.

Also, give BitVector empty and swap functions.

And, add some simple unittests for BitVector and SmallBitVector.

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

14 years agoAdd newline at EOF.
Benjamin Kramer [Tue, 5 Jan 2010 13:32:48 +0000 (13:32 +0000)]
Add newline at EOF.

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

14 years agoAvoid going through the LLVMContext for type equality where it's safe to dereference...
Benjamin Kramer [Tue, 5 Jan 2010 13:12:22 +0000 (13:12 +0000)]
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.

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

14 years agoprune some #includes.
Chris Lattner [Tue, 5 Jan 2010 07:54:43 +0000 (07:54 +0000)]
prune some #includes.

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

14 years agosplit and/or/xor out into one overly-large (2000LOC) file. However, I think
Chris Lattner [Tue, 5 Jan 2010 07:50:36 +0000 (07:50 +0000)]
split and/or/xor out into one overly-large (2000LOC) file.  However, I think
it does make sense to keep them together, at least for now.

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

14 years agomissed file with previous commit.
Chris Lattner [Tue, 5 Jan 2010 07:45:02 +0000 (07:45 +0000)]
missed file with previous commit.

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

14 years agosplit instcombine of shifts out to its own file.
Chris Lattner [Tue, 5 Jan 2010 07:44:46 +0000 (07:44 +0000)]
split instcombine of shifts out to its own file.

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

14 years agoeliminate getBitCastOperand and simplify some over-complex inbounds stuff.
Chris Lattner [Tue, 5 Jan 2010 07:42:10 +0000 (07:42 +0000)]
eliminate getBitCastOperand and simplify some over-complex inbounds stuff.

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

14 years agosplit call handling out to InstCombineCalls.cpp
Chris Lattner [Tue, 5 Jan 2010 07:32:13 +0000 (07:32 +0000)]
split call handling out to InstCombineCalls.cpp

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

14 years agooptimize cttz and ctlz when we can prove something about the
Chris Lattner [Tue, 5 Jan 2010 07:23:56 +0000 (07:23 +0000)]
optimize cttz and ctlz when we can prove something about the
leading/trailing bits.  Patch by Alastair Lynn!

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

14 years agothis inline function moved to addsub
Chris Lattner [Tue, 5 Jan 2010 07:20:54 +0000 (07:20 +0000)]
this inline function moved to addsub

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

14 years agosplit add/sub out to its own file. Eliminate use of
Chris Lattner [Tue, 5 Jan 2010 07:18:46 +0000 (07:18 +0000)]
split add/sub out to its own file.  Eliminate use of
dyn_castNotVal in the X+~X transform.  dyn_castNotVal is
dramatic overkill for what the xform needed.

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

14 years agoall the places we use hasOneUse() we know are instructions, so inline
Chris Lattner [Tue, 5 Jan 2010 07:04:23 +0000 (07:04 +0000)]
all the places we use hasOneUse() we know are instructions, so inline
and simplify.

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

14 years agoeliminate AssociativeOpt and its last uses.
Chris Lattner [Tue, 5 Jan 2010 07:01:16 +0000 (07:01 +0000)]
eliminate AssociativeOpt and its last uses.

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

14 years agoinline the FoldICmpLogical functor.
Chris Lattner [Tue, 5 Jan 2010 06:59:49 +0000 (06:59 +0000)]
inline the FoldICmpLogical functor.

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

14 years agoCode refactoring.
Evan Cheng [Tue, 5 Jan 2010 06:52:31 +0000 (06:52 +0000)]
Code refactoring.

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

14 years agoinline the 'AddRHS' transformation, simplifying things significantly.
Chris Lattner [Tue, 5 Jan 2010 06:29:13 +0000 (06:29 +0000)]
inline the 'AddRHS' transformation, simplifying things significantly.
Eliminate the 'AddMaskingAnd' transformation, it is redundant with this
more general code right below it:
  // A+B --> A|B iff A and B have no bits set in common.

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

14 years agoremove massive over-genality manifested as a big template
Chris Lattner [Tue, 5 Jan 2010 06:24:06 +0000 (06:24 +0000)]
remove massive over-genality manifested as a big template
that got instantiated.  There is no reason for instcombine
to try this hard for simple associative optimizations.  Next
up, eliminate the template completely.

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

14 years agosplit mul/div/rem instructions out to their own file.
Chris Lattner [Tue, 5 Jan 2010 06:09:35 +0000 (06:09 +0000)]
split mul/div/rem instructions out to their own file.

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

14 years agoclean up header.
Chris Lattner [Tue, 5 Jan 2010 06:05:07 +0000 (06:05 +0000)]
clean up header.

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

14 years agosplit select out to its own file.
Chris Lattner [Tue, 5 Jan 2010 06:03:12 +0000 (06:03 +0000)]
split select out to its own file.

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

14 years agosplit out load/store/alloca.
Chris Lattner [Tue, 5 Jan 2010 05:57:49 +0000 (05:57 +0000)]
split out load/store/alloca.

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

14 years agoreduce indentation
Chris Lattner [Tue, 5 Jan 2010 05:42:08 +0000 (05:42 +0000)]
reduce indentation

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

14 years agosplit vector stuff out to InstCombineVectorOps.cpp
Chris Lattner [Tue, 5 Jan 2010 05:36:20 +0000 (05:36 +0000)]
split vector stuff out to InstCombineVectorOps.cpp

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