Displaying 1 result from an estimated 1 matches for "tracefunc".
Did you mean:
tracefnc
2007 Aug 17
1
[LLVMdev] Inserting trace information during opt transformations
...id mcp_trace_instruction(const char *)
by first declaring it inside doInitialization():
virtual bool doInitialization(Module &M)
{
std::vector<const Type*> args;
args.push_back(PointerType::get(Type::Int8Ty));
FunctionType *FT = FunctionType::get(Type::VoidTy, args, false);
TraceFunc = M.getOrInsertFunction("mcp_trace_instruction", FT);
return true;
}
then inserting a suitable CallInst instruction
new CallInst(TraceFunc, gepinst, "", *wp);
Looking at disassembly output from similar code, I can't just pass the
constant array directly to the ca...