[PATCH] D97734: [Remarks] Emit variable info in auto-init remarks
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 2 09:39:13 PST 2021
paquette added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/AutoInitRemark.cpp:42
+static Optional<uint64_t> getSizeInBytes(Optional<uint64_t> SizeInBits) {
+ if (!SizeInBits)
+ return None;
----------------
Might as well merge the `if`s to save a line.
================
Comment at: llvm/lib/Transforms/Utils/AutoInitRemark.cpp:166
+ }
+ if (FoundDI)
+ return;
----------------
Do we want to return if `FoundDI == true`, but `Result` is empty? Is it possible to get more information from the alloca case even if `FoundDI == true`?
================
Comment at: llvm/lib/Transforms/Utils/AutoInitRemark.cpp:201
+ R << "\nVariables: ";
+ for (uint32_t i = 0; i < VIs.size(); ++i) {
+ const VariableInfo &VI = VIs[i];
----------------
Why `uint32_t`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97734/new/
https://reviews.llvm.org/D97734
More information about the llvm-commits
mailing list