summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Stop producing .data.rel sections.Rafael Espindola2015-11-1824-134/+93
| | | | | | | | | | | | | | | | | If a section is rw, it is irrelevant if the dynamic linker will write to it or not. It looks like llvm implemented this because gcc was doing it. It looks like gcc implemented this in the hope that it would put all the relocated items close together and speed up the dynamic linker. There are two problem with this: * It doesn't work. Both bfd and gold will map .data.rel to .data and concatenate the input sections in the order they are seen. * If we want a feature like that, it can be implemented directly in the linker since it knowns where the dynamic relocations are. llvm-svn: 253436
* c++abi: use __builtin_offsetof instead of offsetofSaleem Abdulrasool2015-11-181-8/+9
| | | | | | | | | Use `__builtin_offsetof` in place of `offsetof`. Certain environments provide a macro definition of `offsetof` which may end up causing issues. This was observed on Windows. Use `__builtin_offsetof` to ensure correct evaluation everywhere. NFC. llvm-svn: 253435
* BuildUniversalActions(): Prune obsolete \param(s). [-Wdocumentation]NAKAMURA Takumi2015-11-181-2/+0
| | | | | FIXME: Describe BAInputs. llvm-svn: 253434
* Adjust test from fallout due to r253429David Majnemer2015-11-181-5/+5
| | | | | | | | As a side note, the jump target is much nicer than before. We went from: <bar+...> to <.plt> llvm-svn: 253433
* Fix LLD testsuite fallout from r253429David Majnemer2015-11-181-4/+4
| | | | llvm-svn: 253432
* [NFC] Change the evaluation context of a non-type default template argument ↵Faisal Vali2015-11-182-1/+16
| | | | | | | | | | | | | | | | from Unevaluated to ConstantEvaluated. This patch emits a more appropriate (but still noisy) diagnostic stream when a lambda-expression is encountered within a non-type default argument. For e.g. template<int N = ([] { return 5; }())> int f(); As opposed to complaining that a lambda expression is not allowed in an unevaluated operand, the patch complains about the lambda being forbidden in a constant expression context (which will be allowed in C++17 now that they have been accepted by EWG, unless of course CWG or national bodies (that have so far shown no signs of concern) rise in protest) As I start submitting patches for constexpr lambdas (http://wg21.link/P0170R0) under C++1z (OK'd by Richard Smith at Kona), this will be one less change to make. Thanks! llvm-svn: 253431
* Add a test for r253323David Majnemer2015-11-181-0/+47
| | | | | | Forgot to do this simultaneously with committing the fix. llvm-svn: 253430
* [llvm-objdump] Use the COFF export table for additional symbolsDavid Majnemer2015-11-184-59/+128
| | | | | | | | | Most linked executables do not have a symbol table in COFF. However, it is pretty typical to have some export entries. Use those entries to inform the disassembler about potential function definitions and call targets. llvm-svn: 253429
* Revert r253401, "[clang-tidy] add check ↵NAKAMURA Takumi2015-11-187-258/+0
| | | | | | | | cppcoreguidelines-pro-bounds-constant-array-index" cppcoreguidelines-pro-bounds-constant-array-index.cpp is failing in several hosts. llvm-svn: 253428
* [doc] simplify the doc on compiling CUDAJingyue Wu2015-11-181-26/+3
| | | | | | CUDA support doesn't reply on temporary patches any more. Thanks Artem! llvm-svn: 253427
* Remove a redundant assertion in MachineBasicBlock.cpp. NFC.Cong Hou2015-11-181-1/+0
| | | | llvm-svn: 253426
* Remove redundant code in MachineBasicBlock.cpp. NFC.Cong Hou2015-11-181-28/+8
| | | | llvm-svn: 253425
* Remove a few vestigial typedefs from the old worldEnrico Granata2015-11-187-15/+0
| | | | llvm-svn: 253424
* Cleanup the type X list commands to use the new ForEach goodnessEnrico Granata2015-11-1811-902/+225
| | | | llvm-svn: 253423
* Attempt to fix uninitialized SDAG persistent ids detected by MSanReid Kleckner2015-11-181-1/+1
| | | | llvm-svn: 253422
* Let += and -= operators in BranchProbability have saturation behaviors.Cong Hou2015-11-181-6/+4
| | | | | | | | This commit is for a later patch that is depend on it. The sum of two branch probabilities can be greater than 1 due to rounding. It is safer to saturate the results of sum and subtraction. llvm-svn: 253421
* Don't expose iterators into the list of types on the ASTContext; these areRichard Smith2015-11-182-11/+6
| | | | | | | | unsafe, since many operations on the types can trigger lazy deserialization of more types and invalidate the iterators. This fixes a crasher, but I've not been able to reduce it to a reasonable testcase yet. llvm-svn: 253420
* [libFuzzer] remove default initializer as a workaround for ↵Kostya Serebryany2015-11-181-1/+1
| | | | | | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68399. Don't need it anyway. llvm-svn: 253419
* Try to fix leak in CXStringSet from r252853Reid Kleckner2015-11-181-0/+2
| | | | llvm-svn: 253418
* Modify the interface BranchProbability::normalizeProbabilities to let it ↵Cong Hou2015-11-182-9/+14
| | | | | | accept a pair of iterators. NFC. llvm-svn: 253417
* [TSan] List only amd64 asm file in Makefile.old (attempt 2)Alexey Samsonov2015-11-181-1/+1
| | | | llvm-svn: 253416
* Revert "[llvm-profdata] Add SaturatingAdd/SaturatingMultiply Helper Functions"Nathan Slingerland2015-11-184-77/+9
| | | | | | Not ready for merge. llvm-svn: 253415
* Improving edge probabilities computation when choosing the best successor in ↵Cong Hou2015-11-182-13/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | machine block placement. When looking for the best successor from the outer loop for a block belonging to an inner loop, the edge probability computation can be improved so that edges in the inner loop are ignored. For example, suppose we are building chains for the non-loop part of the following code, and looking for B1's best successor. Assume the true body is very hot, then B3 should be the best candidate. However, because of the existence of the back edge from B1 to B0, the probability from B1 to B3 can be very small, preventing B3 to be its successor. In this patch, when computing the probability of the edge from B1 to B3, the weight on the back edge B1->B0 is ignored, so that B1->B3 will have 100% probability. if (...) do { B0; ... // some branches B1; } while(...); else B2; B3; Differential revision: http://reviews.llvm.org/D10825 llvm-svn: 253414
* [llvm-profdata] Fix unhandled enumeration values warningNathan Slingerland2015-11-181-0/+2
| | | | | | | | | | Fix this: llvm/tools/llvm-profdata/llvm-profdata.cpp:78:15: warning: 12 enumeration values not handled in switch: 'success', 'eof', 'unrecognized_format'... [-Wswitch] switch (instrError) { ^ llvm-svn: 253413
* [llvm-profdata] Add SaturatingAdd/SaturatingMultiply Helper FunctionsNathan Slingerland2015-11-184-9/+77
| | | | | | | | | | | | | | | Summary: This change adds MathExtras helper functions for handling unsigned, saturating addition and multiplication. It also updates the instrumentation and sample profile merge implementations to use them. No functional changes. Reviewers: dnovillo, bogner, davidxl Subscribers: davidxl, llvm-commits Differential Revision: http://reviews.llvm.org/D14720 llvm-svn: 253412
* [ARM] Enable shrink-wrapping by default.Quentin Colombet2015-11-1812-18/+32
| | | | | | | | Differential Revision: http://reviews.llvm.org/D14357 rdar://problem/21942589 llvm-svn: 253411
* Fix for use-after-free which caused test failure in cuda-detect.cu.Artem Belevich2015-11-181-1/+1
| | | | | | Return std::string itself instead StringRef to a temporary std::string. llvm-svn: 253410
* Generalize ownership/passing semantics to allow dsymutil to own ↵David Blaikie2015-11-183-23/+21
| | | | | | | | | | | | | abbreviations via unique_ptr While still allowing CodeGen/AsmPrinter in llvm to own them using a bump ptr allocator. (might be nice to replace the pointers there with something that at least automatically calls their dtors, if that's necessary/useful, rather than having it done explicitly (I think a typed BumpPtrAllocator already does this, or maybe a unique_ptr with a custom deleter, etc)) llvm-svn: 253409
* Remove excess white spaceRafael Espindola2015-11-181-6/+0
| | | | llvm-svn: 253408
* [TSan] List only amd64 asm file in Makefile.oldAlexey Samsonov2015-11-181-1/+1
| | | | llvm-svn: 253407
* [ASan] Be consistent and refer to reported issues as "errors" in hints.Alexey Samsonov2015-11-181-3/+3
| | | | llvm-svn: 253406
* Produce a better diagnostic for global register variables.Akira Hatanaka2015-11-1813-25/+114
| | | | | | | | | | | | | | | | | | Currently, when there is a global register variable in a program that is bound to an invalid register, clang/llvm prints an error message that is not very user-friendly. This commit improves the diagnostic and moves the check that used to be in the backend to Sema. In addition, it makes changes to error out if the size of the register doesn't match the declared variable size. e.g., volatile register int B asm ("rbp"); rdar://problem/23084219 Differential Revision: http://reviews.llvm.org/D13834 llvm-svn: 253405
* [PGO] Removed unused code. [NFC]Betul Buyukkurt2015-11-181-1/+0
| | | | llvm-svn: 253404
* [InstCombine] refactor optimizeIntToFloatBitCast() ; NFCISanjay Patel2015-11-181-38/+29
| | | | | | | | | | | | | | | The logic for handling the pattern without a shift is identical to the logic for handling the pattern with a shift if you set the shift amount to zero for the former. This should make it easier to see that we probably don't even need optimizeIntToFloatBitCast(). If we call something like foldVecTruncToExtElt() from visitTrunc(), we'll solve PR25543: https://llvm.org/bugs/show_bug.cgi?id=25543 llvm-svn: 253403
* [clang-tidy] add check cppcoreguidelines-pro-bounds-constant-array-indexMatthias Gehre2015-11-177-0/+258
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This check flags all array subscriptions on static arrays and std::arrays that either have a non-compile-time-constant index or are out of bounds. Dynamic accesses into arrays are difficult for both tools and humans to validate as safe. array_view is a bounds-checked, safe type for accessing arrays of data. at() is another alternative that ensures single accesses are bounds-checked. If iterators are needed to access an array, use the iterators from an array_view constructed over the array. This rule is part of the "Bounds safety" profile of the C++ Core Guidelines, see https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#-bounds2-only-index-into-arrays-using-constant-expressions Reviewers: alexfh, sbenza, bkramer, aaron.ballman Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13746 llvm-svn: 253401
* [llvm-profdata] Show hint for other mismatch errors when merging instr profdataNathan Slingerland2015-11-171-1/+5
| | | | | | | | | | | Missed bit of feedback from D14720. Show the same "Make sure that all profile data to be merged is generated from the same binary." hint for hash mismatch and value site count mismatch as we now do for counter mismatch when merging incompatible instrumentation profile data. llvm-svn: 253400
* Fix bug 25362 "cppcoreguidelines-pro-bounds-array-to-pointer-decay does not ↵Matthias Gehre2015-11-173-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | consider const" Summary: The current matcher is implicitCastExpr(unless(hasParent(explicitCastExpr()))) but the AST in the bug is `-CXXStaticCastExpr 0x2bb64f8 <col:21, col:55> 'void *const *' static_cast<void *const *> <NoOp> `-ImplicitCastExpr 0x2bb64e0 <col:47> 'void *const *' <NoOp> `-ImplicitCastExpr 0x2bb64c8 <col:47> 'void **' <ArrayToPointerDecay> `-DeclRefExpr 0x2bb6458 <col:47> 'void *[2]' lvalue Var 0x2bb59d0 'addrlist' 'void *[2]' i.e. an ImplicitCastExpr (const cast) between decay and explicit cast. Reviewers: alexfh, sbenza, bkramer, aaron.ballman Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D14517 llvm-svn: 253399
* [modules] When a #include is mapped to a module import and appears somewhereRichard Smith2015-11-176-13/+30
| | | | | | | | | | | | | | other than the top level, we issue an error. This breaks a fair amount of C++ code wrapping C libraries, where the C library is #included within a namespace / extern "C" combination, because the C library (probably) includes C++ standard library headers which may be within modules. Without modules, this setup is harmless if (and *only* if) the corresponding standard library module was already included outside the namespace, so downgrade the error to a default-error extension in that case, so that it can be selectively disabled for such misbehaving libraries. llvm-svn: 253398
* COFF: Destroy LTOModules as they are linked.Peter Collingbourne2015-11-172-2/+1
| | | | | | | | This should help reduce memory consumption during LTO. Differential Revision: http://reviews.llvm.org/D14672 llvm-svn: 253397
* [X86][AVX512] Added AVX512 SHUFP*/VPERMILP* shuffle decode comments.Simon Pilgrim2015-11-175-186/+119
| | | | llvm-svn: 253396
* Fix read-of-uninitialized introduced in r253277 exposed on some buildbotsDavid Blaikie2015-11-171-1/+1
| | | | | | | | | | | | Verified that this was at least /an/ issue, if not the only one, by initializing NumBuckets to 1 (previously it was uninitialized, so if this change made a difference, which it did (causing a bunch of tests to crash) it demonstrates use-of-uninitialized memory). Initializing then removes the crashes. Thanks Reid for the debugging assistance llvm-svn: 253395
* [PGO] Move value profile data definitions out of IndexedInstrProfXinliang David Li2015-11-174-52/+49
| | | | | | | Move the data structure defintions out of the namespace. The defs will be shared by raw format. [NFC] llvm-svn: 253394
* Fix null dereference committed in r253277David Blaikie2015-11-171-2/+3
| | | | llvm-svn: 253393
* dwarfdump: support indexed string dumping in dwp based on the STR_OFFSETS ↵David Blaikie2015-11-172-3/+6
| | | | | | component of the index llvm-svn: 253392
* [X86][AVX512] Added support for AVX512 UNPCK shuffle decode comments.Simon Pilgrim2015-11-177-315/+180
| | | | llvm-svn: 253391
* [Myriad]: -nostdlib implies -nostartfilesDouglas Katzman2015-11-172-1/+2
| | | | llvm-svn: 253390
* [CUDA] Make CUDA compilation usable by default.Artem Belevich2015-11-175-4/+18
| | | | | | | | | | | | | | | | | | Currently clang requires several additional command line options in order to enable new features needed during CUDA compilation. This patch makes these options default. * Automatically include cuda_runtime.h if we've found a valid CUDA installation. * Disable automatic CUDA header inclusion during unit tests. * Added test case for command line construction. * Enabled target overloads and relaxed call checks that are needed in order to include CUDA headers. * Added CUDA-7.5 installation path to the CUDA installation search list. * Define __CUDA__ macro to indicate CUDA compilation. llvm-svn: 253389
* [CUDA] Added a wrapper header for inclusion of stock CUDA headers.Artem Belevich2015-11-172-0/+180
| | | | | | | | | | | | | | | | | | | | Header files that come with CUDA are assuming split host/device compilation and are not usable by clang out of the box. With a bit of preprocessor magic it's possible to twist them into something clang can use. This wrapper always includes CUDA headers exactly the same way during host and device compilation passes and produces identical preprocessed content during host and device side compilation for sm_35 GPUs. Device compilation passes for older GPUs will see a smaller subset of device functions supported by particular GPU. The wrapper assumes specific contents of CUDA header files and works only with CUDA 7.0 and 7.5. Differential Revision: http://reviews.llvm.org/D13171 llvm-svn: 253388
* [CUDA] Detect and link with CUDA's libdevice bitcode library.Artem Belevich2015-11-176-4/+75
| | | | | | | | | | | - added detection of libdevice bitcode file and API to find one appropriate for the GPU we're compiling for. - pass additional cc1 options for linking with detected libdevice bitcode - added -nocudalib to prevent automatic linking with libdevice - added test cases to verify new functionality Differential Revision: http://reviews.llvm.org/D14556 llvm-svn: 253387
* [CUDA] added include paths for both sides of CUDA compilation.Artem Belevich2015-11-178-6/+66
| | | | | | | | | | | | | | | | | | | | | In order to compile a CUDA file clang must be able to find include files for both both host and device. This patch passes AuxToolchain to AddPreprocessingOptions and uses it to add include paths for the opposite side of compilation. We also must be able to find CUDA include files. If the driver found CUDA installation, it adds appropriate include path to CUDA headers. This can be disabled with '-nocudainc'. - Added include paths for the opposite side of compilation. - Added include paths to detected CUDA installation. - Added -nocudainc to prevent adding CUDA include path. - Added test cases to verify new functionality. Differential Revision: http://reviews.llvm.org/D13170 llvm-svn: 253386
OpenPOWER on IntegriCloud