[all-commits] [llvm/llvm-project] 0c7e89: [flang] Move parser invocations into ParserActions...

Kajetan Puchalski via All-commits all-commits at lists.llvm.org
Mon Mar 10 04:34:09 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0c7e895de3a9df6ff702fbebd1cdd580cb65e3d1
      https://github.com/llvm/llvm-project/commit/0c7e895de3a9df6ff702fbebd1cdd580cb65e3d1
  Author: Kajetan Puchalski <kajetan.puchalski at tuta.io>
  Date:   2025-03-10 (Mon, 10 Mar 2025)

  Changed paths:
    M flang/include/flang/Frontend/CompilerInstance.h
    M flang/include/flang/Frontend/CompilerInvocation.h
    M flang/include/flang/Frontend/FrontendActions.h
    A flang/include/flang/Frontend/ParserActions.h
    A flang/include/flang/Parser/options.h
    M flang/include/flang/Parser/parsing.h
    M flang/lib/Frontend/CMakeLists.txt
    M flang/lib/Frontend/FrontendAction.cpp
    M flang/lib/Frontend/FrontendActions.cpp
    A flang/lib/Frontend/ParserActions.cpp

  Log Message:
  -----------
  [flang] Move parser invocations into ParserActions (#130309)

FrontendActions.cpp is currently one of the biggest compilation units in
all of flang. Measuring its compilation gives the following metrics:

User time (seconds): 139.21
System time (seconds): 4.65
Maximum resident set size (kbytes): 5891440 (5.61 GB)

This commit separates out explicit invocations of the parser into a
separate compilation unit - ParserActions.cpp - through helper functions
in order to decrease the maximum compilation time and memory usage of a
single unit.
After the split, the measurements of FrontendActions.cpp are as follows:

User time (seconds): 70.08
System time (seconds): 3.16
Maximum resident set size (kbytes): 3961492 (3.7 GB)

While the ones for the newly created ParserActions.cpp as follows:

User time (seconds): 104.33
System time (seconds): 3.37
Maximum resident set size (kbytes): 4185600 (3.99 GB)

---------

Signed-off-by: Kajetan Puchalski <kajetan.puchalski 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