diff options
author | Aditya Nandakumar <aditya_nandakumar@apple.com> | 2020-02-18 14:42:49 -0800 |
---|---|---|
committer | Aditya Nandakumar <aditya_nandakumar@apple.com> | 2020-02-18 14:54:57 -0800 |
commit | b91d9ec0bb8caedcdd1ddf0506fc19d6c55efae3 (patch) | |
tree | 8818719f9053989f6c8a393a0db3ace57d2cd275 /llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp | |
parent | 0c2b09a9b6246aebd301ad75b5d78ac1e7daa9c4 (diff) | |
download | llvm-b91d9ec0bb8caedcdd1ddf0506fc19d6c55efae3.zip llvm-b91d9ec0bb8caedcdd1ddf0506fc19d6c55efae3.tar.gz llvm-b91d9ec0bb8caedcdd1ddf0506fc19d6c55efae3.tar.bz2 |
[GlobalISel]: Fix some non determinism exposed in CSE due to not notifying observers about mutations + add verification for CSE
https://reviews.llvm.org/D67133
While investigating some non determinism (CSE doesn't produce wrong
code, it just doesn't CSE some times) in GISel CSE on an out of tree
target, I realized that the core issue was that there were lots of code
that mutates (setReg, setRegClass etc), but doesn't notify observers
(CSE in this case but this could be any other observer). In order to
make the Observer be available in various parts of code and to avoid
having to thread it through various API, the MachineFunction now has the
observer as field. This allows it to be easily used in helper functions
such as constrainOperandRegClass.
Also added some invariant verification method in CSEInfo which can
catch these issues (when CSE is enabled).
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp')
0 files changed, 0 insertions, 0 deletions