[PATCH] D154722: [AArch64] Refactor AArch64InstrInfo::isAsCheapAsAMove (NFC)
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 24 02:37:32 PDT 2023
dmgreen added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:818
+LLVM_ATTRIBUTE_ALWAYS_INLINE static bool
+canBeExpandedToMOVZNK(const MachineInstr &MI, unsigned BitSize) {
+ uint64_t Imm = static_cast<uint64_t>(MI.getOperand(1).getImm());
----------------
Is it worth using AArch64_IMM::expandMOVImm with checking the Insns.size() <= 2? It might be a little slower, but more precise and should handle any canBeExpandedToORR / canBeExpandedToMOVZNK /anything else it learns about in the future.
Does this need to be LLVM_ATTRIBUTE_ALWAYS_INLINE? Those kinds of decisions are usually best left to the optimizer.
================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:823
+// FIXME: this implementation should be micro-architecture dependent, so a
+// micro-architecture target hook should be introduced here in future.
----------------
What do you mean by micro-architecture dependent?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154722/new/
https://reviews.llvm.org/D154722
More information about the llvm-commits
mailing list