SuccessChanges

Summary

  1. [test] Make ELF tests less reliant on the lexicographical order of non-local symbols (details)
  2. [Polly] Preserve DetectionContext references. (details)
  3. [libunwind][cmake] Add an option to enable/disable tests (details)
Commit 39db16e75bd85f9c85a9df1c92a92920006b31b3 by i
[test] Make ELF tests less reliant on the lexicographical order of non-local symbols
The file was modifiedllvm/test/CodeGen/PowerPC/pcrel-tls-initial-exec.ll
The file was modifiedllvm/test/tools/gold/X86/v1.12/thinlto_emit_linked_objects.ll
The file was modifiedllvm/test/CodeGen/PowerPC/pcrel-tls-general-dynamic.ll
The file was modifiedclang/test/InterfaceStubs/hidden-class-inheritance.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/code-object-v3.ll
Commit 95ef556bd12ad879fd27157ea60cdc213717459d by llvm-project
[Polly] Preserve DetectionContext references.

DetectionContext objects are stored as values in a DenseMap. When the
DenseMap reaches its maximum load factor, it is resized and all its
objects moved to a new memory allocation. Unfortunately Scop object have
a reference to its DetectionContext. When the DenseMap resizes, all the
DetectionContexts reference now point to invalid memory, even if caused
by an unrelated DetectionContext.

Even worse, NewPM's ScopPassManager called isMaxRegionInScop with the
Verify=true parameter before each pass. This caused the old
DetectionContext to be removed an a new on created and re-verified.
Of course, the Scop object was already created pointing to the old
DetectionContext. Because the new DetectionContext would
usually be stored at the same position in the DenseMap, the reference
would usually reference the new DetectionContext of the same Region.
Usually.
If not, the old position still points to memory in the DenseMap
allocation (unless also a resizing occurs) such that tools like Valgrind
and AddressSanitizer would not be able to diagnose this.

Instead of storing the DetectionContext inside the DenseMap, use a
std::unique_ptr to a DetectionContext allocation, i.e. it will not move
around anymore. This also allows use to remove the very strange

    DetectionContext(const DetectionContext &&)

copy/move(?) constructor. DetectionContext objects now are neither
copied nor moved.

As a result, every re-verification of a DetectionContext will use a new
allocation. Therefore, once a Scop object has been created using a
DetectionContext, it must not be re-verified (the Scop data structure
requires its underlying Region to not change before code generation
anyway). The NewPM may call isMaxRegionInScop only with
Validate=false parameter.
The file was modifiedpolly/include/polly/ScopDetection.h
The file was modifiedpolly/include/polly/ScopPass.h
The file was modifiedpolly/test/Isl/CodeGen/multiple-codegens.ll
The file was modifiedpolly/lib/Analysis/ScopDetection.cpp
Commit f042fd46b527bea97dfa1e09558700173b70405e by kbessonova
[libunwind][cmake] Add an option to enable/disable tests

Reviewed By: ldionne, compnerd

Differential Revision: https://reviews.llvm.org/D96342
The file was modifiedlibunwind/CMakeLists.txt