summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* [PPC64] Add vector pack/unpack support from ISA 2.07Bill Schmidt2015-05-162-2/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the following new instructions in the Power ISA 2.07: vpksdss vpksdus vpkudus vpkudum vupkhsw vupklsw These instructions are available through the vec_packs, vec_packsu, vec_unpackh, and vec_unpackl built-in interfaces. These are lane-sensitive instructions, so the built-ins have different implementations for big- and little-endian, and the instructions must be marked as killing the vector swap optimization for now. The first three instructions perform saturating pack operations. The fourth performs a modulo pack operation, which means it can be represented with a vector shuffle, and conversely the appropriate vector shuffles may cause this instruction to be generated. The other instructions are only generated via built-in support for now. I noticed during patch preparation that the macro __VSX__ was not previously predefined when the power8-vector or direct-move features are requested. This is an error, and I've corrected that here as well. Appropriate tests have been added. There is a companion patch to llvm for the rest of this support. llvm-svn: 237500
* clang/test/SemaCXX/attr-no-sanitize.cpp: Don't mix stdout and stderr for ↵NAKAMURA Takumi2015-05-161-2/+2
| | | | | | | | FileCheck. MSVCRT's stdio doesn't do line buffering. llvm-svn: 237492
* Reverse the order of types in the reference dropping qualifiers error.Richard Trieu2015-05-156-13/+13
| | | | | | | | The error has the form ... 'int' ... 'const int' ... dropped qualifiers. At first glance, it appears that the const qualifier is added. Reverse the types so that the second type is less qualified than the first. llvm-svn: 237482
* [modules] Add local submodule visibility support for declarations.Richard Smith2015-05-157-2/+28
| | | | | | | | | | | | With this change, enabling -fmodules-local-submodule-visibility results in name visibility rules being applied to submodules of the current module in addition to imported modules (that is, names no longer "leak" between submodules of the same top-level module). This also makes it much safer to textually include a non-modular library into a module: each submodule that textually includes that library will get its own "copy" of that library, and so the library becomes visible no matter which including submodule you import. llvm-svn: 237473
* Implement no_sanitize attribute.Peter Collingbourne2015-05-155-13/+111
| | | | | | Differential Revision: http://reviews.llvm.org/D9631 llvm-svn: 237463
* Limit set of types instantiated in FindInstantiatedDecl.Serge Pavlov2015-05-151-0/+37
| | | | | | | | Starting from r236426 FindInstantiatedDecl may instantiate types that are referenced before definition. This change limit the set of types that can be instantiated by this function. llvm-svn: 237434
* [OPENMP] Fixed bug in atomic update/capture/write constructs.Alexey Bataev2015-05-156-668/+382
| | | | | | Fixed a bug with codegen for destination atomic l-value with padding and junk in this padding bytes. llvm-svn: 237422
* Revert r237385, "[CodeGen] Reuse stack space from unused function results"NAKAMURA Takumi2015-05-151-125/+0
| | | | | | It broke clang stage2, at least tblgen. llvm-svn: 237418
* Add flag to enable native half typePirama Arumuga Nainar2015-05-141-36/+139
| | | | | | | | | | | | | | | | | | | Summary: r235215 enables support in LLVM for legalizing f16 type in the IR. AArch64 already had support for this. r235215 and some backend patches brought support for ARM, X86, X86-64, Mips and Mips64. This change exposes the LangOption 'NativeHalfType' in the command line, so the backend legalization can be used if desired. NativeHalfType is enabled for OpenCL (current behavior) or if '-fnative-half-type' is set. Reviewers: olista01, steven_wu, ab Subscribers: cfe-commits, srhines, aemerson Differential Revision: http://reviews.llvm.org/D9781 llvm-svn: 237406
* InstrProf: Only disable coverage in built-in macros, not all system macrosJustin Bogner2015-05-141-0/+24
| | | | | | | | | The issue I was trying to solve in r236547 was about built-in macros, but I disabled coverage in all system macros. This is actually a bit of overkill, and makes the display of coverage around system macros degrade unnecessarily. Instead, limit this to builtins specifically. llvm-svn: 237397
* Tweak availability checking to look through typedef declarations.Ted Kremenek2015-05-141-0/+16
| | | | llvm-svn: 237396
* Revert "Detect uses of mismatching forms of 'new' and 'delete'"Diego Novillo2015-05-146-317/+30
| | | | | | | | | This reverts commit 742dc9b6c9686ab52860b7da39c3a126d8a97fbc. This is generating multiple segfaults in our internal builds. Test case coming up shortly. llvm-svn: 237391
* Testing for the fix for bug 23429.Nemanja Ivanovic2015-05-141-0/+13
| | | | | | | | | Follow-up to commit for revision 236848. Just a test case for the macro definition under the right CPU/Arch. One combination was actually missed in the initial fix: - powerpc64-unknown-unknown -mcpu=pwr8 (rather than -mcpu=power8). llvm-svn: 237386
* [CodeGen] Reuse stack space from unused function resultsSergey Dmitrouk2015-05-141-0/+125
| | | | | | | | | | | | | | | | | | | | Summary: Space on stack allocated for unused structures returned by functions was unused even when it's lifetime didn't intersect with lifetime of any other objects that could use the same space. The test added also checks for named and auto objects. It seems to make sense to have this all in one place. Reviewers: aadg, rsmith, rjmccall, rnk Reviewed By: rnk Subscribers: asl, cfe-commits Differential Revision: http://reviews.llvm.org/D9743 llvm-svn: 237385
* DR295: cv-qualifiers on function types are ignored in C++.Richard Smith2015-05-141-5/+10
| | | | llvm-svn: 237383
* Update cxx_dr_status to latest issues list.Richard Smith2015-05-141-1/+1
| | | | llvm-svn: 237382
* Detect uses of mismatching forms of 'new' and 'delete'Ismail Pazarbasi2015-05-146-30/+317
| | | | | | | | | | | | | Emit warning when operand to `delete` is allocated with `new[]` or operand to `delete[]` is allocated with `new`. Reviewers: rtrieu, jordan_rose, rsmith Subscribers: majnemer, cfe-commits Differential Revision: http://reviews.llvm.org/D4661 llvm-svn: 237368
* Factor out SmallDataThresholdIkhlas Ajbar2015-05-142-15/+1
| | | | | | This patch factors out SmallDataThreshold code. llvm-svn: 237364
* [ARM] Add v8.1a architectureVladimir Sukharev2015-05-142-0/+38
| | | | | | | | | | | | | | Add support for ARMv8.1a architecture. Briefly it is described on http://community.arm.com/groups/processors/blog/2014/12/02/the-armv8-a-architecture-and-its-ongoing-development Reviewers: jmolloy, rengolin Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8799 llvm-svn: 237349
* [AArch64 ACLE] Allow to define poly64_t as 'unsigned long long' on LLP64 system.Kevin Qin2015-05-141-0/+2
| | | | | | This fixes PR23414 as well. llvm-svn: 237348
* clang/test/Frontend/dependency-gen-escaping.c: Appease win32 hosts. ↵NAKAMURA Takumi2015-05-141-1/+1
| | | | | | | Investigating. FIXME: Do we really emit single \ or escaped \\ along the context with -fms-compatibility -MG? llvm-svn: 237347
* [MS ABI] Add support for /Zc:sizedDeallocDavid Majnemer2015-05-141-0/+6
| | | | llvm-svn: 237344
* Fix buildbotsDavid Majnemer2015-05-141-1/+1
| | | | llvm-svn: 237338
* [MS ABI] __declspec(thread) behaves like thread_local in MSVC 2015David Majnemer2015-05-141-2/+15
| | | | | | | MSVC 2015 changed __declspec(thread) to make it behave like C++11's thread_local keyword instead of acting similarly to __thread. llvm-svn: 237337
* [clang-cl] Add /Qvec and /Qvec- to control vectorizationDavid Majnemer2015-05-141-0/+6
| | | | llvm-svn: 237335
* clang/test/Frontend/dependency-gen-escaping.c: Tweak r237296, to let '/' and ↵NAKAMURA Takumi2015-05-141-3/+7
| | | | | | '\\' distinguishd, to unbreak "--host=linux --target=msvc". llvm-svn: 237333
* [modules] Fix a #include cycle when building a module for our builtin headers.Richard Smith2015-05-142-0/+14
| | | | | | | | | | xmmintrin.h includes emmintrin.h and vice versa if SSE2 is enabled. We break this cycle for a modules build, and instead make the xmmintrin.h module re-export the immintrin.h module. Also included is a fix for an assert in the serialization code if a module exports another module that was declared later in the same module map. llvm-svn: 237321
* Break \# in a depfile the same way as gcc.Paul Robinson2015-05-131-3/+4
| | | | | | | | Backslash followed by # in a filename should have both characters escaped, if you do it the way GNU Make wants. GCC doesn't, so we do it the way GCC does rather than the way GNU Make wants. llvm-svn: 237304
* Make GNUInline consistent with whether we use traditional GNU inline semantics.Peter Collingbourne2015-05-132-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we were setting LangOptions::GNUInline (which controls whether we use traditional GNU inline semantics) if the language did not have the C99 feature flag set. The trouble with this is that C++ family languages also do not have that flag set, so we ended up setting this flag in C++ modes (and working around it in a few places downstream by also checking CPlusPlus). The fix is to check whether the C89 flag is set for the target language, rather than whether the C99 flag is cleared. This also lets us remove most CPlusPlus checks. We continue to test CPlusPlus when deciding whether to pre-define the __GNUC_GNU_INLINE__ macro for consistency with GCC. There is a change in semantics in two other places where we weren't checking both CPlusPlus and GNUInline (FunctionDecl::doesDeclarationForceExternallyVisibleDefinition and FunctionDecl::isInlineDefinitionExternallyVisible), but this change seems to put us back into line with GCC's semantics (test case: test/CodeGen/inline.c). While at it, forbid -fgnu89-inline in C++ modes, as GCC doesn't support it, it didn't have any effect before, and supporting it just makes things more complicated. Differential Revision: http://reviews.llvm.org/D9333 llvm-svn: 237299
* Fix dependency file escaping.Paul Robinson2015-05-131-0/+8
| | | | | | | | | | | | | | When writing a dependency (.d) file, if space or # is immediately preceded by one or more backslashes, escape the backslashes as well as the space or # character. Otherwise leave backslash alone. This straddles the fence between BSD Make (which does no escaping at all, and does not support space or # in filespecs) and GNU Make (which does support escaping, but will fall back to the filespec as-written if the escaping doesn't match an existing file). Differential Revision: http://reviews.llvm.org/D9208 llvm-svn: 237296
* [OPENMP] Fixed codegen for firstprivate variables, also marked as lastprivate.Alexey Bataev2015-05-131-0/+38
| | | | | | In some rare cases shared copies of lastprivate/firstprivate variables were not updated after the loop directive. llvm-svn: 237243
* Have '__have_extension(cxx_variadic_templates)' return true for any C++ ↵Eric Fiselier2015-05-121-0/+5
| | | | | | standard. llvm-svn: 237202
* Add a new error for unexpected semi-colon before closing delimiter.Richard Trieu2015-05-122-3/+17
| | | | | | | | | Previously, if a semi-colon is unexpectedly added before a closing ')', ']' or '}', two errors and one note would emitted, and the parsing would get confused to which scope it was in. This change consumes the semi-colon, recovers parsing better, and emits only one error with a fix-it. llvm-svn: 237192
* InstrProf: Update name of compiler-rt routine for setting filenameJustin Bogner2015-05-121-2/+2
| | | | | | Patch by Teresa Johnson. llvm-svn: 237187
* Fixed double-free in case of module loading error.Artem Belevich2015-05-121-0/+5
| | | | | | | | | | | | | GetOutputStream() owns the stream it returns pointer to and the pointer should never be freed by us. When we fail to load and exit early, unique_ptr still holds the pointer and frees it which leads to compiler crash when CompilerInstance attempts to free it again. Added regression test for failed bitcode linking. Differential Revision: http://reviews.llvm.org/D9625 llvm-svn: 237159
* Changed renaming of local symbols by inserting a dot vefore the numeric suffixSunil Srivastava2015-05-1235-82/+82
| | | | | | | details in http://reviews.llvm.org/D9483 goes with llvm checkin r237150 llvm-svn: 237151
* [OPENMP] Allow using of threadprivate variables as loop-control variables in ↵Alexey Bataev2015-05-125-12/+6
| | | | | | lop based directives. llvm-svn: 237102
* [OPENMP] Fixed support for 'schedule' clause with non-constant chunk size.Alexey Bataev2015-05-121-1/+25
| | | | | | 'schedule' clause for combined directives requires additional processing. Special helper variable is generated, that is captured in the outlined parallel region for 'parallel for' region. This captured variable is used to store chunk expression from the 'schedule' clause in this 'parallel for' region. llvm-svn: 237100
* Driver: Fix a -Wshadow issue from r237091Justin Bogner2015-05-121-0/+8
| | | | | | | | | | The MachO toolchain has an isTargetIOSBased method, but it isn't virtual so it isn't very meaningful to call it. After thinking about this, I guess that putting this logic in the MachO class is a bit of a layering violation anyway. Do this more like how we handle AddLinkRuntimeLibArgs instead. llvm-svn: 237095
* Re-apply "Driver: Make profiling flags work with -nostdlib on Darwin"Justin Bogner2015-05-121-0/+25
| | | | | | | | This time without a stray "true" in an argument list. This reverts r237077, restoring r237074. llvm-svn: 237091
* Remove the code that pulled soft float attributes out of the featureEric Christopher2015-05-121-2/+3
| | | | | | | strings and remove the setting of TargetOptions::UseSoftFloat to match the code change in llvm r237079. llvm-svn: 237080
* Revert "Driver: Make profiling flags work with -nostdlib on Darwin"Justin Bogner2015-05-121-25/+0
| | | | | | This revert r237074. These tests are failing all over the place. llvm-svn: 237077
* Driver: Make profiling flags work with -nostdlib on DarwinJustin Bogner2015-05-121-0/+25
| | | | | | | | | | | | | Compiler-rt's Profiling library isn't part of the stdlib, so -nostdlib shouldn't prevent it from being linked. This makes Darwin behave like other toolchains, and link in the profile runtime irrespective of -nostdlib, since the resulting program can't be run unless you link this. I've also added a test to show that other toolchains already behave like this. llvm-svn: 237074
* Allow empty assembly string literal with -fno-gnu-inline-asmSteven Wu2015-05-121-0/+3
| | | | | | | | | Empty assembly string will not introduce assembly code in the output binary and it is often used as a trick in the header to disable optimizations. It doesn't conflict with the purpose of the option so it is allowed with -fno-gnu-inline-asm flag. llvm-svn: 237073
* PR20625: Instantiate static constexpr member function of a local struct in a ↵Richard Smith2015-05-111-0/+15
| | | | | | | | | | | | | | | function template earlier. This is necessary in order to allow the use of a constexpr member function, or a member function with deduced return type, of a local class within a surrounding instantiated function template specialization. Patch by Michael Park! This re-commits r236063, which was reverted in r236134, along with a fix for a delayed template parsing bug that was exposed by this change. llvm-svn: 237064
* Allow AsmLabel with -fno-gnu-inline-asmSteven Wu2015-05-111-0/+4
| | | | | | | | | | | | | | | | | | | Summary: AsmLabel is heavily used in system level and firmware to redirect function and access platform specific labels. They are also extensively used in system headers which makes this option unusable for many users. Since AsmLabel doesn't introduce any assembly code into the output binary, it shouldn't be considered as inline-asm. Reviewers: bob.wilson, rnk Reviewed By: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9679 llvm-svn: 237048
* [cuda] Fixed test case failure on s390xArtem Belevich2015-05-111-2/+2
| | | | llvm-svn: 237007
* Revert "Allow -target= and --target options"Richard Barton2015-05-111-6/+0
| | | | | | | | | After mailing list discussion on 11-13 March we would prefer to stick to a single spelling of the long option. This reverts commit 30035fe1a7c759c89ee62eb46efce6b3790fcc08. llvm-svn: 237003
* [Sparc] Add support for 'sparcel' to clang.Douglas Katzman2015-05-113-2/+50
| | | | | | Differential Revision: http://reviews.llvm.org/D8784 llvm-svn: 237001
* Disable __has_cpp_attribute when not compiling in C++ mode. As this feature ↵Aaron Ballman2015-05-111-1/+4
| | | | | | | | test macro only supports C++ style attributes, it doesn't apply to code compiled as C code, and can lead to diagnostics when given a scoped attribute. This addresses PR23435. llvm-svn: 236996
OpenPOWER on IntegriCloud