SuccessChanges

Summary

  1. [lld][WebAssembly] Fix for weak undefined functions in -pie mode (details)
  2. [knownbits] Preserve known bits for small shift recurrences (details)
  3. [mlir] detect integer overflow in debug mode (details)
  4. [Polly] Hide IslScheduleOptimizer implementation from header. NFC. (details)
  5. Partially Revert "scan-view: Remove Reporter.py and associated AppleScript files" (details)
  6. DebugInfo/Symbolize: Don't differentiate function/data symbolization (details)
  7. [GlobalISel] Fix sext_inreg(load) combine to not move the originating load. (details)
  8. Fix bitcode decoder error in "Encode alignment attribute for `atomicrmw`" (details)
Commit ac2be2b6a366c05c01b8228fd804ba6ed52d320b by sbc
[lld][WebAssembly] Fix for weak undefined functions in -pie mode

This fixes two somewhat related issues.  Firstly we were never
generating imports for weak functions (even with the `import-functions`
policy for undefined symbols).  Adding a direct call to foo in the
`weak-undefined-pic.s` exposed a crash in the linker which this
change fixes.

Secondly we were failing to call `handleWeakUndefines` for the `-pie`
case which is PIC but doesn't set the undefined symbol policy to
`import-functions`.  With this change `-pie` binaries will by default
call `handleWeakUndefines` which generates the undefined stub handlers
for any weakly undefined symbols.

Fixes: https://github.com/emscripten-core/emscripten/issues/13337

Differential Revision: https://reviews.llvm.org/D95914
The file was modifiedlld/wasm/Writer.cpp
The file was modifiedlld/test/wasm/weak-undefined-pic.s
The file was modifiedlld/wasm/Driver.cpp
Commit 8ef4b961a3af6e6839b487ba3962ddad133629fc by listmail
[knownbits] Preserve known bits for small shift recurrences

The motivation for this is that I'm looking at an example that uses shifts as induction variables. There's lots of other omissions, but one of the first I noticed is that we can't compute tight known bits. (This indirectly causes SCEV's range analysis to produce very poor results as well.)

Differential Revision: https://reviews.llvm.org/D96440
The file was modifiedllvm/test/Analysis/ValueTracking/shift-recurrence-knownbits.ll
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit 5f022ad6ed8dc23094bb50f83608d5c786a821a9 by ajcbik
[mlir] detect integer overflow in debug mode

Rationale:
This computation failed ASAN for the following input
(integer overflow during 4032000000000000000 * 100):

  tensor<100x200x300x400x500x600x700x800xf32>

This change adds a simple overflow detection during
debug mode (which we run more regularly than ASAN).
Arguably this is an unrealistic tensor input, but
in the context of sparse tensors, we may start to
see cases like this.

Bug:
https://bugs.llvm.org/show_bug.cgi?id=49136

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D96530
The file was modifiedmlir/lib/IR/BuiltinTypes.cpp
Commit 7387f33bfe1e42b331e80baaa9a60f8d35595766 by llvm-project
[Polly] Hide IslScheduleOptimizer implementation from header. NFC.

These are implementation details of the IslScheduleOptimizer pass
implementation and not use anywhere else. Hence, we can move them to the
cpp file and into an anonymous namespace.

Only getPartialTilePrefixes is, aside from the pass itself, used
externally (by the ScheduleOptimizerTest) and moved into the polly
namespace.
The file was modifiedpolly/lib/Transform/ScheduleOptimizer.cpp
The file was modifiedpolly/unittests/ScheduleOptimizer/ScheduleOptimizerTest.cpp
The file was modifiedpolly/include/polly/ScheduleOptimizer.h
Commit e3cd3a3c91524c957e06bb0170343548f02b6842 by tstellar
Partially Revert "scan-view: Remove Reporter.py and associated AppleScript files"

This reverts some of commit dbb01536f6f49fa428f170e34466072ef439b3e9.

The Reporter module was still being used by the ScanView.py module and deleting
it caused scan-view to fail.  This commit adds back Reporter.py but removes the
code the references the AppleScript files which were removed in
dbb01536f6f49fa428f170e34466072ef439b3e9.

Reviewed By: NoQ

Differential Revision: https://reviews.llvm.org/D96367
The file was addedclang/tools/scan-view/share/Reporter.py
The file was modifiedclang/tools/scan-view/CMakeLists.txt
Commit 92ee3dd95dc666df7c37ccdf3037ced921a519e6 by i
DebugInfo/Symbolize: Don't differentiate function/data symbolization

Before d08bd13ac8a560c4645e17e192ca07e1bdcd2895, only `SymbolRef::ST_Function`
symbols were used for .symtab symbolization. That commit added a `"DATA"` mode
to llvm-symbolizer which used `SymbolRef::ST_Data` symbols for symbolization.

Since function and data symbols have different addresses, we don't need to
differentiate the two modes. This patches unifies the two modes to simplify
code.

`"DATA"` is used by `compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp`.
`check-hwasan` and `check-tsan` have runtime tests.

Differential Revision: https://reviews.llvm.org/D96322
The file was modifiedllvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
The file was addedllvm/test/DebugInfo/Symbolize/ELF/data-command-symtab.yaml
The file was modifiedllvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.h
Commit de035c18cf76d442f1f2df5cc417bd03258edec2 by Amara Emerson
[GlobalISel] Fix sext_inreg(load) combine to not move the originating load.

The builder was using the extend user as the insertion point, which meant that
we were incorrectly "moving" the load from its original position, and therefore
could violate memory operation ordering.
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-sextload-from-sextinreg.mir
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
Commit db00953ff32aa3c64200871ae4bcd15a776acca0 by jyknight
Fix bitcode decoder error in "Encode alignment attribute for `atomicrmw`"

The wrong record field number was being used in bitcode decoding,
which broke a self-hosted LTO build. (Yet, somehow, this _doesn't_
seem to have broken simple bitcode encode/decode roundtrip tests, and
I'm not sure why...)

Fixes commit d06ab79816785fa362e7d96d7a398bea8064cba7
The file was modifiedllvm/lib/Bitcode/Reader/BitcodeReader.cpp