[LLVMdev] Trying to use patchpoint in MCJIT
Will Dietz
willdtz at gmail.com
Tue Dec 17 16:43:40 PST 2013
On Tue, Dec 17, 2013 at 4:42 PM, Gaƫl Thomas <gael.thomas00 at gmail.com> wrote:
> %5 = call i64 (i64, i32, i8*, i32, ...)* @llvm.experimental.patchpoint.i64(
> i64 42, ;; patch point id is 42
> i32 0, ;; 0 bytes for the padding
> i8* bitcast (i32 (i32)* @f to i8*), ;; my function f
> i32 1, ;; 1 argument
> i32 0) ;; the argument
It appears patchpoint doesn't yet support function symbols as the target:
SelectionDAGBuilder.cpp:6949:
-----------------------------------
// Assume that the Callee is a constant address.
// FIXME: handle function symbols in the future.
Ops.push_back(
DAG.getIntPtrConstant(cast<ConstantSDNode>(Callee)->getZExtValue(),
/*isTarget=*/true));
-----------------------------------
Which is hit when I attempt to run something similar to your example
through llc. The assertion doesn't fail when I replace the @f bitcast
with "i8* null".
Hope this helps, attached is sample bitcode demonstrating the issue.
~Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.ll
Type: application/octet-stream
Size: 458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131217/31a6ab77/attachment.obj>
More information about the llvm-dev
mailing list