diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-10-23 02:10:46 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-10-23 02:10:46 +0000 |
commit | ec6906ba47d6d32cc817e85eddb87b320d6ae18c (patch) | |
tree | 838fc08e4513b0a5f6846a13e69f179902a09763 /lib/CodeGen/ScheduleDAGInstrs.h | |
parent | dd9dd6f857604abdeb5213648ffe50c10ccc59b9 (diff) |
Properly model the latency of register defs which are 1) function returns or
2) live-outs.
Previously the post-RA schedulers completely ignore these dependencies since
returns, branches, etc. are all scheduling barriers. This patch model the
latencies between instructions being scheduled and the barriers. It also
handle calls by marking their register uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117193 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ScheduleDAGInstrs.h')
-rw-r--r-- | lib/CodeGen/ScheduleDAGInstrs.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/CodeGen/ScheduleDAGInstrs.h b/lib/CodeGen/ScheduleDAGInstrs.h index bc07d9ea04..c878287d9c 100644 --- a/lib/CodeGen/ScheduleDAGInstrs.h +++ b/lib/CodeGen/ScheduleDAGInstrs.h @@ -164,6 +164,15 @@ namespace llvm { /// input. virtual void BuildSchedGraph(AliasAnalysis *AA); + /// AddSchedBarrierDeps - Add dependencies from instructions in the current + /// list of instructions being scheduled to scheduling barrier. We want to + /// make sure instructions which define registers that are either used by + /// the terminator or are live-out are properly scheduled. This is + /// especially important when the definition latency of the return value(s) + /// are too high to be hidden by the branch or when the liveout registers + /// used by instructions in the fallthrough block. + void AddSchedBarrierDeps(); + /// ComputeLatency - Compute node latency. /// virtual void ComputeLatency(SUnit *SU); |