Displaying 1 result from an estimated 1 matches for "foobar_addr".
2015 Jan 26
3
[LLVMdev] Backend optimizations
...eplace every
'call' instruction by a 'push ret_addr' followed by a 'jmp func_addr'.
I'm doing this in the X86ISelLowering class with a custom inserter.
So if I have something like this:
0x0 call foobar
0x1 ...
the call will be replaced like this:
0x0 push 0x2
0x1 jmp foobar_addr
0x2 ...
This works fine in -O0, but when I try to compile in -O1,2,3, my program
fails. Since there is no more 'call' instruction, the optimizations in
the backend remove the operation that manage the function's arguments (I
guess it thinks the arguments are not needed anymore).
How c...