summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* 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
* [PM] Move away from the old llvm/PassManager.h header and its usingChandler Carruth2015-02-131-22/+22
| | | | | | | | | | | | declarations and just use the legacy namespace qualifier in this file and the permanent header name. The old wrapper header is going away to make LLVM's build more modular, and without updating Clang I can't easily start to add usage of the new pass manager to Clang. This should make it more clear in the code which set of types is doing what. llvm-svn: 229090
* MS ABI: Implement /volatile:msDavid Majnemer2015-02-136-13/+81
| | | | | | | | | | | | The /volatile:ms semantics turn volatile loads and stores into atomic acquire and release operations. This distinction is important because volatile memory operations do not form a happens-before relationship with non-atomic memory. This means that a volatile store is not sufficient for implementing a mutex unlock routine. Differential Revision: http://reviews.llvm.org/D7580 llvm-svn: 229082
* SEH: Use the SEHTryEpilogueStack instead of a separate boolReid Kleckner2015-02-124-10/+7
| | | | | | We don't need a bool to track this now that we have a stack for it. llvm-svn: 228982
* [ms] Implement codegen for __leave.Nico Weber2015-02-123-4/+21
| | | | | | Reviewed at http://reviews.llvm.org/D7575 llvm-svn: 228977
* Fix typoo.Richard Smith2015-02-123-5/+5
| | | | llvm-svn: 228963
* Add InlineAsmDiagnosticHandler for bitcode inputSteven Wu2015-02-121-0/+8
| | | | | | | | | | | | | | | | | | | | Summary: This patch installs an InlineAsmDiagnosticsHandler to avoid the crash report when the input is bitcode and the bitcode contains invalid inline assembly. The handler will simply print the same error message that will print from the backend. Add CHECK in test-case Reviewers: echristo, rafael Reviewed By: rafael Subscribers: rafael, cfe-commits Differential Revision: http://reviews.llvm.org/D7568 llvm-svn: 228898
* Wrap to 80 columns. No behavior change.Nico Weber2015-02-112-4/+7
| | | | llvm-svn: 228880
* Add the 'noinline' attribute to call sites within __try bodiesReid Kleckner2015-02-114-2/+16
| | | | | | | LLVM doesn't support non-call exceptions, so inlining makes it harder to catch such asynchronous exceptions. llvm-svn: 228876
* Add a comdat to __clang_call_terminateReid Kleckner2015-02-111-0/+2
| | | | llvm-svn: 228863
* Fix PR19351. While building up a composite type it is important to useAdrian Prantl2015-02-111-28/+29
| | | | | | | | | | | a non-uniqueable temporary node that is only turned into a permanent unique or distinct node after it is finished. Otherwise an intermediate node may get accidentally uniqued with another node as illustrated by the testcase. Paired commit with LLVM. llvm-svn: 228855
OpenPOWER on IntegriCloud