Changes

Summary

  1. [lldb] Add --stack option to `target symbols add` command (details)
  2. [flang] Change complex type define in runtime for clang-cl (details)
  3. [InstCombine] Move InstCombineWorklist to Utils to allow reuse (NFC). (details)
  4. [clang][ASTImporter] Generic attribute import handling (first step). (details)
  5. [Utils] Replace llc with cat for tests (details)
  6. tsan: account for mid app range in mem profile (details)
  7. tsan: include MBlock/SyncObj stats into mem profile (details)
  8. tsan: make mem profile data more consistent (details)
  9. tsan: include internal allocator info in mem profile (details)
  10. tsan: move mem profile initialization into separate function (details)
  11. tsan: remove stale comment (details)
  12. tsan: write uptime in mem profile (details)
Commit 47f79c6057764e0c83016269ae2359f8c5c8d135 by Jonas Devlieghere
[lldb] Add --stack option to `target symbols add` command

Currently you can ask the target symbols add command to locate the debug
symbols for the current frame. This patch add an options to do that for
the whole call stack.

Differential revision: https://reviews.llvm.org/D110011
The file was addedlldb/test/API/macosx/add-dsym/TestAddDsymDownload.py
The file was modifiedlldb/source/Commands/CommandObjectTarget.cpp
Commit abbb0f901ad85aaa06780deefbda9c0ee0c2c7a2 by diana.picus
[flang] Change complex type define in runtime for clang-cl

When compiling the runtime with a version of clang-cl newer than 12, we
define CMPLXF as __builtin_complex, which returns a float _Complex type.
This errors out in contexts where the result of CMPLXF is expected to be
a float_Complex_t. This is defined as _Fcomplex whenever _MSC_VER is
defined (and as float _Complex otherwise).

This patch defines float_Complex_t & friends as _Fcomplex only when
we're using "true" MSVC, and not just clang-pretending-to-be-MSVC. This
should only affect clang-cl >= 12.

Differential Revision: https://reviews.llvm.org/D110139
The file was modifiedflang/runtime/complex-reduction.h
The file was modifiedflang/runtime/complex-reduction.c
Commit e08a5dc86f1ff868a61e74bfea413889a3d5915f by flo
[InstCombine] Move InstCombineWorklist to Utils to allow reuse (NFC).

InstCombine's worklist can be re-used by other passes like
VectorCombine. Move it to llvm/Transform/Utils and rename it to
InstructionWorklist.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D110181
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineInternal.h
The file was addedllvm/include/llvm/Transforms/Utils/InstructionWorklist.h
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modifiedllvm/include/llvm/Transforms/InstCombine/InstCombiner.h
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
The file was modifiedllvm/include/llvm/Transforms/InstCombine/InstCombine.h
The file was removedllvm/include/llvm/Transforms/InstCombine/InstCombineWorklist.h
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
Commit 7ce638538bcf323cd15ed5dfbc43013312b0e3e3 by 1.int32
[clang][ASTImporter] Generic attribute import handling (first step).

Import of Attr objects was incomplete in ASTImporter.
This change introduces support for a generic way of importing an attribute.
For an usage example import of the attribute AssertCapability is
added to ASTImporter.
Updating the old attribute import code and adding new attributes or extending
the generic functions (if needed) is future work.

Reviewed By: steakhal, martong

Differential Revision: https://reviews.llvm.org/D109608
The file was modifiedclang/lib/AST/ASTImporter.cpp
The file was modifiedclang/unittests/AST/ASTImporterTest.cpp
Commit ecd5145c27e819f95036cc0be8f22ce174f19238 by sebastian.neubauer
[Utils] Replace llc with cat for tests

Make the update_llc_test_checks script test independant of llc behavior
by using cat with static files to simulate llc output.

This allows changing llc without breaking the script test case.

The update script is executed in a temporary directory, so the
llc-generated assembly files are copied there. %T is deprecated, but it
allows copying a file with a predictable filename.

Differential Revision: https://reviews.llvm.org/D110143
The file was modifiedllvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_no_merge_comments.ll
The file was modifiedllvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_no_merge_comments.ll.expected
The file was modifiedllvm/test/tools/UpdateTestChecks/update_llc_test_checks/amdgpu-no-merge-comments.test
The file was modifiedllvm/utils/UpdateTestChecks/common.py
The file was addedllvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_no_merge_comments-O0.s
The file was addedllvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_no_merge_comments-O3.s
Commit 608ffc98c3b781a3da9b7222d145cade96fda14c by dvyukov
tsan: account for mid app range in mem profile

We account low and high ranges, but forgot abount the mid range.
Account mid range as well.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D110148
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
Commit eefef56ece7e27c8746cd207e8e2d96996ea5de1 by dvyukov
tsan: include MBlock/SyncObj stats into mem profile

Include info about MBlock/SyncObj memory consumption in the memory profile.

Depends on D110148.

Reviewed By: melver, vitalybuka

Differential Revision: https://reviews.llvm.org/D110149
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_sync.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_dense_alloc.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_sync.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
Commit 58a157cd3b54942283a301019dceb65be2da85f7 by dvyukov
tsan: make mem profile data more consistent

We currently query number of threads before reading /proc/self/smaps.
But reading /proc/self/smaps can take lots of time for huge processes
and it's retries several times with different buffer sizes.
Overall it can take tens of seconds. This can make number of threads
significantly inconsistent with the rest of the stats.
So query it after reading /proc/self/smaps.

Depends on D110149.

Reviewed By: melver, vitalybuka

Differential Revision: https://reviews.llvm.org/D110150
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform_windows.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.cpp
Commit b8aa9b0c37f4914cdd68aef5cf32fb411d2674c0 by dvyukov
tsan: include internal allocator info in mem profile

We allocate things from the internal allocator,
it's useful to know how much it consumes.

Depends on D110150.

Reviewed By: melver, vitalybuka

Differential Revision: https://reviews.llvm.org/D110151
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
Commit e8101f2149dfcd6a915b975a1f83ac09a5cd04b9 by dvyukov
tsan: move mem profile initialization into separate function

BackgroundThread function is quite large,
move mem profile initialization into a separate function.

Depends on D110151.

Reviewed By: melver, vitalybuka

Differential Revision: https://reviews.llvm.org/D110152
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.cpp
Commit ae6d57ca5a945063a25181e3875c1fcf3787a040 by dvyukov
tsan: remove stale comment

We do query it every 100ms now.
(GetRSS was fixed to not be dead slow IIRC)

Depends on D110152.

Reviewed By: melver, vitalybuka

Differential Revision: https://reviews.llvm.org/D110153
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.cpp
Commit 0ee77d6db355215273eb78c4546321067c882ff3 by dvyukov
tsan: write uptime in mem profile

Write uptime in real time seconds for every mem profile record.
Uptime is useful to make more sense out of the profile,
compare random lines, etc.

Depends on D110153.

Reviewed By: melver, vitalybuka

Differential Revision: https://reviews.llvm.org/D110154
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform_windows.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.cpp