[PATCH] D19290: [PGOProfile] Make tests independent of the raw profile version (NFC)

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 16:05:33 PDT 2016


> On Apr 19, 2016, at 3:55 PM, Justin Bogner <mail at justinbogner.com> wrote:
> 
> Vedant Kumar via llvm-commits <llvm-commits at lists.llvm.org> writes:
>> vsk created this revision.
>> vsk added a reviewer: xur.
>> vsk added a subscriber: llvm-commits.
>> 
>> This patch makes it easier to bump the raw profile version.
> 
> I guess this diff is reversed, because it kind of looks like it's making
> the checks *more* specific...

Yikes! Sorry about that.


> One comment, below.
> 
>> http://reviews.llvm.org/D19290
>> 
>> Files:
>>  test/Transforms/PGOProfile/branch1.ll
>>  test/Transforms/PGOProfile/branch2.ll
>>  test/Transforms/PGOProfile/criticaledge.ll
>>  test/Transforms/PGOProfile/landingpad.ll
>>  test/Transforms/PGOProfile/loop1.ll
>>  test/Transforms/PGOProfile/loop2.ll
>>  test/Transforms/PGOProfile/single_bb.ll
>>  test/Transforms/PGOProfile/switch.ll
>> 
>> Index: test/Transforms/PGOProfile/switch.ll
>> ===================================================================
>> --- test/Transforms/PGOProfile/switch.ll
>> +++ test/Transforms/PGOProfile/switch.ll
>> @@ -5,7 +5,7 @@
>> target triple = "x86_64-unknown-linux-gnu"
>> 
>> ; GEN: $__llvm_profile_raw_version = comdat any
>> -; GEN: @__llvm_profile_raw_version = constant i64 [[VER:[0-9]+]], comdat
>> +; GEN: @__llvm_profile_raw_version = constant i64 72057594037927939, comdat
>> ; GEN: @__profn_test_switch = private constant [11 x i8] c"test_switch"
>> 
>> define void @test_switch(i32 %i) {
>> Index: test/Transforms/PGOProfile/single_bb.ll
>> ===================================================================
>> --- test/Transforms/PGOProfile/single_bb.ll
>> +++ test/Transforms/PGOProfile/single_bb.ll
>> @@ -3,7 +3,7 @@
>> target triple = "x86_64-unknown-linux-gnu"
>> 
>> ; GEN: $__llvm_profile_raw_version = comdat any
>> -; GEN: @__llvm_profile_raw_version = constant i64 [[VER:[0-9]+]], comdat
>> +; GEN: @__llvm_profile_raw_version = constant i64 72057594037927939, comdat
>> ; GEN: @__profn_single_bb = private constant [9 x i8] c"single_bb"
>> 
>> define i32 @single_bb() {
>> Index: test/Transforms/PGOProfile/loop2.ll
>> ===================================================================
>> --- test/Transforms/PGOProfile/loop2.ll
>> +++ test/Transforms/PGOProfile/loop2.ll
>> @@ -5,7 +5,7 @@
>> target triple = "x86_64-unknown-linux-gnu"
>> 
>> ; GEN: $__llvm_profile_raw_version = comdat any
>> -; GEN: @__llvm_profile_raw_version = constant i64 [[VER:[0-9]+]], comdat
>> +; GEN: @__llvm_profile_raw_version = constant i64 72057594037927939, comdat
>> ; GEN: @__profn_test_nested_for = private constant [15 x i8] c"test_nested_for"
>> 
>> define i32 @test_nested_for(i32 %r, i32 %s) {
>> Index: test/Transforms/PGOProfile/loop1.ll
>> ===================================================================
>> --- test/Transforms/PGOProfile/loop1.ll
>> +++ test/Transforms/PGOProfile/loop1.ll
>> @@ -5,7 +5,7 @@
>> target triple = "x86_64-unknown-linux-gnu"
>> 
>> ; GEN: $__llvm_profile_raw_version = comdat any
>> -; GEN: @__llvm_profile_raw_version = constant i64 [[VER:[0-9]+]], comdat
>> +; GEN: @__llvm_profile_raw_version = constant i64 72057594037927939, comdat
>> ; GEN: @__profn_test_simple_for = private constant [15 x i8] c"test_simple_for"
>> 
>> define i32 @test_simple_for(i32 %n) {
>> Index: test/Transforms/PGOProfile/landingpad.ll
>> ===================================================================
>> --- test/Transforms/PGOProfile/landingpad.ll
>> +++ test/Transforms/PGOProfile/landingpad.ll
>> @@ -7,7 +7,7 @@
>> @val = global i32 0, align 4
>> @_ZTIi = external constant i8*
>> ; GEN: $__llvm_profile_raw_version = comdat any
>> -; GEN: @__llvm_profile_raw_version = constant i64 [[VER:[0-9]+]], comdat
>> +; GEN: @__llvm_profile_raw_version = constant i64 72057594037927939, comdat
>> ; GEN: @__profn_bar = private constant [3 x i8] c"bar"
>> ; GEN: @__profn_foo = private constant [3 x i8] c"foo"
>> 
>> Index: test/Transforms/PGOProfile/criticaledge.ll
>> ===================================================================
>> --- test/Transforms/PGOProfile/criticaledge.ll
>> +++ test/Transforms/PGOProfile/criticaledge.ll
>> @@ -5,7 +5,7 @@
>> target triple = "x86_64-unknown-linux-gnu"
>> 
>> ; GEN: $__llvm_profile_raw_version = comdat any
>> -; GEN: @__llvm_profile_raw_version = constant i64 [[VER:[0-9]+]], comdat
>> +; GEN: @__llvm_profile_raw_version = constant i64 72057594037927939, comdat
>> ; GEN: @__profn_test_criticalEdge = private constant [17 x i8] c"test_criticalEdge"
>> ; GEN: @__profn__stdin__bar = private constant [11 x i8] c"<stdin>:bar"
>> 
>> Index: test/Transforms/PGOProfile/branch2.ll
>> ===================================================================
>> --- test/Transforms/PGOProfile/branch2.ll
>> +++ test/Transforms/PGOProfile/branch2.ll
>> @@ -5,7 +5,7 @@
>> target triple = "x86_64-unknown-linux-gnu"
>> 
>> ; GEN: $__llvm_profile_raw_version = comdat any
>> -; GEN: @__llvm_profile_raw_version = constant i64 [[VER:[0-9]+]], comdat
>> +; GEN: @__llvm_profile_raw_version = constant i64 72057594037927939, comdat
>> ; GEN: @__profn_test_br_2 = private constant [9 x i8] c"test_br_2"
>> 
>> define i32 @test_br_2(i32 %i) {
>> Index: test/Transforms/PGOProfile/branch1.ll
>> ===================================================================
>> --- test/Transforms/PGOProfile/branch1.ll
>> +++ test/Transforms/PGOProfile/branch1.ll
>> @@ -7,8 +7,8 @@
>> ; GEN-DARWIN-LINKONCE: target triple = "x86_64-apple-darwin"
>> 
>> ; GEN-COMDAT: $__llvm_profile_raw_version = comdat any
>> -; GEN-COMDAT: @__llvm_profile_raw_version = constant i64 [[VER:[0-9]+]], comdat
>> -; GEN-LINKONCE: @__llvm_profile_raw_version = linkonce constant i64 [[@VER]]
> 
> This doesn't look right - to reference the capture from the first
> statement it would be [[VER]], not [[@VER]], no?

Hm, yeah. This is wrong on another count: the CHECK prefixes are different!

vedant


> 
>> +; GEN-COMDAT: @__llvm_profile_raw_version = constant i64 72057594037927939, comdat
>> +; GEN-LINKONCE: @__llvm_profile_raw_version = linkonce constant i64 72057594037927939
>> ; GEN: @__profn_test_br_1 = private constant [9 x i8] c"test_br_1"
>> 
>> define i32 @test_br_1(i32 %i) {
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list