[PATCH] D37419: Teach scalar evolution to handle inttoptr/ptrtoint
    David Li via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sun Sep  3 00:03:34 PDT 2017
    
    
  
davidxl added a comment.
The class of inputs are usually generated by other optimizations such as SROA from C++ code --  the int/ptr conversions are usually not directly created by the user code.   Logically speaking, handling of inttoptr/ptrtoint is no different from BitCast operation (ideally also implemented using BitCast op, but not doable due to IR spec), so there is no reason we should treat them as opaque while not doing so for BitCast.
Unless we can fully get rid of these operations,  analysis passes will still have to deal with them. Missing handling those operations is simply a bug to be fixed independent of wether there is a pass to reduce/eliminate them.
https://reviews.llvm.org/D37419
    
    
More information about the llvm-commits
mailing list