Generalized support for subgraphs that get rendered unreachable, for
both call and invoke cases.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM modulo cosmetic changes. Your new algorithm looks pretty robust to me. Thanks!
llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp | ||
---|---|---|
156–160 | An instruction can never be CallInst and InvokeInst at the same time because InvokeInst and CallInst are siblings derived from CallBase. Yo could shave one line with: if (const auto *II = dyn_cast<InvokeInst>(&CB)) { const auto *UnwindDest = II->getUnwindDest(); Successors.insert(succ_begin(UnwindDest), succ_end(UnwindDest)); } | |
230–246 | Could we avoid the negated name for clarity? We can shorten the variable name and remove one line. if (I >= IncludeSuccessorsMark) Reinclude.insert(succ_begin(BB), succ_end(BB)); | |
233 | May I suggest an empty line immediately after the loop? We are starting a new code block here. |
An instruction can never be CallInst and InvokeInst at the same time because InvokeInst and CallInst are siblings derived from CallBase. Yo could shave one line with: