summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP 4.1] Initial support for extended 'ordered' clause.Alexey Bataev2015-07-307-54/+148
| | | | | | | | OpenMP 4.1 introduces optional argument '(n)' for 'ordered' clause, where 'n' is a number of loops that immediately follow the directive. 'n' must be constant positive integer expressions and it must be less or equal than the number of the loops in the resulting loop nest. Patch adds parsing and semantic analysis for this optional argument. llvm-svn: 243635
* Add a comment explaining differing Windows behavior.Sean Silva2015-07-301-1/+7
| | | | llvm-svn: 243625
* [X86][AVX512BW] Remove whitespaces Asaf Badouh2015-07-301-68/+53
| | | | llvm-svn: 243623
* Remove some noise "this->"s left behind by r243213.Richard Smith2015-07-301-38/+37
| | | | llvm-svn: 243614
* [modules] Remove redundant information written into DeclContext name lookup ↵Richard Smith2015-07-302-7/+6
| | | | | | tables. We don't need to store the data length twice. llvm-svn: 243612
* Attempt to make clang-x64-ninja-win7 happy.Sean Silva2015-07-301-6/+8
| | | | | | | It looks like we were somehow relying somewhere on removing 'foo/./bar' but *not* 'foo/../foo/bar'. Currently investigating. llvm-svn: 243600
* Avoid failure to canonicalize '..'.Sean Silva2015-07-301-8/+11
| | | | | | | | | | | | | | 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
* Fix -Wredundant-move warning.Richard Trieu2015-07-291-30/+3
| | | | | | | | | Without DR1579 implemented, the only case for -Wredundant-move is for a parameter being returned with the same type as the function return type. Also include a check to verify that the move constructor will be used by matching nodes in the AST dump. llvm-svn: 243594
* [modules] When performing redeclaration lookup for a using declaration, preferRichard Smith2015-07-291-26/+58
| | | | | | | | | | UsingShadowDecls over other declarations of the same entity in the lookup results. This ensures that we build correct redeclaration chains for the UsingShadowDecls (otherwise we could see assertions and other misbehavior in modules builds, when merging combines multiple redeclaration chains for the same entity from the same module into one chain). llvm-svn: 243592
* [SemaAccess] Provide meaningful message when we hit llvm_unreachable().Davide Italiano2015-07-291-1/+1
| | | | llvm-svn: 243571
* Use the AddAllArgs overload which accepts an ArrayRef of OptSpecifier.Douglas Katzman2015-07-291-46/+29
| | | | | | Differential Revision: http://reviews.llvm.org/D11599 llvm-svn: 243552
* Disable -Wpessimizing-move and -Wredundant-move in template instantiations.Richard Trieu2015-07-291-0/+3
| | | | | | | | | Dependent types can throw off the analysis for these warnings, possibly giving conflicting warnings and fix-its. Disabling the warning in template instantiations will prevent this problem, and will still catch the non-dependent cases in templates. llvm-svn: 243538
* In case of an existing GlobalVariable, the comdat is created using the name ↵Yaron Keren2015-07-291-3/+3
| | | | | | | | | | | | | of the new GV (usually NAME.1) instead of the correct NAME of the old GV. Moving comdat creation after GV replacement solves this. Patch + testcase. Reviewed by Reid Kleckner. http://reviews.llvm.org/D11594 llvm-svn: 243525
* [AArch64] Pass subtarget feature "+strict-align".Akira Hatanaka2015-07-291-9/+5
| | | | | | | | | | This commit changes the driver to save subtarget feature "+strict-align" to the IR instead of using backend option "aarch64-strict-align". This is needed for LTO. rdar://problem/21529937 llvm-svn: 243518
* Remove unnecessary variable.Yaron Keren2015-07-291-12/+8
| | | | llvm-svn: 243517
* [X86][AVX512BW] add convert i16 to i8 and unpack intrinsicsAsaf Badouh2015-07-291-0/+163
| | | | | | Differential Revision: http://reviews.llvm.org/D11564 llvm-svn: 243514
* [X86][AVX512BW] Replace attributes with __DEFAULT_FN_ATTRSAsaf Badouh2015-07-291-6/+6
| | | | llvm-svn: 243512
* [ARM] Pass subtarget feature "+strict-align".Akira Hatanaka2015-07-281-21/+36
| | | | | | | | | | | | | | This commit changes the driver to save subtarget feature "+strict-align" to the IR instead of using backend option "arm-strict-align". This is needed for LTO. Also, move the logic in ARM backend that was deciding whether strict alignment should be forced to the front-end. rdar://problem/21529937 http://reviews.llvm.org/D11472 llvm-svn: 243489
* Silence unused argument warning for --cuda-host-only.Artem Belevich2015-07-281-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D11575 llvm-svn: 243479
* --cuda-host-only should not disable linking phase.Artem Belevich2015-07-281-4/+2
| | | | | | | | | | | | Host-only cuda compilation does produce valid host object file and in some cases users do want to proceed on to the linking phase. The change removes special case that stopped compilation pipeline at the Assembly phase. Device-side compilation is still stopped early by the types::getCompilationPhases(). Differential Revision: http://reviews.llvm.org/D11573 llvm-svn: 243478
* Use an iterative method instead of recursion for printing macro backtraces.Richard Trieu2015-07-281-54/+63
| | | | | | | | | | | | Store the locations for a macro expansion in a vector, then iterate over them instead of using recursion. This simplifies the logic around the backtrace limit and gives easier access to the source locations. No functionality change. Patch by Zhengkai Wu. Differential Revision: http://reviews.llvm.org/D11542 llvm-svn: 243477
* Do not give a -Wredundant-move warning when removing the move will result in anRichard Trieu2015-07-281-1/+11
| | | | | | | | | error. If the object being moved has a move constructor and a deleted copy constructor, std::move is required, otherwise Clang will give a deleted constructor error. llvm-svn: 243463
* Add -femulated-tls flag to select the emulated TLS model.Chih-Hung Hsieh2015-07-283-0/+10
| | | | | | | | | This will be used for old targets like Android that do not support ELF TLS models. Differential Revision: http://reviews.llvm.org/D10524 llvm-svn: 243441
* [CodeGen] Simplify creation of shuffle masks.Benjamin Kramer2015-07-283-40/+11
| | | | | | No functional change intended. llvm-svn: 243439
* Getting rid of old iterator loopsPiotr Padlewski2015-07-282-15/+11
| | | | llvm-svn: 243431
* Do not force linebreaks when MaxEmptyLinesToKeep is 0.Manuel Klimek2015-07-281-1/+1
| | | | | | | | | | | | | | | | Previously we would format call( p); as call( p); with MaxEmptyLinesToKeep == 0. Now we format it as: call(p); llvm-svn: 243429
* [CodeGen] Clean up CGBuiltin a bit.Benjamin Kramer2015-07-281-272/+176
| | | | | | | | | | - Use cached LLVM types - Turn SmallVectors into Arrays/ArrayRef if the size is static - Use ConstantInt::get's implicit splatting for vector types No functionality change intended. llvm-svn: 243425
* RegParmMax must be 0 for AArch64, as the regparm function attribute is not ↵Kristof Beyls2015-07-281-1/+0
| | | | | | supported on AArch64. llvm-svn: 243417
* [AArch64] Implement __builtin_thread_pointerAdhemerval Zanella2015-07-281-0/+5
| | | | | | | This path add the aarch64 __builtin_thread_pointer support. It will be lowered to llvm.aarch64.thread.pointer. llvm-svn: 243413
* [X86][AVX512VL] add AVX512VL intrinsics 4 out of 4Asaf Badouh2015-07-281-0/+456
| | | | | | Differential Revision: http://reviews.llvm.org/D11526 llvm-svn: 243409
* [X86][AVX512VL] add AVX512VL intrinsics 3 out of 4Asaf Badouh2015-07-281-0/+655
| | | | | | http://reviews.llvm.org/D11526 llvm-svn: 243406
* [X86][AVX512VL] add AVX512VL intrinsics 2 out of 4Asaf Badouh2015-07-281-0/+699
| | | | | | http://reviews.llvm.org/D11526 llvm-svn: 243402
* Use TargetParser to parse -mhwdiv command line option in Driver.Alexandros Lamprineas2015-07-281-13/+2
| | | | | | Change-Id: I2ebc40f77af75ec6b43ce8364d6d5a1d29988bd6 Phabricator: http://reviews.llvm.org/D11501 llvm-svn: 243398
* [X86][AVX512VL] add AVX512VL intrinsics 1 out of 4Asaf Badouh2015-07-281-0/+816
| | | | | | http://reviews.llvm.org/D11526 llvm-svn: 243394
* [sema] Fix crash when typo-transforming an expression containing an ObjC ↵Argyrios Kyrtzidis2015-07-281-5/+4
| | | | | | | | super message expression. rdar://21427916 llvm-svn: 243387
* Make local function isWhitespaceExceptNL static instead of in anonymous ↵Yaron Keren2015-07-281-3/+1
| | | | | | | | namespace per the coding standard. Thanks Craig Tooper for noticing this. llvm-svn: 243381
* InstrProf: Fix a misuse of the FunctionDecl API when generating coverageJustin Bogner2015-07-281-1/+1
| | | | | | | | | | | This was calling FD->hasBody(), meaning "Does the function that this decl refers to have a body?", rather than FD->doesThisDeclarationHaveABody(), meaning "Is this decl a non-deleted definition?". We might want to consider renaming these APIs :/ llvm-svn: 243360
* [ARM] Implement -Wa,-mfpu and friends for assemblersRenato Golin2015-07-271-62/+115
| | | | | | | | | | | This patch allows Clang to pass on -Wa,-mfpu, -Wa,-mhwdiv and -Wa,-mcpu to the integrated assembler (via target-features), but -march is still not being passed, but validated. In case the command line has both -mxxx and -Wa,-mxxx, we warn that the naked one will not be used in assembler mode. llvm-svn: 243353
* [ARM] Changes to Arch/CPU handling to help with -Wa,-mfpu etc. (nfc)Renato Golin2015-07-273-43/+87
| | | | | | | | | | | | To be able to handle -Wa, options in the assembler (ClangAs), we need to make the handling of options based on the value of the options, not direct Arguments from the list, since the list is immutable. No functional change in this patch, but this allows validating of -Wa,-mfpu and friends in the same way we validate -mfpu and friends, *just* for the assembler. llvm-svn: 243352
* [sema] Fix infinite loop when using a boolean value as designated initializer.Argyrios Kyrtzidis2015-07-271-8/+6
| | | | | | | For designated indices use the max array size type bitwidth, not the bitwidth of the index value itself. rdar://21942503 llvm-svn: 243343
* Use CGLoopInfo to emit metadata for loop hint pragmas.Tyler Nowicki2015-07-274-134/+143
| | | | | | | | When ‘#pragma clang loop vectorize(assume_safety)’ was specified on a loop other loop hints were lost. The problem is that CGLoopInfo attaches metadata differently than EmitCondBrHints in CGStmt. For do-loops CGLoopInfo attaches metadata to the br in the body block and for while and for loops, the inc block. EmitCondBrHints on the other hand always attaches data to the br in the cond block. When specifying assume_safety CGLoopInfo emits an empty llvm.loop metadata shadowing the metadata in the cond block. Loop transformations like rotate and unswitch would then eliminate the cond block and its non-empty metadata. This patch unifies both approaches for adding metadata and modifies the existing safety tests to include non-assume_safety loop hints. llvm-svn: 243315
* [AArch64] Unconditionally pass subtarget feature reserve-x18 on Darwin.Akira Hatanaka2015-07-271-3/+5
| | | | | | | After r243308, the front-end is responsible for checking the target OS and passing reserve-x18 if the target is Darwin. llvm-svn: 243310
* [X86] Add missing _m_prefetch intrinsicSimon Pilgrim2015-07-271-0/+6
| | | | | | | | | | | | The 3DNOW/PRFCHW cpu targets define both the PREFETCHW (set cache line modified) and PREFETCH (set cache line exclusive) instructions but only the _m_prefetchw (PREFETCHW) intrinsic is included in the header. This patch adds the missing _m_prefetch intrinsic. I'm basing this off AMD documentation - the intel docs on the support for PREFETCHW isn't clear whether Silvermont/Broadwell properly support PREFETCH but given that the intrinsic implementation is a default __builtin_prefetch call, it is safe whatever. Fix for PR23648 Differential Revision: http://reviews.llvm.org/D11338 llvm-svn: 243305
* Rename {Hexagon,NaCl}_TC to {Hexagon,NaCl}ToolChain respectively. NFCDouglas Katzman2015-07-274-93/+98
| | | | | | | | | Also rename XCore (the toolchain) to XCoreToolChain since XCore is also a namespace for its tools. Differential Revision: http://reviews.llvm.org/D10609 llvm-svn: 243279
* [OpenMP] Add capture for threadprivate variables used in copyin clauseSamuel Antao2015-07-272-7/+30
| | | | | | if TLS is enabled in OpenMP code generation. llvm-svn: 243277
* Analysis: Fix example usage comment in CFG.cpp. NFCJonathan Roelofs2015-07-271-1/+1
| | | | | | Patch by Vedant Kumar! llvm-svn: 243275
* Setting ARM dynamic linker name from commandlineRenato Golin2015-07-271-2/+4
| | | | | | | | | | Currently trigger to select hard-float linker is only based of -gnueabihf appearing in target triplet, but we should also select it when hardfloat is requested via cmdline. Patch by Khem Raj. llvm-svn: 243262
* [clang-cl] Handle -O correctlyDavid Majnemer2015-07-273-4/+120
| | | | | | | | | | | | | | | We had multiple bugs here: - We didn't support multiple optimization options in one argument. e.g. -O2y- - We didn't correctly expand -O[12dx] to their respective options. - We treated -O1 as clang -O1 instead of clang -Os. - We treated -Ox as clang -O3 instead of clang -O2. In fact, cl's -Ox option is *less* powerful than cl's -O2 option despite -Ox described as "Full Optimization". This fixes PR24003. llvm-svn: 243261
* Rename highly-confusing isWhitespace that returns false on \n toYaron Keren2015-07-271-17/+13
| | | | | | | | | isWhitespaceExceptNL. If that's wasn't bad enough, we have an identically named function in Basic/CharInfo.h. While at it, remove unnecessary includes, .str() calls and #ifdef. llvm-svn: 243260
* [modules] Add an assert for redeclarations that we never added to their redeclRichard Smith2015-07-275-53/+55
| | | | | | | | | | | | | | | chain and fix the cases where it fires. * Handle the __va_list_tag as a predefined decl. Previously we failed to merge sometimes it because it's not visible to name lookup. (In passing, remove redundant __va_list_tag typedefs that we were creating for some ABIs. These didn't affect the mangling or representation of the type.) * For Decls derived from Redeclarable that are not in fact redeclarable (implicit params, function params, ObjC type parameters), remove them from the list of expected redeclarable decls. llvm-svn: 243259
OpenPOWER on IntegriCloud