[PATCH] D116971: [AttributorAttributes] Remove hardcoded parameters
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 12 18:28:13 PST 2022
reames added a comment.
Went to split out and land your getSize changes, and noticed two things:
1. The existing code is wrong. There's a missing trunc/zext to pointer index type which can result in wrong results in edge cases. (Not a bug in the patch, a bug in the code you're changing.)
2. I think I found a better approach than your getAllocSizeParams. We can expose essentially the body of the visitCallBase used by getObjectSize with a callback for replacing an operand with a constant. I'm going to write that up tomorrow, and see if it works out the way I'm currently picturing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116971/new/
https://reviews.llvm.org/D116971
More information about the llvm-commits
mailing list