[PATCH] D73803: [InstCombine] Add replaceOperand() helper
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 3 07:07:23 PST 2020
spatel accepted this revision.
spatel added a comment.
LGTM
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:687
+ /// Replace operand of instruction and add old operand to the worklist.
+ Instruction *replaceOperand(Instruction &I, unsigned Operand, Value *V) {
+ Worklist.AddValueDeferred(I.getOperand(Operand));
----------------
IMO, slightly easier to read if we name the "Operand" parameter "OpNum" or "OperandIndex" or some variant of those.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73803/new/
https://reviews.llvm.org/D73803
More information about the llvm-commits
mailing list