[PATCH] D68049: Propeller: Clang options for basic block sections

Sriraman Tallam via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 25 13:29:34 PDT 2019


tmsriram created this revision.
tmsriram added a reviewer: rnk.
Herald added a project: clang.

Options for basic block sections, unique internal linkage function names.

This is part of the Propeller framework to do post link code layout optimizations.  Please see the RFC here: https://groups.google.com/forum/#!msg/llvm-dev/ef3mKzAdJ7U/1shV64BYBAAJ and the detailed RFC doc here: https://github.com/google/llvm-propeller/blob/plo-dev/Propeller_RFC.pdf

This is one in the series of patches for Propeller.

This patch adds the following options to clang:

1. -funique-internal-funcnames : Makes function names with internal linkage unique (best effort).
2. -fbasicblock-sections={all, <file>, labels, none} : Enables/Disables basic block sections for all or a subset of basic blocks. "labels" only enables basic block symbols.
3. -funique-bb-section-names:  Enables unique section names for basic block sections, disabled by default.
4. -mrelocate-with-symbols:  Use symbols for relocations instead of sections.
5. -fpropeller-label:  Enables all options related to Propeller for labelling basic blocks like basic block symbols.
6. -fpropeller-optimize=<file>: Enables all options related to Propeller for optimizing like basic block sections and associated linker options.


Repository:
  rC Clang

https://reviews.llvm.org/D68049

Files:
  clang/include/clang/Basic/CodeGenOptions.def
  clang/include/clang/Basic/CodeGenOptions.h
  clang/include/clang/Driver/CC1Options.td
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/BackendUtil.cpp
  clang/lib/CodeGen/CGDeclCXX.cpp
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Driver/ToolChains/Gnu.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/test/CodeGen/basicblock-sections.c
  clang/test/CodeGen/basicblock-sections.funcnames
  clang/test/CodeGen/unique_internal_funcnames.c
  clang/test/Driver/propeller-flags.c
  clang/tools/driver/cc1as_main.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68049.221825.patch
Type: text/x-patch
Size: 23917 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190925/91679b93/attachment-0001.bin>


More information about the cfe-commits mailing list