summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [SCEV] Consider delinearization pattern with extension with identity factorTobias Grosser2016-10-172-1/+66
| | | | | | | | | | | | Summary: The delinearization algorithm did not consider terms which had an extension without a multiply factor, i.e. a identify factor. We lose cases where size is char type where there will no multiply factor. Reviewers: sanjoy, grosser Subscribers: mzolotukhin, Eugene.Zelenko, llvm-commits, mssimpso, sanjoy, grosser Differential Revision: https://reviews.llvm.org/D16492 llvm-svn: 284378
* [CodeGenPrepare] When moving a zext near to its associated load, do not ↵Andrea Di Biagio2016-10-172-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | retain the original debug location. CodeGenPrepare knows how to move a zext of a load into the same basic block where the load lives. The goal is to help ISel match a zero-extending load instead of two separated instructions. CGP attempts to move a zext computation even if it lives in a basic block that does not post-dominate the load's basic block. That means, the hoisted zext may be speculated. Preserving the zext location would hurt the debugging experience and the quality of sample pgo. With this patch, when moving a zext near to its associated load, CGP no longer propagates the zext's debug location. Instead, CGP conservatively reuses the same debug location for the load and the zext. An alternative approach would be to assign an artificial line-0 location to the zext. However we don't want to over-use the 'line-0' for this particular case because it would have a size cost in the line-table section for no additional benefit. Differential Revision: https://reviews.llvm.org/D25611 llvm-svn: 284377
* [ELF] - Don't crash on multiple SHT_MIPS_REGINFO/SHT_MIPS_ABIFLAGS sections.George Rimar2016-10-173-0/+52
| | | | | | | | | | In continue of D25555, this patch fixes possible crash when we have multiple SHT_MIPS_REGINFO or SHT_MIPS_ABIFLAGS sections. yaml2obj was used to produce such objects. Differential revision: https://reviews.llvm.org/D25609 llvm-svn: 284376
* [ELF] - Added testcase relative to D25090.George Rimar2016-10-172-0/+4
| | | | | | | | | | | | | | | | | | | | It was requested on review for https://reviews.llvm.org/D25090 to add testcase in lld. Spec says (http://www.sco.com/developers/gabi/1998-04-29/ch4.eheader.html) : e_shnum This member holds the number of entries in the section header table. Thus the product of e_shentsize and e_shnum gives the section header table's size in bytes. If a file has no section header table, e_shnum holds the value zero. In case revealed, broken input did not contain zero in this field. LLD then could crash when proccessed sections (returned array has incorrect size): template <class ELFT> void SharedFile<ELFT>::parseSoName() { ... for (const Elf_Shdr &Sec : Obj.sections()) { ... llvm-svn: 284375
* Recommit r284371 "[Object/ELF] - Check that e_shnum is null when e_shoff is."George Rimar2016-10-175-1/+8
| | | | | | | | | | | | | | | | | | | | | With fix: hex edited the precompiled inputs from another testcases to pass new checks. Original commit message: [Object/ELF] - Check that e_shnum is null when e_shoff is. Spec says (http://www.sco.com/developers/gabi/1998-04-29/ch4.eheader.html) : e_shnum This member holds the number of entries in the section header table. Thus the product of e_shentsize and e_shnum gives the section header table's size in bytes. If a file has no section header table, e_shnum holds the value zero. Revealed using "id_000037,sig_11,src_000015,op_havoc,rep_8" from PR30540 That was the reason of crash in lld on incorrect input file. Binary reduced using afl-min. Differential revision: https://reviews.llvm.org/D25090 llvm-svn: 284374
* Revert r284371 "[Object/ELF] - Check that e_shnum is null when e_shoff is."George Rimar2016-10-173-8/+1
| | | | | | | It broke build bot: http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/908/steps/test-stage1-compiler/logs/stdio llvm-svn: 284373
* Do not reset TUScope when we are in incremental processing mode.Vassil Vassilev2016-10-171-2/+4
| | | | | | | | Patch by Axel Naumann! Reviewed by Richard Smith and me. llvm-svn: 284372
* [Object/ELF] - Check that e_shnum is null when e_shoff is.George Rimar2016-10-173-1/+8
| | | | | | | | | | | | | | | Spec says (http://www.sco.com/developers/gabi/1998-04-29/ch4.eheader.html) : e_shnum This member holds the number of entries in the section header table. Thus the product of e_shentsize and e_shnum gives the section header table's size in bytes. If a file has no section header table, e_shnum holds the value zero. Revealed using "id_000037,sig_11,src_000015,op_havoc,rep_8" from PR30540 That was the reason of crash in lld on incorrect input file. Binary reduced using afl-min. Differential revision: https://reviews.llvm.org/D25090 llvm-svn: 284371
* Fix windows buildbot error.Haojian Wu2016-10-172-4/+5
| | | | llvm-svn: 284370
* [Object/ELF] - Do not crash on invalid section index.George Rimar2016-10-173-4/+6
| | | | | | | | | | | | | | | | If object has wrong (large) string table index and also incorrect large value for amount of sections in total, then section index passes the check: if (Index >= getNumSections()) return object_error::invalid_section_index; But result pointer then is far after end of file data, what result in a crash. Differential revision: https://reviews.llvm.org/D25081 llvm-svn: 284369
* Recommit "[ClangTidy] Add UsingInserter and NamespaceAliaser"Haojian Wu2016-10-1710-0/+585
| | | | | | | | | | | | | | Summary: This adds helper classes to add using declaractions and namespace aliases to function bodies. These help making function calls to deeply nested functions concise (e.g. when calling helpers in a refactoring) Patch by Julian Bangert! Reviewers: alexfh, hokein Subscribers: beanz, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D24997 llvm-svn: 284368
* Support: Drop LLVM_ATTRIBUTE_UNUSED_RESULTJustin Bogner2016-10-172-9/+4
| | | | | | | | Uses of this have all been updated to use LLVM_NODISCARD, which matches the C++17 [[nodiscard]] semantics rather than those of GCC's __attribute__((warn_unused_result)). llvm-svn: 284367
* AST: Prefer LLVM_NODISCARD to LLVM_ATTRIBUTE_UNUSED_RESULTJustin Bogner2016-10-171-1/+1
| | | | llvm-svn: 284366
* [X86] Fix shuffle decoding assertions to print the right number of required ↵Craig Topper2016-10-171-8/+8
| | | | | | operands. Update the checks themselves to be >= to the same number instead of > one less than the required number. llvm-svn: 284365
* ADT: Use LLVM_NODISCARD instead of LLVM_ATTRIBUTE_UNUSED_RESULT for StringRefJustin Bogner2016-10-171-21/+5
| | | | | | | | Instead of annotating (most of) the StringRef API, we can just annotate the type directly. This is less code and it will warn in more cases. llvm-svn: 284364
* ELF: Add a skip() overload to ignore any tokenJustin Bogner2016-10-173-9/+20
| | | | | | | | | Most functions that return StringRef should check their return values, so I'm planning on marking StringRef [[nodiscard]]. This requires splitting up functions like next() that are sometimes just used for side effects. llvm-svn: 284363
* Interpreter: Don't return StringRef from functions whose return value is ↵Justin Bogner2016-10-172-31/+16
| | | | | | | | | | never used StringRef is passed through all of these APIs but never actually used. Just remove it from the API for now and if people want to use it they can add it back. llvm-svn: 284362
* ELF: Fix a misuse of Twine::toStringRefJustin Bogner2016-10-171-3/+3
| | | | | | | | While the toStringRef API almost certainly ends up populating the SmallString here, the correct way to use this API is to use the return value. llvm-svn: 284361
* ClangMoveTests.cpp: Appease msc18.NAKAMURA Takumi2016-10-171-4/+4
| | | | | | | | | | | | | | | clang-tools-extra\unittests\clang-move\ClangMoveTests.cpp(216) : error C2593: 'operator =' is ambiguous llvm\include\llvm/ADT/SmallVector.h(898): could be 'const llvm::SmallVector<std::string,4> &llvm::SmallVector<std::string,4>::operator =(std::initializer_list<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>)' llvm\include\llvm/ADT/SmallVector.h(893): or 'const llvm::SmallVector<std::string,4> &llvm::SmallVector<std::string,4>::operator =(llvm::SmallVectorImpl<T> &&)' with [ T=std::string ] llvm\include\llvm/ADT/SmallVector.h(883): or 'const llvm::SmallVector<std::string,4> &llvm::SmallVector<std::string,4>::operator =(llvm::SmallVector<std::string,4> &&)' llvm\include\llvm/ADT/SmallVector.h(873): or 'const llvm::SmallVector<std::string,4> &llvm::SmallVector<std::string,4>::operator =(const llvm::SmallVector<std::string,4> &)' while trying to match the argument list '(llvm::SmallVector<std::string,4>, initializer-list)' llvm-svn: 284360
* Reformat.NAKAMURA Takumi2016-10-171-4/+4
| | | | llvm-svn: 284359
* [AVX-512] Add shuffle combining support for vpermi2var shuffles derived from ↵Craig Topper2016-10-172-32/+14
| | | | | | existing support for vpermt2var. llvm-svn: 284357
* [AVX-512] Add vpermi2var test cases to shuffle combining test case. ↵Craig Topper2016-10-171-0/+112
| | | | | | Combining will be added in a future commit. llvm-svn: 284356
* [CUDA] Fix false-positive in known-emitted handling.Justin Lebar2016-10-172-6/+66
| | | | | | | | | | | | | | | | | Previously: When compiling for host, our constructed call graph went *through* kernel calls. This meant that if we had host calls kernel calls HD we would incorrectly mark the HD function as known-emitted on the host side, and thus perform host-side checks on it. Fixing this exposed another issue, wherein when marking a function as known-emitted, we also need to traverse the callgraph of its template, because non-dependent calls are attached to a function's template, not its instantiation. llvm-svn: 284355
* [AVX-512] Add support for turning a 256-bit load that goes to both halfs of ↵Craig Topper2016-10-164-73/+99
| | | | | | | | an insert_subvector into a subvector broadcast. Differential Revision: https://reviews.llvm.org/D25650 llvm-svn: 284353
* clang/test/CXX/conv/conv.fctptr/p1.cpp: Appease for targeting i686-win32.NAKAMURA Takumi2016-10-161-1/+1
| | | | | | | error: 'error' diagnostics seen but not expected: File clang\test\CXX\conv\conv.fctptr\p1.cpp Line 16: assigning to 'void (S::*)() __attribute__((thiscall)) noexcept' from incompatible type 'void (S::*)() __attribute__((thiscall))': different exception specifications llvm-svn: 284352
* Revert "Revert "[analyzer] Make MallocChecker more robust against custom ↵Devin Coughlin2016-10-162-0/+36
| | | | | | | | | redeclarations"" This reverts commit r284340 to reapply r284335. The bot breakage was due to an unrelated change in the polybench test suite. llvm-svn: 284351
* unittests: Explicitly ignore some return values in crash testsJustin Bogner2016-10-161-16/+18
| | | | | | | | Ideally these would actually check that the results are reasonable, but given that we're looping over so many different kinds of path that isn't really practical. llvm-svn: 284350
* [test] Add missing colon.Michael Kruse2016-10-161-1/+1
| | | | llvm-svn: 284349
* Support: Return void from Scanner::scan_ns_uri_char, no one uses the resultJustin Bogner2016-10-161-7/+2
| | | | | | | Simplify this a little bit since the result is never used. It can be added back easily enough if that changes. llvm-svn: 284348
* [cmake] Add polly-isl-test dependency to lit tests.Michael Kruse2016-10-161-1/+1
| | | | | | Also handle the in-llvm-tree case forgotten in r284339. llvm-svn: 284347
* MachineModuleInfo: Prefer the LLVM_NODISCARD spellingJustin Bogner2016-10-161-2/+1
| | | | | | | Update a function annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use LLVM_NODISCARD instead. llvm-svn: 284346
* SCEV: Prefer the LLVM_NODISCARD spellingJustin Bogner2016-10-161-9/+9
| | | | | | | Update functions annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use LLVM_NODISCARD instead. llvm-svn: 284345
* Support: Prefer the LLVM_NODISCARD spellingJustin Bogner2016-10-161-23/+25
| | | | | | | Update functions annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use LLVM_NODISCARD instead. llvm-svn: 284344
* ADT: Prefer the LLVM_NODISCARD spellingJustin Bogner2016-10-168-11/+11
| | | | | | | Update functions annotated with LLVM_ATTRIBUTE_UNUSED_RESULT to use LLVM_NODISCARD instead. llvm-svn: 284343
* ADT: Use LLVM_NODISCARD instead of LLVM_ATTRIBUTE_UNUSED_RESULT for ArrayRefJustin Bogner2016-10-161-14/+2
| | | | | | | Instead of annotating (most of) the ArrayRef API, we can just annotate the type directly. This is less code and it will warn in more cases. llvm-svn: 284342
* AST: Improve a couple of comments and cast unused values to voidJustin Bogner2016-10-161-5/+4
| | | | | | | | Make these comments a bit more explicit that they're initializing the RawText member, and explicitly cast the unused result of getRawText to void for clarity. llvm-svn: 284341
* Revert "[analyzer] Make MallocChecker more robust against custom redeclarations"Devin Coughlin2016-10-162-36/+0
| | | | | | | | | | This reverts commit r284335. It appears to be causing test-suite compile-time and execution-time performance measurements to take longer than expected on several bots. This is surprising, because r284335 is a static-analyzer-only change. llvm-svn: 284340
* [cmake] Add polly-isl-test dependency to lit tests.Michael Kruse2016-10-161-1/+1
| | | | | | | | | | | lit recursively iterates through the test subdirectories and finds the ISL unittest. For this test to work, the polly-isl-test executable needs to be compiled. Add the polly-isl-test dependency to POLLY_TEST_DEPS. This makes check-polly and check-polly-tests work from a fresh build directory. llvm-svn: 284339
* [test] Add -polly-unprofitable-scalar-accs to test that needs it.Michael Kruse2016-10-161-0/+1
| | | | | | | | The test non_affine_loop_used_later.ll also tests the profability heuristic. Add the option -polly-unprofitable-scalar-accs explicitely to ensure that the test succeeds if the default value is changed. llvm-svn: 284338
* P0012R1: Make exception specifications be part of the type system. ThisRichard Smith2016-10-1629-85/+445
| | | | | | | implements the bulk of the change (modifying the type system to include exception specifications), but not all the details just yet. llvm-svn: 284337
* PR30711: Fix incorrect profiling of 'long long' in FoldingSet, then use it toRichard Smith2016-10-162-4/+25
| | | | | | fix TBAA violation in profiling of pointers. llvm-svn: 284336
* [analyzer] Make MallocChecker more robust against custom redeclarationsDevin Coughlin2016-10-162-0/+36
| | | | | | | | | | | | | Add additional checking to MallocChecker to avoid crashing when memory routines have unexpected numbers of arguments. You wouldn't expect to see much of this in normal code (-Wincompatible-library-redeclaration warns on this), but, for example, CMake tests can generate these. This is PR30616. rdar://problem/28631974 llvm-svn: 284335
* Make any_cast<void()>(nullptr) compileEric Fiselier2016-10-162-4/+29
| | | | llvm-svn: 284333
* [clang-tidy] Use ignoreImplicit in cert-err58-cpp checkMalcolm Parsons2016-10-162-3/+34
| | | | | | | | | | | | | | Summary: Fix a false negative in cert-err58-cpp check when calling a constructor creates objects that require cleanup. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25642 llvm-svn: 284332
* Extend this test and make it a bit clearer which cases Clang is getting wrong.Richard Smith2016-10-161-14/+34
| | | | llvm-svn: 284331
* [AVX-512] Fix the operand order for vpermi2var_qi intrinsics to match the ↵Craig Topper2016-10-163-12/+12
| | | | | | other vpermi2var intrinsics. llvm-svn: 284329
* [AVX-512] Correct execution domain for VPERMT2PS and VPERMI2PS.Craig Topper2016-10-168-94/+94
| | | | llvm-svn: 284328
* [AVX-512] Move (v4i64 (X86SubVBroadcast (v2i64))) alternate patterns under a ↵Craig Topper2016-10-161-9/+9
| | | | | | HasVLX predicate. Similar for floating point. llvm-svn: 284327
* Update LWG 2754 statusEric Fiselier2016-10-161-2/+2
| | | | llvm-svn: 284326
* Fix use of non-constexpr C++14 addressofEric Fiselier2016-10-161-1/+1
| | | | llvm-svn: 284325
OpenPOWER on IntegriCloud