[all-commits] [llvm/llvm-project] 9e6b46: [flang] Implement -mcmodel flag (#95411)

David Truby via All-commits all-commits at lists.llvm.org
Wed Jul 3 10:50:03 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9e6b46a9846cf5051c2aaef361af0fe1a76c856e
      https://github.com/llvm/llvm-project/commit/9e6b46a9846cf5051c2aaef361af0fe1a76c856e
  Author: David Truby <david.truby at arm.com>
  Date:   2024-07-03 (Wed, 03 Jul 2024)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/lib/Driver/ToolChains/CommonArgs.h
    M clang/lib/Driver/ToolChains/Flang.cpp
    M flang/include/flang/Frontend/CodeGenOptions.h
    M flang/lib/Frontend/CodeGenOptions.cpp
    M flang/lib/Frontend/CompilerInstance.cpp
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/lib/Frontend/FrontendActions.cpp
    A flang/test/Driver/large-data-threshold.f90
    A flang/test/Driver/mcmodel.f90
    A flang/test/Lower/large-data-threshold.f90
    A flang/test/Lower/mcmodel.f90

  Log Message:
  -----------
  [flang] Implement -mcmodel flag (#95411)

This patch implements the -mcmodel flag from clang, allowing the Code
Model to be changed for the LLVM module. The same set of mcmodel
flags are accepted as in clang and the same Code Model attributes are
added to the LLVM module for those flags.

Also add `-mlarge-data-threshold` for x86-64, which is automatically set
by the shared command-line code (see below). This is also added as an 
attribute into the LLVM module and on the target machine.

A function is created for `addMCModel` that is copied out of clang's
argument handling so that it can be shared with flang.

---------

Co-authored-by: Mats Petersson <mats.petersson at arm.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