1. Let -basic-block-sections=labels emit basicblock metadata in a new .bb_addr_map section, instead of emitting special unary-encoded symbols. (details)
  2. collectBitParts - use const references. NFCI. (details)
  3. Retry of D84974 (details)
  4. [libc++] Upgrade the Clang on build bots (details)
Commit 7841e21c98495ba5e33e0d2507d985bd5b938445 by rahmanl
Let -basic-block-sections=labels emit basicblock metadata in a new .bb_addr_map section, instead of emitting special unary-encoded symbols.

This patch introduces the new .bb_addr_map section feature which allows us to emit the bits needed for mapping binary profiles to basic blocks into a separate section.
The format of the emitted data is represented as follows. It includes a header for every function:

|  Address of the function                      |  -> 8 bytes (pointer size)
|  Number of basic blocks in this function (>0) |  -> ULEB128

The header is followed by a BB record for every basic block. These records are ordered in the same order as MachineBasicBlocks are placed in the function. Each BB Info is structured as follows:

|  Offset of the basic block relative to function begin |  -> ULEB128
|  Binary size of the basic block                       |  -> ULEB128
|  BB metadata                                          |  -> ULEB128  [ MBB.isReturn() OR MBB.hasTailCall() << 1  OR  MBB.isEHPad() << 2 ]

The new feature will replace the existing "BB labels" functionality with -basic-block-sections=labels.
The .bb_addr_map section scrubs the specially-encoded BB symbols from the binary and makes it friendly to profilers and debuggers.
Furthermore, the new feature reduces the binary size overhead from 70% bloat to only 12%.

For more information and results please refer to the RFC:

Reviewed By: MaskRay, snehasish

Differential Revision:
The file was modifiedllvm/lib/CodeGen/MachineFunction.cpp (diff)
The file was modifiedllvm/include/llvm/CodeGen/MachineFunction.h (diff)
The file was modifiedllvm/lib/CodeGen/MachineBasicBlock.cpp (diff)
The file was modifiedllvm/lib/MC/MCObjectFileInfo.cpp (diff)
The file was modifiedllvm/test/CodeGen/X86/basic-block-sections-labels.ll (diff)
The file was modifiedllvm/lib/CodeGen/MIRParser/MIRParser.cpp (diff)
The file was modifiedclang/test/CodeGen/basic-block-sections.c (diff)
The file was modifiedllvm/include/llvm/MC/MCObjectFileInfo.h (diff)
The file was modifiedllvm/lib/CodeGen/BasicBlockSections.cpp (diff)
The file was addedllvm/test/CodeGen/X86/basic-block-sections-labels-functions-sections.ll
The file was modifiedclang/docs/UsersManual.rst (diff)
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (diff)
The file was modifiedllvm/include/llvm/CodeGen/AsmPrinter.h (diff)
Commit 4ff4708d39b790bf7231ad0fa4e7cfddb4e26f95 by llvm-dev
collectBitParts - use const references. NFCI.

Fixes clang-tidy warnings first noticed on D87452.
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp (diff)
Commit 132e57bc597bd3f50174b7d286c43f76b47f11c1 by walter erquinigo
Retry of D84974

- Fix a small issue caused by a conflicting name (GetObject) on Windows.
  The fix was to rename the internal GetObject function to
The file was modifiedlldb/tools/lldb-vscode/JSONUtils.cpp (diff)
The file was modifiedlldb/tools/lldb-vscode/JSONUtils.h (diff)
The file was modifiedlldb/tools/lldb-vscode/VSCode.h (diff)
The file was addedlldb/test/API/tools/lldb-vscode/runInTerminal/Makefile
The file was modifiedlldb/tools/lldb-vscode/lldb-vscode.cpp (diff)
The file was modifiedlldb/packages/Python/lldbsuite/test/tools/lldb-vscode/ (diff)
The file was modifiedlldb/tools/lldb-vscode/package.json (diff)
The file was addedlldb/test/API/tools/lldb-vscode/runInTerminal/main.c
The file was addedlldb/test/API/tools/lldb-vscode/runInTerminal/
The file was modifiedlldb/tools/lldb-vscode/VSCode.cpp (diff)
The file was modifiedlldb/packages/Python/lldbsuite/test/tools/lldb-vscode/ (diff)
Commit 7235326fb2342227d478d63378d2ba4d5e2418db by Louis Dionne
[libc++] Upgrade the Clang on build bots
The file was modifiedlibcxx/utils/docker/debian9/buildbot/Dockerfile (diff)
The file was modifiedlibcxx/utils/docker/debian9/buildbot/docker-compose.yml (diff)