[PATCH] D86226: GlobalISel: Do not set observer of MachineIRBuilder in LegalizerHelper
Aditya Nandakumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 10:26:37 PDT 2020
aditya_nandakumar added a comment.
My thought on this Observer ownership is as follows (which I think I mentioned in another review).
- Each pass will setup an observer(wrapper) and install it to the MF. The MF at this point has the reference to the observer, and the pass owns each observer as it decides what it needs to observe and how.
- At the end of each pass, just reset the observer (there are RAII helpers for this).
- Remove the observer in MachineIRBuilder (is there a need for this?).
- No need to thread observer through APIs. Instead we get it through `MF.getObserver()`.
Thoughts?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86226/new/
https://reviews.llvm.org/D86226
More information about the llvm-commits
mailing list