Commit Graph

3974 Commits

Author SHA1 Message Date
Bill Wendling
247fb4ebd3 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
2010-01-05 23:48:12 +00:00
Bill Wendling
9f7c5c0dca 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
2010-01-05 22:39:10 +00:00
Dan Gohman
7c3ecb6838 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
2010-01-05 22:26:32 +00:00
Benjamin Kramer
f012705c7e 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
2010-01-05 13:12:22 +00:00
Devang Patel
614d2ad0af Delete renaming use of dead dbg intrinsics.
Intrinsic::dbg_stoppoint
 Intrinsic::dbg_region_start
 Intrinsic::dbg_region_end
 Intrinsic::dbg_func_start



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92672 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:47:06 +00:00
David Greene
1a053236f1 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92597 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:26:11 +00:00
David Greene
84fa8229bb Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92581 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:25:11 +00:00
David Greene
33db62ce23 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92580 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:25:09 +00:00
David Greene
bb22223d5b Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92579 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:25:04 +00:00
David Greene
f10902981c Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92578 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:25:00 +00:00
David Greene
4b69d9909d Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92577 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:24:57 +00:00
David Greene
e492ae13ed Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92576 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:24:54 +00:00
David Greene
993aacedfd Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92575 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:24:53 +00:00
David Greene
ad61b129ee Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92574 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:24:50 +00:00
David Greene
f0dee89b02 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92573 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:24:48 +00:00
David Greene
9abe0bbd90 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92572 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:24:45 +00:00
David Greene
ec2d7fe924 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92571 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:24:43 +00:00
David Greene
7419b1806a Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92570 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:24:40 +00:00
David Greene
55d146e0f9 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92569 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:24:36 +00:00
David Greene
d765353da8 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92568 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:24:34 +00:00
Dan Gohman
eeb3a00b84 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92564 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:24:18 +00:00
Dan Gohman
f2d7fb3eac Use a pointer type rather than MVT::Other for the ExternalSymbol node used
in an inline asm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92512 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-04 21:00:54 +00:00
Chris Lattner
133ce871df 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92406 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-02 00:00:03 +00:00
Chris Lattner
53334ca5ac whitespace cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92404 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-01 23:37:34 +00:00
Mikhail Glushenkov
bfdfea86a1 Fix a warning on gcc 4.4.
SelectionDAGBuilder.cpp:4294: warning: suggest explicit braces to avoid
ambiguous ‘else’

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92395 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-01 04:41:36 +00:00
Mikhail Glushenkov
b3c0199f6a Trailing whitespace, 80-col violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92394 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-01 04:41:22 +00:00
Chris Lattner
f031e8ad01 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92388 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-01 03:32:16 +00:00
Chris Lattner
bf0ca2b477 remove a bunch of unneeded functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92263 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-29 09:32:19 +00:00
Chris Lattner
081134741b 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92259 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-29 09:01:33 +00:00
Chris Lattner
3990b121cf 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92235 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-28 23:41:32 +00:00
Chris Lattner
0eb419800a rename getMDKind -> getMDKindID, make it autoinsert if an MD Kind
doesn't exist already, eliminate registerMDKind.  Tidy up a bunch
of random stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92225 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-28 20:45:51 +00:00
Sanjiv Gupta
8f17a36d31 Allow targets to specify the return type of libcalls that are generated for floating point comparisons, rather than hard-coding them as i32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-28 02:40:33 +00:00
Bill Wendling
9882007003 Remove dead store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92190 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-28 01:51:30 +00:00
Bill Wendling
551aa99796 Remove dead variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92189 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-28 01:48:56 +00:00
Bill Wendling
d831181f89 Remove dead variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92188 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-28 01:47:48 +00:00
Bill Wendling
8688888787 Remove dead variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92180 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-28 01:02:21 +00:00
Bill Wendling
b17f15b25f Remove dead variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92178 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-28 01:00:12 +00:00
Chris Lattner
04b091a782 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92107 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24 01:07:17 +00:00
Chris Lattner
8047d9a6be 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92098 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24 00:37:38 +00:00
Nuno Lopes
ec9d8b0047 move a few more symbols to .rodata
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92011 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 17:48:10 +00:00
Dale Johannesen
9949933d6e Use more sensible type for flags in asms. PR 5570.
Patch by Sylve`re Teissier (sorry, ASCII only).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91988 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 07:32:51 +00:00
Eric Christopher
d060b2576a Update objectsize intrinsic and associated dependencies. Fix
lowering code and update testcases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91979 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 02:51:48 +00:00
Bill Wendling
0d58013c3f Remove superfluous SDNode ordering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91971 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 01:28:19 +00:00
Bill Wendling
fc67bbe7bc Remove node ordering from inline asm nodes. It's not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91961 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 00:47:20 +00:00
Bill Wendling
c1d3c944ab Remove node ordering from VA nodes. It's not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91958 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 00:44:51 +00:00
Bill Wendling
775db97a50 Revert r91949 r91942 and r91936.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91953 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 00:28:23 +00:00
Bill Wendling
122d06de74 Finish up node ordering in ExpandNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91949 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 00:05:09 +00:00
Bill Wendling
3dbcb55b40 Assign ordering to nodes created in ExpandNode. Only roughly 1/2 of the function
is finished.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91942 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 23:44:56 +00:00
Bill Wendling
167bea71a4 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91936 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 22:53:39 +00:00
Bill Wendling
3ea58b6d7a Allow 0 as an order number. Don't assign an order to formal arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91920 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22 21:35:02 +00:00