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

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 12:21:04 PDT 2016


spatel 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) {
----------------
davidxl wrote:
> 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.
Ah, in that case the test that you would like to see is actually independent of this patch. I'll add it anyway to make sure that I'm understanding. It doesn't look like we even have a test with that profile metadata check for an inlined *branch*.


http://reviews.llvm.org/D18133





More information about the llvm-commits mailing list