[LLVMdev] Why would -disable-fp-elim cause SEGV in JIT, when without it code works fine?
clattner at apple.com
Wed Jun 30 22:21:11 PDT 2010
On Jun 23, 2010, at 8:00 PM, Yuri wrote:
>> Another useful technique is to use x/20i<funcaddr> to look at the
>> assembly of the JITed function to see what is wrong with it. You
>> should be able to get the function addresses from your addr2line
>> output. As a last resort, you can unwind the stack yourself, so long
>> as all the code you're running has frame pointers enabled.
> I think there is some bug in indirectbr instruction. It actually doesn't work in JIT in the current trunk, but I submitted a patch some time ago that implements it. Someone suggested that I should eliminate code incapsulation breach, but this is besides the point here.
> Once this patch applied, JIT supports address of label for instruction. It works, except in one large case. In this case I spotted the entry in one table of labels that contains pointer to invalid code. -print-machine-code prints assembly that looks correct, but the printout is missing memory location information: where each line is laid in memory.
Adding state to the BasicBlock class for the JIT isn't the right approach. Please use a DenseMap in the JIT. I don't recall if this email was before or after your other patch, if this was before it, please disregard!
More information about the llvm-dev