Commit Graph

228 Commits

Author SHA1 Message Date
Nate Begeman
cdf38c4edb Extend printBasicBlockLabel a bit so that it can be used to print all
basic block labels, consolidating the code to do so in one place for each
target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28050 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 05:37:32 +00:00
Nate Begeman
37efe67645 JumpTable support! What this represents is working asm and jit support for
x86 and ppc for 100% dense switch statements when relocations are non-PIC.
This support will be extended and enhanced in the coming days to support
PIC, and less dense forms of jump tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27947 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-22 18:53:45 +00:00
Nate Begeman
957e1674e7 Disable switch lowering for targets based on the selection dag isel,
letting the code generator handle them directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27539 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-08 19:46:55 +00:00
Jim Laskey
4188699f80 Foundation for call frame information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27491 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-07 16:34:46 +00:00
Jim Laskey
a99791886d Expose base register for DwarfWriter. Refactor code accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27225 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-28 13:48:33 +00:00
Jim Laskey
414e682bac Translate llvm target registers to dwarf register numbers properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27180 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-27 20:18:45 +00:00
Chris Lattner
420736dc85 #include Intrinsics.h into all dag isels
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27109 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-25 06:47:10 +00:00
Jim Laskey
47622e3721 Add dwarf register numbering to register data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27081 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 21:15:58 +00:00
Jim Laskey
f1d78e8335 Add support to locate local variables in frames (early version.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26994 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 18:12:57 +00:00
Chris Lattner
bc641b9d8b Eliminate IntrinsicLowering from TargetMachine.
Make the CBE and V9 backends create their own, since they're the only ones that use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26974 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 05:43:16 +00:00
Nate Begeman
81e8097377 Remove BRTWOWAY*
Make the PPC backend not dependent on BRTWOWAY_CC and make the branch
selector smarter about the code it generates, fixing a case in the
readme.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26814 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-17 01:40:33 +00:00
Evan Cheng
c4c6257c1a Added getTargetLowering() to TargetMachine. Refactored targets to support this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26742 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-13 23:20:37 +00:00
Chris Lattner
04f9674857 Add support for 'special' llvm globals like debug info and static ctors/dtors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26628 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 06:14:35 +00:00
Duraid Madina
1ffd41ab99 doo de doo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26614 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 06:18:46 +00:00
Chris Lattner
9601a86a64 Copysign needs to be expanded everywhere. Note that Alpha and IA64 should
implement copysign as a native op if they have it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26541 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 05:08:37 +00:00
Duraid Madina
00d3d44b75 distinguish between objects and register names, now we can have stuff
with names like "f84", "in6" etc etc.

this should fix one or two tests


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26232 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 13:12:57 +00:00
Chris Lattner
94dd29216c Switch targets over to using SelectionDAG::getCALLSEQ_START to create
CALLSEQ_START nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26143 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 09:00:43 +00:00
Duraid Madina
b20f97959e fix storing booleans (grawp missed this one)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26120 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 07:33:17 +00:00
Duraid Madina
631a140054 now short immediates will get matched (previously constants were all
triggering movl 64bit imm fat instructions)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26119 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 07:32:15 +00:00
Evan Cheng
7e9b26fc73 Match getTargetNode() changes (now return SDNode* instead of SDOperand).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26085 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 07:17:49 +00:00
Evan Cheng
34167215a8 Change Select() from
SDOperand Select(SDOperand N);
to
void Select(SDOperand &Result, SDOperand N);


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26067 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 00:37:58 +00:00
Evan Cheng
ba2f0a9ee5 Use SelectRoot() as entry of any tblgen based isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25997 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-05 06:46:41 +00:00
Nate Begeman
750ac1bdfa Fix some of the stuff in the PPC README file, and clean up legalization
of the SELECT_CC, BR_CC, and BRTWOWAY_CC nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25875 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-01 07:19:44 +00:00
Evan Cheng
b8973bd8f5 Allow the specification of explicit alignments for constant pool entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25855 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-31 22:23:14 +00:00
Chris Lattner
a54aa94197 Targets all now request ConstantFP to be legalized into TargetConstantFP.
'fpimm' in .td files is now TargetConstantFP.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25771 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-29 06:26:08 +00:00
Nate Begeman
0aed7840ec Implement Promote for VAARG, and allow it to be custom promoted for people
who don't want the default behavior (Alpha).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25726 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-28 03:14:31 +00:00
Chris Lattner
34fa038f0c Remove some dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25719 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-28 00:02:51 +00:00
Nate Begeman
ee625573b5 Remove TLI.LowerReturnTo, and just let targets custom lower ISD::RET for
the same functionality.  This addresses another piece of bug 680.  Next,
on to fixing Alpha VAARG, which I broke last time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25696 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 21:09:22 +00:00
Chris Lattner
cedc6f4b30 PHI and INLINEASM are now built-in instructions provided by Target.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25674 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 01:46:15 +00:00
Duraid Madina
b0636041c8 fix stack corruption! Previously, 16-byte whole-FP-register stores were
being treated as needing only 8 bytes (though they were 16 byte aligned.)

This should fix a bunch of tests - anyone have any comments, though?

  - in Target.td , SpillSize and SpillAlignment seem dead - is this what
    Size and Alignment do now?
  - in CodeGenRegisters.h/CodeGenTarget.cpp , DeclaredSpillSize and
    DeclaredSpillAlignment seem dead.
  - there are a bunch of comments here and there that don't clearly
    distinguish between 'size' and 'spillsize' etc. hmm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25644 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 09:45:03 +00:00
Duraid Madina
d92f116a1c some hoovering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25643 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 09:08:31 +00:00
Evan Cheng
0577a22c67 Set SchedulingForLatency to be the default scheduling preference for all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25607 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-25 18:52:42 +00:00
Nate Begeman
acc398c195 First part of bug 680:
Remove TLI.LowerVA* and replace it with SDNodes that are lowered the same
way as everything else.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25606 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-25 18:21:52 +00:00
Evan Cheng
7558b0e80c Default scheduling preference is SchedulingForLatency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25603 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-25 09:15:54 +00:00
Duraid Madina
badf0d9614 add bundling! well not really, for now it's just stop-insertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25593 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-25 02:23:38 +00:00
Duraid Madina
dfa28ac56f die, die!! r15, you are not callee-saved
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25527 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 06:11:45 +00:00
Duraid Madina
b9bcd18794 fix register corruption! (my god.) r15 is a scratch reg, using that as
a frame pointer is a pretty doofus thing to do. use r5 instead, and
mark it callee-saved, coz that's what it is!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25526 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 06:08:46 +00:00
Chris Lattner
2c2c6c61f1 Add explicit #includes of <iostream>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25515 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-22 23:41:00 +00:00
Duraid Madina
19e5e141c1 insignificant, but next up is proper stack frame layout!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25497 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-21 14:27:19 +00:00
Duraid Madina
bea99471c7 remove RET hack, add proper support for rets (watching out for ret voids)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25486 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-20 20:24:31 +00:00
Duraid Madina
ecc1a1bb1e fix sext breakage: now we correctly deal with functions that return
int vs uint


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25478 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-20 16:10:05 +00:00
Duraid Madina
a7fb5bef55 fix storing bools! eek!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25476 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-20 03:40:25 +00:00
Duraid Madina
12f1bea6e2 fix boolean XOR (which fixes up comparisons..)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25462 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 15:18:56 +00:00
Duraid Madina
95f59e1e76 BOOM!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25460 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 14:14:11 +00:00
Duraid Madina
c5f247089c click click
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25459 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 14:13:11 +00:00
Duraid Madina
e7916e6986 fix calls that return f32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25455 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 08:31:51 +00:00
Duraid Madina
a2610934a0 oops, this shouldn't have gotten in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25388 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 03:09:48 +00:00
Duraid Madina
362071d7d4 use proper (82-bit) spills/fills when spilling FP regs, so that
divides don't get broken. this fixes obsequi, smg2000, and probably
a bunch of other stuff (tm)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25385 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 02:04:52 +00:00
Duraid Madina
ae6dcddcfe fixing divides
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25383 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 01:19:49 +00:00
Duraid Madina
76bb6ae211 fixing divides: FP should now be 100%, and integers are fine too
unless you try to div/mod 0 by anything, in which case you will
get some cute number, and not 0, which is bad.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25358 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 14:33:04 +00:00