SuccessChanges

Summary

  1. [IR][GVN] allow intrinsics in Instruction's isCommutative query (details)
  2. [DSE,MemorySSA] Skip defs without analyzable write locations. (details)
  3. Revert "[IR][GVN] allow intrinsics in Instruction's isCommutative query" (details)
Commit 25597f7783e7038b8a2ee88bb49ac605b211b564 by spatel
[IR][GVN] allow intrinsics in Instruction's isCommutative query

As discussed in D86798 / rG09652721 , we were potentially
returning a different result for whether an Instruction
is commutable depending on if we call the base class or
derived class method.

This requires relaxing an assert in GVN, but that pass
seems to be working otherwise.

NewGVN requires more work because it uses different
code paths for numbering binops and calls.
The file was modifiedllvm/include/llvm/IR/Instruction.h (diff)
The file was modifiedllvm/test/Transforms/GVN/commute.ll (diff)
The file was modifiedllvm/lib/Transforms/Scalar/NewGVN.cpp (diff)
The file was modifiedllvm/lib/IR/Instruction.cpp (diff)
The file was modifiedllvm/lib/Transforms/Scalar/GVN.cpp (diff)
Commit 86d817d7cf29750dfed1892d51110f44fc499c94 by flo
[DSE,MemorySSA] Skip defs without analyzable write locations.

Similar to other checks above, if there is no write location for a def,
it cannot be considered for elimination and can be skipped.
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp (diff)
Commit badd7264e1500d3bcde5f78090024fe116c4ce29 by spatel
Revert "[IR][GVN] allow intrinsics in Instruction's isCommutative query"

This reverts commit 25597f7783e7038b8a2ee88bb49ac605b211b564.
It is causing crashing on bots such as:
http://lab.llvm.org:8011/builders/fuchsia-x86_64-linux/builds/10523/steps/ninja-build/logs/stdio
The file was modifiedllvm/lib/IR/Instruction.cpp (diff)
The file was modifiedllvm/test/Transforms/GVN/commute.ll (diff)
The file was modifiedllvm/include/llvm/IR/Instruction.h (diff)
The file was modifiedllvm/lib/Transforms/Scalar/GVN.cpp (diff)
The file was modifiedllvm/lib/Transforms/Scalar/NewGVN.cpp (diff)