[PATCH] D76923: [NFC] Improve performances of Value::getSingleUndroppableUse
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 27 10:17:25 PDT 2020
nikic added a comment.
I'm seeing a 0.1-0.2% regression <http://llvm-compile-time-tracker.com/compare.php?from=17e4c38739aa78638c783dac6c149858d1c0a550&to=01c5f915086420379e1b3d5b80cb098d3beb9940&stat=instructions> with this change. Probably the added cost of the pointer tagging outweighs the benefit we see for the single user of `getSingleUndroppableUse()` right now. If this API is going to be used more heavily in the future, the picture will of course change. Hard for me to say whether it makes sense to make this change at this time.
I do wonder whether there's a middle ground here: Rather than adding a tag to `Use`, we could use a bit of subclass data on `CallInst` to indicate whether the call is droppable. That would reduce `User->isDroppable()` to a compare and mask check, and we could at least inline it.
================
Comment at: llvm/include/llvm/IR/User.h:227
+ /// This will mark every use as droppable if the user is droppable.
+ /// This should be called from
+ void maybeMarkUsesAsDroppable();
----------------
This sentence is cut off.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76923/new/
https://reviews.llvm.org/D76923
More information about the llvm-commits
mailing list