[PATCH] D67133: [GlobalISel]: Fix some non determinism exposed in CSE due to not notifying observers about mutations + add verification for CSE

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 4 11:59:52 PDT 2019


qcolombet added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/Legalizer.cpp:298-299
   }
+  if (CSEInfo)
+    CSEInfo->verify();
 
----------------
aditya_nandakumar wrote:
> paquette wrote:
> > Should this be under `#ifndef NDEBUG?`
> Definitely. Thanks for catching.
I would rather have `verify` returns a bool and do:
assert(!CSEInfo || CSEInfo->Info());


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67133/new/

https://reviews.llvm.org/D67133





More information about the llvm-commits mailing list