summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [debugserver] Relax the codesigning identity checkFrederic Riss2019-04-161-11/+7
| | | | | | | | | | | | | In an effort to help new LLDB developers, we added checks and messaging around the selection of your codesigning identity on macOS. While helpful, it is not actually correct. It's perfectly valid to codesign with an identity that is not named lldb_codesign. Currently this fails the build. This patch keeps a warning that informs developers how to setup lldb_codesign and how to pass it to cmake, but it allows the build to proceed with a different identity. llvm-svn: 358525
* [libc++] Make sure we use new/delete from libc++abi on CI for Apple platformsLouis Dionne2019-04-161-0/+2
| | | | llvm-svn: 358524
* [EarlyCSE] detect equivalence of selects with inverse conditions and ↵Sanjay Patel2019-04-162-26/+71
| | | | | | | | | | | | | | | | | | commuted operands (PR41101) This is 1 of the problems discussed in the post-commit thread for: rL355741 / http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190311/635516.html and filed as: https://bugs.llvm.org/show_bug.cgi?id=41101 Instcombine tries to canonicalize some of these cases (and there's room for improvement there independently of this patch), but it can't always do that because of extra uses. So we need to recognize these commuted operand patterns here in EarlyCSE. This is similar to how we detect commuted compares and commuted min/max/abs. Differential Revision: https://reviews.llvm.org/D60723 llvm-svn: 358523
* Time profiler: optimize json output timeAnton Afanasyev2019-04-161-0/+5
| | | | | | | | | | | | | | | | | | Summary: Use llvm::json::Array.reserve() to optimize json output time. Here is motivation: https://reviews.llvm.org/D60609#1468941. In short: for the json array with ~32K entries, pushing back each entry takes ~4% of whole time compared to the method of preliminary memory reservation: (3995-3845)/3995 = 3.75%. Reviewers: lebedev.ri Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60792 llvm-svn: 358522
* [CVP] Simplify umulo and smulo that cannot overflowNikita Popov2019-04-162-12/+11
| | | | | | | | | | | If a umul.with.overflow or smul.with.overflow operation cannot overflow, simplify it to a simple mul nuw / mul nsw. After the refactoring in D60668 this is just a matter of removing an explicit check against multiplications. Differential Revision: https://reviews.llvm.org/D60791 llvm-svn: 358521
* [Support][JSON] Add reserve() to json ArrayAnton Afanasyev2019-04-161-0/+1
| | | | | | | | | | | | | | | | Summary: Space reservation increases json lib performance for the arrays with large number of entries. Here is the example and discussion: https://reviews.llvm.org/D60609#1468941 Reviewers: lebedev.ri, sammccall Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60788 llvm-svn: 358520
* [SLP] Refactoring of the operand reordering code.Simon Pilgrim2019-04-164-226/+507
| | | | | | | | | | | | | | This is a refactoring patch which should have all the functionality of the current code. Its goal is twofold: i. Cleanup and simplify the reordering code, and ii. Generalize reordering so that it will work for an arbitrary number of operands, not just 2. This is the second patch in a series of patches that will enable operand reordering across chains of operations. An example of this was presented in EuroLLVM'18 https://www.youtube.com/watch?v=gIEn34LvyNo . Committed on behalf of @vporpo (Vasileios Porpodas) Differential Revision: https://reviews.llvm.org/D59973 llvm-svn: 358519
* [libc++] Remove old workaround for builditLouis Dionne2019-04-161-6/+2
| | | | | | | | | | | | | | | | | | | | Summary: I'm not sure what the problem was at the time, however I don't think this is necessary since buildit doesn't exist anymore. Instead of the workaround, the correct thing to do is to leave out the get_new_handler/set_new_handler definitions from libc++ when we're getting them from libc++abi. Reviewers: EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60717 llvm-svn: 358518
* [CVP] Add tests for non-overflowing mulo; NFCNikita Popov2019-04-161-0/+80
| | | | | | Should be simplified to simple mul. llvm-svn: 358517
* [X86][AVX] X86ISD::PERMV/PERMV3 node types can never fold index opsSimon Pilgrim2019-04-1638-370/+516
| | | | | | | | | | Improves codegen demonstrated by D60512 - instructions represented by X86ISD::PERMV/PERMV3 can never memory fold the operand used for their index register. This patch updates the 'isUseOfShuffle' helper into the more capable 'isFoldableUseOfShuffle' that recognises that the op is used for a X86ISD::PERMV/PERMV3 index mask and can't be folded - allowing us to use broadcast/subvector-broadcast ops to reduce the size of the mask constant pool data. Differential Revision: https://reviews.llvm.org/D60562 llvm-svn: 358516
* [InstCombine] Prune fshl/fshr with masked operandsNikita Popov2019-04-162-12/+12
| | | | | | | | | | | | | | | | If a constant shift amount is used, then only some of the LHS/RHS operand bits are demanded and we may be able to simplify based on that. InstCombineSimplifyDemanded already had the necessary support for that, we just weren't calling it with fshl/fshr as root. In particular, this allows us to relax some masked funnel shifts into simple shifts, as shown in the tests. Patch by Shawn Landden. Differential Revision: https://reviews.llvm.org/D60660 llvm-svn: 358515
* [InstCombine] Add tests for fshl/fshr with masked operands; NFCNikita Popov2019-04-161-0/+81
| | | | | | | | | | Baseline tests for D60660. Patch by Shawn Landden. Differential Revision: https://reviews.llvm.org/D60688 llvm-svn: 358514
* [x86] add more tests for LEA formation; NFCSanjay Patel2019-04-161-0/+154
| | | | | | Promoting the shift to the wider type should allow LEA. llvm-svn: 358513
* [IR] Add WithOverflowInst classNikita Popov2019-04-169-221/+154
| | | | | | | | | | | | | | This adds a WithOverflowInst class with a few helper methods to get the underlying binop, signedness and nowrap type and makes use of it where sensible. There will be two more uses in D60650/D60656. The refactorings are all NFC, though I left some TODOs where things could be improved. In particular we have two places where add/sub are handled but mul isn't. Differential Revision: https://reviews.llvm.org/D60668 llvm-svn: 358512
* [FileSystemStatCache] Update test for new FileSystemStatCache APIHarlan Haskins2019-04-161-5/+6
| | | | | | | | | | | | | | Summary: Update this test to return std::error_code instead of LookupResult. Reviewers: arphaman Subscribers: dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60786 llvm-svn: 358511
* [libFuzzer] Remove tautological compare.Matt Morehouse2019-04-161-2/+1
| | | | llvm-svn: 358510
* [FileSystemStatCache] Return std::error_code from stat cache methodsHarlan Haskins2019-04-163-41/+37
| | | | | | | | | | | | | | | | | | | | | | Summary: Previously, we would return true/false signifying if the cache/lookup succeeded or failed. Instead, provide clients with the underlying error that was thrown while attempting to look up in the cache. Since clang::FileManager doesn't make use of this information, it discards the error that's received and casts away to bool. This change is NFC. Reviewers: benlangmuir, arphaman Subscribers: dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60735 llvm-svn: 358509
* Fix symtab-macho.test broken by r358500Pavel Labath2019-04-162-2/+2
| | | | | | Put the correct UUID string into the breakpad file. llvm-svn: 358508
* [Test] Remove obsolete test.Michael Kruse2019-04-161-21/+0
| | | | | | | | | | | | | | | | | | The FIXME of this test case has been addressed in r335084/r338800. Its execution still does not succeed because of multiple syntax errors. First, the "clang" namespace is missing on each of the 4 pragmas. Second, the pragma for defining the vector width is "vectorize_width(4)" instead of "vectorize(4)". Third, the pragma for defining the interleave factor is "interleave_count(8)" instead of "interleave(8)". The file was already using the wrong syntax when added in r210925 2014-06-13. The file ast-print-pragmas.cpp already checks for the correct pragma order, making this test redundant even if fixed. Differential Revision: https://reviews.llvm.org/D60749 llvm-svn: 358507
* [Tests] Add branch_weights to latches so that test is not effected by future ↵Philip Reames2019-04-161-55/+57
| | | | | | profitability patch to LoopPredication llvm-svn: 358506
* [Hexagon] Remove indeterministic traversal orderKrzysztof Parzyszek2019-04-161-9/+8
| | | | | | Patch by Sergei Larin. llvm-svn: 358505
* [llvm-objdump] Test tabs in disassemble-align.s with a more visible characterFangrui Song2019-04-161-14/+16
| | | | | | | | | | | | | | | | Summary: Apply rupprecht's suggestion in D60376 Reviewers: rupprecht Reviewed By: rupprecht Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60777 llvm-svn: 358504
* [OPENMP][NVPTX]Run combined constructs with if clause in SPMD mode.Alexey Bataev2019-04-162-9/+13
| | | | | | | | | Combined constructs with parallel and if clauses without modifiers may be executed in SPMD mode since if the condition is true for the target region, it is also true for parallel region and the threads must be run in parallel. llvm-svn: 358503
* [DAGCombiner] Add missing flag to addressing mode checkLuis Marques2019-04-161-0/+2
| | | | | | | | | | | | The checks in `canFoldInAddressingMode` tested for addressing modes that have a base register but didn't set the `HasBaseReg` flag to true (it's false by default). This patch fixes that. Although the omission of the flag was technically incorrect it had no known observable impact, so no tests were changed by this patch. Differential Revision: https://reviews.llvm.org/D60314 llvm-svn: 358502
* [OCaml] Update api to account for FNeg and CallBr instructionswhitequark2019-04-163-1/+5
| | | | | | | | | | | | | | | | | | Summary: This diff adds minimal support for the recent FNeg and CallBr instructions to the OCaml bindings. Reviewers: whitequark Reviewed By: whitequark Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60680 llvm-svn: 358501
* Breakpad: Match the new UUID algorithm in minidumpsPavel Labath2019-04-168-32/+101
| | | | | | | | | | | | | | | D59433 and D60501 changed the way UUIDs are computed from minidump files. This was done to synchronize the U(G)UID representation with the native tools of given platforms, but it created a mismatch between minidumps and breakpad files. This updates the breakpad algorithm to match the one found in minidumps, and also adds a couple of tests which should fail if these two ever get out of sync. Incidentally, this means that the module id in the breakpad files is almost identical to our notion of UUIDs, so the computation algorithm can be somewhat simplified. llvm-svn: 358500
* test/PECOFF: Remove REQUIRES: system-windowsPavel Labath2019-04-162-2/+2
| | | | | | | These tests run fine on non-windows platforms too. Instead I add REQUIRES: lld, as that is what they really require. llvm-svn: 358499
* [RISCV] Custom lower SHL_PARTS, SRA_PARTS, SRL_PARTSLuis Marques2019-04-164-18/+407
| | | | | | | | | When not optimizing for minimum size (-Oz) we custom lower wide shifts (SHL_PARTS, SRA_PARTS, SRL_PARTS) instead of expanding to a libcall. Differential Revision: https://reviews.llvm.org/D59477 llvm-svn: 358498
* [pstl] Remove the stdlib headers from the PSTL and move them to the testsLouis Dionne2019-04-1664-371/+50
| | | | | | | | | | | | | | | | | Summary: PSTL should not provide those headers since they belong to the standard library. Instead, we define a dummy standard library in the tests that provides those headers. Reviewers: rodgert, MikeDvorskiy Subscribers: mgorny, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60535 llvm-svn: 358497
* [clangd] Check file path of declaring header when deciding whether to insert ↵Eric Liu2019-04-165-29/+28
| | | | | | | | | | | | | | | | | | | include. Summary: Previously, we would use include spelling of the declaring header to check whether the inserted header is the same as the main file. This doesn't help because we only have file path of the main file. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60687 llvm-svn: 358496
* [SystemZ] Add missing intrinsics to intrinsics-immarg.llUlrich Weigand2019-04-161-0/+217
| | | | | | | | | | As of r356091, support for the ImmArg intrinsics was added, including a SystemZ test case. However, that test case doesn't actually verify all SystemZ intrinsics with immediate arguments, only a subset. The rest of them actually works correctly, there's just no test for them. This patch add all missing intrinsics. llvm-svn: 358495
* [llvm][Support] Provide interface to set thread prioritiesKadir Cetinkaya2019-04-163-0/+68
| | | | | | | | | | | | | | | | | | | Summary: We have a multi-platform thread priority setting function(last piece landed with D58683), I wanted to make this available to all llvm community, there seem to be other users of such functionality with portability fixmes: lib/Support/CrashRecoveryContext.cpp tools/clang/tools/libclang/CIndex.cpp Reviewers: gribozavr, ioeric Subscribers: krytarowski, jfb, kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59130 llvm-svn: 358494
* [OPENMP]Require aarch arch for the tests, NFC.Alexey Bataev2019-04-167-0/+7
| | | | llvm-svn: 358493
* llvm-undname: Consistently use "return nullptr" in functions returning pointersNico Weber2019-04-161-4/+4
| | | | llvm-svn: 358492
* llvm-undname: Fix nullptr deref on invalid structor names in template argsNico Weber2019-04-162-3/+9
| | | | | | | | | | | | Similar to r358421: A StructorIndentifierNode has a Class field which is read when printing it, but if the StructorIndentifierNode appears in a template argument then demangleFullyQualifiedSymbolName() which sets Class isn't called. Since StructorIndentifierNodes are always leaf names, we can just reject them as well. Found by oss-fuzz. llvm-svn: 358491
* [AArch64] Implement Vector Funtion ABI name mangling.Alexey Bataev2019-04-169-3/+687
| | | | | | | | | | | | | | | | | | | Summary: The name mangling scheme is defined in section 3.5 of the "Vector function application binary interface specification for AArch64" [1]. [1] https://developer.arm.com/products/software-development-tools/hpc/arm-compiler-for-hpc/vector-function-abi Reviewers: rengolin, ABataev Reviewed By: ABataev Subscribers: sdesmalen, javed.absar, kristof.beyls, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60583 llvm-svn: 358490
* llvm-undname: Tweak arena allocatorNico Weber2019-04-162-19/+19
| | | | | | | | | | | | | | | | - Make `allocUnalignedBuffer` look more like `allocArray` and `alloc`. No behavior change. - Change `Head->Used < Head->Capacity` to `Head->Used <= Head->Capacity` in `allocArray` and `alloc`. No intended behavior change, might be a minuscule memory usage improvement. Noticed this since it was the logic used in `allocUnalignedBuffer`. - Don't let `allocArray` alloc too small buffers for names that have more than 512 levels of nesting (in 64-bit builds). Fixes a heap buffer overflow found by oss-fuzz. Differential Revision: https://reviews.llvm.org/D60774 llvm-svn: 358489
* llvm-undname: add a missing CHECK: to a passing testNico Weber2019-04-161-2/+2
| | | | llvm-svn: 358488
* Fix llvm-undname tests after r358485Nico Weber2019-04-161-1/+1
| | | | llvm-svn: 358487
* gn build: Merge r358422Nico Weber2019-04-161-0/+1
| | | | llvm-svn: 358486
* llvm-undname: Add a -raw-file flag to pass a raw buffer to microsoftDemangleNico Weber2019-04-161-4/+23
| | | | | | | | | | | | | | The default handling splits input into lines. Since llvm-microsoft-demangle-fuzzer doesn't do this, oss-fuzz produces inputs that only trigger crashes if the input isn't split into lines. This adds a hidden flag -raw-file which passes file contents to microsoftDemangle() in the same way the fuzzer does, for reproducing oss-fuzz reports. Also change llvm-undname to have a non-0 exit code for invalid symbols. Differential Revision: https://reviews.llvm.org/D60771 llvm-svn: 358485
* Re-commit r357452: SimplifyCFG SinkCommonCodeFromPredecessors: Also sink ↵Hans Wennborg2019-04-169-84/+128
| | | | | | | | | | | | | | | | | | | function calls without used results (PR41259) The original commit caused false positives from AddressSanitizer's use-after-scope checks, which have now been fixed in r358478. > The code was previously checking that candidates for sinking had exactly > one use or were a store instruction (which can't have uses). This meant > we could sink call instructions only if they had a use. > > That limitation seemed a bit arbitrary, so this patch changes it to > "instruction has zero or one use" which seems more natural and removes > the need to special-case stores. > > Differential revision: https://reviews.llvm.org/D59936 llvm-svn: 358483
* Removed CMake cache upgrade code from 2011Dmitri Gribenko2019-04-161-9/+0
| | | | | | | | | | | | | | | Summary: This code was added in r141266 to make a breaking change to CMake, but still be compatible with existing cache files. The cache files from 2011 are irrelevant today in 2019. Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60711 llvm-svn: 358482
* Fix typo in ArmUnwindInfo::GetUnwindPlanRaphael Isemann2019-04-161-1/+1
| | | | | | | | | | | | | | | | | | | Summary: As reported in LLVM bug 41486, the check `(byte1 & 0xf8) == 0xc0` is wrong. We want to check for `11010nnn`, so the proper value we want to compare against is `0xd0` (`0xc0` would check for the value `11000nnn` which we already checked for above as described in the bug report). Reviewers: #lldb, jasonmolenda Reviewed By: #lldb, jasonmolenda Subscribers: jasonmolenda, javed.absar, kristof.beyls, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D60655 llvm-svn: 358479
* Asan use-after-scope: don't poison allocas if there were untraced lifetime ↵Hans Wennborg2019-04-162-1/+50
| | | | | | | | | | | | | | intrinsics in the function (PR41481) If there are any intrinsics that cannot be traced back to an alloca, we might have missed the start of a variable's scope, leading to false error reports if the variable is poisoned at function entry. Instead, if there are some intrinsics that can't be traced, fail safe and don't poison the variables in that function. Differential revision: https://reviews.llvm.org/D60686 llvm-svn: 358478
* Correctly check if a warning message lacks a trailing new lineRaphael Isemann2019-04-161-3/+3
| | | | | | | | | | | | | | | | Summary: Fixes LLVM bug 41489. Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D60653 llvm-svn: 358477
* Use native llvm JSON library for time profiler outputAnton Afanasyev2019-04-161-37/+37
| | | | | | | | | | | | | | Summary: Replace plain json text output with llvm JSON library wrapper using. Reviewers: takuto.ikuta, lebedev.ri Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60609 llvm-svn: 358476
* [llvm-objdump] Align instructions to a tab stop in disassembly outputFangrui Song2019-04-162-5/+47
| | | | | | | | | | | | | | | | | | | | | | | This relands D60376/rL358405, with the difference: sed 'y/\t/ /' -> tr '\t' ' ' BSD sed doesn't support escape characters for the 'y' command. I didn't use it in rL358405 because it was not listed at https://llvm.org/docs/GettingStarted.html#software but it should be available. Original description: In GNU objdump, -w/--wide aligns instructions in the disassembly output. This patch does the same to llvm-objdump. However, we always use the wide format (-w/--wide is ignored), because the narrow format (instructions are misaligned) is probably not very useful. In llvm-readobj, we made a similar decision: always use the wide format, accept but ignore -W/--wide. To save some columns, we change the tab before hex bytes (controlled by --[no-]show-raw-insn) to a space. llvm-svn: 358474
* [MachO] Add -macho to llvm-objdump commandsFangrui Song2019-04-164-4/+4
| | | | llvm-svn: 358473
* [llvm-objdump] Simplify PrintHelpMessage() logicFangrui Song2019-04-163-31/+13
| | | | | | | | This relands rL358418. It missed one test that should also use -macho Note, all the other -private-header -exports-trie tests are used together with -macho. llvm-svn: 358472
OpenPOWER on IntegriCloud