[PATCH] D60844: [GISel]: IRTranslator: Prefer a buidInstr form that allows CSE of cast instructions
Aditya Nandakumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 15:54:17 PDT 2019
aditya_nandakumar created this revision.
aditya_nandakumar added reviewers: arsenm, aemerson, qcolombet, volkan, bogner.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
Use the style of buildInstr that allows CSEing.
Repository:
rL LLVM
https://reviews.llvm.org/D60844
Files:
lib/CodeGen/GlobalISel/IRTranslator.cpp
Index: lib/CodeGen/GlobalISel/IRTranslator.cpp
===================================================================
--- lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -608,7 +608,7 @@
MachineIRBuilder &MIRBuilder) {
unsigned Op = getOrCreateVReg(*U.getOperand(0));
unsigned Res = getOrCreateVReg(U);
- MIRBuilder.buildInstr(Opcode).addDef(Res).addUse(Op);
+ MIRBuilder.buildInstr(Opcode, {Res}, {Op});
return true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60844.195648.patch
Type: text/x-patch
Size: 504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190417/b3c22b9d/attachment.bin>
More information about the llvm-commits
mailing list