llvm-project
llvm-project copied to clipboard
Make setPSet/getPSet more robust?
It is more of a question than a bug or feature. Lots of the visit functions have extra checks if an expression can have a PSet. We might also miss some checks.
Maybe it would be better to just make getPSet and setPSet noop for expressions without psets and simplify the visit functions? This way we would never miss a check (but sometimes we might have redundant ones).
Fyi: compiler explorer (llvm default) builds without assertions, so there we don't have crashes but instead unknown psets.
Great NEWS! The main intention of this PR is to reduce the number of hasPSet checks in the code. But in case that does not bother us, it is also OK. :)