aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-11-17 01:36:23 +0000
committerAndrew Trick <atrick@apple.com>2013-11-17 01:36:23 +0000
commitbb756ca24401e190e3b704e5d92759c7a79cc6b7 (patch)
tree0c4bcba47b3a9717739a7c8f876a88363dc3ae02 /include/llvm/Target
parentb7dabccbce5fc6fcf7b36669eb04abcb001e7f9e (diff)
downloadexternal_llvm-bb756ca24401e190e3b704e5d92759c7a79cc6b7.zip
external_llvm-bb756ca24401e190e3b704e5d92759c7a79cc6b7.tar.gz
external_llvm-bb756ca24401e190e3b704e5d92759c7a79cc6b7.tar.bz2
Added a size field to the stack map record to handle subregister spills.
Implementing this on bigendian platforms could get strange. I added a target hook, getStackSlotRange, per Jakob's recommendation to make this as explicit as possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r--include/llvm/Target/TargetInstrInfo.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h
index f9edc7d..d4e14f6 100644
--- a/include/llvm/Target/TargetInstrInfo.h
+++ b/include/llvm/Target/TargetInstrInfo.h
@@ -181,6 +181,23 @@ public:
return false;
}
+ /// Compute the size in bytes and offset within a stack slot of a spilled
+ /// register or subregister.
+ ///
+ /// \param [out] Size in bytes of the spilled value.
+ /// \param [out] Offset in bytes within the stack slot.
+ /// \returns true if both Size and Offset are successfully computed.
+ ///
+ /// Not all subregisters have computable spill slots. For example,
+ /// subregisters registers may not be byte-sized, and a pair of discontiguous
+ /// subregisters has no single offset.
+ ///
+ /// Targets with nontrivial bigendian implementations may need to override
+ /// this, particularly to support spilled vector registers.
+ virtual bool getStackSlotRange(const TargetRegisterClass *RC, unsigned SubIdx,
+ unsigned &Size, unsigned &Offset,
+ const TargetMachine *TM) const;
+
/// reMaterialize - Re-issue the specified 'original' instruction at the
/// specific location targeting a new destination register.
/// The register in Orig->getOperand(0).getReg() will be substituted by