[PATCH] D123300: [Clang] Enable opaque pointers by default

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 07:53:02 PDT 2022


nikic added a comment.

@markus Without tracing through it in detail, I'd guess that without opaque pointers this creates two getelementptr constant expressions that get folded together. With opaque pointers, the first one (which would be a zero-index GEP) is omitted, and only the second one is left. ConstantFolding will later canonicalize the GEP source type, but this only happens when InstCombine runs, while you're looking at unoptimized IR.

Are you encountering some particular issue relating to this? For well-written optimizations, the exact GEP representation shouldn't matter either way.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123300



More information about the llvm-commits mailing list