summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [WebAssembly] Pass ownership of body to SyntheticFunction. NFCNicholas Wilson2018-03-022-15/+15
| | | | | | | | | This avoids the Writer unnecessarily having a member to retain ownership of the function body. Differential Revision: https://reviews.llvm.org/D43933 llvm-svn: 326580
* [WebAssembly] Add validation for init function signatureNicholas Wilson2018-03-021-3/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D43947 llvm-svn: 326579
* [Power9] Add missing instructions to the Power 9 schedulerStefan Pintilie2018-03-021-8/+59
| | | | | | | Adding more instructions using InstRW so that we can move away from ItinRW and ultimately have a complete Power 9 scheduler. llvm-svn: 326578
* [WebAssembly] Check function type indexesNicholas Wilson2018-03-023-1/+20
| | | | | | | | Also update tests containing invalid Wasm files, exposed by the check Differential Revision: https://reviews.llvm.org/D43954 llvm-svn: 326577
* [Docs] Add LLVM for Grad Students to Contributing page.Florian Hahn2018-03-021-5/+10
| | | | | | | | | | | | | | Adrian Sampson's blog post provides a good and relatively up-do-date introduction to LLVM. I think this post could be helpful for people wanting to get started with LLVM. Reviewers: asb, tonic, silvas, probinson, kristof.beyls, rengolin Reviewed By: rengolin Differential Revision: https://reviews.llvm.org/D42904 llvm-svn: 326576
* [MergeICmps] Revert 324317 "Enable the MergeICmps Pass by default."Clement Courbet2018-03-024-20/+46
| | | | | | While working on PR36557. llvm-svn: 326575
* [MergeIcmps] Add the test case from PR36557.Clement Courbet2018-03-021-0/+160
| | | | | | | | | | Summary: See PR36557. Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44009 llvm-svn: 326574
* Test commit: Remove an extraneous space. NFCDavid Stenberg2018-03-021-1/+1
| | | | | | Test commit access. llvm-svn: 326573
* Revert "[WebAssembly] More uses of uint8_t" and "[WebAssembly] Update tests"Nicholas Wilson2018-03-022-22/+22
| | | | | | | | | | This reverts commits r326541 and r326571. The tests were correct, and were updated with incorrect expectations. The original commit was broken and should be reverted to get things back to a working state. llvm-svn: 326572
* [WebAssembly] Update tests after r326541Ilya Biryukov2018-03-021-9/+9
| | | | | | | | | | r326541 slightly increased the size of WebAssembly object files and it broke test/MC/WebAssembly/global-ctor-dtor.ll. This commit updates the test to unbreak it, also mentioned this to the author of the original commit in case they don't want it. llvm-svn: 326571
* [ARM] Fix codegen for VLD3/VLD4/VST3/VST4 with WBFlorian Hahn2018-03-027-16/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code generation of VLD3, VLD4, VST3 and VST4 with register writeback is broken due to 2 separate bugs: 1) VLD1d64TPseudoWB_register and VLD1d64QPseudoWB_register are missing rules to expand them to non pseudo MIR. These are selected for ARMISD::VLD3_UPD/VLD4_UPD with v1i64 vectors in SelectVLD. 2) Selection of the right VLD/VST instruction is broken for load and store of 3 and 4 v1i64 vectors. SelectVLD and SelectVST are called with MIR opcode for fixed writeback (ie increment is access size) and call getVLDSTRegisterUpdateOpcode() to select an opcode with register writeback if base register update is of a different size. Since getVLDSTRegisterUpdateOpcode() only knows about VLD1/VLD2/VST1/VST2 the call is currently conditional on the number of element in the vector. However, VLD1/VST1 is selected by SelectVLD/SelectVST's caller for load and stores of 3 or 4 v1i64 vectors. Therefore the opcode is not updated which later lead to a fixed writeback instruction being constructed with an extra operand for the register writeback. This patch addresses the two issues as follows: - it adds the necessary mapping from VLD1d64TPseudoWB_register and VLD1d64QPseudoWB_register to VLD1d64Twb_register and VLD1d64Qwb_register respectively. Like for the existing _fixed variants, the cost of these is bumped for unaligned access. - it changes the logic in SelectVLD and SelectVSD to call isVLDfixed and isVSTfixed respectively to decide whether the opcode should be updated. It also reworks the logic and comments for pushing the writeback offset operand and r0 operand to clarify the logic: writeback offset needs to be pushed if it's a register writeback, r0 needs to be pushed if not and the instruction is a VLD1/VLD2/VST1/VST2. Reviewers: rengolin, t.p.northover, samparker Reviewed By: samparker Patch by Thomas Preud'homme <thomas.preudhomme@arm.com> Differential Revision: https://reviews.llvm.org/D42970 llvm-svn: 326570
* [clang] Fix use-after-free on code completionIlya Biryukov2018-03-021-35/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Found by asan. Fiddling with code completion AST after FrontendAction::Exceute can lead to errors. Calling the callback in ProcessCodeCompleteResults to make sure we don't access uninitialized state. This particular issue comes from the fact that Sema::TUScope is deleted when destructor of ~Parser runs, but still present in Sema::TUScope and accessed when building completion items. I'm still struggling to come up with a small repro. The relevant stackframes reported by asan are: ERROR: AddressSanitizer: heap-use-after-free on address READ of size 8 at 0x61400020d090 thread T175 #0 0x5632dff7821b in llvm::SmallPtrSetImplBase::isSmall() const include/llvm/ADT/SmallPtrSet.h:195:33 #1 0x5632e0335901 in llvm::SmallPtrSetImplBase::insert_imp(void const*) include/llvm/ADT/SmallPtrSet.h:127:9 #2 0x5632e067347d in llvm::SmallPtrSetImpl<clang::Decl*>::insert(clang::Decl*) include/llvm/ADT/SmallPtrSet.h:372:14 #3 0x5632e065df80 in clang::Scope::AddDecl(clang::Decl*) tools/clang/include/clang/Sema/Scope.h:287:18 #4 0x5632e0623eea in clang::ASTReader::pushExternalDeclIntoScope(clang::NamedDecl*, clang::DeclarationName) clang/lib/Serialization/ASTReader.cpp #5 0x5632e062ce74 in clang::ASTReader::finishPendingActions() tools/clang/lib/Serialization/ASTReader.cpp:9164:9 .... #30 0x5632e02009c4 in clang::index::generateUSRForDecl(clang::Decl const*, llvm::SmallVectorImpl<char>&) tools/clang/lib/Index/USRGeneration.cpp:1037:6 #31 0x5632dff73eab in clang::clangd::(anonymous namespace)::getSymbolID(clang::CodeCompletionResult const&) tools/clang/tools/extra/clangd/CodeComplete.cpp:326:20 #32 0x5632dff6fe91 in clang::clangd::CodeCompleteFlow::mergeResults(std::vector<clang::CodeCompletionResult, std::allocator<clang::CodeCompletionResult> > const&, clang::clangd::SymbolSlab const&)::'lambda'(clang::CodeCompletionResult const&)::operator()(clang::CodeCompletionResult const&) tools/clang/tools/extra/clangd/CodeComplete.cpp:938:24 #33 0x5632dff6e426 in clang::clangd::CodeCompleteFlow::mergeResults(std::vector<clang::CodeCompletionResult, std::allocator<clang::CodeCompletionResult> > const&, clang::clangd::SymbolSlab const&) third_party/llvm/llvm/tools/clang/tools/extra/clangd/CodeComplete.cpp:949:38 #34 0x5632dff7a34d in clang::clangd::CodeCompleteFlow::runWithSema() llvm/tools/clang/tools/extra/clangd/CodeComplete.cpp:894:16 #35 0x5632dff6df6a in clang::clangd::CodeCompleteFlow::run(clang::clangd::(anonymous namespace)::SemaCompleteInput const&) &&::'lambda'()::operator()() const third_party/llvm/llvm/tools/clang/tools/extra/clangd/CodeComplete.cpp:858:35 #36 0x5632dff6cd42 in clang::clangd::(anonymous namespace)::semaCodeComplete(std::unique_ptr<clang::CodeCompleteConsumer, std::default_delete<clang::CodeCompleteConsumer> >, clang::CodeCompleteOptions const&, clang::clangd::(anonymous namespace)::SemaCompleteInput const&, llvm::function_ref<void ()>) tools/clang/tools/extra/clangd/CodeComplete.cpp:735:5 0x61400020d090 is located 80 bytes inside of 432-byte region [0x61400020d040,0x61400020d1f0) freed by thread T175 here: #0 0x5632df74e115 in operator delete(void*, unsigned long) projects/compiler-rt/lib/asan/asan_new_delete.cc:161:3 #1 0x5632e0b06973 in clang::Parser::~Parser() tools/clang/lib/Parse/Parser.cpp:410:3 #2 0x5632e0b06ddd in clang::Parser::~Parser() clang/lib/Parse/Parser.cpp:408:19 #3 0x5632e0b03286 in std::unique_ptr<clang::Parser, std::default_delete<clang::Parser> >::~unique_ptr() .../bits/unique_ptr.h:236:4 #4 0x5632e0b021c4 in clang::ParseAST(clang::Sema&, bool, bool) tools/clang/lib/Parse/ParseAST.cpp:182:1 #5 0x5632e0726544 in clang::FrontendAction::Execute() tools/clang/lib/Frontend/FrontendAction.cpp:904:8 #6 0x5632dff6cd05 in clang::clangd::(anonymous namespace)::semaCodeComplete(std::unique_ptr<clang::CodeCompleteConsumer, std::default_delete<clang::CodeCompleteConsumer> >, clang::CodeCompleteOptions const&, clang::clangd::(anonymous namespace)::SemaCompleteInput const&, llvm::function_ref<void ()>) tools/clang/tools/extra/clangd/CodeComplete.cpp:728:15 Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, jkorous-apple, cfe-commits, ioeric Differential Revision: https://reviews.llvm.org/D44000 llvm-svn: 326569
* [LV][CFG] Add irreducible CFG detection for outer loopsFlorian Hahn2018-03-024-59/+97
| | | | | | | | | | | | | | | | This patch adds support for detecting outer loops with irreducible control flow in LV. Current detection uses SCCs and only works for innermost loops. This patch adds a utility function that works on any CFG, given its RPO traversal and its LoopInfoBase. This function is a generalization of isIrreducibleCFG from lib/CodeGen/ShrinkWrap.cpp. The code in lib/CodeGen/ShrinkWrap.cpp is also updated to use the new generic utility function. Patch by Diego Caballero <diego.caballero@intel.com> Differential Revision: https://reviews.llvm.org/D40874 llvm-svn: 326568
* AMDGPU/GlobalISel: Define instruction mapping for @llvm.maxnumMatt Arsenault2018-03-022-0/+67
| | | | | | Patch by Tom Stellard llvm-svn: 326567
* Add possibility to specify output stream for CompilerInstanceAlexey Sotkin2018-03-024-1/+63
| | | | | | | | | | | | | | Patch by: krisb Reviewers: teemperor Reviewed By: teemperor Subscribers: klimek, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D43809 llvm-svn: 326566
* [X86] Remove old UNIMPLEMENTED listSimon Pilgrim2018-03-021-14/+0
| | | | | | All of these are implemented and have appropriate test coverage llvm-svn: 326553
* [testsuite] Remove workaround for categories and inline tests.Jonas Devlieghere2018-03-021-9/+6
| | | | | | | | | | | | | | | | Adding categories to inline tests does not work because the attribute is set at the function level. For methods, this means it applies to all instances of that particular class. While this is what we want in most cases, it's not for inline tests, where different instances correspond to different tests. With the workaround in place, assigning a category to one test resulted in the category applied to *all* inline tests. This patch removes the workaround and throws an exception with an informative error message, to prevent this from happening in the future. llvm-svn: 326552
* [Sema] Improve test coverage of narrowing conversion diagnosticsMikhail Maltsev2018-03-021-6/+11
| | | | | | | | | | | | | | | | Summary: This patch adds tests of narrowing conversion diagnostics for the 'unscoped enum -> integer' case. Reviewers: faisalv, rsmith, rogfer01 Reviewed By: rogfer01 Subscribers: cfe-commits, rogfer01 Differential Revision: https://reviews.llvm.org/D43572 llvm-svn: 326551
* [clangd:vscode] Bump clangd-vscode version to 0.0.4.Eric Liu2018-03-021-1/+1
| | | | llvm-svn: 326548
* [clangd:vscode] check empty/null string correctly.Eric Liu2018-03-021-1/+1
| | | | llvm-svn: 326547
* [clangd] Debounce streams of updates.Sam McCall2018-03-028-43/+169
| | | | | | | | | | | | | | | | | | | Summary: Don't actually start building ASTs for new revisions until either: - 500ms have passed since the last revision, or - we actually need the revision for something (or to unblock the queue) In practice, this avoids the "first keystroke results in diagnostics" problem. This is kind of awkward to test, and the test is pretty bad. It can be observed nicely by capturing a trace, though. Reviewers: hokein, ilya-biryukov Subscribers: klimek, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D43648 llvm-svn: 326546
* [ELF] - Report error when memory region is overflowed by data commands.George Rimar2018-03-022-12/+37
| | | | | | | | | | | | | | | | | | LLD can not catch a memory area overflow when using a data command. If we have the script below: .foo : { *(.foo) BYTE(0x1) } > ram where BYTE overflows the ram region, we do not report it currently. Patch fixes that. Differential revision: https://reviews.llvm.org/D43948 llvm-svn: 326545
* OpenBSD Ubsan support / interceptionKamil Rytarowski2018-03-023-10/+10
| | | | | | | | | | | | | | | | Summary: Interception, enabling OpenBSD platform Patch by: David CARLIER Reviewers: krytarowski, vitalybuka, visa Reviewed By: vitalybuka Subscribers: srhines, fedor.sergeev, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43893 llvm-svn: 326544
* OpenBSD UBsan support / ubsan partKamil Rytarowski2018-03-021-1/+2
| | | | | | | | | | | | | | | | Summary: UBsan, enable OpenBSD platform Patch by: David CARLIER Reviewers: krytarowski, kettenis, visa, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, fedor.sergeev, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43894 llvm-svn: 326543
* [Frontend] Avoid including default system header paths on FuchsiaPetr Hosek2018-03-021-0/+2
| | | | | | | | These paths aren't used and don't make sense on Fuchsia. Differential Revision: https://reviews.llvm.org/D43992 llvm-svn: 326542
* [WebAssembly] More uses of uint8_t for single byte valuesHeejin Ahn2018-03-021-13/+13
| | | | | | | | | | | | Summary: It looks like this was missing from D43921. Reviewers: sbc100 Subscribers: jfb, dschuff, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D43991 llvm-svn: 326541
* [ThinLTO] Added a couple of C LTO API interfaces to control the cache policy.Ekaterina Romanova2018-03-026-3/+96
| | | | | | | | | | - thinlto_codegen_set_cache_size_bytes to control the absolute size of cache directory. - thinlto_codegen_set_cache_size_files the size and amount of files in cache directory. These functions have been supported in C++ LTO API for a long time, but were absent in C LTO API. Differential Revision: https://reviews.llvm.org/D42446 llvm-svn: 326537
* Update man page for long opts that accept = after r326506Ed Maste2018-03-021-7/+7
| | | | | | | | | | | Also remove the space between --lto-O and value, as the option with a space is not accepted at present. Leave --opt-remarks-filename as it does not currently accept the = form. llvm.org/pr36563 llvm-svn: 326536
* AMDGPU/GCN: Promote i16 ctpopJan Vesely2018-03-023-0/+339
| | | | | | | | | i16 capable ASICs do not support i16 operands for this instruction. Add tablegen pattern to merge chained i16 additions. Differential Revision: https://reviews.llvm.org/D43985 llvm-svn: 326535
* AMDGPU/GlobalISel: Define instruction mapping for G_FPTOSIMatt Arsenault2018-03-022-0/+32
| | | | | | Patch by Tom Stellard llvm-svn: 326534
* AMDGPU/GlobalISel: Define instruction mapping for G_FPTOUIMatt Arsenault2018-03-022-0/+32
| | | | | | Patch by Tom Stellard llvm-svn: 326533
* AMDGPU/GlobalISel: Define instruction mapping for G_FMULMatt Arsenault2018-03-022-0/+70
| | | | llvm-svn: 326532
* Remove debugging code I accidentally committed in r326530.Akira Hatanaka2018-03-021-1/+0
| | | | llvm-svn: 326531
* Add an option to disable tail-call optimization for escaping blocks.Akira Hatanaka2018-03-0211-5/+103
| | | | | | | | | | | | | This makes it easier to debug crashes and hangs in block functions since users can easily find out where the block is called from. The option doesn't disable tail-calls from non-escaping blocks since non-escaping blocks are not as hard to debug as escaping blocks. rdar://problem/35758207 Differential Revision: https://reviews.llvm.org/D43841 llvm-svn: 326530
* [analyzer] [tests] Again, make tests more resilient to changes in ↵George Karpenkov2018-03-022-2/+2
| | | | | | exploration strategy llvm-svn: 326529
* [InstCombine] Add more test case to fpextend.ll.Craig Topper2018-03-021-0/+186
| | | | | | This includes the test cases from D43970 and additional tests for combining (fptrunc (binop (fpext), (fpext))) where the pre-extended types don't match the trunc and therefore can't be completely removed. llvm-svn: 326528
* Always set dso_local in CodeGenModule::setDSOLocal.Rafael Espindola2018-03-021-2/+7
| | | | | | | | | | | | | This shouldn't change any results for now, but is more consistent with how we set dllimport/dllexport and will make future changes easier. Since clang produces IR as it parses, it can find out mid file that something is dllimport. When that happens we have to drop dso_local. This is not a problem right now because CodeGenModule::setDSOLocal is called from relatively few places at the moment. llvm-svn: 326527
* AMDGPU/GlobalISel: Define instruction mapping for G_FADDMatt Arsenault2018-03-022-1/+72
| | | | | | Patch by Tom Stellard llvm-svn: 326526
* AMDGPU/GlobalISel: Define instruction mapping for G_SHLMatt Arsenault2018-03-022-0/+69
| | | | | | Patch by Tom Stellard llvm-svn: 326525
* AMDGPU/GlobalISel: Define instruction mapping for G_XORMatt Arsenault2018-03-022-0/+69
| | | | llvm-svn: 326524
* AMDGPU/GlobalISel: Define instruction mapping for G_ANDMatt Arsenault2018-03-022-0/+69
| | | | | | Patch by Tom Stellard llvm-svn: 326523
* [WebAssembly] Gather EH instructions in one place. NFC.Heejin Ahn2018-03-021-10/+20
| | | | | | | | | | | | | | | Summary: - Gather EH instructions in one place for easy tracking (more will be added later) - Variable name change Reviewers: dschuff Subscribers: jfb, sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D43742 llvm-svn: 326522
* [ArgumentPromotion] don't break musttail invariant PR36543Fedor Indutny2018-03-022-0/+55
| | | | | | | | | | | | | | | | Summary: Do not break musttail invariant by promoting arguments of musttail callee or caller. Reviewers: sanjoy, dberlin, hfinkel, george.burgess.iv, fhahn, rnk Reviewed By: rnk Subscribers: rnk, llvm-commits Differential Revision: https://reviews.llvm.org/D43926 llvm-svn: 326521
* [analyzer] Prevent crashing in NonNullParamCheckerGeorge Karpenkov2018-03-022-0/+13
| | | | | | | | | | | | | https://bugs.llvm.org/show_bug.cgi?id=36381 rdar://37543426 Turns out, the type passed for the lambda capture was incorrect. One more argument to abandon the getSVal overload which does not require the type information. Differential Revision: https://reviews.llvm.org/D43925 llvm-svn: 326520
* [StaticAnalyzer] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2018-03-022-230/+264
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 326519
* [analyzer] [NFC] [tests] Make test more resilient to changes in exploration ↵George Karpenkov2018-03-021-2/+7
| | | | | | strategy llvm-svn: 326518
* [WebAssembly] Add exception handling optionHeejin Ahn2018-03-024-1/+15
| | | | | | | | | | | | Summary: Add exception handling option to clang. Reviewers: dschuff Subscribers: jfb, sbc100, jgravelle-google, sunfish, cfe-commits Differential Revision: https://reviews.llvm.org/D43681 llvm-svn: 326517
* Utility functions for checked arithmeticGeorge Karpenkov2018-03-023-0/+155
| | | | | | | | | Provide checkedAdd and checkedMul functions, providing checked arithmetic on signed integers. Differential Revision: https://reviews.llvm.org/D43704 llvm-svn: 326516
* [InstCombine] Simplify test cases by removing loads/stores that aren't ↵Craig Topper2018-03-021-72/+40
| | | | | | | | required for what is being tested. The loads and stores were getting the data and storing the results. There's no reason we can't just use function arguments and return. llvm-svn: 326515
* Speed up TestWatchpointMultipleThreadsPavel Labath2018-03-022-120/+41
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The inferior was sleeping before doing any interesting work. I remove that to make the test faster. While looking at the purpose of the test (to check that watchpoints are propagated to all existing threads - r140757) I noticed that the test has diverged from the original intention and now it creates the threads *after* the watchpoint is set (this probably happened during the std::thread refactor). After some discussion, we decided both scenarios make sense, so I modify the test to test both. The watchpoint propagation functionality is not really debug info depenent, so I also stop replication of this test. This brings the test's time from ~108s down to 4s. Reviewers: davide, jingham Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D43857 llvm-svn: 326514
OpenPOWER on IntegriCloud