1. Jan 10, 2019
    • Alex Lorenz's avatar
      [ObjC] Allow the use of implemented unavailable methods from within · 4e3c0bdf
      Alex Lorenz authored
      the @implementation context
      
      In Objective-C, it's common for some frameworks to mark some methods like init
      as unavailable in the @interface to prohibit their usage. However, these
      frameworks then often implemented said method and refer to it in another method
      that acts as a factory for that object. The recent change to how messages to
      self are type checked in clang (r349841) introduced a regression which started
      to prohibit this pattern with an X is unavailable error. This commit addresses
      the aforementioned regression.
      
      rdar://47134898
      
      Differential Revision: https://reviews.llvm.org/D56469
      
      llvm-svn: 350768
      4e3c0bdf
    • Rui Ueyama's avatar
      Fix formatting. NFC. · c58fbe3c
      Rui Ueyama authored
      llvm-svn: 350767
      c58fbe3c
    • Jonathan Metzman's avatar
      [libfuzzer][MSVC] Make calls to builtin functions work with MSVC · 55ddb2c7
      Jonathan Metzman authored
      Summary:
      Replace calls to builtin functions with macros or functions that call the
      Windows-equivalents when targeting windows and call the original
      builtin functions everywhere else.
      This change makes more parts of libFuzzer buildable with MSVC.
      
      Reviewers: vitalybuka
      
      Reviewed By: vitalybuka
      
      Subscribers: mgorny, rnk, thakis
      
      Differential Revision: https://reviews.llvm.org/D56439
      
      llvm-svn: 350766
      55ddb2c7
    • Jonas Toth's avatar
      [clang-tidy] another take at fixing doc · a86d5c46
      Jonas Toth authored
      llvm-svn: 350765
      a86d5c46
    • Zachary Turner's avatar
      Change lldb-test to use ParseAllDebugSymbols. · c68925ab
      Zachary Turner authored
      ParseDeclsForContext was originally created to serve the very specific
      case where the context is a function block. It was never intended to be
      used for arbitrary DeclContexts, however due to the generic name, the
      DWARF and PDB plugins implemented it in this way "just in case". Then,
      lldb-test came along and decided to use it in that way.
      
      Related to this, there are a set of functions in the SymbolFile class
      interface whose requirements and expectations are not documented. For
      example, if you call ParseCompileUnitFunctions, there's an inherent
      requirement that you create entries in the underlying clang AST for
      these functions as well as their signature types, because in order to
      create an lldb_private::Function object, you have to pass it a
      CompilerType for the parameter representing the signature.
      
      On the other hand, there is no similar requirement (either inherent or
      documented) if one were to call ParseDeclsForContext. Specifically, if
      one calls ParseDeclsForContext, and some variable declarations, types,
      and other things are added to the clang AST, is it necessary to create
      lldb::Variable, lldb::Type, etc objects representing them? Nobody knows.
      There is, however, an accidental requirement, because since all of the
      plugins implemented this just in case, lldb-test came along and used
      ParsedDeclsForContext, and then wrote check lines that depended on this.
      
      When I went to try and implemented the NativePDB reader, I did not
      adhere to this (in fact, from a layering perspective I went out of my
      way to avoid it), and as a result the existing DIA PDB tests don't work
      when the native PDB reader is enabled, because they expect that calling
      ParseDeclsForContext will modify the *module's* view of symbols, and not
      just the internal AST.
      
      All of this confusion, however, can be avoided if we simply stick to
      using ParseDeclsForContext for its original intended use case (blocks),
      and use a different function (ParseAllDebugSymbols) for its intended use
      case which is, unsuprisingly, to parse all the debug symbols (which is
      all lldb-test really wanted to do anyway).
      
      In the future, I would like to change ParseDeclsForContext to
      ParseDeclsForFunctionBlock, then delete all of the dead code inside that
      handles other types of DeclContexts (and probably even assert if the
      DeclContext is anything other than a block).
      
      A few PDB tests needed to be fixed up as a result of this, and this also
      exposed a couple of bugs in the DIA PDB reader (doesn't matter much
      since it should be going away soon, but worth mentioning) where the
      appropriate AST entries weren't being created always.
      
      Differential Revision: https://reviews.llvm.org/D56418
      
      llvm-svn: 350764
      c68925ab
    • Jonas Toth's avatar
      [clang-tidy] tryfix documentation build · 3bdb8fd6
      Jonas Toth authored
      llvm-svn: 350763
      3bdb8fd6
    • Florian Hahn's avatar
      [AArch64] Add test for constant shrinking with multiple users (NFC). · 7c122c12
      Florian Hahn authored
      Test to avoid regression fixed by rL350684.
      
      llvm-svn: 350762
      7c122c12
    • Jonas Toth's avatar
      [clang-tidy] fix-up failing tests · e6406dce
      Jonas Toth authored
      llvm-svn: 350761
      e6406dce
    • Jonas Toth's avatar
      [clang-tidy] Adding a new modernize use nodiscard checker · ca8e20cd
      Jonas Toth authored
      Summary: Adds a checker to clang-tidy to warn when a non void const member function, taking only parameters passed by value or const reference could be marked as '[[nodiscard]]'
      
      Patch by MyDeveloperDay.
      
      Reviewers: alexfh, stephenkelly, curdeius, aaron.ballman, hokein, JonasToth
      
      Reviewed By: curdeius, JonasToth
      
      Subscribers: Eugene.Zelenko, lefticus, lebedev.ri, mgorny, xazax.hun, cfe-commits
      
      Tags: #clang-tools-extra
      
      Differential Revision: https://reviews.llvm.org/D55433
      
      llvm-svn: 350760
      ca8e20cd
    • Gheorghe-Teodor Bercea's avatar
      [OpenMP] Avoid remainder operations for loop index values on a collapsed loop nest. · 67796064
      Gheorghe-Teodor Bercea authored
      Summary: Change the strategy for computing loop index variables after collapsing a loop nest via the collapse clause by replacing the expensive remainder operation with multiplications and additions.
      
      Reviewers: ABataev, caomhin
      
      Reviewed By: ABataev
      
      Subscribers: guansong, arphaman, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D56413
      
      llvm-svn: 350759
      67796064
    • Gheorghe-Teodor Bercea's avatar
      [OpenMP] Add flag for preventing the extension to 64 bits for the collapse loop counter · a3afcf24
      Gheorghe-Teodor Bercea authored
      Summary: Introduce a compiler flag for cases when the user knows that the collapsed loop counter can be safely represented using at most 32 bits. This will prevent the emission of expensive mathematical operations (such as the div operation) on the iteration variable using 64 bits where 32 bit operations are sufficient.
      
      Reviewers: ABataev, caomhin
      
      Reviewed By: ABataev
      
      Subscribers: hfinkel, kkwli0, guansong, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D55928
      
      llvm-svn: 350758
      a3afcf24
    • Alexey Bataev's avatar
      [OPENMP][DOCS]Release notes/OpenMP support updates, NFC. · 2819d4d1
      Alexey Bataev authored
      llvm-svn: 350757
      2819d4d1
    • Aaron Ballman's avatar
      Removing an include that was not necessary; NFC. · e9b4a225
      Aaron Ballman authored
      The include also had a using namespace llvm in it, so this adds qualifiers where needed as well.
      
      llvm-svn: 350756
      e9b4a225
    • Easwaran Raman's avatar
      Refactor synthetic profile count computation. NFC. · b45994b8
      Easwaran Raman authored
      Summary:
      Instead of using two separate callbacks to return the entry count and the
      relative block frequency, use a single callback to return callsite
      count. This would allow better supporting hybrid mode in the future as
      the count of callsite need not always be derived from entry count (as in
      sample PGO).
      
      Reviewers: davidxl
      
      Subscribers: mehdi_amini, steven_wu, dexonsmith, dang, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D56464
      
      llvm-svn: 350755
      b45994b8
    • Shoaib Meenai's avatar
      [CodeGen] Clarify comment about COFF common symbol alignment · 39287e75
      Shoaib Meenai authored
      After a discussion on the commit thread, it seems the 32 byte alignment
      limitation is an MSVC toolchain artifact, not an inherent COFF
      restriction. Clarify the comment accordingly, since saying COFF in the
      comment but using isKnownWindowsMSVCEnvironment in the conditional is
      confusing. Also add a newline before the comment, which is consistent
      with the local style.
      
      Differential Revision: https://reviews.llvm.org/D56466
      
      llvm-svn: 350754
      39287e75
    • Francis Visoiu Mistrih's avatar
      [CodeGen] Ignore return sext/zext attributes of unused results for tail calls · ac6454a7
      Francis Visoiu Mistrih authored
      If the caller's return type does not have a zeroext attribute but the
      callee does a tail call zeroext, we won't consider the tail call during
      CodeGenPrepare because the attributes don't match.
      
      However, if the result of the tail call has no uses, it makes sense to
      drop the sext/zext attributes.
      
      Differential Revision: https://reviews.llvm.org/D56486
      
      llvm-svn: 350753
      ac6454a7
    • Louis Dionne's avatar
      [libcxx] Add a script to run CI on older MacOS versions · 227371de
      Louis Dionne authored
      This script can be used by CI systems to test things like availability
      markup and binary compatibility on older MacOS versions. This is still
      a bit rough on the edges, for example we don't test libc++abi yet.
      
      llvm-svn: 350752
      227371de
    • Easwaran Raman's avatar
      [Inliner] Assert that the computed inline threshold is non-negative. · ed279752
      Easwaran Raman authored
      Reviewers: chandlerc
      
      Subscribers: haicheng, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D56409
      
      llvm-svn: 350751
      ed279752
    • Nico Weber's avatar
      lld-link: Add help strings for /manifest, /nodefaultlib, /noentry; tweak manifest help strings · 64fb85c9
      Nico Weber authored
      My main motivation is that I can never remember /nodefaultlib and
      `lld-link /? | grep no` didn't display it due to it not having a help string.
      
      Differential Revision: https://reviews.llvm.org/D56502
      
      llvm-svn: 350750
      64fb85c9
    • David Callahan's avatar
      refactor BlockFrequencyInfo::view to take a title parameter · 3ef0f444
      David Callahan authored
      Summary: All a non-default title for the debugging this debugging aide
      
      Reviewers: twoh, Kader, modocache
      
      Reviewed By: twoh
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D56499
      
      llvm-svn: 350749
      3ef0f444
    • Aaron Ballman's avatar
      Fix visualization of intrusive reference counted objects in MSVC. · 6c6fb80c
      Aaron Ballman authored
      llvm-svn: 350748
      6c6fb80c
    • Gheorghe-Teodor Bercea's avatar
      [OpenMP][libomptarget] Use shared memory variable for tracking parallel level · 1653633a
      Gheorghe-Teodor Bercea authored
      Summary: Replace existing infrastructure for tracking parallel level using global memory with a per-team shared memory variable. This minimizes the impact of the overhead of tracking the parallel level for non-nested cases.
      
      Reviewers: ABataev, caomhin
      
      Reviewed By: ABataev
      
      Subscribers: guansong, openmp-commits
      
      Differential Revision: https://reviews.llvm.org/D55773
      
      llvm-svn: 350747
      1653633a
    • Thomas Lively's avatar
      [WebAssembly] Standardize order of SIMD bitselect arguments · edb54b22
      Thomas Lively authored
      Summary:
      For some reason the backend assumed that the condition mask would be
      the first argument to the LLVM intrinsic, but everywhere else the
      condition mask is the third argument.
      
      Reviewers: aheejin
      
      Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D56412
      
      llvm-svn: 350746
      edb54b22
    • Sanjay Patel's avatar
      [x86] use 'nounwind' to remove test noise; NFC · 15f2a4d1
      Sanjay Patel authored
      llvm-svn: 350745
      15f2a4d1
    • David Carlier's avatar
      [asan] Disable TSD dtor leak unit tests on FreeBSD x86 64 · 5e53818b
      David Carlier authored
      - Assertion fails in the third iteration.
      
      Reviewers: krytarowski
      
      Reviewed By: krytarowski
      
      Differential Revision: https://reviews.llvm.org/D56497
      
      llvm-svn: 350744
      5e53818b
    • Pavel Labath's avatar
      ELF: create "container" sections from PT_LOAD segments · f55aea73
      Pavel Labath authored
      Summary:
      This is the result of the discussion in D55356, where it was suggested
      as a solution to representing the addresses that logically belong to a
      module in memory, but are not a part of any of its sections.
      
      The ELF PT_LOAD segments are similar to the MachO "load commands",
      except that the relationship between them and the object file sections
      is a bit weaker. While in the MachO case, the sections belonging to a
      specific segment are placed directly inside it in the object file
      logical structur, in the ELF case, the sections and segments form two
      separate hierarchies. This means that it is in theory possible to create
      an elf file where only a part of a section would belong to some segment
      (and another part to a different one). However, I am not aware of any
      tool which would produce such a file (and most tools will have problems
      ingesting them), so this means it is still possible to follow the MachO
      model and make sections children of the PT_LOAD segments.
      
      In case we run into (corrupt?) files with overlapping sections, I have
      added code (and tests) which adjusts the sizes and/or drops the offending
      sections in order to present a reasonable image to the upper layers of
      LLDB. This is mostly done for completeness, as I don't anticipate
      running into this situation in the real world. However, if we do run
      into it, and the current behavior is not suitable for some reason, we
      can implement this logic differently.
      
      Reviewers: clayborg, jankratochvil, krytarowski, joerg, espindola
      
      Subscribers: emaste, arichardson, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D55998
      
      llvm-svn: 350742
      f55aea73
    • Bruno Ricci's avatar
      [AST] Move back BasePathSize to the bit-fields of CastExpr · 4939165d
      Bruno Ricci authored
      The number of trailing CXXBaseSpecifiers in CastExpr was moved from
      CastExprBitfields to a trailing object in r338489 (D50050). At this time these
      bit-fields classes were only 32 bits wide. However later r345459 widened these
      bit-field classes to 64 bits.
      
      The reason for this change was that on 64 bit archs alignment requirements
      caused 4 bytes of padding after the Stmt sub-object in nearly all expression
      classes. Reusing this padding yielded an >10% reduction in the size used by all
      statement/expressions when parsing all of Boost (on a 64 bit arch). This
      increased the size of statement/expressions for 32 bits archs, but this can be
      mitigated by moving more data to the bit-fields of Stmt (and moreover most
      people now care about 64 bits archs as a host).
      
      Therefore move back the number of CXXBaseSpecifiers in CastExpr to the
      bit-fields of Stmt. This in effect mostly revert r338489 while keeping the
      added test.
      
      Differential Revision: https://reviews.llvm.org/D56358
      
      Reviewed By: lebedev.ri
      
      Reviewers: lebedev.ri, rjmccall
      llvm-svn: 350741
      4939165d
    • Louis Dionne's avatar
      [libcxx] Add a script to run CI on MacOS · cb4e59ed
      Louis Dionne authored
      CI systems like Green Dragon should use this script so as to make
      reproducing errors easy locally.
      
      llvm-svn: 350740
      cb4e59ed
    • Eric Fiselier's avatar
      Mark two UDL tests as being unsupported with Clang 7 · e49fc07c
      Eric Fiselier authored
      llvm-svn: 350739
      e49fc07c
    • Stefan Granitz's avatar
      [CMake] In standalone builds, LLVM_BINARY_DIR should point to LLVM's binary directory · 79f41967
      Stefan Granitz authored
      Summary: In standalone builds `LLVM_BINARY_DIR` was equal to `LLDB_BINARY_DIR` so far. This is counterintuitive and invalidated the values of `LLDB_DEFAULT_TEST_DSYMUTIL/FILECHECK/COMPILER` etc.
      
      Reviewers: zturner, labath, clayborg, JDevlieghere, stella.stamenova, serge-sans-paille
      
      Reviewed By: labath
      
      Subscribers: mgorny, friss, lldb-commits, #lldb
      
      Differential Revision: https://reviews.llvm.org/D56443
      
      llvm-svn: 350738
      79f41967
    • Stefan Granitz's avatar
      [CMake] Fix standalone builds: workaround the cxx target not getting imported... · 644a3289
      Stefan Granitz authored
      [CMake] Fix standalone builds: workaround the cxx target not getting imported yet (unlike clang target)
      
      Summary: Handle standalone builds separately and print a warning if we have no libcxx.
      
      Reviewers: aprantl, JDevlieghere
      
      Reviewed By: JDevlieghere
      
      Subscribers: mgorny, lldb-commits, #lldb
      
      Differential Revision: https://reviews.llvm.org/D56399
      
      llvm-svn: 350737
      644a3289
    • Louis Dionne's avatar
      [libcxx] Remove outdated XFAILs for aligned deallocation · ea443cf8
      Louis Dionne authored
      AppleClang 10 has been fixed and so these tests don't fail anymore.
      
      llvm-svn: 350736
      ea443cf8
    • Hubert Tong's avatar
      [unittests][Support] AIX: Skip sticky bit file tests · ea2ce500
      Hubert Tong authored
      On AIX, attempting (without root) to set the sticky bit on a file with
      the `chmod` utility will give:
      ```
      chmod: not all requested changes were made to <file>
      ```
      
      The same occurs when modifying other permission bits on a file with the
      sticky bit already set.
      
      It seems that the `chmod` function will report success despite failing
      to set the sticky bit.
      
      llvm-svn: 350735
      ea2ce500
  2. Jan 09, 2019
    • Alexey Bataev's avatar
      Incorrect implicit data-sharing for nested tasks · 7e6803e0
      Alexey Bataev authored
      Summary:
      There is a minor issue in how the implicit data-sharings for nested tasks are computed.
      
      For the following example:
      ```
      int x;
      #pragma omp task shared(x)
      #pragma omp task
      x++;
      ```
      We compute an implicit data-sharing of shared for `x` in the second task although I think that it should be firstprivate. Below you can find the part of the OpenMP spec that covers this example:
      - // In a task generating construct, if no default clause is present, a variable for which the data-sharing attribute is not determined by the rules above and that in the enclosing context is determined to be shared by all implicit tasks bound to the current team is shared.//
      - //In a task generating construct, if no default clause is present, a variable for which the data-sharing attribute is not determined by the rules above is firstprivate.//
      
      Since each implicit-task has its own copy of `x`, we shouldn't apply the first rule.
      
      Reviewers: ABataev
      
      Reviewed By: ABataev
      
      Subscribers: cfe-commits, rogfer01
      
      Tags: #openmp
      
      Differential Revision: https://reviews.llvm.org/D56430
      
      llvm-svn: 350734
      7e6803e0
    • Aleksandar Beserminji's avatar
      [mips][micrompis] Emit 16bit NOPs by default · 8abf6804
      Aleksandar Beserminji authored
      Emit 16bit NOPs by default.
      Use 32bit NOPs in delay slots where necessary.
      
      Differential https://reviews.llvm.org/D55323
      
      llvm-svn: 350733
      8abf6804
    • Bruno Ricci's avatar
      [AST] Store the results in OverloadExpr in a trailing array · d7628d99
      Bruno Ricci authored
      Use the newly available space in the bit-fields of Stmt to pack
      OverloadExpr, UnresolvedLookupExpr and UnresolvedMemberExpr.
      
      Additionally store the results in the overload set in a trailing array.
      This saves 1 pointer + 8 bytes per UnresolvedLookupExpr and
      UnresolvedMemberExpr.
      
      Differential Revision: https://reviews.llvm.org/D56368
      
      Reviewed By: rjmccall
      
      llvm-svn: 350732
      d7628d99
    • Alexey Bataev's avatar
      [DEBUGINFO][NVPTX]Make tests more strict, NFC. · 59e916c2
      Alexey Bataev authored
      NVPTX format requires that no labels/label arithmetics is used in the
      debug info sections. To avoid possible problems with the adding/modifying the debug info functionality, made these tests more strict.
      
      llvm-svn: 350731
      59e916c2
    • Valery Pykhtin's avatar
      Revert "[AMDGPU] Fix DPP combiner" · b7a45954
      Valery Pykhtin authored
      This reverts commit e3e2923a39cbec3b3bc3a7d3f0e9a77a4115080e, svn revision rL350721
      
      llvm-svn: 350730
      b7a45954
    • Kristof Beyls's avatar
      Initial AArch64 SLH implementation. · c650ff77
      Kristof Beyls authored
      This is an initial implementation for Speculative Load Hardening for
      AArch64. It builds on top of the recently introduced
      AArch64SpeculationHardening pass.
      This doesn't implement (yet) some of the optimizations implemented for
      the X86SpeculativeLoadHardening pass. I thought introducing the
      optimizations incrementally in follow-up patches should make this easier
      to review.
      
      Differential Revision: https://reviews.llvm.org/D55929
      
      llvm-svn: 350729
      c650ff77
    • George Rimar's avatar
      [LLD][ELF] - Fix BB after r350726. · 17a9204d
      George Rimar authored
      D56123 changed the llvm-objdump output format.
      Now we print the symbol address when dumping.
      
      llvm-svn: 350728
      17a9204d