summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* CodeGenPrep: add separate hook say when GEPs should be used for sinking. NFCI.Tim Northover2019-09-122-2/+8
| | | | | | | | | Up to now, we've decided whether to sink address calculations using GEPs or normal arithmetic based on the useAA hook, but there are other reasons GEPs might be preferred. So this patch splits the two questions, with a default implementation falling back to useAA. llvm-svn: 371721
* [clang-format] [PR43100] clang-format C# support does not add a space ↵Paul Hoad2019-09-122-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | between "using" and paren Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=43100 Formatting using statement in C# with clang-format removes the space between using and paren even when SpaceBeforeParens is ! ``` using(FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, bufferSize : 1)) ``` this change simply overcomes this for when using C# settings in the .clang-format file ``` using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, bufferSize : 1)) ``` All FormatTests pass.. ``` [==========] 688 tests from 21 test cases ran. (88508 ms total) [ PASSED ] 688 tests. ``` Reviewers: djasper, klimek, owenpan Reviewed By: owenpan Subscribers: llvm-commits, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66662 llvm-svn: 371720
* [clang-format] Add new style option IndentGotoLabelsPaul Hoad2019-09-126-3/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This option determines whether goto labels are indented according to scope. Setting this option to false causes goto labels to be flushed to the left. This is mostly copied from [[ http://lists.llvm.org/pipermail/cfe-dev/2015-September/045014.html | this patch ]] submitted by Christian Neukirchen that didn't make its way into trunk. ``` true: false: int f() { vs. int f() { if (foo()) { if (foo()) { label1: label1: bar(); bar(); } } label2: label2: return 1; return 1; } } ``` Reviewers: klimek, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: cfe-commits Tags: #clang, #clang-tools-extra Patch by: tetsuo-cpp Differential Revision: https://reviews.llvm.org/D67037 llvm-svn: 371719
* [InstSimplify] simplifyUnsignedRangeCheck(): handle more cases (PR43251)Roman Lebedev2019-09-122-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I don't have a direct motivational case for this, but it would be good to have this for completeness/symmetry. This pattern is basically the motivational pattern from https://bugs.llvm.org/show_bug.cgi?id=43251 but with different predicate that requires that the offset is non-zero. The completeness bit comes from the fact that a similar pattern (offset != zero) will be needed for https://bugs.llvm.org/show_bug.cgi?id=43259, so it'd seem to be good to not overlook very similar patterns.. Proofs: https://rise4fun.com/Alive/21b Also, there is something odd with `isKnownNonZero()`, if the non-zero knowledge was specified as an assumption, it didn't pick it up (PR43267) Reviewers: spatel, nikic, xbolva00 Reviewed By: spatel Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67411 llvm-svn: 371718
* [PowerPC][MCP][NFC] Pre-commit test cases for https://reviews.llvm.org/D65267Kai Luo2019-09-121-0/+281
| | | | llvm-svn: 371717
* [ELF] Fix a common-page-size typoFangrui Song2019-09-121-1/+1
| | | | llvm-svn: 371716
* [ELF] Support -z undefsFangrui Song2019-09-122-1/+9
| | | | | | | | | | | -z undefs is the inverse of -z defs. It allows unresolved references from object files. This can be used to cancel --no-undefined or -z defs. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D67479 llvm-svn: 371715
* [DAGCombiner] Improve division estimation of floating points.Qiu Chaofan2019-09-127-689/+737
| | | | | | | | | | | | | Current implementation of estimating divisions loses precision since it estimates reciprocal first and does multiplication. This patch is to re-order arithmetic operations in the last iteration in DAGCombiner to improve the accuracy. Reviewed By: Sanjay Patel, Jinsong Ji Differential Revision: https://reviews.llvm.org/D66050 llvm-svn: 371713
* [WebAssembly] Delete duplicate REQUIRES lineHeejin Ahn2019-09-121-1/+0
| | | | | | | r371710 and r371711 committed the same line, so this deletes one of them. llvm-svn: 371712
* [WebAssembly] Make wasm-eh.cpp requires WebAssemblyHeejin Ahn2019-09-121-0/+1
| | | | | | | | | D67208 added a new test line to wasm-eh.cpp that invokes the LLVM backend and this test fails on bots that don't have WebAssembly target. This makes wasm-eh.cpp explicitly require WebAssembly so this will be skipped on those targets. llvm-svn: 371711
* [WebAssembly] Add REQUIRES to testDavid Zarzycki2019-09-121-0/+1
| | | | llvm-svn: 371710
* [LegalizeTypes] Remove code for softening a float type to itself.Craig Topper2019-09-126-269/+59
| | | | | | | | | This was previously used to turn fp128 operations into libcalls on X86. This is now done through op legalization after r371672. This restores much of this code to before r254653. llvm-svn: 371709
* [WebAssembly] Add -fwasm-exceptions for wasm EHHeejin Ahn2019-09-129-12/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds `-fwasm-exceptions` (in similar fashion with `-fdwarf-exceptions` or `-fsjlj-exceptions`) that turns on everything with wasm exception handling from the frontend to the backend. We currently have `-mexception-handling` in clang frontend, but this is only about the architecture capability and does not turn on other necessary options such as the exception model in the backend. (This can be turned on with `llc -exception-model=wasm`, but llc is not invoked separately as a command line tool, so this option has to be transferred from clang.) Turning on `-fwasm-exceptions` in clang also turns on `-mexception-handling` if not specified, and will error out if `-mno-exception-handling` is specified. Reviewers: dschuff, tlively, sbc100 Subscribers: aprantl, jgravelle-google, sunfish, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67208 llvm-svn: 371708
* Make SwitchInstProfUpdateWrapper strict permanentlyYevgeny Rouban2019-09-122-40/+14
| | | | | | | | | | | | | | | | | | | We have been using -switch-inst-prof-update-wrapper-strict set to true by default for some time. It is time to remove the safety stuff and make SwitchInstProfUpdateWrapper intolerant to inconsistencies in !prof branch_weights metadata of SwitchInst. This patch gets rid of the Invalid state of SwitchInstProfUpdateWrapper and the option -switch-inst-prof-update-wrapper-strict. So there is only two states: changed and unchanged. Reviewers: davidx, nikic, eraman, reames, chandlerc Reviewed By: davidx Differential Revision: https://reviews.llvm.org/D67435 llvm-svn: 371707
* [clang-tidy] Fix build with -DBUILD_SHARED_LIB=ONHeejin Ahn2019-09-121-0/+1
| | | | | | | | | | | | | | Summary: This fixes build failures with `-DBUILD_SHARED_LIB=ON` after D67419. Reviewers: NoQ Subscribers: mgorny, xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67473 llvm-svn: 371706
* [compiler-rt] cpplint of inc files in backgroundVitaly Buka2019-09-121-0/+2
| | | | llvm-svn: 371705
* [compiler-rt] Remove some cpplint filtersVitaly Buka2019-09-1222-63/+77
| | | | llvm-svn: 371704
* [compiler-rt] Run cpplint only for check-sanitizerVitaly Buka2019-09-122-3/+5
| | | | llvm-svn: 371703
* [compiler-rt] Better lint output for .inc filesVitaly Buka2019-09-123-19/+12
| | | | llvm-svn: 371702
* gn build: Merge r371700Nico Weber2019-09-121-0/+1
| | | | llvm-svn: 371701
* Reapply llvm-reduce: Add pass to reduce parameters""David Blaikie2019-09-126-0/+188
| | | | | | | | | | Fixing a couple of asan-identified bugs * use of an invalid "Use" iterator after the element was removed * use of StringRef to Function name after the Function was erased This reapplies r371567, which was reverted in r371580. llvm-svn: 371700
* [clang-scan-deps] Add dependency targetsJan Korous2019-09-128-10/+53
| | | | | | Differential Revision: https://reviews.llvm.org/D67475 llvm-svn: 371697
* PR43278: llvm-reduce: Use temporary file names (and ToolOutputFile) rather ↵David Blaikie2019-09-127-57/+40
| | | | | | | | | | | | | | | than unique ones - to ensure they're cleaned up This modifies the tool somewhat to only create files when about to run the "interestingness" test, and delete them immediately after - this means some more files will be created sometimes (when "double checking" work - which should probably be fixed/avoided anyway). This now creates temporary files, rather than only unique ones, and also uses ToolOutputFile (without ever calling "keep") to ensure the files are deleted as soon as the interestingness test is run. llvm-svn: 371696
* [X86] Enable -mprefer-vector-width=256 by default for Skylake-avx512 and ↵Craig Topper2019-09-114-2/+20
| | | | | | | | | | | | | | | | later Intel CPUs. AVX512 instructions can cause a frequency drop on these CPUs. This can negate the performance gains from using wider vectors. Enabling prefer-vector-width=256 will prevent generation of zmm registers unless explicit 512 bit operations are used in the original source code. I believe gcc and icc both do something similar to this by default. Differential Revision: https://reviews.llvm.org/D67259 llvm-svn: 371694
* [AArch64][GlobalISel] Fall back on attempts to allocate split types on the ↵Amara Emerson2019-09-113-6/+37
| | | | | | | | | | | | | | | stack. First we were asserting that the ValNo of a VA was the wrong value. It doesn't actually make a difference for us in CallLowering but fix that anyway to silence the assert. The bigger issue was that after fixing the assert we were generating invalid MIR because the merging/unmerging of values split across multiple registers wasn't also implemented for memory locs. This happens when we run out of registers and have to pass the split types like i128 -> i64 x 2 on the stack. This is do-able, but for now just fall back. llvm-svn: 371693
* [GlobalISel][AArch64] Check caller for swifterror params in tailcall eligibilityJessica Paquette2019-09-113-47/+16
| | | | | | | | | | | | | | | | Before, we only checked the callee for swifterror. However, we should also be checking the caller to see if it has a swifterror parameter. Since we don't currently handle outgoing arguments, this didn't show up in the swifterror.ll testcase. Also, remove the swifterror checks from call-translator-tail-call.ll, since they are covered by the existing swifterror testing. Better to have it all in one place. Differential Revision: https://reviews.llvm.org/D67465 llvm-svn: 371692
* [dfsan] Revert dfsan_set_label removalVitaly Buka2019-09-111-0/+5
| | | | | | It's part of interface, maybe it is used in external code. llvm-svn: 371691
* [Reproducer] Move the command loader into the reproducer (NFC)Jonas Devlieghere2019-09-113-48/+53
| | | | | | | | This just moves the CommandLoader utility into the reproducer namespace and makes it accessible outside the API layer. This is setting things up for a bigger change. llvm-svn: 371689
* [NFC] Reformat SBDebugger before making changesJonas Devlieghere2019-09-111-31/+14
| | | | llvm-svn: 371688
* Remove NOLINTs from compiler-rtVitaly Buka2019-09-1192-398/+402
| | | | llvm-svn: 371687
* [Reproducer] Move GDB Remote Provider into Reproducer (NFC)Jonas Devlieghere2019-09-113-44/+45
| | | | | | | | | | | | | | Originally the idea was for providers to be defined close to where they are used. While this helped designing the providers in such a way that they don't depend on each other, it also means that it's not possible to access them from a central place. This proved to be a problem for some providers and resulted in them living in the reproducer class. The ProcessGDBRemote provider is the last remaining exception. This patch makes things consistent and moves it into the reproducer like the other providers. llvm-svn: 371685
* [TableGen] Skip CRLF conversion when writing outputReid Kleckner2019-09-111-2/+2
| | | | | | | | | Doing the CRLF translation while writing the file defeats our optimization to not update the file if it hasn't changed. Fixes PR43271. llvm-svn: 371683
* [InstCombine] rename variable for readability; NFCSanjay Patel2019-09-111-21/+21
| | | | | | | There's more that can be done here, but "OpI" doesn't convey that we casted to BinaryOperator. llvm-svn: 371682
* Add some missing changes to GSYM that was addressing a gcc compilation error ↵David Blaikie2019-09-113-14/+14
| | | | | | due to a type and variable with the same name llvm-svn: 371681
* Fix mac buildVitaly Buka2019-09-111-4/+4
| | | | llvm-svn: 371680
* PR43278: Temporarily disable llvm-reduce tests due to exhausting temp filesDavid Blaikie2019-09-113-6/+6
| | | | llvm-svn: 371679
* [X86] Fix latent bugs in 32-bit CMPXCHG8B inserterReid Kleckner2019-09-113-7/+72
| | | | | | | | | | | | | | | I found three issues: 1. the loop over E[ABCD]X copies run over BB start 2. the direct address of cmpxchg8b could be a frame index 3. the displacement of cmpxchg8b could be a global instead of an immediate These were all introduced together in r287875, and should be fixed with this change. Issue reported by Zachary Turner. llvm-svn: 371678
* [ConstantFolding] Refactor math functions to use LLVM ones (NFC)Evandro Menezes2019-09-111-37/+42
| | | | | | | | | When possible, replace calls to library routines on the host with equivalent ones in LLVM. Differential revision: https://reviews.llvm.org/D67459 llvm-svn: 371677
* Revert [llvm-nm] Add tapi file supportCyndy Ishida2019-09-1115-298/+20
| | | | | | This reverts r371576 (git commit f88f46358dbffa20af3b054a9346e5154789d50f) llvm-svn: 371676
* Update compiler-rt cpplint.pyVitaly Buka2019-09-1121-2726/+4953
| | | | | | https://github.com/cpplint/cpplint/commit/adb3500107f409ac5491188ae652ac3f4d03d9d3 llvm-svn: 371675
* Revert [Object][TextAPI] NFC, fix tapi lit testsCyndy Ishida2019-09-112-6/+6
| | | | | | This reverts r371577 (git commit b2b0ccab2f76733679eeceecf31b21ebc1fe23ac) llvm-svn: 371674
* [X86] Add test case for v16i64->v16i32 truncate on min-legal-vector-width=256.Craig Topper2019-09-111-0/+19
| | | | | | I think this case would crash before I added back the -x86-experimental-vector-widening command line option. Adding this test case to prevent breaking it again when we remove the option. llvm-svn: 371673
* [X86] Move x86_64 fp128 conversion to libcalls from type legalization to DAG ↵Craig Topper2019-09-115-42/+177
| | | | | | | | | | | | | | legalization fp128 is considered a legal type for a register, but has almost no legal operations so everything needs to be converted to a libcall. Previously this was implemented by tricking type legalization into softening the operations with various checks for "is legal in hardware register" to change the behavior to still use f128 as the resulting type instead of converting to i128. This patch abandons this approach and instead moves the libcall conversions to LegalizeDAG. This is the approach taken by AArch64 where they also have a legal fp128 type, but no legal operations. I think this is more in spirit with how SelectionDAG's phases are supposed to work. I had to make some hacks for STRICT_FP_ROUND because some of the strict FP handling checks if ISD::FP_ROUND is Legal for a given result type, but I had to make ISD::FP_ROUND Custom to allow making a libcall when the input is f128. For all other types the Custom handler just returns the original node. These hacks are incomplete and don't work for a strict truncate from f128, but I don't think it worked before either since LegalizeFloatTypes doesn't know about strict ops yet. I've also raised PR43209 against AArch64 which currently crashes on a strict ftrunc from f64->f32 because of FP_ROUND being marked Custom for the same reason there. Differential Revision: https://reviews.llvm.org/D67128 llvm-svn: 371672
* AMDGPU: Move m0 initializations earlierAustin Kerbow2019-09-113-25/+131
| | | | | | | | | | | | | | | | | Summary: After hoisting and merging m0 initializations schedule them as early as possible in the MBB. This helps the scheduler avoid hazards in some cases. Reviewers: rampitec, arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67450 llvm-svn: 371671
* gn build: Merge r371661Nico Weber2019-09-112-1/+1
| | | | llvm-svn: 371670
* gn build: Merge r371657Nico Weber2019-09-111-0/+1
| | | | llvm-svn: 371669
* [DWARF] Evaluate DW_OP_entry_valueVedant Kumar2019-09-119-8/+557
| | | | | | | | | | | | Add support for evaluating DW_OP_entry_value. This involves parsing DW_TAG_call_site_parameter and wiring the information through to the expression evaluator. rdar://54496008 Differential Revision: https://reviews.llvm.org/D67376 llvm-svn: 371668
* [Status] Add a LLDB_ERRORF macro for error reporting (similar to LLDB_LOGF)Vedant Kumar2019-09-111-0/+7
| | | | llvm-svn: 371667
* [DWARF] Emit call site parameter info when tuning for lldbVedant Kumar2019-09-112-28/+65
| | | | | | | | | Emit debug entry values using standard DWARF5 opcodes when the debugger tuning is set to lldb. Differential Revision: https://reviews.llvm.org/D67410 llvm-svn: 371666
* Fix up a test updated in r371655 - require case-insensitive file system.Volodymyr Sapsai2019-09-111-0/+1
| | | | | | | On case-sensitive file systems include with wrong case is not found instead of showing a warning. llvm-svn: 371665
OpenPOWER on IntegriCloud