Commit Graph

3914 Commits

Author SHA1 Message Date
David Greene d65bc15c81 Change errs() to dbgs().
llvm-svn: 92580
2010-01-05 01:25:09 +00:00
David Greene 6f021a30fe Change errs() to dbgs().
llvm-svn: 92579
2010-01-05 01:25:04 +00:00
David Greene fe5c3524c7 Change errs() to dbgs().
llvm-svn: 92578
2010-01-05 01:25:00 +00:00
David Greene 5730f203ee Change errs() to dbgs().
llvm-svn: 92577
2010-01-05 01:24:57 +00:00
David Greene f34d7ac9f1 Change errs() to dbgs().
llvm-svn: 92576
2010-01-05 01:24:54 +00:00
David Greene ae4f266b2d Change errs() to dbgs().
llvm-svn: 92575
2010-01-05 01:24:53 +00:00
David Greene ec5883fc0e Change errs() to dbgs().
llvm-svn: 92574
2010-01-05 01:24:50 +00:00
David Greene 807fcf6374 Change errs() to dbgs().
llvm-svn: 92573
2010-01-05 01:24:48 +00:00
David Greene 40deefdc4f Change errs() to dbgs().
llvm-svn: 92572
2010-01-05 01:24:45 +00:00
David Greene 63145844c8 Change errs() to dbgs().
llvm-svn: 92571
2010-01-05 01:24:43 +00:00
David Greene 4cec475ed7 Change errs() to dbgs().
llvm-svn: 92570
2010-01-05 01:24:40 +00:00
David Greene d93137dce7 Change errs() to dbgs().
llvm-svn: 92569
2010-01-05 01:24:36 +00:00
David Greene 7562faa4cf Change errs() to dbgs().
llvm-svn: 92568
2010-01-05 01:24:34 +00:00
Dan Gohman ea6f91ff64 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 feeced4104 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 1eea3b0ada 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 24576a5cf3 whitespace cleanup
llvm-svn: 92404
2010-01-01 23:37:34 +00:00
Mikhail Glushenkov 5c35d2f6a4 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 2abe1b70ac Trailing whitespace, 80-col violations.
llvm-svn: 92394
2010-01-01 04:41:22 +00:00
Chris Lattner 39f18e545e 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 8e805be369 remove a bunch of unneeded functions.
llvm-svn: 92263
2009-12-29 09:32:19 +00:00
Chris Lattner a0566979b7 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 2f2aa2b067 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 7093946ab1 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 0b00a1b54e 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 42bc7ad2b1 Remove dead store.
llvm-svn: 92190
2009-12-28 01:51:30 +00:00
Bill Wendling 5b8d89d0a2 Remove dead variable.
llvm-svn: 92189
2009-12-28 01:48:56 +00:00
Bill Wendling 9a62b467a8 Remove dead variable.
llvm-svn: 92188
2009-12-28 01:47:48 +00:00
Bill Wendling 846ca9b38b Remove dead variable.
llvm-svn: 92180
2009-12-28 01:02:21 +00:00
Bill Wendling 7da8f90d41 Remove dead variable.
llvm-svn: 92178
2009-12-28 01:00:12 +00:00
Chris Lattner f5e3ed64d5 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 1a32ede6fd 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 129819de71 move a few more symbols to .rodata
llvm-svn: 92011
2009-12-23 17:48:10 +00:00
Dale Johannesen a864a67185 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 fdb33458fc 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 0602f39bb1 Remove superfluous SDNode ordering.
llvm-svn: 91971
2009-12-23 01:28:19 +00:00
Bill Wendling 9df5c6dfc3 Remove node ordering from inline asm nodes. It's not needed.
llvm-svn: 91961
2009-12-23 00:47:20 +00:00
Bill Wendling 91313064f1 Remove node ordering from VA nodes. It's not needed.
llvm-svn: 91958
2009-12-23 00:44:51 +00:00
Bill Wendling ef408db250 Revert r91949 r91942 and r91936.
llvm-svn: 91953
2009-12-23 00:28:23 +00:00
Bill Wendling 54dd5398e0 Finish up node ordering in ExpandNode.
llvm-svn: 91949
2009-12-23 00:05:09 +00:00
Bill Wendling ad1fdf0e40 Assign ordering to nodes created in ExpandNode. Only roughly 1/2 of the function
is finished.

llvm-svn: 91942
2009-12-22 23:44:56 +00:00
Bill Wendling 70794596a8 Assign ordering to SDNodes in PromoteNode. Also fixing a subtle bug where BSWAP
was using "Tmp1" in the first getNode call instead of Node->getOperand(0).

llvm-svn: 91936
2009-12-22 22:53:39 +00:00
Bill Wendling d85498132f Allow 0 as an order number. Don't assign an order to formal arguments.
llvm-svn: 91920
2009-12-22 21:35:02 +00:00
Bob Wilson bac37abe73 Report an error for bad inline assembly, where the value passed for an
"indirect" operand is not a pointer.

llvm-svn: 91913
2009-12-22 18:34:19 +00:00
Bill Wendling 919b7aab2e Add more plumbing. This time in the LowerArguments and "get" functions which
return partial registers. This affected the back-end lowering code some.

Also patch up some places I missed before in the "get" functions.

llvm-svn: 91880
2009-12-22 02:10:19 +00:00
Bill Wendling ac08758b71 Add SDNode ordering to inlined asm and VA functions.
llvm-svn: 91876
2009-12-22 01:25:10 +00:00
Bill Wendling f376c40d0e Adding more assignment of ordering to SDNodes. This time in the "call" and
generic copy functions.

llvm-svn: 91872
2009-12-22 01:11:43 +00:00
Bill Wendling a4d7df7a37 Add ordering of SDNodes to LowerCallTo.
llvm-svn: 91866
2009-12-22 00:50:32 +00:00
Bill Wendling b99b2693f3 Now add ordering to SDNodes created by the massive intrinsic lowering function.
llvm-svn: 91863
2009-12-22 00:40:51 +00:00
Bill Wendling ea3e73e596 To make things interesting, I added MORE code to set the ordering of
SDNodes. This time in the load/store and limited-precision code.

llvm-svn: 91860
2009-12-22 00:12:37 +00:00