[PATCH] D142777: [RISCV] Add asserts that we don't increase codesize during pseudo expansion
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 27 12:20:39 PST 2023
reames planned changes to this revision.
reames added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVExpandAtomicPseudoInsts.cpp:81
+ NewSize += TII->getInstSizeInBytes(MI);
+ assert(OldSize >= NewSize);
return Modified;
----------------
craig.topper wrote:
> craig.topper wrote:
> > Will this warn in release builds? Should we put #ifndef NDEBUG around the loops?
> Warn for unused variables I mean.
It might since the variable is repeatedly increment, but your point is solid and deserves a rework regardless.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142777/new/
https://reviews.llvm.org/D142777
More information about the llvm-commits
mailing list