[PATCH] D22600: [PGO] Fix profile mismatch in Comdat function with pre-inliner

David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 13:56:06 PDT 2016


davidxl added inline comments.

================
Comment at: test/Transforms/PGOProfile/comdat_rename.ll:2
@@ +1,3 @@
+; RUN: opt < %s -pgo-instr-gen -S | FileCheck %s
+; RUN: opt < %s -passes=pgo-instr-gen -S | FileCheck %s
+
----------------
xur wrote:
> davidxl wrote:
> > you may want to try this test case on other platform such as coff to make sure it works:
> > 
> >  -mtriple=x86_64-pc-win32-coff 
> The test failed for the AvailableExternallyLinkage case. The reason is in needsComdatForCounter().
> 
> For AvailableExternallyLinkage, since this is not ELF format target, we return false.
> 
> I'm wondering if we should move the checking for TargetTriple() after the linkage check. The target can have Comdat support for nonELF targets after all.
> 
you should explicitly add -mtripple (covering elf and coff). For coff case, do not check availableExternally (which is not supported yet with this change).


https://reviews.llvm.org/D22600





More information about the llvm-commits mailing list