summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* [OPENMP] Update codegen for 'omp flush' directive.Alexey Bataev2015-02-242-9/+5
| | | | | | | __kmpc_omp_flush() runtime library now has only one argument and is not a vararg anymore. This update makes the codegen compatible with these changes. llvm-svn: 230331
* [WinX86_64 ABI] Treat C99 _Complex as a structMichael Kuperstein2015-02-241-1/+1
| | | | | | | | | MSVC does not support C99 _Complex. ICC, however, does support it on windows x86_64, and treats it, for purposes of parameter passing, as equivalent to a struct containing two fields (for the real and imaginary part). Differential Revision: http://reviews.llvm.org/D7825 llvm-svn: 230315
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-242-152/+0
| | | | | | | This reverts commit r230305. Off to fix another round of missing dependencies on various platforms. llvm-svn: 230309
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-242-0/+152
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 3. llvm-svn: 230305
* InstrProf: Make sure counts in lambdas don't escape to the parent scopeJustin Bogner2015-02-241-0/+5
| | | | | | | | When generating coverage maps, we were traversing the body as if it were part of the parent function, but this doesn't make sense since we're currently counting lambdas as separate functions. llvm-svn: 230304
* CodeGenModule::EmitVTableBitSetEntries: Add check for identical bit set entries.Peter Collingbourne2015-02-241-0/+3
| | | | | | | No two elements of this array should be the same, but the standard library may pass the same element as both arguments to this function. llvm-svn: 230293
* Only lower __builtin_setjmp / __builtin_longjmp toJoerg Sonnenberger2015-02-233-0/+36
| | | | | | | | | | llvm.eh.sjlj.setjmp / llvm.eh.sjlj.longjmp, if the backend is known to support them outside the Exception Handling context. The default handling in LLVM codegen doesn't work and will create incorrect code. The ARM backend on the other hand will assert if the intrinsics are used. llvm-svn: 230255
* InstrProf: Run clang-format to fix some strange indentation (NFC)Justin Bogner2015-02-231-424/+421
| | | | | | | | Somehow this file ended up with a strange hybrid of the old "indent inside a namespace" style and the new "don't", giving us a wonderful two-space indent starting halfway through a namespace. Fix it. llvm-svn: 230244
* Remove comment addressed by d0k in r229327.Nico Weber2015-02-231-2/+0
| | | | llvm-svn: 230199
* Remove two unused methods. No behavior change.Nico Weber2015-02-221-2/+0
| | | | llvm-svn: 230152
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-212-152/+0
| | | | | | | | This reverts commit 230099. The Linux configure+make build variant still needs some work. llvm-svn: 230103
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-202-0/+152
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 2. llvm-svn: 230089
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-202-152/+0
| | | | | | | | This reverts commit r230067. Investigating another batch of problems found by the bots. llvm-svn: 230073
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-202-0/+152
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. llvm-svn: 230067
* Implement Control Flow Integrity for virtual calls.Peter Collingbourne2015-02-205-0/+106
| | | | | | | | | | | | | | | This patch introduces the -fsanitize=cfi-vptr flag, which enables a control flow integrity scheme that checks that virtual calls take place using a vptr of the correct dynamic type. More details in the new docs/ControlFlowIntegrity.rst file. It also introduces the -fsanitize=cfi flag, which is currently a synonym for -fsanitize=cfi-vptr, but will eventually cover all CFI checks implemented in Clang. Differential Revision: http://reviews.llvm.org/D7424 llvm-svn: 230055
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-202-152/+0
| | | | | | | | | This reverts commit r230044 while dealing with buildbot breakage. Conflicts: test/Modules/module_container.m llvm-svn: 230052
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-202-0/+152
| | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 llvm-svn: 230044
* Add -funique-section-names and -fno-unique-section-names options.Rafael Espindola2015-02-201-0/+1
| | | | | | | | | For now -funique-section-names is the default, so no change in default behavior. The total .o size in a build of llvm and clang goes from 241687775 to 230649031 bytes if -fno-unique-section-names is used. llvm-svn: 230031
* Avoid using a COMDAT for sized delete on MachOReid Kleckner2015-02-191-2/+3
| | | | llvm-svn: 229915
* Put the implicit weak sized deallocation funciton in C++14 in a comdatReid Kleckner2015-02-191-0/+2
| | | | | | Fixes PR22635. llvm-svn: 229913
* CodeGen: Weak reference temporaries belong in a COMDATDavid Majnemer2015-02-191-0/+2
| | | | llvm-svn: 229902
* CodeGen: static constexpr data members should have a linkonce_odr initDavid Majnemer2015-02-191-4/+13
| | | | | | | | | Classes can be defined in multiple translation units. This means that the static constexpr data members should have identical initializers in all translation units. Implement this by giving the reference temporary linkonce_odr linkage. llvm-svn: 229900
* InstrProf: Always emit a coverage region for the condition of an ifJustin Bogner2015-02-191-1/+4
| | | | | | | | When tools like llvm-cov show regions, it's much easier to understand what's happening if the condition of an if shows a counter as well as the body. llvm-svn: 229813
* InstrProf: Rewrite most of coverage mapping generation in a simpler wayJustin Bogner2015-02-181-660/+516
| | | | | | | | | | | | | | | | | | | | | | | The coverage mapping generation code previously generated a large number of redundant coverage regions and then tried to merge similar ones back together. This then relied on some awkward heuristics to prevent combining of regions that were importantly different but happened to have the same count. The end result was inefficient and hard to follow. Now, we more carefully create the regions we actually want. This makes it much easier to create regions at precise locations as well as making the basic approach quite a bit easier to follow. There's still a fair bit of complexity here dealing with included code and macro expansions, but that's pretty hard to avoid without significantly reducing the quality of data we provide. I had to modify quite a few tests where the source ranges became more precise or the old ranges seemed to be wrong anyways, and I've added quite a few new tests since a large number of constructs didn't seem to be tested before. llvm-svn: 229748
* Change representation of member function pointers for MIPS targetsZoran Jovanovic2015-02-182-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D7148 llvm-svn: 229680
* Rename flags and options to match current naming: from -fdef-sized-delete to ↵Larisse Voufo2015-02-182-2/+2
| | | | | | -fdefine-sized-deallocation, and from DefaultSizedDelete to DefineSizedDeallocation. llvm-svn: 229597
* Revert accidental commit.Benjamin Kramer2015-02-171-2/+3
| | | | llvm-svn: 229510
* Prefer SmallVector::append/insert over push_back loops. Clang edition.Benjamin Kramer2015-02-174-11/+6
| | | | | | Same functionality, but hoists the vector growth out of the loop. llvm-svn: 229508
* [X86] Convert palignr builtin handling to use shuffle form of right shift ↵Craig Topper2015-02-171-35/+16
| | | | | | instead of intrinsics. This should allow the instrinsics to removed from the backend. llvm-svn: 229474
* [X86] Merge the 2 separate builtin handlers for PALIGNR into a single one ↵Craig Topper2015-02-171-52/+39
| | | | | | that handles both. llvm-svn: 229469
* [X86] Remove code that does custom handling of the builtin for MMX palignr. ↵Craig Topper2015-02-171-31/+0
| | | | | | This code is unreachable since its already marked for non-custom handling in llvm's IntrinsicsX86.td file. llvm-svn: 229468
* [X86] Remove completely unnecessary switch statement.Craig Topper2015-02-161-12/+2
| | | | llvm-svn: 229435
* InstrProf: Update for LLVM API changeJustin Bogner2015-02-161-2/+4
| | | | | | Update for the API change in r229433 llvm-svn: 229434
* x86-64 ABI: unwrap single element structs / arrays of 256-bit vectors to ↵Sanjay Patel2015-02-161-11/+7
| | | | | | | | | | | | | | pass and return in registers This is a patch for PR22563 ( http://llvm.org/bugs/show_bug.cgi?id=22563 ). We were not correctly unwrapping a single 256-bit AVX vector that was defined as an array of 1 inside a struct. We would generate a <4 x float> param/return value instead of <8 x float> and lose half of the vector. Differential Revision: http://reviews.llvm.org/D7614 llvm-svn: 229408
* Fix quoting of #pragma comment for MS compat, clang part.Michael Kuperstein2015-02-161-3/+7
| | | | | | | | | For #pragma comment(linker, ...) MSVC expects the comment string to be quoted, but for #pragma comment(lib, ...) the compiler itself quotes the library name. Since this distinction disappears by the time the directive reaches the backend, move quoting for the "lib" version to the frontend. Differential Revision: http://reviews.llvm.org/D7653 llvm-svn: 229376
* [X86] Teach clang to lower __builtin_ia32_psrldqi256 and ↵Craig Topper2015-02-161-0/+54
| | | | | | __builtin_ia32_pslldqi256 to vector shuffles the backend recognizes. This is a step towards removing the corresponding intrinsics from the backend. llvm-svn: 229348
* Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for ↵Aaron Ballman2015-02-158-20/+20
| | | | | | requiring the macro. NFC; Clang edition. llvm-svn: 229339
* Removing LLVM_EXPLICIT, as MSVC 2012 was the last reason for requiring the ↵Aaron Ballman2015-02-151-1/+1
| | | | | | macro. NFC; Clang edition. llvm-svn: 229336
* Unbreak the build.Benjamin Kramer2015-02-151-1/+1
| | | | llvm-svn: 229329
* Make pushCleanup a variadic template. NFC.Benjamin Kramer2015-02-151-46/+5
| | | | llvm-svn: 229327
* Fix a typo in r229291 causing buildbot failure.Larisse Voufo2015-02-151-1/+1
| | | | llvm-svn: 229295
* More on fixing sized deallocation implementation logic: Fix PR21754.Larisse Voufo2015-02-151-5/+8
| | | | llvm-svn: 229291
* Revise the implementation logic of sized deallocation: Do not automatically ↵Larisse Voufo2015-02-142-5/+8
| | | | | | | | generate weak definitions of the sized operator delete (in terms of unsized operator delete). Instead, provide the funcitonality via a new compiler flag, -fdef-sized-delete. The current implementation causes link-time ODR violations when the delete symbols are exported into the dynamic table. llvm-svn: 229241
* Try to unbreak the Hexagon botDavid Majnemer2015-02-142-2/+2
| | | | llvm-svn: 229219
* DR1748: the reserved placement allocation functions have undefined behavior ifRichard Smith2015-02-141-3/+2
| | | | | | | they're given a null pointer as an argument, so we do not need to emit null checks on their results. llvm-svn: 229213
* CodeGen: _Atomic(_Complex) shouldn't crashDavid Majnemer2015-02-142-2/+8
| | | | | | | We could be a little kinder if we did a compare-exchange loop instead of an atomic-load/store pair. llvm-svn: 229212
* Revert "Revert r229082 for a bit, it caused PR22577."David Majnemer2015-02-146-13/+81
| | | | | | | This reverts commit r229123. It was a red herring, the bug was present without r229082. llvm-svn: 229205
* CodeGen: Correctly convert atomic bool from i8 to i1David Majnemer2015-02-141-1/+1
| | | | | | | | | Bools are a little tricky, they are i8 in memory and must be coerced back to i1 before further operations can be performed on them. This fixes PR22577. llvm-svn: 229204
* Revert r229082 for a bit, it caused PR22577.Nico Weber2015-02-136-81/+13
| | | | llvm-svn: 229123
* [PM] Fix #include order here that I forgot to update before changing it.Chandler Carruth2015-02-131-1/+1
| | | | llvm-svn: 229092
OpenPOWER on IntegriCloud