[EarlyCSE] Remove void return restriction for call CSE (#145320)
For readonly/readnone calls returning void we can't CSE the return
value. However, making these participate in CSE is still useful,
because it allows DCE of calls that are not willreturn/nounwind
(something no other part of LLVM is capable of removing).
The more interesting use-case is CSE for writeonly calls (not
yet supported), but I figured this change makes sense independently.
There is no impact on compile-time.
GitOrigin-RevId: 0112f12eb61b2ea5cde750506c31afbfc8b9ea8a
4 files changed