1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

66 Commits

Author SHA1 Message Date
Dan Gohman
c7fe713e72 Avoid referring to edge D after the Succs or Preds arrays have
been modified, to avoid trouble in the (unlikely) scenario that
D is a reference to an element in one of those arrays.

llvm-svn: 62173
2009-01-13 19:08:45 +00:00
Dan Gohman
f6ab374c28 Don't call setDepthDirty/setHeightDirty when adding an edge
with latency 0, since it doesn't affect the depth or height.

llvm-svn: 61762
2009-01-05 22:40:26 +00:00
Dan Gohman
c742da2e94 Minor code simplifications.
llvm-svn: 61371
2008-12-23 17:22:32 +00:00
Dan Gohman
112572e95e Optimize setDepthDirty and setHeightDirty a little, as they showed
up on a profile.

llvm-svn: 61344
2008-12-22 21:11:33 +00:00
Dan Gohman
ab5072f624 Use SmallVector's pop_back_val.
llvm-svn: 61277
2008-12-20 16:42:33 +00:00
Dan Gohman
8c5bea15ca Use the correct Preds and Succs lists in setHeightDirty()
and setDepthDirty(), respectively. This fixes PR3241.

llvm-svn: 61276
2008-12-20 16:34:57 +00:00
Dan Gohman
6ee60e3ac3 Use getDepth() and getHeight() instead of accessing the
Depth and Height members directly, as they may not be
current.

llvm-svn: 61121
2008-12-17 04:25:52 +00:00
Dan Gohman
40a40dd7c1 Fix some register-alias-related bugs in the post-RA scheduler liveness
computation code. Also, avoid adding output-depenency edges when both
defs are dead, which frequently happens with EFLAGS defs.

Compute Depth and Height lazily, and always in terms of edge latency
values. For the schedulers that don't care about latency, edge latencies
are set to 1.

Eliminate Cycle and CycleBound, and LatencyPriorityQueue's Latencies array.
These are all subsumed by the Depth and Height fields.

llvm-svn: 61073
2008-12-16 03:25:46 +00:00
Dan Gohman
8ddcdef08a Move addPred and removePred out-of-line.
llvm-svn: 61067
2008-12-16 01:05:52 +00:00
Dan Gohman
036cc300ad Rewrite the SDep class, and simplify some of the related code.
The Cost field is removed. It was only being used in a very limited way,
to indicate when the scheduler should attempt to protect a live register,
and it isn't really needed to do that. If we ever want the scheduler to
start inserting copies in non-prohibitive situations, we'll have to
rethink some things anyway.

A Latency field is added. Instead of giving each node a single
fixed latency, each edge can have its own latency. This will eventually
be used to model various micro-architecture properties more accurately.

The PointerIntPair class and an internal union are now used, which
reduce the overall size.

llvm-svn: 60806
2008-12-09 22:54:47 +00:00
Dan Gohman
275e6da839 Whitespace cleanups.
llvm-svn: 60769
2008-12-09 16:37:48 +00:00
Dan Gohman
92cedc8a95 Initial support for anti-dependence breaking. Currently this code does not
introduce any new spilling; it just uses unused registers.

Refactor the SUnit topological sort code out of the RRList scheduler and
make use of it to help with the post-pass scheduler.

llvm-svn: 59999
2008-11-25 00:52:40 +00:00
Dan Gohman
62180eb6f2 Rename SDep's isSpecial to isArtificial, to make this field a little
less mysterious.

llvm-svn: 59782
2008-11-21 02:18:56 +00:00
Dan Gohman
6d0d98d450 Add #include <climits> to get the definition of INT_MAX.
llvm-svn: 59692
2008-11-20 01:41:34 +00:00
Dan Gohman
77e3f07d4b Factor out the code for verifying the work of the scheduler,
extend it a bit, and make use of it in all schedulers, to
ensure consistent checking.

llvm-svn: 59689
2008-11-20 01:26:25 +00:00
Dan Gohman
f4b2751ee6 Experimental post-pass scheduling support. Post-pass scheduling
is currently off by default, and can be enabled with
-disable-post-RA-scheduler=false.

This doesn't have a significant impact on most code yet because it doesn't
yet do anything to address anti-dependencies and it doesn't attempt to
disambiguate memory references. Also, several popular targets
don't have pipeline descriptions yet.

The majority of the changes here are splitting the SelectionDAG-specific
code out of ScheduleDAG, so that ScheduleDAG can be moved to
libLLVMCodeGen.a. The interface between ScheduleDAG-using code and
the rest of the scheduling code is somewhat rough and will evolve.

llvm-svn: 59676
2008-11-19 23:18:57 +00:00