summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Test commitErik Pilkington2016-04-261-0/+1
| | | | llvm-svn: 267604
* Try to get at_file_missing.c passing after LLVM r267556.Nico Weber2016-04-261-2/+2
| | | | | | | | | | r267556 made backslashes escape the next character unconditionally in rsp files. This test echos a path into a rsp file, and paths contain backslashes on Windows. Since it's not important for this test to get the filename from the rsp file, just pass it regularly. llvm-svn: 267601
* [OpenCL] Add predefined macros.Yaxun Liu2016-04-265-14/+81
| | | | | | | | | | | | OpenCL spec requires __OPENCL_C_VERSION__ to be defined based on -cl-std option. This patch implements that. The patch also defines __FAST_RELAXED_MATH__ based on -cl-fast-relaxed-math option. Also fixed a test using -std=c99 for OpenCL program. Limit allowed language standard of OpenCL to be OpenCL standards. Differential Revision: http://reviews.llvm.org/D19071 llvm-svn: 267590
* [CMake] Use just-built clang and build iOS support when building stage2Chris Bieneman2016-04-261-0/+3
| | | | | | The Apple stage2 build should include compiler-rt iOS libraries and be built with the stage2 compiler. This matches Apple's production clang builds. llvm-svn: 267584
* [SPIR] Remove an assert mandating SPIR for OpenCL sources only.Anastasia Stulova2016-04-261-1/+0
| | | | | | | | | SPIR target can be used for C/C++ inputs too (i.e. in OpenCL compatible mode for the libs creation). Patch by Neil Henning! Review: http://reviews.llvm.org/D19478 llvm-svn: 267561
* [OpenMP] Improve mappable expressions Sema.Samuel Antao2016-04-265-168/+817
| | | | | | | | | | | | | | | Summary: This patch adds logic to save the components of mappable expressions in the clause that uses it, so that they don't have to be recomputed during codegen. Given that the mappable components are (will be) used in several clauses a new geneneric implementation `OMPMappableExprListClause` is used that extends the existing `OMPVarListClause`. This patch does not add new tests. The goal is to preserve the existing functionality while storing more info in the clauses. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, caomhin Differential Revision: http://reviews.llvm.org/D19382 llvm-svn: 267560
* Update test after LLVM r267556.Nico Weber2016-04-262-3/+4
| | | | llvm-svn: 267557
* [MSVC] PR27337: allow static_cast from private base to derived for WTLDmitry Polukhin2016-04-263-4/+48
| | | | | | | | | MSVC doesn't report even warning for cast from private base class to derived. Differential Revision: http://reviews.llvm.org/D19477 llvm-svn: 267534
* trying to fix the windows build broken by r267496Kostya Serebryany2016-04-261-1/+1
| | | | llvm-svn: 267513
* CGOpenMPRuntime.h: Prune '\param IfCond' in r267395. [-Wdocumentation]NAKAMURA Takumi2016-04-261-2/+0
| | | | llvm-svn: 267503
* [Docs] Fix indentation error introduced by r267447.George Burgess IV2016-04-261-7/+7
| | | | llvm-svn: 267501
* [lanai] Update handling of structs in arguments to be passed in registers.Jacques Pienaar2016-04-262-12/+64
| | | | | | Previously aggregate types were passed byval, change the ABI to pass these in registers instead. llvm-svn: 267496
* driver: Add a `--rsp-quoting` flag to pick response file quoting.Nico Weber2016-04-255-6/+64
| | | | | | | | | | | | | | | | | | | | Currently, clang-cl always uses Windows style for unquoting, and clang always uses POSIX style for unquoting. With this flag, it's possible to change these defaults. In general, response file quoting should match the shell the response file is used in. On Windows, it's possible to run clang-cl in a bash shell, or clang in cmd.exe, so a flag for overriding the default behavior is natural there. On non-Windows, Windows quoting probably never makes sense (except maybe in Wine), but having clang-cl behave differently based on the host OS seems strange too. So require that people who want to use posix-style response files with clang-cl on non-Windows pass --rsp-quoting=posix. http://reviews.llvm.org/D19425 llvm-svn: 267474
* Module Debugging: Fix the condition for determining whether a templateAdrian Prantl2016-04-254-21/+138
| | | | | | | | | | | | | | | | | | instantiation is in a module. This patch fixes the condition for determining whether the debug info for a template instantiation will exist in an imported clang module by: - checking whether the ClassTemplateSpecializationDecl is complete and - checking that the instantiation was in a module by looking at the first field. I also added a negative check to make sure that a typedef to a forward-declared template (with the definition outside of the module) is handled correctly. http://reviews.llvm.org/D19443 rdar://problem/25553724 llvm-svn: 267464
* Implement support for conditional between xvalues of reference-compatibleRichard Smith2016-04-252-9/+22
| | | | | | types. Patch by Erik Pilkington! llvm-svn: 267454
* Refactor traversal of bases in deduction of template parameters from baseRichard Smith2016-04-252-51/+35
| | | | | | | classes of an argument to use CXXRecordDecl::forallBases. Fix forallBases to only visit each base class once. llvm-svn: 267453
* [Docs] Clarify what the object-size sanitizer does.George Burgess IV2016-04-251-5/+8
| | | | | | | | | | Currently, the UBSan docs make it sound like the object-size sanitizer will only detect out-of-bounds reads/writes. It also catches some operations that don't necessarily access memory (invalid downcasts, calls of methods on invalid pointers, ...). This patch adds a note about this behavior in the docs. llvm-svn: 267447
* When deducing template parameters from base classes of an argument type, don'tRichard Smith2016-04-252-76/+97
| | | | | | | preserve any deduced types from a failed deduction to a subsequent attempt at deduction. Patch by Erik Pilkington! llvm-svn: 267444
* [Clang][Builtin][AVX512]Adding k-register logic intrinsics KAND, KANDN, KOR, ↵Michael Zuckerman2016-04-253-0/+104
| | | | | | | | KORTEST, KXNOR, KXOR, KUNPACK instruction set. Differential Revision: http://reviews.llvm.org/D19466 llvm-svn: 267425
* Added Fixer implementation and fix() interface in clang-format for removing ↵Eric Liu2016-04-259-258/+835
| | | | | | | | | | | | | | | | | redundant code. Summary: After applying replacements, redundant code like extra commas or empty namespaces might be introduced. Fixer can detect and remove any redundant code introduced by replacements. The current implementation only handles redundant commas. Reviewers: djasper, klimek Subscribers: ioeric, mprobst, klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D18551 llvm-svn: 267416
* [Clang][Builtin][AVX512]Adding intrinsics for vfpclass{sd|ss} ↵Michael Zuckerman2016-04-255-0/+187
| | | | | | | | vfpclass{pd|ps} instruction set Differential Revision: http://reviews.llvm.org/D19476 llvm-svn: 267414
* [analyzer] Let TK_PreserveContents span across the whole base region.Artem Dergachev2016-04-254-2/+68
| | | | | | | | | | | | If an address of a field is passed through a const pointer, the whole structure's base region should receive the TK_PreserveContents trait and avoid invalidation. Additionally, include a few FIXME tests shown up during testing. Differential Revision: http://reviews.llvm.org/D19057 llvm-svn: 267413
* [Clang][AVX512][BUILTIN] Adding intrinsics for ↵Michael Zuckerman2016-04-254-0/+263
| | | | | | | | VSCATTERPF{1|0}{DPS|QPS|DPD|QPD} instruction set Differential Revision: http://reviews.llvm.org/D19313 llvm-svn: 267398
* [OPENMP 4.5] Codegen for 'taskloop' directive.Alexey Bataev2016-04-256-77/+748
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The taskloop construct specifies that the iterations of one or more associated loops will be executed in parallel using OpenMP tasks. The iterations are distributed across tasks created by the construct and scheduled to be executed. The next code will be generated for the taskloop directive: #pragma omp taskloop num_tasks(N) lastprivate(j) for( i=0; i<N*GRAIN*STRIDE-1; i+=STRIDE ) { int th = omp_get_thread_num(); #pragma omp atomic counter++; #pragma omp atomic th_counter[th]++; j = i; } Generated code: task = __kmpc_omp_task_alloc(NULL,gtid,1,sizeof(struct task),sizeof(struct shar),&task_entry); psh = task->shareds; psh->pth_counter = &th_counter; psh->pcounter = &counter; psh->pj = &j; task->lb = 0; task->ub = N*GRAIN*STRIDE-2; task->st = STRIDE; __kmpc_taskloop( NULL, // location gtid, // gtid task, // task structure 1, // if clause value &task->lb, // lower bound &task->ub, // upper bound STRIDE, // loop increment 0, // 1 if nogroup specified 2, // schedule type: 0-none, 1-grainsize, 2-num_tasks N, // schedule value (ignored for type 0) (void*)&__task_dup_entry // tasks duplication routine ); llvm-svn: 267395
* [Clang][AVX512][BuiltIn] Adding support to intrinsics of VPERMD and VPERMW ↵Michael Zuckerman2016-04-2513-1/+802
| | | | | | | | instruction set Differential Revision: http://reviews.llvm.org/D19195 llvm-svn: 267380
* Debug info: Apply an empty debug location for global OpenMP destructors.Adrian Prantl2016-04-242-2/+5
| | | | | | | | | | | | LLVM really wants a debug location on every inlinable call in a function with debug info, because it otherwise cannot set up inlining debug info. This change applies an artificial line 0 debug location (which is how DWARF marks automatically generated code that has no corresponding source code) to the .__kmpc_global_dtor_. functions to avoid the LLVM Verifier complaining. llvm-svn: 267369
* clang-format: [JS] generator and async functions.Martin Probst2016-04-245-11/+69
| | | | | | | | | | | | | | | For generators, see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_generators async functions are not quite in the spec yet, but stage 3 and already widely used: http://tc39.github.io/ecmascript-asyncawait/ Reviewers: djasper Subscribers: klimek Differential Revision: http://reviews.llvm.org/D19204 llvm-svn: 267368
* Improve diagnostic checking for va_start to also warn on other instances of ↵Aaron Ballman2016-04-246-19/+44
| | | | | | | | undefined behavior, such as a parameter declared with the register keyword in C, or a parameter of a type that undergoes default argument promotion. This helps cover some more of the CERT secure coding rule EXP58-CPP. Pass an object of the correct type to va_start (https://www.securecoding.cert.org/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start). llvm-svn: 267338
* Make thinlto clang test more robust against LLVM changes.Mehdi Amini2016-04-241-7/+2
| | | | | | | | We should just test the effect of the clang level option here, i.e. that a summary is correctly emitted with -flto=thin From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 267321
* Fix a couple assertions that can never fire because the condition ANDed with ↵Craig Topper2016-04-242-2/+2
| | | | | | the string is just true or 1. llvm-svn: 267313
* DebugInfo: DIGlobalVariables became 'distinct' in LLVM r267301Duncan P. N. Exon Smith2016-04-232-6/+6
| | | | | | Update testcases due to DIBuilder change. llvm-svn: 267302
* DebugInfo: Adapt to loss of DITypeRef in LLVM r267296Duncan P. N. Exon Smith2016-04-2325-310/+310
| | | | | | | | | | | | | LLVM stopped using MDString-based type references, and DIBuilder no longer fills 'retainedTypes:' with every DICompositeType that has an 'identifier:' field. There are just minor changes to keep the same behaviour in CFE. Leaving 'retainedTypes:' unfilled has a dramatic impact on the output order of the IR though. There are a huge number of testcase changes, which were unfortunately not really scriptable. llvm-svn: 267297
* [profile] Fix another use of the driver.Sean Silva2016-04-231-1/+1
| | | | | | Follow-on to r267262. llvm-svn: 267263
* [profile] Use cc1 in these tests instead of the driver.Sean Silva2016-04-235-9/+9
| | | | | | | I ran into this when seeing what tests would break if we make a driver-level decision about whether FEPGO or IRPGO is the default. llvm-svn: 267262
* Revert the bool portion of r267054Richard Trieu2016-04-226-59/+18
| | | | | | | Remove the floating point to bool conversion warnings. Some of these conversions will be caught by -Wliteral-conversion and -Wfloat-conversion llvm-svn: 267234
* PGO] PGOFuncName meta data if PGOFuncName is different from function's raw nameRong Xu2016-04-221-0/+2
| | | | | | | | | | Write out the PGOFuncName meta data if PGOFuncName is different from function's raw name. This should only apply to internal linkage functions. This is to be consumed by indirect-call promotion when called in LTO optimization pass. Differential Revision: http://reviews.llvm.org/D18624 llvm-svn: 267224
* Fix a bug involving deferred decl emission and PCHReid Kleckner2016-04-223-2/+36
| | | | | | | | | | | | | | | | For various reasons, involving dllexport and class linkage compuations, we have to wait until after the semicolon after a class declaration to emit inline methods. These are "deferred" decls. Before this change, finishing the tag decl would trigger us to deserialize some PCH so that we could make a "pretty" IR-level type. Deserializing the PCH triggered calls to HandleTopLevelDecl, which, when done, checked the deferred decl list, and emitted some dllexported decls that weren't ready. Avoid this re-entrancy. Deferred decls should not get emitted when a tag is finished, they should only be emitted after a real top level decl in the main file. llvm-svn: 267186
* [Hexagon] Add definitions for circular and bit-reverse loads/storesKrzysztof Parzyszek2016-04-222-1/+68
| | | | llvm-svn: 267159
* [clang][AVX512][Builtin] adding intrinsics for vf{n}madd{ss|sd} and ↵Michael Zuckerman2016-04-223-0/+724
| | | | | | | | vf{n}sub{ss|sd} instruction set Differential Revision: http://reviews.llvm.org/D19320 llvm-svn: 267135
* [Clang][AVX512][BUILTIN] Adding scalar intrinsics for rsqrt14 ,rcp14, getexp ↵Michael Zuckerman2016-04-222-2/+359
| | | | | | | | and getmant instruction set Differential Revision: http://reviews.llvm.org/D19326 llvm-svn: 267129
* [OPENMP] Fix for PR27463: Privatizing struct fields with array typeAlexey Bataev2016-04-222-9/+18
| | | | | | | | | | causes code generation failure. The codegen part of firstprivate clause for member decls used type of original variable without skipping reference type from OMPCapturedExprDecl. Patch fixes this problem. llvm-svn: 267125
* [index] Add SymbolSubKinds for ObjC IB annotations.Argyrios Kyrtzidis2016-04-223-1/+32
| | | | llvm-svn: 267118
* [index] Add a SymbolSubKind for an ObjC unit test.Argyrios Kyrtzidis2016-04-224-3/+75
| | | | llvm-svn: 267117
* [index] Change SymbolCXXTemplateKind to a 'SymbolSubKinds' bitset.Argyrios Kyrtzidis2016-04-224-39/+63
| | | | | | This provides a more general and flexible way to annotate special symbols. llvm-svn: 267116
* [OPENMP] Fix for LCV in simd directives in explicit clauses.Alexey Bataev2016-04-227-123/+375
| | | | | | | | If loop control variable for simd-based directives is explicitly marked as linear/lastprivate in clauses, codegen for such construct would crash. Patch fixes this problem. llvm-svn: 267101
* Try to get test passing on OS X (see comment at top of file).Nico Weber2016-04-221-2/+2
| | | | llvm-svn: 267089
* [CUDA] removed unneeded __nvvm_reflect_anchor()Artem Belevich2016-04-211-10/+0
| | | | | | | | | Since r265060 LLVM infers correct __nvvm_reflect attributes, so explicit declaration of __nvvm_reflect() is no longer needed. Differential Revision: http://reviews.llvm.org/D19074 llvm-svn: 267062
* [esan] EfficiencySanitizer driver flagsDerek Bruening2016-04-2112-1/+109
| | | | | | | | | | | | | | | | Summary: Adds a framework to enable the instrumentation pass for the new EfficiencySanitizer ("esan") family of tools. Adds a flag for esan's cache fragmentation tool via -fsanitize=efficiency-cache-frag. Adds appropriate tests for the new flag. Reviewers: eugenis, vitalybuka, aizatsky, filcab Subscribers: filcab, kubabrecka, llvm-commits, zhaoqin, kcc Differential Revision: http://reviews.llvm.org/D19169 llvm-svn: 267059
* Split interesting warnings off from -Wfloat-conversionRichard Trieu2016-04-218-46/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restructure the implict floating point to integer conversions so that interesting sub-groups are under different flags. Breakdown of warnings: No warning: Exact conversions from floating point to integer: int x = 10.0; int x = 1e10; -Wliteral-conversion - Floating point literal to integer with rounding: int x = 5.5; int x = -3.4; -Wfloat-conversion - All conversions not covered by the above two: int x = GetFloat(); int x = 5.5 + 3.5; -Wfloat-zero-conversion - The expression converted has a non-zero floating point value that gets converted to a zero integer value, excluded the cases falling under -Wliteral-conversion. Subset of -Wfloat-conversion. int x = 1.0 / 2.0; -Wfloat-overflow-conversion - The floating point value is outside the range of the integer type, exluding cases from -Wliteral conversion. Subset of -Wfloat-conversion. char x = 500; char x = -1000; -Wfloat-bool-conversion - Any conversion of a floating point type to bool. Subset of -Wfloat-conversion. if (GetFloat()) {} bool x = 5.0; -Wfloat-bool-constant-conversion - Conversion of a compile time evaluatable floating point value to bool. Subset of -Wfloat-bool-conversion. bool x = 1.0; bool x = 4.0 / 20.0; Also add EvaluateAsFloat to Sema, which is similar to EvaluateAsInt, but for floating point values. llvm-svn: 267054
* clang-cl: Don't assert on using /Yc with non-source files, PR27450Nico Weber2016-04-212-20/+35
| | | | | | Move phase handling after input type validation. llvm-svn: 267040
OpenPOWER on IntegriCloud