1. Jan 18, 2021
  2. Jan 17, 2021
    • Raphael Isemann's avatar
      [lldb][docs] Cleanup the Python doc strings for SB API classes · acdc7456
      Raphael Isemann authored
      The first line of the doc string ends up on the SB API class summary at
      the root page of the Python API  web page of LLDB. Currently many of the
      descriptions are missing or are several lines which makes the table really
      hard to read.
      
      This just adds the missing docstrings where possible and fixes the formatting
      where necessary.
      acdc7456
    • Nikita Popov's avatar
      [InstSimplify] Fold x*C1/C2 <= x (PR48744) · a13c0f62
      Nikita Popov authored
      We can fold x*C1/C2 <= x to true if C1 <= C2. This is valid even
      if the multiplication is not nuw: https://alive2.llvm.org/ce/z/vULors
      
      The multiplication or division can be replaced by shifts. We don't
      handle the case where both are shifts, as that should get folded
      away by InstCombine.
      a13c0f62
    • Nikita Popov's avatar
      [InstSimplify] Add tests for x*C1/C2<=x (NFC) · 4bfbfb9b
      Nikita Popov authored
      Tests for PR48744.
      4bfbfb9b
    • Utkarsh Saxena's avatar
      [clangd] Use !empty() instead of size()>0 · 9abbc050
      Utkarsh Saxena authored
      9abbc050
    • Utkarsh Saxena's avatar
      [clangd] Use empty() instead of size()>0 · 0f9908a7
      Utkarsh Saxena authored
      0f9908a7
    • mydeveloperday's avatar
      [clang-format] PR48594 BraceWrapping: SplitEmptyRecord ignored for templates · 00dc97f1
      mydeveloperday authored
      https://bugs.llvm.org/show_bug.cgi?id=48594
      
      Empty or small templates were not being treated the same way as small classes especially when SplitEmptyRecord was set to true
      
      This revision aims to help this by identifying a case when we should try not to merge the lines together
      
      Reviewed By: curdeius, JohelEGP
      
      Differential Revision: https://reviews.llvm.org/D93839
      00dc97f1
    • Raphael Isemann's avatar
      Reland [lldb][docs] Use sphinx instead of epydoc to generate LLDB's Python reference · e7bc6c59
      Raphael Isemann authored
      The build server should now have the missing dependencies.
      
      Original summary:
      
      Currently LLDB uses epydoc to generate the Python API reference for the website.
      epydoc however is unmaintained since more than a decade and no longer works with
      Python 3. Also whatever setup we had once for generating the documentation on
      the website server no longer seems to work, so the current website documentation
      has been stale since more than a year.
      
      This patch replaces epydoc with sphinx and its automodapi plugin that can
      generate Python API references. LLVM already uses sphinx for the rest of the
      documentation, so this way we are more consistent with the rest of LLVM. The
      only new dependency is the automodapi plugin for sphinx.
      
      This patch effectively does the following things:
      * Remove the epydoc code.
      * Make a new dummy Python API page in our website that just calls the Sphinx
        command for generated the API documentation.
      * Add a mock _lldb module that is only used when generating the Python API.
       This way we don't have to build all of LLDB to generate the API reference.
      
      Some notes:
      * The long list of skips is necessary due to boilerplate functions that SWIG
        is generating. Sadly automodapi is not really scriptable from what I can see,
        so we have to blacklist this stuff manually.
      * The .gitignore change because automodapi wants a subfolder of our
        documentation directory to place generated documentation files there. The path
        is also what is used on the website, so we can't really workaround this
        (without copying the whole `docs` dir somewhere else when we build).
      * We have to use environment variables to pass our build path to our sphinx
        configuration. Sphinx doesn't support passing variables onto that script.
      
      Reviewed By: JDevlieghere
      
      Differential Revision: https://reviews.llvm.org/D94489
      e7bc6c59
    • mydeveloperday's avatar
      [clang-format] Revert e9e6e3b3 · 9af03864
      mydeveloperday authored
      Reverting {D92753} due to issues with #pragma indentation in #ifdef/endif structure
      9af03864
    • Nikita Popov's avatar
      Reapply [BasicAA] Handle recursive queries more efficiently · 0b84afa5
      Nikita Popov authored
      There are no changes relative to the original commit. However, an issue
      this exposed in BasicAA assumption tracking has been fixed in the
      previous commit.
      
      -----
      
      An alias query currently works out roughly like this:
      
       * Look up location pair in cache.
       * Perform BasicAA logic (including cache lookup and insertion...)
       * Perform a recursive query using BestAAResults.
         * Look up location pair in cache (and thus do not recurse into BasicAA)
         * Query all the other AA providers.
       * Query all the other AA providers.
      
      This is a lot of unnecessary work, all ultimately caused by the
      BestAAResults query at the end of aliasCheck(). The reason we perform
      it, is that aliasCheck() is getting called recursively, and we of
      course want those recursive queries to also make use of other AA
      providers, not just BasicAA. We can solve this by making the recursive
      queries directly use BestAAResults (which will check both BasicAA
      and other providers), rather than recursing into aliasCheck().
      
      There are some tradeoffs:
      
       * We can no longer pass through the precomputed underlying object
         to aliasCheck(). This is not a major concern, because nowadays
         getUnderlyingObject() is quite cheap.
       * Results from other AA providers are no longer cached inside
         BasicAA. The way this worked was already a bit iffy, in that a
         result could be cached, but if it was MayAlias, we'd still end
         up re-querying other providers anyway. If we want to cache
         non-BasicAA results, we should do that in a more principled manner.
      
      In any case, despite those tradeoffs, this works out to be a decent
      compile-time improvment. I think it also simplifies the mental model
      of how BasicAA works. It took me quite a while to fully understand
      how these things interact.
      
      Differential Revision: https://reviews.llvm.org/D90094
      0b84afa5
    • Nikita Popov's avatar
      [BasicAA] Move assumption tracking into AAQI · b1c2f128
      Nikita Popov authored
      D91936 placed the tracking for the assumptions into BasicAA.
      However, when recursing over phis, we may use fresh AAQI instances.
      In this case AssumptionBasedResults from an inner AAQI can reesult
      in a removal of an element from the outer AAQI.
      
      To avoid this, move the tracking into AAQI. This generally makes
      more sense, as the NoAlias assumptions themselves are also stored
      in AAQI.
      
      The test case only produces an assertion failure with D90094
      reapplied. I think the issue exists independently of that change
      as well, but I wasn't able to come up with a reproducer.
      b1c2f128
    • Fangrui Song's avatar
      3809f4eb
    • Kazushi (Jam) Marukawa's avatar
      [VE] Support VE in libunwind · 3cbd476c
      Kazushi (Jam) Marukawa authored
      Modify libunwind to support SjLj exception handling routines for VE.
      In order to do that, we need to implement not only SjLj exception
      handling routines but also a Registers_ve class.  This implementation
      of Registers_ve is incomplete.  We will work on it later when we need
      backtrace in libunwind.
      
      Reviewed By: #libunwind, compnerd
      
      Differential Revision: https://reviews.llvm.org/D94591
      3cbd476c
    • Craig Topper's avatar
      [RISCV] Remove an extra map lookup from RISCVCompressInstEmitter. NFC · 061f681c
      Craig Topper authored
      When we looked up the map to see if the entry already existed,
      this created the new entry for us. So save a reference to it so
      we can use it to update the entry instead of looking it up again.
      
      Also remove unnecessary StringRef constructors around string
      literals on calls to this function.
      061f681c
    • Craig Topper's avatar
      [RISCV] Few more minor cleanups to RISCVCompressInstEmitter. NFC · 1327c730
      Craig Topper authored
      -Use StringRef instead of std::string.
      -Const correct a parameter.
      -Don't call StringRef::data() before printing. Just pass the StringRef.
      1327c730
    • Craig Topper's avatar
      [RISCV] Simplify mergeCondAndCode in RISCVCompressInstEmitter.cpp. NFC · 2b6a9262
      Craig Topper authored
      Instead forming a std::string and returning it to pass into another
      raw_ostream, just pass the raw_ostream as a parameter.
      
      Take StringRef as arguments instead raw_string_ostream references
      making the caller responsible for converting to strings. Use
      StringRef operations instead of std::string::substr.a
      2b6a9262
    • Craig Topper's avatar