[PATCH] D84782: [PGO] Include the mem ops into the function hash.

David Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 29 13:06:42 PDT 2020


davidxl accepted this revision.
davidxl added a comment.
This revision is now accepted and ready to land.

lgtm (with the small test enhancement)



================
Comment at: llvm/test/Transforms/PGOProfile/Inputs/multiple_hash_profile.proftext:20
 18
 12
 
----------------
nit: change 12 to a different value say 6.(otherwise if the option is an nop, the test will still succeed).


================
Comment at: llvm/test/Transforms/PGOProfile/multiple_hash_profile.ll:3
 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata  -S | FileCheck %s
+; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -pgo-instr-old-cfg-hashing=true -S | FileCheck %s
 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s
----------------
Use a different prefix like CHECKOLD


================
Comment at: llvm/test/Transforms/PGOProfile/multiple_hash_profile.ll:33
 ; CHECK-SAME: !prof ![[BW:[0-9]+]]
 ; CHECK: ![[BW]] = !{!"branch_weights", i32 12, i32 6}
   %retval.0.i = mul nsw i32 %mul.i, %i
----------------
CHECKOLD expects a different weight.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84782/new/

https://reviews.llvm.org/D84782



More information about the cfe-commits mailing list