[PATCH] D108657: [CodeExtractor] Ensuring ordering of exitStub creation
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 25 13:32:56 PDT 2021
paquette added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/CodeExtractor.cpp:1268
+
+ Value *brVal = nullptr;
+ switch (NumExitBlocks) {
----------------
jroelofs wrote:
> AndrewLitteken wrote:
> > jroelofs wrote:
> > > Should there be an assert:
> > >
> > > ```
> > > assert(NumExitBlocks < 0xffff && "too many exit blocks for switch");
> > > ```
> > >
> > > or do you think that's too unlikely to matter?
> > I think it's pretty unlikely that there will ever by that many exits out of a function.
> 👍
I think it would be good to assert anyway if it's possible that it will happen. In the event that it does, I'd prefer to debug an assert than a later crash.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108657/new/
https://reviews.llvm.org/D108657
More information about the llvm-commits
mailing list