SuccessChanges

Summary

  1. Prepare for multi-exit LFTR [NFC] This change does the plumbing to wire an ExitingBB parameter through the LFTR implementation, and reorganizes the code to work in terms of a set of individual loop exits. Most of it is fairly obvious, but there's one key complexity which makes it worthy of consideration. The actual multi-exit LFTR patch is in D62625 for context. Specifically, it turns out the existing code uses the backedge taken count from before a IV is widened. Oddly, we can end up with a different (more expensive, but semantically equivelent) BE count for the loop when requerying after widening. For the nestedIV example from elim-extend, we end up with the following BE counts: BEFORE: (-2 + (-1 * %innercount) + %limit) AFTER: (-1 + (sext i32 (-1 + %limit) to i64) + (-1 * (sext i32 %innercount to i64))<nsw>) This is the only test in tree which seems sensitive to this difference. The actual result of using the wider BETC on this example is that we actually produce slightly better code. :) In review, we decided to accept that test change. This patch is structured to preserve the old behavior, but a separate change will immediate follow with the behavior change. (I wanted it separate for problem attribution purposes.) Differential Revision: https://reviews.llvm.org/D62880
  2. [ELF][llvm-objdump] Treat dynamic tag values as virtual addresses instead of offsets The ELF gABI requires the tag values of DT_REL, DT_RELA and DT_JMPREL to be treated as virtual addresses. They were treated as offsets. Fixes PR41832. Differential Revision: https://reviews.llvm.org/D62972
Revision 362971 by reames:
Prepare for multi-exit LFTR [NFC]

This change does the plumbing to wire an ExitingBB parameter through the LFTR implementation, and reorganizes the code to work in terms of a set of individual loop exits. Most of it is fairly obvious, but there's one key complexity which makes it worthy of consideration. The actual multi-exit LFTR patch is in D62625 for context.

Specifically, it turns out the existing code uses the backedge taken count from before a IV is widened. Oddly, we can end up with a different (more expensive, but semantically equivelent) BE count for the loop when requerying after widening.  For the nestedIV example from elim-extend, we end up with the following BE counts:
BEFORE: (-2 + (-1 * %innercount) + %limit)
AFTER: (-1 + (sext i32 (-1 + %limit) to i64) + (-1 * (sext i32 %innercount to i64))<nsw>)

This is the only test in tree which seems sensitive to this difference. The actual result of using the wider BETC on this example is that we actually produce slightly better code. :)

In review, we decided to accept that test change.  This patch is structured to preserve the old behavior, but a separate change will immediate follow with the behavior change.  (I wanted it separate for problem attribution purposes.)

Differential Revision: https://reviews.llvm.org/D62880
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpptrunk/lib/Transforms/Scalar/IndVarSimplify.cpp
Revision 362969 by wolfgangp:
[ELF][llvm-objdump] Treat dynamic tag values as virtual addresses instead of offsets

The ELF gABI requires the tag values of DT_REL, DT_RELA and DT_JMPREL to be
treated as virtual addresses. They were treated as offsets. Fixes PR41832.

Differential Revision: https://reviews.llvm.org/D62972
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Object/ELFObjectFile.htrunk/include/llvm/Object/ELFObjectFile.h
The file was added/llvm/trunk/test/tools/llvm-objdump/X86/elf-dynamic-relocs.testtrunk/test/tools/llvm-objdump/X86/elf-dynamic-relocs.test

Summary

  1. Add unused symbol to thunk files to force wholearchive inclusion These "dynamic_runtime_thunk" object files exist to create a weak alias from 'foo' to 'foo_dll' for all weak sanitizer runtime symbols. The weak aliases are implemented as /alternatename linker options in the .drective section, so they are not actually in the symbol table. In order to force the Visual C++ linker to load the object, even with -wholearchive:, we have to provide at least one external symbol. Once we do that, it will read the .drective sections and see the weak aliases. Fixes PR42074
Revision 362970 by rnk:
Add unused symbol to thunk files to force wholearchive inclusion

These "dynamic_runtime_thunk" object files exist to create a weak alias
from 'foo' to 'foo_dll' for all weak sanitizer runtime symbols. The weak
aliases are implemented as /alternatename linker options in the
.drective section, so they are not actually in the symbol table. In
order to force the Visual C++ linker to load the object, even with
-wholearchive:, we have to provide at least one external symbol. Once we
do that, it will read the .drective sections and see the weak aliases.

Fixes PR42074
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_win_dynamic_runtime_thunk.cctrunk/lib/sanitizer_common/sanitizer_coverage_win_dynamic_runtime_thunk.cc
The file was modified/compiler-rt/trunk/lib/sanitizer_common/sanitizer_win_dynamic_runtime_thunk.cctrunk/lib/sanitizer_common/sanitizer_win_dynamic_runtime_thunk.cc