[all-commits] [llvm/llvm-project] 1dfe26: LTO: Stop overwriting the merged module's DataLayo...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Mon Sep 21 07:09:28 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1dfe26e2259d80c442f0b4be66198316e2b8229d
      https://github.com/llvm/llvm-project/commit/1dfe26e2259d80c442f0b4be66198316e2b8229d
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2026-09-21 (Mon, 21 Sep 2026)

  Changed paths:
    M llvm/lib/LTO/LTOCodeGenerator.cpp
    M llvm/test/LTO/ARM/runtime-library-subtarget.ll
    A llvm/test/LTO/RISCV/merged-module-datalayout.ll
    M llvm/test/LTO/X86/cfi_endproc.ll
    M llvm/test/LTO/X86/linkonce_odr_func.ll

  Log Message:
  -----------
  LTO: Stop overwriting the merged module's DataLayout (#223987)

LTOCodeGenerator::optimize() unconditionally reset the merged module's
DataLayout from TargetMachine::createDataLayout(). The merged module
already carries the correct DataLayout since IRMover propagates the source
module's layout into the empty destination. The module should be the source of
truth for its DataLayout.

Recomputing it from the TargetMachine is also latently wrong, since the
DataLayout depends on the target-abi module flag which the
TargetMachine's cached DataLayout cannot account for.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>



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