[PATCH] D125212: [GlobalISel] Implement the HasNoUse builtin predicate
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 21 03:24:18 PDT 2022
foad added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h:199
+ /// Check if there's no use of the result.
+ /// - InsnID - Instruction ID
----------------
Should document that it applies to the first result operand - if that's what you intended to implement.
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h:390
+ const MachineInstr *MI = State.MIs[InsnID];
+ assert(MI != nullptr && "Used insn before defined");
+ assert(MI->getNumDefs() > 0 && "No defs");
----------------
Don't need `== nullptr`.
================
Comment at: llvm/include/llvm/Target/TargetSelectionDAG.td:805
+ // If set to true, a predicate is added that checks for the absence of use of
+ // the result.
+ bit HasNoUse = ?;
----------------
"... the first result"?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125212/new/
https://reviews.llvm.org/D125212
More information about the llvm-commits
mailing list