[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 8 10:05:25 PST 2024


Sirraide wrote:

> This feature is a bit more complicated than it appears at first. LLVM will often pessimize code in the presence of assumptions and that's the exact opposite of what users will expect from this feature.

Yeah, I’ve since looked into the discussions on that topic.

> that seemed to have pretty strong support for dropping llvm.assume annotations due to how problematic they are in practice.

Yeah, imo that seems like the right approach to me at least since `@llvm.assume` being a pessimisation in some cases seems like something the backend should be handling, not the frontend, but that’s just my opinion.

>  @Sirraide, would you be comfortable if you, @erichkeane, and I co-authored an RFC to the community?

Sure, I’d be happy to help with that as best I can. An RFC makes sense imo seeing as this really impacts more parts of LLVM than just Clang.

> (I'm sorry to add the extra layer of work on what would otherwise seem like a straightforward PR, this is a bit of an unusual situation.)

No problem. Getting this figured out properly does seem like the right approach here.

https://github.com/llvm/llvm-project/pull/81014


More information about the cfe-commits mailing list