Skip to content
  1. Mar 18, 2021
    • Mehdi Amini's avatar
      Revert "[VPlan] Add plain text (not DOT's digraph) dumps" · 3614df35
      Mehdi Amini authored
      This reverts commit 6b053c98.
      The build is broken:
      
      ld.lld: error: undefined symbol: llvm::VPlan::printDOT(llvm::raw_ostream&) const
      >>> referenced by LoopVectorize.cpp
      >>>               LoopVectorize.cpp.o:(llvm::LoopVectorizationPlanner::printPlans(llvm::raw_ostream&)) in archive lib/libLLVMVectorize.a
      3614df35
    • Andrei Elovikov's avatar
      [VPlan] Add plain text (not DOT's digraph) dumps · 6b053c98
      Andrei Elovikov authored
      I foresee two uses for this:
      1) It's easier to use those in debugger.
      2) Once we start implementing more VPlan-to-VPlan transformations (especially
         inner loop massaging stuff), using the vectorized LLVM IR as CHECK targets in
         LIT test would become too obscure. I can imagine that we'd want to CHECK
         against VPlan dumps after multiple transformations instead. That would be
         easier with plain text dumps than with DOT format.
      
      Reviewed By: fhahn
      
      Differential Revision: https://reviews.llvm.org/D96628
      6b053c98
    • Mircea Trofin's avatar
      Reapply "[NPM][CGSCC] FunctionAnalysisManagerCGSCCProxy: do not clear immutable function passes" · 92ccc6cb
      Mircea Trofin authored
      This reverts commit 11b70b9e.
      
      The bot failure was due to ArgumentPromotion deleting functions
      without deleting their analyses. This was separately fixed in 4b1c8070.
      92ccc6cb
    • Nigel Perks's avatar
      [Test][DebugInfo] Check for backend object emission support. · 251fe986
      Nigel Perks authored
      The XCore backend does not support object emission. Several tests fail for this
      reason when XCore is the default target. See staging buildbot builder:
      clang-xcore-ubuntu-20-x64.
      
      So check for backend object emission before running the tests requiring it.
      
      Incorporate isConfigurationSupported functionality in isObjectEmissionSupported,
      to avoid calling them both in the same tests.
      
      Differential Revision: https://reviews.llvm.org/D98400
      251fe986
    • Joel E. Denny's avatar
      [FileCheck] Fix numeric error propagation · dd59c132
      Joel E. Denny authored
      A more general name might be match-time error propagation.  That is,
      it's conceivable we'll one day have non-numeric errors that require
      the handling fixed by this patch.
      
      Without this patch, FileCheck behaves as follows:
      
      ```
      $ cat check
      CHECK-NOT: [[#0x8000000000000000+0x8000000000000000]]
      
      $ FileCheck -vv -dump-input=never check < input
      check:1:54: remark: implicit EOF: expected string found in input
      CHECK-NOT: [[#0x8000000000000000+0x8000000000000000]]
                                                           ^
      <stdin>:2:1: note: found here
      
      ^
      check:1:15: error: unable to substitute variable or numeric expression: overflow error
      CHECK-NOT: [[#0x8000000000000000+0x8000000000000000]]
                    ^
      $ echo $?
      0
      ```
      
      Notice that the exit status is 0 even though there's an error.
      Moreover, FileCheck doesn't print the error diagnostic unless both
      `-dump-input=never` and `-vv` are specified.
      
      The same problem occurs when `CHECK-NOT` does have a match but a
      capture fails due to overflow: exit status is 0, and no diagnostic is
      printed unless both `-dump-input=never` and `-vv` are specified.  The
      usefulness of capturing from `CHECK-NOT` is questionable, but this
      case should certainly produce an error.
      
      With this patch, FileCheck always includes the error diagnostic and
      has non-zero exit status for the above examples.  It's conceivable
      that this change will cause some existing tests to fail, but my
      assumption is that they should fail.  Moreover, with nearly every
      project enabled, this patch didn't produce additional `check-all`
      failures for me.
      
      This patch also extends input dumps to include such numeric error
      diagnostics for both expected and excluded patterns.
      
      As noted in fixmes in some of the tests added by this patch, this
      patch worsens an existing issue with redundant diagnostics.  I'll fix
      that bug in a subsequent patch.
      
      Reviewed By: thopre, jhenderson
      
      Differential Revision: https://reviews.llvm.org/D98086
      dd59c132
  2. Mar 17, 2021
    • Stephen Tozer's avatar
      Reapply "[DebugInfo] Handle multiple variable location operands in IR" · 3bfddc25
      Stephen Tozer authored
      Fixed section of code that iterated through a SmallDenseMap and added
      instructions in each iteration, causing non-deterministic code; replaced
      SmallDenseMap with MapVector to prevent non-determinism.
      
      This reverts commit 01ac6d15.
      3bfddc25
    • Paul Robinson's avatar
      [RGT] RPCUtilsTest, replace un-executed EXPECT with unreachable · 05eeb607
      Paul Robinson authored
      Unreachable code should be self-documented as unreachable.
      
      Found by the Rotten Green Tests project.
      
      Differential Revision: https://reviews.llvm.org/D98518
      05eeb607
    • Hans Wennborg's avatar
      Revert "[DebugInfo] Handle multiple variable location operands in IR" · 01ac6d15
      Hans Wennborg authored
      This caused non-deterministic compiler output; see comment on the
      code review.
      
      > This patch updates the various IR passes to correctly handle dbg.values with a
      > DIArgList location. This patch does not actually allow DIArgLists to be produced
      > by salvageDebugInfo, and it does not affect any pass after codegen-prepare.
      > Other than that, it should cover every IR pass.
      >
      > Most of the changes simply extend code that operated on a single debug value to
      > operate on the list of debug values in the style of any_of, all_of, for_each,
      > etc. Instances of setOperand(0, ...) have been replaced with with
      > replaceVariableLocationOp, which takes the value that is being replaced as an
      > additional argument. In places where this value isn't readily available, we have
      > to track the old value through to the point where it gets replaced.
      >
      > Differential Revision: https://reviews.llvm.org/D88232
      
      This reverts commit df69c694.
      01ac6d15
    • Max Kazantsev's avatar
      [BasicAA] Drop dependency on Loop Info. PR43276 · a6074b09
      Max Kazantsev authored
      BasicAA stores a reference to LoopInfo inside. This imposes an implicit
      requirement of keeping it up to date whenever we modify the IR (in particular,
      whenever we modify terminators of blocks that belong to loops). Failing
      to do so leads to incorrect state of the LoopInfo.
      
      Because general AA does not require loop info updates and provides to API to
      update it properly, the users of AA reasonably assume that there is no need to
      update the loop info. It may be a reason of bugs, as example in PR43276 shows.
      
      This patch drops dependence of BasicAA on LoopInfo to avoid this problem.
      
      This may potentially pessimize the result of queries to BasicAA.
      
      Differential Revision: https://reviews.llvm.org/D98627
      Reviewed By: nikic
      a6074b09
  3. Mar 16, 2021
  4. Mar 15, 2021
    • Lang Hames's avatar
      [JITLink][MachO][x86-64] Introduce generic x86-64 support. · ecf6466f
      Lang Hames authored
      This patch introduces generic x86-64 edge kinds, and refactors the MachO/x86-64
      backend to use these edge kinds. This simplifies the implementation of the
      MachO/x86-64 backend and makes it possible to write generic x86-64 passes and
      utilities.
      
      The new edge kinds are different from the original set used in the MachO/x86-64
      backend. Several edge kinds that were not meaningfully distinguished in that
      backend (e.g. the PCRelMinusN edges) have been merged into single edge kinds in
      the new scheme (these edge kinds can be reintroduced later if we find a use for
      them). At the same time, new edge kinds have been introduced to convey extra
      information about the state of the graph. E.g. The Request*AndTransformTo**
      edges represent GOT/TLVP relocations prior to synthesis of the GOT/TLVP
      entries, and the 'Relaxable' suffix distinguishes edges that are candidates for
      optimization from edges which should be left as-is (e.g. to enable runtime
      redirection).
      
      ELF/x86-64 will be refactored to use these generic edges at some point in the
      future, and I anticipate a similar refactor to create a generic arm64 support
      header too.
      
      Differential Revision: https://reviews.llvm.org/D98305
      ecf6466f
    • Nick Lewycky's avatar
      NFC: Formatting changes. · 483a253a
      Nick Lewycky authored
      Run clang-format over these files.
      
      Capitalize some variable names per clang-tidy's request.
      
      Pulled out to simplify review of D98302.
      483a253a
  5. Mar 16, 2021
  6. Mar 14, 2021
  7. Mar 13, 2021
  8. Mar 12, 2021
  9. Mar 11, 2021
  10. Mar 10, 2021
    • kuterd's avatar
      [Attributor] Attributor call site specific AAValueConstantRange · d75c9e61
      kuterd authored
      This patch makes uses of the context bridges introduced in D83299 to make
      AAValueConstantRange call site specific.
      
      Reviewed By: jdoerfert
      
      Differential Revision: https://reviews.llvm.org/D83744
      d75c9e61
    • Mauri Mustonen's avatar
      [VPlan] Support to widen select intructions in VPlan native path · 0de8aeae
      Mauri Mustonen authored
      Add support to widen select instructions in VPlan native path by using a correct recipe when such instructions are encountered. This is already used by inner loop vectorizer.
      
      Previously select instructions get handled by the wrong recipe and resulted in unreachable instruction errors like this one: https://bugs.llvm.org/show_bug.cgi?id=48139.
      
      Reviewed By: fhahn
      
      Differential Revision: https://reviews.llvm.org/D97136
      0de8aeae
    • Christudasan Devadasan's avatar
      GlobalISel: Try to combine G_[SU]DIV and G_[SU]REM · 4c6ab48f
      Christudasan Devadasan authored
      It is good to have a combined `divrem` instruction when the
      `div` and `rem` are computed from identical input operands.
      Some targets can lower them through a single expansion that
      computes both division and remainder. It effectively reduces
      the number of instructions than individually expanding them.
      
      Reviewed By: arsenm, paquette
      
      Differential Revision: https://reviews.llvm.org/D96013
      4c6ab48f
    • Wei Mi's avatar
      [SampleFDO] Support enabling -funique-internal-linkage-name. · ee35784a
      Wei Mi authored
      now -funique-internal-linkage-name flag is available, and we want to flip
      it on by default since it is beneficial to have separate sample profiles
      for different internal symbols with the same name. As a preparation, we
      want to avoid regression caused by the flip.
      
      When we flip -funique-internal-linkage-name on, the profile is collected
      from binary built without -funique-internal-linkage-name so it has no uniq
      suffix, but the IR in the optimized build contains the suffix. This kind of
      mismatch may introduce transient regression.
      
      To avoid such mismatch, we introduce a NameTable section flag indicating
      whether there is any name in the profile containing uniq suffix. Compiler
      will decide whether to keep uniq suffix during name canonicalization
      depending on the NameTable section flag. The flag is only available for
      extbinary format. For other formats, by default compiler will keep uniq
      suffix so they will only experience transient regression when
      -funique-internal-linkage-name is just flipped.
      
      Another type of regression is caused by places where we miss to call
      getCanonicalFnName. Those places are fixed.
      
      Differential Revision: https://reviews.llvm.org/D96932
      ee35784a
  11. Mar 09, 2021
  12. Mar 08, 2021
    • Stephen Tozer's avatar
      Fix 2: [DebugInfo] Support DIArgList in DbgVariableIntrinsic · 57a0e0d4
      Stephen Tozer authored
      Changes to function calls in LocalTest resulted in comparisons between
      unsigned values and signed literals; the latter have been updated to be
      unsigned to prevent this warning.
      57a0e0d4
    • gbtozers's avatar
      [DebugInfo] Support DIArgList in DbgVariableIntrinsic · e5d958c4
      gbtozers authored
      This patch updates DbgVariableIntrinsics to support use of a DIArgList for the
      location operand, resulting in a significant change to its interface. This patch
      does not update all IR passes to support multiple location operands in a
      dbg.value; the only change is to update the DbgVariableIntrinsic interface and
      its uses. All code outside of the intrinsic classes assumes that an intrinsic
      will always have exactly one location operand; they will still support
      DIArgLists, but only if they contain exactly one Value.
      
      Among other changes, the setOperand and setArgOperand functions in
      DbgVariableIntrinsic have been made private. This is to prevent code from
      setting the operands of these intrinsics directly, which could easily result in
      incorrect/invalid operands being set. This does not prevent these functions from
      being called on a debug intrinsic at all, as they can still be called on any
      CallInst pointer; it is assumed that any code directly setting the operands on a
      generic call instruction is doing so safely. The intention for making these
      functions private is to prevent DIArgLists from being overwritten by code that's
      naively trying to replace one of the Values it points to, and also to fail fast
      if a DbgVariableIntrinsic is updated to use a DIArgList without a valid
      corresponding DIExpression.
      e5d958c4
  13. Mar 05, 2021
    • gbtozers's avatar
      [DebugInfo] Add DIArgList MD to store multple values in DbgVariableIntrinsics · 65600cb2
      gbtozers authored
      This patch adds a new metadata node, DIArgList, which contains a list of SSA
      values. This node is in many ways similar in function to the existing
      ValueAsMetadata node, with the difference being that it tracks a list instead of
      a single value. Internally, it uses ValueAsMetadata to track the individual
      values, but there is also a reasonable amount of DIArgList-specific
      value-tracking logic on top of that. Similar to ValueAsMetadata, it is a special
      case in parsing and printing due to the fact that it requires a function state
      (as it may reference function-local values).
      
      This patch should not result in any immediate functional change; it allows for
      DIArgLists to be parsed and printed, but debug variable intrinsics do not yet
      recognize them as a valid argument (outside of parsing).
      
      Differential Revision: https://reviews.llvm.org/D88175
      65600cb2
Loading