[PATCH] D77795: [GlobalISel] translate freeze to new generic G_FREEZE
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 06:55:09 PDT 2020
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:2106-2107
+bool IRTranslator::translateFreeze(const llvm::User &U,
+ llvm::MachineIRBuilder &MIRBuilder) {
+ const Register DstReg = getOrCreateVReg(U);
----------------
Don't need llvm::
================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:2110
+ const Register SrcReg = getOrCreateVReg(*U.getOperand(0));
+ MIRBuilder.buildInstr(TargetOpcode::G_FREEZE, {DstReg}, {SrcReg});
+ return true;
----------------
Should add a dedicated buildFreeze
================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll:2372
+}
+
!0 = !{ i64 0, i64 2 }
----------------
Can you add a struct freeze case? Also maybe use an argument instead of a constant?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77795/new/
https://reviews.llvm.org/D77795
More information about the llvm-commits
mailing list