search for: modify_f

Displaying 1 result from an estimated 1 matches for "modify_f".

2020 Apr 16
2
What can the optimizer assume about the memory a global function pointer points to?
...modify the machine code implementing the function. What does the optimizer assume about the memory containing the machine code? The following is an example where Alive2 assumes that transforming @src to @tgt is correct (note that @f is marked readnone): declare i32 @f() readnone declare void @modify_f() define i32 @src() { call void @modify_f() %r = call i32 @f() ret i32 %r } define i32 @tgt() { %r = call i32 @f() call void @modify_f() ret i32 %r } Is this actually a correct transformation? If yes, what is the exact rule? Several possibilities come to my mind: * The memo...