Commit Graph

2245 Commits

Author SHA1 Message Date
Eric Christopher 7d0c7255c5 Move the darwin define static function to be close to the OS define.
llvm-svn: 248539
2015-09-24 21:17:04 +00:00
Eric Christopher d8eb961b0f Use just one larger anonymous namespace instead of a lot of smaller ones.
llvm-svn: 248538
2015-09-24 21:17:02 +00:00
Artyom Skrobov d3ae09bcc8 Recommit r248154: [ARM] Handle DSP feature as an ArchExtKind
Currently, the availability of DSP instructions (ACLE 6.4.7) is handled in
a hand-rolled tricky condition block in lib/Basic/Targets.cpp, with a FIXME:
attached.

http://reviews.llvm.org/D12937 moved the handling of the DSP feature over to
ARMTargetParser.def in LLVM, to be in line with other architecture extensions.

This is the corresponding patch to clang, to clear the FIXME: and update
the tests.

Differential Revision: http://reviews.llvm.org/D12938

llvm-svn: 248521
2015-09-24 17:34:05 +00:00
Richard Trieu c3096249c1 Improve the printing of ranges when macros are involved.
Trace the ranges through the macro backtrace better.  This allows better
range highlighting through all levels of the macro bracktrace.  Also some
improvements to backtrace printer for omitting different backtraces.

Patch by Zhengkai Wu.

Differential Revision: http://reviews.llvm.org/D12379

llvm-svn: 248454
2015-09-24 01:21:01 +00:00
Artem Belevich b5bc923af4 [CUDA] Allow parsing of host and device code simultaneously.
* adds -aux-triple option to specify target triple
 * propagates aux target info to AST context and Preprocessor
 * pulls in target specific preprocessor macros.
 * pulls in target-specific builtins from aux target.
 * sets appropriate host or device attribute on builtins.

Differential Revision: http://reviews.llvm.org/D12917

llvm-svn: 248299
2015-09-22 17:23:22 +00:00
James Molloy 93bd4e9979 Revert "[ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.def"
This was committed without the code review (http://reviews.llvm.org/D12938) being approved.

This reverts commit r248154.

llvm-svn: 248173
2015-09-21 16:34:58 +00:00
Artyom Skrobov 7428f1ef64 [ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.def
Currently, the availability of DSP instructions (ACLE 6.4.7) is handled in
a hand-rolled tricky condition block in lib/Basic/Targets.cpp, with a FIXME:
attached.

http://reviews.llvm.org/D12937 moved the handling of +t2dsp over to
ARMTargetParser.def in LLVM, to be in line with other architecture extensions.

This is the corresponding patch to clang, to clear the FIXME: and update
the tests.

Differential Revision: http://reviews.llvm.org/D12938

llvm-svn: 248154
2015-09-21 13:19:25 +00:00
Eric Christopher c48497a2f8 Reduce indentation in the TargetInfo implementations and fix up
a couple of macro builtin redefines.

llvm-svn: 248046
2015-09-18 21:26:24 +00:00
Alexey Bataev 87933c7ced [OPENMP 4.0] Add 'if' clause for 'cancel' directive.
Add parsing, sema analysis and codegen for 'if' clause in 'cancel' directive.

llvm-svn: 247976
2015-09-18 08:07:34 +00:00
Charles Davis c7d5c94f78 Support __builtin_ms_va_list.
Summary:
This change adds support for `__builtin_ms_va_list`, a GCC extension for
variadic `ms_abi` functions. The existing `__builtin_va_list` support is
inadequate for this because `va_list` is defined differently in the Win64
ABI vs. the System V/AMD64 ABI.

Depends on D1622.

Reviewers: rsmith, rnk, rjmccall

CC: cfe-commits

Differential Revision: http://reviews.llvm.org/D1623

llvm-svn: 247941
2015-09-17 20:55:33 +00:00
Ismail Donmez a8d3a2e9a1 Doxygen fix InitializeBuiltins -> initializeBuiltins
llvm-svn: 247668
2015-09-15 09:53:14 +00:00
Dan Gohman f1c34e6731 [WebAssembly] Define the atomic type sizes
WebAssembly's spec has now been updated to specify some guarantees
about lock free atomic accesses. Update clang to match.

This also updates sig_atomic_t to be 64-bit on wasm64. WebAssembly
does not presently have asynchronous interrupts, but this change is
within the spirit of how they will work if they are added.

Differential Revision: http://reviews.llvm.org/D12862

llvm-svn: 247624
2015-09-14 21:56:37 +00:00
Dan Gohman ab0e31fa35 [WebAssembly] Use "long long" for int_fast64_t and int_least64_t on wasm64
This makes int_fast64_t and int_least64_t the same type as int64_t, and
eliminates a difference between wasm32 and wasm64.

Differential Revision: http://reviews.llvm.org/D12861

llvm-svn: 247622
2015-09-14 21:49:41 +00:00
Rachel Craik f55d058a98 Test commit
Remove some trailing whitespace

llvm-svn: 247560
2015-09-14 14:08:18 +00:00
Hans Wennborg 7eb5464bc5 Re-commit r247218: "Fix Clang-tidy misc-use-override warnings, other minor fixes"
This never broke the build; it was the LLVM side, r247216, that caused problems.

llvm-svn: 247302
2015-09-10 17:07:54 +00:00
Hans Wennborg e89c8c8033 Revert r247218: "Fix Clang-tidy misc-use-override warnings, other minor fixes"
Seems it broke the Polly build.
From http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3-polly-fast/builds/11687/steps/compile/logs/stdio:

In file included from /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/lib/TableGen/Record.cpp:14:0:
/home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:369:3: error: looser throw specifier for 'virtual llvm::TypedInit::~TypedInit()'
/home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:270:11: error:   overriding 'virtual llvm::Init::~Init() noexcept (true)'

llvm-svn: 247222
2015-09-10 00:37:18 +00:00
Hans Wennborg 60f3e1f466 Fix Clang-tidy misc-use-override warnings, other minor fixes
Patch by Eugene Zelenko!

Differential Revision: http://reviews.llvm.org/D12741

llvm-svn: 247218
2015-09-10 00:24:40 +00:00
Alexandros Lamprineas 94d75dba14 Refactoring of how ARMTargetInfo handles default target features.
Differential Revision: http://reviews.llvm.org/D11299

llvm-svn: 246946
2015-09-06 16:15:45 +00:00
Alexey Bataev a7ab1b4206 [X86-64] Allow additional register names in inline assembler.
Patch allows to recognize additional registers x8d, x8b, x8w - x15d, x15b, x15w in inline assembler, already recognized by backend
Differential Revision: http://reviews.llvm.org/D12594

llvm-svn: 246835
2015-09-04 03:42:23 +00:00
Dan Gohman c285307e14 [WebAssembly] Initial WebAssembly support in clang
This implements basic support for compiling (though not yet assembling
or linking) for a WebAssembly target. Note that ABI details are not yet
finalized, and may change.

Differential Revision: http://reviews.llvm.org/D12002

llvm-svn: 246814
2015-09-03 22:51:53 +00:00
Alexandros Lamprineas a448f04697 Implement ACLE 2.0 macros of chapters 6.4 and 6.5 for [ARM] and [Aarch64] targets.
Differential Revision: http://reviews.llvm.org/D12244

Change-Id: Iffd4e822c15e18668fe8868278230ff232ef50aa
llvm-svn: 246768
2015-09-03 14:40:57 +00:00
Oliver Stannard dc2854c2f1 [ARM] Allow passing/returning of __fp16 arguments
The ACLE (ARM C Language Extensions) 2.0 allows the __fp16 type to be
used as a functon argument or return type (ACLE 1.1 did not).

The current public release of the AAPCS (2.09) states that __fp16 values
should be converted to single-precision before being passed or returned,
but AAPCS 2.10 (to be released shortly) changes this, so that they are
passed in the least-significant 16 bits of either a GPR (for base AAPCS)
or a single-precision register (for AAPCS-VFP). This does not change how
arguments are passed if they get passed on the stack.

This patch brings clang up to compliance with the latest versions of
both of these specs.

We can now set the __ARM_FP16_ARGS ACLE predefine, and we have always
been able to set the __ARM_FP16_FORMAT_IEEE predefine (we do not support
the alternative format).

llvm-svn: 246764
2015-09-03 12:40:58 +00:00
Oliver Stannard 9253f00d13 Revert 246755 as it breaks buildbots
Original commit message:
[ARM] Allow passing/returning of __fp16 arguments

The ACLE (ARM C Language Extensions) 2.0 allows the __fp16 type to be
used as a functon argument or return type (ACLE 1.1 did not).

The current public release of the AAPCS (2.09) states that __fp16 values
should be converted to single-precision before being passed or returned,
but AAPCS 2.10 (to be released shortly) changes this, so that they are
passed in the least-significant 16 bits of either a GPR (for base AAPCS)
or a single-precision register (for AAPCS-VFP). This does not change how
arguments are passed if they get passed on the stack.

This patch brings clang up to compliance with the latest versions of
both of these specs.

We can now set the __ARM_FP16_ARGS ACLE predefine, and we have always
been able to set the __ARM_FP16_FORMAT_IEEE predefine (we do not support
the alternative format).

llvm-svn: 246760
2015-09-03 11:46:24 +00:00
Oliver Stannard ee0286201c [ARM] Allow passing/returning of __fp16 arguments
The ACLE (ARM C Language Extensions) 2.0 allows the __fp16 type to be
used as a functon argument or return type (ACLE 1.1 did not).

The current public release of the AAPCS (2.09) states that __fp16 values
should be converted to single-precision before being passed or returned,
but AAPCS 2.10 (to be released shortly) changes this, so that they are
passed in the least-significant 16 bits of either a GPR (for base AAPCS)
or a single-precision register (for AAPCS-VFP). This does not change how
arguments are passed if they get passed on the stack.

This patch brings clang up to compliance with the latest versions of
both of these specs.

We can now set the __ARM_FP16_ARGS ACLE predefine, and we have always
been able to set the __ARM_FP16_FORMAT_IEEE predefine (we do not support
the alternative format).

llvm-svn: 246755
2015-09-03 09:34:53 +00:00
Eric Christopher e9cdcaee7b Pull initFeatureMap out of line now that it's used in multiple places.
llvm-svn: 246565
2015-09-01 18:13:20 +00:00
Eric Christopher dec31befef Revert "Pull the target attribute parsing out of CGCall and onto TargetInfo."
This reverts commit r246468 while we figure out what to do about Basic and AST.

llvm-svn: 246508
2015-08-31 23:19:55 +00:00
Eric Christopher d40722e267 Pull the target attribute parsing out of CGCall and onto TargetInfo.
Also:
  - Add a typedef to make working with the result easier.
  - Update callers to use the new function.
  - Make initFeatureMap out of line.

llvm-svn: 246468
2015-08-31 18:39:22 +00:00
Eric Christopher a8a14c3d88 Pull out the ppc incompatible features check into a separate function.
llvm-svn: 246467
2015-08-31 18:39:16 +00:00
Chandler Carruth d96f37a772 Update for several APIs in LLVM that now use StringRefs rather than
const char pointers. In turn, push this through Clang APIs as well,
simplifying a number of bits of code that was handling the oddities of
nullptrs.

llvm-svn: 246375
2015-08-30 07:51:18 +00:00
Chandler Carruth aa0caeb431 Update for API change in LLVM: ARMTargetParser class is just the ARM
namespace.

llvm-svn: 246368
2015-08-30 02:16:36 +00:00
Eric Christopher 007b0a0e27 Fold TargetInfo::handleUserFeatures into TargetInfo::initFeatureMap.
llvm-svn: 246346
2015-08-28 22:32:01 +00:00
Eric Christopher e6b6488c70 Instead of duplicating code, call the base implementation.
llvm-svn: 246260
2015-08-28 02:14:00 +00:00
Eric Christopher ef1e295a8c Merge the two feature map setting functions into a single function
and replace all callers.

llvm-svn: 246259
2015-08-28 02:13:58 +00:00
Ahmed Bougacha 02b7b56af8 [X86] Bump Darwin MaxVectorAlign to 64 when AVX512 is enabled.
Without this, 64-byte vector types (__m512), specified to be 64-byte
aligned in the AVX512 draft SysV ABI, will only be 32-byte aligned.

This is analoguous to AVX, for which we accept 32-byte max alignment.

Differential Revision: http://reviews.llvm.org/D10724

llvm-svn: 246230
2015-08-27 22:42:12 +00:00
Ahmed Bougacha 82b619ea68 [X86] Conditionalize Darwin MaxVectorAlign on the presence of AVX.
There's no point in using a larger alignment if we have no instructions
that would benefit from it.

Differential Revision: http://reviews.llvm.org/D12389

llvm-svn: 246229
2015-08-27 22:30:38 +00:00
Ahmed Bougacha 68bf64e302 [X86] Use AVX features instead of ABI to init. SimdDefaultAlign.
The ABI string only exists to communicate with TargetCodeGenInfo.
Concretely, since we only used "avx*" ABI strings on x86_64 (as AVX
doesn't affect the i386 ABIs), this meant that, when initializing
SimdDefaultAlign, we would ignore AVX/AVX512 on i386, for no good
reason.

Instead, directly check the features. A similar change for
MaxVectorAlign will follow.

Differential Revision: http://reviews.llvm.org/D12390

llvm-svn: 246228
2015-08-27 22:24:56 +00:00
Eric Christopher 53b2afa28f Remove a dead assert, we'd have gotten the case above.
llvm-svn: 246202
2015-08-27 20:32:24 +00:00
Eric Christopher 1c07d8ce83 const-ify TargetInfo::handleUserFeatures.
llvm-svn: 246180
2015-08-27 18:42:57 +00:00
Eric Christopher 2b4a725e0a Pass in a cpu to initDefaultFeatures so that we can share this code
with multiple uses of feature map construction.

Note: We could make this a static function on TargetInfo if we
fix the x86 port needing to check the triple in an isolated case.

llvm-svn: 246128
2015-08-27 00:05:52 +00:00
Eric Christopher c50738f139 const-ify X86TargetInfo::getCPUKind.
llvm-svn: 246127
2015-08-27 00:05:50 +00:00
Eric Christopher b39e44b3f4 Pull out cpu string -> enum parsing for x86 as a separate function,
this is going to see use shortly in unifying feature set construction.

llvm-svn: 246122
2015-08-26 23:42:18 +00:00
Eric Christopher 610fe11ad1 Convert a bunch of loops to ranged-for and clean up accordingly.
llvm-svn: 246027
2015-08-26 08:21:55 +00:00
Eric Christopher d50e2e6397 Remove dead code associated with parsing and setting ABI based on
string name.

llvm-svn: 246021
2015-08-26 07:01:33 +00:00
Eric Christopher 1d3cbfa1c1 Remove a TODO that isn't going to get fixed in this way.
llvm-svn: 246020
2015-08-26 07:01:30 +00:00
Eric Christopher b39156d068 Update file comment to more accurately describe what's implemented.
llvm-svn: 246006
2015-08-26 04:23:11 +00:00
Eric Christopher f0c2dd07ea Rewrite the PPC target feature handling to more resemble other targets.
This involved specializing handleUserFeatures so that we could perform
diagnostics on -only- user supplied features and migrating the rest of
the initialization functions to set features based on enabling and disabling
full feature sets. No functional change intended.

llvm-svn: 245936
2015-08-25 13:45:28 +00:00
Eric Christopher 6b45437f6f Extract handling of user defined features into a function so we can
specialize it on the targets.

llvm-svn: 245935
2015-08-25 13:45:24 +00:00
Eric Christopher 02c33354f0 Reimplement the PPC explicit option checking to be a bit more obvious
that we're looking for conflicting options and give an explanation.

llvm-svn: 245914
2015-08-25 00:59:11 +00:00
Keith Walker 71ad47f81f [AArch64] Define the macro __ARM_FP16_ARGS
The ACLE (ARM C Language Extensions) 2.0 defines that the predefined macro
__ARM_FP16_ARGS should be defined if __fp16 can be used as an argument and
result.

The support for __fp16 to be used as an argument and result is already
implemented for AArch64 so this change is just adding the missing macro.

Differential Revision: http://reviews.llvm.org/D12240

llvm-svn: 245833
2015-08-24 10:11:14 +00:00
Alexey Bataev 66b15b505f [OPENMP 4.1] Initial support for 'simdlen' clause.
Add parsing/sema analysis for 'simdlen' clause in simd directives. Also add check that if both 'safelen' and 'simdlen' clauses are specified, the value of 'simdlen' parameter is less than the value of 'safelen' parameter.

llvm-svn: 245692
2015-08-21 11:14:16 +00:00
Yaron Keren 480bc9fc36 Revert the 64bit part of r245084; long double values were not changed by
it as they are already set correctly by X86_64TargetInfo and X86TargetInfo.

llvm-svn: 245620
2015-08-20 21:51:46 +00:00
Yaron Keren 4da1a3754a Revert the 32bit part of r245084; mingw values were correct before it.
llvm-svn: 245618
2015-08-20 21:36:14 +00:00
Alexey Bataev 182227bd5b [OPENMP 4.1] Initial support for modifiers in 'linear' clause.
OpenMP 4.1 adds 3 optional modifiers to 'linear' clause.
Format of 'linear' clause has changed to:
```
linear(linear-list[ : linear-step])
```
where linear-list is one of the following
```
list
modifier(list)
```
where modifier is one of the following:
```
 ref (C++)
 val (C/C++)
 uval (C++)
```
Patch adds parsing and sema analysis for these modifiers.

llvm-svn: 245550
2015-08-20 10:54:39 +00:00
Yaron Keren 7890a01263 According to i686 ABI, long double size on x86 is 12 bytes not 16 bytes.
See
 https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/i386-and-x86-64-Options.html

llvm-svn: 245459
2015-08-19 17:02:32 +00:00
Vladimir Sukharev 457d34193e [ARM] Proper generic cpus handling
"generic" cpu was wrongly handled as exact real CPU name of ARMv8.1A architecture.

This has been fixed, now it is abstract name, suitable for any arch.

Reviewers: rengolin

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11640

llvm-svn: 245445
2015-08-19 14:50:18 +00:00
Eric Christopher 72be1c1b64 Rename getDefaultFeatures -> initDefaultFeatures and update comment
with the current behavior as the name seems to match what's going on.

llvm-svn: 245405
2015-08-19 02:24:21 +00:00
Eric Christopher 15c2f936de Remove dead code, there's no need for an override that just duplicates
the default behavior.

llvm-svn: 245251
2015-08-17 22:22:28 +00:00
Martell Malone b8a3fe7a53 WindowsX86: long double is x87DoubleExtended on mingw
Summary:
    long double on x86 mingw is 80bits and is aligned to 16bytes

	Fixes:
    https://llvm.org/bugs/show_bug.cgi?id=24398

    Reviewers: rnk

    Subscribers: cfe-commits

    Differential Revision: http://reviews.llvm.org/D12037

llvm-svn: 245084
2015-08-14 19:05:56 +00:00
Martell Malone 7ccda3c38b Windows ARM: ignore calling conventions as described on MSDN
Summary:
MSDN says that fastcall, stdcall, thiscall, and vectorcall are all
accepted but ignored on ARM and X64.
https://msdn.microsoft.com/en-us/library/984x0h58.aspx

MSDN also says cdecl is also accepted and typically ignored
This patch brings ARM in line with how we ignore them for X64

Reviewers: rnk

Subscribers: compnerd, cfe-commits

Differential Revision: http://reviews.llvm.org/D12034

llvm-svn: 245076
2015-08-14 18:00:09 +00:00
Richard Smith fb1e7f7d1a [modules] Add an experimental -cc1 feature to embed the contents of an input
file in the .pcm files. This allows a smaller set of files to be sent to a
remote build worker when building with explicit modules (for instance, module
map files need not be sent along with the corresponding precompiled modules).

This doesn't actually make the embedded files visible to header search, so
it's not useful as a packaging format for public header files.

llvm-svn: 245028
2015-08-14 05:02:58 +00:00
David Blaikie 210ea0b31a Wdeprecated: StoredDiagnostics are stored in a SmallVector, so make sure they're copy/movable
Removing the no-op dtor makes these objects safely implicitly
copyable/movable/etc.

(& tidy up the ctor, while I'm here)

llvm-svn: 244971
2015-08-13 22:20:14 +00:00
Brad Smith 56495d5b1f Removed one too many braces.
llvm-svn: 244962
2015-08-13 22:00:53 +00:00
Brad Smith 738591194f [SPARC] Fix types of size_t, intptr_t, and ptrdiff_t on OpenBSD.
llvm-svn: 244961
2015-08-13 21:45:57 +00:00
Ben Langmuir 7ff29148ac [Modules] Add Darwin-specific compatibility module map parsing hacks
This preserves backwards compatibility for two hacks in the Darwin
system module map files:

1. The use of 'requires excluded' to make headers non-modular, which
should really be mapped to 'textual' now that we have this feature.

2. Silently removes a bogus cplusplus requirement from IOKit.avc.

Once we start diagnosing missing requirements and headers on
auto-imports these would have broken compatibility with existing Darwin
SDKs.

llvm-svn: 244912
2015-08-13 17:13:33 +00:00
Richard Smith 03a06dd13c Add SourceManager::dump() to dump the current set of SLocEntries.
llvm-svn: 244852
2015-08-13 00:45:11 +00:00
Richard Smith 78d81ecfc3 [modules] If loading a .pcm file would cause us to run out of source locations, attempt to fail more gracefully. (No test; this requires >= 4GB of preprocessed input...)
llvm-svn: 244822
2015-08-12 22:25:24 +00:00
Aaron Ballman b226d3d0da Rangify some for loops; NFC.
llvm-svn: 244749
2015-08-12 13:38:59 +00:00
Petar Jovanovic 2e0551f8d2 [MIPS] Use arch values for lock-free atomic operations
Let NaClMips32ELTargetInfo inherit arch values for maximum width lock-free
atomic operations.

Differential Revision: http://reviews.llvm.org/D11949

llvm-svn: 244675
2015-08-11 21:27:39 +00:00
Eric Christopher e4f73b3f3b Update a comment to be more descriptive.
llvm-svn: 244346
2015-08-07 19:07:08 +00:00
Michael Wong e710d5459e This patch commits OpenMP 4 target device clauses
This is committed on behalf of Kelvin Li
http://reviews.llvm.org/D11469?id=31227

llvm-svn: 244325
2015-08-07 16:16:36 +00:00
Craig Topper 07d3b62548 Make sure the Features field of the Builtin Info struct is always initialized. Silences -Wmissing-field-initializers.
While there convert 0 in the BUILTIN macros to nullptr.

llvm-svn: 244307
2015-08-07 05:14:44 +00:00
Ben Langmuir 587aeafe2c Make 'arm' cover both 32 and 64 bit architecutres
... and add aarch32 to specifically refer to the 32-bit ones.

Previously, 'arm' meant only 32-bit architectures and there was no way
for a module to build with both 32 and 64 bit ARM architectures.

Now a module that is intended to work on both architectures can specify
    requires arm
whereas a module only for 32-bit platforms can say
    requires aarch32
and just like before, 64-bit only can say
    requires aarch64

llvm-svn: 244306
2015-08-07 01:59:56 +00:00
Eric Christopher b6dfd9490b Continue the work from r243908 by adding a Features field to Builtin::Info
so that we can populate it on a per-target basis with required features.

Future commits will start using this information for warnings.

llvm-svn: 244286
2015-08-06 22:11:54 +00:00
Eric Christopher 02d5d86b4e Rename the non-coding style conformant functions in namespace Builtins
to match the rest of their brethren and reformat the bits that need it.

llvm-svn: 244186
2015-08-06 01:01:12 +00:00
Eric Christopher 964a5f3b5c Rename DescriptionString -> DataLayoutString as it matches the actual
use of the string.

llvm-svn: 244178
2015-08-05 23:48:05 +00:00
Eric Christopher 53645350e2 Remove unused header includes.
llvm-svn: 244131
2015-08-05 21:11:56 +00:00
Eric Christopher 35869a26cd Rename builtin_lang -> Langs to match the rest of the code a bit better.
llvm-svn: 244126
2015-08-05 21:04:28 +00:00
Eric Christopher b20d7700cc Remove unused function GetBuiltinNames.
llvm-svn: 244125
2015-08-05 21:04:24 +00:00
Benjamin Kramer da4690ae12 [FileManager] Use StringRef::copy to store canonical paths.
No functional change intended.

llvm-svn: 243970
2015-08-04 11:27:08 +00:00
Argyrios Kyrtzidis c56419ed00 [modules] Fix issue where building a module from a relative path when -working-directory option is set, results in error.
The error was "module '<name>' was built in directory '<path>' but now resides in directory '<path>'
rdar://21330027

llvm-svn: 243718
2015-07-31 00:58:32 +00:00
Ulrich Weigand 3c5038a535 Add support for System z vector language extensions
The z13 vector facility has an associated language extension,
closely modeled on AltiVec/VSX.  The main differences are:

- vector long, vector float and vector pixel are not supported

- vector long long and vector double are supported (like VSX)

- comparison operators return a vector rather than a scalar integer

- shift operators behave like the OpenCL shift operators

- vector bool is only supported as argument to certain operators;
  some operators allow mixing a bool with a non-bool vector 

This patch adds clang support for the extension.  It is closely modelled
on the AltiVec support.  Similarly to the -faltivec option, there's a
new -fzvector option to enable the extensions (as well as an -mzvector
alias for compatibility with GCC).  There's also a separate LangOpt.

The extension as implemented here is intended to be compatible with
the -mzvector extension recently implemented by GCC.

Based on a patch by Richard Sandiford.

Differential Revision: http://reviews.llvm.org/D11001

llvm-svn: 243642
2015-07-30 14:08:36 +00:00
Sean Silva de3816655a Add a comment explaining differing Windows behavior.
llvm-svn: 243625
2015-07-30 07:30:24 +00:00
Sean Silva 3e36e507ec Attempt to make clang-x64-ninja-win7 happy.
It looks like we were somehow relying somewhere on removing 'foo/./bar'
but *not* 'foo/../foo/bar'. Currently investigating.

llvm-svn: 243600
2015-07-30 00:52:32 +00:00
Sean Silva b963dedbe8 Avoid failure to canonicalize '..'.
Also fix completely broken and untested code which was hiding the
primary bug. The !LLVM_ON_UNIX branch of the ifdef was actually a no-op.

I ran into this in the wild. It was causing failures in our SDK build.

Ideally we'd have a perfect llvm::sys::fs::canonical, but at least this
is a step in the right direction, and fixes an obviously broken case.
In some sense the test case I've added here is an integration test. We
should have these routines thoroughly unit tested in llvm::sys::fs.

llvm-svn: 243597
2015-07-30 00:26:34 +00:00
Kristof Beyls 918f8ab7c6 RegParmMax must be 0 for AArch64, as the regparm function attribute is not supported on AArch64.
llvm-svn: 243417
2015-07-28 14:23:47 +00:00
David Majnemer b856e8f071 [Targets] Define _M_AMD64 and _M_X64 to a more appropriate value
We used to define them to 1, we should have defined them to 100.

llvm-svn: 243255
2015-07-26 23:17:29 +00:00
Chih-Hung Hsieh 0b0eeaaaf6 Correct x86_64 Android fp128 mangled name
These changes are for Android x86_64 targets to be compatible with current Android g++.
https://llvm.org/bugs/show_bug.cgi?id=23897
Use 'g' and 'Cg' for "long double" and "long double _Complex" mangled type names.

Differential Revision: http://reviews.llvm.org/D11466

llvm-svn: 243133
2015-07-24 18:12:54 +00:00
Chih-Hung Hsieh cda1cd5770 Test commit.
llvm-svn: 243125
2015-07-24 17:39:13 +00:00
David Majnemer 6a6589036b [MSVC Compatibility] Use a better predicate for __BOOL_DEFINED
Instead of using CPlusPlus, use Bool.  No functionality change is
intended, it just makes things a tad bit more clear.

llvm-svn: 242957
2015-07-22 22:36:26 +00:00
Yaron Keren d030d11a24 Add cygwin x86_64 target.
Patch by Martell Malone!

http://reviews.llvm.org/D11349

llvm-svn: 242914
2015-07-22 17:38:19 +00:00
Tim Northover 525c73ceb7 ARM: actually define __ARM_ARCH_7S__ for the armv7s slice
We ended up with the wrong predefine after the recent TargetParser shuffle, and
I accidentally solidified it with a test. This should fix it.

llvm-svn: 242841
2015-07-21 21:47:33 +00:00
Michael Wong 65f367fcbb Commit for http://reviews.llvm.org/D10765
for OpenMP 4 target data directive parsing and sema.
This commit is on behalf of Kelvin Li.

llvm-svn: 242785
2015-07-21 13:44:28 +00:00
Bob Wilson 7c73083bd3 Ignore the "novtable" declspec when not using the Microsoft C++ ABI.
Clang used to silently ignore __declspec(novtable). It is implemented
now, but leaving the vtable uninitialized does not work when using the
Itanium ABI, where the class layout for complex class hierarchies is
stored in the vtable. It might be possible to honor the novtable
attribute in some simple cases and either report an error or ignore
it in more complex situations, but it’s not clear if that would be
worthwhile. There is also value in having a simple and predictable
behavior, so this changes clang to simply ignore novtable when not using
the Microsoft C++ ABI.

llvm-svn: 242730
2015-07-20 22:57:31 +00:00
Alexey Bataev 91e5860fad [X86, inlineasm] Improve analysis of x,Y0,Yi,Ym,Yt,L,e,Z,s asm constraints (patch by Alexey Frolov)
Improve Sema checking of 9 existing inline asm constraints (‘x’, ‘Y*’, ‘L’, ‘e’, ‘Z’, ‘s’).
Differential Revision: http://reviews.llvm.org/D10536

llvm-svn: 242665
2015-07-20 12:08:00 +00:00
Saleem Abdulrasool 94f4951187 basic: default to MSVC on Windows
The "armv7-windows", "i686-windows", and "x86_64-windows" targets should be
equivalent to the MSVC environment.  This was previously discussed when the
triples for Windows werw canonicalised.  Im not sure how this was overlooked.
This fixes the emission of non-COFF formats on Windows.

Thanks to ki9a for reporting this issue over IRC!

llvm-svn: 242574
2015-07-17 21:26:41 +00:00
Tom Stellard 2204137df9 R600: Add macro defs for all supported OpenCL extensions
llvm-svn: 242523
2015-07-17 13:16:52 +00:00
Tamas Berghammer 15ef947549 Fix android build after r242514
On android std::to_string isn't supported. Replace it with
llvm::utostr.

llvm-svn: 242516
2015-07-17 10:16:11 +00:00
Alexandros Lamprineas 65bc306345 -Refactored ARMTargetInfo in order to use the API of TargetParser
for extracting target specific information.
-Patches commit r241343: case 'armv7l' was unhandled in
 ARMTargetInfo::getCPUAttr(), and thus it was returning invalid
 characters for macro definition.

Change-Id: I1a0972e5ff5529cd17376c6562047bab8b4da32c
Phabricator: http://reviews.llvm.org/D10839
llvm-svn: 242514
2015-07-17 09:08:37 +00:00
Adrian Prantl fb2398d0c4 Make the clang module container format selectable from the command line.
- introduces a new cc1 option -fmodule-format=[raw,obj]
  with 'raw' being the default
- supports arbitrary module container formats that libclang is agnostic to
- adds the format to the module hash to avoid collisions
- splits the old PCHContainerOperations into PCHContainerWriter and
  a PCHContainerReader.

Thanks to Richard Smith for reviewing this patch!

llvm-svn: 242499
2015-07-17 01:19:54 +00:00
Matthias Braun d1e2fad2e0 Allow __builtin_setjmp/__builtin_longjmp on ARM
The problems in the llvm target got fixed in r242481 and r242482.

Related to rdar://20544153, rdar://20660786

llvm-svn: 242489
2015-07-17 00:15:22 +00:00