Skip to content
  1. Apr 08, 2020
    • Lukas Sommer's avatar
      Keep output file after successful execution of mlir-opt · d86ece13
      Lukas Sommer authored
      Invoke `keep()` on the output file of `mlir-opt` in case the invocation of `MlirOptMain` was successful, to make sure the output file is not deleted on exit from `mlir-opt`.
      Fixes a similar problem in `standalone-opt` from the example for an out-of-tree, standalone MLIR dialect.
      
      This revision also adds a missing parameter to the invocation of `MlirOptMain` in `standalone-opt`.
      
      Differential Revision: https://reviews.llvm.org/D77643
      d86ece13
    • Kazu Hirata's avatar
      [JumpThreading] NFC: Simplify ComputeValueKnownInPredecessorsImpl · 91eb442f
      Kazu Hirata authored
      Summary:
      ComputeValueKnownInPredecessorsImpl is the main folding mechanism in
      JumpThreading.cpp.  To avoid potential infinite recursion while
      chasing use-def chains, it uses:
      
        DenseSet<std::pair<Value *, BasicBlock *>> &RecursionSet
      
      to keep track of Value-BB pairs that we've processed.
      
      Now, when ComputeValueKnownInPredecessorsImpl recursively calls
      itself, it always passes BB as is, so the second element is always BB.
      
      This patch simplifes the function by dropping "BasicBlock *" from
      RecursionSet.
      
      Reviewers: wmi, efriedma
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D77699
      91eb442f
    • Julian Lettner's avatar
      [lit] Print slowest test first when timing tests · 09f34508
      Julian Lettner authored
      lit supports `--time-tests` which will report the 20 slowest tests and
      print a nice histogram for test times.  This change prints this list and
      the histogram rows by decreasing test times.  After all, we are most
      interested in the slowest tests.
      09f34508
    • Julian Lettner's avatar
      2ac96d61
    • Volodymyr Sapsai's avatar
      Revert "[ObjC generics] Fix not inheriting type bounds in categories/extensions." · 8fb7cfce
      Volodymyr Sapsai authored
      This reverts commit a8c8b627. It causes
      intermittent
      
          Clang :: SemaObjC/parameterized_classes_subst.m
      
      test failures on various bots.
      8fb7cfce
    • Dan Albert's avatar
      Reset more globalMemCounters. · 0b43db52
      Dan Albert authored
      Reviewers: EricWF, #libc
      
      Reviewed By: EricWF, #libc
      
      Subscribers: broadwaylamb, libcxx-commits
      
      Tags: #libc
      
      Differential Revision: https://reviews.llvm.org/D77681
      0b43db52
    • LLVM GN Syncbot's avatar
      [gn build] Port 1adeeabb · 6fa0d0ae
      LLVM GN Syncbot authored
      6fa0d0ae
    • Eli Friedman's avatar
      565b56a7
    • Davide Italiano's avatar
    • Daniel Sanders's avatar
      Add MIR-level debugify with only locations support for now · 1adeeabb
      Daniel Sanders authored
      Summary:
      Re-used the IR-level debugify for the most part. The MIR-level code then
      adds locations to the MachineInstrs afterwards based on the LLVM-IR debug
      info.
      
      It's worth mentioning that the resulting locations make little sense as
      the range of line numbers used in a Function at the MIR level exceeds that
      of the equivelent IR level function. As such, MachineInstrs can appear to
      originate from outside the subprogram scope (and from other subprogram
      scopes). However, it doesn't seem worth worrying about as the source is
      imaginary anyway.
      
      There's a few high level goals this pass works towards:
      * We should be able to debugify our .ll/.mir in the lit tests without
        changing the checks and still pass them. I.e. Debug info should not change
        codegen. Combining this with a strip-debug pass should enable this. The
        main issue I ran into without the strip-debug pass was instructions with MMO's and
        checks on both the instruction and the MMO as the debug-location is
        between them. I currently have a simple hack in the MIRPrinter to
        resolve that but the more general solution is a proper strip-debug pass.
      * We should be able to test that GlobalISel does not lose debug info. I
        recently found that the legalizer can be unexpectedly lossy in seemingly
        simple cases (e.g. expanding one instr into many). I have a verifier
        (will be posted separately) that can be integrated with passes that use
        the observer interface and will catch location loss (it does not verify
        correctness, just that there's zero lossage). It is a little conservative
        as the line-0 locations that arise from conflicts do not track the
        conflicting locations but it can still catch a fair bit.
      
      Depends on D77439, D77438
      
      Reviewers: aprantl, bogner, vsk
      
      Subscribers: mgorny, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D77446
      1adeeabb
    • Fangrui Song's avatar
      [VE] Migrate to the getMachineMemOperand overload using llvm::Align · 624654fd
      Fangrui Song authored
      Just delete the deprecated overload because nothing uses it.
      624654fd
    • River Riddle's avatar
      [mlir][AsmFormat] Avoid invalidating the iterator when verifying attributes · 8b7e669e
      River Riddle authored
      Summary: 'it' may get invalidated when recursing into optional groups. This revision refactors the inner loop to avoid the need to compare the iterator after invalidation.
      
      Differential Revision: https://reviews.llvm.org/D77686
      8b7e669e
    • Matt Arsenault's avatar
      CodeGen: More conversions to use Register · 6011627f
      Matt Arsenault authored
      6011627f
    • Fangrui Song's avatar
      [ThinLTO] Drop dso_local if a GlobalVariable satisfies isDeclarationForLinker() · d2ef8c1f
      Fangrui Song authored
      dso_local leads to direct access even if the definition is not within this compilation unit (it is
      still in the same linkage unit). On ELF, such a relocation (e.g. R_X86_64_PC32) referencing a
      STB_GLOBAL STV_DEFAULT object can cause a linker error in a -shared link.
      
      If the linkage is changed to available_externally, the dso_local flag should be dropped, so that no
      direct access will be generated.
      
      The current behavior is benign, because -fpic does not assume dso_local
      (clang/lib/CodeGen/CodeGenModule.cpp:shouldAssumeDSOLocal).
      If we do that for -fno-semantic-interposition (D73865), there will be an
      R_X86_64_PC32 linker error without this patch.
      
      Reviewed By: tejohnson
      
      Differential Revision: https://reviews.llvm.org/D74751
      d2ef8c1f
    • Fangrui Song's avatar
      [VE] Adapt aa26dd98 and 2481f26a · 2f8fb4d1
      Fangrui Song authored
      2f8fb4d1
    • Dan Albert's avatar
      Revert "Don't expose unavailable cstdio functions." · 50280c18
      Dan Albert authored
      Broke builders that emit different diagnostics. e.g.:
      
      error: 'warning' diagnostics seen but not expected:
        Line 13: alias declarations are a C++11 extension
        Line 20: alias declarations are a C++11 extension
      
      This reverts commit ff878137.
      50280c18
    • Stephen Neuendorffer's avatar
      [MLIR] Add note for file-line numbers in tablegen errors for assembly formats · 19fec004
      Stephen Neuendorffer authored
      Error messages for the custom assembly format are difficult to understand
      because there are no line numbers.  This happens because the assembly format
      is parsed as a standalone line, separate from it's parent file, with no useful
      location information.  Fixing this properly probably requires quite a bit
      of invasive plumbing through the SourceMgr, similar to how included files
      are handled
      
      This proposal is a less invasive short term solution.  When generating an
      error message we generate an additional note which at least properly describes
      the operation definition the error occured in, if not the actual line number
      of the assemblyFormat definition.
      
      A typical message is like:
      
      error: type of operand #0, named 'operand', is not buildable and a buildable type cannot be inferred
        $operand type($result) attr-dict
        ^
      /src/llvm-project/mlir/test/mlir-tblgen/op-format-spec.td:296:1: note: in custom assembly format for this operation
      def ZCoverageInvalidC : TestFormat_Op<"variable_invalid_c", [{
      ^
      note: suggest adding a type constraint to the operation or adding a 'type($operand)' directive to the custom assembly format
        $operand type($result) attr-dict
        ^
      
      Differential Revision: https://reviews.llvm.org/D77488
      19fec004
    • Stephen Neuendorffer's avatar
      [MLIR] Cleanup mlir-tblgen error messages for custom assembly formats. · 75f60c69
      Stephen Neuendorffer authored
      The messages are somewhat cryptic, since they are not complete sentences,
      include lots of ambiguous words, like 'format' which are hard to parse,
      and include names from the users code which may, or may not make sense in
      the context of the message.  Start to clean this up and provide some
      guidance for fixes.
      
      Also, add a test for one of the messages which didn't have a test at all.
      
      Differential Revision: https://reviews.llvm.org/D77449
      75f60c69
    • Dan Albert's avatar
      Don't expose unavailable cstdio functions. · ff878137
      Dan Albert authored
      Summary: These aren't available on Android in all configurations.
      
      Reviewers: EricWF, mclow.lists, #libc, ldionne
      
      Reviewed By: EricWF, #libc, ldionne
      
      Subscribers: broadwaylamb, dexonsmith, ldionne, krytarowski, libcxx-commits
      
      Tags: #libc
      
      Differential Revision: https://reviews.llvm.org/D76093
      ff878137
  2. Apr 07, 2020
Loading