[PATCH] D71435: [WIP] [Attributor] Function level undefined behavior attribute
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 15 18:32:05 PST 2019
jdoerfert added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1993
+ if (!canCauseUB) {
+ noUBLoads.insert(I);
+ }
----------------
baziotis wrote:
> I couldn't find a way to save the entry so that we don't have to search the second (i.e. like in the unordered_map).
Search the second what?
`if (MySmallPtrSet.count(&I))`
and
`MySmallPtrSet.insert(&I)`
should work just fine.
Nit: I would not do the `Iref` and `I = &Iref` thing but just use the reference (called `I`) and the `&` as needed.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71435/new/
https://reviews.llvm.org/D71435
More information about the llvm-commits
mailing list