summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* [X86] Add a DAG combine for the __builtin_parity idiom used by clang to ↵Craig Topper2018-08-032-86/+104
| | | | | | | | | | | | | | enable better codegen Clang uses "ctpop & 1" to implement __builtin_parity. If the popcnt instruction isn't supported this generates a large amount of code to calculate the population count. Instead we can bisect the data down to a single byte using xor and then check the parity flag. Even when popcnt is supported, its still a good idea to split 64-bit data on 32-bit targets using an xor in front of a single popcnt. Otherwise we get two popcnts and an add before the and. I've specifically targeted this at the sizes supported by clang builtins, but we could generalize this if we think that's useful. Differential Revision: https://reviews.llvm.org/D50165 llvm-svn: 338907
* [X86] Add test cases for the current codegen of __builtin_parity.Craig Topper2018-08-031-0/+149
| | | | | | Will be improved in a follow commit llvm-svn: 338906
* [SLC] Refactor shrinking of functions (NFC)Evandro Menezes2018-08-031-72/+55
| | | | | | | Merge the helper functions for shrinking unary and binary functions into a single one, while keeping all their functionality. Otherwise, NFC. llvm-svn: 338905
* Revert "[OpenCL] Always emit alloca in entry block for enqueue_kernel builtin"Vlad Tsyrklevich2018-08-033-175/+86
| | | | | | This reverts commit r338899, it was causing ASan test failures on sanitizer-x86_64-linux-fast. llvm-svn: 338904
* Use ExprMutationAnalyzer in performance-unnecessary-value-paramShuai Wang2018-08-032-34/+61
| | | | | | | | | | | | | | | | | | | | | | Summary: This yields better recall as ExprMutationAnalyzer is more accurate. One common pattern this check is now able to catch is: ``` void foo(std::vector<X> v) { for (const auto& elm : v) { // ... } } ``` Reviewers: george.karpenkov Subscribers: a.sidorin, cfe-commits Differential Revision: https://reviews.llvm.org/D50102 llvm-svn: 338903
* Fix crash in bounds checking.Joel Galenson2018-08-032-39/+108
| | | | | | | | In r337830 I added SCEV checks to enable us to insert fewer bounds checks. Unfortunately, this sometimes crashes when multiple bounds checks are added due to SCEV caching issues. This patch splits the bounds checking pass into two phases, one that computes all the conditions (using SCEV checks) and the other that adds the new instructions. Differential Revision: https://reviews.llvm.org/D49946 llvm-svn: 338902
* Add raw_ostream wrapper to the Stream classRaphael Isemann2018-08-032-2/+49
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This wrapper will allow us in the future to reuse LLVM methods from within the Stream class. Currently no test as this is intended to be an internal class that shouldn't have any NFC. The test for this change will be the follow up patch that migrates LLDB's LEB128 implementation to the one from LLVM. This change also adds custom move/assignment methods to Stream, as LLVM raw_ostream doesn't support these. As our internal stream has anyway no state, we can just keep the same stream object around. Reviewers: davide, labath Reviewed By: labath Subscribers: xiaobai, labath, lldb-commits Differential Revision: https://reviews.llvm.org/D50161 llvm-svn: 338901
* [llvm-mca][docs] Move the code marker text into its own subsection. NFC.Matt Davis2018-08-031-36/+39
| | | | | | | Also fixed a few undecorated 'llvm-mca' references to be highlighted with the 'program' emphasis. llvm-svn: 338900
* [OpenCL] Always emit alloca in entry block for enqueue_kernel builtinScott Linder2018-08-033-86/+175
| | | | | | | | | Ensures the statically sized alloca is not converted to DYNAMIC_STACKALLOC later because it is not in the entry block. Differential Revision: https://reviews.llvm.org/D50104 llvm-svn: 338899
* amdgcn: Use __constant AS for amdgcn builtins.Jan Vesely2018-08-034-4/+12
| | | | | | | | Fixes build after clang r338707. Reviewer: Matthew.Arsenault@amd.com Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 338898
* [X86] Fix line endings. Simon Pilgrim2018-08-030-0/+0
| | | | llvm-svn: 338897
* [Partial Inlining] Fix small bug in detecting if we did somethingGraham Yiu2018-08-031-3/+1
| | | | | | | - It's possible for 'Changed' to return as false even if we did partial inline something. Fixed to accumulate return values llvm-svn: 338896
* Fix asm label testcase flawGraham Yiu2018-08-031-1/+1
| | | | | | | | | | - Testcase attempts to (not) grep 'g0' in output to ensure asm symbol is properly renamed, but g0 is too generic and can be part of the module's path in LLVM IR output. - Changed to grep '@g0', which is what the proper global symbol name would be if not using asm. llvm-svn: 338895
* [WebAssembly] Cleanup of the way globals and global flags are handledNicholas Wilson2018-08-0315-63/+83
| | | | | | Differential Revision: https://reviews.llvm.org/D44030 llvm-svn: 338894
* revert r338831 - Fix unused variable warning in tablegen generated codeErich Keane2018-08-031-8/+4
| | | | | | No longer necessary thanks to r338889 (and friends). llvm-svn: 338893
* clang-format: [JS] don't break comments before any '{'Martin Probst2018-08-032-12/+22
| | | | | | | | | | | | | | | | | | | | Summary: Previously, clang-format would avoid breaking before the first `{` found, but then happily break before subsequent '{'s on the line. This change fixes that by looking for the first location that has no opening curly, if any. This fixes the original commit by correcting the loop condition. This reverts commit 66dc646e09b795b943668179c33d09da71a3b6bc. Reviewers: krasimir Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50249 llvm-svn: 338890
* [NFCI] My attempt to fix a warning in r338886 broke the build! Fix it.Erich Keane2018-08-031-1/+1
| | | | | | | | Clang format got the best of me... it introduced spaces around something in a table-genned file, so it was interpreted as an array and not a code block. llvm-svn: 338889
* [AST][NFC] Add missing doc for ObjCMethodDecl and ObjCContainerDeclBruno Ricci2018-08-031-0/+6
| | | | | | | | | | | Add a comment in ObjCMethodDecl and ObjCContainerDecl stating that we store some bits in ObjCMethodDeclBits and ObjCContainerDeclBits. This was missed by the recent move in r338641 : [AST][4/4] Move the bit-fields from ObjCMethodDecl and ObCContainerDecl into DeclContext llvm-svn: 338888
* [AST][NFC] Small doc update for DeclContextBruno Ricci2018-08-031-8/+15
| | | | | | | | | | | | | | | | Factored out from https://reviews.llvm.org/D49729 following @erichkeane comments. * Add missing classes in the list of classes deriving directly from DeclContext. * Move the friend declarations together and add a comment for why they are required. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D49790 llvm-svn: 338887
* [NFC] Fix unused expression warning introduced in r338884Erich Keane2018-08-031-2/+3
| | | | llvm-svn: 338886
* Test commitBruno Ricci2018-08-031-1/+1
| | | | llvm-svn: 338885
OpenPOWER on IntegriCloud