llvm-project
579aca87 - [VPlan] Prevent uses of materialized VPSymbolicValues. (NFC) (#182318)

Commit
31 days ago
[VPlan] Prevent uses of materialized VPSymbolicValues. (NFC) (#182318) After VPSymbolicValues (like VF and VFxUF) are materialized via replaceAllUsesWith, they should not be accessed again. This patch: 1. Tracks materialization state in VPSymbolicValue. 2. Asserts if the materialized VPValue is used again. Currently it adds asserts to various member functions, preventing calling them on materialized symbolic values. Note that this still allows some uses (e.g. comparing VPSymbolicValue references or pointers), but this should be relatively harmless given that it is impossible to (re-)add any users. If we want to further tighten the checks, we could add asserts to the accessors or override operator&, but that will require more changes and not add much extra guards I think. Depends on https://github.com/llvm/llvm-project/pull/182146 to fix a current access violation. PR: https://github.com/llvm/llvm-project/pull/182318
Author
Parents
Loading