[PATCH] D25225: Add an option to save the backend-produced YAML optimization record to a file

Hal Finkel via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 3 23:52:13 PDT 2016


hfinkel created this revision.
hfinkel added reviewers: anemet, rsmith, rjmccall.
hfinkel added a subscriber: cfe-commits.
Herald added a subscriber: mcrosier.

The backend now has the capability to save information from optimizations, the same information that can be used to generate optimization diagnostics but in machine-consumable form, into an output file. This can be enabled when using opt (see r282539), and this patch will enable it when using clang. The idea is that other tools will be able to consume these files, and perhaps in combination with the original source code, produce various kinds of optimization reports for users (and for compiler developers).

This patch proposes the name -fsave-optimization-record (and -fsave-optimization-record=filename). Bikeshedding welcome.


https://reviews.llvm.org/D25225

Files:
  include/clang/Driver/CC1Options.td
  include/clang/Driver/Options.td
  include/clang/Frontend/CodeGenOptions.h
  lib/CodeGen/CodeGenAction.cpp
  lib/Driver/Tools.cpp
  lib/Frontend/CompilerInvocation.cpp
  test/CodeGen/opt-record.c
  test/Driver/opt-record.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25225.73400.patch
Type: text/x-patch
Size: 8493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161004/5a07fd9e/attachment.bin>


More information about the cfe-commits mailing list