[PATCH] D55147: Exclude non-integral pointers in isBytewiseValue

Cherry Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 3 08:43:42 PST 2018


cherry added a comment.

Thank you for the comment!

> The basic approach we took was two fold: 1) Disallow stores of non-integral types as "legal stores" in the sense of this file,

I guess "this file" you refers is ValueTracking.cpp? But it doesn't seem to mention legal stores. There is "legal store" in LoopIdiomRecognize.cpp. But in this case it probably won't completely fix our problem, where memset could be generated in MemCpyOpt. I initially thought of fixing just MemCpyOpt. As the spec says non-integral pointers "have an unspecified bitwise representation", I turn to the current patch, which I think is more aligned with the spec.

> and 2) inhibit formation of geps off of null in an non-integral address space so as to prevent formation of inttoptrs.

Sorry, I'm not sure I fully understand this. This seems a reasonable thing to do. But I'm sure how it is related to storing null values into non-integral pointer typed memory.

If you would like to share your patch, I'm happy to take a look and give it a try. Thank you!


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55147/new/

https://reviews.llvm.org/D55147





More information about the llvm-commits mailing list