You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, all the needed code is in there, but it looks like llvmir2hll ignores the phi node and takes only the first value in it. Ideally, it should handle this correctly, but ...
It looks like LLVM optimizations went much further than we needed in this case. Basically, the whole switch got optimized into a single phi node. It has no function anymore - other than giving phi node info from which BB control flow came, so it can decide which value to use. I don't see how we could reasonably represent this in C, without basically reverting the optimization and putting the assignments back to switch case bodies. So this is probably the reason llvmir2hll does not handle this.
@s3rvac I will need to discuss this with you, since this is quite an interesting problem without an obvious solution.
The text was updated successfully, but these errors were encountered:
After #652 I had to disable IDA plugin tests:
Ok state before:
State after register localization:
At first, I thought register localization caused LLVM passes to optimize out the correct code. But then I saw this in the final LLVM IR module:
So, all the needed code is in there, but it looks like
llvmir2hll
ignores thephi
node and takes only the first value in it. Ideally, it should handle this correctly, but ...It looks like LLVM optimizations went much further than we needed in this case. Basically, the whole switch got optimized into a single
phi
node. It has no function anymore - other than givingphi
node info from which BB control flow came, so it can decide which value to use. I don't see how we could reasonably represent this in C, without basically reverting the optimization and putting the assignments back to switch case bodies. So this is probably the reasonllvmir2hll
does not handle this.@s3rvac I will need to discuss this with you, since this is quite an interesting problem without an obvious solution.
The text was updated successfully, but these errors were encountered: