[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

Oliver Hunt via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri May 16 15:41:27 PDT 2025


ojhunt wrote:

@pcc and I have been discussing this.

* The perf issues I was concerned about were predicated on access to a pointer loaded from a field continuing to be checked after the original field load, this is not the case (and in hindsight doing so would imply passing the pointer as a parameter to a function would maintain the tag and require the target knowing about it). 
* I have a better understanding of why the offset behavior is required - it is easier for me to reason about when considering reference parameters as those are much more ubiquitous and invisible to the user, so requiring annotations or breaking up such calls isn't really an option. I still don't like the current approach but I have yet to think of anything that would be better :-/
* For the POD ABI fixups I realized what I really want is just to have the codegen separated out - if it turns out there are cases where the codegen size is excessive I'm sure we could add a heuristic for outlining it if needed, but I think the real issue for me now was actually just that the fixup codegen was inline.

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


More information about the llvm-branch-commits mailing list