[all-commits] [llvm/llvm-project] f3a710: [LTO] Update splitCodeGen to take a reference to t...

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Jan 29 03:53:53 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f3a710cade9381030f3e1e9778c5fc12f8a02fdf
      https://github.com/llvm/llvm-project/commit/f3a710cade9381030f3e1e9778c5fc12f8a02fdf
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2021-01-29 (Fri, 29 Jan 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/ParallelCG.h
    M llvm/include/llvm/LTO/LTOBackend.h
    M llvm/include/llvm/Transforms/Utils/SplitModule.h
    M llvm/lib/CodeGen/ParallelCG.cpp
    M llvm/lib/LTO/LTO.cpp
    M llvm/lib/LTO/LTOBackend.cpp
    M llvm/lib/LTO/LTOCodeGenerator.cpp
    M llvm/lib/Transforms/Utils/SplitModule.cpp
    M llvm/tools/llvm-split/llvm-split.cpp

  Log Message:
  -----------
  [LTO] Update splitCodeGen to take a reference to the module. (NFC)

splitCodeGen does not need to take ownership of the module, as it
currently clones the original module for each split operation.

There is an ~4 year old fixme to change that, but until this is
addressed, the function can just take a reference to the module.

This makes the transition of LTOCodeGenerator to use LTOBackend a bit
easier, because under some circumstances, LTOCodeGenerator needs to
write the original module back after codegen.

Reviewed By: tejohnson

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




More information about the All-commits mailing list