fir.dispatch code generation uses the binding table stored in the
type descriptor. There is no runtime call involved. The binding table
is always build from the parent type so the index of a specific binding
is the same in the parent derived-type or in the extended type.
Follow-up patches will deal cases not present here such as allocatable
polymorphic entities or pointers.
Is this code working if typeDescTy came from a fir::GloablOp and not an mlir::LLVM::GlobalOp above ? I would expect it to have a fir type in that case.