Commit Graph

12201 Commits

Author SHA1 Message Date
Robert Bocchino
bb90a7aa7b Added constant folding support for the extractelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25187 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 20:03:46 +00:00
Chris Lattner
cd618ef279 silence a bogus warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25185 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 19:45:18 +00:00
Chris Lattner
269f8c0691 silence a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25184 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 19:43:26 +00:00
Andrew Lenharth
29418a862c Int immediate loading fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25182 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 19:12:47 +00:00
Robert Bocchino
b52ee7f5ff Added support for the extractelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25181 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 19:05:34 +00:00
Robert Bocchino
56107e21a5 Added lower packed support for the extractelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25180 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 19:05:05 +00:00
Robert Bocchino
c0f4cd9931 Added selection DAG support for the extractelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25179 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 19:04:57 +00:00
Robert Bocchino
fee31b3610 Added bytecode support for the extractelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25178 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 19:04:39 +00:00
Robert Bocchino
9c62b5630c Added lexer and parser support for the extractelement operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25177 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 19:04:32 +00:00
Reid Spencer
eb7116bb08 For PR411:
First step in refactoring the SymbolTable is to split it into two classes,
one for a symbol table of types and one for a symbol table of Values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25175 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 09:51:48 +00:00
Chris Lattner
60d97d4f55 Minor cleanup, no functionality change for current targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25173 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 05:41:59 +00:00
Duraid Madina
15d014b38e heh, 'sif it'd be a legalizer bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25172 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 05:26:01 +00:00
Duraid Madina
c1d3d10249 support functions that return bool (this "should" work but doesn't,
*maybe* due to a legalizer bug.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25171 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 05:08:25 +00:00
Reid Spencer
365320e49a Remove unused inclusion of SymbolTable.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25170 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 03:48:34 +00:00
Reid Spencer
f4484f3e16 For PR521:
With these patches we implement the ability for the Linker library to
keep track of which libraries were actually bytecode files (not archives)
and cause their users to remove such files from the list of libraries to
pass to the native linker.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25169 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 03:14:40 +00:00
Reid Spencer
3e5e127f29 Be a little more explanatory in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25168 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 03:12:29 +00:00
Nate Begeman
49dddb273d Remove a comment that no longer applies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25167 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 00:15:59 +00:00
Chris Lattner
da6d20f0c1 Give PPCISD:: nodes legible names in dumps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25166 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 23:52:17 +00:00
Chris Lattner
de387ce810 Fix an exponential function in libcall insertion to not be exponential. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25165 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 23:21:49 +00:00
Chris Lattner
e5cf122869 add ret void support back
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25164 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 23:20:37 +00:00
Evan Cheng
510e478098 * Added undef patterns.
* Some reorg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25163 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 23:10:28 +00:00
Evan Cheng
910cd3cfa2 More typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25162 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 22:29:54 +00:00
Evan Cheng
82a24b9813 typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25160 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 20:49:21 +00:00
Andrew Lenharth
f7c4bd65c0 proper branch not equal sequence
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25159 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 19:49:58 +00:00
Evan Cheng
e3413160ca Support for ADD_PARTS, SUB_PARTS, SHL_PARTS, SHR_PARTS, and SRA_PARTS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25158 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 18:33:28 +00:00
Evan Cheng
05a2d568c6 * Allow custom lowering of ADD_PARTS, SUB_PARTS, SHL_PARTS, SRA_PARTS,
and SRL_PARTS.
* Fix a bug that caused *_PARTS to be custom lowered twice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25157 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 18:31:59 +00:00
Evan Cheng
909addffc3 New getNode() variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25156 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 18:29:18 +00:00
Evan Cheng
6da8d99f70 New DAG node properties SNDPInFlag, SNDPOutFlag, and SNDPOptInFlag to replace
hasInFlag, hasOutFlag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25155 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 18:28:21 +00:00
Chris Lattner
baec98d00b Teach loopsimplify to update et-forest. Patch contributed by Daniel Berlin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25153 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 08:03:08 +00:00
Chris Lattner
6b135b74bd Bugfix for etforest updating. Contributed by Daniel Berlin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25152 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 07:58:01 +00:00
Reid Spencer
d41c981c39 Saem Ghani's PassManager Patch #8:
This fixes a "gccass" regression. The -debug-pass=Structure option now
prints all the appropriate output


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25151 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-08 22:57:07 +00:00
Chris Lattner
10673b63b0 Fix a problem exposed by the et-forest work. Load-vn needs these passes live
whenever it is live, not just when load-vn is computed initially


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25146 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-08 09:10:04 +00:00
Chris Lattner
ccacd3ccc2 Initial implementation of the ET-Forest data structure for dominators and
post-dominators.  This code was written/adapted by Daniel Berlin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25144 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-08 08:22:18 +00:00
Chris Lattner
d659360e58 Patch #7 from Saem:
"added the asserts and casts, fixed the comments and started the break
down of the larger methods.  A few more patches and the breakdown
should be complete."


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25142 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-07 23:16:58 +00:00
Chris Lattner
5fe0e28650 Fix the PPC JIT failures last night, which were due to mishandling of linkonce globals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25141 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-07 06:22:16 +00:00
Chris Lattner
2199877563 Wrap long lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25140 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-07 06:20:51 +00:00
Chris Lattner
51e6a38b86 wrap long line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25139 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-07 06:12:07 +00:00
Chris Lattner
e8d56c536d fix some 176.gcc miscompilation from my previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25137 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-07 01:32:28 +00:00
Evan Cheng
948f343a2f * Added integer div / rem.
* Fixed a load folding bug.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25136 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 23:19:29 +00:00
Evan Cheng
0114e94903 ISEL code for MULHU, MULHS, and UNDEF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25132 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 20:36:21 +00:00
Andrew Lenharth
919e666d8c make 0 codegen much better
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25131 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 19:41:51 +00:00
Chris Lattner
4f637d4db1 silence some bogus gcc warnings on fenris
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25130 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 17:59:59 +00:00
Chris Lattner
cb83374bd9 silence a bogus gcc warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25129 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 17:56:38 +00:00
Chris Lattner
ad0124c188 Enhance the shift-shift folding code to allow a no-op cast to occur in between
the shifts.

This allows us to fold this (which is the 'integer add a constant' sequence
from cozmic's scheme compmiler):

int %x(uint %anf-temporary776) {
        %anf-temporary777 = shr uint %anf-temporary776, ubyte 1
        %anf-temporary800 = cast uint %anf-temporary777 to int
        %anf-temporary804 = shl int %anf-temporary800, ubyte 1
        %anf-temporary805 = add int %anf-temporary804, -2
        %anf-temporary806 = or int %anf-temporary805, 1
        ret int %anf-temporary806
}

into this:

int %x(uint %anf-temporary776) {
        %anf-temporary776 = cast uint %anf-temporary776 to int
        %anf-temporary776.mask1 = add int %anf-temporary776, -2
        %anf-temporary805 = or int %anf-temporary776.mask1, 1
        ret int %anf-temporary805
}

note that instcombine already knew how to eliminate the AND that the two
shifts fold into.  This is tested by InstCombine/shift.ll:test26

-Chris


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25128 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 07:52:12 +00:00
Chris Lattner
830ed03e8b Simplify the code a bit more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25126 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 07:22:22 +00:00
Chris Lattner
4d5542ce6e Extract a bunch of code out of visitShiftInst into FoldShiftByConstant. No
functionality changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25125 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 07:12:35 +00:00
Chris Lattner
47f5beaaaf Unbreak the build :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25124 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 05:47:48 +00:00
Evan Cheng
cfa260b2ab Addd (shl x, 1) ==> (shl x, x) peepholes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25123 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 02:31:59 +00:00
Evan Cheng
6907708c23 Revert the previous check-in. Leave shl x, 1 along for target to deal with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25121 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 01:56:02 +00:00
Evan Cheng
da95a84a11 fold (shl x, 1) -> (add x, x)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25120 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 01:06:31 +00:00