[cfe-dev] [RFC] Introducing a byte type to LLVM

Chris Lattner via cfe-dev cfe-dev at lists.llvm.org
Wed Jun 9 09:03:08 PDT 2021


On Jun 6, 2021, at 8:52 AM, Hal Finkel <hal.finkel.llvm at gmail.com> wrote:
> I'll take this opportunity to point out that, at least historically, the reason why a desire to optimize around ptrtoint keeps resurfacing is because:
>  1. Common optimizations introduce them into code that did not otherwise have them (SROA, for example, see convertValue in SROA.cpp).
> 
>  2. They're generated by some of the ABI code for argument passing (see clang/lib/CodeGen/TargetInfo.cpp).
> 
>  3. They're present in certain performance-sensitive code idioms (see, for example, ADT/PointerIntPair.h).
> 
> It seems to me that, if there's design work to do in this area, one should consider addressing these now-long-standing issues where we introduce ptrtoint by replacing this mechanism with some other one.
> 

I completely agree.  These all have different solutions, I’d prefer to tackle them one by one.  

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210609/3d1431c0/attachment.html>


More information about the cfe-dev mailing list