1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

3927 Commits

Author SHA1 Message Date
Evan Cheng
4523041394 APInt'fy TargetLowering::SimplifySetCC to fix PR5963.
llvm-svn: 92943
2010-01-07 20:58:44 +00:00
Benjamin Kramer
22ec2524fd Use pop_back_val instead of back()+pop_back.
llvm-svn: 92918
2010-01-07 17:27:56 +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
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
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
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
Benjamin Kramer
e90a3c66c4 Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
llvm-svn: 92726
2010-01-05 13:12:22 +00:00
Devang Patel
9c02d20409 Delete renaming use of dead dbg intrinsics.
Intrinsic::dbg_stoppoint
 Intrinsic::dbg_region_start
 Intrinsic::dbg_region_end
 Intrinsic::dbg_func_start

llvm-svn: 92672
2010-01-05 01:47:06 +00:00
David Greene
e5bee4794b Change errs() to dbgs().
llvm-svn: 92597
2010-01-05 01:26:11 +00:00
David Greene
b1764ac8cb Change errs() to dbgs().
llvm-svn: 92581
2010-01-05 01:25:11 +00:00
David Greene
54706ebebb Change errs() to dbgs().
llvm-svn: 92580
2010-01-05 01:25:09 +00:00
David Greene
4f5be2f621 Change errs() to dbgs().
llvm-svn: 92579
2010-01-05 01:25:04 +00:00
David Greene
bf6025f893 Change errs() to dbgs().
llvm-svn: 92578
2010-01-05 01:25:00 +00:00
David Greene
2c9dbf7b18 Change errs() to dbgs().
llvm-svn: 92577
2010-01-05 01:24:57 +00:00
David Greene
3a4b23b913 Change errs() to dbgs().
llvm-svn: 92576
2010-01-05 01:24:54 +00:00
David Greene
a9fbae472c Change errs() to dbgs().
llvm-svn: 92575
2010-01-05 01:24:53 +00:00
David Greene
5201625e9c Change errs() to dbgs().
llvm-svn: 92574
2010-01-05 01:24:50 +00:00
David Greene
aaf3acc471 Change errs() to dbgs().
llvm-svn: 92573
2010-01-05 01:24:48 +00:00
David Greene
4c9eb54e83 Change errs() to dbgs().
llvm-svn: 92572
2010-01-05 01:24:45 +00:00
David Greene
216139c074 Change errs() to dbgs().
llvm-svn: 92571
2010-01-05 01:24:43 +00:00
David Greene
82adcc9c8f Change errs() to dbgs().
llvm-svn: 92570
2010-01-05 01:24:40 +00:00
David Greene
616c94ab91 Change errs() to dbgs().
llvm-svn: 92569
2010-01-05 01:24:36 +00:00
David Greene
b22b413dff Change errs() to dbgs().
llvm-svn: 92568
2010-01-05 01:24:34 +00:00
Dan Gohman
9bcfdf98f1 Change SelectCode's argument from SDValue to SDNode *, to make it more
clear what information these functions are actually using.

This is also a micro-optimization, as passing a SDNode * around is
simpler than passing a { SDNode *, int } by value or reference.

llvm-svn: 92564
2010-01-05 01:24:18 +00:00
Dan Gohman
2754bdcfdb Use a pointer type rather than MVT::Other for the ExternalSymbol node used
in an inline asm.

llvm-svn: 92512
2010-01-04 21:00:54 +00:00
Chris Lattner
fe8af82cd4 Teach codegen to handle:
(X != null) | (Y != null) --> (X|Y) != 0
 (X == null) & (Y == null) --> (X|Y) == 0

so that instcombine can stop doing this for pointers.  This is part of PR3351,
which is a case where instcombine doing this for pointers (inserting ptrtoint)
is pessimizing code.

llvm-svn: 92406
2010-01-02 00:00:03 +00:00
Chris Lattner
330323f780 whitespace cleanup
llvm-svn: 92404
2010-01-01 23:37:34 +00:00
Mikhail Glushenkov
e862cc48f3 Fix a warning on gcc 4.4.
SelectionDAGBuilder.cpp:4294: warning: suggest explicit braces to avoid
ambiguous ‘else’

llvm-svn: 92395
2010-01-01 04:41:36 +00:00
Mikhail Glushenkov
0fba686958 Trailing whitespace, 80-col violations.
llvm-svn: 92394
2010-01-01 04:41:22 +00:00
Chris Lattner
44298d184a Teach codegen to lower llvm.powi to an efficient (but not optimal)
multiply sequence when the power is a constant integer.  Before, our
codegen for std::pow(.., int) always turned into a libcall, which was
really inefficient.

This should also make many gfortran programs happier I'd imagine.

llvm-svn: 92388
2010-01-01 03:32:16 +00:00
Chris Lattner
d981b3fc91 remove a bunch of unneeded functions.
llvm-svn: 92263
2009-12-29 09:32:19 +00:00
Chris Lattner
84e9de4a58 Final step in the metadata API restructuring: move the
getMDKindID/getMDKindNames methods to LLVMContext (and add
convenience methods to Module), eliminating MetadataContext.
Move the state that it maintains out to LLVMContext.

llvm-svn: 92259
2009-12-29 09:01:33 +00:00
Chris Lattner
9ec640a902 This is a major cleanup of the instruction metadata interfaces that
I asked Devang to do back on Sep 27.  Instead of going through the
MetadataContext class with methods like getMD() and getMDs(), just
ask the instruction directly for its metadata with getMetadata()
and getAllMetadata().

This includes a variety of other fixes and improvements: previously
all Value*'s were bloated because the HasMetadata bit was thrown into
value, adding a 9th bit to a byte.  Now this is properly sunk down to
the Instruction class (the only place where it makes sense) and it
will be folded away somewhere soon.

This also fixes some confusion in getMDs and its clients about 
whether the returned list is indexed by the MDID or densely packed.
This is now returned sorted and densely packed and the comments make
this clear.

This introduces a number of fixme's which I'll follow up on.

llvm-svn: 92235
2009-12-28 23:41:32 +00:00
Chris Lattner
cd3aa9d1ff rename getMDKind -> getMDKindID, make it autoinsert if an MD Kind
doesn't exist already, eliminate registerMDKind.  Tidy up a bunch
of random stuff.

llvm-svn: 92225
2009-12-28 20:45:51 +00:00
Sanjiv Gupta
d17915f6f0 Allow targets to specify the return type of libcalls that are generated for floating point comparisons, rather than hard-coding them as i32.
llvm-svn: 92199
2009-12-28 02:40:33 +00:00
Bill Wendling
3fbb708d4f Remove dead store.
llvm-svn: 92190
2009-12-28 01:51:30 +00:00
Bill Wendling
08d36672e1 Remove dead variable.
llvm-svn: 92189
2009-12-28 01:48:56 +00:00
Bill Wendling
5badb477fa Remove dead variable.
llvm-svn: 92188
2009-12-28 01:47:48 +00:00
Bill Wendling
008e2e1e7f Remove dead variable.
llvm-svn: 92180
2009-12-28 01:02:21 +00:00
Bill Wendling
091861587d Remove dead variable.
llvm-svn: 92178
2009-12-28 01:00:12 +00:00
Chris Lattner
4e96d36f72 handle equality memcmp of 8 bytes on x86-64 with two unaligned loads and a
compare.  On other targets we end up with a call to memcmp because we don't
want 16 individual byte loads.  We should be able to use movups as well, but
we're failing to select the generated icmp.

llvm-svn: 92107
2009-12-24 01:07:17 +00:00
Chris Lattner
5d3919d5f9 move an optimization for memcmp out of simplifylibcalls and into
SDISel.  This optimization was causing simplifylibcalls to 
introduce type-unsafe nastiness.  This is the first step, I'll be 
expanding the memcmp optimizations shortly, covering things that
we really really wouldn't want simplifylibcalls to do.

llvm-svn: 92098
2009-12-24 00:37:38 +00:00
Nuno Lopes
6abe311a0f move a few more symbols to .rodata
llvm-svn: 92011
2009-12-23 17:48:10 +00:00
Dale Johannesen
b4485fd8a9 Use more sensible type for flags in asms. PR 5570.
Patch by Sylve`re Teissier (sorry, ASCII only).

llvm-svn: 91988
2009-12-23 07:32:51 +00:00
Eric Christopher
ce677a909d Update objectsize intrinsic and associated dependencies. Fix
lowering code and update testcases.

llvm-svn: 91979
2009-12-23 02:51:48 +00:00
Bill Wendling
ce8aa5aab2 Remove superfluous SDNode ordering.
llvm-svn: 91971
2009-12-23 01:28:19 +00:00
Bill Wendling
e7107691df Remove node ordering from inline asm nodes. It's not needed.
llvm-svn: 91961
2009-12-23 00:47:20 +00:00