[PATCH] D64029: [PGO] Add PGO support at -O0 in the experimental new pass manager

Rong Xu via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 2 00:23:08 PDT 2019


r367657 should fix this.

On Fri, Aug 2, 2019 at 12:20 AM Rong Xu <xur at google.com> wrote:

> yes. I already know this issue as this also breaks windows bolt.
> The fix should be simple.
>
> -Rong
>
> On Thu, Aug 1, 2019 at 11:52 PM Petr Hosek via Phabricator <
> reviews at reviews.llvm.org> wrote:
>
>> phosek added a comment.
>>
>> Looks like this change broke `Profile/gcc-flag-compatibility.c` test on
>> macOS:
>>
>>   ******************** TEST 'Clang :: Profile/gcc-flag-compatibility.c'
>> FAILED ********************
>>   Script:
>>   --
>>   : 'RUN: at line 10';
>>  /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/clang
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c -c -S
>> -o - -emit-llvm -fprofile-generate -fno-experimental-new-pass-manager |
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/FileCheck
>> -check-prefix=PROFILE-GEN
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c
>>   : 'RUN: at line 11';
>>  /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/clang
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c -c -S
>> -o - -emit-llvm -fprofile-generate -fexperimental-new-pass-manager |
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/FileCheck
>> -check-prefix=PROFILE-GEN
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c
>>   : 'RUN: at line 16';
>>  /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/clang
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c -c -S
>> -o - -emit-llvm -fprofile-generate=/path/to
>> -fno-experimental-new-pass-manager |
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/FileCheck
>> -check-prefixes=PROFILE-GEN,PROFILE-GEN-EQ
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c
>>   : 'RUN: at line 22';   rm -rf
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir
>>   : 'RUN: at line 23';   mkdir -p
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path
>>   : 'RUN: at line 24';   llvm-profdata merge
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/Inputs/gcc-flag-compatibility.proftext
>> -o
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path/default.profdata
>>   : 'RUN: at line 25';
>>  /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/clang
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c -o -
>> -Xclang -disable-llvm-passes -emit-llvm -S
>> -fprofile-use=/b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path
>> -fno-experimental-new-pass-manager |
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/FileCheck
>> -check-prefix=PROFILE-USE
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c
>>   : 'RUN: at line 26';
>>  /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/clang
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c -o -
>> -Xclang -disable-llvm-passes -emit-llvm -S
>> -fprofile-use=/b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path
>> -fexperimental-new-pass-manager |
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/FileCheck
>> -check-prefix=PROFILE-USE
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c
>>   : 'RUN: at line 30';   rm -rf
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir
>>   : 'RUN: at line 31';   mkdir -p
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path
>>   : 'RUN: at line 32';   llvm-profdata merge
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/Inputs/gcc-flag-compatibility.proftext
>> -o
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path/file.prof
>>   : 'RUN: at line 33';
>>  /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/clang
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c -o -
>> -Xclang -disable-llvm-passes -emit-llvm -S
>> -fprofile-use=/b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path/file.prof
>> -fno-experimental-new-pass-manager |
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/FileCheck
>> -check-prefix=PROFILE-USE
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c
>>   : 'RUN: at line 34';
>>  /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/clang
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c -o -
>> -Xclang -disable-llvm-passes -emit-llvm -S
>> -fprofile-use=/b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path/file.prof
>> -fexperimental-new-pass-manager |
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/FileCheck
>> -check-prefix=PROFILE-USE
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c
>>   : 'RUN: at line 39';   rm -rf
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir
>>   : 'RUN: at line 40';   mkdir -p
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path
>>   : 'RUN: at line 41';   llvm-profdata merge
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/Inputs/gcc-flag-compatibility_IR.proftext
>> -o
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path/default.profdata
>>   : 'RUN: at line 42';
>>  /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/clang
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c -o -
>> -emit-llvm -S
>> -fprofile-use=/b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path
>> -fno-experimental-new-pass-manager |
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/FileCheck
>> -check-prefix=PROFILE-USE-IR
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c
>>   : 'RUN: at line 43';
>>  /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/clang
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c -o -
>> -emit-llvm -S
>> -fprofile-use=/b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path
>> -fexperimental-new-pass-manager |
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/FileCheck
>> -check-prefix=PROFILE-USE-IR
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c
>>   : 'RUN: at line 47';   rm -rf
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir
>>   : 'RUN: at line 48';   mkdir -p
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path
>>   : 'RUN: at line 49';   llvm-profdata merge
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/Inputs/gcc-flag-compatibility_IR.proftext
>> -o
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path/file.prof
>>   : 'RUN: at line 50';
>>  /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/clang
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c -o -
>> -emit-llvm -S
>> -fprofile-use=/b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path/file.prof
>> -fno-experimental-new-pass-manager |
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/FileCheck
>> -check-prefix=PROFILE-USE-IR
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c
>>   : 'RUN: at line 51';
>>  /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/clang
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c -o -
>> -emit-llvm -S
>> -fprofile-use=/b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/tools/clang/test/Profile/Output/gcc-flag-compatibility.c.tmp.dir/some/path/file.prof
>> -fexperimental-new-pass-manager |
>> /b/s/w/ir/k/recipe_cleanup/clangOLc9jG/llvm_build_dir/bin/FileCheck
>> -check-prefix=PROFILE-USE-IR
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c
>>   --
>>   Exit Code: 1
>>
>>   Command Output (stderr):
>>   --
>>
>> /b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c:12:17:
>> error: PROFILE-GEN: expected string not found in input
>>   // PROFILE-GEN: @__profc_main = private global [2 x i64]
>> zeroinitializer, section "__llvm_prf_cnts", align 8
>>                   ^
>>   <stdin>:1:1: note: scanning from here
>>   ; ModuleID =
>> '/b/s/w/ir/k/llvm-project/clang/test/Profile/gcc-flag-compatibility.c'
>>   ^
>>   <stdin>:9:1: note: possible intended match here
>>   @__profc_main = private global [2 x i64] zeroinitializer, section
>> "__DATA,__llvm_prf_cnts", align 8
>>   ^
>>
>>   --
>>
>>
>> Repository:
>>   rL LLVM
>>
>> CHANGES SINCE LAST ACTION
>>   https://reviews.llvm.org/D64029/new/
>>
>> https://reviews.llvm.org/D64029
>>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190802/09daac19/attachment-0001.html>


More information about the cfe-commits mailing list