diff options
author | Wolfgang Pieb <Wolfgang.Pieb@sony.com> | 2019-02-04 20:42:45 +0000 |
---|---|---|
committer | Wolfgang Pieb <Wolfgang.Pieb@sony.com> | 2019-02-04 20:42:45 +0000 |
commit | 2260299d7e2f6e97bf284e84f49b984fc7c0ead0 (patch) | |
tree | b9389799b81e222b8897ff5e3f8190b0a796c7b2 /include/llvm/CodeGen | |
parent | 6186e8e51b1d7e76a68ec60a1620f6b4e844f0b3 (diff) | |
download | llvm-2260299d7e2f6e97bf284e84f49b984fc7c0ead0.tar.gz |
[DEBUGINFO] Reposting r352642: Handle restore instructions in LiveDebugValues
The LiveDebugValues pass recognizes spills but not restores, which can
cause large gaps in location information for some variables, depending
on control flow. This patch make LiveDebugValues recognize restores and
generate appropriate DBG_VALUE instructions.
This patch was posted previously with r352642 and reverted in r352666 due
to buildbot errors. A missing return statement was the cause for the
failures.
Reviewers: aprantl, NicolaPrica
Differential Revision: https://reviews.llvm.org/D57271
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353089 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 39432f94ad5..352334d2524 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -1399,6 +1399,19 @@ public: /// Return true if all the defs of this instruction are dead. bool allDefsAreDead() const; + /// Return a valid size if the instruction is a spill instruction. + Optional<unsigned> getSpillSize(const TargetInstrInfo *TII) const; + + /// Return a valid size if the instruction is a folded spill instruction. + Optional<unsigned> getFoldedSpillSize(const TargetInstrInfo *TII) const; + + /// Return a valid size if the instruction is a restore instruction. + Optional<unsigned> getRestoreSize(const TargetInstrInfo *TII) const; + + /// Return a valid size if the instruction is a folded restore instruction. + Optional<unsigned> + getFoldedRestoreSize(const TargetInstrInfo *TII) const; + /// Copy implicit register operands from specified /// instruction to this instruction. void copyImplicitOps(MachineFunction &MF, const MachineInstr &MI); |