[LLVMdev] Should remove calling NULL pointer or not

Yin Ma yinma at codeaurora.org
Wed Nov 6 16:36:48 PST 2013


Hi,

 

For a small case, that calls NULL pointer function. LLVM explicitly converts

It to a store because it thinks it is not reachable like calling undefvalue.

In InstCombineCalls.cpp:930

 

I think it is not a right approach because calling null pointer function 

Will segfault the program. Converting to a store will make program pass

Silently. This changes the behavior of a program. 

 

So we need remove the case if (isa<ConstantPointerNull>(Callee) at 

InstCombineCalls.cpp:918 and treat calling Null pointer reachable.

 

How do you think? Is there any reason that we should convert 

a calling null pointer to a store?

 

Thanks,

 

Yin 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131106/5700ef0a/attachment.html>


More information about the llvm-dev mailing list