summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* CodeGen: Introduce splitCodeGen and teach LTOCodeGenerator to use it.Peter Collingbourne2015-08-277-25/+213
| | | | | | | | | | | | | | | llvm::splitCodeGen is a function that implements the core of parallel LTO code generation. It uses llvm::SplitModule to split the module into linkable partitions and spawning one code generation thread per partition. The function produces multiple object files which can be linked in the usual way. This has been threaded through to LTOCodeGenerator (and llvm-lto for testing purposes). Separate patches will add parallel LTO support to the gold plugin and lld. Differential Revision: http://reviews.llvm.org/D12260 llvm-svn: 246236
* [WinEH] Add some support for code generating catchpadReid Kleckner2015-08-2738-90/+357
| | | | | | | We can now run 32-bit programs with empty catch bodies. The next step is to change PEI so that we get funclet prologues and epilogues. llvm-svn: 246235
* [elf2] Add basic relocation support for x86-64.Michael J. Spencer2015-08-278-13/+126
| | | | | | | | This currently doesn't handle local symbols. Differential Revision: http://reviews.llvm.org/D11612 llvm-svn: 246234
* [yaml2obj] Support numeric indexes to create invalid files. Will be used by ↵Michael J. Spencer2015-08-271-3/+5
| | | | | | lld test. llvm-svn: 246233
* [ValueTracking] readnone CallInsts are fair game for speculationDavid Majnemer2015-08-272-39/+21
| | | | | | | | | | Any call which is side effect free is trivially OK to speculate. We already had similar logic in EarlyCSE and GVN but we were missing it from isSafeToSpeculativelyExecute. This fixes PR24601. llvm-svn: 246232
* CGDebugInfo: Instead of uniquing RetainedTypes, just refrain from retainingAdrian Prantl2015-08-271-6/+7
| | | | | | them more than once. (NFC) llvm-svn: 246231
* [X86] Bump Darwin MaxVectorAlign to 64 when AVX512 is enabled.Ahmed Bougacha2015-08-272-4/+16
| | | | | | | | | | | Without this, 64-byte vector types (__m512), specified to be 64-byte aligned in the AVX512 draft SysV ABI, will only be 32-byte aligned. This is analoguous to AVX, for which we accept 32-byte max alignment. Differential Revision: http://reviews.llvm.org/D10724 llvm-svn: 246230
* [X86] Conditionalize Darwin MaxVectorAlign on the presence of AVX.Ahmed Bougacha2015-08-272-15/+45
| | | | | | | | | There's no point in using a larger alignment if we have no instructions that would benefit from it. Differential Revision: http://reviews.llvm.org/D12389 llvm-svn: 246229
* [X86] Use AVX features instead of ABI to init. SimdDefaultAlign.Ahmed Bougacha2015-08-272-1/+4
| | | | | | | | | | | | | | | The ABI string only exists to communicate with TargetCodeGenInfo. Concretely, since we only used "avx*" ABI strings on x86_64 (as AVX doesn't affect the i386 ABIs), this meant that, when initializing SimdDefaultAlign, we would ignore AVX/AVX512 on i386, for no good reason. Instead, directly check the features. A similar change for MaxVectorAlign will follow. Differential Revision: http://reviews.llvm.org/D12390 llvm-svn: 246228
* [CMake] Unify build rules for sanitizer_common for Apple and non-Apple ↵Alexey Samsonov2015-08-276-24/+26
| | | | | | | | | platforms. Additionally, link safestack runtime on OS X with nolibc version of sanitizer_common runtime, as we do on Linux. llvm-svn: 246227
* Add a global mapping layer for Orc. Adapted from a patch by Andy Somogyi.Lang Hames2015-08-273-0/+164
| | | | | | Thanks Andy! llvm-svn: 246226
* Use an explicit assignment.Eric Christopher2015-08-271-2/+2
| | | | llvm-svn: 246225
* Reverting r246209 while I investigate a build bot failure: ↵Aaron Ballman2015-08-275-21/+1
| | | | | | http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/30516 llvm-svn: 246224
* [X86][3DNow] Added debug codegen test for 3DNow! intrinsicsSimon Pilgrim2015-08-271-1/+26
| | | | | | Part of PR24590 llvm-svn: 246223
* Include <mutex>Enrico Granata2015-08-271-0/+1
| | | | llvm-svn: 246222
* [CMake] Delete unused variable and target.Alexey Samsonov2015-08-271-12/+1
| | | | llvm-svn: 246221
* Fixup one of the CMakeListsEnrico Granata2015-08-271-2/+2
| | | | llvm-svn: 246220
* Core: Start using llvm/Support/thread.h to work around MSVC <thread> issues.Peter Collingbourne2015-08-271-7/+1
| | | | llvm-svn: 246219
* Support: Introduce thread.h.Peter Collingbourne2015-08-271-0/+34
| | | | | | | This header is a wrapper for <thread> that works around problems with the MSVC headers when exceptions are disabled. llvm-svn: 246218
* [CodeGen] Check FoldConstantArithmetic result before using it.Ahmed Bougacha2015-08-272-2/+20
| | | | | | | | Fixes PR24602: r245689 introduced an unguarded use of SelectionDAG::FoldConstantArithmetic, which returns 0 when it fails because of opaque (hoisted) constants. llvm-svn: 246217
* Added a missing file to the CMakeListsEnrico Granata2015-08-271-0/+1
| | | | llvm-svn: 246216
* Don't call a member function on a null pointer.Richard Smith2015-08-271-2/+5
| | | | llvm-svn: 246215
* Assume loads fix #2Piotr Padlewski2015-08-279-26/+156
| | | | | | | | | | | | | There was linker problem, and it turns out that it is not always safe to refer to vtable. If the vtable is used, then we can refer to it without any problem, but because we don't know when it will be used or not, we can only check if vtable is external or it is safe to to emit it speculativly (when class it doesn't have any inline virtual functions). It should be fixed in the future. http://reviews.llvm.org/D12385 llvm-svn: 246214
* Generating assumption loads of vptr after ctor call (fixed)Piotr Padlewski2015-08-2713-129/+426
| | | | | | | | | | | | | | | 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. http://reviews.llvm.org/D11859 llvm-svn: 246213
* Add a new type of plugin: Language pluginEnrico Granata2015-08-2719-1/+748
| | | | | | | | | | The Language plugin is menat to answer language-specific questions that are not bound to the existence of a process. Those are still the domain of the LanguageRuntime plugin The Language plugin will, instead, answer questions such as providing language-specific data formatters or expression evaluation At the moment, the interface is hollowed out, and empty do-nothing plugins have been setup for ObjC, C++ and ObjC++ llvm-svn: 246212
* [X86][XOP] Added debug codegen test for XOP intrinsicsSimon Pilgrim2015-08-271-1/+66
| | | | | | Part of PR24590 llvm-svn: 246211
* CGDebugInfo: Factor out a getOrCreateStandaloneType() method.Adrian Prantl2015-08-272-3/+18
| | | | | | | | | | | Usually debug info is created on the fly while during codegen. With this API it becomes possible to create standalone debug info for types that are not referenced by any code, such as emitting debug info for a clang module or for implementing something like -gfull. Because on-the-fly debug info generation may still insert retained types on top of them, all RetainedTypes are uniqued in CGDebugInfo::finalize(). llvm-svn: 246210
* Expose language options to the checkers; disable UseNullptrCheck when not ↵Aaron Ballman2015-08-275-1/+21
| | | | | | compiling in C++11 mode. llvm-svn: 246209
* [TableGen][DAGISel] Dedup predicates with same code to run. NFCI.Ahmed Bougacha2015-08-271-4/+25
| | | | | | | | | | | I locally hit the 255 limit, but a lot of these are redundant: each predicate coming from a different record was allocated a new number, even when we already emitted the same code for another predicate. Instead, re-use numbers and emit the predicate code only once. This reduces the total text size of *DAGISel.cpp.o by ~1%. llvm-svn: 246208
* Fix test introduced in r246187 that failed on some systems.Tyler Nowicki2015-08-271-7/+5
| | | | llvm-svn: 246207
* [X86][FMA4] Added debug codegen test for FMA4 intrinsicsSimon Pilgrim2015-08-271-1/+34
| | | | | | Part of PR24590 llvm-svn: 246206
* [Sanitizers] Make abort_on_error common flag.Alexey Samsonov2015-08-2710-16/+81
| | | | | | | | | | | | | | Summary: Teach all sanitizers to call abort() instead of _exit() after printing an error report, if requested. This behavior is the default on Mac OS. Reviewers: kcc, kubabrecka Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12332 llvm-svn: 246205
* [X86][F16C] Added debug codegen test for F16C intrinsicsSimon Pilgrim2015-08-271-1/+6
| | | | | | Part of PR24590 llvm-svn: 246204
* Oops - Re-add the Kaleidoscope regression tests themselves (accidentally leftLang Hames2015-08-276-0/+85
| | | | | | out of r246201). llvm-svn: 246203
* Remove a dead assert, we'd have gotten the case above.Eric Christopher2015-08-271-1/+0
| | | | llvm-svn: 246202
* Recommit r246175 - Add Kaleidoscope regression tests, with a fix to make sureLang Hames2015-08-2715-21/+53
| | | | | | the kaleidoscope 'library' functions aren't dead-stripped in release builds. llvm-svn: 246201
* [X86] Add __builtin_ia32_undef* intrinsics to testSimon Pilgrim2015-08-271-0/+3
| | | | | | Minor tweak to rL246083 llvm-svn: 246200
* [CMake] Add ARCHS option to add_sanitizer_rt_symbols.Chris Bieneman2015-08-276-54/+67
| | | | | | | | | | | | | | | | | Summary: This is another step in a multi-step refactoring to move add_sanitizer_rt_symbols in the direction of other add_* functions in compiler-rt. Changes to CMakeLists files are all minimal except ubsan which tests the new ARCHS loop. Further cleanup patches will follow. Reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12410 llvm-svn: 246199
* [Sanitizer] Use internal_memmove instead of the one implicitly generated by ↵Alexey Samsonov2015-08-271-2/+3
| | | | | | compiler. llvm-svn: 246198
* Target attribute syntax compatibility fix - gcc uses no- rather than mno-.Eric Christopher2015-08-273-4/+4
| | | | llvm-svn: 246197
* Rename this file to have a processor suffix to help identify.Eric Christopher2015-08-271-0/+0
| | | | llvm-svn: 246196
* Rewrite the code generation handling for function feature and cpu attributes.Eric Christopher2015-08-273-63/+78
| | | | | | | | | | | | | | | | | | | | A couple of changes here: a) Do less work in the case where we don't have a target attribute on the function. We've already canonicalized the attributes for the function - no need to do more work. b) Use the newer canonicalized feature adding functions from TargetInfo to do the work when we do have a target attribute. This enables us to diagnose some warnings in the case of conflicting written attributes (only ppc does this today) and also make sure to get all of the features for a cpu that's listed rather than just change the cpu. Updated all testcases accordingly and added a new testcase to verify that we'll error out on ppc if we have some incompatible options using the existing diagnosis framework there. llvm-svn: 246195
* Enable constant propagation for more math functionsErik Schnetter2015-08-272-78/+732
| | | | | | | | | | | | Constant propagation for single precision math functions (such as tanf) is already working, but was not enabled. This patch enables these for many single-precision functions, and adds respective test cases. Newly handled functions: acosf asinf atanf atan2f ceilf coshf expf exp2f fabsf floorf fmodf logf log10f powf sinhf tanf tanhf llvm-svn: 246194
* [CUDA] Check register names on appropriate side of cuda compilation only.Artem Belevich2015-08-273-12/+42
| | | | | | Differential Revision: http://reviews.llvm.org/D11950 llvm-svn: 246193
* Add a -gmodules option to the driver and a -dwarf-ext-refs to cc1Adrian Prantl2015-08-2716-14/+49
| | | | | | | | | | | | | to enable the use of external type references in the debug info (a.k.a. module debugging). The driver expands -gmodules to "-g -fmodule-format=obj -dwarf-ext-refs" and passes that to cc1. All this does at the moment is set a flag codegenopts. http://reviews.llvm.org/D11958 llvm-svn: 246192
* Revert 246186; still breaks on some systemsErik Schnetter2015-08-272-732/+78
| | | | llvm-svn: 246191
* [sanitizer] Disable sem_* interceptors on Mac.Evgeniy Stepanov2015-08-271-1/+1
| | | | llvm-svn: 246190
* Improve options printed on vectorization analysis diagnostics.Tyler Nowicki2015-08-272-7/+8
| | | | | | | | | | | The LLVM patch changes the analysis diagnostics produced when loops with floating-point recurrences or memory operations are identified. The new messages say "cannot prove it is safe to reorder * operations; allow reordering by specifying #pragma clang loop vectorize(enable)". Depending on the type of diagnostic the message will include additional options such as ffast-math or __restrict__. llvm-svn: 246189
* [Static Analyzer] BugReporter.cpp:2869: Assertion failed: ↵Gabor Horvath2015-08-273-2/+103
| | | | | | | | | | | | | | | | | | | | | | | | | !RemainingNodes.empty() && "No error node found in the trimmed graph" The assertion is caused by reusing a “filler” ExplodedNode as an error node. The “filler” nodes are only used for intermediate processing and are not essential for analyzer history, so they can be reclaimed when the ExplodedGraph is trimmed by the “collectNode” function. When a checker finds a bug, they generate a new transition in the ExplodedGraph. The analyzer will try to reuse the existing predecessor node. If it cannot, it creates a new ExplodedNode, which always has a tag to uniquely identify the creation site. The assertion is caused when the analyzer reuses a “filler” node. In the test case, some “filler” nodes were reused and then reclaimed later when the ExplodedGraph was trimmed. This caused an assertion because the node was needed to generate the report. The “filler” nodes should not be reused as error nodes. The patch adds a constraint to prevent this happening, which solves the problem and makes the test cases pass. Differential Revision: http://reviews.llvm.org/D11433 Patch by Ying Yi! llvm-svn: 246188
* Improve vectorization diagnostic messages and extend vectorize(enable) pragma.Tyler Nowicki2015-08-273-21/+45
| | | | | | | | | | | | | | | | This patch changes the analysis diagnostics produced when loops with floating-point recurrences or memory operations are identified. The new messages say "cannot prove it is safe to reorder * operations; allow reordering by specifying #pragma clang loop vectorize(enable)". Depending on the type of diagnostic the message will include additional options such as ffast-math or __restrict__. This patch also allows the vectorize(enable) pragma to override the low pointer memory check threshold. When the hint is given a higher threshold is used. See the clang patch for the options produced for each diagnostic. llvm-svn: 246187
OpenPOWER on IntegriCloud