[all-commits] [llvm/llvm-project] 48eb2b: [flang][driver] Use `-O{0|1|2|3}` to define LLVM b...

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Mon Jun 27 09:35:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 48eb2bc608e2db4258f9a5432be6458b33e8f551
      https://github.com/llvm/llvm-project/commit/48eb2bc608e2db4258f9a5432be6458b33e8f551
  Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
  Date:   2022-06-27 (Mon, 27 Jun 2022)

  Changed paths:
    M flang/lib/Frontend/FrontendActions.cpp
    A flang/test/Driver/default-backend-pipelines.f90

  Log Message:
  -----------
  [flang][driver] Use `-O{0|1|2|3}` to define LLVM backend pass pipeline

Support for optimisation flags in LLVM Flang was originally added in
https://reviews.llvm.org/D128043. That patch focused on LLVM
middle-end/optimisation pipelines. With this patch, Flang will
additionally configure LLVM backend pass pipelines accordingly. This
behavior is consistent with Clang.

New hook is added to translate compiler optimisation flags (e.g. `-O3`)
into backend optimisation level: `getCGOptLevel`. Identical hooks are
available in Clang and LLVM. In other words, the meaning of these
optimisation flags remains consistent with other sub-projects that use
LLVM backends.

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




More information about the All-commits mailing list