================
@@ -625,10 +625,20 @@ void CIRGenFunction::finishIndirectBranch() {
succesors.push_back(labelOp->getBlock());
rangeOperands.push_back(labelOp->getBlock()->getArguments());
}
+ // Labels whose address was taken only from a constant initializer have no
+ // function-local BlockAddressOp; add them as successors here. All labels
+ // are emitted by now, so the lookup resolves.
+ for (cir::BlockAddrInfoAttr info : constBlockAddressLabels) {
----------------
andykaylor wrote:
I think you can replace the `blockAddressToLabel` map with a single vector of
indirect goto targets as `BlockAddrInfoAttr` in CGF, and you can get rid of the
whole `mapUnresolvedBlockAddress`, `mapResolvedBlockAddress`,
`updateResolvedBlockAddress` business because it's not really necessary. Then
you get one container and one loop here.
https://github.com/llvm/llvm-project/pull/201644
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits