[llvm-dev] RFC: Removing TerminatorInst, simplifying calls

Dean Michael Berris via llvm-dev
Thu, 17 May 2018 16:13:01 -0000

> On 17 May 2018, at 23:42, Alex Denisov via llvm-dev <llvm-dev at
lists.llvm.org> wrote:
>
> I'm curious how it would affect the getTerminator() method of a basic
block? I.e., how would one find the terminating instruction in that case? By
iterating over all of them or ...?

I think we already maintain an index of instructions that are “terminators”. If
we don’t do that yet, we probably should.

-- Dean