[all-commits] [llvm/llvm-project] e5766f: Use uint64_t for branch weights instead of uint32_t

aeubanks via All-commits all-commits at lists.llvm.org
Mon Oct 26 20:35:42 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e5766f25c62c185632e3a75bf45b313eadab774b
      https://github.com/llvm/llvm-project/commit/e5766f25c62c185632e3a75bf45b313eadab774b
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M clang/lib/CodeGen/CodeGenPGO.cpp
    M clang/test/CodeGen/catch-undef-behavior.c
    M clang/test/CodeGenCXX/attr-likelihood-if-branch-weights.cpp
    M clang/test/CodeGenCXX/attr-likelihood-if-vs-builtin-expect.cpp
    M clang/test/CodeGenCXX/attr-likelihood-switch-branch-weights.cpp
    M clang/test/CodeGenCXX/microsoft-abi-thread-safe-statics.cpp
    M clang/test/CodeGenCXX/profile-remap.cpp
    M clang/test/CodeGenCXX/static-initializer-branch-weights.cpp
    M clang/test/Profile/c-captured.c
    R clang/test/Profile/c-counter-overflows.c
    M clang/test/Profile/c-general.c
    M clang/test/Profile/cxx-class.cpp
    M clang/test/Profile/cxx-lambda.cpp
    M clang/test/Profile/cxx-rangefor.cpp
    M clang/test/Profile/cxx-templates.cpp
    M clang/test/Profile/cxx-throws.cpp
    M clang/test/Profile/gcc-flag-compatibility.c
    M clang/test/Profile/objc-general.m
    M compiler-rt/test/profile/Inputs/comdat_rename_1.cpp
    M compiler-rt/test/profile/Inputs/comdat_rename_2.cpp
    M compiler-rt/test/profile/Linux/instrprof-basic.c
    M compiler-rt/test/profile/Linux/instrprof-cs.c
    M compiler-rt/test/profile/instrprof-basic.c
    M compiler-rt/test/profile/instrprof-dump.c
    M compiler-rt/test/profile/instrprof-hostname.c
    M compiler-rt/test/profile/instrprof-override-filename-then-reset-default.c
    M compiler-rt/test/profile/instrprof-override-filename-with-env.c
    M compiler-rt/test/profile/instrprof-override-filename.c
    M compiler-rt/test/profile/instrprof-reset-counters.c
    M compiler-rt/test/profile/instrprof-set-filename-then-reset-default.c
    M compiler-rt/test/profile/instrprof-set-filename.c
    M compiler-rt/test/profile/instrprof-without-libc.c
    M compiler-rt/test/profile/instrprof-write-file-atexit-explicitly.c
    M compiler-rt/test/profile/instrprof-write-file-only.c
    M compiler-rt/test/profile/instrprof-write-file.c
    M llvm/include/llvm/IR/Instructions.h
    M llvm/include/llvm/IR/MDBuilder.h
    M llvm/include/llvm/Transforms/Scalar/LowerExpectIntrinsic.h
    M llvm/include/llvm/Transforms/Utils/MisExpect.h
    M llvm/lib/Analysis/BranchProbabilityInfo.cpp
    M llvm/lib/IR/Instructions.cpp
    M llvm/lib/IR/MDBuilder.cpp
    M llvm/lib/Transforms/IPO/SampleProfile.cpp
    M llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
    M llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
    M llvm/lib/Transforms/Scalar/JumpThreading.cpp
    M llvm/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp
    M llvm/lib/Transforms/Utils/CodeExtractor.cpp
    M llvm/lib/Transforms/Utils/Local.cpp
    M llvm/lib/Transforms/Utils/MisExpect.cpp
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Analysis/BranchProbabilityInfo/basic.ll
    A llvm/test/Analysis/BranchProbabilityInfo/basic_i32.ll
    M llvm/test/Instrumentation/AddressSanitizer/basic.ll
    M llvm/test/Transforms/CodeExtractor/MultipleExitBranchProb.ll
    M llvm/test/Transforms/CorrelatedValuePropagation/profmd.ll
    M llvm/test/Transforms/JumpThreading/threading_prof1.ll
    M llvm/test/Transforms/JumpThreading/threading_prof2.ll
    M llvm/test/Transforms/JumpThreading/update-edge-weight.ll
    M llvm/test/Transforms/LoopUnroll/peel-loop-pgo-deopt.ll
    M llvm/test/Transforms/LoopUnroll/peel-loop-pgo.ll
    M llvm/test/Transforms/LoopUnroll/runtime-loop-branchweight.ll
    M llvm/test/Transforms/LoopVectorize/check-prof-info.ll
    M llvm/test/Transforms/LoopVectorize/tripcount.ll
    M llvm/test/Transforms/LowerExpectIntrinsic/basic.ll
    M llvm/test/Transforms/LowerExpectIntrinsic/expect-with-probability.ll
    M llvm/test/Transforms/LowerExpectIntrinsic/expect_nonboolean.ll
    M llvm/test/Transforms/LowerExpectIntrinsic/phi_merge.ll
    M llvm/test/Transforms/LowerExpectIntrinsic/phi_or.ll
    M llvm/test/Transforms/LowerExpectIntrinsic/phi_tern.ll
    M llvm/test/Transforms/PGOProfile/branch1.ll
    M llvm/test/Transforms/PGOProfile/branch2.ll
    M llvm/test/Transforms/PGOProfile/chr.ll
    M llvm/test/Transforms/PGOProfile/criticaledge.ll
    M llvm/test/Transforms/PGOProfile/cspgo_profile_summary.ll
    M llvm/test/Transforms/PGOProfile/fix_entry_count.ll
    M llvm/test/Transforms/PGOProfile/icp_covariant_call_return.ll
    M llvm/test/Transforms/PGOProfile/icp_covariant_invoke_return.ll
    M llvm/test/Transforms/PGOProfile/icp_invoke.ll
    M llvm/test/Transforms/PGOProfile/icp_vararg.ll
    M llvm/test/Transforms/PGOProfile/indirect_call_promotion.ll
    M llvm/test/Transforms/PGOProfile/indirect_call_promotion_musttail.ll
    M llvm/test/Transforms/PGOProfile/indirect_call_promotion_vla.ll
    M llvm/test/Transforms/PGOProfile/indirectbr.ll
    M llvm/test/Transforms/PGOProfile/instr_entry_bb.ll
    M llvm/test/Transforms/PGOProfile/landingpad.ll
    M llvm/test/Transforms/PGOProfile/loop1.ll
    M llvm/test/Transforms/PGOProfile/loop2.ll
    M llvm/test/Transforms/PGOProfile/memop_size_opt.ll
    M llvm/test/Transforms/PGOProfile/multiple_hash_profile.ll
    M llvm/test/Transforms/PGOProfile/noreturncall.ll
    M llvm/test/Transforms/PGOProfile/remap.ll
    M llvm/test/Transforms/PGOProfile/select1.ll
    M llvm/test/Transforms/PGOProfile/select2.ll
    M llvm/test/Transforms/PGOProfile/switch.ll
    M llvm/test/Transforms/PGOProfile/thinlto_cspgo_use.ll
    M llvm/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll
    M llvm/test/Transforms/SCCP/switch.ll
    M llvm/test/Transforms/SampleProfile/entry_counts_cold.ll
    M llvm/test/Transforms/SampleProfile/indirect-call.ll
    M llvm/test/Transforms/SampleProfile/inline-mergeprof-dup.ll
    M llvm/test/Transforms/SampleProfile/inline-mergeprof.ll
    M llvm/test/Transforms/SampleProfile/profile-format-compress.ll
    M llvm/test/Transforms/SampleProfile/profile-format.ll
    M llvm/test/Transforms/SimpleLoopUnswitch/basictest-profmd.ll
    M llvm/test/Transforms/SimpleLoopUnswitch/trivial-unswitch-profmd.ll
    M llvm/test/Transforms/SimplifyCFG/invoke_unwind.ll
    M llvm/test/Transforms/SimplifyCFG/preserve-branchweights-switch-create.ll
    M llvm/test/Transforms/SimplifyCFG/preserve-branchweights.ll
    M llvm/test/Transforms/SimplifyCFG/switch-profmd.ll
    M llvm/test/Transforms/Util/libcalls-shrinkwrap-double.ll
    M llvm/test/Transforms/Util/libcalls-shrinkwrap-float.ll
    M llvm/test/Transforms/Util/libcalls-shrinkwrap-long-double.ll
    M llvm/unittests/Analysis/ProfileSummaryInfoTest.cpp

  Log Message:
  -----------
  Use uint64_t for branch weights instead of uint32_t

CallInst::updateProfWeight() creates branch_weights with i64 instead of i32.
To be more consistent everywhere and remove lots of casts from uint64_t
to uint32_t, use i64 for branch_weights.

Reviewed By: davidxl

Differential Revision: https://reviews.llvm.org/D88609




More information about the All-commits mailing list