summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetInstrInfo.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2016-08-23 21:21:43 +0000
committerPhilip Reames <listmail@philipreames.com>2016-08-23 21:21:43 +0000
commit570dd009c376cce18dd7f9a894854c4d4bd51b30 (patch)
treea62c34600a8fdbf08352efbd5e9d13dab776441f /llvm/lib/CodeGen/TargetInstrInfo.cpp
parent90799ce8b2b1fc495235d0a774878ba0972b192d (diff)
downloadbcm5719-llvm-570dd009c376cce18dd7f9a894854c4d4bd51b30.tar.gz
bcm5719-llvm-570dd009c376cce18dd7f9a894854c4d4bd51b30.zip
[stackmaps] Extract out magic constants [NFCI]
This is a first step towards clarifying the exact MI semantics of stackmap's "live values". llvm-svn: 279574
Diffstat (limited to 'llvm/lib/CodeGen/TargetInstrInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetInstrInfo.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/TargetInstrInfo.cpp b/llvm/lib/CodeGen/TargetInstrInfo.cpp
index 78eb567daf8..3982e1e71d1 100644
--- a/llvm/lib/CodeGen/TargetInstrInfo.cpp
+++ b/llvm/lib/CodeGen/TargetInstrInfo.cpp
@@ -437,11 +437,15 @@ static MachineInstr *foldPatchpoint(MachineFunction &MF, MachineInstr &MI,
const TargetInstrInfo &TII) {
unsigned StartIdx = 0;
switch (MI.getOpcode()) {
- case TargetOpcode::STACKMAP:
- StartIdx = 2; // Skip ID, nShadowBytes.
+ case TargetOpcode::STACKMAP: {
+ // StackMapLiveValues are foldable
+ StackMapOpers opers(&MI);
+ StartIdx = opers.getVarIdx();
break;
+ }
case TargetOpcode::PATCHPOINT: {
- // For PatchPoint, the call args are not foldable.
+ // For PatchPoint, the call args are not foldable (even if reported in the
+ // stackmap e.g. via anyregcc).
PatchPointOpers opers(&MI);
StartIdx = opers.getVarIdx();
break;
OpenPOWER on IntegriCloud