Changes

Summary

  1. MIPatternMatch.h - remove unused APFloat/APInt includes. NFC. (details)
  2. ARMFrameLowering.h - remove unnecessary includes. NFC. (details)
  3. [llvm-dwarfdump][test] Use verbose output to check expected opcodes (details)
  4. [utils] change default nameless value to "TMP" (details)
  5. [lldb][NFC] Make ClangExpressionSourceCode's wrapping logic more consistent (details)
  6. [DebugInfo] Add use of truncating data extractor to debug line parsing (details)
  7. Revert "[lldb] Pass -fPIC flag even when DYLIB_ONLY is set" (details)
  8. [Support] Add more context to DataExtractor getLEB128 errors (details)
  9. [CodeGen] remove instnamer dependency from test file; NFC (details)
  10. [StructurizeCFG] Fix an incorrect comment, NFC. (details)
  11. Support GCC [[gnu::attributes]] in C2x mode (details)
  12. [openmp] Fixed taskloop recursive splitting so that taskloop tasks have (details)
  13. [InstNamer] use 'i' for Instructions, not 'tmp' (details)
  14. [WebAssembly] Update test expectations (details)
  15. [libc] Add implementations of ceil[f], floor[f] and trunc[f] from math.h. (details)
  16. Process gep (phi ptr1, ptr2) in SROA (details)
  17. [InstCombine] add test for select-of-shuffle; NFC (details)
  18. [Object] Add DF_1_PIE (details)
  19. Update some names in test. NFC. (details)
  20. [flang] This adds the lowering stubs for Open MP. (details)
  21. [Clang][CGM] style cleanups NFC (details)
  22. [SVE] Eliminate calls to default-false VectorType::get() from Clang (details)
  23. AMDGPU: Fix alignment for dynamic allocas (details)
Commit de82114db86bb1bd89f3596409dc8f30fa316ce5 by llvm-dev
MIPatternMatch.h - remove unused APFloat/APInt includes. NFC.
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
Commit 014648e8f27b2f57940844f0170d15b42a497d33 by llvm-dev
ARMFrameLowering.h - remove unnecessary includes. NFC.

They are implicitly included in TargetFrameLowering.h and only ever used in TargetFrameLowering override methods.
The file was modifiedllvm/lib/Target/ARM/ARMFrameLowering.h
Commit 7bcde99f7779a71a389e559b7ff2ff6ec43ae004 by james.henderson
[llvm-dwarfdump][test] Use verbose output to check expected opcodes

The debug_line_invalid.test test case was previously using the
interpreted line table dumping to identify which opcodes have been
parsed. This change moves to looking for the expected opcodes
explicitly. This is probably a little clearer and also allows for
testing some cases that wouldn't be easily identifiable from the
interpreted table.

Reviewed by: MaskRay

Differential Revision: https://reviews.llvm.org/D80795
The file was modifiedllvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
Commit e5b8772756737e41cb1e8ee1a5a33cb3d8a25be6 by spatel
[utils] change default nameless value to "TMP"

This is effectively reverting rGbfdc2552664d to avoid test churn
while we figure out a better way forward.

We at least salvage the warning on name conflict from that patch
though.

If we change the default string again, we may want to mass update
tests at the same time. Alternatively, we could live with the poor
naming if we change -instnamer.

This also adds a test to LLVM as suggested in the post-commit
review. There's a clang test that is also affected. That seems
like a layering violation, but I have not looked at fixing that yet.

Differential Revision: https://reviews.llvm.org/D80584
The file was modifiedclang/test/utils/update_cc_test_checks/Inputs/mangled_names.c.expected
The file was modifiedclang/test/utils/update_cc_test_checks/Inputs/mangled_names.c.funcsig.expected
The file was modifiedllvm/utils/UpdateTestChecks/common.py
The file was modifiedllvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/basic.ll.expected
The file was modifiedllvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/basic.ll
The file was modifiedllvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/basic.ll.funcsig.expected
Commit 2b37c5b560584f05edf5d375d4ca86fe9c5b0173 by Raphael Isemann
[lldb][NFC] Make ClangExpressionSourceCode's wrapping logic more consistent

Summary:
ClangExpressionSourceCode has different ways to wrap the user expression based on
which context the expression is executed in. For example, if we're in a C++ member
function we put the expression inside a fake member function of a fake class to make the
evaluation possible. Similar things are done for Objective-C instance/static methods.
There is also a default wrapping where we put the expression in a normal function
just to make it possible to execute it.

The way we currently define which kind of wrapping the expression needs is based on
the `wrapping_language` we keep passing to the ClangExpressionSourceCode
instance. We repurposed the language type enum for that variable to distinguish the
cases above with the following mapping:
* language = C_plus_plus -> member function wrapping
* language = ObjC -> instance/static method wrapping (`is_static` distinguished between those two).
* language = C -> normal function wrapping
* all other cases like C_plus_plus11, Haskell etc. make our class a no-op that does mostly nothing.

That mapping is currently not documented and just confusing as the `language`
is unrelated to the expression language (and in the ClangUserExpression we even pretend
that it *is* the actual language, but luckily never used it for anything). Some of the code
in ClangExpressionSourceCode is also obviously thinking that this is the actual language of
the expression as it checks for non-existent cases such as `ObjC_plus_plus` which is
not part of the mapping.

This patch makes a new enum to describe the four cases above (with instance/static Objective-C
methods now being their own case). It also make that enum just a member of
ClangExpressionSourceCode instead of having to pass the same value to the class repeatedly.
This gets also rid of all the switch-case-checks for 'unknown' language such as C_plus_plus11 as this
is no longer necessary.

Reviewers: labath, JDevlieghere

Reviewed By: labath

Subscribers: abidh

Differential Revision: https://reviews.llvm.org/D80793
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.h
Commit e8bcf4ef07ccba4a707b197f1bdee05a19936c47 by james.henderson
[DebugInfo] Add use of truncating data extractor to debug line parsing

This will ensure that nothing can ever start parsing data from a future
sequence and part-read data will be returned as 0 instead.

Reviewed by: aprantl, labath

Differential Revision: https://reviews.llvm.org/D80796
The file was modifiedllvm/test/tools/llvm-dwarfdump/X86/Inputs/debug_line_malformed.s
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
The file was modifiedllvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
Commit 54422d21700cfb532c80b22662f7b79d741b21ba by Raphael Isemann
Revert "[lldb] Pass -fPIC flag even when DYLIB_ONLY is set"

This reverts commit fd0ab3b3eb88de3fe4792c34b50084595e22d68d.

The fix here is incorrect and the actual fault was an incorrect test Makefile.

To give some more background:

The original test for D80798 compiled three source files into either one
executable or one executable + 2 shared libraries, each being one different
test setup. If both the monolithic executable and the shared libraries
where compiled in the same directory, then Make would overwrite the .o files
of one test setup with the other. This caused that while -fPIC was passed
correctly to the test setup with the shared libraries, the compiler invocations
for the monolithic executable would later overwrite these object files (and
as only the test setup with the shared library used -fPIC, it appeared as if
the shared library object files didn't receive the -fPIC flag).

Thanks to Pavel for figuring this out.
The file was modifiedlldb/packages/Python/lldbsuite/test/make/Makefile.rules
Commit 8d9070e040d0aa916b3b63c319eabdf3e4a5f9df by james.henderson
[Support] Add more context to DataExtractor getLEB128 errors

Reviewed by: clayborg, dblaikie, labath

Differential Revision: https://reviews.llvm.org/D80799
The file was modifiedllvm/lib/Support/DataExtractor.cpp
The file was modifiedllvm/unittests/Support/DataExtractorTest.cpp
The file was modifiedllvm/test/tools/llvm-dwarfdump/X86/debug_line_short_prologue.s
The file was modifiedllvm/test/DebugInfo/X86/dwarfdump-debug-loclists-error-cases.s
Commit c0303e5391f65dbad3a6f1dbfa5ac9c9a83fa6c0 by spatel
[CodeGen] remove instnamer dependency from test file; NFC

This file was originally added without instnamer at:
rL283716 / fe2b9b4fbf860e3dc7da7705f548bc8d7b6ab9c1

But that was reverted and the test file reappeared with instnamer at:
rL285688 / 62f516f5906f967179610a73e4cc1d852b908bbd

I'm not seeing any difference locally from checking nameless values,
so trying to remove a layering violation and see if that can
survive the build bots.
The file was modifiedclang/test/CodeGen/x86-inline-asm-v-constraint.c
Commit 8a84158e5b966236c0e090cd5c7f44dab69e59a8 by ehudkatz
[StructurizeCFG] Fix an incorrect comment, NFC.
The file was modifiedllvm/lib/Transforms/Scalar/StructurizeCFG.cpp
Commit 522934da1f0c78c1de1a80d4ba14204a11f5afa8 by aaron
Support GCC [[gnu::attributes]] in C2x mode

GCC 10.1 introduced support for the [[]] style spelling of attributes in C
mode. Similar to how GCC supports __attribute__((foo)) as [[gnu::foo]] in
C++ mode, it now supports the same spelling in C mode as well. This patch
makes a change in Clang so that when you use the GCC attribute spelling,
the attribute is automatically available in all three spellings by default.
However, like Clang, GCC has some attributes it only recognizes in C++ mode
(specifically, abi_tag and init_priority), which this patch also honors.
The file was modifiedclang/utils/TableGen/ClangAttrEmitter.cpp
The file was modifiedclang/test/Sema/attr-c2x.c
The file was modifiedclang/include/clang/Basic/Attr.td
Commit 5e111c5df8efde39c62d5e6906f590311782e30b by Andrey.Churbanov
[openmp] Fixed taskloop recursive splitting so that taskloop tasks have
same parent tasks.

Differential Revision: https://reviews.llvm.org/D80577
The file was modifiedopenmp/runtime/src/kmp_tasking.cpp
The file was addedopenmp/runtime/test/tasking/omp_taskloop_taskwait.c
Commit dd54432a0f5a6f042fa4d2db3094c6f02e5ad275 by spatel
[InstNamer] use 'i' for Instructions, not 'tmp'

As discussed in https://bugs.llvm.org/show_bug.cgi?id=45951 and
D80584, the name 'tmp' is almost always a bad choice, but we have
a legacy of regression tests with that name because it was baked
into utils/update_test_checks.py.

This change makes -instnamer more consistent (already using "arg"
and "bb", the common LLVM shorthand). And it avoids the conflict
in telling users of the FileCheck script to run "-instnamer" to
create a better regression test and having that cause a warn/fail
in update_test_checks.py.
The file was modifiedllvm/test/Transforms/InstNamer/basic.ll
The file was modifiedllvm/lib/Transforms/Utils/InstructionNamer.cpp
Commit 26c78e3095f42c066804cf517339002a1028ed61 by sbc
[WebAssembly] Update test expectations

simd-2.C now compiles thanks to:
  https://github.com/WebAssembly/wasi-libc/pull/183

Differential Revision: https://reviews.llvm.org/D80930
The file was modifiedllvm/lib/Target/WebAssembly/known_gcc_test_failures.txt
Commit 1caedd0c550646557d8d2feb97b3cbba8c48b2d7 by sivachandra
[libc] Add implementations of ceil[f], floor[f] and trunc[f] from math.h.

Reviewers: abrachet

Differential Revision: https://reviews.llvm.org/D80612
The file was addedlibc/src/math/truncf.cpp
The file was addedlibc/test/src/math/trunc_test.cpp
The file was addedlibc/src/math/ceilf.cpp
The file was modifiedlibc/utils/MPFRWrapper/MPFRUtils.h
The file was modifiedlibc/utils/FPUtil/FloatProperties.h
The file was addedlibc/src/math/floorf.h
The file was modifiedlibc/test/src/math/CMakeLists.txt
The file was addedlibc/src/math/floor.cpp
The file was addedlibc/test/src/math/ceil_test.cpp
The file was addedlibc/src/math/trunc.cpp
The file was addedlibc/src/math/truncf.h
The file was addedlibc/test/src/math/truncf_test.cpp
The file was addedlibc/src/math/ceil.h
The file was addedlibc/test/src/math/floor_test.cpp
The file was modifiedlibc/src/math/CMakeLists.txt
The file was modifiedlibc/utils/MPFRWrapper/MPFRUtils.cpp
The file was addedlibc/src/math/floor.h
The file was addedlibc/src/math/floorf.cpp
The file was addedlibc/src/math/trunc.h
The file was addedlibc/src/math/ceil.cpp
The file was addedlibc/test/src/math/floorf_test.cpp
The file was modifiedlibc/lib/CMakeLists.txt
The file was addedlibc/test/src/math/ceilf_test.cpp
The file was addedlibc/src/math/ceilf.h
The file was modifiedlibc/utils/FPUtil/FloatOperations.h
Commit 745c6c8458babb31efc4e992a9c3e8598f03149f by Stanislav.Mekhanoshin
Process gep (phi ptr1, ptr2) in SROA

Differential Revision: https://reviews.llvm.org/D79218
The file was addedllvm/test/Transforms/SROA/phi-gep.ll
The file was modifiedllvm/lib/Transforms/Scalar/SROA.cpp
Commit b874dc4ddabe9cada83e8e0b82274faf2eee95cc by spatel
[InstCombine] add test for select-of-shuffle; NFC

This is based on an example in D80658
The file was modifiedllvm/test/Transforms/InstCombine/vec_demanded_elts.ll
Commit d9943e7f0ce888733ee7ba91da432e5f01f7aa85 by maskray
[Object] Add DF_1_PIE

This flag (and the whole field DT_FLAGS_1) originated from Solaris. I intend to use it in an LLD patch D80872.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D80871
The file was modifiedllvm/include/llvm/BinaryFormat/ELF.h
The file was modifiedllvm/test/tools/llvm-readobj/ELF/dynamic-tags.test
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
Commit e132a9c012bab1425e6021a818befd17a73e2b64 by Stanislav.Mekhanoshin
Update some names in test. NFC.

There seems to be some instability with IR nameing between
platforms. Attempted to fix it with replacing dot-numbered
names.
The file was modifiedllvm/test/Transforms/SROA/phi-gep.ll
Commit ae6e499d258c24fde433d02793c327367c402d50 by eschweitz
[flang] This adds the lowering stubs for Open MP.

The lowering bridge will call these lowering hooks to process the Open
MP directives that it iterates over in the PFT.  This is a mock
interface without an implementation in this patch.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D80815
The file was addedflang/include/flang/Lower/OpenMP.h
The file was addedflang/include/flang/Lower/AbstractConverter.h
The file was addedflang/lib/Lower/OpenMP.cpp
The file was modifiedflang/lib/Lower/CMakeLists.txt
Commit ef1d4bec891b2121fffa68675e3792b2527a75ee by ndesaulniers
[Clang][CGM] style cleanups NFC

Summary:
Forked from:
https://reviews.llvm.org/D80242

Use the getter for access to DebugInfo consistently.
Use break in switch in CodeGenModule::EmitTopLevelDecl consistently.

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: cfe-commits, srhines

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80840
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
Commit 796898172c48a475f27f038e587c35dbba9ab7a6 by ctetreau
[SVE] Eliminate calls to default-false VectorType::get() from Clang

Reviewers: efriedma, david-arm, fpetrogalli, ddunbar, rjmccall

Reviewed By: fpetrogalli, rjmccall

Subscribers: tschuett, rkruppe, psnobl, dmgreen, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80323
The file was modifiedclang/lib/CodeGen/CGExpr.cpp
The file was modifiedclang/lib/CodeGen/CGExprScalar.cpp
The file was modifiedclang/lib/CodeGen/CodeGenTypes.cpp
The file was modifiedclang/utils/TableGen/MveEmitter.cpp
The file was modifiedclang/lib/CodeGen/TargetInfo.cpp
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedclang/lib/CodeGen/SwiftCallingConv.cpp
Commit 7ad36491cadee1ed91e18215c30328a3d5c104f9 by arsenm2
AMDGPU: Fix alignment for dynamic allocas

The alignment value also needs to be scaled by the wave size.
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/non-entry-alloca.ll