[all-commits] [llvm/llvm-project] 4264dc: opt: Stop creating TargetMachine to infer the data...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue Nov 25 16:46:49 PST 2025


  Branch: refs/heads/users/arsenm/opt/stop-creating-tm-compute-datalayout
  Home:   https://github.com/llvm/llvm-project
  Commit: 4264dc6b1406866eae8476cdfb4efd7abbba764b
      https://github.com/llvm/llvm-project/commit/4264dc6b1406866eae8476cdfb4efd7abbba764b
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-11-25 (Tue, 25 Nov 2025)

  Changed paths:
    M llvm/test/tools/opt/invalid-target.ll
    M llvm/tools/opt/optdriver.cpp

  Log Message:
  -----------
  opt: Stop creating TargetMachine to infer the datalayout

The Triple directly has the datalayout string in it, so just
use that.

The logical flow here is kind of a mess. We were constructing
a temporary target machine in the asm parser to infer the datalayout,
throwing it away, and then creating another target machine for the
actual compilation. The flow of the Triple construction is still
convoluted, but we can at least drop the TargetMachine.



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