[PATCH] D18133: allow branch weight metadata on select instructions (PR26636)
David Li via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 14 09:49:17 PDT 2016
davidxl added inline comments.
================
Comment at: include/llvm/IR/IRBuilder.h:1571
@@ -1570,2 +1570,3 @@
Value *CreateSelect(Value *C, Value *True, Value *False,
+ const Twine &Name = "", MDNode *ProfWeights = nullptr) {
----------------
spatel wrote:
> davidxl wrote:
> > Ok.
> >
> > Is it possible to add a small test case (or update existing test case) to cover this -- i.e., after cloning (i.e via inlining), the meta data is maintained for select?
> Sure - that seems possible. But I wonder if we want to have multi-pass regression tests here? Ie, it would require 'opt -inline -simplifycfg'.
>
> I thought we shy away from that form of regression test...although there is precedent in test/Transforms/Inline/invoke_test-2.ll.
Can you feed the inliner with IR that includes profile annotated 'select'? We just need to test the inline instance has 'select' that is also profile annotated.
http://reviews.llvm.org/D18133
More information about the llvm-commits
mailing list