diff options
| author | Pete Cooper <peter_cooper@apple.com> | 2014-06-03 22:42:10 +0000 |
|---|---|---|
| committer | Pete Cooper <peter_cooper@apple.com> | 2014-06-03 22:42:10 +0000 |
| commit | 722355775239c54087cf2314b6047aed47fd9ec9 (patch) | |
| tree | 7c707640f17a23665e34aa22374953fe35f4ad8a /llvm/include | |
| parent | 8de08a962774fd93dc7b30f8c1e3d1022569dde0 (diff) | |
| download | bcm5719-llvm-722355775239c54087cf2314b6047aed47fd9ec9.tar.gz bcm5719-llvm-722355775239c54087cf2314b6047aed47fd9ec9.zip | |
Calculate dead instructions when a live interval is created.
This gets us closer to being able to remove LiveVariables entirely which is where dead instructions are currently tagged as such.
Reviewed by Jakob Olesen
llvm-svn: 210132
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h b/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h index ddd623c2a33..176665bc256 100644 --- a/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -155,6 +155,17 @@ namespace llvm { bool shrinkToUses(LiveInterval *li, SmallVectorImpl<MachineInstr*> *dead = nullptr); + /// \brief Walk the values in the given interval and compute which ones + /// are dead. Dead values are not deleted, however: + /// - Dead PHIDef values are marked as unused. + /// - New dead machine instructions are added to the dead vector. + /// - CanSeparate is set to true if the interval may have been separated + /// into multiple connected components. + void computeDeadValues(LiveInterval *li, + LiveRange &LR, + bool *CanSeparate, + SmallVectorImpl<MachineInstr*> *dead); + /// extendToIndices - Extend the live range of LI to reach all points in /// Indices. The points in the Indices array must be jointly dominated by /// existing defs in LI. PHI-defs are added as needed to maintain SSA form. |

