1. Jan 22, 2021
    • Duncan P. N. Exon Smith's avatar
      X86: Fix use-after-realloc in X86AsmParser::ParseIntelExpression · f2fd41d7
      Duncan P. N. Exon Smith authored
      `X86AsmParser::ParseIntelExpression` has a while loop. In the body,
      calls to MCAsmLexer::UnLex can force a reallocation in the MCAsmLexer's
      `CurToken` SmallVector, invalidating saved references to
      `MCAsmLexer::getTok()`.
      
      `const MCAsmToken &Tok` is such a saved reference, and this moves it
      from outside the while loop to inside the body, fixing a
      use-after-realloc.
      
      `Tok` will still be reused across calls to `Lex()`, each of which
      effectively destroys and constructs the pointed-to token. I'm a bit
      skeptical of this usage pattern, but it seems broadly used in the
      X86AsmParser (and others) so I'm leaving it alone (for now).
      
      Somehow this bug was exposed by https://reviews.llvm.org/D94739,
      resulting in test failures in dot-operator related tests in
      llvm/test/tools/llvm-ml. I suspect the exposure path is related to
      optimizer changes from splitting up the grow operation, but I haven't
      dug all the way in. Regardless, there are already tests in tree that
      cover this; they might fail consistently if we added ASan
      instrumentation to SmallVector.
      
      Differential Revision: https://reviews.llvm.org/D95112
      f2fd41d7
    • Joseph Huber's avatar
      [OpenMP] Fix failing test due to change in offloading flags · 119a9ea1
      Joseph Huber authored
      Summary:
      Prior to D91261 the information checked the OMP_MAP_TARGET_PARAM flag, change this as it has been removed. The INFO macro was changed to accept a flag as input to make conditionally printing information easier.
      
      Reviewed By: jdoerfert
      
      Differential Revision: https://reviews.llvm.org/D95133
      119a9ea1
    • Artem Belevich's avatar
      [CUDA] Normalize handling of defauled dtor. · 127091bf
      Artem Belevich authored
      Defaulted destructor was treated inconsistently, compared to other
      compiler-generated functions.
      
      When Sema::IdentifyCUDATarget() got called on just-created dtor which didn't
      have implicit __host__ __device__ attributes applied yet, it would treat it as a
      host function.  That happened to (sometimes) hide the error when dtor referred
      to a host-only functions.
      
      Even when we had identified defaulted dtor as a HD function, we still treated it
      inconsistently during selection of usual deallocators, where we did not allow
      referring to wrong-side functions, while it is allowed for other HD functions.
      
      This change brings handling of defaulted dtors in line with other HD functions.
      
      Differential Revision: https://reviews.llvm.org/D94732
      127091bf
    • peter klausler's avatar
      [flang] Better C_LOC and C_ASSOCIATED in flang/module · a75840a0
      peter klausler authored
      The place-holding implementation of C_LOC just didn't work
      when used with our more complete semantic checking, specifically
      in the case of a polymorphic argument; convert it to an external
      function with an implicit interface.  C_ASSOCIATED needs to be
      a generic interface with specific implementations for C_PTR and
      C_FUNPTR.
      
      Differential Revision: https://reviews.llvm.org/D94714
      a75840a0
    • Ulrich Weigand's avatar
      [NFC][Doc] Mention SystemZ supports StackMap generation · b3a5abcb
      Ulrich Weigand authored
      Support available as of commit 5eb64110.
      
      Differential Revision: https://reviews.llvm.org/D95040
      b3a5abcb
    • Hsiangkai Wang's avatar
      [RISCV] Update V instructions constraints to conform to v1.0 · b8921af6
      Hsiangkai Wang authored
      Upgrade RISC-V V extension to v1.0-08a0b46.
      Update instruction constraints to conform to v1.0.
      
      Differential Revision: https://reviews.llvm.org/D93612
      b8921af6
    • Giorgis Georgakoudis's avatar
      [OpenMP] Add time profiling support in libomp · 6b7645dd
      Giorgis Georgakoudis authored
      Profiling has been recently implemented in libomptarget (D93055). This patch enables time profiling support for libomptarget in libomp, to support profiling of multi-threaded execution of offloaded regions.
      
      Reviewed By: jdoerfert
      
      Differential Revision: https://reviews.llvm.org/D94855
      6b7645dd
    • Sebastian Neubauer's avatar
      Revert "[AMDGPU] Implement mir parseCustomPseudoSourceValue" · 4dbdff66
      Sebastian Neubauer authored
      This reverts commit ba7dcd85.
      
      (caused memory leaks)
      4dbdff66
    • Marek Kurdej's avatar
      [libc++] Use ioctl when available to get random_device entropy. · f3b979b6
      Marek Kurdej authored
      Implemented the idea from D94571 to improve entropy on Linux.
      
      Reviewed By: ldionne, #libc
      
      Differential Revision: https://reviews.llvm.org/D94953
      f3b979b6
    • Hsiangkai Wang's avatar
      [RISCV] Add new V instructions in v1.0-08a0b46. · 266820be
      Hsiangkai Wang authored
      Add new V instructions.
      vfrsqrte7.v
      vfrece7.v
      vrgatherei16.vv
      vneg.v
      vncvt.x.x.w
      vfneg.v
      266820be
    • Andrzej Warzynski's avatar
      [flang][driver] Move fixed/free from detection out of FrontendAction API · aba24c15
      Andrzej Warzynski authored
      All Fortran options should be set in `CompilerInstance` (via its
      `CompilerInvocation`) before any of `FrontendAction` is entered -
      that's one of the tasks of the driver. However, this is a bit tricky
      with fixed and free from detection introduced in
      https://reviews.llvm.org/D94228.
      
      Fixed-free form detection needs to happen:
        * before any frontend action (we need to specify `isFixedForm` in
          `Fortran::parser::Options` before running any actions)
        * separately for every input file (we might be compiling multiple
          Fortran files, some in free form, some in fixed form)
      In other words, we need this to happen early (before any
      `FrontendAction`), but not too early (we need to know what the current
      input file is). In practice, `isFixedForm` can only be set later
      than other options (other options are inferred from compiler flags). So
      we can't really set all of them in one place, which is not ideal.
      
      All changes in this patch are NFCs (hence no new tests). Quick summary:
        * move fixed/free form detection from `FrontendAction::ExecuteAction` to
          `CompilerInstance::ExecuteAction`
        * add a bool flag in `FrontendInputFile` to mark a file as fixed/free
          form
        * updated a few comments
      
      Differential Revision: https://reviews.llvm.org/D95042
      aba24c15
    • Hsiangkai Wang's avatar
      [RISCV] Make LMUL field in VTYPE continuous. · 9dd5aea1
      Hsiangkai Wang authored
      Upgrade RISC-V V extension to v1.0-08a0b46.
      Update the VTYPE encoding. Make LMUL encoding in a continuous field.
      9dd5aea1
  2. Jan 21, 2021