Commit Graph

467 Commits

Author SHA1 Message Date
Andrew Lenharth 50d9caf6a4 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
llvm-svn: 25040
2005-12-29 01:06:12 +00:00
Andrew Lenharth 34e4782c95 Fix up immediate handling
llvm-svn: 25039
2005-12-29 00:50:08 +00:00
Andrew Lenharth 5bd1c2783b Restore some happiness to the JIT
llvm-svn: 25026
2005-12-27 06:25:50 +00:00
Andrew Lenharth 962dcbd572 Fix alpha regressions.
llvm-svn: 25025
2005-12-27 03:53:58 +00:00
Evan Cheng 14c53b45f5 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.

llvm-svn: 25017
2005-12-26 09:11:45 +00:00
Andrew Lenharth f520093eb3 add br pattern, unify JSR and BSR ISel instrs, and add BSR support for DAG
llvm-svn: 25011
2005-12-25 17:36:48 +00:00
Andrew Lenharth 0fce613eff All that just to lower div and rem
llvm-svn: 25008
2005-12-25 01:34:27 +00:00
Andrew Lenharth 5b18ed9e60 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
llvm-svn: 25003
2005-12-24 08:29:32 +00:00
Andrew Lenharth b9aaea3564 Unify the patterns for loads and stores. Now offset addressing should be
supported.  This almost completes memory operations.

llvm-svn: 25002
2005-12-24 07:34:33 +00:00
Andrew Lenharth 4621488965 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.

llvm-svn: 25001
2005-12-24 05:36:33 +00:00
Andrew Lenharth 636e1aed43 move loads and stores over. Smart addr selection comming
llvm-svn: 25000
2005-12-24 03:41:56 +00:00
Chris Lattner 177d7af5d5 remove dead code
llvm-svn: 24965
2005-12-22 21:16:08 +00:00
Jim Laskey 9e296bee9a Disengage DEBUG_LOC from non-PPC targets.
llvm-svn: 24919
2005-12-21 20:51:37 +00:00
Andrew Lenharth cd54254af3 fix FP selects
llvm-svn: 24672
2005-12-12 20:30:09 +00:00
Andrew Lenharth b8296181e0 restore a more restricted select
llvm-svn: 24668
2005-12-12 17:43:52 +00:00
Andrew Lenharth 20d0b81c04 FP select improvements (and likely breakage), oh and crazy people might want to *return* floating point values. Don't see why myself
llvm-svn: 24658
2005-12-11 03:54:31 +00:00
Andrew Lenharth 87bf2234b5 it helps if your conditionals are not reversed
llvm-svn: 24641
2005-12-09 00:45:42 +00:00
Andrew Lenharth 26473b6b58 fix divide and remainder
llvm-svn: 24628
2005-12-06 23:27:39 +00:00
Andrew Lenharth 973cd1c845 more decent branches for FP. I might have to make some intermediate nodes to actually be able to use the DAG for FPcmp
llvm-svn: 24625
2005-12-06 20:43:30 +00:00
Andrew Lenharth 29b7ef0065 OK, this does wonders for broken stuff
llvm-svn: 24624
2005-12-06 20:40:34 +00:00
Andrew Lenharth e788bbf6ef added instructions with inverted immediates
llvm-svn: 24614
2005-12-06 00:33:53 +00:00
Andrew Lenharth 08c4a775e6 yea, it helps to have your path set right when testing
llvm-svn: 24613
2005-12-05 23:41:45 +00:00
Andrew Lenharth 3c7c4d7508 These never trigger, but whatever
llvm-svn: 24612
2005-12-05 23:19:44 +00:00
Andrew Lenharth 5bfcd1e63a move this over to the dag
llvm-svn: 24609
2005-12-05 20:50:53 +00:00
Andrew Lenharth 9410433966 fix constant pool loads
llvm-svn: 24607
2005-12-05 17:51:02 +00:00
Andrew Lenharth 7bb09912c8 major think-o
llvm-svn: 24564
2005-12-01 17:48:51 +00:00
Nate Begeman 006bb04f3a Support multiple ValueTypes per RegisterClass, needed for upcoming vector
work.  This change has no effect on generated code.

llvm-svn: 24563
2005-12-01 04:51:06 +00:00
Andrew Lenharth ce68ef8073 Flags where I think I need them, quick, before the nightly tester starts
llvm-svn: 24560
2005-12-01 01:53:10 +00:00
Chris Lattner 4b25924d2a SelectNodeTo now returns its result, we must pay attention to it.
llvm-svn: 24552
2005-11-30 23:04:38 +00:00
Nate Begeman 6f8c1ace6e No longer track value types for asm printer operands, and remove them as
an argument to every operand printing function.  Requires some slight
tweaks to x86, the only user.

llvm-svn: 24541
2005-11-30 18:54:35 +00:00
Andrew Lenharth 7ffe3affda remove redundant code
llvm-svn: 24538
2005-11-30 17:14:11 +00:00
Andrew Lenharth ede966e8ee Make typesafe that which isn't: FCMOVxx
llvm-svn: 24536
2005-11-30 17:11:20 +00:00
Andrew Lenharth 873ed82a36 FPSelect and more custom lowering
llvm-svn: 24535
2005-11-30 16:10:29 +00:00
Andrew Lenharth 6db615df14 All sorts of stuff.
Getting in on the custom lowering thing, yay
evilness with fp setcc, yuck
trivial int select, hmmm
in memory args for functions, yay
DIV and REM, always handy.  They should be custom lowered though.

Lots more stuff compiles now (go go single source!).  Of course, none of it
probably works, but that is what the nightly tester can find out :)

llvm-svn: 24533
2005-11-30 07:19:56 +00:00
Chris Lattner 9c415364cf No targets support line number info yet.
llvm-svn: 24513
2005-11-29 06:16:21 +00:00
Andrew Lenharth d6a0308470 Fix warning, the better way. Really, this is what this instruction is for, so use it
llvm-svn: 24486
2005-11-22 20:59:00 +00:00
Andrew Lenharth 03390557fa Fix warning
llvm-svn: 24485
2005-11-22 20:56:05 +00:00
Andrew Lenharth 0294e33ea4 massive DAGISel patch. lots and lots more stuff compiles now
llvm-svn: 24483
2005-11-22 04:20:06 +00:00
Chris Lattner 882b9fa977 Switch to using the generic constant pool emitter impl, use shorter
CPI names

llvm-svn: 24466
2005-11-21 08:29:17 +00:00
Chris Lattner 99946fb63f Adjust to capitalized AsmPrinter method names
llvm-svn: 24456
2005-11-21 07:51:23 +00:00
Chris Lattner 9885c97088 Use PrivateGlobalPrefix for basic blocks
llvm-svn: 24451
2005-11-21 07:38:08 +00:00
Chris Lattner a43b832f7f Switch to the new shared SwitchSection
llvm-svn: 24450
2005-11-21 07:30:28 +00:00
Chris Lattner 2c0b435ba6 Rename SwitchSection -> switchSection to avoid conflicting with a future
change.

llvm-svn: 24443
2005-11-21 06:55:27 +00:00
Chris Lattner 8a4995e42a Start using PrivateGlobalPrefix correctly
llvm-svn: 24442
2005-11-21 06:51:52 +00:00
Andrew Lenharth 6bc51c6f34 prevent latent switch creation
llvm-svn: 24413
2005-11-18 13:57:03 +00:00
Andrew Lenharth 59eefd4787 who would have thought you would want to write into globals too
llvm-svn: 24381
2005-11-16 21:15:53 +00:00
Chris Lattner 54c8fcf303 unbreak the build
llvm-svn: 24339
2005-11-13 01:45:23 +00:00
Andrew Lenharth ab72424488 enable LSR by default on alpha
llvm-svn: 24337
2005-11-12 19:21:08 +00:00
Andrew Lenharth 2ba45d1ee9 fix more regressions
llvm-svn: 24335
2005-11-12 19:06:28 +00:00
Andrew Lenharth 56526ec1a9 fix READCYCLECOUNTER
llvm-svn: 24334
2005-11-12 19:04:09 +00:00
Andrew Lenharth 97e8207a05 fix yet more regressions
llvm-svn: 24308
2005-11-11 23:08:46 +00:00
Andrew Lenharth fab772045e generate chain result
llvm-svn: 24307
2005-11-11 23:02:55 +00:00
Andrew Lenharth 5b3b9d7052 Fix a bunch more alpha regressions
llvm-svn: 24304
2005-11-11 19:52:25 +00:00
Andrew Lenharth 01aa56397d continued readcyclecounter support
llvm-svn: 24300
2005-11-11 16:47:30 +00:00
Andrew Lenharth e373163e95 fix a bunch of regressions
llvm-svn: 24269
2005-11-10 16:59:55 +00:00
Andrew Lenharth 97a7fcfd2b whatever. Intermediate patch to see what breaks. Seems ok.
llvm-svn: 24260
2005-11-09 19:17:08 +00:00
Chris Lattner b28f214033 Add a new option to indicate we want the code generator to emit code quickly,not spending tons of time microoptimizing it. This is useful for an -O0style of build.
llvm-svn: 24233
2005-11-08 02:11:51 +00:00
Chris Lattner 5c7d731832 If the module has no t-t and the host is an alpha, default to using the Alpha BE
llvm-svn: 24110
2005-10-30 16:44:01 +00:00
Chris Lattner 85b184b292 Make -time-passes output prettier
llvm-svn: 24096
2005-10-29 16:45:02 +00:00
Andrew Lenharth 381cab36ed int comparison patterns
llvm-svn: 24020
2005-10-26 18:44:45 +00:00
Jim Laskey 75eab3ca63 Typo made worse x 2 - take 2.
llvm-svn: 24018
2005-10-26 18:07:50 +00:00
Jim Laskey b1f2cedbaa Typo x 2
llvm-svn: 24016
2005-10-26 17:50:22 +00:00
Andrew Lenharth 7ac194560e Simplify instinfo, set random bits on more fp insts, and fix 1 opcode
llvm-svn: 24014
2005-10-26 17:41:46 +00:00
Jim Laskey a2b5235fac Give full control of subtarget features over to table generated code.
llvm-svn: 24013
2005-10-26 17:30:34 +00:00
Jim Laskey 53ad110490 Add attribute name and type to SubtargetFeatures.
llvm-svn: 24012
2005-10-26 17:28:23 +00:00
Chris Lattner 26ee5953f7 The dag isel generator generates this now
llvm-svn: 23984
2005-10-25 20:36:10 +00:00
Jim Laskey db4621a5f5 Preparation of supporting scheduling info. Need to find info based on selected
CPU.

llvm-svn: 23974
2005-10-25 15:15:28 +00:00
Chris Lattner 03bf3a1763 Simplify this due to changes in the tblgen side
llvm-svn: 23908
2005-10-23 22:33:22 +00:00
Chris Lattner 766361e8f4 Autogen subtarget information from .td files.
llvm-svn: 23904
2005-10-23 22:15:34 +00:00
Chris Lattner 4b5921d4d8 Add subtarget feature/processor defns to the .td file
llvm-svn: 23903
2005-10-23 22:08:45 +00:00
Andrew Lenharth c6072af580 Add several things.
loads
branches
setcc
working calls
Global address
External addresses

now I can manage malloc calls.

llvm-svn: 23887
2005-10-23 03:43:48 +00:00
Andrew Lenharth 5a990417f8 Well, the Constant matching pattern works. Can't say much about calls or globals yet.
llvm-svn: 23884
2005-10-22 22:06:58 +00:00
Chris Lattner 229878b7bc silence a release mode warning
llvm-svn: 23868
2005-10-21 16:01:26 +00:00
Nate Begeman 62e9e5462c Kill some now-dead code.
llvm-svn: 23857
2005-10-21 01:52:20 +00:00
Andrew Lenharth a099c0131e byte zap not immediate goodness
llvm-svn: 23855
2005-10-21 01:24:05 +00:00
Andrew Lenharth a6a23b5874 Inst cleanup. As a bonus, operands are in the correct order for cmovs. Expect new stuff to pass in the JIT tonight
llvm-svn: 23852
2005-10-20 23:58:36 +00:00
Andrew Lenharth d4c0ed74e4 added a few 1 operand form stuff. Seems to break regalloc on alpha. sigh
llvm-svn: 23849
2005-10-20 19:39:24 +00:00
Andrew Lenharth eb0ad1863b Sounds good, finish the intop conversion.
llvm-svn: 23843
2005-10-20 14:42:48 +00:00
Chris Lattner fd07fcda67 Add some pattern fragments to simplify the repetitive parts of the patterns
for some common ops and use them for a few examples.  Andrew, if you like
this, feel free to convert the rest over, if you hate it, feel free to
revert.

llvm-svn: 23837
2005-10-20 04:21:06 +00:00
Chris Lattner cd4be8798f simplify this a bit by using immediates
llvm-svn: 23836
2005-10-20 03:57:03 +00:00
Andrew Lenharth 794f15868a forgot this one
llvm-svn: 23833
2005-10-20 00:29:02 +00:00
Andrew Lenharth 7b69867052 ret 0; works, not much else
still lots of uglyness.
Maybe calls will come soon.
Fixing the return value of things will be necessary to make alpha work.

llvm-svn: 23832
2005-10-20 00:28:31 +00:00
Andrew Lenharth 1dfb85c7af This seems useful from the original patch that added the function. If there is a reason it is not useful on a RISC type target, let me know and I will pull it out
llvm-svn: 23676
2005-10-09 20:11:35 +00:00
Andrew Lenharth e4c91fc9e8 This is suppose to work now
llvm-svn: 23644
2005-10-06 16:54:29 +00:00
Andrew Lenharth 332df13b9e remove VAX compatibility instruction, we will never use this
llvm-svn: 23643
2005-10-06 16:53:32 +00:00
Chris Lattner 98da1d9910 Sort the cpu and features table, so that the alpha backend doesn't fail EVERY
compile with an assertion that the tables are not sorted!

llvm-svn: 23591
2005-10-02 07:13:52 +00:00
Andrew Lenharth 49e48f6234 subtarget support for CIX and FIX extentions (the only 2 I care about right now)
llvm-svn: 23569
2005-09-30 20:24:38 +00:00
Chris Lattner a654525c1c Pass extra regclasses into spilling code
llvm-svn: 23537
2005-09-30 01:29:42 +00:00
Andrew Lenharth a7a83b9255 begining alpha subtarget support
llvm-svn: 23531
2005-09-29 22:54:56 +00:00
Chris Lattner 0815dcae3f Add FP versions of the binary operators, keeping the int and fp worlds seperate.
Though I have done extensive testing, it is possible that this will break
things in configs I can't test.  Please let me know if this causes a problem
and I'll fix it ASAP.

llvm-svn: 23505
2005-09-28 22:29:17 +00:00
Chris Lattner fb96e50b8c This code is no longer needed, it is moved to the target-indep code
llvm-svn: 23332
2005-09-13 19:31:44 +00:00
Chris Lattner 64685b4ca2 Majik numbers are bad
llvm-svn: 23330
2005-09-13 19:03:13 +00:00
Chris Lattner 7c8dba750c ignore generated files
llvm-svn: 23263
2005-09-07 23:47:44 +00:00
Andrew Lenharth a63a066205 Fix up the AssertXext problem, as well as adding it at calls
llvm-svn: 23246
2005-09-06 17:00:23 +00:00
Andrew Lenharth c8bd5bda59 revert part of the last change, should fix regressions
llvm-svn: 23241
2005-09-04 06:12:19 +00:00
Andrew Lenharth 9690a4f321 Pull out Lowering in preperation for multiple ISels. Oh, and get rid of some stuff
llvm-svn: 23220
2005-09-02 18:46:02 +00:00
Jim Laskey 19058c3989 1. Use SubtargetFeatures in llc/lli.
2. Propagate feature "string" to all targets.

3. Implement use of SubtargetFeatures in PowerPCTargetSubtarget.

llvm-svn: 23192
2005-09-01 21:38:21 +00:00
Chris Lattner c30405e0ee Change ConstantPoolSDNode to actually hold the Constant itself instead of
putting it into the constant pool.  This allows the isel machinery to
create constants that it will end up deciding are not needed, without them
ending up in the resultant function constant pool.

llvm-svn: 23081
2005-08-26 17:15:30 +00:00
Chris Lattner 8975de187f Put register classes in namespaces
llvm-svn: 22924
2005-08-19 18:50:46 +00:00
Chris Lattner 0faf0b7313 This code has always been dead for alpha
llvm-svn: 22915
2005-08-19 18:33:26 +00:00
Chris Lattner 8cbddfc8c5 mark variable arity instructions as such. Alpha wins the battle for
cleanest backend in this metric :)

llvm-svn: 22893
2005-08-19 00:51:37 +00:00
Chris Lattner 33900811ee Fix some bugs in the alpha backend, some of which I introduced yesterday,
and some that were preexisting.  All alpha regtests pass now.

llvm-svn: 22829
2005-08-17 17:08:24 +00:00
Andrew Lenharth 73370ba5fd thinko. Should fix s4addl.ll regression
llvm-svn: 22817
2005-08-17 00:47:24 +00:00
Chris Lattner 7c76278242 update the backends to work with the new CopyFromReg/CopyToReg/ImplicitDef nodes
llvm-svn: 22807
2005-08-16 21:56:37 +00:00
Nate Begeman 371e49515d Implement BR_CC and BRTWOWAY_CC. This allows the removal of a rather nasty
fixme from the PowerPC backend.  Emit slightly better code for legalizing
select_cc.

llvm-svn: 22805
2005-08-16 19:49:35 +00:00
Andrew Lenharth b65b1568ae isIntImmediate is a good Idea. Add a flavor that checks bounds while it is at it
llvm-svn: 22790
2005-08-15 14:31:37 +00:00
Andrew Lenharth 8c6701be6e match gcc's use of tabs, makes diffs easier
llvm-svn: 22764
2005-08-12 16:14:08 +00:00
Andrew Lenharth ca94102d3e .section cleanup, patch from Nicholas Riley
llvm-svn: 22763
2005-08-12 16:13:43 +00:00
Chris Lattner 6ec7745e80 Update the targets to the new SETCC/CondCodeSDNode interfaces.
llvm-svn: 22729
2005-08-09 20:21:10 +00:00
Andrew Lenharth 5adb830b30 No, IDEFs shouldn't be JITed
llvm-svn: 22648
2005-08-04 15:32:36 +00:00
Andrew Lenharth 3a18a39587 Alpha ABI specifies stack is always 16 byte alligned, and gcc does it, so I will too
llvm-svn: 22634
2005-08-03 22:33:21 +00:00
Chris Lattner 80e038c148 one more hunk that got dropped
llvm-svn: 22596
2005-08-02 19:35:29 +00:00
Chris Lattner 6667bdbaca Update to use the new MathExtras.h support for log2 computation.
Patch contributed by Jim Laskey!

llvm-svn: 22594
2005-08-02 19:26:06 +00:00
Andrew Lenharth ae97fff758 update function codes to reflect /su flags that have been added since this was written
llvm-svn: 22571
2005-08-01 20:06:01 +00:00
Andrew Lenharth 33bbf15147 use llabs not abs
llvm-svn: 22569
2005-08-01 17:47:28 +00:00
Jeff Cohen 546fd5944e Keep tabs and trailing spaces out.
llvm-svn: 22565
2005-07-30 18:33:25 +00:00
Andrew Lenharth 1ec48e8683 support bsr, and more .td simplification
llvm-svn: 22543
2005-07-28 18:14:47 +00:00
Andrew Lenharth b57b0baac0 get lazy JITing working. Some of shootout runs now
llvm-svn: 22538
2005-07-28 12:45:20 +00:00
Jeff Cohen 5f4ef3c5a8 Eliminate all remaining tabs and trailing spaces.
llvm-svn: 22523
2005-07-27 06:12:32 +00:00
Chris Lattner a5ec193118 fix some warnings when compiled with 32-bit hosts
llvm-svn: 22521
2005-07-27 05:58:01 +00:00
Andrew Lenharth 54b0b62ff0 fix compile error
llvm-svn: 22508
2005-07-23 07:46:48 +00:00
Andrew Lenharth 7dec1f3aa6 Handle more imm forms, and load small negative i32 constants without hitting memory (should do the same for arbitrary zero extended small negative constants)
llvm-svn: 22505
2005-07-22 22:24:01 +00:00
Andrew Lenharth c32843ed2b finally found the gcc defined constants
llvm-svn: 22502
2005-07-22 21:00:30 +00:00
Andrew Lenharth 55d045190e Alpha JIT (beta)
llvm-svn: 22500
2005-07-22 20:52:16 +00:00
Andrew Lenharth 02daecc7c6 simpilfy instruction encoding (and make the lines way shorter, aka Misha happification)
llvm-svn: 22499
2005-07-22 20:50:29 +00:00
Andrew Lenharth 20b534a4fd Fix povray and minor cleanups
llvm-svn: 22397
2005-07-12 04:20:52 +00:00
Chris Lattner 53676dfd33 Change *EXTLOAD to use an VTSDNode operand instead of being an MVTSDNode.
This is the last MVTSDNode.

This allows us to eliminate a bunch of special case code for handling
MVTSDNodes.

Also, remove some uses of dyn_cast that should really be cast (which is
cheaper in a release build).

llvm-svn: 22368
2005-07-10 01:56:13 +00:00
Chris Lattner 36db1ed06f Change TRUNCSTORE to use a VTSDNode operand instead of being an MVTSTDNode
llvm-svn: 22366
2005-07-10 00:29:18 +00:00
Andrew Lenharth 8d40dcbd18 clean up prolouge and epilouge
llvm-svn: 22346
2005-07-07 19:52:58 +00:00
Chris Lattner a7220851c0 Make several cleanups to Andrews varargs change:
1. Pass Value*'s into lowering methods so that the proper pointers can be
   added to load/stores from the valist
2. Intrinsics that return void should only return a token chain, not a token
   chain/retval pair.
3. Rename LowerVAArgNext -> LowerVAArg, because VANext is long gone.
4. Now that we have Value*'s available in the lowering methods, pass them
   into any load/stores from the valist that are emitted

llvm-svn: 22339
2005-07-05 19:58:54 +00:00
Andrew Lenharth 26fa89e0a7 check the correct VT
llvm-svn: 22332
2005-07-04 20:07:21 +00:00
Andrew Lenharth da852d51df fix loading address of fp symbols
llvm-svn: 22331
2005-07-03 20:06:13 +00:00
Andrew Lenharth 21da9b669e simplify call code, remove pseudo ops for div and rem, track more loads and stores
llvm-svn: 22323
2005-07-01 19:14:02 +00:00
Andrew Lenharth dd55b1566b simplify call code, remove pseudo ops for div and rem, track more loads and stores
llvm-svn: 22322
2005-07-01 19:12:13 +00:00
Andrew Lenharth 2edc1881ac restore old srcValueNode behavior and try to to work around it
llvm-svn: 22315
2005-06-29 18:54:02 +00:00
Andrew Lenharth 8192568fbc tracking the instructions causing loads and stores provides more information than just the pointer being loaded or stored
llvm-svn: 22311
2005-06-29 15:57:19 +00:00
Andrew Lenharth 4401049f05 thinko
llvm-svn: 22309
2005-06-29 13:35:05 +00:00
Andrew Lenharth d0a2f0f95a unify SelectExpr and SelectFP
llvm-svn: 22308
2005-06-29 12:49:51 +00:00
Andrew Lenharth d0f59dedf8 fix most regressions
llvm-svn: 22307
2005-06-29 12:23:34 +00:00
Andrew Lenharth 47a9c4715a support more relocations for stores also
llvm-svn: 22306
2005-06-29 00:39:17 +00:00
Andrew Lenharth 1ef3c0c798 Get rid of all symbolic loads. I now do gernate all relocations sequences
rather than relying on the assembler.  Only a few more pseudo instructions
left.  Also merge load code paths.

llvm-svn: 22305
2005-06-29 00:31:08 +00:00
Andrew Lenharth a50adcf57d So, it turns out I forgot that one valid way of restoring GP after a call
is to use RA, which assumes the called function uses RA for the register
holding the return address when it issues a ret.

llvm-svn: 22301
2005-06-27 23:24:11 +00:00
Andrew Lenharth 595646f934 get rid of another pseudo op
llvm-svn: 22299
2005-06-27 21:11:40 +00:00
Andrew Lenharth 1291a85883 generate address of constant pool entries
llvm-svn: 22298
2005-06-27 21:02:56 +00:00
Andrew Lenharth 02ffa5a7ed Misha happification patch
llvm-svn: 22297
2005-06-27 17:39:17 +00:00
Andrew Lenharth 7aba58ab89 Reduce use of pseudo ops
Namely, output the rellocation flags explicitly when loading constants.
Added benifit: save a load when loading from the constant pool.

llvm-svn: 22296
2005-06-27 17:15:36 +00:00
Andrew Lenharth fcb112eb7a missed a load
llvm-svn: 22295
2005-06-27 16:40:26 +00:00
Andrew Lenharth 96db51a3b6 make constant pool labels local
llvm-svn: 22294
2005-06-27 16:29:54 +00:00
Andrew Lenharth 53bb83bc43 who said we had to use the return address in the return address register. Might save a move in many cases
llvm-svn: 22293
2005-06-27 15:36:48 +00:00
Andrew Lenharth dac0b3cb8a depend more on legalize putting constants on the RHS
llvm-svn: 22289
2005-06-26 23:01:11 +00:00
Andrew Lenharth 331380b2e2 With setOperationAction(ISD::UINT_TO_FP, MVT::i64, Expand), Legalize
should be able to handle this case.  The code is there, so let's see
if it works.

llvm-svn: 22288
2005-06-26 22:23:06 +00:00
Chris Lattner f11f48ba61 Refactor the addPassesToEmitAssembly interface into a addPassesToEmitFile
interface.

llvm-svn: 22282
2005-06-25 02:48:37 +00:00
Andrew Lenharth af1e825112 remove a pseudo instruction, make ret always right, and fix vararg chains
llvm-svn: 22276
2005-06-23 23:42:05 +00:00
Andrew Lenharth 01cebcc131 finally, Working varargs
llvm-svn: 22275
2005-06-23 16:48:51 +00:00
Andrew Lenharth a4a12983cc more complete Lowering for vacopy and vaarg
llvm-svn: 22274
2005-06-22 23:04:28 +00:00
Andrew Lenharth cf9008afea Make it easier to find alpha stuff in doxygen, and fixup labeling
of memory instructions in the assembly, to allow later linking
of traces with LLVM Value*s.

llvm-svn: 22271
2005-06-22 17:19:45 +00:00
Andrew Lenharth 9144ec4764 core changes for varargs
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Andrew Lenharth c504a3db60 fix BranchCC with a setCC with an arg of 0
llvm-svn: 22203
2005-06-08 18:02:21 +00:00
Misha Brukman ddb94f4169 Fix spelling of `correlate'
llvm-svn: 22196
2005-06-06 19:08:04 +00:00
Andrew Lenharth c74fe84456 allow marking of loads and stores in the instruction stream with enough information to reconstruct the Value* if it existed
llvm-svn: 22195
2005-06-06 19:03:55 +00:00
Andrew Lenharth b07a3d7138 hide basic block labels. The utility of these for debuging is long since passed
llvm-svn: 22194
2005-06-06 19:03:09 +00:00
Misha Brukman 175df27466 * Replace block of commented-out lines with #if 0
* Remove warning "control reaches end of non-void function"

llvm-svn: 22193
2005-06-06 17:39:46 +00:00
Andrew Lenharth 7c0e9285ce try custom expanders, doesn't seem to expand yet, so disabled
llvm-svn: 22188
2005-05-31 19:49:34 +00:00
Andrew Lenharth 41e2981e0a switch to the new live in thing. Really, this time it works
llvm-svn: 22187
2005-05-31 18:42:18 +00:00
Andrew Lenharth 676e4db6dc switch to the new live in thing
llvm-svn: 22186
2005-05-31 18:37:16 +00:00
Andrew Lenharth 973d85e660 switch to the new live in thing
llvm-svn: 22185
2005-05-31 18:35:43 +00:00
Andrew Lenharth 86f856f19c match gcc, makes diff easier
llvm-svn: 22179
2005-05-27 03:39:30 +00:00
Andrew Lenharth 39edea8306 Fix 2005-05-12-Int64ToFP
The issue is there is no unsigned -> double conversion, only signed.  So I
need to test the sign and do a different thing depending on it.  Ideally
this should be in a different BB, but in the mean time, I use a branch
free method.

llvm-svn: 22177
2005-05-26 18:18:34 +00:00
Chris Lattner 8abab9b0c7 treat TAILCALL nodes identically to CALL nodes
llvm-svn: 21977
2005-05-13 20:29:26 +00:00
Chris Lattner 2e77db6af6 Add an isTailCall flag to LowerCallTo
llvm-svn: 21958
2005-05-13 18:50:42 +00:00
Chris Lattner 2dce703710 rename the ADJCALLSTACKDOWN/ADJCALLSTACKUP nodes to be CALLSEQ_START/BEGIN.
llvm-svn: 21915
2005-05-12 23:24:06 +00:00
Chris Lattner 36674a123e Pass in Calling Convention to use into LowerCallTo
llvm-svn: 21899
2005-05-12 19:56:45 +00:00
Andrew Lenharth b8e94c3499 fix typo
llvm-svn: 21693
2005-05-04 19:25:37 +00:00
Andrew Lenharth aed06a0e92 Well, add support for ct* for 21264 only.
21164 is broken until expand works.

llvm-svn: 21692
2005-05-04 19:12:09 +00:00
Andrew Lenharth 5e177826fd Implement count leading zeros (ctlz), count trailing zeros (cttz), and count
population (ctpop).  Generic lowering is implemented, however only promotion
is implemented for SelectionDAG at the moment.

More coming soon.

llvm-svn: 21676
2005-05-03 17:19:30 +00:00
Andrew Lenharth 537332eba8 I was sure I had thought about this and there was a reason it should work.
But it is entirely possible I am just crazy.

llvm-svn: 21640
2005-04-30 14:19:13 +00:00
Chris Lattner c8a6633dea Eliminate some random whitespace
llvm-svn: 21637
2005-04-30 04:44:07 +00:00
Chris Lattner 9c6bbafc15 This target doesn't support the FSIN/FCOS/FSQRT nodes yet
llvm-svn: 21633
2005-04-30 04:26:06 +00:00
Andrew Lenharth 4a73c2cfdc Implement Value* tracking for loads and stores in the selection DAG. This enables one to use alias analysis in the backends.
(TRUNK)Stores and (EXT|ZEXT|SEXT)Loads have an extra SDOperand which is a SrcValueSDNode which contains the Value*.  Note that if the operation is introduced by the backend, it will still have the operand, but the value* will be null.

llvm-svn: 21599
2005-04-27 20:10:01 +00:00
Misha Brukman e73e76dc42 Convert tabs to spaces
llvm-svn: 21452
2005-04-22 17:54:37 +00:00
Andrew Lenharth 8f4081a8c9 keep track of max depth stats
llvm-svn: 21446
2005-04-22 13:35:18 +00:00
Misha Brukman 89b8c8d215 Remove trailing whitespace
llvm-svn: 21424
2005-04-21 23:13:11 +00:00
Andrew Lenharth 00ce283b3f fix calls
llvm-svn: 21303
2005-04-14 17:34:20 +00:00
Andrew Lenharth 7ae3aba5aa a 21264 fix, and fix the operator precidence on an and -> zap check (should fix hundreds of test cases
llvm-svn: 21302
2005-04-14 16:24:00 +00:00
Andrew Lenharth 93341a0f82 WOW, function calls still seem to work after this.
llvm-svn: 21286
2005-04-13 17:17:28 +00:00
Andrew Lenharth c3621316ee prepare for func call optimization
llvm-svn: 21285
2005-04-13 16:19:50 +00:00
Andrew Lenharth c7287c8eda add matches for SxADDL and company, as well as simplify the SxADDQ code
llvm-svn: 21281
2005-04-13 05:19:55 +00:00
Andrew Lenharth 8eb82fb524 added all flavors of zap for anding
llvm-svn: 21276
2005-04-13 03:47:03 +00:00
Chris Lattner 857624f47a Remove support for ZERO_EXTEND_INREG. This pessimizes code, genering stuff
like this:

        ldah $1,1($31)
        lda $1,-1($1)
        and $0,$1,$24

instead of this:

        zap $0,252,$24

To get this back, the selector should recognize the ISD::AND case where this
happens and emit the appropriate ZAP instruction.

llvm-svn: 21270
2005-04-13 02:43:40 +00:00
Andrew Lenharth 740f93ca10 Get rid of idefs for arguments (oops)
llvm-svn: 21251
2005-04-12 17:47:57 +00:00
Andrew Lenharth 10c6eb4be2 Get rid of idefs for arguments
llvm-svn: 21250
2005-04-12 17:35:16 +00:00
Chris Lattner a3a135a9f7 This target does not support/want ISD::BRCONDTWOWAY
llvm-svn: 21164
2005-04-09 03:22:37 +00:00
Andrew Lenharth de5aed3f12 collect a few statistics, factor constants (constant loading and mult), fix logic operation pattern matchs, supress FP div when int dividing by a constant
llvm-svn: 21156
2005-04-08 17:28:49 +00:00
Andrew Lenharth 534eebb317 Alpha zero extends setcc results
llvm-svn: 21149
2005-04-07 20:11:32 +00:00
Andrew Lenharth 9807ac5d3c fix a small optimization opertunity and make gcc happy
llvm-svn: 21143
2005-04-07 18:15:28 +00:00
Andrew Lenharth 6b492bec30 fixup magic constant making code. tested by thousands of random divisions.... by 10000. ok, so random divisors would be good too, but this at least fixes some things
llvm-svn: 21140
2005-04-07 17:19:16 +00:00
Andrew Lenharth d2da7177f2 lowercase instructions, makes diff happier
llvm-svn: 21139
2005-04-07 17:17:48 +00:00
Andrew Lenharth 05e51d92e0 It wasn't happy about this either
llvm-svn: 21133
2005-04-07 14:18:13 +00:00
Andrew Lenharth 85f34a5682 Yea, it wasn't happy
llvm-svn: 21132
2005-04-07 13:55:53 +00:00
Alkis Evlogimenos 7ca0947274 Make these 64 bit constants so that this compiles on x86-32 as well.
llvm-svn: 21125
2005-04-06 22:09:40 +00:00