summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ELF] Allow discarding of .rela.pltMartell Malone2018-12-042-7/+1
| | | | | | | | | | | | | | | | When linking the linux kernel on ppc64le ld.lld -EL -m elf64lppc -Bstatic --orphan-handling=warn --build-id -o .tmp_vmlinux1 -T ./arch/powerpc/kernel/vmlinux.lds --whole-archive built-in.a --no-whole-archive --start-group lib/lib.a --end-group ld.lld: error: discarding .rela.plt section is not allowed The linker script discards with the following matches *(.glink .iplt .plt .rela* .comment) Differential Revision: https://reviews.llvm.org/D54871 llvm-svn: 348258
* [X86][NFC] Add more constant-size memcmp tests.Clement Courbet2018-12-041-14/+203
| | | | llvm-svn: 348257
* Fix MSVC "unknown pragma" warning. NFCI.Simon Pilgrim2018-12-041-0/+6
| | | | llvm-svn: 348256
* [PPC][PPC64] PPC_REL14 and PPC64_REL14 relocationsMartell Malone2018-12-044-25/+62
| | | | | | | | | | When linking the linux kernel on ppc64 and ppc ld.lld: error: unrecognized reloc 11 11 is PPC_REL14 and PPC64_REL14 Differential revision: https://reviews.llvm.org/D54868 llvm-svn: 348255
* Fix -Wparentheses warning. NFCI.Simon Pilgrim2018-12-041-3/+2
| | | | llvm-svn: 348254
* [X86] Remove unnecessary peekThroughEXTRACT_SUBVECTORs call.Simon Pilgrim2018-12-041-2/+0
| | | | | | The GetSplatValue/IsSplatVector call will call this anyhow and the later code is just for a v2i64 type so doesn't need it. llvm-svn: 348253
* [clangd] Partition include graph on auto-index.Kadir Cetinkaya2018-12-043-50/+129
| | | | | | | | | | | | | | Summary: Partitions include graphs in auto-index so that each shards contains only part of the include graph related to itself. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D55062 llvm-svn: 348252
* [TargetLowering] expandFP_TO_UINT - avoid FPE due to out of range conversion ↵Simon Pilgrim2018-12-046-130/+118
| | | | | | | | | | | | | | (PR17686) PR17686 demonstrates that for some targets FP exceptions can fire in cases where the FP_TO_UINT is expanded using a FP_TO_SINT instruction. The existing code converts both the inrange and outofrange cases using FP_TO_SINT and then selects the result, this patch changes this for 'strict' cases to pre-select the FP_TO_SINT input and the offset adjustment. The X87 cases don't need the strict flag but generates much nicer code with it.... Differential Revision: https://reviews.llvm.org/D53794 llvm-svn: 348251
* [Expr] Fix `TestExprOptions` after r348240 on MacOS XAleksandr Urakov2018-12-041-0/+15
| | | | | | | | | | Summary: r348240 assumes that an expression contains the Objective C option if Objective C Runtime is found. But on MacOS X it seems that the test application process always contains Objective C Runtime, so the test fails when it assumes that the language is C++ only. Skip this part on Darwin. llvm-svn: 348250
* Revert rL348121 from llvm/trunk: [NFC][AArch64] Split out backend featuresSimon Pilgrim2018-12-0416-716/+386
| | | | | | | | | | | | | | | | | | | | | | | | | This patch splits backend features currently hidden behind architecture versions. For example, currently the only way to activate complex numbers extension is targeting an v8.3 architecture, where after the patch this extension can be added separately. This refactoring is required by the new command lines proposal: http://lists.llvm.org/pipermail/llvm-dev/2018-September/126346.html Reviewers: DavidSpickett, olista01, t.p.northover Subscribers: kristof.beyls, bryanpkc, javed.absar, pbarrio Differential revision: https://reviews.llvm.org/D54633 ........ This has been causing buildbots failures for the past 24 hours: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/14386 llvm-svn: 348249
* Revert r348243 "[llvm-mc] - Do not crash when referencing undefined debug ↵George Rimar2018-12-042-19/+0
| | | | | | | | | | sections." It broke msan and asan bots it seems: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/26794/steps/check-llvm%20msan/logs/stdio http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/20993/steps/ninja%20check%201/logs/stdio llvm-svn: 348248
* [SystemZ] Do not support __float128Ulrich Weigand2018-12-042-27/+1
| | | | | | | | | | | | | As of rev. 268898, clang supports __float128 on SystemZ. This seems to have been in error. GCC has never supported __float128 on SystemZ, since the "long double" type on the platform is already IEEE-128. (GCC only supports __float128 on platforms where "long double" is some other data type.) For compatibility reasons this patch removes __float128 on SystemZ again. The test case is updated accordingly. llvm-svn: 348247
* [TargetLowering] Add SimplifyDemandedVectorElts support to EXTEND opcodesSimon Pilgrim2018-12-046-65/+65
| | | | | | | | Add support for ISD::*_EXTEND and ISD::*_EXTEND_VECTOR_INREG opcodes. The extra broadcast in trunc-subvector.ll will be fixed in an upcoming patch. llvm-svn: 348246
* [Analyzer] Iterator Checker - Forbid decrements past the begin() and ↵Adam Balogh2018-12-042-124/+187
| | | | | | | | | | | | | | | | | | | | increments past the end() of containers Previously, the iterator range checker only warned upon dereferencing of iterators outside their valid range as well as increments and decrements of out-of-range iterators where the result remains out-of-range. However, the C++ standard is more strict than this: decrementing begin() or incrementing end() results in undefined behaviour even if the iterator is not dereferenced afterwards. Coming back to the range once out-of-range is also undefined. This patch corrects the behaviour of the iterator range checker: warnings are given for any operation whose result is ahead of begin() or past the end() (which is the past-end iterator itself, thus now we are speaking of past past-the-end). Differential Revision: https://reviews.llvm.org/D53812 llvm-svn: 348245
* [Analyzer] Iterator Checkers - Use the region of the topmost base class for ↵Adam Balogh2018-12-044-39/+71
| | | | | | | | | | | | | | | | | | iterators stored in a region If an iterator is represented by a derived C++ class but its comparison operator is for its base the iterator checkers cannot recognize the iterators compared. This results in false positives in very straightforward cases (range error when dereferencing an iterator after disclosing that it is equal to the past-the-end iterator). To overcome this problem we always use the region of the topmost base class for iterators stored in a region. A new method called getMostDerivedObjectRegion() was added to the MemRegion class to get this region. Differential Revision: https://reviews.llvm.org/D54466 llvm-svn: 348244
* [llvm-mc] - Do not crash when referencing undefined debug sections.George Rimar2018-12-042-0/+19
| | | | | | | | | | | | | | MC has code that pre-creates few debug sections: https://github.com/llvm-mirror/llvm/blob/master/lib/MC/MCObjectFileInfo.cpp#L396 If users code has a reference to such section but does not redefine it, MC code currently asserts, because still thinks they are normally defined. The patch fixes the issue. Differential revision: https://reviews.llvm.org/D55173 llvm-svn: 348243
* [llvm-dwarfdump] - Dump the older versions of .eh_frame/.debug_frame correctly.George Rimar2018-12-042-1/+53
| | | | | | | | | | | | | | | | | | | | | | The issue is the following. DWARF 2 used version 1 for .debug_frame. (Appendix G, p. 416 http://dwarfstd.org/doc/DWARF5.pdf) lib/MC now always sets version 1 for .eh_frame (and sets 1-4 versions for .debug_frame correctly): https://github.com/llvm-mirror/llvm/blob/master/lib/MC/MCDwarf.cpp#L1530 https://github.com/llvm-mirror/llvm/blob/master/lib/MC/MCDwarf.cpp#L1562 https://github.com/llvm-mirror/llvm/blob/master/lib/MC/MCDwarf.cpp#L1602 In version 1, return_address_register was defined as ubyte, while other versions switched to uleb128. (p 62, http://www.dwarfstd.org/doc/dwarf-2.0.0.pdf) Patch teaches llvm-dwarfdump about this difference. Differential revision: https://reviews.llvm.org/D54860 llvm-svn: 348242
* Extend test for DependentSizedArrayTypeStephen Kelly2018-12-041-0/+9
| | | | | | | Use a using declaration to force the type to appear in the -ast-dump output. llvm-svn: 348241
* [Expr] Check the language before ignoring Objective C keywordsAleksandr Urakov2018-12-044-7/+22
| | | | | | | | | | | | | | | | | | Summary: This patch adds the check of the language before ignoring names like `id` or `Class`, which are reserved in Objective C, but are allowed in C++. It is needed to make it possible to evaluate expressions in a C++ program containing names like `id` or `Class`. Reviewers: jingham, zturner, labath, clayborg Reviewed By: jingham, clayborg Tags: #lldb Differential Revision: https://reviews.llvm.org/D54843 llvm-svn: 348240
* [WIP][Sema] Improve static_assert diagnostics for type traits.Clement Courbet2018-12-045-7/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In our codebase, `static_assert(std::some_type_trait<Ts...>::value, "msg")` (where `some_type_trait` is an std type_trait and `Ts...` is the appropriate template parameters) account for 11.2% of the `static_assert`s. In these cases, the `Ts` are typically not spelled out explicitly, e.g. `static_assert(std::is_same<SomeT::TypeT, typename SomeDependentT::value_type>::value, "message");` The diagnostic when the assert fails is typically not very useful, e.g. `static_assert failed due to requirement 'std::is_same<SomeT::TypeT, typename SomeDependentT::value_type>::value' "message"` This change makes the diagnostic spell out the types explicitly , e.g. `static_assert failed due to requirement 'std::is_same<int, float>::value' "message"` See tests for more examples. After this is submitted, I intend to handle `static_assert(!std::some_type_trait<Ts...>::value, "msg")`, which is another 6.6% of static_asserts. Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D54903 llvm-svn: 348239
* Remove unnecessary include.Richard Trieu2018-12-041-1/+0
| | | | llvm-svn: 348238
* [X86] Remove custom DAG combine for ↵Craig Topper2018-12-041-45/+0
| | | | | | | | SIGN_EXTEND_VECTOR_INREG/ZERO_EXTEND_VECTOR_INREG. We only needed this because it provided really aggressive constant folding even through constant pool entries created from build_vectors. The main case was for vXi8 MULH legalization which was happening as part of legalize DAG instead of as part of legalize vector ops. Now its part of vector op legalization and we've added special handling for build vectors of all constants there. This has removed the need for this code on the list tests we have. llvm-svn: 348237
* [compiler-rt] Use the new zx_futex_wait for Fuchsia sanitizer runtimePetr Hosek2018-12-041-2/+3
| | | | | | | | | This finishes the soft-transition to the new primitive that implements priority inheritance. Differential Revision: https://reviews.llvm.org/D55244 llvm-svn: 348236
* [analyzer] MoveChecker: Add more common state resetting methods.Artem Dergachev2018-12-042-1/+14
| | | | | | | | | Includes "resize" and "shrink" because they can reset the object to a known state in certain circumstances. Differential Revision: https://reviews.llvm.org/D54563 llvm-svn: 348235
* [Sema] Provide -fvisibility-global-new-delete-hidden optionPetr Hosek2018-12-045-4/+12
| | | | | | | | | | | | | | | | | | | | | | | When the global new and delete operators aren't declared, Clang provides and implicit declaration, but this declaration currently always uses the default visibility. This is a problem when the C++ library itself is being built with non-default visibility because the implicit declaration will force the new and delete operators to have the default visibility unlike the rest of the library. The existing workaround is to use assembly to enforce the visiblity: https://fuchsia.googlesource.com/zircon/+/master/system/ulib/zxcpp/new.cpp#108 but that solution is not always available, e.g. in the case of of libFuzzer which is using an internal version of libc++ that's also built with -fvisibility=hidden where the existing behavior is causing issues. This change introduces a new option -fvisibility-global-new-delete-hidden which makes the implicit declaration of the global new and delete operators hidden. Differential Revision: https://reviews.llvm.org/D53787 llvm-svn: 348234
* Fix -Wmismatched-tags to not warn on redeclarations of structs in systemRichard Smith2018-12-043-55/+116
| | | | | | | | | | | | | | | | | | | | | | | | headers. Previously, we would only check whether the new declaration is in a system header, but that requires the user to be able to correctly guess whether a declaration in a system header is declared as a struct or a class when specializing standard library traits templates. We now entirely ignore declarations for which the warning was disabled when determining whether to warn on a tag mismatch. Also extend the diagnostic message to clarify that a) code containing such a tag mismatch is in fact valid and correct, and b) the (non-coding-style) reason to emit such a warning is that the Microsoft C++ ABI is broken and includes the tag kind in decorated names, as it seems a lot of users are confused by our diagnostic here (either not understanding why we produce it, or believing that it represents an actual language rule). llvm-svn: 348233
* [PlatformDarwin] Simplify logic and use FileSystemJonas Devlieghere2018-12-041-17/+4
| | | | | | Simplify code path by using the FileSystem. llvm-svn: 348232
* Improve the regerror(3) interceptorKamil Rytarowski2018-12-041-2/+2
| | | | | | | | | The res returned value might differ with REAL(strlen)(errbuf) + 1, as the buffer's value is limited with errbuf_size. Hot fix for D54584. llvm-svn: 348231
* Reverting r348215Ranjeet Singh2018-12-043-30/+20
| | | | | | Causing failures on ubsan buildbot boxes. llvm-svn: 348230
* [analyzer] MoveChecker: Improve warning and note messages.Artem Dergachev2018-12-042-95/+126
| | | | | | | | | | | | | | | | | | | The warning piece traditionally describes the bug itself, i.e. "The bug is a _____", eg. "Attempt to delete released memory", "Resource leak", "Method call on a moved-from object". Event pieces produced by the visitor are usually in a present tense, i.e. "At this moment _____": "Memory is released", "File is closed", "Object is moved". Additionally, type information is added into the event pieces for STL objects (in order to highlight that it is in fact an STL object), and the respective event piece now mentions that the object is left in an unspecified state after it was moved, which is a vital piece of information to understand the bug. Differential Revision: https://reviews.llvm.org/D54560 llvm-svn: 348229
* Add interceptors for the sysctl(3) API family from NetBSDKamil Rytarowski2018-12-043-0/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add new interceptors for: - sysctl - sysctlbyname - sysctlgetmibinfo - sysctlnametomib - asysctl - asysctlbyname Cover the API with a new test file TestCases/NetBSD/sysctl.cc. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: devnexen, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54076 llvm-svn: 348228
* Add interceptors for the fts(3) API family from NetBSDKamil Rytarowski2018-12-045-0/+120
| | | | | | | | | | | | | | | | | | | | | | | Summary: fts(3) is API to traverse a file hierarchy. Cover this interface with interceptors. Add a test to validate the interface reading the number of regular files in /etc. Based on original work by Yang Zheng. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: tomsun.0.7, kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54247 llvm-svn: 348227
* [TableGen] Improve the formatting of the emitted predicates (NFC)Evandro Menezes2018-12-041-8/+7
| | | | llvm-svn: 348226
* [TableGen] Fix typo in emitted comment (NFC)Evandro Menezes2018-12-041-1/+1
| | | | llvm-svn: 348225
* Add new interceptor for regex(3) in NetBSDKamil Rytarowski2018-12-045-0/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add interceptors for the NetBSD style of regex(3) present inside libc: - regcomp - regexec - regerror - regfree - regnsub - regasub Add a dedicated test verifying the installed interceptors. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54584 llvm-svn: 348224
* [ExecutionEngine] Change NotifyObjectEmitted/NotifyObjectFreed API.Lang Hames2018-12-048-67/+75
| | | | | | | | | | | | | This patch renames both methods (NotifyObjectEmitted -> notifyObjectLoaded, and NotifyObjectFreed -> notifyObjectFreed), adds an abstract "ObjectKey" (uint64_t) parameter to notifyObjectLoaded, and replaces the ObjectFile parameter for notifyObjectFreed with an ObjectKey. Using an ObjectKey to track identify events, rather than a reference to the ObjectFile, allows us to free the ObjectFile after notifyObjectLoaded is called, saving memory. https://reviews.llvm.org/D53773 llvm-svn: 348223
* [ARM64][Windows] Fix local stack size for funcletsSanjin Sijaric2018-12-042-3/+61
| | | | | | | | | | | The comment was misplaced, and the code didn't do what the comment indicated, namely ignoring the varargs portion when computing the local stack size of a funclet in emitEpilogue. This results in incorrect offset computations within funclets that are contained in vararg functions. Differential Revision: https://reviews.llvm.org/D55096 llvm-svn: 348222
* [asan] Reduce binary size by using unnamed private aliasesVitaly Buka2018-12-042-4/+4
| | | | | | | | | | | | | | | Summary: --asan-use-private-alias increases binary sizes by 10% or more. Most of this space was long names of aliases and new symbols. These symbols are not needed for the ODC check at all. Reviewers: eugenis Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D55146 llvm-svn: 348221
* [MachineOutliner] Move stack instr check logic to getOutliningCandidateInfoJessica Paquette2018-12-042-96/+144
| | | | | | | | | | | | | | | | This moves the stack check logic into a lambda within getOutliningCandidateInfo. This allows us to be less conservative with stack checks. Whether or not a stack instruction is safe to outline is dependent on the frame variant and call variant of the outlined function; only in cases where we modify the stack can these be unsafe. So, if we move that logic later, when we're looking at an individual candidate, we can make better decisions here. This gives some code size savings as a result. llvm-svn: 348220
* [MachineOutliner][AArch64][NFC] Add early exit to candidate discarding logicJessica Paquette2018-12-041-0/+6
| | | | | | | | If we dropped too many candidates to be beneficial when dropping candidates that modify the stack, there's no reason to check for other cost model qualities. llvm-svn: 348219
* NFC: Make this test kinder on downstream forksErik Pilkington2018-12-042-7/+4
| | | | | | | | | | | Downstream forks that have their own attributes often run into this test failing when a new attribute is added to clang because the number of supported attributes no longer match. This is redundant information for this test, so we can get by without it. rdar://46288577 llvm-svn: 348218
* [projects] Use directory name for add_llvm_external_projectsShoaib Meenai2018-12-041-1/+2
| | | | | | | | add_llvm_external_projects expects the directory name instead of the full path, otherwise the check for an in-tree subproject will fail and the project won't be configured. llvm-svn: 348217
* [ThinLTO] Look through aliases when computing hash keysGeorge Burgess IV2018-12-042-8/+16
| | | | | | | | | | | Without this, we don't consider types used by aliasees in our cache key. This caused issues when using the same cache for thin-linking the same TU with different sets of virtual call candidates for a virtual call inside of a constructor. That's sort of a mouthful. :) Differential Revision: https://reviews.llvm.org/D55060 llvm-svn: 348216
* [IR] Don't assume all functions are 4 byte alignedRanjeet Singh2018-12-043-20/+30
| | | | | | | | | | | In some cases different alignments for function might be used to save space e.g. thumb mode with -Oz will try to use 2 byte function alignment. Similar patch that fixed this in other areas exists here https://reviews.llvm.org/D46110 Differential Revision: https://reviews.llvm.org/D55115 llvm-svn: 348215
* [Hexagon] Fix intrinsic testKrzysztof Parzyszek2018-12-031-4/+0
| | | | llvm-svn: 348214
* Relax test even more for WindowsAdrian Prantl2018-12-031-1/+1
| | | | llvm-svn: 348213
* Remove unused empty arm64 directoryYi Kong2018-12-030-0/+0
| | | | llvm-svn: 348212
* Relax tests to also work on WindowsAdrian Prantl2018-12-032-5/+9
| | | | llvm-svn: 348211
* [analyzer] MoveChecker: Restrict to locals and std:: objects.Artem Dergachev2018-12-032-25/+154
| | | | | | | | | | | | | | | | | | | | | | | | In general case there use-after-move is not a bug. It depends on how the move-constructor or move-assignment is implemented. In STL, the convention that applies to most classes is that the move-constructor (-assignment) leaves an object in a "valid but unspecified" state. Using such object without resetting it to a known state first is likely a bug. Objects Local value-type variables are special because due to their automatic lifetime there is no intention to reuse space. If you want a fresh object, you might as well make a new variable, no need to move from a variable and than re-use it. Therefore, it is not always a bug, but it is obviously easy to suppress when it isn't, and in most cases it indeed is - as there's no valid intention behind the intentional use of a local after move. This applies not only to local variables but also to parameter variables, not only of value type but also of rvalue reference type (but not to lvalue references). Differential Revision: https://reviews.llvm.org/D54557 llvm-svn: 348210
* NFC: Add .vscode to .gitignoreGor Nishanov2018-12-031-0/+5
| | | | llvm-svn: 348209
OpenPOWER on IntegriCloud