summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [CMake] Override debugserver to use the build tree on DarwinChris Bieneman2017-03-143-0/+16
| | | | | | This patch adds support to the test suite for overriding the path to debugserver, and uses the override to point to the build tree's debugserver on Darwin. llvm-svn: 297776
* [cfi] Disable bad-split test on win32.Evgeniy Stepanov2017-03-141-0/+2
| | | | | | It appears that the fix only helped Itanium ABI. llvm-svn: 297775
* [debugserver] Fixing a small logic error from r297685Chris Bieneman2017-03-141-1/+1
| | | | | | I had mixed up the logic during patch review. This resolves the test failure reading YMM registers on Darwin. llvm-svn: 297774
* Archives require a symbol table on Solaris, even if empty.Rafael Espindola2017-03-143-0/+24
| | | | | | | | | | | | | | On Solaris ld (and some other tools that use the underlying utility libraries, such as elfdump) chokes on an archive library that has no symbol table. The Solaris tools always create one, even if it's empty. That bug has been fixed in the latest development line, and can probably be backported to a supported release, but it would be nice if LLVM's archiver could emit the empty symbol table, too. Patch by Danek Duvall! llvm-svn: 297773
* Fixed unintentional assignment-in-assert in new "extending memory management ↵Billy Robert O'Neal III2017-03-146-6/+6
| | | | | | tools" algorithms. llvm-svn: 297772
* [cfi] Add test for type metadata split issue.Evgeniy Stepanov2017-03-141-0/+19
| | | | | | https://reviews.llvm.org/D30716 llvm-svn: 297771
* Modules: Optimize bitcode encoding of diagnostic stateDuncan P. N. Exon Smith2017-03-142-6/+10
| | | | | | | | | | | Since bitcode uses VBR encoding, large numbers are more expensive than small ones. Instead of emitting a UINT_MAX sentinel after each sequence of state-change pairs, emit the size of the sequence as a prefix. This should have no functionality change besides saving bits from the encoding. llvm-svn: 297770
* Fix asm printing of associated sections.Evgeniy Stepanov2017-03-148-30/+48
| | | | | | | Make MCSectionELF::AssociatedSection be a link to a symbol, because that's how it works in the assembly, and use it in the asm printer. llvm-svn: 297769
* [ARM] Replace some C++ selection code with TableGen patterns. NFC.Eli Friedman2017-03-145-64/+33
| | | | | | Differential Revision: https://reviews.llvm.org/D30794 llvm-svn: 297768
* [Support] Make the SystemZ bot happy by using make_error_code.Juergen Ributzka2017-03-141-1/+2
| | | | | | | This should fix the last issue on the SystemZ bot related to the broken symlink test. llvm-svn: 297767
* Fix arch-specific-libdir tests on WindowsReid Kleckner2017-03-142-12/+12
| | | | | | | This is pretty horrible, but I forget if we have any better ways to handle these backslashing issues. llvm-svn: 297764
* After rL297370 and rL297383, instead of a platform check, explicitlyDimitry Andric2017-03-141-1/+1
| | | | | | | | check for the existence of RTLD_DEEPBIND, since this constant is only supported for glibc >= 2.3.4. This fixes builds for FreeBSD and other platforms that do not have RTLD_DEEPBIND. llvm-svn: 297763
* [DAG] vector div/rem with any zero element in divisor is undefSanjay Patel2017-03-145-33/+35
| | | | | | | | | | | | | | | | This is the backend counterpart to: https://reviews.llvm.org/rL297390 https://reviews.llvm.org/rL297409 and follow-up to: https://reviews.llvm.org/rL297384 It surprised me that we need to duplicate the check in FoldConstantArithmetic and FoldConstantVectorArithmetic, but one or the other doesn't catch all of the test cases. There is an existing code comment about merging those someday. Differential Revision: https://reviews.llvm.org/D30826 llvm-svn: 297762
* Warn on enum assignment to bitfields that can't fit all valuesReid Kleckner2017-03-144-2/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds -Wbitfield-enum-conversion, which warns on implicit conversions that happen on bitfield assignment that change the value of some enumerators. Values of enum type typically take on a very small range of values, so they are frequently stored in bitfields. Unfortunately, there is no convenient way to calculate the minimum number of bits necessary to store all possible values at compile time, so users usually hard code a bitwidth that works today and widen it as necessary to pass basic testing and validation. This is very error-prone, and leads to stale widths as enums grow. This warning aims to catch such bugs. This would have found two real bugs in clang and two instances of questionable code. See r297680 and r297654 for the full description of the issues. This warning is currently disabled by default while we investigate its usefulness outside of LLVM. The major cause of false positives with this warning is this kind of enum: enum E { W, X, Y, Z, SENTINEL_LAST }; The last enumerator is an invalid value used to validate inputs or size an array. Depending on the prevalance of this style of enum across a codebase, this warning may be more or less feasible to deploy. It also has trouble on sentinel values such as ~0U. Reviewers: rsmith, rtrieu, thakis Reviewed By: thakis Subscribers: hfinkel, voskresensky.vladimir, sashab, cfe-commits Differential Revision: https://reviews.llvm.org/D30923 llvm-svn: 297761
* [compiler-rt][builtins] __isOSVersionAtLeast should load CoreFoundationAlex Lorenz2017-03-142-17/+80
| | | | | | | | | | | | | | | | symbols dynamically The CoreFoundation symbols uses by __isOSVersionAtLeast should be loaded at runtime to ensure that the programs that don't use @available won't have to be linked to CoreFoundation. The Clang frontend IRGen library will need to emit a CoreFoundation symbol when @available is used to ensure that programs that actually use @available are linked to CoreFoundation. rdar://31039554 llvm-svn: 297760
* Add more debugging code for the SystemZ bot.Juergen Ributzka2017-03-141-12/+24
| | | | llvm-svn: 297759
* Mark LWG issues 2868, 2872, and 2890 as complete. There's nothing we need to ↵Marshall Clow2017-03-141-3/+3
| | | | | | do for them. llvm-svn: 297758
* SamplePGO ThinLTO ICP fix for local functions.Dehao Chen2017-03-149-6/+158
| | | | | | | | | | | | | | | | | | | | | | | | Summary: In SamplePGO, if the profile is collected from non-LTO binary, and used to drive ThinLTO, the indirect call promotion may fail because ThinLTO adjusts local function names to avoid conflicts. There are two places of where the mismatch can happen: 1. thin-link prepends SourceFileName to front of FuncName to build the GUID (GlobalValue::getGlobalIdentifier). Unlike instrumentation FDO, SamplePGO does not use the PGOFuncName scheme and therefore the indirect call target profile data contains a hash of the OriginalName. 2. backend compiler promotes some local functions to global and appends .llvm.{$ModuleHash} to the end of the FuncName to derive PromotedFunctionName This patch tries at the best effort to find the GUID from the original local function name (in profile), and use that in ICP promotion, and in SamplePGO matching that happens in the backend after importing/inlining: 1. in thin-link, it builds the map from OriginalName to GUID so that when thin-link reads in indirect call target profile (represented by OriginalName), it knows which GUID to import. 2. in backend compiler, if sample profile reader cannot find a profile match for PromotedFunctionName, it will try to find if there is a match for OriginalFunctionName. 3. in backend compiler, we build symbol table entry for OriginalFunctionName and pointer to the same symbol of PromotedFunctionName, so that ICP can find the correct target to promote. Reviewers: mehdi_amini, tejohnson Reviewed By: tejohnson Subscribers: llvm-commits, Prazek Differential Revision: https://reviews.llvm.org/D30754 llvm-svn: 297757
* Fix misspelled enumJonathan Roelofs2017-03-143-9/+9
| | | | | | https://reviews.llvm.org/D30945 llvm-svn: 297756
* [InstCombine] improve readability; NFCISanjay Patel2017-03-141-29/+23
| | | | llvm-svn: 297755
* [Driver] Fix arch-specific-libdir-rpath.cPirama Arumuga Nainar2017-03-141-3/+3
| | | | | | | | | | | | Summary: Fix the test by adding missing -target flags with a 'linux' triple. Reviewers: rnk, srhines Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30947 llvm-svn: 297754
* Also mark LWG#2785 as complete, because we already implemented thatMarshall Clow2017-03-141-1/+1
| | | | llvm-svn: 297753
* Implement LWG2784, and mark 2786, 2795, 2804, 2812, 2826, 2834, 2837 and ↵Marshall Clow2017-03-143-16/+51
| | | | | | 2838 as complete - since we do them already llvm-svn: 297752
* [Driver] Add flag to request arch-specific-subdir in -rpathPirama Arumuga Nainar2017-03-145-30/+59
| | | | | | | | | | | | | | | | | | Summary: This patch adds -f[no-]rtlib-add-rpath, which if enabled, embeds the arch-specific subdirectory in resource directory using -rpath (instead of doing so only during native compilation). This patch also re-enables test arch-specific-libdir.c which was silently unsupported because of the REQUIRES tag 'linux'. Reviewers: bkramer, rnk, mgorny Subscribers: srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D30700 llvm-svn: 297751
* [ubsan] Use the nicer nullability diagnostic handlersVedant Kumar2017-03-144-16/+22
| | | | | | | | | | | This is a follow-up to r297700 (Add a nullability sanitizer). It addresses some FIXME's re: using nullability-specific diagnostic handlers from compiler-rt, now that the necessary handlers exist. check-ubsan test updates to follow. llvm-svn: 297750
* [ubsan] Add nullability handlers to interface fileVedant Kumar2017-03-141-0/+4
| | | | llvm-svn: 297749
* [ubsan] Add diagnostic handlers for nullability errorsVedant Kumar2017-03-142-13/+46
| | | | | | | | | | | | | | | | | Add 'nullability_arg' and 'nullability_return' diagnostic handlers, and also add a TypeCheckKind for null assignments to _Nonnull. With this in place, we can update clang to use the nicer handlers for nullability diagnostics. The alternative to this approach is to update the existing 'nonnull_arg' and 'nonnull_return' handlers to accept a boolean parameter. However, versioning the existing handlers would cause code size bloat, and the complexity cost of introducing new handlers into the runtime is low. I will add tests for this, and all of -fsanitize=nullability, into check-ubsan once the clang side of the changes is in. llvm-svn: 297748
* [InstCombine] consolidate rem tests and update checks; NFCSanjay Patel2017-03-145-138/+143
| | | | llvm-svn: 297747
* [InstCombine] regenerate checks; NFCSanjay Patel2017-03-141-177/+225
| | | | llvm-svn: 297746
* [Hexagon] Fix a condition in HexagonEarlyIfConv.cppKrzysztof Parzyszek2017-03-141-1/+1
| | | | | | This fixes llvm.org/PR32265. llvm-svn: 297745
* DarwinParser: include limitsSaleem Abdulrasool2017-03-141-0/+1
| | | | | | | | | | | In debug mode, we have assertions that the values do not exceed the limits of the type holding them. In order to account for the type being derived from the AddressSpace and thus a typedef, we use `std::numeric_limits`. Include the appropriate header. Thanks to Marshal Clow for pointing out the missing include! llvm-svn: 297744
* Fix flakyness in TestCompletionPavel Labath2017-03-141-2/+2
| | | | | | | | | | | | One of the file name templates was occasionally generating the name "fooa***", which conflicted with the one of the tests expectation that there is only one item beginning with "fooa". There doesn't seem to be a good reason for using random file templates here, so just switch to a fixed set of files to increase reproducibility. llvm-svn: 297743
* Fix typo in commentArtyom Skrobov2017-03-141-1/+1
| | | | llvm-svn: 297742
* [X86] Add extra BITREVERSE testsSimon Pilgrim2017-03-141-131/+442
| | | | | | | | Test on 32-bit and 64-bit targets. Add bitreverse tests for i64, i32 and i16 llvm-svn: 297741
* [LV] Refactor cross-iteration phi's back-patching; NFCGil Rapaport2017-03-141-232/+244
| | | | | | | | | | | | | | This patch refactors the PHisToFix loop as follows: - The loop itself now resides in its own method. - The new method iterates on scalar-loop's header; the PHIsToFix map formerly propagated as an output parameter and filled during phi widening is removed. - The code handling reductions is moved into its own method, similar to the existing fixFirstOrderRecurrence(). Differential Revision: https://reviews.llvm.org/D30755 llvm-svn: 297740
* [ARM] Diagnose ARM MOVT without :lower16: or :upper16: expressionOliver Stannard2017-03-142-0/+4
| | | | | | | | | | | This instruction was missing from the list of opcodes that we check, so we were hitting an llvm_unreachable in ARMMCCodeEmitter.cpp for the ARM MOVT instruction, rather than the diagnostic that is emitted for the other MOVW/MOVT instructions. Differential revision: https://reviews.llvm.org/D30936 llvm-svn: 297739
* De-duplicate the two implementations of ↵Artyom Skrobov2017-03-141-13/+5
| | | | | | | | | | | | ARMBaseInstrInfo::isProfitableToIfCvt() [NFC] Reviewers: congh, rengolin Subscribers: aemerson, llvm-commits Differential Revision: https://reviews.llvm.org/D30934 llvm-svn: 297738
* [LV] Refactor Cost Model's selectVectorizationFactor(); NFCAyal Zaks2017-03-141-73/+132
| | | | | | | | | | | Refactoring Cost Model's selectVectorizationFactor() so that it handles only the selection of the best VF from a pre-computed range of candidate VF's, extracting early-exit criteria and the computation of a MaxVF upper-bound to other methods, all driven by a newly introduced LoopVectorizationPlanner. Differential Revision: https://reviews.llvm.org/D30653 llvm-svn: 297737
* [X86][MMX] Update FIXME comment. NFCI.Simon Pilgrim2017-03-141-1/+1
| | | | llvm-svn: 297736
* [ELF] - Move members of LinkerScript to LinkerScriptBase. NFC.George Rimar2017-03-142-72/+63
| | | | | | | | | | | | That moves all members that s possible to move for now (all which does not depend on ELFT templating). After that change LinkerScript contains only 8 methods in total, and I believe it is possible to move them all after tweaking other parts of linker. And we will be able to have single class for linkerscript at the end. llvm-svn: 297735
* [ELF] - Remove unnecessary template #6. NFC.George Rimar2017-03-141-4/+3
| | | | llvm-svn: 297734
* Make PredIteratorCache size() logically const. Do not require copying ↵Daniel Berlin2017-03-141-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | predecessors to get size. Summary: Every single benchmark i can run, on large and small cfgs, fully connected, etc, across 3 different platforms (x86, arm., and PPC) says that the current pred iterator cache is a losing proposition. I can't find a case where it's faster than just walking preds, and in some cases, it's 5-10% slower. This is due to copying the preds. It also degrades into copying the entire cfg. The one operation that is occasionally faster is the cached size. This makes that operation faster by not relying on having the copies available. I'm not even sure that is faster enough to be worth it. I, again, have trouble finding cases where this takes long enough in a pass to be worth caching compared to a million other things they could cache or improve. My suggestion: We next remove the get() interface. We do stronger benchmarking of size(). We probably end up killing this entire cache. / Reviewers: chandlerc Subscribers: aemerson, llvm-commits, trentxintong Differential Revision: https://reviews.llvm.org/D30873 llvm-svn: 297733
* [ELF] - Remove unnecessary template #5. NFC.George Rimar2017-03-141-5/+4
| | | | llvm-svn: 297732
* Test commit.James Henderson2017-03-141-1/+1
| | | | llvm-svn: 297731
* Add more clang-format changes to the 5.0 release notesKrasimir Georgiev2017-03-141-5/+17
| | | | llvm-svn: 297730
* [CodeGen] Fix -Wreorder warning.Benjamin Kramer2017-03-141-3/+3
| | | | llvm-svn: 297729
* Some ASan bots (AArch64 at least) use SEGV for a unit test error instead of ↵Filipe Cabecinhas2017-03-141-1/+1
| | | | | | SIGBUS llvm-svn: 297728
* [ELF] - Devirtualize LinkerScriptBase::getOutputSectionSize. NFC.George Rimar2017-03-142-16/+14
| | | | | | It does not use ELFT templates so can be non-virtual. llvm-svn: 297727
* Fix typos in ADCE commentsTobias Grosser2017-03-141-7/+7
| | | | llvm-svn: 297726
* [ELF] - Devirtualize LinkerScriptBase::getOutputSectionGeorge Rimar2017-03-142-17/+15
| | | | | | It does not use ELFT templates so can be non-virtual. llvm-svn: 297725
OpenPOWER on IntegriCloud