[PATCH] D43000: Do not move stores for coroutine allocator args
Saleem Abdulrasool via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 22:59:14 PST 2018
compnerd added inline comments.
================
Comment at: lib/Transforms/Coroutines/CoroSplit.cpp:669-674
+ for (auto AI = Alloca->user_begin(), AE = Alloca->user_end(); AI != AE;
+ ++AI) {
+ if (auto *Store = dyn_cast<llvm::StoreInst>(*AI)) {
+ DoNotRelocate.insert(Store);
+ }
+ }
----------------
Why not write this as:
for (const auto &User : Alloca->users())
if (auto *SI = dyn_cast<llvm::StoreInst>(&User))
DoNotRelocate.insert(SI);
Repository:
rL LLVM
https://reviews.llvm.org/D43000
More information about the llvm-commits
mailing list