1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 13:33:37 +02:00
Commit Graph

124 Commits

Author SHA1 Message Date
Chris Lattner
2f0ee1833d s/Method/Function
llvm-svn: 2336
2002-04-27 07:27:19 +00:00
Chris Lattner
536cf1b13f * Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
  - Method is now const
  - It now takes one AnalysisUsage object to fill in instead of 3 vectors
    to fill in
  - Pass's now specify which other passes they _preserve_ not which ones
    they modify (be conservative!)
  - A pass can specify that it preserves all analyses (because it never
    modifies the underlying program)
* s/Method/Function/g in other random places as well

llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner
97ce718b8d No need to reserve space, erasing does not change the size of the container.
llvm-svn: 2201
2002-04-09 18:01:21 +00:00
Chris Lattner
119c675af7 * Add a file header with some information
* Delete the DelaySlotInfo objects created by the SchedulingManager class.
  These leaked objects were accounting for 3/4 of the memory leaked by the
  backend, so this is a relatively major win.
* Reorganize SchedulingManager::getDelaySlotInfoForInstr so that it has
  better code locality (making it easier to read).

llvm-svn: 2197
2002-04-09 05:45:58 +00:00
Chris Lattner
cd23d94446 Clean up the ownership model a bit so that nodes actually get deleted more
frequently. This still leaks edges quite a bit, but it leaks no nodes
(I think).

llvm-svn: 2190
2002-04-09 05:15:33 +00:00
Chris Lattner
c8166cec07 s/Method/Function
llvm-svn: 2180
2002-04-08 22:03:57 +00:00
Chris Lattner
bc15ae64dd Change references to the Method class to be references to the Function
class.  The Method class is obsolete (renamed) and all references to it
are being converted over to Function.

llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Vikram S. Adve
fa2ed7e6b1 Use deterministic iterator for SchedGraphs. This is actually not
useful right now when we only do local scheduling.

llvm-svn: 1975
2002-03-24 03:53:03 +00:00
Vikram S. Adve
058ec11ea3 Bug fix: nextToTry was not being initialized in one case.
llvm-svn: 1974
2002-03-24 03:46:15 +00:00
Vikram S. Adve
37d44e7de9 Add option to disable scheduling.
llvm-svn: 1973
2002-03-24 03:45:35 +00:00
Vikram S. Adve
0cdcf40121 Add option to disable scheduling.
Destroy live-variable information after scheduling so it is
recomputed before later phases (e.g., reg. allocation).
Use deterministic iterator to enumerate sched graphs.

llvm-svn: 1972
2002-03-24 03:44:55 +00:00
Vikram S. Adve
d18a1cc9fb Minor changes.
llvm-svn: 1971
2002-03-24 03:40:59 +00:00
Chris Lattner
c481e92886 Rename Method to Function
llvm-svn: 1957
2002-03-23 22:51:58 +00:00
Anand Shukla
32c3ca3f0c Change to make it build with GCC 2.95.3
llvm-svn: 1802
2002-02-26 18:57:15 +00:00
Chris Lattner
3cffcc10bc * Silence signed/unsigned warnings
* Make it compile with GCC 3.0.4

llvm-svn: 1787
2002-02-24 23:01:50 +00:00
Chris Lattner
8e9be000a7 * Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
llvm/Support/CFG.h
* Make pred & succ iterators for intervals global functions
* Add #includes that are now neccesary because BasicBlock.h doesn't include
  InstrTypes.h anymore

llvm-svn: 1750
2002-02-12 22:39:50 +00:00
Chris Lattner
b0a2c5546b Method.h no longer includes BasicBlock.h
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h

llvm-svn: 1746
2002-02-12 21:07:25 +00:00
Chris Lattner
e282c0b592 Convert operand iterator over to work like an STL iterator
llvm-svn: 1720
2002-02-05 06:02:59 +00:00
Chris Lattner
5337fbec40 Minor change: Methods that return ValueSet's that are guaranteed to be valid
return references instead of pointers.

llvm-svn: 1719
2002-02-05 04:20:12 +00:00
Chris Lattner
dc3aec7a90 * Eliminate the LiveVarSet class, making applyTranferFuncForMInst a static
function in the one .cpp file that uses it.  Use ValueSet's instead.
* Prepare to delete LiveVarSet.h & LiveVarSet.cpp
* Eliminate the ValueSet class, making all old member functions into global
  templates that will eventually be moved to Support.

llvm-svn: 1711
2002-02-05 02:51:01 +00:00
Chris Lattner
467da46166 * Add a #include not indirectly included any more
llvm-svn: 1707
2002-02-05 00:35:14 +00:00
Chris Lattner
9cd29563f0 * The itf exposed by InstrScheduling is now a single function to create the right pass
* InstructionScheduling is now a real pass
* InstrSched _uses_ LiveVar analysis, instead of creating it's own copy many times
  through a loop.  In this was LiveVarAnalysis is actually even SHARED by Register
  allocation.
* SchedPriorities is now passed the live var information in

llvm-svn: 1700
2002-02-04 20:02:16 +00:00
Chris Lattner
69e3aba1e9 Remove dependence on BBLiveVar from InstrScheduling
Minor cleanups

llvm-svn: 1688
2002-02-04 16:35:45 +00:00
Chris Lattner
f0828cf3dd Move instrIsFeasible from InstrScheduling.h
llvm-svn: 1674
2002-02-04 05:55:42 +00:00
Chris Lattner
45cdd0fb0c * Move command line parsing debug stuff to InstrScheduling internal header file
SchedPriorities.h

llvm-svn: 1669
2002-02-04 02:44:20 +00:00
Chris Lattner
8ea2029cfa Remove extraneous #includes
llvm-svn: 1645
2002-02-03 07:30:08 +00:00
Chris Lattner
a58db0f194 * Straighten out #includes
* Switch from MachineCodeForVMInstr to MachineCodeForInstruction model

llvm-svn: 1644
2002-02-03 07:29:45 +00:00
Chris Lattner
b44b5b6f9a * Get machine instrs from Instructin's by using MachineCodeForInstruction::get
* Convert a few (*X). to X->

llvm-svn: 1643
2002-02-03 07:28:30 +00:00
Chris Lattner
24eb24166b Make it build with 2.95.3
llvm-svn: 1554
2002-01-23 05:47:57 +00:00
Chris Lattner
3dc9a2a61f Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
c4a5815033 Renamed inst_const_iterator -> const_inst_iterator
Renamed op_const_iterator   -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()

llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner
463cc31132 Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant.

Move files and fix #includes

llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner
b914467e57 Stuff after a #endif is not valid CPP input and breaks some compilers
llvm-svn: 1375
2001-11-26 18:56:52 +00:00
Vikram S. Adve
624846d3fd Eliminate most uses of the machine instruction vector for each LLVM instr,
since some m. instr. may be generated by LLVM instrs. in other blocks.
Handle non-SSA (anti and output) edges and true edges uniformly by
working with machine instructions alone.

llvm-svn: 1269
2001-11-12 18:53:43 +00:00
Vikram S. Adve
3a5bf13976 Major improvement to how nodes are built for a BB.
LLVM instruction is no longer recorded in each node, but BB is.

llvm-svn: 1262
2001-11-12 14:18:01 +00:00
Vikram S. Adve
0b0bd6e749 Only add true dep. edges from an earlier to a later instruction.
This wasn't a problem until we started putting copies for Phi values
that produced cycles in the SchedGraph!

llvm-svn: 1254
2001-11-11 01:23:27 +00:00
Vikram S. Adve
cc746868d7 Use node->getOpCode() instead of node->getMachineInstr()->getOpCode().
Much nicer.

llvm-svn: 1223
2001-11-09 02:14:20 +00:00
Vikram S. Adve
841ffd6a44 Major change to how defs are found when adding dependences (they
are now found as part of the initial walk of the machine code).
Also memory load/store instructions can be generated for non-memory
LLVM instructions, which wasn't handled before.  It is now.

llvm-svn: 1199
2001-11-08 05:20:23 +00:00
Vikram S. Adve
149bd3837d MachineCodeForMethod is now an annotation on class Method.
llvm-svn: 1198
2001-11-08 05:18:18 +00:00
Vikram S. Adve
c3993d28ca Modified graph construction to use one pass to find all defs.
Avoids having to handle some special cases that cause complex interactions
with instr. selection.

llvm-svn: 1138
2001-11-05 04:04:23 +00:00
Vikram S. Adve
ffe94cb175 Allow combinations of True/Anti/Output flags for each edge to
support, e.g., dependences on Call instructions.

llvm-svn: 1009
2001-10-28 21:45:02 +00:00
Vikram S. Adve
9515b10102 Add edges between call instructions and (a) load/store instructions, and
(b) any instructions that use or set CC registers.  Whether or not the
latter are needed really should be machine-dependent.

llvm-svn: 1008
2001-10-28 21:43:33 +00:00
Vikram S. Adve
5acd0fb918 Modify code that processes delay slots so that it preserves any
useful instructions already inserted into delay slots.

llvm-svn: 945
2001-10-22 13:49:27 +00:00
Vikram S. Adve
abed788cd9 Separate VM instruction that generates the instructions that compute a value
from the value itself (the one causing an edge) because the latter may be
a temporary used within the instruction sequence for the VM instruction.

llvm-svn: 858
2001-10-17 23:55:16 +00:00
Vikram S. Adve
41be9ce333 *** empty log message ***
llvm-svn: 857
2001-10-17 23:53:16 +00:00
Chris Lattner
b9e0153cfe * Fix privacy issues on RegToRefVecMap
* Fix initialization order problems...

llvm-svn: 762
2001-10-13 06:51:01 +00:00
Vikram S. Adve
1fe4d4071c Add graph edges due to implicit refs in each machine instruction.
llvm-svn: 724
2001-10-11 04:22:45 +00:00
Vikram S. Adve
623324dea9 Don't insert useful instructions in delay slot of a RETURN.
llvm-svn: 721
2001-10-10 20:58:11 +00:00
Chris Lattner
08b1dde37e Commit more code over to new cast style
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner
ad1b0a1a83 Convert more code to use new style casts
Eliminate old style casts from value.h

llvm-svn: 696
2001-10-01 20:11:19 +00:00
Chris Lattner
43781f1f96 Add support for new style casts
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Vikram S. Adve
180dee14b8 Bug fixes:
(1) Ensure that delay slot instructions are not moved out of place (this
    was happening for some CALL instructions).  Basically, we need to
    move all delay slot instructions out of the graph and handle them
    along with the delayed control transfer instruction.
(2) Mark scheduled instructions correctly when instructions are scheduled
    in more than one cycle in a single step (due to delay slots).

llvm-svn: 678
2001-09-30 23:43:34 +00:00
Vikram S. Adve
d376407048 Minor changes for bug fixes in SchedGraph.cpp.
llvm-svn: 677
2001-09-30 23:37:26 +00:00
Vikram S. Adve
5d7dcfd698 Two bug fixes:
(1) Add edges for Values that are written by multiple m/c instructions
(2) Add edges for LLVM operands that are not machine operands (e.g., Call args)

llvm-svn: 676
2001-09-30 23:36:58 +00:00
Chris Lattner
9b45b18404 Pull iterators out of CFG.h and CFGdecls and put them in Support directory
llvm-svn: 664
2001-09-28 22:56:31 +00:00
Vikram S. Adve
0a57de77e9 Format file header.
llvm-svn: 611
2001-09-18 12:52:03 +00:00
Vikram S. Adve
0a78fdff45 Add new entry/exit edges when removing delay slot nodes from the graph.
Renamed some header files.

llvm-svn: 610
2001-09-18 12:51:38 +00:00
Vikram S. Adve
1eb14a86ef Moved erase edge functions to class SchedGraph.
Add new dummy edges when deleting existing edges.

llvm-svn: 609
2001-09-18 12:50:40 +00:00
Vikram S. Adve
538d42467b Renamed some header files.
llvm-svn: 608
2001-09-18 12:49:39 +00:00
Vikram S. Adve
63c60c9419 Moved erase-edge functions from SchedGraphNode to SchedGraph.
Renamed some header files.

llvm-svn: 607
2001-09-18 12:49:26 +00:00
Chris Lattner
cbf2f72954 Add a forward decl, oops.
llvm-svn: 573
2001-09-14 17:55:51 +00:00
Chris Lattner
d6a98c11bc Chris seems fond of #include <vector>. Fix these. Also convert use list in
Value to a vector instead of a list.

Move SchedGraph.h & SchedPriorities.h into lib/CodeGen/InstrScheduling

llvm-svn: 572
2001-09-14 16:56:32 +00:00
Chris Lattner
de29307caa Split Target/Machine.h into three files:
* Machine.h
* InstInfo.h
* SchedInfo.h

TODO: Split out reg info stuff
llvm-svn: 567
2001-09-14 06:08:03 +00:00
Chris Lattner
a0a3946882 Make a new llvm/Target #include directory.
Move files from lib/CodeGen/TargetMachine to lib/Target
Move TargetData.h and TargetMachine.h to Target/{Data.h|Machine.h}
Prepare to split TargetMachine.h into several smaller files

llvm-svn: 566
2001-09-14 05:34:53 +00:00
Chris Lattner
7e70cdb641 Checkin changes to:
1. Clean up the TargetMachine structure.  No more wierd pointers that have to
   be cast around and taken care of by the target.
2. Instruction Scheduling now takes the schedinfo as an argument.  The same
   should be done with the instinfo, it just isn't now.

llvm-svn: 565
2001-09-14 04:32:55 +00:00
Chris Lattner
65f74b8d84 Use predicate for Value type test
llvm-svn: 540
2001-09-10 20:09:28 +00:00
Chris Lattner
b095aaa8f4 I really don't like it when people break the build.
llvm-svn: 510
2001-09-09 19:41:52 +00:00
Chris Lattner
beefdaad8b Remove unneeded #includes
llvm-svn: 489
2001-09-07 21:22:28 +00:00
Chris Lattner
fd10317614 Remove unnecesary #include add dump calls pulled out of .h file
llvm-svn: 488
2001-09-07 21:21:03 +00:00
Chris Lattner
c1ca76ff89 * Remove lots of #includes
llvm-svn: 487
2001-09-07 21:19:42 +00:00
Vikram S. Adve
9fd1f9c1c2 Makefile for InstrSched/
llvm-svn: 403
2001-08-28 23:17:22 +00:00
Vikram S. Adve
ad002e37d5 Implementation of instruction scheduling for LLVM.
Currently schedules one basic block at a time.

llvm-svn: 396
2001-08-28 23:07:19 +00:00
Vikram S. Adve
91d73a52d5 Class that encapsulates priority heuristics for instruction scheduling.
llvm-svn: 395
2001-08-28 23:06:49 +00:00
Vikram S. Adve
23be1e0839 Scheduling DAG for instruction scheduling. Currently for a single basic block.
llvm-svn: 394
2001-08-28 23:06:02 +00:00