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

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue Nov 25 20:41:03 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e81a564cb0031e93d34a941224b14ec73c69bf65
      https://github.com/llvm/llvm-project/commit/e81a564cb0031e93d34a941224b14ec73c69bf65
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-11-26 (Wed, 26 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 (#169585)

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