1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Go to file
Yonghong Song c6159d464d [BPF] do not generate unused local/global types
The kernel currently has a limit for # of types to be 64KB and
the size of string subsection to be 64KB. A simple bcc tool
runqlat.py generates:
  . the size of ~33KB type section, roughly ~10K types
  . the size of ~17KB string section

The majority type is from the types referenced by local
variables in the bpf program. For example, the kernel "task_struct"
itself recursively brings in ~900 other types.
This patch did the following optimization to avoid generating
unused types:
  . do not generate types for local variables unless they are
    function arguments.
  . do not generate types for external globals.

If an external global is not used in the program, llvm
already removes it from IR, so global variable saving is
typical small. For runqlat.py, only one variable "llvm.used"
is the external global.

The types for locals and external globals can be added back
once there is a usage for them.

After the above optimization, the runqlat.py generates:
  . the size of ~1.5KB type section, roughtly 500 types
  . the size of ~0.7KB string section

UPDATE:
  resubmitted the patch after previous revert with
  the following fix:
  use Global.hasExternalLinkage() to test "external"
  linkage instead of using Global.getInitializer(),
  which will assert on external variables.

Signed-off-by: Yonghong Song <yhs@fb.com>
llvm-svn: 356234
2019-03-15 05:51:25 +00:00
benchmarks
bindings [bindings/go] Fix building on 32-bit systems (ARM etc.) 2019-02-16 22:33:10 +00:00
cmake [AIX][CMake] Changes for building on AIX with XL and GCC 2019-03-13 21:50:25 +00:00
docs Speeding up llvm-cov export with multithreaded renderFiles implementation. 2019-03-14 17:49:27 +00:00
examples [Kaleidoscope] Fix symbol resolver to search in reverse order. 2019-02-21 16:53:04 +00:00
include MIR: Allow targets to serialize MachineFunctionInfo 2019-03-14 22:54:43 +00:00
lib [BPF] do not generate unused local/global types 2019-03-15 05:51:25 +00:00
projects Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
resources
runtimes [runtime] Use --strip-all rather than --strip-sections 2019-03-10 04:26:54 +00:00
test [BPF] do not generate unused local/global types 2019-03-15 05:51:25 +00:00
tools [llvm-strip] Hook up (unimplemented) --only-keep-debug 2019-03-14 21:51:42 +00:00
unittests Handle consecutive-double-quotes in Windows argument parsing 2019-03-14 19:26:04 +00:00
utils Line wrap README file 2019-03-14 21:09:14 +00:00
.arcconfig
.clang-format
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
.gitattributes
.gitignore [clangd] Store index in '.clangd/index' instead of '.clangd-index' 2019-02-20 19:08:06 +00:00
CMakeLists.txt [cmake] Remove llvm from LLVM_ALL_PROJECTS 2019-03-08 21:10:22 +00:00
CODE_OWNERS.TXT [llvm-mca] Move llvm-mca library to llvm/lib/MCA. 2018-12-17 08:08:31 +00:00
configure
CREDITS.TXT [NFC] Add to contributor list. 2019-02-26 05:46:45 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
llvm.spec.in Update structured references to the license to the new license. 2019-01-19 11:30:51 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
README.txt Testing commit access 2019-02-19 20:38:51 +00:00
RELEASE_TESTERS.TXT Update the list of platforms & archs 2018-12-16 14:47:16 +00:00

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.