[LLVMdev] JIT machine code deletion
ralph at inputplus.co.uk
Fri May 12 02:02:16 PDT 2006
> If you don't *know* that all (e.g.) function pointers to this code are
> dead (which means that execution could come back to the function), you
> should use the ExecutionEngine::recompileAndRelinkFunction(F) method.
recompileAndRelinkFunction() overwrites the old machine code with a
branch to the new. Is it always guaranteed that there's space to write
the new branch instructions? A quick look suggests the x86 takes five
bytes, PowerPC 16, and the Alpha's implementation is an assert(0) but if
it did call its EmitBranchToAt() then that would be 76. Could the
original machine code be smaller?
More information about the llvm-dev