Commit Graph

14014 Commits

Author SHA1 Message Date
Evan Cheng
c9a83a45ba Bottom up register pressure reduction work: clean up some hacks and enhanced
the heuristic to further reduce spills for several test cases. (Note, it may
not necessarily translate to runtime win!)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28076 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 02:10:45 +00:00
Owen Anderson
a69571c799 Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference.
This fixes PR 759.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28074 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 01:29:57 +00:00
Chris Lattner
0eb4d6b52e Align function bodies correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28073 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 01:03:20 +00:00
Chris Lattner
e6fdcbfc47 Simplify some code. Don't add memory blocks to the Blocks list twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28071 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 00:54:49 +00:00
Chris Lattner
9b4c96d45d Add assertions that verify that the actual arguments to a call or invoke match
the prototype of the called function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28070 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 00:48:22 +00:00
Chris Lattner
af1563fb62 Change the BasicBlockAddrs map to be a vector, indexed by MBB number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28069 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 00:32:55 +00:00
Chris Lattner
23118b649e Keep the alpha JIT similar to the PPC/X86 jits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28068 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 00:31:21 +00:00
Chris Lattner
32ca55f3bc Simplify some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28066 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 00:13:06 +00:00
Chris Lattner
f75f9be3fb Several related changes:
1. Change several methods in the MachineCodeEmitter class to be pure virtual.
2. Suck emitConstantPool/initJumpTableInfo into startFunction, removing them
   from the MachineCodeEmitter interface, and reducing the amount of target-
   specific code.
3. Change the JITEmitter so that it allocates constantpools and jump tables
   *right* next to the functions that they belong to, instead of in a separate
   pool of memory.  This makes all memory for a function be contiguous, and
   means the JITEmitter only tracks one block of memory now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28065 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 23:22:24 +00:00
Nate Begeman
a11a92976a Remove some stuff from the README
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28063 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 22:43:31 +00:00
Chris Lattner
f5d438c1f0 Do not make the JIT memory manager manage the memory for globals. Instead
just have the JIT malloc them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28062 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 21:57:51 +00:00
Chris Lattner
a726c7f1fd Minor cleanups, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28061 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 21:44:14 +00:00
Chris Lattner
d3f0aefc33 Fix a purely hypothetical problem (for now): emitWord emits in the host
byte format.  This doesn't work when using the code emitter in a cross target
environment.  Since the code emitter is only really used by the JIT, this
isn't a current problem, but if we ever start emitting .o files, it would be.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28060 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 19:14:47 +00:00
Chris Lattner
43b429b059 Refactor the machine code emitter interface to pull the pointers for the current
code emission location into the base class, instead of being in the derived classes.

This change means that low-level methods like emitByte/emitWord now are no longer
virtual (yaay for speed), and we now have a framework to support growable code
segments.  This implements feature request #1 of PR469.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28059 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 18:27:26 +00:00
Nate Begeman
426cd7c25f Since we don't handle callee-save CRs right yet, don't allocate them. Also
don't step on R11 in the middle of a function when saving and restoring CRs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28058 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 17:37:31 +00:00
Nate Begeman
9d51eeb8bc Print function number instead of name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28057 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 17:36:46 +00:00
Nate Begeman
6e0f386896 Hooray, everyone now uses the same printBasicBlockLabel implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28056 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 17:34:51 +00:00
Chris Lattner
b0cc79d45b Remove dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28055 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 17:20:28 +00:00
Chris Lattner
608c189534 There is no reason to use a virtual method to store this word.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28053 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 17:16:20 +00:00
Chris Lattner
3a9cfbaf86 Remove the debug machine code emitter. The "FilePrinterEmitter" is more
useful for debugging.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28051 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 16:59:24 +00:00
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
5425267e84 Update the PPC compilation callback code to not need weird abi-violating
prologs and epilogs, keep all the asm in one place, and remove use of
compiler builtin functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28049 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 04:50:05 +00:00
Chris Lattner
b3674e4753 Add pass ID's for various passes, so they can be AddRequiredID. Patch by
Domagoj Babic!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28048 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 04:24:36 +00:00
Jeff Cohen
51b776d259 De-virtualize SwitchSection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28047 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 03:58:45 +00:00
Jeff Cohen
c6a057b04d De-virtualize EmitZeroes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28046 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 03:46:13 +00:00
Jeff Cohen
4f1ea1e9d9 Finish support for Microsoft ML/MASM. May still be a few rough edges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28045 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 03:11:50 +00:00
Jeff Cohen
c884db47f1 Make Intel syntax mode friendlier to Microsoft ML assembler (still needs more work).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28044 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 01:16:28 +00:00
Chris Lattner
229924a79f Fix a latent bug that my spiller patch last week exposed: we were leaving
instructions in the virtregfolded map that were deleted.  Because they
were deleted, newly allocated instructions could end up at the same address,
magically finding themselves in the map.  The solution is to remove entries
from the map when we delete the instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28041 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 22:03:24 +00:00
Chris Lattner
8a18c13fa5 When promoting a load to a reg-reg copy, where the load was a previous
instruction folded with spill code, make sure the remove the load from
the virt reg folded map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28040 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 21:17:10 +00:00
Chris Lattner
35f2705e3d Remove previous patch, which wasn't quite right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28039 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 21:16:03 +00:00
Chris Lattner
de321a8014 Put PHI/INLINEASM into the correct namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28037 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 17:00:49 +00:00
Evan Cheng
22608c2d1f Dis-favor stores more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28035 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 09:20:44 +00:00
Evan Cheng
f229a5d4be Bottom up register-pressure reduction scheduler now pushes store operations
up the schedule. This helps code that looks like this:

loads ...
computations (first set) ...
stores (first set) ...
loads
computations (seccond set) ...
stores (seccond set) ...

Without this change, the stores and computations are more likely to
interleave:

loads ...
loads ...
computations (first set) ...
computations (second set) ...
computations (first set) ...
stores (first set) ...
computations (second set) ...
stores (stores set) ...

This can increase the number of spills if we are unlucky.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28033 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 09:14:40 +00:00
Evan Cheng
3766d66b91 Didn't mean ScheduleDAGList.cpp to make the last checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28030 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 08:56:34 +00:00
Evan Cheng
10dbd3ead8 Remove temp. option -spiller-check-liveout, it didn't cause any failure nor performance regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28029 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 08:54:57 +00:00
Chris Lattner
99f2632b4b Remove %'s from register names when in intel mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28027 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 05:53:50 +00:00
Chris Lattner
c80c43eee0 Format #APP lines a bit nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28026 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-01 04:11:03 +00:00
Evan Cheng
200370fb56 Local spiller kills a store if the folded restore is turned into a copy.
But this is incorrect if the spilled value live range extends beyond the
current BB.
It is currently controlled by a temporary option -spiller-check-liveout.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28024 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-30 08:41:47 +00:00
Jeff Cohen
10a59ce701 Mingw32 patches supplied by Anton Korobeynikov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28023 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-29 18:41:44 +00:00
Chris Lattner
25c344a758 Remove a bogus transformation. This fixes SingleSource/UnitTests/2006-01-23-InitializedBitField.c
with some changes I have to the new CFE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28022 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-28 23:33:20 +00:00
Evan Cheng
55c25f2a2f I can't spell: Register, not Regsiter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28021 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-28 23:19:39 +00:00
Evan Cheng
62f2700bcf Implemented x86 inline asm b, h, w, k modifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28020 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-28 23:11:40 +00:00
Chris Lattner
94046b4d10 Fix InstCombine/2006-04-28-ShiftShiftLongLong.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28019 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-28 22:21:41 +00:00
Chris Lattner
25b8b8cb2c Fix CodeGen/Generic/2006-04-28-Sign-extend-bool.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28017 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-28 21:56:10 +00:00
Evan Cheng
347d5f789a Initial caller side support (for CCC only, not FastCC) of 128-bit vector
passing by value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28015 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-28 21:29:37 +00:00
Evan Cheng
3d48a90fbd Bare-bone X86 inline asm printer support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28014 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-28 21:19:05 +00:00
Evan Cheng
55d0fa1bfa Remove the temporary option: -no-isel-fold-inflight
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28012 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-28 18:54:11 +00:00
Evan Cheng
43f3bd310b Implement four-wide shuffle with 2 shufps if no more than two elements come
from each vector. e.g.
        shuffle(G1, G2, 7, 1, 5, 2)
==>
        movaps _G2, %xmm0
        shufps $151, _G1, %xmm0
        shufps $216, %xmm0, %xmm0


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28011 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-28 07:03:38 +00:00
Chris Lattner
a0de843535 Fix PR743: emit -help output of a tool to cout, not cerr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28010 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-28 05:36:25 +00:00
Evan Cheng
020c41f21e TargetLowering::LowerArguments should return a VBIT_CONVERT of
FORMAL_ARGUMENTS SDOperand in the return result vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28009 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-28 05:25:15 +00:00