Commit Graph

2346 Commits

Author SHA1 Message Date
NAKAMURA Takumi 2d5c6ddf74 Revert r255001, "Add parse and sema for OpenMP distribute directive and all its clauses excluding dist_schedule."
It causes memory leak. Some tests in test/OpenMP would fail.

llvm-svn: 255094
2015-12-09 04:35:57 +00:00
Vedant Kumar 13e6f311af [Basic] Rangify two for loops. NFC.
llvm-svn: 255091
2015-12-09 01:44:02 +00:00
Alexey Bataev 382967a2e4 [OPENMP 4.5] Parsing/sema for 'num_tasks' clause.
OpenMP 4.5 adds directives 'taskloop' and 'taskloop simd'. These directives support clause 'num_tasks'. Patch adds parsing/semantic analysis for this clause.

llvm-svn: 255008
2015-12-08 12:06:20 +00:00
Carlo Bertolli b9bfa75b28 Add parse and sema for OpenMP distribute directive and all its clauses excluding dist_schedule.
llvm-svn: 255001
2015-12-08 04:21:03 +00:00
Alexey Bataev 1fd4aed26b [OPENMP 4.5] parsing/sema support for 'grainsize' clause.
OpenMP 4.5 adds 'taksloop' and 'taskloop simd' directives, which have 'grainsize' clause. Patch adds parsing/sema analysis of this clause.

llvm-svn: 254903
2015-12-07 12:52:51 +00:00
Alexey Bataev b825de17b7 [OPENMP 4.5] parsing/sema support for 'nogroup' clause.
OpenMP 4.5 adds 'taskloop' and 'taskloop simd' directives. These directives have new 'nogroup' clause. Patch adds basic parsing/sema support for this clause.

llvm-svn: 254899
2015-12-07 10:51:44 +00:00
Dan Gohman 4b971e4463 [WebAssembly] Remove an obsolete TODO comment.
llvm-svn: 254817
2015-12-05 01:36:31 +00:00
Alexey Bataev 0a6ed84a0d [OPENMP 4.5] Parsing/sema support for 'omp taskloop simd' directive.
OpenMP 4.5 adds directive 'taskloop simd'. Patch adds parsing/sema analysis for 'taskloop simd' directive and its clauses.

llvm-svn: 254597
2015-12-03 09:40:15 +00:00
Christof Douma ba13ad58f7 Teaches clang about Cortex-A35.
Adds support for the new Cortex-A35 ARMv8-A core.

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

llvm-svn: 254505
2015-12-02 12:03:42 +00:00
Alexey Bataev a056935a2f [OPENMP 4.5] Parsing/sema analysis for 'priority' clause.
OpenMP 4.5 defines new clause 'priority' for 'task', 'taskloop' and 'taskloop simd' directives. Added parsing and sema analysis for 'priority' clause in 'task' and 'taskloop' directives.

llvm-svn: 254398
2015-12-01 10:17:31 +00:00
Gabor Horvath fe2c0ff942 [analyzer] Fix IssueHash generation.
Differential Revision: http://reviews.llvm.org/D14919 

Original patch by: Gyorgy Orban!

llvm-svn: 254394
2015-12-01 09:00:41 +00:00
Alexey Bataev 49f6e78d71 [OPENMP 4.5] Parsing/sema analysis for 'taskloop' directive.
Adds initial parsing and semantic analysis for 'taskloop' directive.

llvm-svn: 254367
2015-12-01 04:18:41 +00:00
Craig Topper ac67c05a50 Use std::begin() and std::end() instead of doing the same manually. NFC
llvm-svn: 254281
2015-11-30 03:11:10 +00:00
Alexandros Lamprineas 502592c1d4 ARM v8.1a adds Advanced SIMD instructions for Rounding Double Multiply
Add/Subtract.

The following instructions are added to AArch32 instruction set:

- VQRDMLAH: Vector Saturating Rounding Doubling Multiply Accumulate
            Returning High Half
- VQRDMLSH: Vector Saturating Rounding Doubling Multiply Subtract
            Returning High Half

The following instructions are added to AArch64 instruction set:

- SQRDMLAH: Signed Saturating Rounding Doubling Multiply Accumulate
            Returning High Half
- SQRDMLSH: Signed Saturating Rounding Doubling Multiply Subtract
            Returning High Half

This patch adds intrinsic and ACLE macro support for these instructions,
as well as corresponding tests.

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

llvm-svn: 254250
2015-11-29 10:43:59 +00:00
Kelvin Li a15fb1a110 [OpenMP] Parsing and sema support for thread_limit clause.
http://reviews.llvm.org/D15029

llvm-svn: 254207
2015-11-27 18:47:36 +00:00
Craig Topper 5e35e669a5 [Diagnostics] Call setMapping on the correct diagnostic states in a few places. GetCurDiagState() was being used when it shouldn't be.
I spotted this by inspection in the for loop that wasn't using its iterator and was just acting on the current state repeatedly.

This appears to have been introduced as a copy and paste bug in r140763 over 4 years ago.

I have no idea how to test this. I just went back to the original commit and tried to use the variables it was using before that.

llvm-svn: 254134
2015-11-26 05:51:54 +00:00
Craig Topper a52e2b22e6 Use range-based for loops. NFC
llvm-svn: 254133
2015-11-26 05:10:07 +00:00
Richard Smith a8cfffa351 [modules] Refactor handling of -fmodules-embed-*. Track this properly rather
than reusing the "overridden buffer" mechanism. This will allow us to make
embedded files and overridden files behave differently in future.

llvm-svn: 254121
2015-11-26 02:04:16 +00:00
Alexey Bataev c99b04983b [X86] Support for C calling convention only for MCU target.
For MCU only C calling convention is allowed, all other calling conventions are not supported.
Differential Revision: http://reviews.llvm.org/D14864

llvm-svn: 254063
2015-11-25 09:24:26 +00:00
Kelvin Li 099bb8c65d [OpenMP] Parsing and sema support for num_teams clause
http://reviews.llvm.org/D14802

llvm-svn: 254019
2015-11-24 20:50:12 +00:00
Richard Smith 919ce23566 [modules] Add -cc1 flag -fmodules-embed-all-files.
This flag causes all files that were read by the compilation to be embedded
into a produced module file. This is useful for distributed build systems that
use an include scanning system to determine which files are "needed" by a
compilation, and only provide those files to remote compilation workers. Since
using a module can require any file that is part of that module (or anything it
transitively includes), files that are not found by an include scanner can be
required in a regular build using explicit modules. With this flag, only files
that are actually referenced by transitively-#included files are required to be
present on the build machine.

llvm-svn: 253950
2015-11-24 04:22:21 +00:00
Kelvin Li 0bff7afab5 [OpenMP] Parsing and sema support for map clause
http://reviews.llvm.org/D14134 

llvm-svn: 253849
2015-11-23 05:32:03 +00:00
Tom Stellard d097e94abb AMDGPU: Add support for 's' and 'v' asm constraints
Summary: 's' is used to specify sgprs and 'v' is used to specify vgprs.

Reviewers: arsenm, echristo

Subscribers: cfe-commits

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

llvm-svn: 253610
2015-11-19 22:11:58 +00:00
Akira Hatanaka 8c26ea663d Produce a better diagnostic for global register variables.
Currently, when there is a global register variable in a program that
is bound to an invalid register, clang/llvm prints an error message that
is not very user-friendly.

This commit improves the diagnostic and moves the check that used to be
in the backend to Sema. In addition, it makes changes to error out if
the size of the register doesn't match the declared variable size.

e.g., volatile register int B asm ("rbp");

rdar://problem/23084219

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

llvm-svn: 253405
2015-11-18 00:15:28 +00:00
Bradley Smith b350196d77 [ARM] Pass in the architecture to TargetParser to cope with API change
The TargetParser API to get the default FPU and default extensions has
changed so that it can fall back to the architecture in case of a
generic CPU.

llvm-svn: 253199
2015-11-16 11:16:36 +00:00
Artyom Skrobov ab2fab926f Cull non-standard variants of ARM architectures (NFC)
Summary: Clang-side update, corresponding to D14577

Reviewers: rengolin

Subscribers: aemerson, cfe-commits, rengolin

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

llvm-svn: 252904
2015-11-12 15:52:02 +00:00
Vedant Kumar 5eeeab7dcf [Basic] Fix DRY violation, just call getLineTable() (NFC)
llvm-svn: 252828
2015-11-12 00:11:19 +00:00
Aaron Ballman a9a728513c Silencing a -Wreturn-type warning for control reaching the end of a non-void function.
llvm-svn: 252727
2015-11-11 13:42:02 +00:00
Dan Gohman 6db4640b80 [WebAssembly] Change long double to be quadruple-precision floating point.
llvm-svn: 252646
2015-11-10 21:01:46 +00:00
Joerg Sonnenberger 4ecfa623e5 Add the variant of __sparc_v9__ with five underscores, not just four.
llvm-svn: 252640
2015-11-10 19:28:17 +00:00
Joerg Sonnenberger ec353d3fc6 Reorganise CPU handling for Sparc. When using -mcpu=v9 and co, __sparcv8
is not defined for 32bit mode, but __sparcv9 is. Pass down the correct
-target-cpu flags to the backend, so that instruction restrictions are
applied correctly. Pass down the correct -A flag when not using IAS.
The latter is limited to NetBSD targets in this commit.

llvm-svn: 252545
2015-11-09 23:39:45 +00:00
Mike Aizatsky aeb9dd92d5 Moving FileManager::removeDotPaths to llvm::sys::path::remove_dots
Differential Revision: http://reviews.llvm.org/D14394

llvm-svn: 252501
2015-11-09 19:12:18 +00:00
Andrey Bokhanko 94e1d5831b [x86] Additional small fix for MCU psABI support
This patch fixes one more thing in MCU psABI support: LongDoubleWidth should be set to 64.

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

llvm-svn: 252156
2015-11-05 12:43:09 +00:00
Richard Smith 8a308ec24d [modules] If we're given a module file, via -fmodule-file=, for a module, but
we can't load that file due to a configuration mismatch, and implicit module
building is disabled, and the user turns off the error-by-default warning for
that situation, then fall back to textual inclusion for the module rather than
giving an error if any of its headers are included.

llvm-svn: 252114
2015-11-05 00:54:55 +00:00
Andrey Bokhanko 158b8b898c [x86] Front-end part of MCU psABI support
This patch implements two things in front-end for MCU psABI support:

1) "long double type is the same as double."
2) "New predefined C/C++ pre-processor symbols: iamcu and iamcu__.

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

llvm-svn: 251786
2015-11-02 09:54:17 +00:00
Tim Northover 5627d3935a ARMv7k: implement ABI changes for watchOS from standard iOS.
llvm-svn: 251710
2015-10-30 16:30:45 +00:00
Tim Northover 756447a67c Watch and TV OS: wire up basic ABI choices
This sets the mostly expected Darwin default ABI options for these two
platforms. Active changes from these defaults for watchOS are in a later patch.

llvm-svn: 251708
2015-10-30 16:30:36 +00:00
Tim Northover 67465f80ec Preprocessor: define correct tvOS and watchOS version macros
llvm-svn: 251707
2015-10-30 16:30:30 +00:00
Reid Kleckner 11a17198e0 Fix the calling convention of Mingw64 long double values
GCC uses the x87DoubleExtended model for long doubles, and passes them
indirectly by address through function calls.

Also replace the existing mingw-long-double assembly emitting test with
an IR-level test.

llvm-svn: 251567
2015-10-28 22:29:52 +00:00
Rafael Espindola a9195877a5 Simplify boolean conditional return statements in lib/Basic.
Patch by Richard.

llvm-svn: 251214
2015-10-24 23:15:31 +00:00
Artyom Skrobov 05d85aee2e [ARM] Renaming +t2dsp feature into +dsp, as discussed on llvm-dev
llvm-svn: 251124
2015-10-23 17:19:02 +00:00
John McCall 460ce58fa6 Define weak and __weak to mean ARC-style weak references, even in MRC.
Previously, __weak was silently accepted and ignored in MRC mode.
That makes this a potentially source-breaking change that we have to
roll out cautiously.  Accordingly, for the time being, actual support
for __weak references in MRC is experimental, and the compiler will
reject attempts to actually form such references.  The intent is to
eventually enable the feature by default in all non-GC modes.
(It is, of course, incompatible with ObjC GC's interpretation of
__weak.)

If you like, you can enable this feature with
  -Xclang -fobjc-weak
but like any -Xclang option, this option may be removed at any point,
e.g. if/when it is eventually enabled by default.

This patch also enables the use of the ARC __unsafe_unretained qualifier
in MRC.  Unlike __weak, this is being enabled immediately.  Since
variables are essentially __unsafe_unretained by default in MRC,
the only practical uses are (1) communication and (2) changing the
default behavior of by-value block capture.

As an implementation matter, this means that the ObjC ownership
qualifiers may appear in any ObjC language mode, and so this patch
removes a number of checks for getLangOpts().ObjCAutoRefCount
that were guarding the processing of these qualifiers.  I don't
expect this to be a significant drain on performance; it may even
be faster to just check for these qualifiers directly on a type
(since it's probably in a register anyway) than to do N dependent
loads to grab the LangOptions.

rdar://9674298

llvm-svn: 251041
2015-10-22 18:38:17 +00:00
Richard Smith eb7927ee8f [coroutines] Add lexer support for co_await, co_yield, and co_return keywords.
Add -fcoroutines flag (just for -cc1 for now) to enable the feature. Early
indications are that this will be part of -std=c++1z.

llvm-svn: 250980
2015-10-22 03:52:15 +00:00
Craig Topper 8459aa8f97 Use StringRef instead of calling c_str and doing pointer math before eventually creating a StringRef. NFC
llvm-svn: 250902
2015-10-21 16:31:31 +00:00
Richard Barton 7dacc242d9 Fix __ARM_FP value for sp-only FPUs with Half-precision
The logic for parsing FP capabilities to set __ARM_FP was mistakenly removing
the Half-Precision capability when handling fp-only-sp resulting in a value
of 0x4. Section 6.5.1 of ACLE states that for such FP architectures the value
should be 0x6

llvm-svn: 250888
2015-10-21 10:03:55 +00:00
Craig Topper dd2b74ab21 Use range-based for loops. NFC.
llvm-svn: 250881
2015-10-21 04:52:40 +00:00
Craig Topper 335c8f9e59 Use std::find instead of a manual loop.
llvm-svn: 250880
2015-10-21 04:52:38 +00:00
Craig Topper 67288a9b75 Parse into an unsigned type instead of a signed type and then checking for positive and casting to unsigned. Since we know the string starts with a digit it couldn't be negative anyway. NFCI
llvm-svn: 250879
2015-10-21 04:52:36 +00:00
Craig Topper de330c78b3 Fix bad indentation.
llvm-svn: 250878
2015-10-21 04:52:34 +00:00
Craig Topper 55765ca54a Use ArrayRef and MutableArrayRef instead of a pointer and size. NFC
llvm-svn: 250876
2015-10-21 02:34:10 +00:00
Angel Garcia Gomez 637d1e6694 Roll-back r250822.
Summary: It breaks the build for the ASTMatchers

Subscribers: klimek, cfe-commits

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

llvm-svn: 250827
2015-10-20 13:23:58 +00:00
Angel Garcia Gomez b5250d3448 Apply modernize-use-default to clang.
Summary: Replace empty bodies of default constructors and destructors with '= default'.

Reviewers: bkramer, klimek

Subscribers: klimek, alexfh, cfe-commits

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

llvm-svn: 250822
2015-10-20 12:52:55 +00:00
Craig Topper d945d50efc [X86] Remove a few 'else' after 'return'
llvm-svn: 250764
2015-10-20 00:00:17 +00:00
Craig Topper 6c03a54444 Make getTargetBuiltins return an ArrayRef instead of having two out parameters of a pointer and length. NFC
llvm-svn: 250681
2015-10-19 04:51:35 +00:00
Craig Topper f054e3ad6d Recommit "Return an ArrayRef instead of having two out parameters of a pointer and length. NFC". Hopefully this time the bots will be happy.
llvm-svn: 250678
2015-10-19 03:52:27 +00:00
Craig Topper d255c00acd Revert r250676 "Return an ArrayRef instead of having two out parameters of a pointer and length. NFC"
llvm-svn: 250677
2015-10-19 03:17:00 +00:00
Craig Topper 9c4d9b2316 Return an ArrayRef instead of having two out parameters of a pointer and length. NFC
llvm-svn: 250676
2015-10-19 03:05:12 +00:00
Craig Topper 273dbc602f Make a bunch of static arrays const.
llvm-svn: 250647
2015-10-18 05:29:26 +00:00
Craig Topper e353a7257e Add an unnecessary makeArrayRef I add earlier. I didn't realize range-based for loops worked with arrays.
llvm-svn: 250646
2015-10-18 05:29:23 +00:00
Craig Topper 2685cbe056 Use std::is_sorted instead of a manual loop.
llvm-svn: 250645
2015-10-18 05:29:21 +00:00
Craig Topper 924f6db21d Replace a static compare function with a lambda. NFC
llvm-svn: 250621
2015-10-17 20:18:46 +00:00
Craig Topper c00e953cb2 Use a range-based for loop. Use std::end instead of pointer+array_lengthof. NFC
llvm-svn: 250617
2015-10-17 17:10:43 +00:00
Richard Barton 8c11bcf73a Further increase helfulness of assert message
If you increase the number of diags of a particular type by one more than the
number available you get the nice assert message. If you do it by two more
than available you get the old non-helpful message. Combining the two makes
sense I think.

llvm-svn: 250546
2015-10-16 20:15:29 +00:00
Craig Topper e33f51fa91 [X86] Add fxsr feature name for fxsave/fxrestore builtins.
llvm-svn: 250498
2015-10-16 06:22:36 +00:00
Ed Schouten ea9448e468 Add support for CloudABI/aarch64.
The core C library has already been ported over to aarch64 successfully,
meaning there is no reason to hold this change back.

llvm-svn: 250416
2015-10-15 15:07:07 +00:00
Craig Topper da9fe56bf6 [X86] Add command line switches for xsave/xsaveopt/xsavec/xsaves. Macro defines for the same. And add the flags to correct CPU names.
llvm-svn: 250368
2015-10-15 05:23:38 +00:00
Craig Topper 543f3bdf39 [X86] Use C+11 non-static data member initialization to initialize all the X86 feature controls. NFC
This simplifies the constructor initialization list and makes it less likely a feature flag will be forgotten there.

llvm-svn: 250348
2015-10-14 23:47:57 +00:00
Benjamin Kramer 71ce376b2f [VFS] Let the user decide if they want path normalization.
This is a more principled version of what I did earlier. Path
normalization is generally a good thing, but may break users in strange
environments, e. g. using lots of symlinks. Let the user choose and
default it to on.

This also changes adding a duplicated file into returning an error if
the file contents are different instead of an assertion failure.

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

llvm-svn: 250060
2015-10-12 16:16:39 +00:00
Benjamin Kramer 4ad1c43edd [VFS] Don't try to be heroic with '.' in paths.
Actually the only special path we have to handle is ./foo, the rest is
tricky to get right so do the same thing as the existing YAML vfs here.

llvm-svn: 250036
2015-10-12 13:30:38 +00:00
Benjamin Kramer c3741ec8d3 [VFS] remove handling of '..' for now.
This can fail badly if we're overlaying a real file system and there are
symlinks there. Just keep the path as-is for now.

This essentially reverts r249830.

llvm-svn: 250021
2015-10-12 09:22:07 +00:00
Eric Christopher b093d69062 Fix whitespace, 80-column violations, embedded tabs for the
TargetInfo class.

llvm-svn: 249872
2015-10-09 18:39:59 +00:00
Eric Christopher 8c47b427f9 constify the feature vector going into initFeatureMap as it shouldn't
change the set of features.

llvm-svn: 249871
2015-10-09 18:39:55 +00:00
Benjamin Kramer 49692eda7e [VFS] Rename RedirectingFS internals to avoid collisions with public clang classes
Hopefully fixes the MSVC build. NFC intended.

llvm-svn: 249832
2015-10-09 13:28:13 +00:00
Benjamin Kramer decb2aeab3 [VFS] Just normalize away .. and . in paths for in-memory file systems.
This simplifies the code and gets us support for .. for free.

llvm-svn: 249830
2015-10-09 13:03:22 +00:00
Evgeniy Stepanov 14deb7b65f Use Triple.isAndroid() where possible.
llvm-svn: 249751
2015-10-08 21:21:44 +00:00
Eric Christopher a7260af7e5 Handle sse turning on mmx, but no -mmx not turning off SSE.
Rationale :

// sse3
__m128d test_mm_addsub_pd(__m128d A, __m128d B) {
  return _mm_addsub_pd(A, B);
}

// mmx
void shift(__m64 a, __m64 b, int c) {
  _mm_slli_pi16(a, c);
  _mm_slli_pi32(a, c);
  _mm_slli_si64(a, c);
  _mm_srli_pi16(a, c);
  _mm_srli_pi32(a, c);
  _mm_srli_si64(a, c);
  _mm_srai_pi16(a, c);
  _mm_srai_pi32(a, c);
}

clang -msse3 -mno-mmx file.c -c

For this code we should be able to explicitly turn off MMX
without affecting the compilation of the SSE3 function and then
diagnose and error on compiling the MMX function.

This is a preparatory patch to the actual diagnosis code which is
coming in a future patch. This sets us up to have the correct information
where we need it and verifies that it's being emitted for the backend
to handle.

llvm-svn: 249733
2015-10-08 20:10:18 +00:00
Eric Christopher bbd746db9e Migrate most feature map inclusion to initFeatureMap for the x86 target so
that we can build up an accurate set of features rather than relying on
TargetInfo initialization via handleTargetFeatures to munge the list
of features.

llvm-svn: 249732
2015-10-08 20:10:14 +00:00
Renato Golin e84b000ccb Simplify DefaultCPU in ARMTargetInfo
Simplifying the convoluted CPU handling in ARMTargetInfo.

The default base CPU on ARM is ARM7TDMI, arch ARMv4T, and
ARMTargetInfo had a different one. This wasn't visible from
Clang because the driver selects the defaults and sets the
Arch/CPU features directly, but the constructor depended
on the CPU, which was never used.

This patch corrects the mistake and greatly simplifies
how CPU is dealt with (essentially by removing the duplicated
DefaultCPU field).

Tests updated.

llvm-svn: 249699
2015-10-08 16:43:26 +00:00
Benjamin Kramer d45b205ed1 [VFS] Port driver tool chains to VFS.
There are still some loose ends here but it's sufficient so we can detect
GCC headers that are inside of a VFS.

llvm-svn: 249556
2015-10-07 15:48:01 +00:00
Benjamin Kramer dadb58b466 [VFS] Refactor VFSFromYAML a bit.
- Rename it to RedirectingFileSystem. This is what it does, YAML is just a
  serialization format for it.
- Consistently use unique_ptr for memory management.

No functional change intended.

llvm-svn: 249532
2015-10-07 10:05:44 +00:00
Benjamin Kramer d5e0b58ef2 [VFS] Also drop '.' when adding files to an in-memory FS.
Otherwise we won't be able to find them later.

llvm-svn: 249525
2015-10-07 08:32:50 +00:00
Benjamin Kramer 1b8dbe3738 [VFS] Put the incoming name in the file status to make InMemoryFS behave more like a real FS.
llvm-svn: 249409
2015-10-06 14:45:16 +00:00
Benjamin Kramer 2e2351adce [VFS] Transition clang-format to use an in-memory FS.
Apart from being cleaner this also means that clang-format no longer has
access to the host file system. This isn't necessary because clang-format
never reads includes :)

Includes minor tweaks and bugfixes found in the VFS implementation while
running clang-format tests.

llvm-svn: 249385
2015-10-06 10:04:08 +00:00
Benjamin Kramer 737501c673 Remove duplicated default arguments. NFC.
llvm-svn: 249355
2015-10-05 21:20:19 +00:00
Benjamin Kramer d6bbee73ee [VFS] Fix the windows build by including the right headers.
llvm-svn: 249319
2015-10-05 14:06:36 +00:00
Benjamin Kramer 6b61805ebd [VFS] Fix compilation on systems where time_t is not int64_t.
No functional change intended.

llvm-svn: 249318
2015-10-05 14:02:15 +00:00
Benjamin Kramer 7708b2a4b6 [VFS] Add working directories to every virtual file system.
For RealFileSystem this is getcwd()/chdir(), the synthetic file systems can
make up one for themselves. OverlayFileSystem now synchronizes the working
directories when a new FS is added to the overlay or the overlay working
directory is set. This allows purely artificial file systems that have zero
ties to the underlying disks.

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

llvm-svn: 249316
2015-10-05 13:55:20 +00:00
Benjamin Kramer a25dcfd906 [VFS] Add an in-memory file system implementation.
This is a simple file system tree of memory buffers that can be filled by a
client. In conjunction with an OverlayFS it can be used to make virtual
files accessible right next to physical files. This can be used as a
replacement for the virtual file handling in FileManager and which I intend
to remove eventually.

llvm-svn: 249315
2015-10-05 13:55:14 +00:00
Benjamin Kramer 5532ef1a5d [VFS] Move class out of method so it looks less like Java.
No functionality change.

llvm-svn: 249314
2015-10-05 13:55:09 +00:00
Benjamin Kramer 268b51a188 [VFS] Remove setName from the file interface.
This streamlines the interface a bit and makes Status more immutable.
No functional change intended.

llvm-svn: 249310
2015-10-05 13:15:33 +00:00
Alexandros Lamprineas eda554a9b4 The Driver does not set the +strict-align flag when targeting
[ARM] armv6m + netbsd. Tests are misssing for armv6m + darwin as well.

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

llvm-svn: 249308
2015-10-05 12:45:10 +00:00
Daniel Sanders ff9525817b [mips][p5600] Add -mcpu=p5600 option.
Summary:

Reviewers: vkalintiris, atanasyan

Subscribers: cfe-commits

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

llvm-svn: 249306
2015-10-05 12:24:30 +00:00
Saleem Abdulrasool d170c4b57a Add -f[no-]declspec to control recognition of __declspec as a keyword
In versions of clang prior to r238238, __declspec was recognized as a keyword in
all modes.  It was then changed to only be enabled when Microsoft or Borland
extensions were enabled (and for CUDA, as a temporary measure).  There is a
desire to support __declspec in Playstation code, and possibly other
environments.  This commit adds a command-line switch to allow explicit
enabling/disabling of the recognition of __declspec as a keyword.  Recognition
is enabled by default in Microsoft, Borland, CUDA, and PS4 environments, and
disabled in all other environments.

Patch by Warren Ristow!

llvm-svn: 249279
2015-10-04 17:51:05 +00:00
Yaron Keren 8b563665c3 Replace double negation of !FileID.isInvalid() with FileID.isValid().
+couple more of double-negated !SourceLocation.isInvalid() unfixed in r249228.

llvm-svn: 249235
2015-10-03 10:46:20 +00:00
Yaron Keren ed1fe5d093 Replace double-negated !SourceLocation.isInvalid() with SourceLocation.isValid().
llvm-svn: 249228
2015-10-03 05:15:57 +00:00
Samuel Antao 4be30e92dc [OpenMP] Capture global variables in target regions.
All global variables that are not enclosed in a declare target region 
must be captured in the target region as local variables do. Currently, 
there is no support for declare target, so this patch adds support for 
capturing all the global variables used in a the target region.

llvm-svn: 249154
2015-10-02 17:14:03 +00:00
Alexandros Lamprineas f5a8e6c5ab Implement ACLE 2.0 macros of chapters 6.6 and 6.7 for [ARM] and [Aarch64] targets.
Differential Revision: http://reviews.llvm.org/D12633

llvm-svn: 249140
2015-10-02 14:56:37 +00:00
Hal Finkel a57b890a33 [PowerPC] Define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* macros on all PPC cores
We support all __sync_val_compare_and_swap_* builtins (only 64-bit on 64-bit
targets) on all cores, and should define the corresponding
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_* macros, just as GCC does. As it turns out,
this is really important because they're needed to prevent a bad ODR violation
with libstdc++'s std::shared_ptr (this is well explained in PR12730).

We were doing this only for P8, but this is necessary on all PPC systems.

llvm-svn: 249009
2015-10-01 13:39:49 +00:00
Artem Belevich 236cfdc4be [CUDA] 32-bit NVPTX should have 32-bit long type.
Currently it's 64-bit which will lead to mismatch between host and
device code if we compile for i386.

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

llvm-svn: 248753
2015-09-28 22:54:08 +00:00
Alexey Bataev d14d1e6f25 [OPENMP 4.1] Add 'simd' clause for 'ordered' directive.
Parsing and sema analysis for 'simd' clause in 'ordered' directive.
Description
If the simd clause is specified, the ordered regions encountered by any thread will use only a single SIMD lane to execute the ordered
regions in the order of the loop iterations.
Restrictions
An ordered construct with the simd clause is the only OpenMP construct that can appear in the simd region

llvm-svn: 248696
2015-09-28 06:39:35 +00:00