summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [LLD][ELF] - Added file name and a test for case when we fail to write the ↵George Rimar2018-08-042-1/+19
| | | | | | | | output. We did not report the file name and had no test for that case. llvm-svn: 338959
* [LLD][ELF] - Remove excessive requirement from the test.George Rimar2018-08-041-1/+1
| | | | | | It feels "shell" is excessive. Lets try without it. llvm-svn: 338958
* [LLD][ELF] - Removed dead code from rangeToString(). NFC.George Rimar2018-08-041-5/+3
| | | | | | | This change removes the dead code and makes cosmetic change showing why it was dead. llvm-svn: 338957
* [LLD][ELF] - Fix bug when reporting memory intersections.George Rimar2018-08-042-3/+3
| | | | | | | rangeToString() takes addres and length, previously it was called incorrectly. llvm-svn: 338956
* [ADT] Add an early-increment iterator-like type and range adaptor.Chandler Carruth2018-08-042-0/+135
| | | | | | | | | | | | | | This allows us to model the common LLVM idiom of incrementing immediately after dereferencing so that we can remove or update the entity w/o losing our ability to reach the "next". However, these are not real or proper iterators. They are just enough to allow range based for loops and very simple range algorithms to work, but should not be considered full general. Differential Revision: https://reviews.llvm.org/D49956 llvm-svn: 338955
* [TailCallElim] Preserve DT and PDTChijun Sima2018-08-0416-42/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, in the NewPM pipeline, TailCallElim recalculates the DomTree when it modifies any instruction in the Function. For example, ``` CallInst *CI = dyn_cast<CallInst>(&I); ... CI->setTailCall(); Modified = true; ... if (!Modified || ...) return PreservedAnalyses::all(); ``` After applying this patch, the DomTree only recalculates if needed (plus an extra insertEdge() + an extra deleteEdge() call). When optimizing SQLite with `-passes="default<O3>"` pipeline of the newPM, the number of DomTree recalculation decreases by 6.2%, the number of nodes visited by DFS decreases by 2.9%. The time used by DomTree will decrease approximately 1%~2.5% after applying the patch. Statistics: ``` Before the patch: 23010 dom-tree-stats - Number of DomTree recalculations 489264 dom-tree-stats - Number of nodes visited by DFS -- DomTree After the patch: 21581 dom-tree-stats - Number of DomTree recalculations 475088 dom-tree-stats - Number of nodes visited by DFS -- DomTree ``` Reviewers: kuhar, dmgreen, brzycki, grosser, davide Reviewed By: kuhar, brzycki Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49982 llvm-svn: 338954
* [ELF] - Refactor readCallGraph().George Rimar2018-08-041-21/+16
| | | | | | | | | | | This simplifies the code a bit. It is NFC except that it removes early exit for Count == 0 which does not seem to be useful (we have no such tests either). Differential revision: https://reviews.llvm.org/D49136 llvm-svn: 338953
* Fixed header of StringLexer.hRaphael Isemann2018-08-041-2/+1
| | | | llvm-svn: 338952
* [llvm-objdump] Remove continue after report_error which is unreachableFangrui Song2018-08-041-2/+0
| | | | llvm-svn: 338951
* [ADCE] Remove the need of DomTreeChijun Sima2018-08-042-9/+11
| | | | | | | | | | | | | | Summary: ADCE doesn't need to query domtree. Reviewers: kuhar, brzycki, dmgreen, davide, grosser Reviewed By: kuhar Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49988 llvm-svn: 338950
* Fix a bug in VMRangeLeonard Mosescu2018-08-042-22/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed a suspicious failure: [ RUN ] VMRange.CollectionContains llvm/src/tools/lldb/unittests/Utility/VMRangeTest.cpp:146: Failure Value of: VMRange::ContainsRange(collection, VMRange(0x100, 0x104)) Actual: false Expected: true Looking at the code, it is a very real bug: class RangeInRangeUnaryPredicate { public: RangeInRangeUnaryPredicate(VMRange range) : _range(range) {} // note that _range binds to a temporary! bool operator()(const VMRange &range) const { return range.Contains(_range); } const VMRange &_range; }; This change fixes the bug. Differential Revision: https://reviews.llvm.org/D50290 llvm-svn: 338949
* Reverted r338825 and all the following tries to fix issues introduced by ↵Galina Kistanova2018-08-045-730/+0
| | | | | | | | that commit (r338826, r338827, r338829, r338880). This commit has broken build bots and has been left unattended for too long. llvm-svn: 338948
* [clangd] Fix fuzzer build.Matt Morehouse2018-08-041-1/+2
| | | | llvm-svn: 338947
* [clang-fuzzer] Remove unused typedef.Matt Morehouse2018-08-041-2/+1
| | | | llvm-svn: 338946
* Avoid creating conditional cleanup blocks that contain only ↵Richard Smith2018-08-043-15/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | @llvm.lifetime.end calls When a non-extended temporary object is created in a conditional branch, the lifetime of that temporary ends outside the conditional (at the end of the full-expression). If we're inserting lifetime markers, this means we could end up generating if (some_cond) { lifetime.start(&tmp); Tmp::Tmp(&tmp); } // ... if (some_cond) { lifetime.end(&tmp); } ... for a full-expression containing a subexpression of the form `some_cond ? Tmp().x : 0`. This patch moves the lifetime start for such a temporary out of the conditional branch so that we don't need to generate an additional basic block to hold the lifetime end marker. This is disabled if we want precise lifetime markers (for asan's stack-use-after-scope checks) or of the temporary has a non-trivial destructor (in which case we'd generate an extra basic block anyway to hold the destructor call). Differential Revision: https://reviews.llvm.org/D50286 llvm-svn: 338945
* [GISel]: Add Opcodes for CTLZ/CTTZ/CTPOPAditya Nandakumar2018-08-048-17/+127
| | | | | | | | https://reviews.llvm.org/D48600 Added IRTranslator support to translate these known intrinsics into GISel opcodes. llvm-svn: 338944
* LLVM Proto Fuzzer - Run Functions on Suite of InputsEmmett Neyman2018-08-043-15/+149
| | | | | | | | | | | | | | | | Summary: Added corpus of arrays to use as inputs for the functions. Check that the two functions modify the inputted arrays in the same way. Reviewers: kcc, morehouse Reviewed By: morehouse Subscribers: mgorny, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D50194 llvm-svn: 338943
* [www] Update cxx_status and cxx_dr_status now that Clang 7 has branched.Richard Smith2018-08-043-12/+15
| | | | llvm-svn: 338942
* [constexpr] Support for constant evaluation of __builtin_memcpy andRichard Smith2018-08-045-54/+387
| | | | | | | | | | | | | | | | | | __builtin_memmove (in non-type-punning cases). This is intended to permit libc++ to make std::copy etc constexpr without sacrificing the optimization that uses memcpy on trivially-copyable types. __builtin_strcpy and __builtin_wcscpy are not handled by this change. They'd be straightforward to add, but we haven't encountered a need for them just yet. This reinstates r338455, reverted in r338602, with a fix to avoid trying to constant-evaluate a memcpy call if either pointer operand has an invalid designator. llvm-svn: 338941
* Fix buildbot breakage.Rui Ueyama2018-08-041-2/+1
| | | | llvm-svn: 338940
* Use the same constants as zlib to represent compression level.Rui Ueyama2018-08-043-26/+10
| | | | | | | | | | This change allows users pass compression level that was not listed in the enum. Also, I think using different values than zlib's compression levels was just confusing. Differential Revision: https://reviews.llvm.org/D50196 llvm-svn: 338939
* [WebAssembly] Don't error when --undefined symbols are not foundSam Clegg2018-08-0414-93/+71
| | | | | | | | | | | | | | | This matches the behavior of the ELF linker where -u/--undefined means symbols will get pulled in from archives but won't result in link error if they are missing. Also, don't actually great symbol table entries for the undefined symbols, again matching more closely the ELF linker. This also results in simplification of the code. Differential Revision: https://reviews.llvm.org/D50279 llvm-svn: 338938
* Disable the asan-deque.cpp integration test for AppleLLDB < v1000Vedant Kumar2018-08-042-1/+10
| | | | | | | | | | | | | | | | | | | | | | Some of Apple's public CI nodes ship an lldb which has trouble debugging the asan-deque.cpp test. Specifically, that lldb appears to either parse location lists in the test program incorrectly or to have a broken std::deque data formatter. We don't want to work around this by weakening the integration test, and we're unable to update the lldb version on the CI node at the moment. The compromise is to require AppleLLDB >= 1000 when AppleLLDB is being used to debug this test. Reviewed (in person) by Adrian Prantl. Bot failure: http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA/48074 rdar://42892721 llvm-svn: 338937
* Mark LWG#2260 as complete. We already did the right thing, so I just added ↵Marshall Clow2018-08-033-2/+4
| | | | | | tests to ensure that we continue to DTRT. llvm-svn: 338936
* [analyzer] Do not crash in NoStoreFuncVisitor notes if an unexpected region ↵George Karpenkov2018-08-032-7/+38
| | | | | | | | is found. Just do not generate the note at all in that case. llvm-svn: 338935
* [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable.Volodymyr Sapsai2018-08-037-9/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Libc++ needs to know when aligned allocation is supported by clang, but is otherwise unavailable at link time. Otherwise, libc++ will incorrectly end up generating calls to `__builtin_operator_new`/`__builtin_operator_delete` with alignment arguments. This patch implements the following changes: * The `__cpp_aligned_new` feature test macro to no longer be defined when aligned allocation is otherwise enabled but unavailable. * The Darwin driver no longer passes `-faligned-alloc-unavailable` when the user manually specifies `-faligned-allocation` or `-fno-aligned-allocation`. * Instead of a warning Clang now generates a hard error when an aligned allocation or deallocation function is referenced but unavailable. Patch by Eric Fiselier. Reviewers: rsmith, vsapsai, erik.pilkington, ahatanak, dexonsmith Reviewed By: rsmith Subscribers: Quuxplusone, cfe-commits Differential Revision: https://reviews.llvm.org/D45015 llvm-svn: 338934
* [NFC][libc++] Consistently use spaces to indentLouis Dionne2018-08-0312-79/+79
| | | | | | rdar://problem/19988944 llvm-svn: 338933
* [clang-tidy] Sequence init statements, declarations, and conditions ↵Martin Bohme2018-08-032-10/+42
| | | | | | | | | | | | | | | | | | correctly in if, switch, and while Summary: Fixes https://bugs.llvm.org/show_bug.cgi?id=36516. Reviewers: ilya-biryukov, alexfh, aaron.ballman, hokein Reviewed By: alexfh Subscribers: xazax.hun, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D49918 llvm-svn: 338932
* Diagnose invalid cv-qualifiers for friend decls.Eli Friedman2018-08-033-20/+36
| | | | | | Differential Revision: https://reviews.llvm.org/D45712 llvm-svn: 338931
* [X86] Add isel patterns for atomic_load+sub+atomic_sub.Craig Topper2018-08-032-25/+13
| | | | | | Despite the comment removed in this patch, this is beneficial when the RHS of the sub is a register. llvm-svn: 338930
* [X86] Add test cases to show missed opportunity to use RMW for ↵Craig Topper2018-08-031-30/+212
| | | | | | atomic_load+sub+atomic_store. llvm-svn: 338929
* [X86] Re-generate abi-isel.ll checks with update_llc_test_checks.pyReid Kleckner2018-08-031-7046/+8686
| | | | | | | | | | | | | | These tests were clearly auto-generated when they were converted to FileCheck back in r80019 (2009), but we didn't have a fancy script to keep them up to date then. I've reviewed the diff, and we should be generating the exact same code sequences we used to. After this, I plan to commit a change that changes our output slightly, but in a way that is still correct. It will generate a large diff, and I want it to be clearly correct, so I am regenerating these checks in preparation for that. llvm-svn: 338928
* [X86] Make abi-isel.ll like update_llc_test_checks.py outputReid Kleckner2018-08-031-899/+898
| | | | | | | | - Remove -asm-verbose=0 from every llc command. The tests still pass. - Reorder the RUN lines to match CHECKs. - Use -LABEL like update_llc_test_checks.py does. llvm-svn: 338927
* [X86] Layout tests exactly as update_llc_test_checks.py wouldReid Kleckner2018-08-031-626/+631
| | | | | | | | | Put the LLVM IR at the bottom of the function instead of the top. In my next patch, I will run update_llc_test_checks.py on this file, and I want to only highlight the diffs in the CHECK lines. Hopefully by doing this change first, the patch will be more understandable. llvm-svn: 338926
* [X86] Remove RELEASE_ and ACQUIRE_ pseudo instructions. Use isel patterns ↵Craig Topper2018-08-036-176/+79
| | | | | | | | | | | | and the normal instructions instead At one point in time acquire implied mayLoad and mayStore as did release. Thus we needed separate pseudos that also carried that property. This appears to no longer be the case. I believe it was changed in 2012 with a comment saying that atomic memory accesses are marked volatile which preserves the ordering. So from what I can tell we shouldn't need additional pseudos since they aren't carry any flags that are different from the normal instructions. The only thing I can think of is that we may consider them for load folding candidates in the peephole pass now where we didn't before. If that's important hopefully there's something in the memory operand we can check to prevent the folding without relying on pseudo instructions. Differential Revision: https://reviews.llvm.org/D50212 llvm-svn: 338925
* Modify lldb_suite.py to enable python debuggingAlex Langford2018-08-031-1/+3
| | | | | | | | | | | | | | | Summary: pudb and pdb interfere with the behavior of the inspect module. calling `inspect.getfile(inspect.currentframe())` returns a different result depending on whether or not you're in a debugger. Calling `os.path.abspath` on the result of `inspect.getfile(...)` normalizes the result between the two environments. Patch by Nathan Lanza <lanza@fb.com> Differential Revision: https://reviews.llvm.org/D49620 llvm-svn: 338923
* [X86] Autogenerate complete checks. NFCCraig Topper2018-08-031-30/+85
| | | | llvm-svn: 338921
* Replace LLDB's LEB128 implementation with the one from LLVMRaphael Isemann2018-08-031-35/+9
| | | | | | | | | | | | Reviewers: davide, labath Reviewed By: labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D50162 llvm-svn: 338920
* [clangd] capitalize diagnostic messagesAlex Lorenz2018-08-037-12/+19
| | | | | | | | | The diagnostic messages that are sent to the client from Clangd are now always capitalized. Differential Revision: https://reviews.llvm.org/D50154 llvm-svn: 338919
* [analyzer] Add test for a crash fixed in r338775.Reka Kovacs2018-08-032-4/+11
| | | | | | | | Do not crash if a CXXRecordDecl cannot be obtained for an object. Special thanks for the reproduction to Alexander Kornienko. llvm-svn: 338918
* [TRE][DebugInfo] Preserve Debug Location in new branch instructionAnastasis Grammenos2018-08-032-1/+18
| | | | | | | | | There are two branch instructions created so the new test covers them both. Differential Revision: https://reviews.llvm.org/D50263 llvm-svn: 338917
* [OpenMP] Encode offload target triples into comdat key for offload ↵Sergey Dmitriev2018-08-032-1/+62
| | | | | | | | | | | | initialization code Encoding offload target triples onto comdat group key for offload initialization code guarantees that it will be executed once per each unique combination of offload targets. Differential Revision: https://reviews.llvm.org/D50218 llvm-svn: 338916
* [SelectionDAG] Teach LegalizeVectorTypes to widen the mask input to a masked ↵Craig Topper2018-08-032-11/+87
| | | | | | | | | | store. The mask operand is visited before the data operand so we need to be able to widen it. Fixes PR38436. llvm-svn: 338915
* [clangd] Add test for changing build configurationSimon Marchi2018-08-032-0/+77
| | | | | | | | | | | | | | | Summary: This patch adds tests for the two ways of changing build configuration (pointing to a particular compile_commands.json): - Through the workspace/didChangeConfiguration notification. - Through the initialize request. Subscribers: ilya-biryukov, ioeric, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50255 llvm-svn: 338914
* [Support] Don't initialize compressed buffer allocated by zlib::compressFangrui Song2018-08-031-2/+2
| | | | | | | | | | | resize() (zeroing) makes every allocated page resident. The actual size of the compressed buffer is usually much smaller. Making every page resident is wasteful. When linking a test binary with ~1.9GiB uncompressed debug info with LLD, this optimization decreases max RSS by ~1.5GiB. Differential Revision: https://reviews.llvm.org/50223 llvm-svn: 338913
* Properly add shared locks to the initial list of locks being tracked, ↵Aaron Ballman2018-08-032-2/+10
| | | | | | | | instead of assuming unlock functions always use exclusive locks. Patch by Aaron Puchert. llvm-svn: 338912
* lld-link: Simplify LinkerDriver::findDefaultEntry()Nico Weber2018-08-031-13/+4
| | | | | | | | | No intended behavior change. Not repeating the CRTStartup names makes fixing PR36523 simpler. https://reviews.llvm.org/D50253 llvm-svn: 338911
* DAG: Enhance isKnownNeverNaNMatt Arsenault2018-08-0312-78/+883
| | | | | | | | | | | | Add a parameter for testing specifically for sNaNs - at least one instruction pattern on AMDGPU needs to check specifically for this. Also handle more cases, and add a target hook for custom nodes, similar to the hooks for known bits. llvm-svn: 338910
* [NFC] Initialize a variable to prevent future invalid deref.Erich Keane2018-08-031-1/+1
| | | | | | | | | Found by KlockWorks, this variable is properly protected, however the conditions in the test that initializes it and the one that uses it could diverge, it seems to me that this is a 'free' init that will prevent issues if one of the conditions is ever modified without the other. llvm-svn: 338909
* [NVPTX] Handle __nvvm_reflect("__CUDA_ARCH").Artem Belevich2018-08-034-5/+33
| | | | | | | | | | | | | | Summary: libdevice in recent CUDA versions relies on __nvvm_reflect() to select GPU-specific bitcode. This patch addresses the requirement. Reviewers: jlebar Subscribers: jholewinski, sanjoy, hiraditya, bixia, llvm-commits Differential Revision: https://reviews.llvm.org/D50207 llvm-svn: 338908
OpenPOWER on IntegriCloud