[PATCH] D93927: [ArgPromotion] Copy !range metadata for loads.
Chenguang Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 1 10:20:34 PDT 2021
wecing marked 2 inline comments as done.
wecing added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:318-325
+ bool isOrigLoadGuaranteedToExecute = true;
+ for (const Instruction &II : *BB) {
+ if (!isOrigLoadGuaranteedToExecute || &II == OrigLoad) {
+ break;
+ }
+ isOrigLoadGuaranteedToExecute =
+ llvm::isGuaranteedToTransferExecutionToSuccessor(&II);
----------------
MatzeB wrote:
> avoid check for isOrigLoadGuaranteedToExecute in every loop iteration.
We need to check the result of llvm::isGuaranteedToTransferExecutionToSuccessor() in every iteration anyways. The difference between my code and yours is minimal. :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93927/new/
https://reviews.llvm.org/D93927
More information about the llvm-commits
mailing list