[all-commits] [llvm/llvm-project] c71833: Add option to dump IR to files instead of stderr (...

Nuri Amari via All-commits all-commits at lists.llvm.org
Fri Sep 29 08:42:01 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c718336c4cb14e27aa88054cc30ee0c2fc6505d1
      https://github.com/llvm/llvm-project/commit/c718336c4cb14e27aa88054cc30ee0c2fc6505d1
  Author: Nuri Amari <nuri.amari99 at gmail.com>
  Date:   2023-09-29 (Fri, 29 Sep 2023)

  Changed paths:
    M llvm/include/llvm/Passes/StandardInstrumentations.h
    M llvm/lib/Passes/StandardInstrumentations.cpp
    A llvm/test/Other/dump-before-after-invalidated.ll
    A llvm/test/Other/dump-before-after.ll

  Log Message:
  -----------
  Add option to dump IR to files instead of stderr (#66412)

This patch adds a flag to LLVM such that the output generated by the
`-print-(before|after|all)`
family of flags is written to files in a directory rather than to
stderr.

This new flag is `-ir-dump-directory` and is used to specify where to
write the files. No other flags are added, it just modifies the behavior
of the print flags.

This is a second simplified version of the changes proposed in
https://github.com/llvm/llvm-project/pull/65179.

This patch only adds support for the new pass manager. If this patch is
accepted, similar support can be added to the legacy pass manager.

Co-authored-by: Nuri Amari <nuriamari at fb.com>




More information about the All-commits mailing list