1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

4892 Commits

Author SHA1 Message Date
Chris Lattner
edda0e5d4f Implement PR135, lazy emission of global variables
llvm-svn: 10549
2003-12-20 03:36:47 +00:00
Chris Lattner
214005e5fb Simple refactorings to prepare for lazy global emission
Also, add a stat for the number of globals emitted

llvm-svn: 10547
2003-12-20 02:45:37 +00:00
Chris Lattner
d3676d0774 A minor cleanup for better encapsulation
llvm-svn: 10545
2003-12-20 02:03:14 +00:00
Chris Lattner
cd8f92bc62 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.  :)

llvm-svn: 10544
2003-12-20 01:46:27 +00:00
Chris Lattner
32658dbaf3 Update for changes in the JIT
llvm-svn: 10543
2003-12-20 01:45:17 +00:00
Chris Lattner
1cb1efedb3 Rip JIT specific stuff out of TargetMachine, as per PR176
llvm-svn: 10542
2003-12-20 01:22:19 +00:00
Chris Lattner
e0021ba353 Fix ADCE/2003-12-19-MergeReturn.llx
llvm-svn: 10539
2003-12-19 09:08:34 +00:00
Chris Lattner
399d5ad32e Remove the wierd "Operands" loop, by traversing basicblocks in reverse order
llvm-svn: 10536
2003-12-19 08:18:16 +00:00
Chris Lattner
68db81e684 Implement LICM/sink_multiple.ll, by sinking all possible instructions in the
loop before hoisting any.

llvm-svn: 10534
2003-12-19 07:22:45 +00:00
Chris Lattner
a0b16fb57d Generalize a special case to fix PR187
llvm-svn: 10531
2003-12-19 06:27:08 +00:00
Chris Lattner
e0e1fe84e8 Factor code out into the Utils library
llvm-svn: 10530
2003-12-19 05:58:40 +00:00
Chris Lattner
c1952a1fd6 Add new function
llvm-svn: 10529
2003-12-19 05:56:28 +00:00
Alkis Evlogimenos
9181e0ab5b Remove TwoAddressInstruction from the public headers and add an ID
instead, since this pass doesn't expose any state to its users.

llvm-svn: 10520
2003-12-18 22:40:24 +00:00
Chris Lattner
c984af2771 Prune some #includes
Add a statistic for # reloads

llvm-svn: 10518
2003-12-18 20:25:31 +00:00
John Criswell
3304c39869 Reverted back to previous revision - this was previously merged
according to the CVS log messages.

llvm-svn: 10517
2003-12-18 17:19:19 +00:00
John Criswell
0659bb0c4a Merged in RELEASE_11.
llvm-svn: 10516
2003-12-18 16:43:17 +00:00
Alkis Evlogimenos
f6e9dd4942 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.

llvm-svn: 10515
2003-12-18 13:15:02 +00:00
Alkis Evlogimenos
9bb0ad1a37 Fix bug in reserved registers. DH actually aliases DX and EDX which
are not reserved registers.

llvm-svn: 10514
2003-12-18 13:12:18 +00:00
Alkis Evlogimenos
48d20cb328 Modify local register allocator to use the two-address instruction pass.
llvm-svn: 10513
2003-12-18 13:08:52 +00:00
Alkis Evlogimenos
90aeecae42 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.

llvm-svn: 10512
2003-12-18 13:06:04 +00:00
Alkis Evlogimenos
befef566f6 Rename LiveIntervals::expired() to LiveIntervals::expiredAt().
llvm-svn: 10511
2003-12-18 08:56:11 +00:00
Alkis Evlogimenos
382bfbffeb 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.

llvm-svn: 10510
2003-12-18 08:53:43 +00:00
Alkis Evlogimenos
8e2fcc7d79 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.

llvm-svn: 10509
2003-12-18 08:48:48 +00:00
Chris Lattner
17122cbe7b When we delete instructions from the loop, make sure to remove them from the
AliasSetTracker as well.

llvm-svn: 10507
2003-12-18 08:12:32 +00:00
Chris Lattner
457dd0b6c7 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.

llvm-svn: 10506
2003-12-18 08:11:56 +00:00
Misha Brukman
adac37e69b * Converted C-style comments to C++
* Doxygenified comments
* Reordered #includes

llvm-svn: 10503
2003-12-17 22:08:20 +00:00
Misha Brukman
61860852dc Reordered #includes.
llvm-svn: 10502
2003-12-17 22:06:28 +00:00
Misha Brukman
9f2f87bb6b Doxygenified some comments, reduced extraneous space.
llvm-svn: 10501
2003-12-17 22:06:08 +00:00
Misha Brukman
fe533cc4e6 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.

llvm-svn: 10500
2003-12-17 22:04:00 +00:00
Brian Gaeke
81d68517ea Make getObjectType() smarter about ranlibbed Mac OS X archives.
llvm-svn: 10493
2003-12-17 00:18:18 +00:00
Chris Lattner
062d3a4ab5 Fix for PR185 & IndVarsSimplify/2003-12-15-Crash.llx
llvm-svn: 10473
2003-12-15 17:34:02 +00:00
Alkis Evlogimenos
657eb40294 Change preserve all claim to just preserve live variables and phielimination.
llvm-svn: 10469
2003-12-15 04:55:38 +00:00
Chris Lattner
5fc36a496f Refactor code just a little bit, allowing us to implement TailCallElim/return_constant.ll
llvm-svn: 10467
2003-12-14 23:57:39 +00:00
Chris Lattner
9047cde657 Finegrainify namespacification
llvm-svn: 10465
2003-12-14 23:25:48 +00:00
Chris Lattner
2fdf5e32aa Finegrainify namespacification
llvm-svn: 10464
2003-12-14 21:35:53 +00:00
Chris Lattner
30ae898eb7 Finegrainify namespacification
Make the Timer code give correct user/system/user+system times when -track-memory is enabled

llvm-svn: 10463
2003-12-14 21:27:33 +00:00
Alkis Evlogimenos
29127b8825 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.

llvm-svn: 10461
2003-12-14 13:24:17 +00:00
Alkis Evlogimenos
b96436e679 Change preserve all claim to just preserve live variables and phielimination.
llvm-svn: 10460
2003-12-14 10:14:23 +00:00
Chris Lattner
0d3a8b1cb4 Do not promote volatile alias sets into registers
llvm-svn: 10458
2003-12-14 04:52:31 +00:00
Chris Lattner
a9d238d598 Finegrainify namespacification
Add capability to represent volatile AliasSet's
Propagate this information from loads&stores into the aliassets

llvm-svn: 10457
2003-12-14 04:52:11 +00:00
Alkis Evlogimenos
d58f58b351 When reserving a preallocated register spill the aliases of this
register too.

llvm-svn: 10450
2003-12-13 11:58:10 +00:00
Alkis Evlogimenos
f84f86137b Ignore non-allocatable physical registers in live interval analysis.
llvm-svn: 10449
2003-12-13 11:11:02 +00:00
Alkis Evlogimenos
18bf6b5ad7 Expire any active intervals left when register allocation is done.
llvm-svn: 10448
2003-12-13 05:50:19 +00:00
Alkis Evlogimenos
225fc9c6db Add instruction numbers to debugging output.
llvm-svn: 10447
2003-12-13 05:48:57 +00:00
Alkis Evlogimenos
5ca15c8f5e Add a floating point killer pass. This pass runs before register
allocaton on the X86 to add information to the machine code denoting
that our floating point stackifier cannot handle virtual point
register that are alive across basic blocks. This pass adds an
implicit def of all virtual floating point register at the end of each
basic block.

llvm-svn: 10446
2003-12-13 05:36:22 +00:00
Alkis Evlogimenos
2a41fcbef3 Handle explicit physical register defs.
llvm-svn: 10445
2003-12-13 05:26:39 +00:00
Alkis Evlogimenos
6e511754e5 Remove unecessary if statements when looping on ImplicitDefs.
llvm-svn: 10444
2003-12-13 01:20:58 +00:00
John Criswell
93c209e4ac Modified cast so that it converts the int to a long before casting to
a pointer.  This evades a warning emitted by GCC when we cast from
unsigned int (32 bit) to void * (64 bit) on SparcV9.

llvm-svn: 10435
2003-12-12 19:57:48 +00:00
Brian Gaeke
84101bcdb8 Dynamically get the right-sized member of a GenericValue to hold a size_t, and
use it to return the result of strlen.

llvm-svn: 10433
2003-12-12 15:38:06 +00:00
Chris Lattner
f58e098889 Implement the ExecutionEngine::getPointerToFunctionOrStub by forwarding the
request on to the TargetMachine if it supports the getJITStubForFunction method

llvm-svn: 10431
2003-12-12 07:12:02 +00:00