|
Compilers are allowed to hoist function calls and do GVE.
This is currently done even without `--optimization` enabled.
This is unfortunate in the context of KLEE function calls that might
depend on specific code position without direct control flow
dependencies. In such cases, function calls can be hoisted.
To circumvent this, disallow to optimise functions that contain such
calls by default. This might reduce optimisation for some functions
containing such function calls but still allows it for all others.
This patch adds an additional pass, that detects all functions starting with a
prefix `klee_` and disable optimisations for functions containing such
calls.
This is enabled by default but can be disabled by
`--klee-call-optimisation=false`.
|