SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [clang-format] Revert e9e6e3b34a8e (details)
  2. Reland [lldb][docs] Use sphinx instead of epydoc to generate LLDB's Python reference (details)
  3. [clang-format] PR48594 BraceWrapping: SplitEmptyRecord ignored for templates (details)
  4. [clangd] Use empty() instead of size()>0 (details)
  5. [clangd] Use !empty() instead of size()>0 (details)
  6. [InstSimplify] Add tests for x*C1/C2<=x (NFC) (details)
  7. [InstSimplify] Fold x*C1/C2 <= x (PR48744) (details)
  8. [lldb][docs] Cleanup the Python doc strings for SB API classes (details)
  9. [Tests] Add test for PR45691 (details)
  10. [InstCombine] Transform abs pattern using multiplication to abs intrinsic (PR45691) (details)
  11. [lldb][docs] Fix some RST formatting errors related to code examples. (details)
  12. [llvm] Use llvm::sort (NFC) (details)
  13. [IRBuilder] "Zero"-initialize SmallVector (NFC) (details)
  14. [TableGen] Drop redundant const from return types (NFC) (details)
  15. NFC: Minor cleanup of function calls (details)
  16. [SimplifyCFG] Add test for PR48778 (NFC) (details)
  17. [ValueTracking] Fix isSafeToSpeculativelyExecute for sdiv (PR48778) (details)
  18. [lldb] Skip TestPlatformProcessConnect on windows and darwin (details)
Commit 9af03864df746aa9a9cf3573da952ce6c5d902cd by mydeveloperday
[clang-format] Revert e9e6e3b34a8e

Reverting {D92753} due to issues with #pragma indentation in #ifdef/endif structure
The file was modifiedclang/lib/Format/Format.cpp
The file was modifiedclang/lib/Format/UnwrappedLineParser.h
The file was modifiedclang/docs/ClangFormatStyleOptions.rst
The file was modifiedclang/include/clang/Format/Format.h
The file was modifiedclang/lib/Format/ContinuationIndenter.cpp
The file was modifiedclang/lib/Format/UnwrappedLineFormatter.cpp
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/UnwrappedLineParser.cpp
Commit e7bc6c594b75602c23cb901f53b3a30d48e2ee78 by Raphael Isemann
Reland [lldb][docs] Use sphinx instead of epydoc to generate LLDB's Python reference

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
The file was modifiedlldb/docs/conf.py
The file was addedlldb/docs/_lldb/__init__.py
The file was addedlldb/docs/python_api.rst
The file was modified.gitignore
The file was modifiedllvm/cmake/modules/AddSphinxTarget.cmake
The file was modifiedlldb/docs/index.rst
The file was modifiedlldb/docs/CMakeLists.txt
Commit 00dc97f16708aad67834552285c0af01b37303d6 by mydeveloperday
[clang-format] PR48594 BraceWrapping: SplitEmptyRecord ignored for templates

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
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/unittests/Format/FormatTestCSharp.cpp
The file was modifiedclang/lib/Format/UnwrappedLineFormatter.cpp
Commit 0f9908a7c9c547f2675e00f88cc11ec02ca28e8d by usx
[clangd] Use empty() instead of size()>0
The file was modifiedclang-tools-extra/clangd/Quality.cpp
Commit 9abbc050974ff117b79e8e049c52c56db3f49aec by usx
[clangd] Use !empty() instead of size()>0
The file was modifiedclang-tools-extra/clangd/Quality.cpp
Commit 4bfbfb9bcb790931b97da972ff02865810f43ce8 by nikita.ppv
[InstSimplify] Add tests for x*C1/C2<=x (NFC)

Tests for PR48744.
The file was modifiedllvm/test/Transforms/InstSimplify/icmp.ll
Commit a13c0f62c38131ef2656b06de02d82110abaf272 by nikita.ppv
[InstSimplify] Fold x*C1/C2 <= x (PR48744)

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.
The file was modifiedllvm/test/Transforms/InstSimplify/icmp.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit acdc74568927d47f94816e73b6e105c9460cc3e4 by Raphael Isemann
[lldb][docs] Cleanup the Python doc strings for SB API classes

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.
The file was modifiedlldb/bindings/interface/SBTraceOptions.i
The file was modifiedlldb/bindings/interface/SBQueue.i
The file was modifiedlldb/bindings/interface/SBExecutionContext.i
The file was modifiedlldb/bindings/interface/SBData.i
The file was modifiedlldb/bindings/interface/SBStringList.i
The file was modifiedlldb/bindings/interface/SBModuleSpec.i
The file was modifiedlldb/bindings/interface/SBHostOS.i
The file was modifiedlldb/bindings/interface/SBLanguageRuntime.i
The file was modifiedlldb/bindings/interface/SBCommunication.i
The file was modifiedlldb/bindings/interface/SBType.i
The file was modifiedlldb/bindings/interface/SBAttachInfo.i
The file was modifiedlldb/bindings/interface/SBReproducer.i
The file was modifiedlldb/bindings/python/python-extensions.swig
The file was modifiedlldb/bindings/interface/SBPlatform.i
The file was modifiedlldb/bindings/interface/SBTypeEnumMember.i
The file was modifiedlldb/bindings/interface/SBFrame.i
The file was modifiedlldb/bindings/interface/SBQueueItem.i
The file was modifiedlldb/bindings/interface/SBFileSpecList.i
The file was modifiedlldb/bindings/interface/SBBreakpoint.i
The file was modifiedlldb/bindings/interface/SBInstruction.i
The file was modifiedlldb/bindings/interface/SBMemoryRegionInfoList.i
The file was modifiedlldb/bindings/interface/SBVariablesOptions.i
The file was modifiedlldb/bindings/interface/SBLaunchInfo.i
The file was modifiedlldb/bindings/interface/SBThreadPlan.i
The file was modifiedlldb/bindings/interface/SBTrace.i
The file was modifiedlldb/bindings/interface/SBLineEntry.i
Commit 469ceaf53892d26f7b68f86f1feb38fe7057815e by Dávid Bolvanský
[Tests] Add test for PR45691
The file was addedllvm/test/Transforms/InstCombine/ashr-or-mul-abs.ll
Commit ed396212da41feed9bffb8cc1ca6518ab031a3c7 by Dávid Bolvanský
[InstCombine] Transform abs pattern using multiplication to abs intrinsic (PR45691)

```
unsigned r(int v)
{
    return (1 | -(v < 0)) * v;
}

`r` is equivalent to `abs(v)`.

```

```
define <4 x i8> @src(<4 x i8> %0) {
%1:
  %2 = ashr <4 x i8> %0, { 31, undef, 31, 31 }
  %3 = or <4 x i8> %2, { 1, 1, 1, undef }
  %4 = mul nsw <4 x i8> %3, %0
  ret <4 x i8> %4
}
=>
define <4 x i8> @tgt(<4 x i8> %0) {
%1:
  %2 = icmp slt <4 x i8> %0, { 0, 0, 0, 0 }
  %3 = sub nsw <4 x i8> { 0, 0, 0, 0 }, %0
  %4 = select <4 x i1> %2, <4 x i8> %3, <4 x i8> %0
  ret <4 x i8> %4
}
Transformation seems to be correct!
```

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D94874
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
The file was modifiedllvm/test/Transforms/InstCombine/ashr-or-mul-abs.ll
Commit 7e9e6ac526ebd90fe8ec0b8d2bb6edd3516ab908 by Raphael Isemann
[lldb][docs] Fix some RST formatting errors related to code examples.

Mostly just making sure the indentation is right (SBDebugger had 0 spaces
as it was still plain text, the others had too much indentation or other
minor issues).
The file was modifiedlldb/bindings/interface/SBCommandInterpreterRunOptions.i
The file was modifiedlldb/bindings/interface/SBType.i
The file was modifiedlldb/bindings/interface/SBStructuredData.i
The file was modifiedlldb/bindings/interface/SBBroadcaster.i
The file was modifiedlldb/bindings/interface/SBDebugger.i
The file was modifiedlldb/bindings/interface/SBProcess.i
Commit 352fcfc69788093b50971a9f5540a61fa0887ce1 by kazu
[llvm] Use llvm::sort (NFC)
The file was modifiedllvm/lib/Target/Hexagon/HexagonBlockRanges.cpp
The file was modifiedllvm/lib/DebugInfo/GSYM/GsymCreator.cpp
The file was modifiedllvm/lib/Bitcode/Writer/BitcodeWriter.cpp
The file was modifiedllvm/lib/DebugInfo/PDB/Native/SymbolCache.cpp
The file was modifiedllvm/lib/Object/COFFObjectFile.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/SpeculateAnalyses.cpp
The file was modifiedllvm/tools/llvm-cov/CoverageExporterLcov.cpp
The file was modifiedllvm/lib/TextAPI/MachO/TextStub.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
The file was modifiedllvm/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp
The file was modifiedllvm/lib/Support/DebugCounter.cpp
The file was modifiedllvm/lib/FileCheck/FileCheck.cpp
The file was modifiedllvm/tools/llvm-jitlink/llvm-jitlink.cpp
The file was modifiedllvm/lib/DWARFLinker/DWARFLinker.cpp
The file was modifiedllvm/tools/llvm-cov/CoverageExporterJson.cpp
Commit a59126115e9586dd7fda4bb365ee43682814fc53 by kazu
[IRBuilder] "Zero"-initialize SmallVector (NFC)
The file was modifiedllvm/lib/IR/IRBuilder.cpp
Commit 50be8e447152b8512521e568e4918dec486c25a5 by kazu
[TableGen] Drop redundant const from return types (NFC)

Identified with readability-const-return-type.
The file was modifiedllvm/utils/TableGen/GlobalISelEmitter.cpp
The file was modifiedllvm/utils/TableGen/CodeGenTarget.h
The file was modifiedllvm/utils/TableGen/CodeGenRegisters.h
The file was modifiedllvm/utils/TableGen/CodeGenRegisters.cpp
The file was modifiedllvm/utils/TableGen/DAGISelMatcher.h
The file was modifiedllvm/utils/TableGen/CodeGenTarget.cpp
The file was modifiedllvm/utils/TableGen/OptParserEmitter.cpp
Commit 9a7fb0848771e3d38baf10e4d1078b50dd884265 by steveire
NFC: Minor cleanup of function calls
The file was modifiedclang/lib/ASTMatchers/ASTMatchFinder.cpp
Commit 1cc477f030bdeb6de98c6bde89fa7850630def24 by nikita.ppv
[SimplifyCFG] Add test for PR48778 (NFC)

The sdiv is incorrectly speculated.
The file was addedllvm/test/Transforms/SimplifyCFG/pr48778-sdiv-speculation.ll
Commit 4229b87ed36cf20b95b363393452aa4815e344e2 by nikita.ppv
[ValueTracking] Fix isSafeToSpeculativelyExecute for sdiv (PR48778)

The != -1 check does not work correctly for all bitwidths. Use
isAllOnesValue() instead.
The file was modifiedllvm/test/Transforms/SimplifyCFG/pr48778-sdiv-speculation.ll
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit a89242d874df72cddeafbebc75ac377371e72796 by pavel
[lldb] Skip TestPlatformProcessConnect on windows and darwin

The test fails (for different reasons) on these platforms. Skip for now.
The file was modifiedlldb/test/API/tools/lldb-server/platform-process-connect/TestPlatformProcessConnect.py