summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Don't crash when a reserved global placement operator new is pairedJohn McCall2015-09-291-2/+12
| | | | | | with a non-reserved operator delete in a new-expression. llvm-svn: 248862
* Fix Clang-tidy modernize-use-nullptr warnings in headers and generated ↵Hans Wennborg2015-09-293-8/+8
| | | | | | | | | | files; other minor cleanups. By Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13187 llvm-svn: 248828
* CGDebugInfo: Don't reuse a reference into a DenseMap if the DenseMap mayAdrian Prantl2015-09-291-4/+4
| | | | | | be modified in between. (NFC) llvm-svn: 248826
* Honor the casted-to alignment of an explicit cast even whenJohn McCall2015-09-291-1/+0
| | | | | | | | | Sema thinks the cast is a no-op, as it does when (e.g.) the only thing that changes is an alignment attribute. Fixed PR24944. llvm-svn: 248775
* Remove 'const' from some ArrayRef arguments since they're passed by value ↵Craig Topper2015-09-291-6/+5
| | | | | | anyway. NFC llvm-svn: 248774
* [OPENMP 4.1] Codegen for ‘simd’ clause in ‘ordered’ directive.Alexey Bataev2015-09-293-8/+28
| | | | | | | | | | | 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. An ordered directive with ‘simd’ clause is generated as an outlined function and corresponding function call to prevent this part of code from vectorization later in backend. llvm-svn: 248772
* Unique-pointerify these pointers an plug a memory leak.Adrian Prantl2015-09-281-6/+0
| | | | | | Thanks to echristo for noticing! llvm-svn: 248762
* Generate assume loads only with -fstrict-vtable-pointersPiotr Padlewski2015-09-281-1/+4
| | | | | | | Temporary fix till InstCombine and other possible passes will be efficient to handle multiple assumes. llvm-svn: 248734
* [OPENMP 4.1] Add 'simd' clause for 'ordered' directive.Alexey Bataev2015-09-281-0/+1
| | | | | | | | | | | 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
* Use llvm::makeArrayRef. NFC.Craig Topper2015-09-271-1/+1
| | | | llvm-svn: 248678
* Remove move constructor and assignment operator from SourceMappingRegion. ↵Craig Topper2015-09-261-12/+1
| | | | | | The types of the fields are trivially copyable. NFC llvm-svn: 248659
* Fix a couple other places that were returning SourceLocation by reference. NFCCraig Topper2015-09-261-2/+2
| | | | llvm-svn: 248658
* Replace a loop and temporary string copying with llvm::join.Eric Christopher2015-09-261-7/+3
| | | | llvm-svn: 248645
* [OPENMP 4.1] Add 'threads' clause for '#pragma omp ordered'.Alexey Bataev2015-09-251-0/+1
| | | | | | | | OpenMP 4.1 extends format of '#pragma omp ordered'. It adds 3 additional clauses: 'threads', 'simd' and 'depend'. If no clause is specified, the ordered construct behaves as if the threads clause had been specified. If the threads clause is specified, the threads in the team executing the loop region execute ordered regions sequentially in the order of the loop iterations. The loop region to which an ordered region without any clause or with a threads clause binds must have an ordered clause without the parameter specified on the corresponding loop directive. llvm-svn: 248569
* Module Debugging: Emit submodules as nested DW_TAG_modules.Adrian Prantl2015-09-241-5/+10
| | | | llvm-svn: 248511
* Debug Info: Use the module pointer as key for the module cache.Adrian Prantl2015-09-242-6/+10
| | | | | | This way we don't need to rebuild the full module name for every decl. llvm-svn: 248510
* Refactor ASTSourceDescriptor to not store copies of all strings. (NFC)Adrian Prantl2015-09-241-6/+7
| | | | llvm-svn: 248509
* Module Debugging: Use the clang module signature as the module's dwo_idAdrian Prantl2015-09-223-1/+10
| | | | | | | | | | | when building a module. Clang already records the module signature when building a skeleton CU to reference a clang module. Matching the id in the skeleton with the one in the module allows a DWARF consumer to verify that they found the correct version of the module without them needing to know about the clang module format. llvm-svn: 248345
* [CUDA] Allow parsing of host and device code simultaneously.Artem Belevich2015-09-221-11/+25
| | | | | | | | | | | | * adds -aux-triple option to specify target triple * propagates aux target info to AST context and Preprocessor * pulls in target specific preprocessor macros. * pulls in target-specific builtins from aux target. * sets appropriate host or device attribute on builtins. Differential Revision: http://reviews.llvm.org/D12917 llvm-svn: 248299
* Remove attributes minsize and optsize, which conflict with optnone.Akira Hatanaka2015-09-211-4/+2
| | | | | | | | | | | This commit fixes an assert that is triggered when optnone is being added to an IR function that is already marked with minsize and optsize. rdar://problem/22723716 Differential Revision: http://reviews.llvm.org/D13004 llvm-svn: 248191
* Debug Info: When building a module, emit skeleton CUs for imported modules.Adrian Prantl2015-09-212-9/+15
| | | | llvm-svn: 248184
* Module debugging: Support submodules in the PCM/PCH debug info.Adrian Prantl2015-09-203-13/+43
| | | | llvm-svn: 248127
* Further simplify the interface of PCHContainerGeneratorAdrian Prantl2015-09-191-7/+7
| | | | | | | | by dropping the const qualifier on the CI. NFC llvm-svn: 248101
* Further simplify CGDebugInfo::getOrCreateModuleRef().Adrian Prantl2015-09-191-10/+8
| | | | | | DIBuilder ignoers DICompileUnits that are passed in as scopes anyway. llvm-svn: 248077
* Rename ASTSourceDescriptor::ModuleName to FullModuleName for clarity.Adrian Prantl2015-09-191-7/+7
| | | | llvm-svn: 248070
* Refactor ASTReader::getSourceDescriptor(const Module &) into a constructorAdrian Prantl2015-09-191-2/+1
| | | | | | | | of ASTSourceDescriptor. It was effectively a static function. NFC. llvm-svn: 248069
* Eliminate a redundant check.Adrian Prantl2015-09-191-3/+2
| | | | llvm-svn: 248068
* CGDebugInfo: Make creating a skeleton CU in getOrCreateModuleRef optional.Adrian Prantl2015-09-182-16/+25
| | | | | | | | | We don't want a skeleton CU when generating debug info for the module itself. NFC. llvm-svn: 248062
* Simplify the interface of PCHContainerGenerator and friendsAdrian Prantl2015-09-181-13/+12
| | | | | | | | by passing in a CompilerInstance instead of all its individual members. NFC. llvm-svn: 248053
* Debug Info: Use the full module name as a key when caching DIModules.Adrian Prantl2015-09-182-3/+3
| | | | | | | | | | | The signature may not have been computed at the time the module reference is generated (e.g.: in the future while emitting debug info for a clang module). Using the full module name is safe because each clang module may only have a single definition. NFC. llvm-svn: 248037
* Pass the relocation model to LLVM for assembler files.Joerg Sonnenberger2015-09-181-0/+1
| | | | llvm-svn: 247981
* [OPENMP 4.0] Add 'if' clause for 'cancel' directive.Alexey Bataev2015-09-183-23/+42
| | | | | | Add parsing, sema analysis and codegen for 'if' clause in 'cancel' directive. llvm-svn: 247976
* Support __builtin_ms_va_list.Charles Davis2015-09-179-23/+100
| | | | | | | | | | | | | | | | | | Summary: This change adds support for `__builtin_ms_va_list`, a GCC extension for variadic `ms_abi` functions. The existing `__builtin_va_list` support is inadequate for this because `va_list` is defined differently in the Win64 ABI vs. the System V/AMD64 ABI. Depends on D1622. Reviewers: rsmith, rnk, rjmccall CC: cfe-commits Differential Revision: http://reviews.llvm.org/D1623 llvm-svn: 247941
* Using MD_invariant_groupPiotr Padlewski2015-09-171-1/+1
| | | | | | http://reviews.llvm.org/D12927 llvm-svn: 247933
* Use the MSVC SEH personalities on MingwReid Kleckner2015-09-171-2/+4
| | | | | | | | Mingw generally wraps an old copy of msvcrt.dll which has these personalities, so things should work out, or so I hear. I haven't tested it. llvm-svn: 247902
* [WinEH] Fix a build issue in CGException.cppReid Kleckner2015-09-161-2/+1
| | | | | | I was constructing an object without filling in all the fields. llvm-svn: 247851
* [WinEH] Pass the catch adjectives to catchpad directlyReid Kleckner2015-09-168-58/+60
| | | | | | | | | This avoids building a fake LLVM IR global variable just to ferry an i32 down into LLVM codegen. It also puts a nail in the coffin of using MS ABI C++ EH with landingpads, since now we'll assert in the lpad code when flags are present. llvm-svn: 247843
* CGClass.cpp: Fix a warning in -Asserts. [-Wunused-private-field]NAKAMURA Takumi2015-09-161-0/+1
| | | | llvm-svn: 247778
* Implementation and testing for poisoning vtableNaomi Musgrave2015-09-161-17/+55
| | | | | | | | | | | | | | | | | | | | | | ptr in dtor. Summary: After destruction, invocation of virtual functions prevented by poisoning vtable pointer. Reviewers: eugenis, kcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12712 Fixed testing callback emission order to account for vptr. Poison vtable in either complete or base dtor, depending on if virtual bases exist. If virtual bases exist, poison in complete dtor. Otherwise, poison in base. Remove commented-out block. llvm-svn: 247762
* Decorating vptr load & stores with !invariant.groupPiotr Padlewski2015-09-159-28/+69
| | | | | | | | | | Adding !invariant.group to vptr load/stores for devirtualization purposes. For more goto: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html http://reviews.llvm.org/D12026 llvm-svn: 247725
* Added llvm.module flag for strict vtable pointersPiotr Padlewski2015-09-151-0/+16
| | | | | | | | | | | | It is dangerous to do LTO on code with strict-vtable-pointers, because one module has invariant.group.barriers, and the other one not. In the future I want to just strip all invariant.group metadata from vptrs loads/stores and get rid of invariant.group.barrier calls. http://reviews.llvm.org/D12580 llvm-svn: 247724
* Emiting llvm.invariant.group.barrier when dynamic type changesPiotr Padlewski2015-09-152-3/+38
| | | | | | | | | For more goto: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html http://reviews.llvm.org/D12312 llvm-svn: 247723
* [OPENMP] Emit __kmpc_cancel_barrier() and code for 'cancellation point' only ↵Alexey Bataev2015-09-153-77/+123
| | | | | | | | | | | | | | if 'cancel' is found. Patch improves codegen for OpenMP constructs. If the OpenMP region does not have internal 'cancel' construct, a call to 'void __kmpc_barrier()' runtime function is generated for all implicit/explicit barriers. If the region has inner 'cancel' directive, then ``` if (__kmpc_cancel_barrier()) exit from outer construct; ``` code is generated. Also, the code for 'canellation point' directive is not generated if parent directive does not have 'cancel' directive. llvm-svn: 247681
* [OpenCL] Add new types for OpenCL 2.0.Alexey Bader2015-09-155-0/+90
| | | | | | | | Patch by Pedro Ferreira. Reviewers: pekka.jaaskelainen Differential Revision: http://reviews.llvm.org/D12855 llvm-svn: 247676
* ItaniumCXXABI.cpp: Fix a warning. [-Wunused-variable]NAKAMURA Takumi2015-09-151-2/+1
| | | | llvm-svn: 247655
* Generating assumption loads of vptr after ctor call (fixed)Piotr Padlewski2015-09-157-126/+258
| | | | | | | | | | | | | | | | | | Generating call assume(icmp %vtable, %global_vtable) after constructor call for devirtualization purposes. For more info go to: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html Edit: Fixed version because of PR24479 and other bug caused in chrome. After this patch got reverted because of ScalarEvolution bug (D12719) Merged after John McCall big patch (Added Address). http://reviews.llvm.org/D11859 http://reviews.llvm.org/D12865 llvm-svn: 247646
* [WebAssembly] Simplify code by avoiding duplicating the default behavior.Dan Gohman2015-09-141-1/+0
| | | | llvm-svn: 247623
* Revert "Always_inline codegen rewrite" and 2 follow-ups.Evgeniy Stepanov2015-09-146-127/+11
| | | | | | | | | | Revert "Update cxx-irgen.cpp test to allow signext in alwaysinline functions." Revert "[CodeGen] Remove wrapper-free always_inline functions from COMDATs" Revert "Always_inline codegen rewrite." Reason for revert: PR24793. llvm-svn: 247620
* Fix a nasty bug with the partial destruction of nested arrays;John McCall2015-09-141-2/+2
| | | | | | | | | it escaped notice because it's only used for heterogeneous initialization. rdar://21397946 llvm-svn: 247597
* [opaque pointer type] Fix a few uses of PointerType::getElementType in favor ↵David Blaikie2015-09-144-12/+10
| | | | | | | | | | of uses of types already available elsewhere These are a few cleanups I happened to have from trying to go in a different direction recently, so just flushing them out while I have them. llvm-svn: 247593
OpenPOWER on IntegriCloud