summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[MS] Improved implementation of MS stack pragmas (vtordisp, *_seg)"Denis Zobnin2016-04-284-22/+36
| | | | | | This reverts commit r267866. llvm-svn: 267870
* PR27216: Only define __ARM_FEATURE_FMA when the target has VFPv4Silviu Baranga2016-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: According to the ACLE spec, "__ARM_FEATURE_FMA is defined to 1 if the hardware floating-point architecture supports fused floating-point multiply-accumulate". This changes clang's behaviour from emitting this macro for v7-A and v7-R cores to only emitting it when the target has VFPv4 (and therefore support for the floating point multiply-accumulate instruction). Fixes PR27216 Reviewers: t.p.northover, rengolin Subscribers: aemerson, rengolin, cfe-commits Differential Revision: http://reviews.llvm.org/D18963 llvm-svn: 267869
* [MS] Improved implementation of MS stack pragmas (vtordisp, *_seg)Denis Zobnin2016-04-284-36/+22
| | | | | | | | | | | Rework implementation of several MS pragmas that use internal stack: vtordisp, {bss|code|const|data}_seg. This patch: 1. Makes #pragma vtordisp use PragmaStack class as *_seg pragmas do; 2. Fixes "#pragma vtordisp()" behavior: it shouldn't affect stack; 3. Saves/restores the stacks on enter/exit a C++ method body. llvm-svn: 267866
* Revert "[MSVC] PR27337: allow static_cast from private base to derived for WTL"Dmitry Polukhin2016-04-281-5/+4
| | | | | | This reverts commit r267534. llvm-svn: 267865
* [OPENMP] Simplified interface for codegen of tasks, NFC.Alexey Bataev2016-04-284-245/+144
| | | | | | | Reduced number of arguments in member functions of runtime support library for task-based directives. llvm-svn: 267863
* [OPENMP 4.5] Codegen for 'grainsize/num_tasks' clauses of 'taskloop'Alexey Bataev2016-04-283-15/+34
| | | | | | | | | | | | | | | | | | | | | | | directive. OpenMP 4.5 defines 'taskloop' directive and 2 additional clauses 'grainsize' and 'num_tasks' for this directive. Patch adds codegen for these clauses. These clauses are generated as arguments of the '__kmpc_taskloop' libcall and are encoded the following way: void __kmpc_taskloop(ident_t *loc, int gtid, kmp_task_t *task, int if_val, kmp_uint64 *lb, kmp_uint64 *ub, kmp_int64 st, int nogroup, int sched, kmp_uint64 grainsize, void *task_dup); If 'grainsize' is specified, 'sched' argument must be set to '1' and 'grainsize' argument must be set to the value of the 'grainsize' clause. If 'num_tasks' is specified, 'sched' argument must be set to '2' and 'grainsize' argument must be set to the value of the 'num_tasks' clause. It is possible because these 2 clauses are mutually exclusive and can't be used at the same time on the same directive. If none of these clauses is specified, 'sched' argument must be set to '0'. llvm-svn: 267862
* removed redundant '#'Eric Liu2016-04-281-1/+0
| | | | llvm-svn: 267860
* Addressed reviewer's post-submission comments from ↵Eric Liu2016-04-285-70/+61
| | | | | | | | | | | | | | http://reviews.llvm.org/D18551. Summary: Make SourceManager in Environment, WhitespaceManager, and FormatTokenAnalyzer etc constant members. Reviewers: djasper, klimek Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D19587 llvm-svn: 267859
* Addressed review's comments.Eric Liu2016-04-282-2/+4
| | | | llvm-svn: 267858
* CGOpenMPRuntime.h: Prune extra comma in \param. [-Wdocumentation]NAKAMURA Takumi2016-04-281-1/+1
| | | | llvm-svn: 267845
* [analyzer] Move Checkers.inc to clang/include/...Chih-Hung Hsieh2016-04-284-658/+2
| | | | | | | | Simplify sharing of Checkers.inc with other files like ClangTidy.cpp. Differential Revision: http://reviews.llvm.org/19393 llvm-svn: 267832
* Driver: only produce CFI -fvisibility= error when compiling.Peter Collingbourne2016-04-281-8/+10
| | | | | | | The -fvisibility= flag only affects compile jobs, so there's no need to error out because of it if we aren't compiling (e.g. if we are only linking). llvm-svn: 267824
* [OpenMP] Code generation for target exit data directiveSamuel Antao2016-04-273-12/+37
| | | | | | | | | | | | | | | Summary: This patch adds support for the target exit data directive code generation. Given that, apart from the employed runtime call, target exit data requires the same code generation pattern as target enter data, the OpenMP codegen entry point was renamed and reused for both. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, fraggamuffin, caomhin Differential Revision: http://reviews.llvm.org/D17369 llvm-svn: 267814
* [OpenMP] Code generation for target enter data directiveSamuel Antao2016-04-273-1/+90
| | | | | | | | | | | | Summary: This patch adds support for the target enter data directive code generation. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, fraggamuffin, caomhin Differential Revision: http://reviews.llvm.org/D17368 llvm-svn: 267812
* [OpenMP] Code generation for target data directiveSamuel Antao2016-04-273-140/+361
| | | | | | | | | | | | | | | Summary: This patch adds support for the target data directive code generation. Part of the already existent functionality related with data maps is moved to a new function so that it could be reused. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, fraggamuffin, caomhin Differential Revision: http://reviews.llvm.org/D17367 llvm-svn: 267811
* [OpenMP] Map clause codegeneration.Samuel Antao2016-04-272-87/+640
| | | | | | | | | | | | | | | Summary: Implement codegen for the map clause. All the new list items in 4.5 specification are supported. Fix bug in the generation of array sections that was exposed by some of the map clause tests: for pointer types the offsets have to be calculated from the pointee not the pointer. Reviewers: hfinkel, kkwli0, carlo.bertolli, arpith-jacob, ABataev Subscribers: ABataev, cfe-commits, caomhin, fraggamuffin Differential Revision: http://reviews.llvm.org/D16749 llvm-svn: 267808
* Remove unused LangOpts private variable in HeaderSearch.Samuel Antao2016-04-271-2/+1
| | | | | | Was causing warnings during the build. llvm-svn: 267805
* [modules] When diagnosing a missing module import, suggest adding a #include ifRichard Smith2016-04-274-12/+134
| | | | | | | the current language doesn't have an import syntax and we can figure out a suitable file to include. llvm-svn: 267802
* Rework interface for bitset-using features to use a notion of LTO visibility.Peter Collingbourne2016-04-279-77/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bitsets, and the compiler features they rely on (vtable opt, CFI), only have visibility within the LTO'd part of the linkage unit. Therefore, only enable these features for classes with hidden LTO visibility. This notion is based on object file visibility or (on Windows) dllimport/dllexport attributes. We provide the [[clang::lto_visibility_public]] attribute to override the compiler's LTO visibility inference in cases where the class is defined in the non-LTO'd part of the linkage unit, or where the ABI supports calling classes derived from abstract base classes with hidden visibility in other linkage units (e.g. COM on Windows). If the cross-DSO CFI mode is enabled, bitset checks are emitted even for classes with public LTO visibility, as that mode uses a separate mechanism to cause bitsets to be exported. This mechanism replaces the whole-program-vtables blacklist, so remove the -fwhole-program-vtables-blacklist flag. Because __declspec(uuid()) now implies [[clang::lto_visibility_public]], the support for the special attr:uuid blacklist entry is removed. Differential Revision: http://reviews.llvm.org/D18635 llvm-svn: 267784
* Set the default C standard to C99 when targeting the PS4.Sunil Srivastava2016-04-271-3/+8
| | | | | | | | Patch by Douglas Yung! Differential Revision: http://reviews.llvm.org/D19003 llvm-svn: 267772
* Call TargetMachine::addEarlyAsPossiblePasses from BackendUtil.Justin Lebar2016-04-271-0/+8
| | | | | | | | | | | | | | | Summary: As of D18614, TargetMachine exposes a hook to add a set of passes that should be run as early as possible. Invoke this hook from clang when setting up the pass manager. Reviewers: chandlerc Subscribers: rnk, cfe-commits, tra Differential Revision: http://reviews.llvm.org/D18617 llvm-svn: 267764
* PR21823: 'nodebug' attribute on global/static variables.Paul Robinson2016-04-271-0/+6
| | | | | | | | | | Make 'nodebug' on a global/static variable suppress all debug info for the variable. Previously it would only suppress info for the associated initializer function, if any. Differential Revision: http://reviews.llvm.org/D19567 llvm-svn: 267746
* Revert r267691, it caused PR27535.Nico Weber2016-04-275-36/+38
| | | | llvm-svn: 267744
* Module debugging: Fix the DWO filename for PCH in a relative path.Adrian Prantl2016-04-271-2/+3
| | | | | | | | | | | PCH in a relative location had a redundant relative path on the DWO filename and the DW_AT_compilation_dir. This patch fixes this and adds testcases for PCH in the same directory, in a relative, and an absolute location. rdar://problem/25537947 llvm-svn: 267740
* [Clang][Builtin][AVX512] Adding intrisnics for the vpconflict{q|d} ↵Michael Zuckerman2016-04-271-0/+98
| | | | | | | | instruction set Differential Revision: http://reviews.llvm.org/D19525 llvm-svn: 267728
* [Clang][BuiltIn][AVX512] Adding intrinsics without mask for VBROADCAST and ↵Michael Zuckerman2016-04-275-0/+262
| | | | | | | | VPBROADCAST instruction set . Differential Revision: http://reviews.llvm.org/D19196 llvm-svn: 267696
* [OPENMP] Fix crash on initialization of classes with no init clause inAlexey Bataev2016-04-271-3/+3
| | | | | | | | | | declare reductions. If reduction clause is applied to instance of class with user-defined reduction operation without initialization clause, it may cause a crash. Patch fixes this issue. llvm-svn: 267695
* [modules] Fix Decl's Used invariant.Vassil Vassilev2016-04-275-38/+36
| | | | | | | | | | | | | | | | | | | | The Decl::isUsed has a value for every decl. In non-module builds it is very difficult (but possible) to break this invariant but when we walk up the redecl chain we find the neccessary information. When deserializing the decls from a module it is much more difficult to update correctly this invariant. The patch centralizes the information whether a decl is used in the canonical decl marking the entire entity as being used. Fixes https://llvm.org/bugs/show_bug.cgi?id=27401 Patch by Cristina Cristescu and me. Thanks to Richard Smith who helped to debug and understand the issue! Reviewed by Richard Smith. llvm-svn: 267691
* [Clang][BuiltIn][AVX512]Adding intrinsics for vmovntdqa vmovntpd vmovntps ↵Michael Zuckerman2016-04-271-0/+24
| | | | | | | | instruction set Differential Revision: http://reviews.llvm.org/D19529 llvm-svn: 267690
* [OPENMP] Fix for codegen of captured variables in inlined directives.Alexey Bataev2016-04-273-17/+58
| | | | | | | | Currently there is a problem with codegen of inlined directives inside lambdas, it may cause a crash during codegen because of incorrect capturing of variables. Patch fixes this problem. llvm-svn: 267677
* Updated doxygen comments for intrinsics.Ekaterina Romanova2016-04-271-48/+33
| | | | | | | (1) Removed \code.. \endcode tags around the instruction name. This matches the doxygen format for all other intrinsics. (2) Did a better formatting for the comments (to fit into 80 columns more compactly). llvm-svn: 267676
* Module debugging: Add an assertion.Adrian Prantl2016-04-261-1/+3
| | | | llvm-svn: 267633
* PR27513: When determining which declaration to put into an exported lookupRichard Smith2016-04-261-2/+11
| | | | | | | | | | | table for a module / PCH, never map from a normal declaration of a class to an injected-class-name declaration (or vice versa). Those declarations live in distinct lookup tables and should not be confused. We really shouldn't be using a CXXRecordDecl to represent an injected-class-name in the first place; I've filed PR27532 so we don't forget. llvm-svn: 267632
* Module debugging: Also correctly handle typedef'd foward-declared members.Adrian Prantl2016-04-261-7/+6
| | | | | | Thanks again to Richard Smith for pointing this out. llvm-svn: 267630
* Check 'r' and 'y specifiers of freebsd_kernel_printf format strings on PS4Sunil Srivastava2016-04-261-2/+2
| | | | | | This is an addendum to r229921. llvm-svn: 267625
* Module debugging: Use the definition to determine module-defined types.Adrian Prantl2016-04-261-4/+2
| | | | | | Follow-up to r267464. Thanks to Richard Smith for pointing this out! llvm-svn: 267611
* Test commitErik Pilkington2016-04-261-0/+1
| | | | llvm-svn: 267604
* [OpenCL] Add predefined macros.Yaxun Liu2016-04-262-3/+35
| | | | | | | | | | | | 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
* [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-264-150/+267
| | | | | | | | | | | | | | | 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
* [MSVC] PR27337: allow static_cast from private base to derived for WTLDmitry Polukhin2016-04-261-4/+5
| | | | | | | | | 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
* [lanai] Update handling of structs in arguments to be passed in registers.Jacques Pienaar2016-04-261-7/+59
| | | | | | 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-251-1/+2
| | | | | | | | | | | | | | | | | | | | 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-251-3/+19
| | | | | | | | | | | | | | | | | | 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-251-9/+13
| | | | | | 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
* When deducing template parameters from base classes of an argument type, don'tRichard Smith2016-04-251-76/+83
| | | | | | | 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-251-0/+48
| | | | | | | | KORTEST, KXNOR, KXOR, KUNPACK instruction set. Differential Revision: http://reviews.llvm.org/D19466 llvm-svn: 267425
OpenPOWER on IntegriCloud