Commit Graph

12516 Commits

Author SHA1 Message Date
Chris Lattner
f1b59d4172 Simple is good
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25205 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 05:38:55 +00:00
Chris Lattner
dd9e956605 Preserve and update ETForest. Patch by Daniel Berlin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25203 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 05:11:13 +00:00
Chris Lattner
88cac3d2f7 Switch these to using ETForest instead of DominatorSet to compute itself.
Patch written by Daniel Berlin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25202 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 05:10:20 +00:00
Chris Lattner
19ef3d5be2 Switch this to using ETForest instead of DominatorSet to compute itself.
Patch written by Daniel Berlin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25201 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 05:09:40 +00:00
Chris Lattner
45a0e9b04d Switch loopinfo to using ETForest instead of DominatorSet to compute itself.
Patch by Daniel Berlin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25199 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 05:08:29 +00:00
Duraid Madina
bf0945877e cleanup GETFD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25198 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 03:50:40 +00:00
Andrew Lenharth
3b628f8388 this pattern was bogus
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25197 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 03:33:06 +00:00
Chris Lattner
fe442be5a4 Regenerate these files. FreeBSD apparently has issues with the version of
lex/bison Rob used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25196 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 02:07:51 +00:00
Duraid Madina
eac2a1bdbf this just might work
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25195 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 01:38:07 +00:00
Duraid Madina
07ac89f30a add support for selecting bools
FIXME: this is commented out because it makes tblgen go a bit fruity


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25193 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 01:21:12 +00:00
Chris Lattner
92cb0af675 implement FP_REG_KILL insertion for the dag-dag instruction selector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25192 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 01:15:34 +00:00
Chris Lattner
a2b694ce35 Fit into 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25191 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 00:46:55 +00:00
Evan Cheng
4a46080fe0 SSE cmov support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25190 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 00:33:36 +00:00
Evan Cheng
f710062bfb * fp to sint patterns.
* fiadd, fisub, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25189 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 22:22:02 +00:00
Evan Cheng
aaca22ca91 FP_TO_INT*_IN_MEM and x87 FP Select support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25188 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 20:26:56 +00:00
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
Chris Lattner
a35ef6350d linkonce symbols have an extra indirection, just like weak ones do. This fixes
Prolangs-C++/family and Prolangs-C++/primes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25119 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 01:04:03 +00:00
Evan Cheng
d9558e0ba6 * Fast call support.
* FP cmp, setcc, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25117 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 00:43:03 +00:00
Evan Cheng
17c428e23d Support for custom lowering of ISD::RET.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25116 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-06 00:41:43 +00:00
Chris Lattner
c9a5ef524a Fix a compile crash building MultiSource/Applications/d with the new front-end.
The PPC backend was generating random shift counts in this case, due to an
uninitialized variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25114 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 18:32:49 +00:00
Chris Lattner
2f690c84fa Implement a few symbolic constant folding things. X ? Y : Y is Y.
Fold:
seteq ({ short }* cast (int 1 to { short }*), { short }* null)
setlt ({ short }* cast (int 1 to { short }*), { short }* cast (int 2 to { short }*))

to false/true.  These last two commonly occur in the output of compilers that
tag integers, like cozmic's scheme compiler.

Tested by Regression/Assembler/ConstantExprFold.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25112 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 07:49:30 +00:00
Chris Lattner
2c822cce61 fix some formatting problems
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25110 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 07:19:51 +00:00
Chris Lattner
bfc89d3876 unbreak the build, these are now in TargetSelectionDAG.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25109 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 04:48:15 +00:00
Evan Cheng
650d688db6 Added ConstantFP patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25108 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 02:08:37 +00:00
Evan Cheng
0a3a5e29d2 Added fpimm node for ConstantFP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25107 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 02:07:49 +00:00
Jim Laskey
e0bce71c42 Had expand logic backward.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25105 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 01:47:43 +00:00
Jim Laskey
abf6d1784b Added initial support for DEBUG_LABEL allowing debug specific labels to be
inserted in the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25104 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 01:25:28 +00:00
Evan Cheng
d90eb7fb24 DAG based isel call support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25103 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 00:27:02 +00:00
Evan Cheng
941334f0b0 Remove some dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25102 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 00:26:14 +00:00
Jim Laskey
b2efb853f0 Applied some recommend changes from sabre. The dominate one beginning "let the
pass manager do it's thing."  Fixes crash when compiling -g files and suppresses
dwarf statements if no debug info is present.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25100 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 22:28:25 +00:00
Jim Laskey
5bf6f25b4a Add unique id to debug location for debug label use (work in progress.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25096 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 15:04:11 +00:00
Jim Laskey
7d78a2ab7e Add check for debug presence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25095 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 14:30:12 +00:00
Jim Laskey
a7cea6f599 Tie dwarf generation to darwin assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25093 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:52:30 +00:00
Jim Laskey
f99c232506 Moving MachineDebugInfo to module level location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25090 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:43:56 +00:00
Jim Laskey
7ca9ab3f5c Change how MachineDebugInfo is fetched.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25089 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:42:59 +00:00
Jim Laskey
6af5681824 Extending MachineDebugInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25086 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:36:38 +00:00
Chris Lattner
7f7b730d79 Patch #6's in Saem's refactor-the-passmanager patch series. From him:
This sanitises the world, blows away the specialisations and adds
traits per passmanager type -- seemed most natural.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25085 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 07:47:13 +00:00
Chris Lattner
2adfa7e932 Add support for targets (like Alpha) that have terminator instructions which
use virtual registers.  We now allow the first instruction in a block of
terminators to use virtual registers, and update phi elimination to correctly
update livevar when eliminating phi's.  This fixes a problem on a testcase
Andrew sent me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25083 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 07:12:21 +00:00
Chris Lattner
172c362fef Add an assertion, update DefInst even though no one uses it (dangling pointers
don't help anyone)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25081 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 06:47:48 +00:00
Chris Lattner
dacceef266 Add a LiveVariables::VarInfo::dump method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25080 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 05:40:30 +00:00
Chris Lattner
eadf7a3541 Saem's patch #5 of the passmanager refactoring
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25078 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 05:02:04 +00:00
Chris Lattner
53745b852d patch #4 in Saem's passmanager refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25077 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 04:36:11 +00:00
Chris Lattner
84e1064f45 implement constant folding of ==/!= on constant packed, simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25074 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 02:20:54 +00:00
Chris Lattner
d2a7ea45b0 implement constant folding for the element-wise binary operations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25073 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 02:15:02 +00:00
Chris Lattner
d15ed59734 don't crash when trying to constant fold packed expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25072 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 02:03:29 +00:00
Chris Lattner
2054295796 Fix an assertion to allow constant folding of packed values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25071 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 01:01:04 +00:00
Chris Lattner
4eb40df1a8 Pull inline methods out of the pass class definition to make it easier to
read the code.

Do not internalize debugger anchors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25067 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-03 19:13:17 +00:00
Chris Lattner
361dfa62be silence some warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25066 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-03 17:52:18 +00:00
Chris Lattner
3b9db830f7 Change a variable from being an iterator to a raw MachineInstr*, to make
GDB use tolerable


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25064 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-03 07:41:37 +00:00
Chris Lattner
505b0701dd Finally commit Saem's 'patch #3' to refactor the pass manager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25063 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-03 07:05:17 +00:00
Chris Lattner
4983cf7321 Make the -print-alias-sets pass work for printing out something other than
the default aa impl results.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25062 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-03 06:05:22 +00:00
Andrew Lenharth
5d42360180 typeo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25060 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-02 21:15:53 +00:00
Chris Lattner
0e9aa4582c Remove a 'using namespace std'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25059 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-01 22:20:31 +00:00
Andrew Lenharth
993ff1ce4a Add support for brcond
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25058 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-01 22:16:43 +00:00
Andrew Lenharth
feab2f837c Move brcond over and fix some imm patterns. This may be the last change before changing the default alpha isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25057 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-01 22:16:14 +00:00
Andrew Lenharth
7a832da304 clean this function up some
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25055 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-01 22:13:54 +00:00
Chris Lattner
0b8e076d0b Patch #1 of Saem Ghani's Pass Manager refactoring. From the man:
"All this should do is create what will eventually be the specialised
passmanagers.  Currently, the templates are inheriting them, once the
template specialisations' methods have been absorbed, patches
submitted method by method.  I'll nuke the specialisations and have
the new objects inherit directly from passmanagert, and sanitise the
world of all references to templates.
"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25053 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 20:00:46 +00:00
Andrew Lenharth
dcbaf8a072 improve constant loading. Still sucks, but oh well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25047 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 02:30:02 +00:00
Nate Begeman
b73628b5ab Add support for generating v4i32 altivec code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25046 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 00:12:56 +00:00
Nate Begeman
1166bf3f4c Remove a fixme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25045 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 00:11:07 +00:00
Nate Begeman
512beb9465 Make sure to pass the offset into the new node, so that we don't silently
drop it on the floor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25044 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 00:10:38 +00:00
Duraid Madina
f65d917f71 purity++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25041 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-29 05:59:19 +00:00
Andrew Lenharth
a117b187f7 let us get some do what I meant not what I said stuff checked in. You would think the alpha backend would be 64bit clean
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25040 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-29 01:06:12 +00:00
Andrew Lenharth
aa6ed8c7cc Fix up immediate handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25039 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-29 00:50:08 +00:00
Duraid Madina
2e096c1cbf add these so I can be less naughty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25034 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 06:29:02 +00:00
Duraid Madina
3005961701 HB is *the* code janitor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25031 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 04:55:42 +00:00
Duraid Madina
8c7bd3615a mixed-STL programs are big and nasty :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25030 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 02:44:35 +00:00
Duraid Madina
d2dec7d24c yet more C++ standards-compliance stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25028 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-27 10:40:34 +00:00
Duraid Madina
9b3e4c853c nasty paste-o, calls passing more than 8 arguments along were having
args >8 put into the wrong place


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25027 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-27 10:17:03 +00:00
Andrew Lenharth
713b0b59fc Restore some happiness to the JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25026 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-27 06:25:50 +00:00
Andrew Lenharth
424ba780dc Fix alpha regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25025 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-27 03:53:58 +00:00
Chris Lattner
f31d193cce Fix a problem duraid pointed out to me compiling kc++ with -enable-x86-fastcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25024 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-27 03:02:18 +00:00
Duraid Madina
874874657e more C++ daintiness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25023 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 14:31:26 +00:00
Duraid Madina
0f7bfbac97 I bet pinski knows why g++ accepts this stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25022 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 14:23:22 +00:00
Duraid Madina
b5186853f8 getting there...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25021 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 13:48:44 +00:00
Duraid Madina
4547e2252c dum de dum
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25018 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 10:24:15 +00:00
Evan Cheng
2b4ea795a2 Added field noResults to Instruction.
Currently tblgen cannot tell which operands in the operand list are results so
it assumes the first one is a result. This is bad. Ideally we would fix this
by separating results from inputs, e.g. (res R32:$dst),
(ops R32:$src1, R32:$src2). But that's a more distruptive change. Adding
'let noResults = 1' is the workaround to tell tblgen that the instruction does
not produces a result. It works for now since tblgen does not support
instructions which produce multiple results.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25017 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 09:11:45 +00:00
Duraid Madina
3e317534c7 more HP-UX cleanliness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25015 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 08:35:06 +00:00
Duraid Madina
a7df3c9cc3 HP aCC chokes on this, but it's not required anyway: according to
the bzip2 homepage, only ancient (gcc 2.7.x ?) versions of GCC
require this? It certainly isn't needed for the current bzip2
sources.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25013 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 05:00:25 +00:00
Duraid Madina
786e3e22a9 MERRY CHRISTMAS EVERYONE!!! (what better way to spend christmas than
to try building LLVM on HP-UX! (the Right Way seems to be to tear out
the ancient STL that HP ship and use http://incubator.apache.org/stdcxx/ )


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25012 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 04:56:16 +00:00
Andrew Lenharth
eececbab32 add br pattern, unify JSR and BSR ISel instrs, and add BSR support for DAG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25011 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-25 17:36:48 +00:00
Duraid Madina
b13d74a49a unbreak calls, a few more tests should run. Tomorrow: bugpoint!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25010 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-25 14:09:08 +00:00
Duraid Madina
806b89382a we don't feed our call instructions extra operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25009 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-25 14:07:01 +00:00
Andrew Lenharth
53d8970625 All that just to lower div and rem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25008 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-25 01:34:27 +00:00
Andrew Lenharth
57030e36e4 allow custom lowering to return null for legal results
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25007 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-25 01:07:37 +00:00
Andrew Lenharth
e8f65f1e62 Support Custom lowering of a few more operations.
Alpha needs to custom lower *DIV and *REM


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25006 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 23:42:32 +00:00
Andrew Lenharth
330851a8f6 support targetexternalsym
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25005 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 23:36:59 +00:00
Evan Cheng
e4672aa5b4 Let the helper functions know about X86::FR32RegClass and X86::FR64RegClass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25004 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 09:48:35 +00:00
Andrew Lenharth
c687b48741 All addressing modes are now exposed. The only remaining relocated forms
are for function prologue.

TODO: move external symbols over to using RelLit.
    : have a pattern that matches constpool|globaladdr
    : have a pattern that matches (add x imm) -> x, imm or (...) -> ..., 0


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25003 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 08:29:32 +00:00
Andrew Lenharth
b6718607c5 Unify the patterns for loads and stores. Now offset addressing should be
supported.  This almost completes memory operations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25002 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 07:34:33 +00:00
Andrew Lenharth
4e62951282 Let's see if we can break things.
Lower GOT relative addresses to Lo and HI.
Update both ISels to select them when they can.
Saves instructions here and there.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25001 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 05:36:33 +00:00
Andrew Lenharth
9fa4d4c7c4 move loads and stores over. Smart addr selection comming
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25000 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 03:41:56 +00:00
Nate Begeman
50fb3c4986 Fix one of the things in the todo file, and get a bit closer to folding
constant offsets from statics into the address arithmetic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24999 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-24 01:00:15 +00:00
Evan Cheng
171049d10f * Removed the use of FLAG. Now use hasFlagIn and hasFlagOut instead.
* Added a pseudo instruction (for each target) that represent "return void".
  This is a workaround for lack of optional flag operand (return void is not
  lowered so it does not have a flag operand.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24997 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 22:14:32 +00:00
Jim Laskey
d6e8d41340 Remove redundant debug locations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24995 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 20:08:28 +00:00
Chris Lattner
c26f7a033f unbreak the build :-/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24992 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 16:12:20 +00:00
Chris Lattner
2170cef707 not a good idea
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24991 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 07:37:47 +00:00
Evan Cheng
38bcbaf23e More X86 floating point patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24990 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 07:31:11 +00:00
Evan Cheng
d13b00e103 Operand 1 of TRUNCSTORE can be any of integer and floating point types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24989 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 07:30:30 +00:00
Evan Cheng
f3fd9fe20d Allow custom lowering of LOAD, EXTLOAD, ZEXTLOAD, STORE, and TRUNCSTORE. Not
currently used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24988 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 07:29:34 +00:00
Chris Lattner
330ea12667 fix something-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24987 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 07:08:39 +00:00
Chris Lattner
74fa64b072 implement vaarg. Varargs now should work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24986 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 06:37:38 +00:00
Chris Lattner
c4769bb529 implement vastart. The dag isel compiles this:
void test3(va_list Y);
void test2(int F, ...) {
  va_list X;
  va_start(X, F);
  test3(X);
}

into this:

test2:
        save -104, %o6, %o6
        st %i5, [%i6+88]
        st %i4, [%i6+84]
        st %i3, [%i6+80]
        st %i2, [%i6+76]
        st %i1, [%i6+72]
        add %i6, 72, %o0
        st %o0, [%i6+-4]
        call test3
        nop
        restore %g0, %g0, %g0
        retl
        nop

The simple isel emits:

test2:
        save -96, %o6, %o6
        st %i0, [%i6+68]
        st %i1, [%i6+72]
        st %i2, [%i6+76]
        st %i3, [%i6+80]
        st %i4, [%i6+84]
        st %i5, [%i6+88]
        or %g0, 1, %l0
        or %g0, 4, %l1
        umul %l0, %l1, %l0
        add %l0, 7, %l0
        and %l0, -8, %l0
        sub %o6, %l0, %o6
        add %o6, 96, %l0
        add %i6, 72, %l1
        st %l1, [%l0]
        ld [%l0], %o0
        call test3
        nop
        restore %g0, %g0, %g0
        retl
        nop


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24985 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 06:24:04 +00:00
Chris Lattner
e6ee868a8d remove benchmark list, remove issues addressed by the dag-dag isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24984 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 06:09:30 +00:00
Chris Lattner
c33baaafb6 Simplify store(bitconv(x)) to store(x). This allows us to compile this:
void bar(double Y, double *X) {
  *X = Y;
}

to this:

bar:
        save -96, %o6, %o6
        st %i1, [%i2+4]
        st %i0, [%i2]
        restore %g0, %g0, %g0
        retl
        nop

instead of this:

bar:
        save -104, %o6, %o6
        st %i1, [%i6+-4]
        st %i0, [%i6+-8]
        ldd [%i6+-8], %f0
        std  %f0, [%i2]
        restore %g0, %g0, %g0
        retl
        nop

on sparcv8.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24983 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:48:07 +00:00
Chris Lattner
5710410dea fold (conv (load x)) -> (load (conv*)x).
This allows us to compile this:
void foo(double);
void bar(double *X) { foo(*X); }

To this:

bar:
        save -96, %o6, %o6
        ld [%i0+4], %o1
        ld [%i0], %o0
        call foo
        nop
        restore %g0, %g0, %g0
        retl
        nop

instead of this:

bar:
        save -104, %o6, %o6
        ldd [%i0], %f0
        std %f0, [%i6+-8]
        ld [%i6+-4], %o1
        ld [%i6+-8], %o0
        call foo
        nop
        restore %g0, %g0, %g0
        retl
        nop

on SparcV8.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24982 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:44:41 +00:00
Chris Lattner
c8547d856d Fold bitconv(bitconv(x)) -> x. We now compile this:
void foo(double);
void bar(double X) { foo(X); }

to this:

bar:
        save -96, %o6, %o6
        or %g0, %i0, %o0
        or %g0, %i1, %o1
        call foo
        nop
        restore %g0, %g0, %g0
        retl
        nop

instead of this:

bar:
        save -112, %o6, %o6
        st %i1, [%i6+-4]
        st %i0, [%i6+-8]
        ldd [%i6+-8], %f0
        std %f0, [%i6+-16]
        ld [%i6+-12], %o1
        ld [%i6+-16], %o0
        call foo
        nop
        restore %g0, %g0, %g0
        retl
        nop

on V8.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24981 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:37:50 +00:00
Chris Lattner
94683777ae constant fold bits_convert in getNode and in the dag combiner for fp<->int
conversions.  This allows V8 to compiles this:

void %test() {
        call float %test2( float 1.000000e+00, float 2.000000e+00, double 3.000000e+00, double* null )
        ret void
}

into:

test:
        save -96, %o6, %o6
        sethi 0, %o3
        sethi 1049088, %o2
        sethi 1048576, %o1
        sethi 1040384, %o0
        or %g0, %o3, %o4
        call test2
        nop
        restore %g0, %g0, %g0
        retl
        nop

instead of:

test:
        save -112, %o6, %o6
        sethi 0, %o4
        sethi 1049088, %l0
        st %o4, [%i6+-12]
        st %l0, [%i6+-16]
        ld [%i6+-12], %o3
        ld [%i6+-16], %o2
        sethi 1048576, %o1
        sethi 1040384, %o0
        call test2
        nop
        restore %g0, %g0, %g0
        retl
        nop


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24980 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:30:37 +00:00
Chris Lattner
21f66859e4 make sure bit_convert's are expanded
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24979 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:15:23 +00:00
Chris Lattner
53e884587b make sure bit_converts are expanded
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24978 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:13:35 +00:00
Chris Lattner
3cb7187d5f fix the int<->fp instructions, which apparently take a single float register
to represent the int part (because it's always 32-bits)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24976 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:00:16 +00:00
Chris Lattner
a01874fc89 Use BIT_CONVERT to simplify this code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24975 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 02:31:39 +00:00
Chris Lattner
1b95e0ba92 Simplify some code by using BIT_CONVERT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24974 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 00:59:59 +00:00
Chris Lattner
232348d66f Fix a pasto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24973 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 00:52:30 +00:00
Chris Lattner
ed7b5babfb fix a thinko in the bit_convert handling code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24972 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 00:50:25 +00:00
Chris Lattner
35481892da add very simple support for the BIT_CONVERT node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24970 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 00:16:34 +00:00
Reid Spencer
14f497452f Revert previous patch. Additional tests fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24968 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 21:46:37 +00:00
Chris Lattner
a01c0ccb63 clean up .td file by using evan's new FLAG thing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24967 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 21:18:39 +00:00
Chris Lattner
0fcd40f501 remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24965 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 21:16:08 +00:00
Chris Lattner
cec26fc3bf fix handling of weak linkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24964 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 21:15:17 +00:00
Reid Spencer
84c744fe58 Fix PR409:
Implement the suggested check to ensure that out-of-range float constants
don't get accepted by LLVM accidentally. Adjust the supporting test cases
as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24963 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 21:07:29 +00:00
Reid Spencer
d555f413cd For PR351:
* Allow the ExecuteAndWait to return negative values if a signal is
  detected as the reason for the child termination. This is needed to
  support bugpoint detecting bad things in its child processes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24960 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 20:00:16 +00:00
Chris Lattner
39706e68a5 move some random notes out of my email into someplace useful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24956 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 17:19:28 +00:00
Duraid Madina
64aa0ea4e9 this is a hack, which may or may not hang around. In short:
whimper out of doing things the Right Way, and hack up a generic
'BRCALL' instruction, that gets generated when calls are lowered.
This gets selected by hand in the DAG isel, where it gets turned
into real (i.e. in tablegen) br.call instructions.

BUG: this dies on void calls, but seems to work otherwise?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24952 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 13:29:14 +00:00
Duraid Madina
8617f3cf14 we can't do this directly in lowering, so we need this case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24951 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 07:14:45 +00:00
Duraid Madina
3d821e26a1 oops, back this out
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24950 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 07:13:51 +00:00
Duraid Madina
a6ec3cbac1 we can't all have brains now, can we
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24948 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 06:41:39 +00:00
Duraid Madina
98b3a83d83 this should take care of calls to varadic functions, but it doesn.,t
BUG: calling printf(string, float) will load the float into the wrong
register, completely forget about loading the string, etce


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24947 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 06:39:57 +00:00
Duraid Madina
0b3c4d8221 we need to emit the getf.d instruction in lowering, so add it
to IA64ISD


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24946 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 06:38:38 +00:00
Chris Lattner
03839956e2 Separate the call graph implementation from its interface. This implements
the rough idea sketched out in http://nondot.org/sabre/LLVMNotes/CallGraphClass.txt,
allowing new spiffy implementations of the callgraph interface to be built.

Many thanks to Saem Ghani for contributing this!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24944 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 06:07:52 +00:00
Chris Lattner
1ccf26a639 The 81st column doesn't like code in it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24943 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 05:23:45 +00:00
Duraid Madina
98d1378343 I shoulda done this a *long* time ago (tm): implement calls properly,
i.e. r1/r12/rp are saved/restored regardless of scheduling/luck

TODO: calls to external symbols, indirect (function descriptor) calls,
      performance (we're being paranoid right now)

BUG: the code for handling calls to vararg functions breaks if FP
args are passed (this will make printf() go haywire so a bunch of
tests will fail)

BUG: this seems to trigger some legalize nastiness


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24942 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 04:07:40 +00:00
Duraid Madina
a36153a961 kill SelectCALL() in the DAG isel, we handle this in lowering now, like
SPARCv8. (we copy sparcv8's workaround for tablegen not being nice about
ISD::CALL/TAILCALL)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24941 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 03:58:17 +00:00
Duraid Madina
a0a11d289d update tablegen files - nothing to see here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24939 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 03:56:03 +00:00
Reid Spencer
a6d50d4292 For PR351:
Move the system dependent portion to lib/System/*/Alarm.inc. This makes the
SlowOperationInformer platform independent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24938 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 03:31:26 +00:00
Reid Spencer
b13cf98e6b Implement a generic polled Alarm function. This merely removes the system
dependent portion of the lib/Support/SlowOperationTimer code into the
lib/System implementation where it can be ported to different platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24937 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 03:23:46 +00:00
Evan Cheng
5bc4da4893 Bye bye HACKTROCITY.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24935 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 02:26:21 +00:00
Evan Cheng
351dc967ba Added special flag node FLAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24934 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 02:25:14 +00:00
Reid Spencer
780c861733 Add an eol at the end to shut gcc sup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24926 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 01:41:00 +00:00
Evan Cheng
ff9be11da2 Lefted out TargetLowering::
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24922 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 23:14:54 +00:00
Evan Cheng
3a03ebb377 * Fix a GlobalAddress lowering bug.
* Teach DAG combiner about X86ISD::SETCC by adding a TargetLowering hook.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24921 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 23:05:39 +00:00
Evan Cheng
793ca4caa4 Oops. Accidentally deleted RET pattern. It's still needed for return void;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24920 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 22:22:16 +00:00
Jim Laskey
e81aecbae6 Disengage DEBUG_LOC from non-PPC targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24919 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 20:51:37 +00:00
Evan Cheng
d5781fca4f * Added support for X86 RET with an additional operand to specify number of
bytes to pop off stack.
* Added support for X86 SETCC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24917 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 20:21:51 +00:00
Jim Laskey
e503289977 Start of Dwarf framework.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24914 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 19:48:16 +00:00
Chris Lattner
f9dee6a047 make sure to relegalize all cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24911 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 19:40:42 +00:00
Chris Lattner
9797c5cc3e enable the gep isel opt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24910 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 19:36:36 +00:00
Chris Lattner
524a1313da Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24908 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 18:31:50 +00:00
Chris Lattner
0a01783d7c allow logical operators on packed integral types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24907 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 18:31:29 +00:00
Chris Lattner
b9d4100f32 Get logical operations to like packed types, allow BinOp::getNot to create
the right vector of -1's as its operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24906 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 18:22:19 +00:00
Chris Lattner
8339736334 fix a bug I introduced that broke recursive expansion of nodes (e.g. scalarizing vectors)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24905 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 18:02:52 +00:00
Chris Lattner
7aa6189629 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24904 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 17:53:23 +00:00
Chris Lattner
f1f03dfc66 Implement Regression/Assembler/2005-12-21-ZeroInitVector.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24903 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 17:53:02 +00:00
Chris Lattner
5c82f4dcdc add some nodes, forgot to commit this last night :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24901 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 16:22:46 +00:00
Chris Lattner
c515ad18f8 This was meant to go in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24900 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 07:50:26 +00:00
Chris Lattner
58fe459e36 Rewrite FP stackifier support in the X86InstrInfo.td file, splitting patterns
that were overloaded to work before and after the stackifier runs.  With the
new clean world, it is possible to write patterns for these instructions: woo!

This also adds a few simple patterns here and there, though there are a lot
still missing.  These should be easy to add though. :)

See the comments under "Floating Point Stack Support" for more details on
the new world order.

This patch as absolutely no effect on the generated code, woo!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24899 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 07:47:04 +00:00
Chris Lattner
9fb2422c49 Wrap some long lines: no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24898 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 05:34:58 +00:00
Chris Lattner
7669a51c34 remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24896 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 05:27:51 +00:00
Chris Lattner
3b841e9f52 Lower ConstantAggregateZero into zeros
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24890 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 02:43:26 +00:00
Evan Cheng
8263c5e920 Remove ISD::RET select code. Now tblgen'd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24889 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 02:41:57 +00:00
Evan Cheng
b077b842b6 * Added lowering hook for external weak global address. It inserts a load
for Darwin.
* Added lowering hook for ISD::RET. It inserts CopyToRegs for the return
  value (or store / fld / copy to ST(0) for floating point value). This
  eliminate the need to write C++ code to handle RET with variable number
  of operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24888 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 02:39:21 +00:00
Chris Lattner
8de324b59c Don't emit a null terminator, nor anything after it, to the ctor/dtor list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24887 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 01:17:37 +00:00
Evan Cheng
bbc8ddbea3 SSE2 floating point load / store patterns. SSE2 fp to int conversion patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24886 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 22:59:51 +00:00
Evan Cheng
6a3bfd97f2 Flip the meaning of FPContractions to reflect Requires<[]> change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24884 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 20:08:53 +00:00
Chris Lattner
aca0901dd3 Run lower-switch after lower-invoke.
Only run lower-allocations and lower-select for the simple isel


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24881 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 08:00:11 +00:00
Chris Lattner
85e42b45ac Reserve G1 for frame offset stuff and use it to handle large stack frames.
For example, instead of emitting this:

test:
        save -40112, %o6, %o6   ;; imm too large
        add %i6, -40016, %o0    ;; imm too large
        call caller
        nop
        restore %g0, %g0, %g0
        retl
        nop

emit this:

test:
        sethi 4194264, %g1
        or %g1, 848, %g1
        save %o6, %g1, %o6
        sethi 4194264, %g1
        add %g1, %i6, %g1
        add %i1, 944, %o0
        call caller
        nop
        restore %g0, %g0, %g0
        retl
        nop

which doesn't cause the assembler to barf.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24880 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 07:56:31 +00:00
Evan Cheng
a5386b0823 Added X86 readport patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24879 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 07:38:38 +00:00
Evan Cheng
7226158d7e Added a hook to print out names of target specific DAG nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24877 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 06:22:03 +00:00
Chris Lattner
69a889eb35 Fix a nasty latent bug in the legalizer that was triggered by my patch
last night, breaking crafty and twolf.  Make sure that the newly found
legal nodes are themselves not re-legalized until the next iteration.

Also, since this functionality exists now, we can reduce number of legalizer
iterations by depending on this behavior instead of having to misuse 'do
another iteration' to get the same effect.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24875 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 00:53:54 +00:00
Nate Begeman
9e4dd9dfc9 Pattern-match return. Includes gross hack!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24874 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 00:26:01 +00:00
Nate Begeman
88276b887c Fix a couple of the FIXMEs, thanks to suggestion from Chris. This allows
us to load and store vectors directly at a pointer (offset of zero) by
using r0 as the base register.  This also requires some asm printer work
to satisfy the darwin assembler.

For
void %foo(<4 x float> * %a) {
entry:
  %tmp1 = load <4 x float> * %a;
  %tmp2 = add <4 x float> %tmp1, %tmp1
  store <4 x float> %tmp2, <4 x float> *%a
  ret void
}

We now produce:
_foo:
        lvx v0, 0, r3
        vaddfp v0, v0, v0
        stvx v0, 0, r3
        blr

Instead of:
_foo:
        li r2, 0
        lvx v0, r2, r3
        vaddfp v0, v0, v0
        stvx v0, r2, r3
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24872 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 23:40:42 +00:00
Nate Begeman
7fd1edd32e Convert load/store over to being pattern matched
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24871 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 23:25:09 +00:00
Evan Cheng
898101c15f X86 conditional branch support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24870 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 23:12:38 +00:00
Evan Cheng
115c036a4c Print out opcode number if it's an unknown target node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24869 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 23:11:49 +00:00
Evan Cheng
fcaa9957c9 It's essential we clear CodeGenMap after isel every basic block!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24867 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 22:36:02 +00:00
Chris Lattner
9f8cc69009 Fix a case where the DAG Combiner would accidentally CSE flag-producing nodes,
creating graphs that cannot be scheduled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24866 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 22:21:21 +00:00
John Criswell
61af913224 Prefix DSA specific options with dsa.
Make the dsa-alloc-list and dsa-free-list options hidden.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24864 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 20:14:38 +00:00
John Criswell
3075160664 Added an option to specify the names of heap freeing functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24863 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 19:54:23 +00:00
John Criswell
fa70052063 Added a command line option that allows the user to specify a list of
functions that allocate memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24862 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 17:38:39 +00:00
Jim Laskey
d845582d4a Amend comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24861 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 16:32:26 +00:00
Jim Laskey
de48ee28a3 Create a strong dependency for loads following stores. This will leave a
latency period between the two.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24860 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 16:30:13 +00:00
Chris Lattner
7c423b4df1 Fix pifft by correcting the case when a i64/f64 straddles O5 and memory:
we were storing into [FP+88] instead of [FP+92].
Improve codegen by emitting [FP+92], instead of emitting a copy of FP into
another GPR which wouldn't be coallesced because FP isn't register allocated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24859 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 07:57:53 +00:00
Chris Lattner
43875e63f3 don't emit 'add %o6, 0, %o6' instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24857 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 02:51:12 +00:00
Chris Lattner
eb0966693b Fix calls to functions returning i64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24856 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 02:15:51 +00:00
Chris Lattner
bcfdec73d1 Correct bool truncstore operand order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24855 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 02:06:50 +00:00
Chris Lattner
e2d97f8399 add the other bool zextload as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24854 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 01:44:58 +00:00
Chris Lattner
a1251f24b5 implement zextload bool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24853 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 01:43:04 +00:00
Chris Lattner
61772c20ee mark some unsupported ops as unsupported
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24852 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 01:39:40 +00:00
Chris Lattner
96d5bb79d4 Fix syntax for indirect calls. This fixes Olden/mst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24850 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 01:22:53 +00:00
Chris Lattner
6554beffe4 Keep stack frames 8-byte aligned. This fixes olden/voronoi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24849 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 01:15:13 +00:00
Chris Lattner
97561fc2eb apparently rdy isn't actually a psuedo instruction. Use rd %y
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24848 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 00:53:02 +00:00
Chris Lattner
beecfd2b2d add fneg/fabs support for doubles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24847 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 00:50:12 +00:00
Chris Lattner
da5a7fd8d4 Various cleanups to this pass, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24846 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 00:46:20 +00:00
Chris Lattner
f53d0bfbfd add bool truncstores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24845 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 00:19:21 +00:00
Chris Lattner
8ba0423660 Elimiante SP and FP, which weren't members of the IntRegs register class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24844 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 00:06:52 +00:00
Chris Lattner
e773673d8e Make sure to relegalize new nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24843 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 23:54:29 +00:00
Chris Lattner
379e6c0369 The sun assembler only supports .xword in V9 mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24842 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 23:36:45 +00:00
Chris Lattner
7a48e5018b Configure the asmwriter to allow constant pools to be printed correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24841 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 23:35:05 +00:00
Chris Lattner
b04c5c8eb2 add support for integer extloads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24840 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 23:18:37 +00:00
Chris Lattner
20ad53ffd7 Add support for undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24839 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 23:10:57 +00:00
Chris Lattner
311f8c21d0 Add support for calls to external symbols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24838 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 23:07:11 +00:00
Chris Lattner
e90ac3a3e7 we have no memcpy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24837 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 23:00:27 +00:00
Chris Lattner
b4d899e21c Fix a crash on a call with no arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24836 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 22:57:47 +00:00
Jeff Cohen
18840db533 Keep VC++ happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24835 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 22:20:05 +00:00
Chris Lattner
cf198eca97 This is handled by the autogen'd code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24834 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 21:06:11 +00:00
Chris Lattner
dab05f0e19 Change return lowering so that we can autogen the matching code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24832 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 21:03:04 +00:00
Chris Lattner
2db3ff66f1 Implement Calls for V8. This would be completely autogenerated except for
a small bug in tblgen.  When that is fixed, we can remove the ISD::Call case
in Select.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24830 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 15:55:15 +00:00
Chris Lattner
f1a47c3371 More corrections for flagged copyto/from reg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24828 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 15:36:21 +00:00
Chris Lattner
7310fb11f2 legalize copytoreg and copyfromreg nodes that have flag operands correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24826 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 15:27:43 +00:00
Chris Lattner
384e5efc0e Implement the full V8 ABI for incoming arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24825 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 13:33:06 +00:00
Chris Lattner
eee99bd459 Push ops list, asm string, and pattern all the way up to InstV8. Move the
InstV8 class to the InstrFormats file where it belongs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24824 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 08:21:00 +00:00
Chris Lattner
3308449afc Give V8 select_cc, in the spirit of the PPC backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24823 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 08:13:54 +00:00
Chris Lattner
98f853698c remove some unused instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24822 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 07:15:17 +00:00
Chris Lattner
065c896b7a V8 doesn't have FP extload
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24821 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 07:13:32 +00:00
Chris Lattner
d5aae05281 simplifications, fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24820 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 07:09:06 +00:00
Chris Lattner
737f631532 add a node, for completeness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24819 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 07:05:21 +00:00
Chris Lattner
8fa54dc702 Add frameindex support
Add support for copying (e.g. returning) doubles
Add support for F<->I instructions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24818 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 06:59:57 +00:00
Chris Lattner
abfc2a7363 Tighten up some checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24817 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 06:40:34 +00:00
Jim Laskey
bd2b621486 Fix a bug Sabre was having where the DAG root was a group. The group dominator
needed to be added to the ordering list, not the first member of the group.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24816 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 04:40:52 +00:00
Jim Laskey
9022ed955a Groups were not emitted if the dominator node and the node in the ordering list
were not the same node.  Ultimately the test was bogus.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24815 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 03:59:21 +00:00
Nate Begeman
6aa45292c6 Since extload can also be used by FP, split STDIntExtLoad into two parts,
one for use with extload, one for use with sextload and zextload, which
are integer only.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24814 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 02:48:48 +00:00
Chris Lattner
76acc872b3 Add constant pool support, including folding into addresses.
Pretty print addresses a bit, to not print [%r1+%g0]: just print [%r1]


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24813 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 02:37:35 +00:00
Chris Lattner
e1389ad43a Teach the addressing mode stuff to fold "%lo" into 'ri' addressing modes,
allowing us to compile this:

to this:

%G1 = external global int
%G2 = external global int
void %test() {
        %X = load int* %G1
        store int %X, int* %G2
        ret void
}

test:
        save -96, %sp, %sp
        sethi %hi(G1), %l0
        ld [%l0+%lo(G1)], %l0
        sethi %hi(G2), %l1
        st %l0, [%l1+%lo(G2)]
        restore %g0, %g0, %g0
        retl
        nop

instead of this:

test:
        save -96, %sp, %sp
        sethi %hi(G1), %l0
        or %g0, %lo(G1), %l1
        ld [%l1+%l0], %l0
        sethi %hi(G2), %l1
        or %g0, %lo(G2), %l2
        st %l0, [%l2+%l1]
        restore %g0, %g0, %g0
        retl
        nop


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24812 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 02:27:00 +00:00
Chris Lattner
e357246c6b Add initial support for global variables, and fix a bug in addr mode selection
where we didn't select the operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24811 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 02:10:39 +00:00
Chris Lattner
04dd673aea Claiming that branch targets are registers is not very wholesome. Change them
to be basic blocks.  Also, add uncond branches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24810 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 01:46:58 +00:00
Chris Lattner
456b9400dc Add unordered comparisons
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24809 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 01:41:39 +00:00
Chris Lattner
5b2dfc7cc1 Add patterns to the rest of the int condbranches and some of the fp branches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24808 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 01:38:19 +00:00
Chris Lattner
4d55aca87a Add initial conditional branch support. This doesn't actually work yet due
to a bug in the scheduler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24807 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 01:20:35 +00:00
Chris Lattner
a5282d8df2 Simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24806 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 01:03:46 +00:00
Chris Lattner
38abcb500f Eliminate CMPri, which is a synonym for SUBCCri
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24805 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 23:52:08 +00:00
Chris Lattner
181b7a382f allow custom expansion of BR_CC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24804 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 23:46:46 +00:00
Chris Lattner
294974bd57 add fneg,fabs,fsqrt instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24803 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 23:20:27 +00:00
Chris Lattner
b4d5172af9 Add patterns for fround/fextend and the funny fsmuld instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24802 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 23:14:30 +00:00
Chris Lattner
10c6aed73c Add FP +,-,*,/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24801 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 23:10:46 +00:00
Chris Lattner
558bfe0cf5 Give patterns to F3_3 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24800 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 23:05:35 +00:00
Chris Lattner
d19fc65345 Implement 64-bit add/sub, make sure to receive and return 64-bit args with
the right halves in the right regs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24799 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 22:55:57 +00:00
Chris Lattner
7087e57872 implement div and rem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24798 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 22:39:19 +00:00
Chris Lattner
ee3d5fba54 implement MULHU/MULHS for 64-bit multiplies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24797 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 22:30:00 +00:00
Chris Lattner
37949f5c2b Add patterns for multiply, simplify Y register handling stuff, add RDY instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24796 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 22:22:53 +00:00
Chris Lattner
9034b883a4 Make the addressing modes smarter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24795 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 21:25:27 +00:00
Chris Lattner
87a63f812c remove some unused instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24794 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 21:13:50 +00:00
Chris Lattner
2cfdbb2716 add andn/orn/xorn patterns. This allows us to compile this:
long %test(ubyte, short, long %X, long %Y) {
  %A = xor long %X, -1
  %B = and long %Y, %A
  ret long %B
}

to this:

test:
        save -96, %sp, %sp
        andn %i4, %i2, %i0
        andn %i5, %i3, %i1
        restore %g0, %g0, %g0
        retl
        nop

instead of this:

test:
        save -96, %sp, %sp
        xor %i2, -1, %l0
        xor %i3, -1, %l1
        and %i4, %l0, %i0
        and %i5, %l1, %i1
        restore %g0, %g0, %g0
        retl
        nop

The simpleisel emits:  :(

test:
        save -96, %sp, %sp
        or %g0, -1, %l0
        or %g0, -1, %l0
        or %g0, -1, %l0
        or %g0, -1, %l1
        xor %i2, %l0, %l0
        xor %i3, %l1, %l1
        and %i4, %l0, %i0
        and %i5, %l1, %i1
        restore %g0, %g0, %g0
        retl
        nop


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24793 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 21:05:49 +00:00
Chris Lattner
217aabf89e Add support for 64-bit arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24792 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 20:59:06 +00:00
Chris Lattner
9a60ff654a Sparc doesn't have sext_inreg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24791 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 20:50:42 +00:00
Chris Lattner
53ec2035eb add patterns for FP stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24790 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 20:47:16 +00:00
Chris Lattner
d55e1ca5ef Add [reg+reg] integer stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24789 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 20:44:36 +00:00
Chris Lattner
d30a630636 Add store patterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24788 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 20:42:55 +00:00
Chris Lattner
0b218434cc add truncstore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24787 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 20:42:29 +00:00
Chris Lattner
b575baf57d add fp load patterns, switch rest of loads and stores to use addrmodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24786 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 20:32:47 +00:00
Chris Lattner
1963783fab Add integer load[r+r] forms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24785 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 20:26:45 +00:00
Chris Lattner
331355cf7d Rename load/store instructions to include an RI suffix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24784 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 20:18:49 +00:00
Chris Lattner
84e2abf116 Add patterns for the rest of the loads. Add 'ri' suffixes to the load and store insts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24783 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 20:18:24 +00:00
Chris Lattner
bc83fd9672 Add basic addressing mode support and one load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24782 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 20:04:49 +00:00
Chris Lattner
4543251834 eliminate some redundancy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24781 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 19:47:05 +00:00
Chris Lattner
b71f9f8488 Use a combination of sethi and or to build arbitrary immediates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24780 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 19:41:43 +00:00
Chris Lattner
57dd3bc460 Use sethi to build large immediates with zeros at the bottom
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24779 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 19:37:00 +00:00
Chris Lattner
d2cd46676c Add shift and small immediate support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24778 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 19:07:57 +00:00
Chris Lattner
f83cee6ac1 Add some basic reg-reg instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24777 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 18:53:33 +00:00
Chris Lattner
e33a3ff942 Add empty patterns to all F3_1 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24776 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 18:49:14 +00:00
Evan Cheng
bdce7b4090 Darwin API issue: indirect load of external and weak symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24775 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 09:13:43 +00:00
Chris Lattner
7b0902dcf8 Add some simple integer patterns. This allows us to compile this:
int %test(int %A) {
  %B = add int %A, 1
  %C = xor int %B, 123
  ret int %C
}

into this:

test:
        save -96, %sp, %sp
        add %i0, 1, %l0
        xor %l0, 123, %i0
        restore %g0, %g0, %g0
        retl
        nop

for example.  I guess it would make sense to add reg/reg versions too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24774 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 08:26:38 +00:00
Chris Lattner
4b4863188f Implement ret with operand, giving us this:
int %test(int %A) {
  ret int %A
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24773 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 08:15:09 +00:00
Chris Lattner
bc3d362d5b Add a pattern for 'ret'. This now compiles:
void %test() { ret void }

:)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24772 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 08:08:42 +00:00
Chris Lattner
f3bf50d2c8 Add empty patterns for F3_2 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24771 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 08:06:43 +00:00
Chris Lattner
a01b75758c Implement LowerArguments, at least for the first 6 integer args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24770 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 08:03:24 +00:00
Chris Lattner
6c18b10ad4 Add the framework for a dag-dag isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24769 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 07:47:01 +00:00
Evan Cheng
433dbdaa63 Remove a few lines of dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24768 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 07:18:44 +00:00
Chris Lattner
576e46fc67 asmprinter done, added crucial missing step
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24767 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 07:17:59 +00:00
Chris Lattner
967abf37c5 Use the AsmPrinter for global variable init printing. This eliminates a
bunch of code and causes V8 to start using the fancy .asciz directive that
the sun assembler supports.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24766 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 07:17:08 +00:00
Chris Lattner
b5e9eb6089 Switch constant pool printing over to use the Shared AsmPrinter version
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24765 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 07:11:43 +00:00
Chris Lattner
1dbed16fec Use the shared AsmPrinter code for some basic stuff. No functionality
change except for fewer .section directives emitted


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24764 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 07:04:29 +00:00
Evan Cheng
98abbfb2ef Added an idea about any_extend for performance tuning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24763 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 06:54:43 +00:00
Chris Lattner
0d8fcd3218 Convert the remaining instructions over, branches and calls. Fix a couple
minor bugs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24762 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 06:54:41 +00:00
Chris Lattner
dc6938ac23 convert FP instructions to use an asmstring and operand list, allowing FP
programs to work on V8 again


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24761 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 06:32:52 +00:00
Evan Cheng
45f37bc527 Added truncate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24760 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 02:02:50 +00:00
Evan Cheng
1aabc4ea15 Added anyext, modelled as zext on X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24759 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 01:47:57 +00:00
Evan Cheng
8dee8cca3a Added some isel ideas.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24757 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 01:25:19 +00:00
Evan Cheng
aed7c721df Added support for cmp, test, and conditional move instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24756 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 01:24:02 +00:00
Evan Cheng
56323c761a Only lower SELECT when using DAG based isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24755 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 01:22:13 +00:00
Evan Cheng
7df96d6672 X86 lowers SELECT to a cmp / test followed by a conditional move.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24754 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 01:21:05 +00:00
Jim Laskey
f5395cee6a Added source file/line correspondence for dwarf (PowerPC only at this point.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24748 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 22:45:29 +00:00
Chris Lattner
d9e0ba49a4 Weak and linkonce global vars should still have a .globl emitted for them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24747 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 21:46:14 +00:00
Nate Begeman
f492f9901a Add a second vector type to the VRRC register class, and fix some patterns
so that tablegen can infer all types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24746 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 09:19:13 +00:00
Chris Lattner
0647bf6965 add some notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24745 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 07:20:53 +00:00
Chris Lattner
13e1501c91 Add a couple more instrs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24744 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 07:18:48 +00:00
Chris Lattner
3c1c514fae remove some dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24743 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 07:16:02 +00:00
Chris Lattner
17392e026a asmprint pseudo instrs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24742 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 07:13:26 +00:00
Chris Lattner
d4f2ab5e00 Autogenerate asmprinter for F3_2 instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24741 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 07:10:02 +00:00
Chris Lattner
1c4f435603 Switch F3_1 instructions over to use AsmStrings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24740 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 06:52:00 +00:00
Chris Lattner
994b735de8 Plug in basic hooks for an autogenerated asm printer to fill in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24739 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 06:34:17 +00:00
Chris Lattner
96b84beb77 Add operand info for F3_[12] instructions, getting V8 back to basic functionality.
With this, Regression/CodeGen/SparcV8/basictest.ll now passes.  Lets hear it
for regression tests :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24738 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 06:25:42 +00:00
Chris Lattner
03a83c90da Remove JIT support, which doesn't work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24736 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 06:06:07 +00:00
Chris Lattner
3ff5751683 add some simple operand info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24735 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 06:02:58 +00:00
Chris Lattner
a637c32e38 Update the darwin handling of linkonce & weak functions and GV stubs. This
should work in all permutations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24728 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 00:22:14 +00:00
Chris Lattner
272f998f6f Don't globalize internal functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24727 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 00:07:30 +00:00
Evan Cheng
cb17bac3a3 * Promote all 1 bit entities to 8 bit.
* Handling extload (1 bit -> 8 bit) and remove C++ code that handle 1 bit
zextload.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24726 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-15 19:49:23 +00:00
Chris Lattner
d0f6d18aa8 Don't create SEXTLOAD/ZEXTLOAD instructions that the target doesn't support
if after legalize.  This fixes IA64 failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24725 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-15 19:02:38 +00:00
Evan Cheng
502c5bb428 Added frameindex, constpool, globaladdr, and externalsym as root nodes of
leaaddr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24724 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-15 08:31:04 +00:00
Evan Cheng
543b4583d3 Added constpool, frameindex, and externalsym nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24723 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-15 08:29:48 +00:00
Evan Cheng
def941b41f Handling zero extension of 1 bit value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24722 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-15 01:02:48 +00:00
Evan Cheng
f6036a3f1b Use MOV8rm to load 1 bit value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24721 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-15 00:59:17 +00:00