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

Markus Lavin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 22 06:52:00 PDT 2022

markus added a comment.

In D123300#3467309 <https://reviews.llvm.org/D123300#3467309>, @nikic wrote:

> Sounds reasonable in general -- though isn't this a pre-existing problem you'd see if you simply had multiple loads from the same global (without any GEP)? Looking at the current ConstantHoist code, it doesn't seem to really consider the case where a global symbol address can be expensive, it only handles hoisting of large integer values.

Indeed, multiple (GEP-less) loads from the same symbol gives the same problem. At least if they are spread out across the CFG, otherwise isel deals with it. Not sure what is the right way to deal with this. Maybe we will try making some modifications to ConstantHoist.

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list