[PATCH] D18133: allow branch weight metadata on select instructions (PR26636)

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 08:26:34 PDT 2016


spatel added inline comments.

================
Comment at: include/llvm/IR/IRBuilder.h:1579
@@ -1578,2 +1578,3 @@
 
   Value *CreateSelect(Value *C, Value *True, Value *False,
+                      const Twine &Name = "", MDNode *ProfWeights = nullptr) {
----------------
davidxl wrote:
> The cloneImpl  member method of the SelectInstr also needs to be updated to clone the metadata.
Please let me know if there's a logic hole, but I think the base Instruction::clone() method handles this, so subclasses don't need to:
http://llvm.org/klaus/llvm/blob/master/lib/IR/Instruction.cpp#L-577




http://reviews.llvm.org/D18133





More information about the llvm-commits mailing list