summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [ORC] Add unit tests for the reexports utility that were left out of r336741,Lang Hames2018-07-112-1/+43
| | | | | | and fix a bug that these exposed. llvm-svn: 336760
* [WebAssembly] Add pass to infer prototypes for prototype-less functionsSam Clegg2018-07-115-0/+169
| | | | | | | | See https://bugs.llvm.org/show_bug.cgi?id=35385 Differential Revision: https://reviews.llvm.org/D48471 llvm-svn: 336759
* [ORC] Drop constexpr in unit test to appease a bot.Lang Hames2018-07-111-4/+4
| | | | llvm-svn: 336758
* [ORC] Use a gtest fixture to remove a bunch of boilerplate in CoreAPIsTest.cpp.Lang Hames2018-07-111-299/+144
| | | | llvm-svn: 336757
* [analyzer] Fix bots by changing the analyzer-config tests.George Karpenkov2018-07-112-4/+2
| | | | | | To be investigated. llvm-svn: 336756
* [analyzer] Partial revert of https://reviews.llvm.org/D49050George Karpenkov2018-07-111-8/+7
| | | | llvm-svn: 336755
* [Power9] Add remaining __flaot128 builtin support for FMA round to oddStefan Pintilie2018-07-112-46/+66
| | | | | | | | | | | | | | Implement this as it is done on GCC: __float128 a, b, c, d; a = __builtin_fmaf128_round_to_odd (b, c, d); // generates xsmaddqpo a = __builtin_fmaf128_round_to_odd (b, c, -d); // generates xsmsubqpo a = - __builtin_fmaf128_round_to_odd (b, c, d); // generates xsnmaddqpo a = - __builtin_fmaf128_round_to_odd (b, c, -d); // generates xsnmsubpqp Differential Revision: https://reviews.llvm.org/D48218 llvm-svn: 336754
* [analyzer] Pass through all arguments from the registerChecker() to the ↵George Karpenkov2018-07-112-25/+13
| | | | | | | | | | checker constructor A lot of checkers could be cleaned up in a similar way Differential Revision: https://reviews.llvm.org/D49050 llvm-svn: 336753
* [test cases] add test cases for find more abs patternChen Zheng2018-07-111-0/+87
| | | | | | Differential Revision: https://reviews.llvm.org/D49123 llvm-svn: 336752
* [TableGen] Fix some bad formatting. NFCCraig Topper2018-07-111-4/+4
| | | | llvm-svn: 336751
* [SemaCXX] Remove comment from coroutines test, NFCBrian Gesiak2018-07-111-2/+0
| | | | | | | | | Summary: The file name was accidentally included when the test file was added. Test Plan: check-clang llvm-svn: 336750
* Add libcxxabi option back for sanitizer use.Stephen Hines2018-07-111-0/+2
| | | | | | | | | | | | | | | | | | Summary: A prior refactoring accidentally dropped the case for using libc++abi as the out-of-tree C++ runtime library for sanitizers. This patch restores that functionality, which is used by Android, which can't depend on the full libc++ for these libraries. Reviewers: phosek, EricWF Reviewed By: phosek Subscribers: meikeb, kongyi, chh, mgorny, delcypher, llvm-commits, #sanitizers, pirama Differential Revision: https://reviews.llvm.org/D49157 llvm-svn: 336749
* Remove qualtype qualifier in coroutine error to prevent assert in debugBrian Gesiak2018-07-112-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A forward-declared coroutine_traits should trip an error; we need a complete type. Unfortunately, in debug mode only, we trip an assert when attempting to provide the fully qualified type for the error message. If you try to compile a program with a forward-declared coroutine_traits in debug mode, clang will crash. I've included a test for the behavior and removed the q modifier on the error message. This prevents the crash in debug mode and does not change the behavior for the error message on a forward-declaration of a coroutine_traits type. Test Plan: I've included a test for the forward-declaration. Patch by Tanoy Sinha! Reviewers: modocache, GorNishanov Reviewed By: modocache Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49099 llvm-svn: 336748
* [docs] List correct default for -ftemplate-depth; also add missingRichard Smith2018-07-111-1/+6
| | | | | | documentation for -fconstexpr-steps. llvm-svn: 336747
* PR38095: Allow constant-folding of loads through bitcasted pointers ifRichard Smith2018-07-112-3/+17
| | | | | | the bitcast only changed cvr-qualifications within the pointer type. llvm-svn: 336746
* DR330: look through array types when forming the cv-decomposition of a type.Richard Smith2018-07-118-57/+183
| | | | | | | | | | This allows more qualification conversions, eg. conversion from 'int *(*)[]' -> 'const int *const (*)[]' is now permitted, along with all the consequences of that: more types are similar, more cases are permitted by const_cast, and conversely, fewer "casting away constness" cases are permitted by reinterpret_cast. llvm-svn: 336745
* [LangRef] Clarify alloca of zero bytes.Eli Friedman2018-07-111-3/+3
| | | | | | | | | Let's be conservative here; it matches what we actually implemented, and it should be rare in practice anyway. Differential Revision: https://reviews.llvm.org/D49042 llvm-svn: 336744
* Refactor GdbIndexSection. NFC.Rui Ueyama2018-07-103-161/+165
| | | | | | | | | | | | | | | | This patch merges createGdbIndex function and GdbIndexSection's constructor into a single static member function of the class. This patch also change how we keep CU vectors. Previously, CuVector and GdbSymbols were parallel arrays, but there's no reason to choose that design. Now, CuVector is a member of GdbSymbol class. A lot of members are removed from GdbIndexSection. Previously, it has members that need to be kept in sync over several phases. I belive the new design is less error-prone, and the new code is much easier to read than before. llvm-svn: 336743
* [ARM] Treat cmn immediates as legal in isLegalICmpImmediate.Eli Friedman2018-07-104-12/+13
| | | | | | | | | | | | | The original code attempted to do this, but the std::abs() call didn't actually do anything due to implicit type conversions. Fix the type conversions, and perform the correct check for negative immediates. This probably has very little practical impact, but it's worth fixing just to avoid confusion in the future, I think. Differential Revision: https://reviews.llvm.org/D48907 llvm-svn: 336742
* [ORC] Generalize alias materialization to support re-exports (i.e. aliasing ofLang Hames2018-07-103-47/+195
| | | | | | | | | symbols in another VSO). Also fixes a bug where chained aliases within a single VSO would deadlock on materialization. llvm-svn: 336741
* [X86] Also fix the test for _mm512_mullo_epi64 to test the intrinsic instead ↵Craig Topper2018-07-101-1/+1
| | | | | | | | of a copy of the intrinsic implementation. This had the same issue I just fixed in r336739. Apparently I copy pasted _mm512_mullo_epi64 when I added _mm512_mullox_epi64. llvm-svn: 336740
* [X86] Fix the test for _mm512_mullox_epi64 to test the intrinsic instead of ↵Craig Topper2018-07-101-1/+1
| | | | | | a copy of the intrinsic implementation. llvm-svn: 336739
* Fix determination of whether a reinterpret_cast casts away constness.Richard Smith2018-07-104-180/+223
| | | | | | | | | | | | | | The "casts away constness" check doesn't care at all how the different layers of the source and destination type were formed: for example, if the source is a pointer and the destination is a pointer-to-member, the types are still decomposed and their pointee qualifications are still checked. This rule is bizarre and somewhat ridiculous, so as an extension we accept code making use of such reinterpret_casts with a warning outside of SFINAE contexts. llvm-svn: 336738
* Use ExprMutationAnalyzer in performance-for-range-copyShuai Wang2018-07-102-3/+17
| | | | | | | | | | | | | | | | | | | | | Summary: This gives better coverage to the check as ExprMutationAnalyzer is more accurate comparing to isOnlyUsedAsConst. Majority of wins come from const usage of member field, e.g.: for (auto widget : container) { // copy of loop variable if (widget.type == BUTTON) { // const usage only recognized by ExprMutationAnalyzer // ... } } Reviewers: george.karpenkov Subscribers: a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D48854 llvm-svn: 336737
* Sort includes + include a missing `extern "C"` headerGeorge Burgess IV2018-07-101-1/+2
| | | | | | | | | | If we don't include Initialization.h, `LLVMInitializeAggressiveInstCombiner` won't see its `extern "C"` decl. This causes sadness, name mangling, and linker errors. Reported on the mailing lists by Vladimir Vissoultchev. Thanks! llvm-svn: 336736
* [X86] Remove AddedComplexity from all patterns that use X86vzmovl as their root.Craig Topper2018-07-104-183/+139
| | | | | | | | Some added 20 and some added 15. Its unclear when to use which value and whether they are required at all. This patch removes them all. If we start finding real world issues we may need to add them back with proper tests. llvm-svn: 336735
* Refactor ClangUserExpression::Parse [NFC]Raphael Isemann2018-07-102-30/+63
| | | | | | | | | | | | | | | | Summary: This patch splits out functionality from the `Parse` method into different methods. This benefits the code completion work (which should reuse those methods) and makes the code a bit more readable. Note that this patch is as minimal as possible. Some of the code in the new methods definitely needs more refactoring. Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D48339 llvm-svn: 336734
* Fix -Wmismatched-tags warningRichard Trieu2018-07-101-1/+1
| | | | | | class -> struct in forward declaration. llvm-svn: 336733
* [windows] LLDB shows the wrong values when register read is executed at a ↵Stella Stamenova2018-07-109-70/+76
| | | | | | | | | | | | | | | | | | | frame other than zero Summary: This is a clean version of the change suggested here: https://bugs.llvm.org/show_bug.cgi?id=37495 The main change is to follow the same pattern as non-windows targets and use an unwinder object to retrieve the register context. I also changed a couple of the comments to actually log, so that issues with unsupported scenarios can be tracked down more easily. Lastly, ClearStackFrames is implemented in the base class, so individual thread implementations don't have to override it. Reviewers: asmith, zturner, aleksandr.urakov Reviewed By: aleksandr.urakov Subscribers: emaste, stella.stamenova, tatyana-krasnukha, llvm-commits Differential Revision: https://reviews.llvm.org/D49111 llvm-svn: 336732
* [X86] Teach X86InstrInfo::commuteInstructionImpl to use MOVSD/MOVSS for ↵Craig Topper2018-07-103-9/+29
| | | | | | | | | | BLEND under optsize when the immediate allows it. Isel currently emits movss/movsd a lot of the time and an accidental double commute turns it into a blend. Ideally we'd select blend directly in isel under optspeed and not rely on the double commute to create blend. llvm-svn: 336731
* [NFC] typoJF Bastien2018-07-101-1/+1
| | | | llvm-svn: 336730
* [NFC] Switch CodeGenFunction to use value init instead of member init listsErich Keane2018-07-102-56/+40
| | | | | | | | | The member init list for the sole constructor for CodeGenFunction has gotten out of hand, so this patch moves the non-parameter-dependent initializations into the member value inits. Note: This is what was intended to be committed in r336726 llvm-svn: 336729
* [X86] Remove X86ISD::MOVLPS and X86ISD::MOVLPD. NFCICraig Topper2018-07-105-90/+8
| | | | | | | | | | | | These ISD nodes try to select the MOVLPS and MOVLPD instructions which are special load only instructions. They load data and merge it into the lower 64-bits of an XMM register. They are logically equivalent to our MOVSD node plus a load. There was only one place in X86ISelLowering that used MOVLPD and no places that selected MOVLPS. The one place that selected MOVLPD had to choose between it and MOVSD based on whether there was a load. But lowering is too early to tell if the load can really be folded. So in isel we have patterns that use MOVSD for MOVLPD if we can't find a load. We also had patterns that select the MOVLPD instruction for a MOVSD if we can find a load, but didn't choose the MOVLPD ISD opcode for some reason. So it seems better to just standardize on MOVSD ISD opcode and manage MOVSD vs MOVLPD instruction with isel patterns. llvm-svn: 336728
* Revert -r336726, which included more files than intended.Erich Keane2018-07-1023-589/+141
| | | | llvm-svn: 336727
* [NFC] Switch CodeGenFunction to use value init instead of member init listsErich Keane2018-07-1023-141/+589
| | | | | | | | The member init list for the sole constructor for CodeGenFunction has gotten out of hand, so this patch moves the non-parameter-dependent initializations into the member value inits. llvm-svn: 336726
* [libFuzzer] Disable dataflow.test on AArch64.Matt Morehouse2018-07-101-0/+1
| | | | | | | | | | | | | | | | | | | Summary: After my recent change to allow MSan + libFuzzer, the ExplodeDFSanLabelsTest.cpp test started to overflow the stack with recursive function SetBytesForLabel() on an AArch64 bot. Perhaps that bot has a smaller stack size, or maybe AArch64 has larger stack frames for this particular function. Reviewers: kcc, javed.absar Reviewed By: kcc Subscribers: kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D49150 llvm-svn: 336725
* [testsuite] Implement a category to skip libstdcxx testsDavide Italiano2018-07-1011-30/+28
| | | | | | | | | | | | | | | | On systems where it's not supported. As far as I understand Linux is the only systems which now ships with libstdcxx (maybe NetBSD?, but I'm not entirely sure of the state of lldb on the platform). We could make this more fine grained looking for the header as we do for libcxx. This is a little tricky as there's no such thing as /usr/include/c++/v1, but libstdcxx encodes the version number in the path (i.e. /usr/include/c++/5.4). I guess we might match a regex, but it seems fragile to me. Differential Revision: https://reviews.llvm.org/D49110 llvm-svn: 336724
* Refactor parsing of option lists with a raw string suffix.Raphael Isemann2018-07-1012-232/+472
| | | | | | | | | | | | | | | | | | | | | | Summary: A subset of the LLDB commands follows this command line interface style: <command name> [arguments] -- <string suffix> The parsing code for this interface has been so far been duplicated into the different command objects which makes it hard to maintain and reuse elsewhere. This patches improves the situation by adding a OptionsWithRaw class that centralizes the parsing logic and allows easier testing. The different commands now just call this class to extract the arguments and the raw suffix from the provided user input. Reviewers: jingham Reviewed By: jingham Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D49106 llvm-svn: 336723
* [AMDGPU] Fix layering issue with AMDGPUHSAMetadataStreamer (NFC)Scott Linder2018-07-105-2/+2
| | | | llvm-svn: 336722
* [ThinLTO] Use std::map to get determistic imports filesTeresa Johnson2018-07-106-16/+40
| | | | | | | | | | | | | | | | | | | | | | Summary: I noticed that the .imports files emitted for distributed ThinLTO backends do not have consistent ordering. This is because StringMap iteration order is not guaranteed to be deterministic. Since we already have a std::map with this information, used when emitting the individual index files (ModuleToSummariesForIndex), use it for the imports files as well. This issue is likely causing some unnecessary rebuilds of the ThinLTO backends in our distributed build system as the imports files are inputs to those backends. Reviewers: pcc, steven_wu, mehdi_amini Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D48783 llvm-svn: 336721
* [X86] Remove dead SDNode object from X86InstrFragmentsSIMD.td. NFCCraig Topper2018-07-101-1/+0
| | | | | | It points to an opcode that doesn't exist. llvm-svn: 336720
* Revert "[Fuzzer] Afl driver changing iterations handling"Matt Morehouse2018-07-102-28/+7
| | | | | | | | | | | This reverts rL334510 due to breakage of afl_driver's command line interface. Patch By: Jonathan Metzman Differential Revision: https://reviews.llvm.org/D49141 llvm-svn: 336719
* Revert r336653 "[VPlan] Add VPlanTestBase.h with helper class to build VPlan ↵Evgeniy Stepanov2018-07-102-76/+30
| | | | | | | | | | | | | | | | | | | | | | | | | for tests." Memory leaks in tests. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/6289/steps/check-llvm%20asan/logs/stdio Direct leak of 192 byte(s) in 1 object(s) allocated from: #0 0x554ea8 in operator new(unsigned long) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:106 #1 0x56cef1 in llvm::VPlanTestBase::doAnalysis(llvm::Function&) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/unittests/Transforms/Vectorize/VPlanTestBase.h:53:14 #2 0x56bec4 in llvm::VPlanTestBase::buildHCFG(llvm::BasicBlock*) /b/sanitizer-x86_64-linux-bootstrap/build/llvm/unittests/Transforms/Vectorize/VPlanTestBase.h:57:3 #3 0x571f1e in llvm::(anonymous namespace)::VPlanHCFGTest_testVPInstructionToVPRecipesInner_Test::TestBody() /b/sanitizer-x86_64-linux-bootstrap/build/llvm/unittests/Transforms/Vectorize/VPlanHCFGTest.cpp:119:15 #4 0xed2291 in testing::Test::Run() /b/sanitizer-x86_64-linux-bootstrap/build/llvm/utils/unittest/googletest/src/gtest.cc #5 0xed44c8 in testing::TestInfo::Run() /b/sanitizer-x86_64-linux-bootstrap/build/llvm/utils/unittest/googletest/src/gtest.cc:2656:11 #6 0xed5890 in testing::TestCase::Run() /b/sanitizer-x86_64-linux-bootstrap/build/llvm/utils/unittest/googletest/src/gtest.cc:2774:28 #7 0xef3634 in testing::internal::UnitTestImpl::RunAllTests() /b/sanitizer-x86_64-linux-bootstrap/build/llvm/utils/unittest/googletest/src/gtest.cc:4649:43 #8 0xef27e0 in testing::UnitTest::Run() /b/sanitizer-x86_64-linux-bootstrap/build/llvm/utils/unittest/googletest/src/gtest.cc #9 0xebbc23 in RUN_ALL_TESTS /b/sanitizer-x86_64-linux-bootstrap/build/llvm/utils/unittest/googletest/include/gtest/gtest.h:2233:46 #10 0xebbc23 in main /b/sanitizer-x86_64-linux-bootstrap/build/llvm/utils/unittest/UnitTestMain/TestMain.cpp:51 #11 0x7f65569592e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0) and more. llvm-svn: 336718
* Patch to fix pragma metadata for do-while loopsBjorn Pettersson2018-07-102-5/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Make sure that loop metadata only is put on the backedge when expanding a do-while loop. Previously we added the loop metadata also on the branch in the pre-header. That could confuse optimization passes and result in the loop metadata being associated with the wrong loop. Fixes https://bugs.llvm.org/show_bug.cgi?id=38011 Committing on behalf of deepak2427 (Deepak Panickal) Reviewers: #clang, ABataev, hfinkel, aaron.ballman, bjope Reviewed By: bjope Subscribers: bjope, rsmith, shenhan, zzheng, xbolva00, lebedev.ri, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D48721 llvm-svn: 336717
* Revert r336590 "[libclang] evalute compound statement cursors before trying ↵Evgeniy Stepanov2018-07-102-54/+13
| | | | | | | | | to evaluate" New memory leaks in LibclangParseTest_EvaluateChildExpression_Test::TestBody() llvm-svn: 336716
* Revert r336591 "[libclang] NFC, simplify clang_Cursor_Evaluate"Evgeniy Stepanov2018-07-101-24/+25
| | | | | | This change is blocking r336590 which is being reverted due to memory leaks. llvm-svn: 336715
* Limit ASan non-executable-pc test case to x86 botsVlad Tsyrklevich2018-07-101-10/+4
| | | | | | | | The test case fails on the big-endian PPC bot, probably because PowerPC uses function descriptors. More over other architectures don't support NX mappings. (This test case was not being exercised prior to r336633.) llvm-svn: 336714
* [CMake] Set per-runtime library directory suffix in runtimes buildPetr Hosek2018-07-104-22/+7
| | | | | | | | | | | | Do not use LLVM_RUNTIMES_LIBDIR_SUFFIX variable which is an internal variable used by the runtimes build from individual runtimes, instead set per-runtime librarhy directory suffix variable which is necessary for the sanitized runtimes build to install libraries into correct location. Differential Revision: https://reviews.llvm.org/D49121 llvm-svn: 336713
* [X86] Remove AddedComplexity from register form of NOT. NFCICraig Topper2018-07-101-3/+0
| | | | | | | | I believe isProfitableToFold will stop the load folding that this was intended to overcome. Given an (xor load, -1), isProfitableToFold will see that the immediate can be folded with the xor using a one byte immediate since it can be sign extended. It doesn't know about NOT, but the one byte immediate check is enough to stop the fold. llvm-svn: 336712
* [X86] Remove AddedComplexity from MMX_X86movw2d patterns.Craig Topper2018-07-101-9/+6
| | | | | | There were only 3 patterns with this node as a root and they all the same AddedComplexity. So this doesn't really do anything. llvm-svn: 336711
OpenPOWER on IntegriCloud