If bitcode reader gets an invalid branch weight, drop that from the
inputs. This allows us to read the broken modules we generated before
the verifier was able to catch this.
rdar://64870641
Differential D83699
[Bitcode] Drop invalid branch_weight in BitcodeReader steven_wu on Jul 13 2020, 10:50 AM. Authored by
Details If bitcode reader gets an invalid branch weight, drop that from the rdar://64870641
Diff Detail
Event TimelineComment Actions So this is a bitcode "upgrade" of sorts. An alternative would be to implement this in Verifier and strip invalid metadata similar to how invalid debug info is stripped, but treating this as an upgrade in the bitcode reader is probably fine too.
Comment Actions Address review feedback and also add a testcase to make sure good branch I don't think the debug info approach is good here since it is a lot of
|
Perhaps even more explicit:
// "Upgrade" older incorrect branch weights by dropping them.