1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

55778 Commits

Author SHA1 Message Date
Chris Lattner
1a64e58fa3 handle ConstantVector while I'm in here.
llvm-svn: 92892
2010-01-07 01:20:20 +00:00
Chris Lattner
0b0caf0877 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.

llvm-svn: 92889
2010-01-07 01:16:21 +00:00
Evan Cheng
51d86260ff Fix a minor regression from my dag combiner changes. One more place which needs to look pass truncates.
llvm-svn: 92885
2010-01-07 00:54:06 +00:00
Douglas Gregor
b7161a0b1c 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.

llvm-svn: 92884
2010-01-07 00:51:54 +00:00
Jakob Stoklund Olesen
09012552b8 Add comments.
llvm-svn: 92883
2010-01-07 00:51:04 +00:00
Jim Grosbach
40aafaec86 80 column violations
llvm-svn: 92876
2010-01-06 23:54:42 +00:00
Jakob Stoklund Olesen
b90023e707 Allow double defs after tail duplication.
llvm-svn: 92874
2010-01-06 23:52:46 +00:00
Jakob Stoklund Olesen
a63aa4e54b Add Target hook to duplicate machine instructions.
Some instructions refer to unique labels, and so cannot be trivially cloned
with CloneMachineInstr.

llvm-svn: 92873
2010-01-06 23:47:07 +00:00
Jim Grosbach
76768e7216 Addressing mode 6 (load/store) instructions can't encode an immediate offset
for stack references.

llvm-svn: 92871
2010-01-06 23:45:18 +00:00
Jim Grosbach
0beaad246d Anti-dependency breaking needs to be careful regarding instructions with
multiple register definitions.

llvm-svn: 92864
2010-01-06 22:21:25 +00:00
Eric Christopher
0574ce70c3 Move the object size intrinsic optimization to inst-combine and make
it work for any integer size return type.

llvm-svn: 92853
2010-01-06 20:04:44 +00:00
Evan Cheng
f9dade0634 Comment.
llvm-svn: 92850
2010-01-06 19:43:21 +00:00
Evan Cheng
25dcf9b830 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.

llvm-svn: 92849
2010-01-06 19:38:29 +00:00
Douglas Gregor
f5646a4595 Fix struct/class mismatch
llvm-svn: 92841
2010-01-06 17:16:00 +00:00
Victor Hernandez
6551d8e0be When parsing function-local metadata, create a function-local MDNode
llvm-svn: 92838
2010-01-06 17:00:21 +00:00
Jim Grosbach
2101815d36 80 column and whitespace cleanup
llvm-svn: 92837
2010-01-06 16:48:02 +00:00
Duncan Sands
de0adbdf25 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!

llvm-svn: 92836
2010-01-06 15:37:47 +00:00
Mikhail Glushenkov
f7e36a1fe2 Formatting.
llvm-svn: 92831
2010-01-06 09:20:39 +00:00
Lang Hames
3e8519b563 Fixed malformed -*- lines in PBQP headers.
llvm-svn: 92830
2010-01-06 08:53:34 +00:00
Duncan Sands
4ef1119d94 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.

llvm-svn: 92829
2010-01-06 08:45:52 +00:00
Duncan Sands
9ce94f877c This is testing a darwin specific feature, so only turn
it on for darwin (it fails on linux).

llvm-svn: 92826
2010-01-06 05:49:26 +00:00
Chris Lattner
0f611954b6 tweaks suggested by Duncan
llvm-svn: 92824
2010-01-06 05:32:15 +00:00
Dale Johannesen
add9a6d765 Reenable debug info on PPC. Works well enough to
bootstrap.

llvm-svn: 92818
2010-01-06 02:21:00 +00:00
Dale Johannesen
225c2cfffe Make sure debug info hook gets called when emitting
synonyms for PPC.

llvm-svn: 92817
2010-01-06 02:20:18 +00:00
Chris Lattner
0b73344d8a 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)

llvm-svn: 92815
2010-01-06 01:56:21 +00:00
Jakob Stoklund Olesen
03dea01d94 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>

llvm-svn: 92812
2010-01-06 00:29:28 +00:00
Bill Wendling
b4f0d6e3b6 The previous code could potentially cause a cycle. Allow ordering w.r.t. a 0 order.
llvm-svn: 92810
2010-01-06 00:23:35 +00:00
Bill Wendling
41e18c3512 Only check the ordering if there is an ordering for each nodes.
llvm-svn: 92807
2010-01-06 00:09:23 +00:00
Bill Wendling
b7d6746476 Add a semi-primitive form of scheduling via the "SDNode ordering" to the
bottom-up scheduler. We prefer the lower order number.

llvm-svn: 92806
2010-01-05 23:48:12 +00:00
Chris Lattner
7bf6842c49 simplify this code.
llvm-svn: 92800
2010-01-05 23:00:30 +00:00
Dan Gohman
93a28a6ce9 Move this test from test/Transforms/IndVarSimplify to
test/CodeGen/X86, as doesn't use -indvars, and it does use
llc -march=x86-64.

llvm-svn: 92799
2010-01-05 22:52:54 +00:00
Bill Wendling
7e9607ab56 Don't assign the shift the same type as the variable being shifted. This could
result in illegal types for the SHL operator.

llvm-svn: 92797
2010-01-05 22:39:10 +00:00
Johnny Chen
6ae7666885 Undo r92785, it caused test failure.
llvm-svn: 92796
2010-01-05 22:37:28 +00:00
Chris Lattner
a101affbdb make this a static function instead of a method.
llvm-svn: 92795
2010-01-05 22:30:42 +00:00
Dan Gohman
9ef9e2c758 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.

llvm-svn: 92794
2010-01-05 22:26:32 +00:00
Victor Hernandez
0e7561092b Re-add parsing of function-local metadata; this time with testcase.
llvm-svn: 92793
2010-01-05 22:22:14 +00:00
Chris Lattner
53b9ed70ee more rearrangement and cleanup, fix my test failure.
llvm-svn: 92792
2010-01-05 22:21:18 +00:00
Chris Lattner
45cd7ba394 cleanup
llvm-svn: 92790
2010-01-05 22:07:33 +00:00
Chris Lattner
2f69f6a822 remove two trunc xforms that are subsumed by EvaluateInDifferentType.
The only difference is that EvaluateInDifferentType checks to ensure
they are profitable before doing them :)

llvm-svn: 92788
2010-01-05 22:01:41 +00:00
Chris Lattner
96e30cb44f merge some tests.
llvm-svn: 92786
2010-01-05 21:54:09 +00:00
Johnny Chen
f15fb27ffd 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.

llvm-svn: 92785
2010-01-05 21:51:46 +00:00
Chris Lattner
fd23a9b6dd merge cast2 into cast.ll
llvm-svn: 92784
2010-01-05 21:48:13 +00:00
Devang Patel
311b5584e5 Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}
llvm-svn: 92783
2010-01-05 21:47:32 +00:00
Chris Lattner
24e500eb45 remove useless test.
llvm-svn: 92782
2010-01-05 21:46:22 +00:00
Chris Lattner
61de3ae41a another example.
llvm-svn: 92781
2010-01-05 21:43:08 +00:00
Jakob Stoklund Olesen
8e4cdf70e1 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.

llvm-svn: 92778
2010-01-05 21:38:37 +00:00
Chris Lattner
65d5ec781a remove a useless negative test, add a rdar # to an xfail that I'm working on.
llvm-svn: 92777
2010-01-05 21:37:44 +00:00
Chris Lattner
3e7dbaf22d clean up tests.
llvm-svn: 92776
2010-01-05 21:32:59 +00:00
Chris Lattner
13293b9738 just remove this xform which is subsumed by others.
llvm-svn: 92775
2010-01-05 21:16:30 +00:00
Victor Hernandez
173518e4ae Fix comment for CheckDebugInfoIntrinsics
llvm-svn: 92774
2010-01-05 21:13:46 +00:00