[PATCH] D29512: [PGO] Directory name stripping in global identifier for static functions

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 17:14:41 PST 2017


davidxl added inline comments.


================
Comment at: test/Transforms/PGOProfile/statics_counter_naming.ll:4
+; RUN: opt %s --pgo-instr-gen -static-func-strip-dirname-prefix=1000 -S | FileCheck %s --check-prefix=GEN
+; RUN: opt %s -passes=pgo-instr-gen -static-func-strip-dirname-prefix=1000 -S | FileCheck %s --check-prefix=GEN
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
----------------
xur wrote:
> davidxl wrote:
> > The test does not actually test anything. Better add case that strips the expected separators. 
> I can not assume the source directory structure. It's hard to write a test that strip the exact number of directory strings. But at least this test shows that the new option can replace the original option.
ok. perhaps add a negative test that if stripping is not used, it will fail?


https://reviews.llvm.org/D29512





More information about the llvm-commits mailing list