Commit Graph

4954 Commits

Author SHA1 Message Date
Alkis Evlogimenos
169cfd0196 Add support for inactive intervals. This effectively reuses registers
for live ranges that fall into assigned registers' holes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10566 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-21 05:43:40 +00:00
John Criswell
1118d0fd94 Fix PR#193.
Modified ReadArchiveBuffer() so that it dynamically allocates the
std::string object used to hold the bytecode object file's name.  This is
necessary because it is passed by reference to the new Module that is
allocated to represent the bytecode object, and previously we were
using a std::string that disappeared on function exit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10565 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 22:37:29 +00:00
Alkis Evlogimenos
9abc81790e Move FP_REG_KILL closer to the actual branch instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10563 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 17:28:15 +00:00
Alkis Evlogimenos
e0bb3e766d Remove floating point killer pass. This is now implemented in the
instruction selector by adding a new pseudo-instruction
FP_REG_KILL. This instruction implicitly defines all x86 fp registers
and is a terminator so that passes which add machine code at the end
of basic blocks (like phi elimination) do not add instructions between
it and the branch or return instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10562 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 16:22:59 +00:00
Chris Lattner
16c45e9de8 Add a new target-independent machine code freeing pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10560 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 10:20:58 +00:00
Chris Lattner
655239cc6b Finally, _actually delete the machine code_ for a function, after it has
been emitted.  Also, since the FPK pass is causing memory access violations,
disable it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10559 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 10:20:19 +00:00
Chris Lattner
028565b14b This should not be needed anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10558 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 10:19:18 +00:00
Chris Lattner
9068574a29 Fix memory leak in the stackifier, due to the machinebasicblocks not holding
instructions on an ilist


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10556 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 10:12:17 +00:00
Chris Lattner
f2e49d4c1a Finegrainify namespacification
Minor cleanups to killer pass


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10555 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 09:58:55 +00:00
Chris Lattner
583b9d8455 Hoist some sparc specific code into the sparc target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10554 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 09:17:40 +00:00
Chris Lattner
07f32d48f1 * Finegrainify namespacification
* Move sparc specific code out of generic code
* Eliminate the getOffset() method which made INVALID_FRAME_OFFSET
  necessary, which made pulling in MAX_INT as a sentinal necessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10553 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 09:17:07 +00:00
Chris Lattner
61838824c2 Remove a horrible API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10551 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 09:15:01 +00:00
Chris Lattner
c07ed13875 Implement PR135, lazy emission of global variables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10549 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 03:36:47 +00:00
Chris Lattner
24b0a18c43 Simple refactorings to prepare for lazy global emission
Also, add a stat for the number of globals emitted


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10547 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 02:45:37 +00:00
Chris Lattner
2828970819 A minor cleanup for better encapsulation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10545 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 02:03:14 +00:00
Chris Lattner
4d326fa9be Cleanup the JIT as per PR176. This renames the VM class to JIT, and merges the
VM.cpp and JIT.cpp files into JIT.cpp.  This also splits some nasty code out
into TargetSelect.cpp so that people hopefully won't notice it.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10544 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 01:46:27 +00:00
Chris Lattner
61612df9cb Update for changes in the JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10543 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 01:45:17 +00:00
Chris Lattner
1e60a9165d Rip JIT specific stuff out of TargetMachine, as per PR176
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10542 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 01:22:19 +00:00
Chris Lattner
bd1a90ecc7 Fix ADCE/2003-12-19-MergeReturn.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10539 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-19 09:08:34 +00:00
Chris Lattner
a3df8a964a Remove the wierd "Operands" loop, by traversing basicblocks in reverse order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10536 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-19 08:18:16 +00:00
Chris Lattner
e4365b2e8c Implement LICM/sink_multiple.ll, by sinking all possible instructions in the
loop before hoisting any.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10534 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-19 07:22:45 +00:00
Chris Lattner
0f98e75adf Generalize a special case to fix PR187
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10531 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-19 06:27:08 +00:00
Chris Lattner
60921c9aa1 Factor code out into the Utils library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10530 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-19 05:58:40 +00:00
Chris Lattner
abbc2dd779 Add new function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10529 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-19 05:56:28 +00:00
Alkis Evlogimenos
4c080863de Remove TwoAddressInstruction from the public headers and add an ID
instead, since this pass doesn't expose any state to its users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10520 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 22:40:24 +00:00
Chris Lattner
5e46b513f3 Prune some #includes
Add a statistic for # reloads


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10518 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 20:25:31 +00:00
John Criswell
47df12d80d Reverted back to previous revision - this was previously merged
according to the CVS log messages.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10517 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 17:19:19 +00:00
John Criswell
d000e1dc2f Merged in RELEASE_11.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10516 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 16:43:17 +00:00
Alkis Evlogimenos
a71e05acdd Modify linear scan register allocator to use the two-address
instruction pass. This also fixes all remaining bugs for this new
allocator to pass all tests under test/Programs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10515 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 13:15:02 +00:00
Alkis Evlogimenos
a3d0e5c2b2 Fix bug in reserved registers. DH actually aliases DX and EDX which
are not reserved registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10514 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 13:12:18 +00:00
Alkis Evlogimenos
9af9dbde7d Modify local register allocator to use the two-address instruction pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10513 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 13:08:52 +00:00
Alkis Evlogimenos
71499ded4d Add TwoAddressInstructionPass to handle instructions that have two or
more operands and the two first operands are constrained to be the
same. The pass takes an instruction of the form:

        a = b op c

and transforms it into:

        a = b
        a = a op c

and also preserves live variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10512 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 13:06:04 +00:00
Alkis Evlogimenos
485ec3c21e Rename LiveIntervals::expired() to LiveIntervals::expiredAt().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10511 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 08:56:11 +00:00
Alkis Evlogimenos
43f692f90f When a variable is killed and redifined in a basic block only one
killing instruction is tracked. This causes the LiveIntervals to
create bogus intervals. The workaound is to add a range to the
interval from the redefinition to the end of the basic block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10510 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 08:53:43 +00:00
Alkis Evlogimenos
dd2cc65f34 Handle multiple virtual register definitions gracefully.
Move some of the longer LiveIntervals::Interval method out of the
header and add debug information to them. Fix bug and simplify range
merging code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10509 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 08:48:48 +00:00
Chris Lattner
ba7df4c482 When we delete instructions from the loop, make sure to remove them from the
AliasSetTracker as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10507 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 08:12:32 +00:00
Chris Lattner
2cffeec014 Add a new AliassetTracker::remove method. Because we need to be able to remove
a pointer from an AliasSet, maintain the pointer values on a doubly linked
list instead of a singly linked list, to permit efficient removal from the
middle of the list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10506 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 08:11:56 +00:00
Misha Brukman
97f9cf2de2 * Converted C-style comments to C++
* Doxygenified comments
* Reordered #includes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10503 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-17 22:08:20 +00:00
Misha Brukman
3d0ad411a5 Reordered #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10502 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-17 22:06:28 +00:00
Misha Brukman
c3402cd735 Doxygenified some comments, reduced extraneous space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10501 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-17 22:06:08 +00:00
Misha Brukman
d71295a684 Reorganized the Sparc backend to be more modular -- each different
implementation of a Target{RegInfo, InstrInfo, Machine, etc} now has a separate
header and a separate implementation file.

This means that instead of a massive SparcInternals.h that forces a
recompilation of the whole target whenever a minor detail is changed, you should
only recompile a few files.

Note that SparcInternals.h is still around; its contents should be minimized.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10500 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-17 22:04:00 +00:00
Brian Gaeke
6ca5b8f5f4 Make getObjectType() smarter about ranlibbed Mac OS X archives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10493 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-17 00:18:18 +00:00
Chris Lattner
9e45d2e0e8 Fix for PR185 & IndVarsSimplify/2003-12-15-Crash.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10473 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-15 17:34:02 +00:00
Alkis Evlogimenos
f6f91bf668 Change preserve all claim to just preserve live variables and phielimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10469 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-15 04:55:38 +00:00
Chris Lattner
d64152a708 Refactor code just a little bit, allowing us to implement TailCallElim/return_constant.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10467 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 23:57:39 +00:00
Chris Lattner
f7a743d7ed Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10465 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 23:25:48 +00:00
Chris Lattner
2cdd21c2e4 Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10464 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 21:35:53 +00:00
Chris Lattner
b6d465f813 Finegrainify namespacification
Make the Timer code give correct user/system/user+system times when -track-memory is enabled


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10463 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 21:27:33 +00:00
Alkis Evlogimenos
4d7af65903 Change interface of MachineOperand as follows:
a) remove opIsUse(), opIsDefOnly(), opIsDefAndUse()
    b) add isUse(), isDef()
    c) rename opHiBits32() to isHiBits32(),
              opLoBits32() to isLoBits32(),
              opHiBits64() to isHiBits64(),
              opLoBits64() to isLoBits64().

This results to much more readable code, for example compare
"op.opIsDef() || op.opIsDefAndUse()" to "op.isDef()" a pattern used
very often in the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10461 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 13:24:17 +00:00
Alkis Evlogimenos
97323a47d8 Change preserve all claim to just preserve live variables and phielimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10460 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 10:14:23 +00:00