SuccessChanges

Summary

  1. [flang][openacc] Lower parallel construct (details)
  2. [X86] Support -march=x86-64-v[234] (details)
  3. [sanitizer] Disable fast_unwind_on_malloc as default for arm-linux-gnu (details)
  4. [clangd] Heuristic resolution for dependent type and template names (details)
  5. [InstCombine] FoldShiftByConstant - create Scalar/Vector constant with ConstantInt::get(). NFCI. (details)
  6. [Inliner][NPM] Fix various tests under NPM (details)
  7. [LLDB] Fix 37 tests on Windows (details)
  8. [mlir] fixing typo in parseAttribute that was ignoring caller-specified types (details)
  9. update .txt --> .md links (details)
  10. [Coroutine][Sema] Only tighten the suspend call temp lifetime for final awaiter (details)
  11. [flang][openacc] Lower data construct (details)
  12. [trace] Scaffold "thread trace dump instructions" (details)
Commit e944455eaf1ed3b3bfe9876c5478ce18e9975eea by clementval
[flang][openacc] Lower parallel construct

This patch upstream the lowering of Parallel construct that was initially done in
https://github.com/flang-compiler/f18-llvm-project/pull/460.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D88917
The file was modifiedflang/lib/Lower/OpenACC.cpp
Commit 012dd42e027e2ff3d183cc9dcf27004cf9711720 by i
[X86] Support -march=x86-64-v[234]

PR47686. These micro-architecture levels are defined in the x86-64 psABI:

https://gitlab.com/x86-psABIs/x86-64-ABI/-/commit/77566eb03bc6a326811cb7e9

GCC 11 will support these levels.

Note, -mtune=x86-64-v[234] are invalid and __builtin_cpu_is cannot be
used on them.

Reviewed By: craig.topper, RKSimon

Differential Revision: https://reviews.llvm.org/D89197
The file was modifiedllvm/lib/Support/X86TargetParser.cpp
The file was modifiedclang/test/Driver/x86-march.c
The file was modifiedclang/lib/Basic/Targets/X86.h
The file was modifiedclang/docs/UsersManual.rst
The file was modifiedclang/test/Driver/x86-mtune.c
The file was modifiedllvm/lib/Target/X86/X86.td
The file was modifiedclang/docs/ReleaseNotes.rst
The file was modifiedclang/test/Misc/target-invalid-cpu-note.c
The file was modifiedllvm/docs/ReleaseNotes.rst
The file was modifiedllvm/test/CodeGen/X86/cpus-other.ll
The file was modifiedclang/test/Preprocessor/predefined-arch-macros.c
The file was modifiedclang/test/CodeGen/attr-target-x86.c
The file was modifiedllvm/include/llvm/Support/X86TargetParser.h
The file was modifiedclang/lib/Basic/Targets/X86.cpp
The file was addedclang/test/Preprocessor/predefined-arch-macros-x86.c
The file was modifiedclang/test/Sema/builtin-cpu-supports.c
Commit 039126c97d39fbd8ca6a82f103db8f2591e793cd by adhemerval.zanella
[sanitizer] Disable fast_unwind_on_malloc as default for arm-linux-gnu

ARM thumb/thumb2 frame pointer is inconsistent on GCC and Clang [1]
and fast-unwider is also unreliable when mixing arm and thumb code [2].

The fast unwinder on ARM tries to probe and compare the frame-pointer
at different stack layout positions and it works reliable only on
systems where all the libraries were built in arm mode (either with
gcc or clang) or with clang in thmb mode (which uses the same stack
frame pointer layout in arm and thumb).

However when mixing objects built with different abi modes the
fast unwinder is still problematic as shown by the failures on the
AddressSanitizer.ThreadStackReuseTest. For these failures, the
malloc is called by the loader itself and since it has been built
with a thum enabled gcc, the stack frame is not correctly obtained
and the suppression rule is not applied (resulting in a leak warning).

The check for fast-unwinder-works is also changed: instead of checking
f it is explicit enabled in the compiler flags, it now checks if
compiler defined thumb pre-processor.

This should fix BZ#44158.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92172
[2] https://bugs.llvm.org/show_bug.cgi?id=44158

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D88958
The file was modifiedcompiler-rt/test/asan/lit.site.cfg.py.in
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_flags.inc
The file was modifiedcompiler-rt/CMakeLists.txt
The file was modifiedcompiler-rt/test/asan/TestCases/Linux/clang_gcc_abi.cpp
The file was modifiedcompiler-rt/test/asan/lit.cfg.py
Commit 1b962fdd5f365a10684d9f70d703ae101c20d37a by zeratul976
[clangd] Heuristic resolution for dependent type and template names

Fixes https://github.com/clangd/clangd/issues/543

Differential Revision: https://reviews.llvm.org/D88469
The file was modifiedclang-tools-extra/clangd/FindTarget.cpp
The file was modifiedclang-tools-extra/clangd/unittests/FindTargetTests.cpp
Commit 4ff71362683b159903b3908f5c9f949d2fe7656d by llvm-dev
[InstCombine] FoldShiftByConstant - create Scalar/Vector constant with ConstantInt::get(). NFCI.

There's no need to create constant vector splats manually - missed this one in rG24dd0cd1edd5
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
Commit f1800579666c80adf8bb2f992a639e5b8e3a389b by aeubanks
[Inliner][NPM] Fix various tests under NPM

alloca-dbgdeclare-merge.ll:
alloca-merge-align.ll:
array_merge.ll:
NPM inliner does not merge allocas

delete-call.ll:
NPM inliner does not delete readonly calls

externally_available.ll:
NPM inliner does not delete available_externally functions

inline-cold-callee.ll:
inline-hot-callee.ll:
inline-hot-callee.ll has a comment saying it only applies to legacy PM,
I assume same for inline-cold-callee.ll

devirtualize-2.ll:
inline-hot-callsite:
monster_scc.ll:
pr22285.ll:
already has legacy and new PM RUN lines

inline-cold.ll:
profile-summary required to see callee as cold

prof-update-sample.ll:
profile-summary required to update branch_weights

Reviewed By: davidxl

Differential Revision: https://reviews.llvm.org/D89093
The file was modifiedllvm/test/Transforms/Inline/alloca-dbgdeclare-merge.ll
The file was modifiedllvm/test/Transforms/Inline/inline-cold-callee.ll
The file was modifiedllvm/test/Transforms/Inline/array_merge.ll
The file was modifiedllvm/test/Transforms/Inline/prof-update-sample.ll
The file was modifiedllvm/test/Transforms/Inline/monster_scc.ll
The file was modifiedllvm/test/Transforms/Inline/alloca-merge-align.ll
The file was modifiedllvm/test/Transforms/Inline/delete-call.ll
The file was modifiedllvm/test/Transforms/Inline/pr22285.ll
The file was modifiedllvm/test/Transforms/Inline/inline-hot-callee.ll
The file was modifiedllvm/test/Transforms/Inline/devirtualize-2.ll
The file was modifiedllvm/test/Transforms/Inline/externally_available.ll
The file was modifiedllvm/test/Transforms/Inline/devirtualize-3.ll
The file was modifiedllvm/test/Transforms/Inline/inline-hot-callsite.ll
The file was modifiedllvm/test/Transforms/Inline/inline-cold.ll
Commit f21fcccef7197f911a27b960aa2a180e0c7724aa by amccarth
[LLDB] Fix 37 tests on Windows

A Windows-style LLDB_PYTHON_HOME path in a Cmake template didn't have the
backslashes escaped, which led to a garbled paths derived from it.  Fixed
by expanding the environment variable as a raw string literal.

Differential Revision: https://reviews.llvm.org/D89256
The file was modifiedlldb/include/lldb/Host/Config.h.cmake
Commit 820e65f9e2369d2990fde4b3e7cfceb64f0df9c8 by rob.suderman
[mlir] fixing typo in parseAttribute that was ignoring caller-specified types

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D89255
The file was modifiedmlir/include/mlir/IR/DialectImplementation.h
Commit f09587c64ccb713af1e83d4f01a6aea3cb682c94 by sguelton
update .txt --> .md links
The file was modifiedflang/README.md
Commit dce8f2bb25ea1d01533d8e602f2520492fa67259 by xun
[Coroutine][Sema] Only tighten the suspend call temp lifetime for final awaiter

In https://reviews.llvm.org/D87470 I added the change to tighten the lifetime of the expression awaiter.await_suspend().address.
Howver it was incorrect. ExprWithCleanups will call the dtor and end the lifetime for all the temps created in the current full expr.
When this is called on a normal await call, we don't want to do that.
We only want to do this for the call on the final_awaiter, to avoid writing into the frame after the frame is destroyed.
This change fixes it, by checking IsImplicit.

Differential Revision: https://reviews.llvm.org/D89066
The file was modifiedclang/test/CodeGenCoroutines/coro-semmetric-transfer.cpp
The file was modifiedclang/lib/Sema/SemaCoroutine.cpp
Commit 388d373294e1f7386e1bc14338bd985189f47604 by clementval
[flang][openacc] Lower data construct

This patch upstream the lowering of Data construct that was initially done in
https://github.com/flang-compiler/f18-llvm-project/pull/460.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D88918
The file was modifiedflang/lib/Lower/OpenACC.cpp
Commit 26d861cbbd5f40182b3b7f0ac7ed0e58e0e8feaa by walter erquinigo
[trace] Scaffold "thread trace dump instructions"

Depends on D88841

As per the discussion in the RFC, we'll implement both

  thread trace dump [instructions | functions]

This is the first step in implementing the "instructions" dumping command.

It includes:

- A minimal ProcessTrace plugin for representing processes from a trace file. I noticed that it was a required step to mimic how core-based processes are initialized, e.g. ProcessElfCore and ProcessMinidump. I haven't had the need to create ThreadTrace yet, though. So far HistoryThread seems good enough.
- The command handling itself in CommandObjectThread, which outputs a placeholder text instead of the actual instructions. I'll do that part in the next diff.
- Tests

{F13132325}

Differential Revision: https://reviews.llvm.org/D88769
The file was addedlldb/test/API/commands/trace/TestTraceDumpInstructions.py
The file was modifiedlldb/test/API/commands/trace/TestTraceLoad.py
The file was modifiedlldb/include/lldb/Target/Trace.h
The file was modifiedlldb/source/Plugins/Trace/intel-pt/TraceIntelPT.h
The file was modifiedlldb/source/Plugins/Process/CMakeLists.txt
The file was addedlldb/source/Plugins/Process/Trace/CMakeLists.txt
The file was modifiedlldb/source/Target/Trace.cpp
The file was addedlldb/source/Plugins/Process/Trace/ProcessTrace.h
The file was modifiedlldb/source/Plugins/Trace/intel-pt/TraceIntelPTSessionFileParser.cpp
The file was modifiedlldb/source/Target/Target.cpp
The file was modifiedlldb/include/lldb/Target/Thread.h
The file was modifiedlldb/include/lldb/Target/Target.h
The file was addedlldb/source/Plugins/Process/Trace/ProcessTrace.cpp
The file was addedlldb/test/API/commands/trace/intelpt-trace/trace_2threads.json
The file was modifiedlldb/source/Commands/Options.td
The file was modifiedlldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
The file was modifiedlldb/source/Commands/CommandObjectThread.cpp