[LLVMdev] loads from a null address and optimizations
vargaz at gmail.com
Sat Sep 5 12:19:23 PDT 2009
Currently, llvm treats the loads from a null address as unreachable code,
load i32* null
is transformed by some optimization pass into
This presents problems in JIT compilers like mono which implement null
pointer checks by trapping SIGSEGV signals. It also
looks incorrect since it changes program behavior, which might be undefined
in general, but it is quite well defined on unix.
Is there a way to prevent llvm from doing this besides marking all loads as
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev