[PATCH] D146734: [CodeGen] Use RegUnits in RegisterClassInfo::getLastCalleeSavedAlias
Quentin Colombet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 4 06:16:39 PDT 2023
qcolombet added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/RegisterClassInfo.h:121
+ for (MCRegUnitIterator UI(PhysReg, TRI); UI.isValid(); ++UI) {
+ CSR = CalleeSavedAliases[*UI];
+ if (CSR)
----------------
Cannot this get out of range?
I.e., I believe we could assert that `*UI` is bigger than `CalleeSavedAliases.size()`.
I am wondering why the check was there in the previous implementation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146734/new/
https://reviews.llvm.org/D146734
More information about the llvm-commits
mailing list