[PATCH] D52131: [GISel][NFC]: Make MachineIRBuilder fully stateless
Aditya Nandakumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 14 18:17:07 PDT 2018
aditya_nandakumar created this revision.
aditya_nandakumar added reviewers: ab, aemerson, dsanders, volkan, bogner, qcolombet, arsenm, rtereshin.
Herald added a subscriber: wdng.
Herald added a reviewer: javed.absar.
Completely separate out MachineIRBuilderState from MachineIRBuilder as it makes it possible to use different kinds of builders (ConstantFolding/CSEing) by just passing the State.
This makes it inconvenient by 1 extra line to define a builder - for eg
MachineIRBuilderState State;
MachineIRBuilder B(State);
AnyOtherBuilder AOB(State);
Also instead of passing in MachineIRBuilder everywhere - pass in the state - this allows for the target/hook to be explicit about what they expect the builder to do.
Repository:
rL LLVM
https://reviews.llvm.org/D52131
Files:
include/llvm/CodeGen/GlobalISel/Combiner.h
include/llvm/CodeGen/GlobalISel/IRTranslator.h
include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
include/llvm/CodeGen/GlobalISel/RegBankSelect.h
lib/CodeGen/GlobalISel/Combiner.cpp
lib/CodeGen/GlobalISel/IRTranslator.cpp
lib/CodeGen/GlobalISel/Legalizer.cpp
lib/CodeGen/GlobalISel/LegalizerHelper.cpp
lib/CodeGen/GlobalISel/LegalizerInfo.cpp
lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
lib/CodeGen/GlobalISel/RegBankSelect.cpp
lib/Target/AArch64/AArch64InstructionSelector.cpp
lib/Target/AArch64/AArch64LegalizerInfo.cpp
lib/Target/AArch64/AArch64LegalizerInfo.h
lib/Target/ARM/ARMLegalizerInfo.cpp
lib/Target/ARM/ARMLegalizerInfo.h
tools/llvm-exegesis/lib/Assembler.cpp
unittests/CodeGen/GlobalISel/LegalizerHelperTest.h
unittests/CodeGen/GlobalISel/PatternMatchTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52131.165622.patch
Type: text/x-patch
Size: 21860 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180915/bf616df4/attachment.bin>
More information about the llvm-commits
mailing list