[PATCH] D45067: [GISel] Refactor MachineIRBuilder so we can optionally do constant folding/other transformations during building
Aditya Nandakumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 29 16:06:40 PDT 2018
aditya_nandakumar added a comment.
Forgot to mention one other benefit of separating out the state.
If given a MachineIRBuilder in some API, but instead want to use another kind of builder locally, we can just construct the new builder locally from the state.
void doFoo(MachineIRBuilder &B) {
MyCustomBuilder CustomB(B.getState());
// Use CustomB for building.
}
Repository:
rL LLVM
https://reviews.llvm.org/D45067
More information about the llvm-commits
mailing list