Calling changeToUnreachable in manifest from different places might cause really unpredictable problems. As other deleting functions are doing, we need to change these instructions after all manifest.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This makes sense and LGTM.
FWIW. We have to go over the entire "rewrite after manifest" stuff soon.
llvm/include/llvm/Transforms/IPO/Attributor.h | ||
---|---|---|
1040–1041 | How about a SmallVector here? I think it makes sense since we never lookup values on this set (which is I guess the primary reason to make a set), it should have amortized O(1) and it is easier to loop over. | |
1040–1041 | Oh my bad, I just saw it was committed. |
llvm/include/llvm/Transforms/IPO/Attributor.h | ||
---|---|---|
1040–1041 | I think SmallVector isn't a set. We don't want to change the same instruction to unreachable twice so SmallPtrSet seems good to me. |
llvm/include/llvm/Transforms/IPO/Attributor.h | ||
---|---|---|
1040–1041 | Yes, that's a safer way. |
How about a SmallVector here? I think it makes sense since we never lookup values on this set (which is I guess the primary reason to make a set), it should have amortized O(1) and it is easier to loop over.