[all-commits] [llvm/llvm-project] ac4674: [PGO] Preserve analysis results when nothing was i...

Pavel Samolysov via All-commits all-commits at lists.llvm.org
Thu May 30 20:36:23 PDT 2024


  Branch: refs/heads/users/psamolysov/pgo-generate-version-when-instrumented
  Home:   https://github.com/llvm/llvm-project
  Commit: ac467402f0d688c8295bbca0f03161516b6982df
      https://github.com/llvm/llvm-project/commit/ac467402f0d688c8295bbca0f03161516b6982df
  Author: Pavel Samolysov <samolisov at gmail.com>
  Date:   2024-05-31 (Fri, 31 May 2024)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
    M llvm/unittests/Transforms/Instrumentation/PGOInstrumentationTest.cpp

  Log Message:
  -----------
  [PGO] Preserve analysis results when nothing was instrumented

The 'PGOInstrumentationGen' pass should preserve all analysis results
when nothing was actually instrumented. Currently, only modules that
contain at least a single function definition are instrumented. When a
module contains only function declarations and, optionally, global
variable definitions (a module for the regular-LTO phase for thin-LTO
when LTOUnit splitting is enabled, for example), such module is not
instrumented (yet?) and there is no reason to invalidate any analysis
results.

NFC.


  Commit: 5d5ead1dbd9aac486aada3acf81cc09464ab7bae
      https://github.com/llvm/llvm-project/commit/5d5ead1dbd9aac486aada3acf81cc09464ab7bae
  Author: Pavel Samolysov <samolisov at gmail.com>
  Date:   2024-05-31 (Fri, 31 May 2024)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
    M llvm/test/Transforms/PGOProfile/declarations_only.ll
    M llvm/test/Transforms/PGOProfile/global_variables_only.ll
    A llvm/test/Transforms/PGOProfile/no_global_variables.ll
    M llvm/unittests/Transforms/Instrumentation/PGOInstrumentationTest.cpp

  Log Message:
  -----------
  [PGO] Generate __llvm_profile_raw_version only when instrumented

Currently, only modules that contain at least a single function
definition are instrumented. When a module contains no function
definitions at all, the module is not instrumented (yet?) and there is
no reason to introduce the '__llvm_profile_raw_version' variable into
the module.


Compare: https://github.com/llvm/llvm-project/compare/ac467402f0d6%5E...5d5ead1dbd9a

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list