Changes

Summary

  1. [mlir] Fix memref_cast + subview folder when reducing rank (details)
  2. [RISCV] Add isel patterns for fixed vector fmsub/fnmadd/fnmsub. (details)
  3. [lldb] Remove some nanosleep preprocessor magic (details)
  4. [lldb] Delete superfluous semicolon (details)
  5. Fix flang after D76342 (details)
  6. [doc] Use cmake's -S option to simplify the build instructions (details)
  7. Revert "[DAG] Fold shuffle(bop(shuffle(x,y),shuffle(z,w)),bop(shuffle(a,b),shuffle(c,d)))" (details)
  8. separate AffineMapAccessInterface from AffineRead/WriteOpInterface (details)
  9. [SampleFDO] Provide a virtual desructor for SampleProfileLoaderBaseImpl (details)
  10. [lldb] [Process/FreeBSD] Ensure that errors are always handled (details)
  11. [NFC][PPC] Refactor TOC representation to allow several entries for the same symbol (details)
  12. [OpenMP][NFC] Clang format libomptarget code (src & include) (details)
  13. [OpenMP][NFC] Eliminate sign comparison warning via explicit casts (details)
  14. [OpenMP][NFC] Clang format the libomptarget plugins (details)
  15. [OpenMP][NFC] Pass a DeviceTy, not the device number to `target` (details)
  16. [OpenMP][NFC] Unify `target` API with other by passing a `__tgt_async_info` pointer (details)
  17. [OpenMP] Move synchronization into `__tgt_async_info` (details)
  18. [OpenMP] Unify omptarget API and usage wrt. `__tgt_async_info` (details)
  19. [OpenMP][FIX] Avoid use of stack allocations in asynchronous calls (details)
  20. Fix -Wnon-virtual-dtor by making the ctor protected (details)
  21. [llvm-dwp] Join dwo paths correctly when DWOPath is absolute (details)
  22. [mlir][Linalg] Add utility method to reshape ops to express output shape in terms of input shape. (details)
  23. Effectively revert ba2aa5f49ebb since the object isn't destroyed polymorphically (details)
  24. Revert "[SampleFDO][NFC] Refactor SampleProfile.cpp" (details)
  25. [gn build] Port c761fe77bdca (details)
  26. [MC][ELF] Support for zero flag section groups (details)
  27. [C++20] [P1825] More implicit moves (details)
  28. [lld][ELF] Support for zero flag section groups (details)
  29. [flang] Detect circularly defined procedures (details)
  30. [OPENMP50]Allow overlapping mapping in target constructs. (details)
Commit adfd3c7083f9808d145239153c10f72eece485d8 by thomasraoux
[mlir] Fix memref_cast + subview folder when reducing rank

When the destination of the subview has a lower rank than its source we need to
fix the result type of the new subview op.

Differential Revision: https://reviews.llvm.org/D96804
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/test/Dialect/Standard/canonicalize.mlir
Commit 61a238e6e134ca610d5534bb2ff7121f3ce0083b by craig.topper
[RISCV] Add isel patterns for fixed vector fmsub/fnmadd/fnmsub.
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp.ll
Commit 1db2888e70709930da6c22ab83706c7695962ace by pavel
[lldb] Remove some nanosleep preprocessor magic

It's obsolete, as we use (portable) std::this_thread::sleep_for now.
The file was modifiedlldb/source/Host/posix/PipePosix.cpp
Commit 901ea29662c88cb8f87d650cef2ed64a9f0d480f by pavel
[lldb] Delete superfluous semicolon
The file was modifiedlldb/source/Commands/CommandOptionsProcessLaunch.h
Commit b86dbe0c23e3d284699da551afc2ca9c634a6c62 by clementval
Fix flang after D76342

Fix Flang build after addition of a new OpenMP clauses for a clang patch (D76342).
Flang is using TableGen to generation the declaration of clause checks and the new clause
was missing a definiton.

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D96808
The file was modifiedflang/lib/Semantics/check-omp-structure.cpp
Commit 8eda10ca09c25f631d41f040137c89145bdcbc1a by evandro.menezes
[doc] Use cmake's -S option to simplify the build instructions

Now that llvm's minimum version is 3.13.4 anyway and `-S` is
introduced in the same version[1], let's use this little
time saving option to simplify the build instructions.

[1]: https://cgold.readthedocs.io/en/latest/glossary/-S.html

Authored-By: Ebrahim Byagowi <ebrahim@gnu.org>

Differential-Revision: https://reviews.llvm.org/D95049
The file was modifiedREADME.md
Commit 5aa8f4c0843a68a24cb37dce5c0248c849d7d476 by saugustine
Revert "[DAG] Fold shuffle(bop(shuffle(x,y),shuffle(z,w)),bop(shuffle(a,b),shuffle(c,d)))"

This reverts commit 5dfba562dd247f731528448ee83785b099f93629.

That commit causes an assertion failure with the following repro:

typedef long b __attribute__((__vector_size__(16)));
b *d;
b e;
b __attribute__((__always_inline__)) c(b h, b i) {
  return (__attribute__((__vector_size__(8 * sizeof(short)))) short)h + i;
}
j() {
  b k, l, m, n, o[6], p, q;
  m = d[5];
  b r = m;
  b s = f(r, 8);
  q = s;
  l = d[1];
  p = l;
  t(q);
  n = c(m, l);
  o[1] = c(s, f(p, 8));
  k = __builtin_shufflevector(n, o[1], 0, 2);
  e = __builtin_ia32_psrlwi128(k, j);
}

./bin/clang -cc1 -triple x86_64-grtev4-linux-gnu -emit-obj -O1 -std=c99 test.c
The file was modifiedllvm/test/CodeGen/X86/bitcast-and-setcc-256.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/X86/promote-cmp.ll
Commit 99c0458f2f53ec26d663e5b9ad750e54ecf51d4b by jeremy.bruestle
separate AffineMapAccessInterface from AffineRead/WriteOpInterface

Separating the AffineMapAccessInterface from AffineRead/WriteOp interface so that dialects which extend Affine capabilities (e.g. PlaidML PXA = parallel extensions for Affine) can utilize relevant passes (e.g. MemRef normalization).

Reviewed By: bondhugula

Differential Revision: https://reviews.llvm.org/D96284
The file was modifiedmlir/lib/Transforms/LoopFusion.cpp
The file was modifiedmlir/lib/Transforms/Utils/Utils.cpp
The file was modifiedmlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp
The file was modifiedmlir/include/mlir/Dialect/Affine/IR/AffineOps.td
The file was modifiedmlir/include/mlir/Dialect/Affine/IR/AffineOps.h
The file was modifiedmlir/include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td
Commit ba2aa5f49ebbe28ad2dbf0c5bea451f0ebf436c6 by kazu
[SampleFDO] Provide a virtual desructor for SampleProfileLoaderBaseImpl

This patch fixes a warning:

  llvm-project/llvm/include/llvm/ProfileData/SampleProfileLoaderBaseImpl.h:69:7:
  error: 'llvm::SampleProfileLoaderBaseImpl' has virtual functions but
  non-virtual destructor [-Werror,-Wnon-virtual-dtor]

Differential Revision: https://reviews.llvm.org/D96810
The file was modifiedllvm/include/llvm/ProfileData/SampleProfileLoaderBaseImpl.h
Commit 9f38001bf07252bc29671cf49b42351f34172dea by mgorny
[lldb] [Process/FreeBSD] Ensure that errors are always handled

Ensure that the llvm::Error instances are always considered handled
by replacing LLDB_LOG with LLDB_LOG_ERROR.

Differential Revision: https://reviews.llvm.org/D96558
The file was modifiedlldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp
Commit de3a485d9c391c44e2c90f79bbf8ac13d49d9fb6 by wei.huang
[NFC][PPC] Refactor TOC representation to allow several entries for the same symbol

We currently represent TOC entries by an MCSymbol. This is not enough in some situations.
For example, when accessing an initialized TLS variable v on AIX using the general dynamic
model, we need to generate the two following entries for v:

.tc .v[TC],v@m
.tc v[TC],v

One is for the region handle (with the @m relocation), the other is for the variable offset.
This refactoring allows storing several entries for the same symbol with different VariantKind
in the TOC. If the VariantKind is not specified, we default to VK_None.

The AIX TLS implementation using this refactoring to generate the two entries will be posted
in a subsequent patch.

Patched By: bsaleil
Reviewed By: sfertile

Differential Revision: https://reviews.llvm.org/D96346
The file was modifiedllvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Commit 9cd1e2228c70c9ff30bcefd5b287db8dac9c6019 by johannes
[OpenMP][NFC] Clang format libomptarget code (src & include)

The struct and enum alignments are kept by disabling clang-format for
that code region.

Reviewed By: tianshilei1992, JonChesterfield, grokos

Differential Revision: https://reviews.llvm.org/D96428
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
The file was modifiedopenmp/libomptarget/src/device.cpp
The file was modifiedopenmp/libomptarget/include/omptarget.h
The file was modifiedopenmp/libomptarget/src/api.cpp
The file was modifiedopenmp/libomptarget/include/Debug.h
The file was modifiedopenmp/libomptarget/src/rtl.cpp
The file was modifiedopenmp/libomptarget/src/device.h
The file was modifiedopenmp/libomptarget/src/interface.cpp
Commit ad94fce8458e6ecb990a3c6ba58f6ec92155cbe9 by johannes
[OpenMP][NFC] Eliminate sign comparison warning via explicit casts

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D96812
The file was modifiedopenmp/libomptarget/plugins/cuda/src/rtl.cpp
Commit ea9395716ecc9923beb74b3af3df9f673364a76e by johannes
[OpenMP][NFC] Clang format the libomptarget plugins

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D96445
The file was modifiedopenmp/libomptarget/plugins/ve/src/rtl.cpp
The file was modifiedopenmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp
Commit 44f3022cdf01b26d46ebff3c26a5e572aee2acdf by johannes
[OpenMP][NFC] Pass a DeviceTy, not the device number to `target`

This unifies the API of `target` relative to `targetUpdateData` and
such.

Reviewed By: tianshilei1992, grokos

Differential Revision: https://reviews.llvm.org/D96429
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
The file was modifiedopenmp/libomptarget/src/private.h
The file was modifiedopenmp/libomptarget/src/interface.cpp
The file was modifiedopenmp/libomptarget/src/rtl.cpp
Commit 942728763b8e8a6ec440d29f0f8608a1ac1f9cee by johannes
[OpenMP][NFC] Unify `target` API with other by passing a `__tgt_async_info` pointer

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D96430
The file was modifiedopenmp/libomptarget/src/rtl.cpp
The file was modifiedopenmp/libomptarget/src/interface.cpp
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
The file was modifiedopenmp/libomptarget/src/private.h
Commit a2fc0d34db72315f05b96681013e1e16d4df41c7 by johannes
[OpenMP] Move synchronization into `__tgt_async_info`

The AsyncInfo should be passed everywhere and it should offer a way to
ensure synchronization, given a libomptarget Device.

This replaces D96431.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D96438
The file was modifiedopenmp/libomptarget/include/omptarget.h
The file was modifiedopenmp/libomptarget/src/private.h
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
Commit 758b8499310a5d44a41de67d656bd32dc3fd1023 by johannes
[OpenMP] Unify omptarget API and usage wrt. `__tgt_async_info`

This patch unifies our libomptarget API in two ways:
  - always pass a `__tgt_async_info` object, the Queue member decides if
    it is in use or not.
  - (almost) always synchronize in the interface layer and not in the
    omptarget layer.

A side effect is that we now put all constructor and static initializer
kernels in a stream too, if the device utilizes `__tgt_async_info`.

The patch contains a TODO which can be addressed as we add support for
asynchronous malloc and free in the plugin API. This is the only
`synchronizeAsyncInfo` left in the omptarget layer.

Site note: On a V100 system the GridMini performance for small sizes
more than doubled.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D96379
The file was modifiedopenmp/libomptarget/src/rtl.cpp
The file was modifiedopenmp/libomptarget/src/device.cpp
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
The file was modifiedopenmp/libomptarget/src/interface.cpp
The file was modifiedopenmp/libomptarget/src/device.h
The file was modifiedopenmp/libomptarget/src/api.cpp
The file was modifiedopenmp/libomptarget/src/private.h
Commit 2518cc65d2a7564bb49d7b806f23dd47212dcefd by johannes
[OpenMP][FIX] Avoid use of stack allocations in asynchronous calls

As reported by Guilherme Valarini [0], we used to pass stack allocations
to calls that can nowadays be asynchronous. This is arguably a problem
and it will inevitably result in UB. To remedy the situation we
allocate the locations as part of the AsyncInfoTy object. The lifetime
of that object matches what we need for now. If the synchronization is
not tied to the AsyncInfoTy object anymore we might need to have a
different buffer construct in global space.

This should be back-ported to LLVM 12 but needs slight modifications as
it is based on refactoring patches we do not need to backport.

[0] https://lists.llvm.org/pipermail/openmp-dev/2021-February/003867.html

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D96667
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
The file was modifiedopenmp/libomptarget/include/omptarget.h
Commit f8af06d60d9c5bcf6104bf6540350fb0fb1d7ac5 by dblaikie
Fix -Wnon-virtual-dtor by making the ctor protected
The file was modifiedllvm/include/llvm/ProfileData/SampleProfileLoaderBaseImpl.h
Commit 6ffcb2937c96bd0d7a55b984b5eb8f381b68e322 by dblaikie
[llvm-dwp] Join dwo paths correctly when DWOPath is absolute

When the `DWOPath` is absolute, we want to use `DWOPath` as is, without prepending any other
components to the path. The `sys::path::append` does not join, but rather unconditionally appends
the paths, so something like `sys::path::append("/tmp", "/tmp/banana")` will result in
`/tmp/tmp/banana` rather than the desired `/tmp/banana`.

This then causes `llvm-dwp` to fail in a following situation:

```
$ clang -gsplit-dwarf /tmp/banana/test.c -c -o /tmp/outdir/foo.o
$ clang outdir/foo.o -o outdir/hm
$ llvm-dwarfdump outdir/hm | grep -C2 foo.dwo
                  DW_AT_comp_dir    ("/tmp")
                  DW_AT_GNU_pubnames  (true)
                  DW_AT_GNU_dwo_name    ("/tmp/outdir/foo.dwo")
                                DW_AT_GNU_dwo_id    (0xde4d396f3bf0e257)
                  DW_AT_low_pc  (0x0000000000401100)
$ strace -o trace llvm-dwp -e outdir/hm -o outdir/hm.dwp
error: No such file or directory
$ cat trace | grep foo.dwo
openat(AT_FDCWD, "/tmp/tmp/outdir/foo.dwo", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
```

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D96678
The file was addedllvm/test/tools/llvm-dwp/X86/absolute_paths.test
The file was modifiedllvm/tools/llvm-dwp/llvm-dwp.cpp
Commit 81264dfbe80df08668a325a61613b64243b99c01 by ravishankarm
[mlir][Linalg] Add utility method to reshape ops to express output shape in terms of input shape.

Resolving the dim of outputs of a tensor_reshape op in terms of its
input shape allows the op to be eliminated when its used only in its
dims. The init_tensor -> tensor_reshape canonicalization can be
simplified to use the dims of the output of the tensor_reshape which
gets canonicalized away later making the tensor_reshape dead.

Differential Revision: https://reviews.llvm.org/D96635
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
The file was modifiedmlir/test/Dialect/Linalg/canonicalize.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Commit c3120291f43b9ad0e09d4bc574c004f13822edd5 by dblaikie
Effectively revert ba2aa5f49ebb since the object isn't destroyed polymorphically
The file was modifiedllvm/include/llvm/ProfileData/SampleProfileLoaderBaseImpl.h
Commit c761fe77bdca26eb1451b6bb5070599a696711cb by joker.eph
Revert "[SampleFDO][NFC] Refactor SampleProfile.cpp"

This reverts commit 310b35304cdf5a230c042904655583c5532d3e91.
The build is broken with -DBUILD_SHARED_LIBS=ON :

lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProfileLoaderBaseUtil.cpp.o: In function `llvm::sampleprofutil::callsiteIsHot(llvm::sampleprof::FunctionSamples const*, llvm::ProfileSummaryInfo*, bool)':
SampleProfileLoaderBaseUtil.cpp:(.text._ZN4llvm14sampleprofutil13callsiteIsHotEPKNS_10sampleprof15FunctionSamplesEPNS_18ProfileSummaryInfoEb+0x1a): undefined reference to `llvm::ProfileSummaryInfo::isColdCount(unsigned long) const'
SampleProfileLoaderBaseUtil.cpp:(.text._ZN4llvm14sampleprofutil13callsiteIsHotEPKNS_10sampleprof15FunctionSamplesEPNS_18ProfileSummaryInfoEb+0x28): undefined reference to `llvm::ProfileSummaryInfo::isHotCount(unsigned long) const'
...
The file was removedllvm/include/llvm/ProfileData/SampleProfileLoaderBaseUtil.h
The file was removedllvm/include/llvm/ProfileData/SampleProfileLoaderBaseImpl.h
The file was removedllvm/lib/ProfileData/SampleProfileLoaderBaseUtil.cpp
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp
The file was modifiedllvm/lib/ProfileData/CMakeLists.txt
Commit 76609f17ced61f031a1fc77b2e0ed4aa9833917b by llvmgnsyncbot
[gn build] Port c761fe77bdca
The file was modifiedllvm/utils/gn/secondary/llvm/lib/ProfileData/BUILD.gn
Commit 16af97393346ad636298605930a8b503a55eb40a by phosek
[MC][ELF] Support for zero flag section groups

This change introduces support for zero flag ELF section groups to LLVM.
LLVM already supports COMDAT sections, which in ELF are a special type
of ELF section groups. These are generally useful to enable linker GC
where you want a group of sections to always travel together, that is to
be either retained or discarded as a whole, but without the COMDAT
semantics. Other ELF assemblers already support zero flag ELF section
groups and this change helps us reach feature parity.

Differential Revision: https://reviews.llvm.org/D95851
The file was modifiedllvm/lib/MC/MCSectionELF.cpp
The file was modifiedllvm/lib/MC/ELFObjectWriter.cpp
The file was addedllvm/test/CodeGen/X86/elf-group.ll
The file was modifiedllvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
The file was modifiedllvm/include/llvm/MC/MCContext.h
The file was modifiedllvm/lib/Target/XCore/XCoreTargetObjectFile.cpp
The file was modifiedllvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
The file was modifiedllvm/lib/Target/Mips/MCTargetDesc/MipsOptionRecord.cpp
The file was modifiedllvm/lib/MC/MCObjectFileInfo.cpp
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was modifiedllvm/lib/MC/MCContext.cpp
The file was modifiedllvm/lib/Target/ARM/ARMTargetObjectFile.cpp
The file was modifiedllvm/include/llvm/MC/MCSectionELF.h
The file was modifiedllvm/lib/MC/MCELFStreamer.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modifiedllvm/lib/MC/MCParser/ELFAsmParser.cpp
Commit fbee4a0c79cc4ee87c34e51342742a5bc6fcf872 by arthur.j.odwyer
[C++20] [P1825] More implicit moves

Implement all of P1825R0:

- implicitly movable entity can be an rvalue reference to non-volatile
    automatic object.
- operand of throw-expression can be a function or catch-clause parameter
    (support for function parameter has already been implemented).
- in the first overload resolution, the selected function no need to be
    a constructor.
- in the first overload resolution, the first parameter of the selected
    function no need to be an rvalue reference to the object's type.

This patch also removes the diagnostic `-Wreturn-std-move-in-c++11`.

Differential Revision: https://reviews.llvm.org/D88220
The file was modifiedclang/test/CXX/class/class.init/class.copy.elision/p3.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was modifiedclang/test/SemaCXX/warn-return-std-move.cpp
The file was modifiedclang/lib/Sema/SemaCoroutine.cpp
The file was addedclang/test/SemaCXX/P1155.cpp
The file was modifiedclang/www/cxx_status.html
The file was modifiedclang/include/clang/Basic/DiagnosticGroups.td
Commit bfa4235e6e92ce2d3df486828ca2b6aef9705c07 by phosek
[lld][ELF] Support for zero flag section groups

This change introduces support for zero flag ELF section groups to lld.
lld already supports COMDAT sections, which in ELF are a special type of
ELF section groups. These are generally useful to enable linker GC where
you want a group of sections to always travel together, that is to be
either retained or discarded as a whole, but without the COMDAT
semantics. Other ELF linkers already support zero flag ELF section
groups and this change helps us reach feature parity.

Differential Revision: https://reviews.llvm.org/D96636
The file was modifiedlld/test/ELF/gc-sections-group.s
The file was modifiedlld/ELF/InputFiles.cpp
Commit 77dc203cd0f65a8dbd71f3814e0cc3199c791980 by psteinfeld
[flang] Detect circularly defined procedures

It's possible to define a procedure that has a procedure dummy argument which
names the procedure that contains it.  This was causing the compiler to fall
into an infinite loop when characterizing a call to the procedure.

Following a suggestion from Peter, I fixed this be maintaining a set of
procedure symbols that had already been seen while characterizing a procedure.
This required passing a new parameter to the functions that characterized a
Procedure, a DummyArgument, and a DummyProcedure.

I also added several tests that will crash the compiler without this change.

Differential Revision: https://reviews.llvm.org/D96631
The file was addedflang/test/Semantics/resolve102.f90
The file was modifiedflang/lib/Evaluate/characteristics.cpp
The file was modifiedflang/include/flang/Evaluate/characteristics.h
Commit 60d71a286b5a03653fc99cd09423d603feb897de by a.bataev
[OPENMP50]Allow overlapping mapping in target constructs.

OpenMP 5.0 removed a lot of restriction for overlapped mapped items
comparing to OpenMP 4.5. Patch restricts the checks for overlapped data
mappings only for OpenMP 4.5 and less and reorders mapping of the
arguments so, that present and alloc mappings are processed first and
then all others.

Differential Revision: https://reviews.llvm.org/D86119
The file was modifiedclang/test/OpenMP/target_map_messages.cpp
The file was modifiedclang/test/OpenMP/declare_mapper_codegen.cpp
The file was modifiedclang/test/OpenMP/target_data_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_for_simd_map_messages.cpp
The file was modifiedclang/test/OpenMP/target_parallel_for_map_messages.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp
The file was modifiedclang/test/OpenMP/target_parallel_map_messages.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/test/OpenMP/target_map_codegen_32.cpp
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp
The file was modifiedclang/test/OpenMP/target_enter_data_codegen.cpp
The file was modifiedclang/test/OpenMP/target_map_codegen_29.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_map_messages.cpp
The file was addedopenmp/libomptarget/test/mapping/declare_mapper_nested_mappers.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp
The file was modifiedclang/test/OpenMP/target_update_codegen.cpp
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
The file was modifiedclang/test/OpenMP/target_map_codegen_31.cpp
The file was modifiedclang/test/OpenMP/target_simd_map_messages.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp
The file was modifiedclang/test/OpenMP/target_teams_map_messages.cpp
The file was modifiedclang/test/OpenMP/target_is_device_ptr_messages.cpp