Skip to content
  1. Apr 28, 2020
    • Reid Kleckner's avatar
      Fix .arclint on Windows · efd1f17c
      Reid Kleckner authored
      Run "bash myscript.sh". This will work if bash is on PATH, which it
      probably is, since developers have to use git.
      
      Reviewed By: scott.linder
      
      Differential Revision: https://reviews.llvm.org/D78846
      efd1f17c
    • Erik Pilkington's avatar
      [AST] Fix a crash on a dependent vector_size attribute · 2bb686b4
      Erik Pilkington authored
      Looks like this was just a copy & paste mistake from
      getDependentSizedExtVectorType. rdar://60092165
      
      Differential revision: https://reviews.llvm.org/D79012
      2bb686b4
    • Fangrui Song's avatar
    • Ulrich Weigand's avatar
      [SystemZ] Avoid __INTPTR_TYPE__ conversions in vecintrin.h · 095ccf44
      Ulrich Weigand authored
      Some intrinsics in vecintrin.h are currently implemented by
      performing address arithmetic in __INTPTR_TYPE__ and converting
      the result to some pointer type.  While this works correctly,
      it leads to suboptimal code generation since many optimizers
      cannot trace the provenance of the resulting pointers.
      
      Fixed by using "char *" pointer arithmetic instead.
      095ccf44
    • Ulrich Weigand's avatar
      [SystemZ] Use reserved keywords in vecintrin.h · c90e09b1
      Ulrich Weigand authored
      System headers should avoid using the "vector" and "bool" keywords
      since those might be redefined by user code.  For example, using
      <stdbool.h> before <vecintrin.h> will currently lead to compiler
      errors.
      
      Fixed by using the reserved "__vector" and "__bool" keywords
      instead.  NFC otherwise.
      c90e09b1
    • Jonathan Coe's avatar
      Revert "[clang-format] C# property formatting can be controlled by config options" · 85ee97fd
      Jonathan Coe authored
      Committed in error without approval https://reviews.llvm.org/D79000
      
      This reverts commit 015bca3e.
      85ee97fd
    • Jonathan Coe's avatar
      [clang-format] C# property formatting can be controlled by config options · 015bca3e
      Jonathan Coe authored
      Summary:
      Allow brace wrapping in C# property accessors to be controlled by configuration options.
      
      Add new tests and revert old test results for MS style to their old state (as intended).
      
      `FormatStyle.BraceWrapping.AfterFunction = true;` will change automatic property formatting from
      
      ```
      Type MyType { get; set }
      ```
      
      to
      
      ```
      Type MyType
      { get; set }
      ```
      
      Reviewers: krasimir, MyDeveloperDay
      
      Subscribers: cfe-commits
      
      Tags: #clang-format, #clang
      
      Differential Revision: https://reviews.llvm.org/D79000
      015bca3e
    • Jonathan Coe's avatar
      [clang-format] insert space after C# keyword var in var (key, value) · 7443f86e
      Jonathan Coe authored
      Reviewers: krasimir, MyDeveloperDay
      
      Reviewed By: MyDeveloperDay
      
      Subscribers: cfe-commits
      
      Tags: #clang-format, #clang
      
      Differential Revision: https://reviews.llvm.org/D79008
      7443f86e
    • Martin Erhart's avatar
      [mlir][assemblyFormat] Fix bug when using AttrSizedOperandSegments trait with... · edb77864
      Martin Erhart authored
      [mlir][assemblyFormat] Fix bug when using AttrSizedOperandSegments trait with only non-buildable operand types
      
      Summary:
      When creating an operation with
      * `AttrSizedOperandSegments` trait
      * Variadic operands of only non-buildable types
      * assemblyFormat to automatically generate the parser
      the `builder` local variable is used, but never declared.
      This adds a fix as well as a test for this case as existing ones use buildable types only.
      
      Reviewers: rriddle, Kayjukh, grosser
      
      Reviewed By: Kayjukh
      
      Subscribers: mehdi_amini, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, grosul1, frgossen, llvm-commits
      
      Tags: #mlir, #llvm
      
      Differential Revision: https://reviews.llvm.org/D79004
      edb77864
    • Saleem Abdulrasool's avatar
      build: use `find_package(Python3)` if available · c4c3883b
      Saleem Abdulrasool authored
      This is primarily motivated by the desire to move from Python2 to
      Python3.  `PYTHON_EXECUTABLE` is ambiguous.  This explicitly identifies
      the python interpreter in use.  Since the LLVM build seems to be able to
      completed successfully with python3, use that across the build.  The old
      path aliases `PYTHON_EXECUTABLE` to be treated as Python3.
      c4c3883b
    • Roman Lebedev's avatar
      [InstCombine] Negator: 'or' with no common bits set is just 'add' · a0004358
      Roman Lebedev authored
      In `InstCombiner::visitAdd()`, we have
      ```
        // A+B --> A|B iff A and B have no bits set in common.
        if (haveNoCommonBitsSet(LHS, RHS, DL, &AC, &I, &DT))
          return BinaryOperator::CreateOr(LHS, RHS);
      ```
      so we should handle such `or`'s here, too.
      a0004358
    • Roman Lebedev's avatar
    • Momchil Velikov's avatar
      [CMSE] Clear padding bits of struct/unions/fp16 passed by value · 102b4105
      Momchil Velikov authored
      When passing a value of a struct/union type from secure to non-secure
      state (that is returning from a CMSE entry function or passing an
      argument to CMSE-non-secure call), there is a potential sensitive
      information leak via the padding bits in the structure. It is not
      possible in the general case to ensure those bits are cleared by using
      Standard C/C++.
      
      This patch makes the compiler emit code to clear such padding
      bits. Since type information is lost in LLVM IR, the code generation
      is done by Clang.
      
      For each interesting record type, we build a bitmask, in which all the
      bits, corresponding to user declared members, are set. Values of
      record types are returned by coercing them to an integer. After the
      coercion, the coerced value is masked (with bitwise AND) and then
      returned by the function. In a similar manner, values of record types
      are passed as arguments by coercing them to an array of integers, and
      the coerced values themselves are masked.
      
      For union types, we effectively clear only bits, which aren't part of
      any member, since we don't know which is the currently active one.
      The compiler will issue a warning, whenever a union is passed to
      non-secure state.
      
      Values of half-precision floating-point types are passed in the least
      significant bits of a 32-bit register (GPR or FPR) with the most
      significant bits unspecified. Since this is also a potential leak of
      sensitive information, this patch also clears those unspecified bits.
      
      Differential Revision: https://reviews.llvm.org/D76369
      102b4105
    • Francis Visoiu Mistrih's avatar
      [AArch64] Add support for -ffixed-x30 · e7701538
      Francis Visoiu Mistrih authored
      Add support for reserving LR in:
      
      * the driver through `-ffixed-x30`
      * cc1 through `-target-feature +reserve-x30`
      * the backend through `-mattr=+reserve-x30`
      * a subtarget feature `reserve-x30`
      
      the same way we're doing for the other registers.
      e7701538
    • Nick Desaulniers's avatar
      [TII] remove overrides of isUnpredicatedTerminator · 1b9fdec1
      Nick Desaulniers authored
      Summary:
      They all match the base implementation in
      TargetInstrInfo::isUnpredicatedTerminator.
      
      Follow up to D62749.
      
      Reviewers: echristo, MaskRay, hfinkel
      
      Reviewed By: echristo
      
      Subscribers: wuzish, nemanjai, hiraditya, kbarton, llvm-commits, srhines
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D78976
      1b9fdec1
    • Sander de Smalen's avatar
      [SveEmitter] Add builtins for logical and predicate operations. · 43d1d52a
      Sander de Smalen authored
      This patch adds builtins for logical ops:
      - svand, svbic, sveor, svorr, svcnot, svnot
      
      and builtins for predicate operations:
      - svand_b_z, svbic_b_z, sveor_b_z, svnand_b_z, svnor_b_z, svorn_b_z, svorr_b_z
      - svbrka_b_z, svbrkb_b_z, svbrkpa_b_z, svbrkpb_b_z, svbrkn_b_z
      - svpfirst_b
      - svpnext
      - svptest_any
      - svptest_first
      - svptest_last
      43d1d52a
    • David Green's avatar
      [ARM] Always replace FP16 bitcasts with VMOVhr or VMOVrh · 1084b323
      David Green authored
      This changes the logic with lowering fp16 bitcasts to always produce
      either a VMOVhr or a VMOVrh, instead of only trying to do it with
      certain surrounding nodes. To perform the same optimisations demand bits
      and known bits information has been added for them.
      
      Differential Revision: https://reviews.llvm.org/D78587
      1084b323
    • Krzysztof Parzyszek's avatar
      25a4b190
    • Louis Dionne's avatar
      [libc++][Take 2] Create a small DSL for defining Lit features and parameters · e82f0a59
      Louis Dionne authored
      This allows defining Lit features that can be enabled or disabled based
      on compiler support, and parameters that are passed on the command line.
      
      The main benefits are:
      - Feature detection is entirely based on the substitutions provided in
        the TestingConfig object, which is simpler and decouples it from the
        complicated compiler emulation infrastructure.
      - The syntax is declarative, which makes it easy to see what features
        and parameters are accepted by the test suite. This is significantly
        less entangled than the current config.py logic.
      - Since feature detection is based on substitutions, it works really
        well on top of the new format, and custom Lit configurations can be
        created easily without being based on `config.py`.
      
      This commit is a reapplication of 6d58030c, which was reverted in
      8f24c4b7 because it broke Python 3 support. This re-application
      supports Python 3.
      
      Differential Revision: https://reviews.llvm.org/D78381
      e82f0a59
    • Tres Popp's avatar
      [MLIR] Give AffineStoreOp and AffineLoadOp Memory SideEffects. · f66c8763
      Tres Popp authored
      Summary:
      This change results in tests also being changed to prevent dead
      affine.load operations from being folded away during rewrites.
      
      Also move AffineStoreOp and AffineLoadOp to an ODS file.
      
      Differential Revision: https://reviews.llvm.org/D78930
      f66c8763
    • Eric Fiselier's avatar
      Recommit [libc++] Move abs and div into stdlib.h to fix header cycle. · d0846b43
      Eric Fiselier authored
      This relands this commit as it broke the LLDB bot the first time it landed.
      See also the discussion on https://reviews.llvm.org/rG82b47b2978405f802a33b00d046e6f18ef6a47be
      
      Since D74892 this code should now also work on macOS.
      
      Original description:
      
      libc++ is careful to not fracture overload sets. When one overload
      is visible to a user, all of them should be. Anything less causes
      subtle bugs and ODR violations.
      
      Previously, in order to support ::abs and ::div being supplied by
      both <cmath> and <cstdlib> we had to do awful things that make
      <math.h> and <stdlib.h> have header cycles and be non-modular.
      This really breaks with modules.
      
      Specifically the problem was that in C++ ::abs introduces overloads
      for floating point numbers, these overloads forward to ::fabs,
      which are defined in math.h. Therefore ::abs needed to be in math.h
      too. But this required stdlib.h to include math.h and math.h to
      include stdlib.h.
      
      To avoid these problems the definitions have been moved to stddef.h
      (which math includes), and the floating point overloads of ::abs
      have been changed to call __builtin_fabs, which both Clang and GCC
      support.
      d0846b43
    • Xing GUO's avatar
      [DebugInfo] Fix crash caused by unhandled error. · 8994b14e
      Xing GUO authored
      Summary: This patch helps fix LLVM crash caused by unhandled error.
      
      Reviewers: clayborg, aprantl
      
      Reviewed By: clayborg
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D78924
      8994b14e
    • Yaxun (Sam) Liu's avatar
      recommit c77a4078 with fix · 55bcb96f
      Yaxun (Sam) Liu authored
      https://reviews.llvm.org/D77954 caused a regression about ambiguity of new operator
      in file scope.
      
      This patch recovered the previous behavior for comparison without a caller.
      
      This is a workaround. For real fix we need D71227
      
      https://reviews.llvm.org/D78970
      55bcb96f
    • Jonathan Coe's avatar
      [clang-format] Improved parser for C# properties · 44ad58b9
      Jonathan Coe authored
      Summary:
      Added some examples of properties from Microsoft documentation as test cases.
      
      https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/properties
      
      Configuration support will be added in a follow up patch to address whether automatic properties are formatted as
      
      ```
      Type MyType { get; set }
      ```
      
      or
      
      ```
      Type MyType
      { get; set }
      ```
      
      Reviewers: krasimir, MyDeveloperDay
      
      Reviewed By: krasimir
      
      Subscribers: cfe-commits
      
      Tags: #clang-format, #clang
      
      Differential Revision: https://reviews.llvm.org/D78915
      44ad58b9
    • Sander de Smalen's avatar
      [SveEmitter] Add builtins for zero/sign extension and bit/byte reversal. · 476ba812
      Sander de Smalen authored
      This patch adds builtins for predicated unary builtins
      svext[bhw] and svrev[bhw] and svrbit.
      476ba812
    • Raphael Isemann's avatar
      [lldb][cmake] Also use local submodule visibility on Darwin · 8baa0b94
      Raphael Isemann authored
      Summary:
      Currently building LLVM on macOS and on other platforms with LLVM_ENABLE_MODULES is using different module flags,
      which means that a passing modules build on macOS might fail on Linux and vice versa. -fmodules-local-submodule-visibility
      is the mode that has clearer semantics and is closer to the actual C++ module standard, so let's make this the default everywhere.
      
      We can still test building without local submodule visibility on an additional bot by just changing the respective CMake flag. However,
      if building without local-submodule-visibility breaks we won't revert other commits and we won't loose LLDB's/Clang's test run
      information.
      
      Reviewers: aprantl, bruno, Bigcheese
      
      Reviewed By: Bigcheese
      
      Subscribers: abidh, dexonsmith, JDevlieghere, lldb-commits, mgorny, llvm-commits
      
      Tags: #llvm, #lldb
      
      Differential Revision: https://reviews.llvm.org/D74892
      8baa0b94
    • Simon Pilgrim's avatar
      Fix Wparentheses gcc warning. NFC. · 242e04ab
      Simon Pilgrim authored
      Wrap the 'anyof' hasAttribute checks so that we don't get precedence warnings with the assertion message.
      242e04ab
    • Sander de Smalen's avatar
      [SveEmitter] Add builtins for bitcount operations · c5772012
      Sander de Smalen authored
      This patch adds builtins for svcls, svclz and svcnt.
      
      For merging (_m), zeroing (_z) and don't-care (_x) predication.
      c5772012
    • Dmitri Gribenko's avatar
      Revert "[MLIR] Introduce op trait PolyhedralScope" · ef06016d
      Dmitri Gribenko authored
      This reverts commit dd2c639c. It broke a
      few things -- the explanation will be posted to the review thread.
      ef06016d
    • Sander de Smalen's avatar
      [SveEmitter] Add builtins for permutations and selection · 6f588c6e
      Sander de Smalen authored
      This patch adds builtins for:
      - svlasta and svlastb
      - svclasta and svclastb
      - svunpkhi and svunpklo
      - svuzp1 and svuzp2
      - svzip1 and svzip2
      - svrev
      - svsel
      - svcompact
      - svsplice
      - svtbl
      6f588c6e
    • David Zarzycki's avatar
      Revert: [libc++] Create a small DSL for defining Lit features and parameters · 8f24c4b7
      David Zarzycki authored
      This reverts commit 6d58030c due to lack
      of Python 3 support. As a reminder, the Python community ended their
      support for 2.x at the start of 2020.
      8f24c4b7
    • Igor Kudrin's avatar
      [LLD][ELF] Eliminate symbols of merged .ARM.exidx sections. · 9f65f5ac
      Igor Kudrin authored
      GNU tools generate mapping symbols "$d" for .ARM.exidx sections. The
      symbols are added to the symbol table much earlier than the merging
      takes place, and after that, they become dangling. Before the patch,
      LLD output those symbols as SHN_ABS with the value of 0. The patch
      removes such symbols from the symbol table.
      
      Differential Revision: https://reviews.llvm.org/D78820
      9f65f5ac
    • Anastasia Stulova's avatar
      [OpenCL] Fixed test for the cast operators. · fe667e85
      Anastasia Stulova authored
      The test had unused variable because it missed to cover
      case with __constant address space. This change now
      completes the testing fully.
      fe667e85
    • Pavel Labath's avatar
      [lldb/unittest] Adjust CheckIPSupport function to avoid double-consume of llvm::Error · f07f2cee
      Pavel Labath authored
      The problem caught by clang-tidy and reported by Tobias Bosch.
      f07f2cee
    • Pavel Labath's avatar
      [lldb-vscode] A couple of small style fixes · 5cee8ddc
      Pavel Labath authored
      to make the code conform to llvm style better:
      - avoid use of auto where the type is not obivous
      - avoid StringRef::data where it is not needed
      
      No functional change intended.
      5cee8ddc
    • Rainer Orth's avatar
      [Flang][CMake] Add explicit libFortranCommon dependency for f18 etc. · 3119bdb5
      Rainer Orth authored
      When I tried Solaris builds with `-DBUILD_SHARED_LIBS=ON`, some commands failed
      to link:
      
        [ 94%] Linking CXX executable ../../../../bin/f18
        Undefined                       first referenced
         symbol                             in file
        Fortran::common::IntrinsicTypeDefaultKinds::set_sizeIntegerKind(int) CMakeFiles/f18.dir/f18.cpp.o  (symbol belongs to implicit dependency /var/llvm/local-amd64-release-shared-gcc8-make/lib/libFortranCommon.so.11git)
        Fortran::common::IntrinsicTypeDefaultKinds::set_subscriptIntegerKind(int) CMakeFiles/f18.dir/f18.cpp.o  (symbol belongs to implicit dependency /var/llvm/local-amd64-release-shared-gcc8-make/lib/libFortranCommon.so.11git)
        Fortran::common::EnumIndexToString[abi:cxx11](int, char const*) CMakeFiles/f18.dir/f18.cpp.o  (symbol belongs to implicit dependency /var/llvm/local-amd64-release-shared-gcc8-make/lib/libFortranCommon.so.11git)
        Fortran::common::IntrinsicTypeDefaultKinds::set_defaultIntegerKind(int) CMakeFiles/f18.dir/f18.cpp.o  (symbol belongs to implicit dependency /var/llvm/local-amd64-release-shared-gcc8-make/lib/libFortranCommon.so.11git)
        Fortran::common::IntrinsicTypeDefaultKinds::IntrinsicTypeDefaultKinds() CMakeFiles/f18.dir/f18.cpp.o  (symbol belongs to implicit dependency /var/llvm/local-amd64-release-shared-gcc8-make/lib/libFortranCommon.so.11git)
        Fortran::common::IntrinsicTypeDefaultKinds::set_defaultRealKind(int) CMakeFiles/f18.dir/f18.cpp.o  (symbol belongs to implicit dependency /var/llvm/local-amd64-release-shared-gcc8-make/lib/libFortranCommon.so.11git)
        ld: fatal: symbol referencing errors
      
      This patch fixes this by adding explicit dependencies on `libFortranCommon`
      to the affected commands.
      
      Tested on `amd64-pc-solaris2.11`, `sparcv9-sun-solaris2.11`, and
      `x86-64-pc-linux-gnu`.
      
      Differential Revision: https://reviews.llvm.org/D78761
      3119bdb5
    • KAWASHIMA Takahiro's avatar
      [gcov][test] Work around PR45673 - NFC · 89f6a237
      KAWASHIMA Takahiro authored
      Work around PR45673 until the test code is fixed.
      89f6a237
    • Sander de Smalen's avatar
      [SveEmitter] Add builtins for ternary ops (fmla, fmad, etc) · e1932ffb
      Sander de Smalen authored
      This patch adds builtins for:
      - svmad, svmla, svmls, svmsb
        svnmad, svnmla, svnmls, svnmsb
        svmla_lane, svmls_lane
      
      These builtins come in several flavours:
      - Merge into first source vector (`_m`)
      - False lanes are undef (`_x`)
      - False lanes are zeroed (`_z`)
      
      And can also have `_n` to indicate the last operand is a scalar.
      
      For example:
      
        svint32_t svmla[_n_s32]_z(svbool_t pg, svint32_t op1, svint32_t op2, int32_t op3)
      
      Reviewed By: efriedma
      
      Differential Revision: https://reviews.llvm.org/D78960
      e1932ffb
    • Chen Zheng's avatar
      22fdbd01
    • Ng Zhi An's avatar
      [PowerPC] Fix downcast from nullptr for target streamer · 500b4ad5
      Ng Zhi An authored
      getTargetStreamer() might return null (e.g. when running inlined-strings.ll test),
      downcasting to a reference will be wrong. This is detectable with -fsanitize=null.
      
      Reviewed By: steven.zhang
      
      Differential Revision: https://reviews.llvm.org/D78686
      500b4ad5
Loading