[PowerPC] Support the ELFv2 ABI

This patch implements clang support for the PowerPC ELFv2 ABI.
Together with a series of companion patches in LLVM, this makes
clang/LLVM fully usable on powerpc64le-linux.

Most of the ELFv2 ABI changes are fully implemented on the LLVM side.
On the clang side, we only need to implement some changes in how
aggregate types are passed by value.   Specifically, we need to:
- pass (and return) "homogeneous" floating-point or vector aggregates in
  FPRs and VRs (this is similar to the ARM homogeneous aggregate ABI)
- return aggregates of up to 16 bytes in one or two GPRs

The second piece is trivial to implement in any case.  To implement
the first piece, this patch makes use of infrastructure recently
enabled in the LLVM PowerPC back-end to support passing array types
directly, where the array element type encodes properties needed to
handle homogeneous aggregates correctly.

Specifically, the array element type encodes:
- whether the parameter should be passed in FPRs, VRs, or just
  GPRs/stack slots  (for float / vector / integer element types,
  respectively)
- what the alignment requirements of the parameter are when passed in
  GPRs/stack slots  (8 for float / 16 for vector / the element type
  size for integer element types) -- this corresponds to the
  "byval align" field

With this support in place, the clang part simply needs to *detect*
whether an aggregate type implements a float / vector homogeneous
aggregate as defined by the ELFv2 ABI, and if so, pass/return it
as array type using the appropriate float / vector element type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213494 91177308-0d34-0410-b5e6-96231b3b80d8
[PowerPC] Optimize passing certain aggregates by value

In addition to enabling ELFv2 homogeneous aggregate handling,
LLVM support to pass array types directly also enables a performance
enhancement.  We can now pass (non-homogeneous) aggregates that fit
fully in registers as direct integer arrays, using an element type
to encode the alignment requirement (that would otherwise go to the
"byval align" field).

This is preferable since "byval" forces the back-end to write the
aggregate out to the stack, even if it could be passed fully in
registers.  This is particularly annoying on ELFv2, if there is
no parameter save area available, since we then need to allocate
space on the callee's stack just to hold those aggregates.

Note that to implement this optimization, this patch does not attempt
to fully anticipate register allocation rules as (defined in the
ABI and) implemented in the back-end.  Instead, the patch is simply
passing *any* aggregate passed by value using the array mechanism
if its size is up to 64 bytes.   This means that some of those will
end up being passed in stack slots anyway, but the generated code
shouldn't be any worse either.  (*Large* aggregates remain passed
using "byval" to enable optimized copying via memcpy etc.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213495 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Added several test cases for clauses 'ordered' and 'nowait': if there are more than one 'nowait' or 'ordered' clause an error message is expected.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213496 91177308-0d34-0410-b5e6-96231b3b80d8
[modules] Fix some of the confusion when computing the override set for a macro
introduced by finalization. This is still not entirely correct; more fixes to
follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213498 91177308-0d34-0410-b5e6-96231b3b80d8
Add missing initialization found due to a valgrind false positive.
This field is never inspected in the object state initialized by this
constructor; however, initializing it seems reasonable, since it has
a meaningful value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213499 91177308-0d34-0410-b5e6-96231b3b80d8
Add clang::DesignatedInitExpr::designators() for range-based access,
with overloads for designators_range and designators_const_range.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213500 91177308-0d34-0410-b5e6-96231b3b80d8
Trivial doc fixes: add missing whitespace, and s/overriden/overridden/g.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213502 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Parsing/Sema of the OpenMP directive 'critical'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213510 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Initial parsing and sema analysis for 'flush' directive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213512 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Handle C11 atomics when diagnosing out of range comparisons

This fixes a couple of asserts when analyzing comparisons involving
C11 atomics that were uncovered by r205608 when we extended the
applicability of -Wtautological-constant-out-of-range-compare.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213573 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for '#pragma unroll'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213574 91177308-0d34-0410-b5e6-96231b3b80d8
Emit lifetime.start / lifetime.end markers for unnamed temporary objects.

This will give more information to the optimizers so that they can reuse stack slots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213576 91177308-0d34-0410-b5e6-96231b3b80d8
Fix build breakage caused by use of std::to_string(int).  Replace with raw_string_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213578 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Emit lifetime.start / lifetime.end markers for unnamed temporary objects."

This commit did break the sanitizer-x86 bot. Revert it while
investigating.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213579 91177308-0d34-0410-b5e6-96231b3b80d8