summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-11-26 02:03:25 +0000
committerAndrew Trick <atrick@apple.com>2013-11-26 02:03:25 +0000
commit501aeea3256514d26e9d88bdbf74508c7f46be98 (patch)
treefac95663928861e8cd3a6eed2cc268ae215fb846 /include
parent151ed664892bfd43560071034cb2fd8f74a11a61 (diff)
downloadllvm-501aeea3256514d26e9d88bdbf74508c7f46be98.tar.gz
llvm-501aeea3256514d26e9d88bdbf74508c7f46be98.tar.bz2
llvm-501aeea3256514d26e9d88bdbf74508c7f46be98.tar.xz
StackMap: Implement support for DirectMemRefOp.
A Direct stack map location records the address of frame index. This address is itself the value that the runtime requested. This differs from IndirectMemRefOp locations, which refer to a stack locations from which the requested values must be loaded. Direct locations can directly communicate the address if an alloca, while IndirectMemRefOp handle register spills. For example: entry: %a = alloca i64... llvm.experimental.stackmap(i32 <ID>, i32 <shadowBytes>, i64* %a) Since both the alloca and stackmap intrinsic are in the entry block, and the intrinsic takes the address of the alloca, the runtime can assume that LLVM will not substitute alloca with any intervening value. This must be verified by the runtime by checking that the stack map's location is a Direct location type. The runtime can then determine the alloca's relative location on the stack immediately after compilation, or at any time thereafter. This differs from Register and Indirect locations, because the runtime can only read the values in those locations when execution reaches the instruction address of the stack map. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195712 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/Target.td2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/Target/Target.td b/include/llvm/Target/Target.td
index 3f6eae6bb2..8871c5714c 100644
--- a/include/llvm/Target/Target.td
+++ b/include/llvm/Target/Target.td
@@ -805,6 +805,7 @@ def STACKMAP : Instruction {
let InOperandList = (ins i32imm:$id, i32imm:$nbytes, variable_ops);
let isCall = 1;
let mayLoad = 1;
+ let usesCustomInserter = 1;
}
def PATCHPOINT : Instruction {
let OutOperandList = (outs unknown:$dst);
@@ -812,6 +813,7 @@ def PATCHPOINT : Instruction {
i32imm:$nargs, i32imm:$cc, variable_ops);
let isCall = 1;
let mayLoad = 1;
+ let usesCustomInserter = 1;
}
}