SuccessChanges

Summary

  1. [gn build] Port b04c1a9d312 (details)
  2. [libunwind][DWARF] Fix end of .eh_frame calculation (details)
  3. [MachineSink] add one more mir case - nfc (details)
  4. [PowerPC] Fix store-fptoi combine of f128 on Power8 (details)
  5. Use zu rather than llu format specifier for size_t (-Wformat warning fix). (details)
  6. debug_rnglists/symbolizing: reduce memory usage by not caching rnglists (details)
  7. Revert "[IRSim] Adding IR Instruction Mapper" (details)
  8. [gn build] Port a895040eb02 (details)
  9. Flush bitcode incrementally for LTO output (details)
  10. Add the header of std::min (details)
  11. Fix the arguments of std::min (details)
  12. [lldb] Return FileSP and StreamFileSP by value in IOHandler (NFC) (details)
  13. Add __divmodti4 to match libgcc. (details)
Commit 436a43afb2cf85ae6e61b4c1ac09e944a6566646 by llvmgnsyncbot
[gn build] Port b04c1a9d312
The file was modifiedllvm/utils/gn/secondary/llvm/unittests/Analysis/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Analysis/BUILD.gn
Commit fb1abe00635c1ec28e55921709904d5ca2e86a74 by rprichard
[libunwind][DWARF] Fix end of .eh_frame calculation

* When .eh_frame is located using .eh_frame_hdr (PT_GNU_EH_FRAME), the
   start of .eh_frame is known, but not the size. In this case, the
   unwinder must rely on a terminator present at the end of .eh_frame.
   Set dwarf_section_length to UINTPTR_MAX to indicate this.

* Add a new field, text_segment_length, that the FrameHeaderCache uses
   to track the size of the PT_LOAD segment indicated by dso_base.

* Compute ehSectionEnd by adding sectionLength to ehSectionStart,
   never to fdeHint.

Fixes PR46829.

Differential Revision: https://reviews.llvm.org/D87750
The file was modifiedlibunwind/src/DwarfParser.hpp
The file was modifiedlibunwind/src/UnwindCursor.hpp
The file was modifiedlibunwind/test/frameheadercache_test.pass.cpp
The file was modifiedlibunwind/src/FrameHeaderCache.hpp
The file was modifiedlibunwind/src/AddressSpace.hpp
Commit 5782ab0f52db1b1914d8ee5fe3828b0a5de9d685 by czhengsz
[MachineSink] add one more mir case - nfc
The file was addedllvm/test/CodeGen/PowerPC/sink-down-more-instructions-1.mir
Commit ebfbdebe9678f4a42ec35396eb517eefd85d2b4c by qiucofan
[PowerPC] Fix store-fptoi combine of f128 on Power8

llc would crash for (store (fptosi-f128-i32)) when -mcpu=pwr8, we should
not generate FP_TO_(S|U)INT_IN_VSR for f128 types at this time. This
patch fixes it.

Reviewed By: steven.zhang

Differential Revision: https://reviews.llvm.org/D86686
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modifiedllvm/test/CodeGen/PowerPC/store_fptoi.ll
Commit c140322819806cb292e079d62f2e9dbab697c08c by echristo
Use zu rather than llu format specifier for size_t (-Wformat warning fix).
The file was modifiedlldb/source/Expression/REPL.cpp
Commit 6a07f1edf8e6a172734286cd3ab5988313313d8f by dblaikie
debug_rnglists/symbolizing: reduce memory usage by not caching rnglists

This matches the debug_ranges behavior - though is currently implemented
differently. (the debug_ranges parsing was handled by creating a new
ranges parser during DIE address querying, and just destroying it after
the query - whereas the rnglists parser is a member of the DWARFUnit
currently - so the API doesn't cache anymore)

I think this could/should be improved by not parsing debug_rnglists
headers at all when dumping debug_info or symbolizing - do it the way
DWARF (roughly) intended: take the rnglists_base, add addr*index to it,
read the offset, parse the list at rnglists_base+offset. This would have
no error checking for valid index (because the number of valid indexes
is stored in the header, which has a negative offset from rnglists_base
- and is sort of only intended for use by dumpers, not by parsers going
from debug_info to a rnglist) or out of contribution bounds access
(since it wouldn't know the length of the contribution, also in the
header) - nor any error-checking that the rnglist contribution was using
the same properties as the debug_info (version, DWARF32/64, address
size, etc).
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFListTable.h
Commit a895040eb022b8a621d8e85754f113d82e232ab1 by stilis
Revert "[IRSim] Adding IR Instruction Mapper"

This reverts commit b04c1a9d3127730c05e8a22a0e931a12a39528df.
The file was modifiedllvm/unittests/Analysis/CMakeLists.txt
The file was removedllvm/include/llvm/Analysis/IRSimilarityIdentifier.h
The file was removedllvm/lib/Analysis/IRSimilarityIdentifier.cpp
The file was modifiedllvm/lib/Analysis/CMakeLists.txt
The file was removedllvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
Commit 0dd4d70ec20cebb951bd2e0e6525b056fb8dc86c by llvmgnsyncbot
[gn build] Port a895040eb02
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Analysis/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/unittests/Analysis/BUILD.gn
Commit 11201315d5881a135faa5aa87f415ce03f99eb96 by jianzhouzh
Flush bitcode incrementally for LTO output

Bitcode writer does not flush buffer until the end by default. This is
fine to small bitcode files. When -flto,--plugin-opt=emit-llvm,-gmlt are
used, the final bitcode file is large, for example, >8G. Keeping all
data in memory consumes a lot of memory.

This change allows bitcode writer flush data to disk early when buffered
data size is above some threshold. This is only enabled when lld emits
LLVM bitcode.

One issue to address is backpatching bitcode: subblock length, function
body indexes, meta data indexes need to backfill. If buffer can be
flushed partially, we introduced raw_fd_stream that supports
read/seek/write, and enables backpatching bitcode flushed in disk.

Reviewed-by: tejohnson, MaskRay

Differential Revision: https://reviews.llvm.org/D86905
The file was modifiedlld/ELF/LTO.cpp
The file was modifiedllvm/lib/Bitcode/Writer/BitcodeWriter.cpp
The file was modifiedllvm/include/llvm/Bitstream/BitstreamWriter.h
The file was modifiedllvm/include/llvm/Bitcode/BitcodeWriter.h
Commit 352a55ef06a9dcb3dfeb45302e9789da24b513c3 by jianzhouzh
Add the header of std::min

fixing
https://github.com/llvm/llvm-project/commit/11201315d5881a135faa5aa87f415ce03f99eb96
The file was modifiedllvm/include/llvm/Bitstream/BitstreamWriter.h
Commit aec80c5cfd1bda8e630fca0f3ed2a84659f68635 by jianzhouzh
Fix the arguments of std::min

fixing
https://github.com/llvm/llvm-project/commit/11201315d5881a135faa5aa87f415ce03f99eb96
The file was modifiedllvm/include/llvm/Bitstream/BitstreamWriter.h
Commit 57dd92746a53526bd7a86c1cfc7c0dce57a2e170 by Jonas Devlieghere
[lldb] Return FileSP and StreamFileSP by value in IOHandler (NFC)

Smart pointers should be returned by value.
The file was modifiedlldb/source/Core/IOHandler.cpp
The file was modifiedlldb/include/lldb/Core/IOHandler.h
Commit c9af34027bc9cb852a4e5e96154a7bd89531a6de by craig.topper
Add __divmodti4 to match libgcc.

gcc has used this on x86-64 since at least version 7.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D80506
The file was modifiedcompiler-rt/lib/builtins/CMakeLists.txt
The file was addedcompiler-rt/test/builtins/Unit/divmodti4_test.c
The file was addedcompiler-rt/lib/builtins/divmodti4.c
The file was modifiedcompiler-rt/lib/builtins/README.txt