summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [mips][msa] Fix infinite loop for mips.nori.b intrinsicSimon Atanasyan2019-09-114-414/+350
| | | | | | | | | | | | | | | When value of immediate in `mips.nori.b` is 255 (which has all ones in binary form as 8bit integer) DAGCombiner and Legalizer would fall in an infinite loop. DAGCombiner would try to simplify `or %value, -1` by turning `%value` into UNDEF. Legalizer will turn it back into `Constant<0>` which would then be again turned into UNDEF by DAGCombiner. To avoid this loop we make UNDEF legal for MSA int types on Mips. Patch by Mirko Brkusanin. Differential Revision: https://reviews.llvm.org/D67280 llvm-svn: 371607
* Fix -Wdocumentation warning - void function doesn't need a @returns. NFCI.Simon Pilgrim2019-09-111-1/+0
| | | | llvm-svn: 371606
* [Diagnostics] Add -Wsizeof-array-divDavid Bolvansky2019-09-113-10/+53
| | | | | | | | | | Summary: Clang version of https://www.viva64.com/en/examples/v706/ Reviewers: rsmith Differential Revision: https://reviews.llvm.org/D67287 llvm-svn: 371605
* [NFC] Updated objsize-64.ll testDavid Bolvansky2019-09-111-1/+1
| | | | llvm-svn: 371604
* [NFC] Fixed testDavid Bolvansky2019-09-111-2/+2
| | | | llvm-svn: 371603
* [InstCombine] Fixed handling of isOpNewLike (PR11748)David Bolvansky2019-09-112-8/+19
| | | | llvm-svn: 371602
* [LoopInterchange] Drop unused splitInnerLoopHeader declaration.Florian Hahn2019-09-111-1/+0
| | | | llvm-svn: 371601
* [LLDB][ELF] Fixup for comments in D67390Konrad Kleine2019-09-113-8/+7
| | | | llvm-svn: 371600
* [LLDB][ELF] Load both, .symtab and .dynsym sectionsKonrad Kleine2019-09-116-9/+119
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change ensures that the .dynsym section will be parsed even when there's already is a .symtab. It is motivated because of minidebuginfo (https://sourceware.org/gdb/current/onlinedocs/gdb/MiniDebugInfo.html#MiniDebugInfo). There it says: Keep all the function symbols not already in the dynamic symbol table. That means the .symtab embedded inside the .gnu_debugdata does NOT contain the symbols from .dynsym. But in order to put a breakpoint on all symbols we need to load both. I hope this makes sense. My other patch D66791 implements support for minidebuginfo, that's why I need this change. Reviewers: labath, espindola, alexshap Subscribers: JDevlieghere, emaste, arichardson, MaskRay, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67390 llvm-svn: 371599
* Revert "clang-misexpect: Profile Guided Validation of Performance ↵Dmitri Gribenko2019-09-1143-1906/+26
| | | | | | | | | | | | | | | | | | | Annotations in LLVM" This reverts commit r371584. It introduced a dependency from compiler-rt to llvm/include/ADT, which is problematic for multiple reasons. One is that it is a novel dependency edge, which needs cross-compliation machinery for llvm/include/ADT (yes, it is true that right now compiler-rt included only header-only libraries, however, if we allow compiler-rt to depend on anything from ADT, other libraries will eventually get used). Secondly, depending on ADT from compiler-rt exposes ADT symbols from compiler-rt, which would cause ODR violations when Clang is built with the profile library. llvm-svn: 371598
* [ARM] Take into account -mcpu and -mfpu options while handling 'crypto' featureDiogo N. Sampaio2019-09-113-16/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submittin in behalf of krisb (Kristina Bessonova) <ch.bessonova@gmail.com> Summary: '+crypto' means '+aes' and '+sha2' for arch >= ARMv8 when they were not disabled explicitly. But this is correctly handled only in case of '-march' option, though the feature may also be specified through the '-mcpu' or '-mfpu' options. In the following example: $ clang -mcpu=cortex-a57 -mfpu=crypto-neon-fp-armv8 'aes' and 'sha2' are disabled that is quite unexpected: $ clang -cc1 -triple armv8--- -target-cpu cortex-a57 <...> -target-feature -sha2 -target-feature -aes -target-feature +crypto This exposed by https://reviews.llvm.org/D63936 that makes the 'aes' and 'sha2' features disabled by default. So, while handling the 'crypto' feature we need to take into account: - a CPU name, as it provides the information about architecture (if no '-march' option specified), - features, specified by the '-mcpu' and '-mfpu' options. Reviewers: SjoerdMeijer, ostannard, labrinea, dnsampaio Reviewed By: dnsampaio Subscribers: ikudrin, javed.absar, kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66018 Author: krisb llvm-svn: 371597
* [LLDB] Do not try to canonicalize gethostname() resultDavid Zarzycki2019-09-111-12/+1
| | | | | | | | | | | | | | | | This code is trying too hard and failing. Either the result of gethostname() is canonical or it is not. If it is not, then trying to canonicalize it is – for various reasons – a lost cause. For example, a given machine might have multiple network interfaces with multiple addresses per interface, each with a different canonical name. Separably, the result of HostInfoPosix::GetHostname() and latency thereof shouldn't depend on whether networking is up or down or what network the machine happened to be attached to at any given moment (like a laptop that travels between work and home). https://reviews.llvm.org/D67230 llvm-svn: 371596
* [LoopInterchange] Properly move condition, induction increment and ops to latch.Florian Hahn2019-09-116-38/+266
| | | | | | | | | | | | | | | | | | | | | | | Currently we only rely on the induction increment to come before the condition to ensure the required instructions get moved to the new latch. This patch duplicates and moves the required instructions to the newly created latch. We move the condition to the end of the new block, then process its operands. We stop at operands that are defined outside the loop, or are the induction PHI. We duplicate the instructions and update the uses in the moved instructions, to ensure other users remain intact. See the added test2 for such an example. Reviewers: efriedma, mcrosier Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D67367 llvm-svn: 371595
* [NFC][ARM] Add and modify testsSam Parker2019-09-112-2/+134
| | | | | | Add test for ParallelDSP. llvm-svn: 371594
* [LTO] Avoid calling GlobalValue::getGUID (MD5) twiceFangrui Song2019-09-111-2/+1
| | | | llvm-svn: 371593
* [TLI][AMDGPU] AMDPAL does not have library functionsTim Renouf2019-09-112-12/+23
| | | | | | | | | | | Configure TLI to say that r600/amdgpu does not have any library functions, such that InstCombine does not do anything like turn sin/cos into the library function @tan with sufficient fast math flags. Differential Revision: https://reviews.llvm.org/D67406 Change-Id: I02f907d3e64832117ea9800e9f9285282856e5df llvm-svn: 371592
* [llvm-objcopy] Simplify --prefix-alloc-sectionsFangrui Song2019-09-111-53/+43
| | | | | | | | | | | Handle --prefix-alloc-sections after --rename-sections so that --prefix-alloc-sections code does not have to check if renaming has been performed. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D66931 llvm-svn: 371591
* [Attributor] Implement "noalias" callsite argument deductionHideto Ueno2019-09-112-4/+126
| | | | | | | | | | | | | | | | Summary: Now, `nocapture` is deduced in Attributor therefore, this patch introduces deduction for `noalias` callsite argument using `nocapture`. Reviewers: jdoerfert, sstefan1 Reviewed By: jdoerfert Subscribers: lebedev.ri, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67286 llvm-svn: 371590
* [Attributor][Fix] Manifest nocapture only in CSArgument or ArgumentHideto Ueno2019-09-111-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: We can query to Attributor whether the value is captured in the scope or not on the following way: ``` const auto & NoCapAA = A.getAAFor<AANoCapture>(*this, IRPosition::value(V)); ``` And if V is CallSiteReturned then `getDeducedAttribute` will add `nocatpure` to the callsite returned value. It is not valid. This patch checks the position is an argument or call site argument. This is tested in D67286. Reviewers: jdoerfert, sstefan1 Reviewed By: jdoerfert Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67342 llvm-svn: 371589
* [ELF][test] Make tests more tolerant to exact symbol addressesFangrui Song2019-09-119-109/+101
| | | | llvm-svn: 371588
* [Debuginfo][Instcombiner] Do not clone dbg.declare.Alexey Lapshin2019-09-112-0/+159
| | | | | | | | | | | | TryToSinkInstruction() has a bug: While updating debug info for sunk instruction, it could clone dbg.declare intrinsic. That is wrong. There could be only one dbg.declare. The fix is to not clone dbg.declare intrinsic and to update it`s arguments, to not to point to sunk instruction. Differential Revision: https://reviews.llvm.org/D67217 llvm-svn: 371587
* [CodeGen] Add alias for cpu_dispatch function with IFunc & Fix resolver ↵Fangrui Song2019-09-1112-86/+125
| | | | | | | | | | | | | | linkage type Multi-versioned functions defined by cpu_dispatch and implemented with IFunc can not be called outside the translation units where they are defined due to lack of symbols. This patch add function aliases for these functions and thus make them visible outside. Differential Revision: https://reviews.llvm.org/D67058 Patch by Senran Zhang llvm-svn: 371586
* [llvm-nm] Fix -DBUILD_SHARED_LIBS=ON builds after D66160/r371576Fangrui Song2019-09-111-0/+1
| | | | llvm-svn: 371585
* clang-misexpect: Profile Guided Validation of Performance Annotations in LLVMPetr Hosek2019-09-1143-26/+1906
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains the basic functionality for reporting potentially incorrect usage of __builtin_expect() by comparing the developer's annotation against a collected PGO profile. A more detailed proposal and discussion appears on the CFE-dev mailing list (http://lists.llvm.org/pipermail/cfe-dev/2019-July/062971.html) and a prototype of the initial frontend changes appear here in D65300 We revised the work in D65300 by moving the misexpect check into the LLVM backend, and adding support for IR and sampling based profiles, in addition to frontend instrumentation. We add new misexpect metadata tags to those instructions directly influenced by the llvm.expect intrinsic (branch, switch, and select) when lowering the intrinsics. The misexpect metadata contains information about the expected target of the intrinsic so that we can check against the correct PGO counter when emitting diagnostics, and the compiler's values for the LikelyBranchWeight and UnlikelyBranchWeight. We use these branch weight values to determine when to emit the diagnostic to the user. A future patch should address the comment at the top of LowerExpectIntrisic.cpp to hoist the LikelyBranchWeight and UnlikelyBranchWeight values into a shared space that can be accessed outside of the LowerExpectIntrinsic pass. Once that is done, the misexpect metadata can be updated to be smaller. In the long term, it is possible to reconstruct portions of the misexpect metadata from the existing profile data. However, we have avoided this to keep the code simple, and because some kind of metadata tag will be required to identify which branch/switch/select instructions are influenced by the use of llvm.expect Patch By: paulkirth Differential Revision: https://reviews.llvm.org/D66324 llvm-svn: 371584
* Ah, only skip this for embedded darwin targets.Jason Molenda2019-09-111-1/+1
| | | | llvm-svn: 371583
* Skip a test in TestProcessIO.py when running against ios devices.Jason Molenda2019-09-111-0/+1
| | | | llvm-svn: 371582
* Emit -Wmicrosoft-enum-value warning instead of error in MS ABIReid Kleckner2019-09-112-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The first NFC change is to replace a getCXXABI().isMicrosoft() check with getTriple().isWindowsMSVCEnvironment(). This code takes effect in non-C++ compilations, so it doesn't make sense to check the C++ ABI. In the MS ABI, enums are always considered to be "complete" because the underlying type of an unfixed enum will always be 'int'. This behavior was moved from -fms-compatibility to MS ABI back in r249656. The second change is functional, and it downgrades an error to a warning when the MS ABI is used rather than only under -fms-compatibility. The reasoning is that it's unreasonable for the following code to reject the following code for all MS ABI targets with -fno-ms-compatibility: enum Foo { Foo_Val = 0xDEADBEEF }; This is valid code for any other target, but in the MS ABI, Foo_Val just happens to be negative. With this change, clang emits a -Wmicrosoft-enum-value warning on this code, but compiles it without error. Fixes PR38478 Reviewers: hans, rsmith, STL_MSFT Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67304 llvm-svn: 371581
* Revert "llvm-reduce: Add pass to reduce parameters"David Blaikie2019-09-116-187/+0
| | | | | | | | Looks to be failing on asan buildbots This reverts commit r371567. llvm-svn: 371580
* Revert "Adding support for overriding LLVM_ENABLE_RUNTIMES for runtimes builds."Petr Hosek2019-09-111-4/+1
| | | | | | | This reverts commit r371566: this doesn't correctly handle the case where LLVM_ENABLE_RUNTIMES contains a list of values. llvm-svn: 371579
* [clang-scan-deps][NFC] Fix tests - prevent FileCheck matching test dir pathJan Korous2019-09-1113-34/+34
| | | | | | Differential Revision: https://reviews.llvm.org/D67379 llvm-svn: 371578
* [Object][TextAPI] NFC, fix tapi lit testsCyndy Ishida2019-09-112-6/+6
| | | | | | FileCheck command had wrong casing, which works fine on macOS, repairs the linux build bots llvm-svn: 371577
* [llvm-nm] Add tapi file supportCyndy Ishida2019-09-1115-20/+298
| | | | | | | | | | | | | | | | | | Summary: This commit is the final one for adding tapi support to the llvm-nm implementation. This commit also has accompanying tests the additions to lib/Object Reviewers: ributzka, steven_wu Reviewed By: ributzka Subscribers: hiraditya, plotfi, dexonsmith, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66160 llvm-svn: 371576
* Remove xfail i386 NetBSD mark in vptr-non-unique-typeinfo.cppKamil Rytarowski2019-09-101-1/+0
| | | | | | This test passes now. llvm-svn: 371575
* Remove xfail NetBSD mark from ignored-interceptors-mmap.cppKamil Rytarowski2019-09-101-1/+0
| | | | | | This test now passes. llvm-svn: 371574
* [MemorySSA] MemorySSA should not model debuginfo, and need not update it.Alina Sbirlea2019-09-101-4/+1
| | | | | | | | Reverts the change in r371084, but keeps the test. After r371565, debuginfo cannot be modelled in MemorySSA, even with a non-standard AA pipeline. llvm-svn: 371573
* [GlobalISel] When a tail call is emitted in a block, stop translating itJessica Paquette2019-09-104-12/+50
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a crash in tail call translation caused by assume and lifetime_end intrinsics. It's possible to have instructions other than a return after a tail call which will still have `Analysis::isInTailCallPosition` return true. (Namely, lifetime_end and assume intrinsics.) If we emit a tail call, we should stop translating instructions in the block. Otherwise, we can end up emitting an extra return, or dead instructions in general. This makes the verifier unhappy, and is generally unfortunate for codegen. This also removes the code from AArch64CallLowering that checks if we have a tail call when lowering a return. This is covered by the new code now. Also update call-translator-tail-call.ll to show that we now properly tail call in the presence of lifetime_end and assume. Differential Revision: https://reviews.llvm.org/D67415 llvm-svn: 371572
* [clang-format] Apply BAS_AlwaysBreak to C++11 braced listsOwen Pan2019-09-102-1/+13
| | | | | | | | See PR18455. Differential Revision: https://reviews.llvm.org/D67395 llvm-svn: 371571
* [AArch64][GlobalISel] Support sibling calls with mismatched calling conventionsJessica Paquette2019-09-106-23/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for sibcalling calls whose calling convention differs from the caller's. - Port over `CCState::resultsCombatible` from CallingConvLower.cpp into CallLowering. This is used to verify that the way the caller and callee CC handle incoming arguments matches up. - Add `CallLowering::analyzeCallResult`. This is basically a port of `CCState::AnalyzeCallResult`, but using `ArgInfo` rather than `ISD::InputArg`. - Add `AArch64CallLowering::doCallerAndCalleePassArgsTheSameWay`. This checks that the calling conventions are compatible, and that the caller and callee preserve the same registers. For testing: - Update call-translator-tail-call.ll to show that we can now handle this. - Add a GISel line to tailcall-ccmismatch.ll to show that we will not tail call when the regmasks don't line up. Differential Revision: https://reviews.llvm.org/D67361 llvm-svn: 371570
* Update ReleaseNotes: add enabling of MemorySSA.Alina Sbirlea2019-09-101-0/+1
| | | | llvm-svn: 371569
* Reland "Change the X86 datalayout to add three address spacesAmy Huang2019-09-10522-541/+566
| | | | | | | | | | for 32 bit signed, 32 bit unsigned, and 64 bit pointers." This reverts 57076d3199fc2b0af4a3736b7749dd5462cacda5. Original review at https://reviews.llvm.org/D64931. Review for added fix at https://reviews.llvm.org/D66843. llvm-svn: 371568
* llvm-reduce: Add pass to reduce parametersDavid Blaikie2019-09-106-0/+187
| | | | | | | | Patch by Diego Treviño! Differential Revision: https://reviews.llvm.org/D65479 llvm-svn: 371567
* Adding support for overriding LLVM_ENABLE_RUNTIMES for runtimes builds.Puyan Lotfi2019-09-101-1/+4
| | | | | | | | | | | | On some platforms, certain runtimes are not supported. For runtimes builds of those platforms it would be nice if we could disable certain runtimes (ie libunwind on Windows). Differential Revision: https://reviews.llvm.org/D67195 llvm-svn: 371566
* [MemorySSA] Do not create memoryaccesses for debug info intrinsics.Alina Sbirlea2019-09-102-2/+63
| | | | | | | | | | | | | | | | Summary: Do not model debuginfo intrinsics in MemorySSA. Regularly these are non-memory modifying instructions. With -disable-basicaa, they were being modelled as Defs. Reviewers: george.burgess.iv Subscribers: aprantl, Prazek, sanjoy.google, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67307 llvm-svn: 371565
* llvm-reduce: Remove some unused headers/more narrowly include themDavid Blaikie2019-09-104-9/+9
| | | | llvm-svn: 371564
* llvm-remove: Remove "using namespace" in header.David Blaikie2019-09-104-5/+10
| | | | llvm-svn: 371563
* llvm-reduce: Add pass to reduce MetadataDavid Blaikie2019-09-106-2/+197
| | | | | | | | Patch by Diego Treviño! Differential Revision: https://reviews.llvm.org/D65026 llvm-svn: 371562
* Move LLVM_ENABLE_ABI_BREAKING_CHECKS variables to their own fileEric Christopher2019-09-104-15/+26
| | | | | | | | | | | | | so that you don't have to link Error.o and all of its dependencies. In more detail: global initializers in Error.o can't be elided with -ffunction-sections/-gc-sections since they always need to be run causing a fairly significant binary bloat if all you want is the ABI breaking checks code. Differential Revision: https://reviews.llvm.org/D67387 llvm-svn: 371561
* Fix a thinko in handling the QSetLogging packet.Jim Ingham2019-09-101-3/+3
| | | | | | | The comparison against LOG_MEMORY shortcut all the LOG_MEMORY_* log channels. It has to come last. llvm-svn: 371560
* Actually reorder not and env in crash-recovery-modules.mReid Kleckner2019-09-101-2/+2
| | | | llvm-svn: 371559
* [Loads] Move generic code out of vectorizer into a location it might be ↵Philip Reames2019-09-103-51/+63
| | | | | | reused [NFC] llvm-svn: 371558
OpenPOWER on IntegriCloud