diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-02 18:45:54 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-02 18:45:54 +0000 |
commit | 5d30630e226aa1525b529b40236f46e183ae6d0a (patch) | |
tree | db84d28549acfaee55e4494222a83efa0b63f259 /llvm/lib/CodeGen/MachineTraceMetrics.h | |
parent | 0cbea7fa904d457f2cb2799904f0a190fe12fe82 (diff) | |
download | bcm5719-llvm-5d30630e226aa1525b529b40236f46e183ae6d0a.tar.gz bcm5719-llvm-5d30630e226aa1525b529b40236f46e183ae6d0a.zip |
Compute the critical path length through a trace.
Whenever both instruction depths and instruction heights are known in a
block, it is possible to compute the length of the critical path as
max(depth+height) over the instructions in the block.
The stored live-in lists make it possible to accurately compute the
length of a critical path that bypasses the current (small) block.
llvm-svn: 161197
Diffstat (limited to 'llvm/lib/CodeGen/MachineTraceMetrics.h')
-rw-r--r-- | llvm/lib/CodeGen/MachineTraceMetrics.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineTraceMetrics.h b/llvm/lib/CodeGen/MachineTraceMetrics.h index b0edfeb7bd0..33c2d959885 100644 --- a/llvm/lib/CodeGen/MachineTraceMetrics.h +++ b/llvm/lib/CodeGen/MachineTraceMetrics.h @@ -174,6 +174,11 @@ public: /// Instruction heights have been computed. This implies hasValidHeight(). bool HasValidInstrHeights; + /// Critical path length. This is the number of cycles in the longest data + /// dependency chain through the trace. This is only valid when both + /// HasValidInstrDepths and HasValidInstrHeights are set. + unsigned CriticalPath; + /// Live-in registers. These registers are defined above the current block /// and used by this block or a block below it. /// This does not include PHI uses in the current block, but it does @@ -224,6 +229,7 @@ public: void computeTrace(const MachineBasicBlock*); void computeDepthResources(const MachineBasicBlock*); void computeHeightResources(const MachineBasicBlock*); + unsigned computeCrossBlockCriticalPath(const TraceBlockInfo&); void computeInstrDepths(const MachineBasicBlock*); void computeInstrHeights(const MachineBasicBlock*); void addLiveIns(const MachineInstr *DefMI, |