summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [InstCombine] add tests for unsigned saturated add; NFCSanjay Patel2019-02-171-0/+32
| | | | | | We're missing IR canonicalizations for this op as shown in D51929. llvm-svn: 354219
* [NFC] Factor out a function for future reuseMax Kazantsev2019-02-171-8/+15
| | | | llvm-svn: 354218
* Revert [NFC] Better encapsulation of llvm::Optional StorageSerge Guelton2019-02-171-16/+14
| | | | | | I'm getting the feealing that current Optional implementation is full of UB :-/ llvm-svn: 354217
* Revert "[AST] Factor out the logic of the various Expr::Ignore*"Bruno Ricci2019-02-172-154/+187
| | | | | | | This breaks some clang-tidy checks. For some reason they were not included in check-clang ? llvm-svn: 354216
* [AST] Factor out the logic of the various Expr::Ignore*Bruno Ricci2019-02-172-187/+154
| | | | | | | | | | | | | | | | | Now that the implementation of all of the Expr::Ignore* is in Expr.cpp we can try to remove some duplication. Do this by separating the logic of the Expr::Ignore* from the iterative loop. This is NFC, except for one change: IgnoreParenImpCasts now skips, among other things, everything that IgnoreImpCasts skips. This means FullExpr are now skipped by IgnoreParenImpCasts. This was likely an oversight when FullExpr was added to the nodes skipped by IgnoreImpCasts. Differential Revision: https://reviews.llvm.org/D57267 Reviewed By: aaron.ballman (with comments from void and rnk) llvm-svn: 354215
* [NFC] Better encapsulation of llvm::Optional StorageSerge Guelton2019-02-171-14/+16
| | | | llvm-svn: 354214
* [compiler-rt] Build custom libcxx with libcxxabiJonas Hahnfeld2019-02-1716-46/+74
| | | | | | | | | | | | | | | This changes add_custom_libcxx to also build libcxxabi and merges the two into a static and hermetic library. There are multiple advantages: 1) The resulting libFuzzer doesn't expose C++ internals and looks like a plain C library. 2) We don't have to manually link in libstdc++ to provide cxxabi. 3) The sanitizer tests cannot interfere with an installed version of libc++.so in LD_LIBRARY_PATH. Differential Revision: https://reviews.llvm.org/D58013 llvm-svn: 354212
* [X86] Prevent clang clobber checking for asm flag constraints.Nirav Dave2019-02-172-1/+12
| | | | | | | Update getConstraintRegister as X86 Asm flag output constraints are no longer fully alphanumeric, llvm-svn: 354211
* [Driver][Gnu] Support -nolibc flagPetr Hosek2019-02-173-2/+8
| | | | | | | | | This can be used to disable libc linking. This flag is supported by GCC since version 9 as well as some Clang target toolchains. Differential Revision: https://reviews.llvm.org/D58326 llvm-svn: 354210
* [LLVMSupport]: Remove a severely outdated README.Kristina Brooks2019-02-171-43/+0
| | | | | | | | | | | | | | | | | | | The LLVM Support library implementation has resided in //llvm/lib/Support for a significant amount of time now, with documentation having been updated with all references to the "System library" being replaced with "Support library". Since this file mirrors already existing documentation available for Support library, includes dead links to documentation and still refers to it as "System library", having it there is confusing and updating it has very little point as it duplicates information in documentation, except documentation is a lot more up to date while this file has not been maintained. Up to date documentation concerning this can be found here: http://llvm.org/docs/SupportLibrary.html llvm-svn: 354209
* [Driver][Fuchsia] Support -nolibc flagPetr Hosek2019-02-173-1/+29
| | | | | | | | | | | This can be used to disable libc linking. This flag is supported by GCC since version 9 as well as some Clang target toolchains. This change also includes tests for all -no* flags which previously weren't covered. Differential Revision: https://reviews.llvm.org/D58325 llvm-svn: 354208
* [bindings/go] Fix building on 32-bit systems (ARM etc.)whitequark2019-02-161-1/+1
| | | | | | | | | | | | | | | | | | | Summary: The patch in https://reviews.llvm.org/D53883 (by me) fails to build on 32-bit systems like ARM. Fix the array size to be less ridiculously large. 2<<20 should still be enough for all practical purposes. Bug: https://bugs.llvm.org/show_bug.cgi?id=40426 Reviewers: whitequark, pcc Reviewed By: whitequark Subscribers: javed.absar, kristof.beyls, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58030 llvm-svn: 354207
* Add PythonBoolean type to the PythonDataObjectsTatyana Krasnukha2019-02-163-0/+103
| | | | | | Differential Revision: https://reviews.llvm.org/D57817 llvm-svn: 354206
* Fixed code snippet in Kaleidoscope tutorial to reflect final full code listingWilfred Hughes2019-02-161-1/+1
| | | | | | | | Patch by Frank He. Differential Revision: https://reviews.llvm.org/D52166 llvm-svn: 354205
* [testsuite] Skip this test correctly also on macOS.Davide Italiano2019-02-161-3/+2
| | | | llvm-svn: 354204
* Fix typo in docsDmitri Gribenko2019-02-161-1/+1
| | | | | | | | Patch by Alex Yursha. Differential Revision: https://reviews.llvm.org/D45903 llvm-svn: 354203
* Fix TestDataFormatterLibcxxListLoop.py testRaphael Isemann2019-02-161-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The compilation of the TestDataFormatterLibcxxListLoop.py currently fails with this error: ``` functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/main.cpp:19:24: error: no member named '__value_' in 'std::__1::__list_node_base<int, void *>' assert(third_elem->__value_ == 3); ~~~~~~~~~~ ^ ``` It seems the internal structure of list has changed with the 3.8 release. This patch makes the test compile with the current libc++ and with the previous libc++. Reviewers: shafik, zturner, labath Reviewed By: labath Subscribers: christof, jdoerfert, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D58273 llvm-svn: 354202
* Move multiline raw string literal out of macro. NFCDavid Green2019-02-161-18/+16
| | | | | | | | Certain combinations of gcc and ccache fail when the raw string literal is preprocessed. This just moves the string out as is done elsewhere in the same file. llvm-svn: 354201
* Revert r354199: Make Optional<T> Trivially Copyable when T is trivially ↵Serge Guelton2019-02-162-60/+0
| | | | | | copyable llvm-svn: 354200
* Make Optional<T> Trivially Copyable when T is trivially copyableSerge Guelton2019-02-162-0/+60
| | | | | | | This is another attempt in the process, works nicely on my setup, let's check how it behaves on other targets. llvm-svn: 354199
* [compiler-rt] Cleanup usage of C++ ABI libraryJonas Hahnfeld2019-02-1610-40/+74
| | | | | | | | | | | | | Add missed value "libcxxabi" and introduce SANITIZER_TEST_CXX for linking unit tests. This needs to be a full C++ library and cannot be libcxxabi. Recommit r354132 which I reverted in r354153 because it broke a sanitizer bot. This was because of the "fixes" for pthread linking, so I've removed these changes. Differential Revision: https://reviews.llvm.org/D58012 llvm-svn: 354198
* [X86] When type legalizing the result of a i64 fp_to_uint on 32-bit targets. ↵Craig Topper2019-02-162-43/+28
| | | | | | | | | | Generate all of the ops as i64 and let them be legalized. No need to manually split everything. We can let the type legalizer work for us. The test change seems to be caused by some DAG ordering issue that was previously circumventing a one use check in LowerSELECT where FP selects are turned into blends if the setcc has one use. But it was running after an integer select and the same setcc had been legalized to cmov and X86SISD::CMP. This dropped the use count of the setcc, but wasn't what was intended. llvm-svn: 354197
* llvm-nm: Observe -no-llvm-bc for archive membersDave Lee2019-02-162-6/+23
| | | | | | | | | | | | | | | | | | | | | Summary: This change fixes the `-no-llvm-bc` flag to work with object files within archives. Currently the `-no-llvm-bc` flag works for regular object files, but not static libraries, where it continues to show bitcode symbol info. Original support was added in D4371. Reviewers: compnerd, smeenai, pcc Reviewed By: compnerd Subscribers: rupprecht, keith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D48798 llvm-svn: 354196
* [clang-tidy] Delete obsolete objc-property-declaration options ✂️Stephane Moore2019-02-164-35/+6
| | | | | | | | | | | | | | | | | | | | | | Summary: The Acronyms and IncludeDefaultAcronyms options were deprecated in https://reviews.llvm.org/D51832. These options can be removed. Tested by running the clang-tidy tests. This is an amended resubmission of https://reviews.llvm.org/D56945. Reviewers: Eugene.Zelenko, aaron.ballman Reviewed By: aaron.ballman Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57080 llvm-svn: 354195
* [CMake] Use variables rather than ":" delimitersPetr Hosek2019-02-161-5/+3
| | | | | | | | This is a follow up to D37644, this block was missed in that change. Differential Revision: https://reviews.llvm.org/D58093 llvm-svn: 354194
* [X86] Don't prevent load folding for cvtsi2ss/cvtsi2sd based on ↵Craig Topper2019-02-167-95/+78
| | | | | | | | | | hasPartialRegUpdate. Preventing the load fold won't fix the partial register update since the input we can fold is a GPR. So it will do nothing to prevent a false dependency on an XMM register. llvm-svn: 354193
* Fix some tests I broke in r354190Erik Pilkington2019-02-162-2/+2
| | | | | | | This was breaking on MSVC, since long double and double have the same semantics there. llvm-svn: 354192
* [libFuzzer] make len_control less agressive: set the initial max len to the ↵Kostya Serebryany2019-02-162-1/+16
| | | | | | length of the largest seed. This was the original intent, but... Now, with a test, to ensure it stays this way llvm-svn: 354191
* [Sema] Diagnose floating point conversions based on target semanticsErik Pilkington2019-02-164-11/+49
| | | | | | | | | | ...instead of just comparing rank. Also, fix a bad warning about _Float16, since its declared out of order in BuiltinTypes.def, meaning comparing rank using BuiltinType::getKind() is incorrect. Differential revision: https://reviews.llvm.org/D58254 llvm-svn: 354190
* [ObjC generics] Fix applying `__kindof` to the type parameter.Volodymyr Sapsai2019-02-162-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the warning about incompatible pointer types on assigning to a subclass of type argument an expression of type `__kindof TypeParam`. We already have a mechanism in `ASTContext::canAssignObjCInterfaces` that handles `ObjCObjectType` with `__kindof`. But it wasn't triggered because during type substitution `__kindof TypeParam` was represented as `AttributedType` with attribute `ObjCKindOf` and equivalent type `TypeArg`. For assignment type checking we use canonical types so attributed type was desugared and the attribute was ignored. The fix is in checking transformed `AttributedType` and pushing `__kindof` down into `ObjCObjectType` when necessary. rdar://problem/38514910 Reviewers: ahatanak, erik.pilkington, doug.gregor Reviewed By: doug.gregor Subscribers: jkorous, dexonsmith, manmanren, jordan_rose, doug.gregor, cfe-commits Differential Revision: https://reviews.llvm.org/D57076 llvm-svn: 354189
* [lit] Remove LitTestCaseJulian Lettner2019-02-167-87/+0
| | | | | | | | | | | | | From the docs: `class LitTestCase(unittest.TestCase)` LitTestCase is an adaptor for providing a 'unittest' compatible interface to 'lit' tests so that we can run lit tests with standard python test runners. It does not seem to be used anywhere. Differential Revision: https://reviews.llvm.org/D58264 llvm-svn: 354188
* [lit][NFC] Cleanup lit worker process handlingJulian Lettner2019-02-163-106/+109
| | | | | | | | | | | | | | | | | Move code that is executed on worker process to separate file. This makes the use of the pickled arguments stored in global variables in the worker a bit clearer. (Still not pretty though.) Extract handling of parallelism groups to it's own function. Use BoundedSemaphore instead of Semaphore. BoundedSemaphore raises for unmatched release() calls. Cleanup imports. Differential Revision: https://reviews.llvm.org/D58196 llvm-svn: 354187
* [libFuzzer] fork mode: try harder to cleanup after itselfKostya Serebryany2019-02-163-11/+36
| | | | llvm-svn: 354186
* Temporarily disable test:Richard Smith2019-02-161-1/+4
| | | | | | | | | test/lang/cpp/class-template-parameter-pack/TestClassTemplateParameterPack.py It fails on Mac OS; apparently a VarDecl 'void *&C' is implicitly declared there, making the class template name C ambiguous. llvm-svn: 354185
* [PPC64] Preserve LocalEntry when linkingRui Ueyama2019-02-152-0/+52
| | | | | | | | | | | | | On PowerPC64, it is necessary to keep the LocalEntry bits in st_other, especially when -r is used. Otherwise, when the resulting object is used in a posterior linking, LocalEntry info will be unavailable and functions may be called through the wrong entrypoint. Patch by Leandro Lupori. Differential Revision: https://reviews.llvm.org/D56782 llvm-svn: 354184
* clang-format with UseTab: Always sometimes doesn't insert the right amount ↵Alexander Kornienko2019-02-152-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of tabs. Trailing comments are not always aligned properly when UseTab is set to Always. Consider: int a; // x int bbbbbbbb; // x With .clang-format: --- Language: Cpp BasedOnStyle: LLVM UseTab: Always ... The trailing comments of this code block should be aligned, but aren't To align the first trailing comment it needs to insert 8 spaces. This should be one tab plus six spaces. It skips the logic of the first partial tab in FirstTabWidth (=2) + Style.TabWidth (=8) <= Spaces (=8) and only inserts one tab. Proposed fix and test is attached. Patch by Hylke Kleve. Differential revision: https://reviews.llvm.org/D57655 llvm-svn: 354183
* [EarlyCSE & MSSA] Cap the clobbering calls in EarlyCSE.Alina Sbirlea2019-02-151-2/+13
| | | | | | | | | | | | | | | | | | | Summary: Unlimitted number of calls to getClobberingAccess can lead to high compile times in pathological cases. Limitting getClobberingAccess to a fairly high number. Can be adjusted based on users/need. Note: this is the only user of MemorySSA currently enabled by default. The same handling exists in LICM (disabled atm). As MemorySSA gains more users, this logic of capping will need to move inside MemorySSA. Reviewers: george.burgess.iv Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D58248 llvm-svn: 354182
* Add some unconditional logging on the failure points when attachingJason Molenda2019-02-153-42/+69
| | | | | | | | | | | | | | to a process so we'll always get messages in the console logs. Also make the "is frontboard process" / "is backboard process" determination lazy, specifically take it out of the MachProcess::AttachForDebug codepath when we are attaching to a process, to simplify attaching. <rdar://problem/47982516> <rdar://problem/48060134> llvm-svn: 354181
* [ObjC] For type substitution in generics use a regular recursive type visitor.Volodymyr Sapsai2019-02-151-212/+185
| | | | | | | | | | | | | | | | Switch to the inheritance-based visitor from the lambda-based visitor to allow both preorder and postorder customizations during type transformation. NFC intended. Reviewers: ahatanak, erik.pilkington Reviewed By: erik.pilkington Subscribers: jkorous, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D57075 llvm-svn: 354180
* [Sanitizer] iOS: Pull up parallelism_group handling into common.lit.configJulian Lettner2019-02-156-17/+3
| | | | | | | | | | | | | | | | | | | Serial execution on iOS devices is not specific to sanitizers. We want to throttle all on-device tests. Pull the setting of the parallelism_group up into the common lit configuration file. Rename `darwin-ios-device-sanitizer` to `ios-device`. This group is not specific to sanitizers and (theoretically) independent from the host OS. Note that we don't support running unit tests on-device (there are no configurations generated for that). If that ever changes, we also need this configuration in `unittests/lit.common.unit.cfg`. Reviewers: delcypher Differential Revision: https://reviews.llvm.org/D58209 llvm-svn: 354179
* [X86] Don't set exception mask bits when modifying FPCW to change rounding ↵Craig Topper2019-02-1511-264/+278
| | | | | | | | | | | | mode for fp->int conversion When we need to do an fp->int conversion using x87 instructions, we need to temporarily change the rounding mode to 0b11 and perform a store. To do this we save the old value of the fpcw to the stack, then set the fpcw to 0xc7f, do the store, then restore fpcw. But the 0xc7f value forces the exception mask bits 1. While this is what they would be in the default FP environment, as we move to support changing the FP environments, we shouldn't make this assumption. This patch changes the code to explicitly OR 0xc00 with the old value so that only the rounding mode is changed. Unfortunately, this requires two stack temporaries instead of one. One to hold the old value and one to hold the new value. Without two stack temporaries we would need an additional GPR. We already need one to do the OR operation in. This is similar to what gcc and icc do for this operation. Though they are both better at reusing the stack temporaries when there are multiple truncates in a function(or at least in a basic block) Differential Revision: https://reviews.llvm.org/D57788 llvm-svn: 354178
* Revert "Don't include UnixSignals.h from Host."Davide Italiano2019-02-1512-37/+22
| | | | | | It broke the modules green dragon buildbot. llvm-svn: 354177
* Fix implementation of [temp.local]p4.Richard Smith2019-02-159-89/+184
| | | | | | | | | | | | | | | | | | | | | | | | When a template-name is looked up, we need to give injected-class-name declarations of class templates special treatment, as they denote a template rather than a type. Previously we achieved this by applying a filter to the lookup results after completing name lookup, but that is incorrect in various ways, not least of which is that it lost all information about access and how members were named, and the filtering caused us to generally lose all ambiguity errors between templates and non-templates. We now preserve the lookup results exactly, and the few places that need to map from a declaration found by name lookup into a declaration of a template do so explicitly. Deduplication of repeated lookup results of the same injected-class-name declaration is done by name lookup instead of after the fact. This reinstates r354091, which was previously reverted in r354097 because it exposed bugs in lldb and compiler-rt. Those bugs were fixed in r354173 and r354174 respectively. llvm-svn: 354176
* [libFuzzer] form mode: add -ignore_crashes flag, honor the max_total_time ↵Kostya Serebryany2019-02-159-23/+70
| | | | | | flag, print the number of ooms/timeouts/crashes, fix a typo llvm-svn: 354175
* Fix invalid code that Clang trunk will soon diagnose.Richard Smith2019-02-151-1/+1
| | | | | | | | | | | | | There is an ambiguity between ::SizeClassMap (the typedef declared near the start of this file) and __sanitizer::SizeClassMap (found by the 'using namespace __sanitizer;' near the start of this file). Historically a Clang bug has meant that the error was not diagnosed, but soon Clang will start diagnosing it. Explicitly qualify this use of SizeClassMap so that it finds __sanitizer::SizeClassMap rather than being ill-formed due to ambiguity. llvm-svn: 354174
* Fix AST generated for a class template to connect the class inside aRichard Smith2019-02-151-0/+1
| | | | | | | | | | | | | | | | class template back to the template. Previously, when the ASTImporter imported the class, it didn't know that it was the pattern of a class template, so made the class a name lookup result for the name of the template, resulting in ambiguity errors when naming the template. Due to a clang bug (fixed in r354091, reverted and soon to be re-committed), ambiguity errors between a template and a non-template were previously not diagnosed. Once r354091 is re-committed, this will be covered by existing lldb tests. llvm-svn: 354173
* [win] Resolve the module only if there isn't one alreadyStella Stamenova2019-02-153-14/+23
| | | | | | | | | | | | | | | | | | Summary: This commit modifies the OnLoadModule method to resolve the module unless we already have one Change by Hui Huang to fix the failing LLDB tests on Windows Reviewers: labath, asmith Subscribers: abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D58303 llvm-svn: 354172
* [InstCombine] Address a couple stylistic issues pointed out by reviewer [NFC]Philip Reames2019-02-151-6/+6
| | | | | | Better addressing comments from https://reviews.llvm.org/D58290. llvm-svn: 354171
* [InstCombine] Convert atomicrmws to xchg or store where legalPhilip Reames2019-02-152-24/+75
| | | | | | | | | | Implement two more transforms of atomicrmw: 1) We can convert an atomicrmw which produces a known value in memory into an xchg instead. 2) We can convert an atomicrmw xchg w/o users into a store for some orderings. Differential Revision: https://reviews.llvm.org/D58290 llvm-svn: 354170
* Revert r354075 "[clang][FileManager] fillRealPathName even if we aren't ↵Reid Kleckner2019-02-152-17/+0
| | | | | | | | opening the file" The new test doesn't pass on Windows. llvm-svn: 354169
OpenPOWER on IntegriCloud