mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
4acae6beedaaaaf87edfca1c8dfeb234dfe52c95
This commit handles two cases related to function calls where we want to limit the propagation of reaching definitions. In the first case down through function calls, in the second case back up through return instructions. For the call instructions, we choose to stop the propagation of reaching definitions to the callee, since we assume each function should check its arguments if they affect the control-flow. In particular, this allows a larger coverage of the function body in case, being able to enumerate all the calls, we consider dead code those parts that, in the current program would nevere be executed. Right now we do it in all cases, it would be more appropriate to do this only if the address of the function is taken. Also, we should expand this also for tail calls. For what concerns return instructions, a function called from a lot of different locations in the code receives a huge number of reaching definitions. If its close to a no-op, it will also propagate most of them through the return path. This is an hack to limit how such definitions spread around the code. A proper solution, requires to detect the calling convention and allow to propagate along return paths only return values.
Description
Languages
C++
77.1%
Python
12.6%
MLIR
4.4%
CMake
1.9%
LLVM
1.4%
Other
2.5%