SuccessChanges

Summary

  1. [RISCV] Move riscv_vfmv_v_f_vl patterns to RISCVInstrInfoVVLPatterns.td for consistency with riscv_vmv_v_x_vl. NFC (details)
  2. Make the error condition in Value::ValueType explicit (NFC) (details)
  3. Support dereferencing a DWARF scalar stack value (details)
  4. [SystemZ] Fix vecintrin.h to not emit alignment hints in vec_xl/vec_xst. (details)
  5. [lldb] Fix up SysV ABI implementations after 057efa9916cdc354ef4653bcd128a578cc43125e (details)
  6. [NFC] Combine runNewPMPasses() and runNewPMCustomPasses() (details)
  7. [CSSPGO][llvm-profgen] Filter out the instructions without location info for symbolizer (details)
  8. Store the LocationKind of an entry value buffer independently from the main LocationKind (NFC) (details)
  9. [SYCL] Ignore file-scope asm during device-side SYCL compilation. (details)
  10. [OpenMP] fix test adding mapping of shared variables (details)
  11. [OpenMP] NFC: fix test removing the target construct (details)
  12. [llvm-objcopy] preserve file ownership when overwritten by root (details)
Commit 532d4bf025442cb1357789bf6d9941bb9c5219c6 by craig.topper
[RISCV] Move riscv_vfmv_v_f_vl patterns to RISCVInstrInfoVVLPatterns.td for consistency with riscv_vmv_v_x_vl. NFC
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
Commit 057efa9916cdc354ef4653bcd128a578cc43125e by Adrian Prantl
Make the error condition in Value::ValueType explicit (NFC)

The comment for ValueType claims that all values <1 are errors, but
not all switch statements take this into account. This patch
introduces an explicit Error case and deletes all default: cases, so
we get warned about incomplete switch coverage.

https://reviews.llvm.org/D96537
The file was modifiedlldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
The file was modifiedlldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
The file was modifiedlldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
The file was modifiedlldb/source/Core/ValueObjectConstResult.cpp
The file was modifiedlldb/source/Core/ValueObjectRegister.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
The file was modifiedlldb/source/Expression/DWARFExpression.cpp
The file was modifiedlldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp
The file was modifiedlldb/unittests/Expression/DWARFExpressionTest.cpp
The file was modifiedlldb/source/Core/ValueObjectMemory.cpp
The file was modifiedlldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
The file was modifiedlldb/source/Core/Value.cpp
The file was modifiedlldb/source/Plugins/ABI/X86/ABISysV_x86_64.cpp
The file was modifiedlldb/source/Core/ValueObject.cpp
The file was modifiedlldb/source/DataFormatters/TypeFormat.cpp
The file was modifiedlldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
The file was modifiedlldb/source/Expression/FunctionCaller.cpp
The file was modifiedlldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
The file was modifiedlldb/source/Target/ABI.cpp
The file was modifiedlldb/include/lldb/Expression/ExpressionVariable.h
The file was modifiedlldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
The file was modifiedlldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
The file was modifiedlldb/source/Plugins/ABI/X86/ABISysV_i386.cpp
The file was modifiedlldb/source/Core/ValueObjectChild.cpp
The file was modifiedlldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
The file was modifiedlldb/source/Core/ValueObjectConstResultImpl.cpp
The file was modifiedlldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
The file was modifiedlldb/source/Plugins/ABI/AArch64/ABISysV_arm64.cpp
The file was modifiedlldb/source/Target/ThreadPlanTracer.cpp
The file was modifiedlldb/include/lldb/Core/Value.h
The file was modifiedlldb/source/Plugins/ABI/X86/ABIWindows_x86_64.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
The file was modifiedlldb/source/Target/RegisterContextUnwind.cpp
The file was modifiedlldb/source/Core/ValueObjectVariable.cpp
The file was modifiedlldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
Commit 188b0747c1664d962e94f00b5e3caac529fa1e26 by Adrian Prantl
Support dereferencing a DWARF scalar stack value

Swift async functions receive function arguments inside a
heap-allocated data structure, similar to how ObjC block captures or
C++ coroutine arguments are implement. In DWARF they are described
relative to an entry value that produces a pointer into that heap
object. At typical location looks like

DW_OP_entry_value [ DW_OP_reg14 ] DW_OP_deref DW_OP_plus_uconst 32 DW_OP_deref

This allows the unwinder (which has special ABI knowledge to restore
the contents of r14) to push the base address onto the stack thus
allowing the deref/offset operations to continue. The result of the
entry value is a scalar, because DW_OP_reg14 is a register location —
as it should be since we want to restore the pointer value contained
in r14 at the beginning of the function and not the historical memory
contents it was pointing to. The entry value should restore the
address, which is still valid, not the contents at function entry.

To make this work, we need to allow LLDB to dereference Scalar stack
results like load addresses, which is what this patch
does. Unfortunately it is difficult to test this in isolation, since
the DWARFExpression unit test doesn't have a process.

Differential Revision: https://reviews.llvm.org/D96549
The file was modifiedlldb/unittests/Expression/DWARFExpressionTest.cpp
The file was modifiedlldb/source/Expression/DWARFExpression.cpp
The file was modifiedlldb/unittests/Expression/CMakeLists.txt
Commit b3ac5b84cdd46fc62a7215ae6b11f3c005900461 by paulsson
[SystemZ] Fix vecintrin.h to not emit alignment hints in vec_xl/vec_xst.

vec_xl() and vec_xst() should not emit alignment hints since they take a
scalar pointer and also add a byte offset if passed.

This patch uses memcpy to achieve the desired result.

Review: Ulrich Weigand

Differential Revision: https://reviews.llvm.org/D96471
The file was modifiedclang/lib/Headers/vecintrin.h
The file was modifiedclang/test/CodeGen/SystemZ/builtins-systemz-zvector-constrained.c
Commit 2dbe88db5804f32c6dfc1aa474881c3cb7a61d03 by benny.kra
[lldb] Fix up SysV ABI implementations after 057efa9916cdc354ef4653bcd128a578cc43125e
The file was modifiedlldb/source/Plugins/ABI/Mips/ABISysV_mips64.cpp
The file was modifiedlldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.cpp
The file was modifiedlldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.cpp
The file was modifiedlldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.cpp
The file was modifiedlldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp
Commit 964f8103c58db5917c66ef39f50acf2004c90144 by aeubanks
[NFC] Combine runNewPMPasses() and runNewPMCustomPasses()

I've already witnessed two separate changes missing runNewPMPasses()
because runNewPMCustomPasses() is so similar.

This cleans up some duplicated code.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D96553
The file was modifiedllvm/lib/LTO/LTOBackend.cpp
Commit afd8bd601eaf268357e2cc0cf4c0382732fcf923 by wlei
[CSSPGO][llvm-profgen] Filter out the instructions without location info for symbolizer

It appears some instructions doesn't have the debug location info and the symbolizer will return an empty call stack for them which will cause some crash later in profile unwinding. Actually we do not record the sample info for them, so this change just filter out those instruction.

As those instruction would appears at the begin and end of the instruction list, without them we need to add the boundary check for IP `advance` and `backward`.

Also for pseudo probe based profile, we actually don't need the symbolized location info, so here just change to use an empty stack for it. This could save half of the binary loading time.

Differential Revision: https://reviews.llvm.org/D96434
The file was modifiedllvm/tools/llvm-profgen/PerfReader.cpp
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp
The file was modifiedllvm/test/tools/llvm-profgen/recursion-compression-noprobe.test
The file was modifiedllvm/test/tools/llvm-profgen/inline-cs-noprobe.test
The file was modifiedllvm/test/tools/llvm-profgen/noinline-cs-noprobe.test
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.h
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.cpp
Commit 982b891905349e9d6b82f8d89d325b6f2e838435 by Adrian Prantl
Store the LocationKind of an entry value buffer independently from the main LocationKind (NFC)

This patch hides the logic for setting the location kind of an entry
value inside the begin/finalize/cancel functions. This way we get rid
the strange workaround that is currently in setLocation().

In the future, this will allow us to set the location kind of the
entry value independently from the location kind of the main
expression.

Differential Revision: https://reviews.llvm.org/D96554
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
Commit ff50b121e336503621da80676116f82d82e91196 by artur.gainullin
[SYCL] Ignore file-scope asm during device-side SYCL compilation.

Reviewed By: bader, eandrews

Differential Revision: https://reviews.llvm.org/D96538
The file was addedclang/test/CodeGenSYCL/filescope_asm.c
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
Commit 091e8daa24de6c348674f7507c0cf9b0f9395607 by Andrey.Churbanov
[OpenMP] fix test adding mapping of shared variables
The file was modifiedopenmp/runtime/test/teams/kmp_num_teams.c
Commit 5631842d181016207e85e4d035d0c4383f34337a by Andrey.Churbanov
[OpenMP] NFC: fix test removing the target construct
The file was modifiedopenmp/runtime/test/teams/kmp_num_teams.c
Commit c2a84771bb63947695ea50b89160c02b36fb634d by jiancai
[llvm-objcopy] preserve file ownership when overwritten by root

As of binutils 2.36, GNU strip calls chown(2) for "sudo strip foo" and
"sudo strip foo -o foo", but no "sudo strip foo -o bar" or "sudo strip
foo -o ./foo". In other words, while "sudo strip foo -o bar" creates a
new file bar with root access, "sudo strip foo" will keep the owner and
group of foo unchanged. Currently llvm-objcopy and llvm-strip behave
differently, always changing the owner and gropu to root. The
discrepancy prevents Chrome OS from migrating to llvm-objcopy and
llvm-strip as they change file ownership and cause intended users/groups
to lose access when invoked by sudo with the following sequence
(recommended in man page of GNU strip).

1.<Link the executable as normal.>
1.<Copy "foo" to "foo.full">
1.<Run "strip --strip-debug foo">
1.<Run "objcopy --add-gnu-debuglink=foo.full foo">

This patch makes llvm-objcopy and llvm-strip follow GNU's behavior.

Link: crbug.com/1108880
The file was modifiedllvm/lib/Support/Unix/Path.inc
The file was modifiedllvm/include/llvm/Support/FileOutputBuffer.h
The file was modifiedllvm/include/llvm/Support/FileSystem.h
The file was modifiedllvm/lib/Support/FileOutputBuffer.cpp
The file was modifiedllvm/tools/llvm-objcopy/llvm-objcopy.cpp
The file was modifiedllvm/tools/llvm-objcopy/Buffer.cpp
The file was modifiedllvm/tools/llvm-objcopy/Buffer.h