[llvm-branch-commits] [llvm] Fill 17.x/ReleaseNotes with my works (PR #73461)

2023-11-26 Thread NAKAMURA Takumi via llvm-branch-commits

https://github.com/chapuni created 
https://github.com/llvm/llvm-project/pull/73461

Sorry for the delay.

Feel free to correct, rephrase, and revise.

>From 3ebda6d1a89555a142ac04faab36c279353e95ae Mon Sep 17 00:00:00 2001
From: NAKAMURA Takumi 
Date: Mon, 27 Nov 2023 06:04:57 +0900
Subject: [PATCH] Fill 17.x/ReleaseNotes with my works

---
 llvm/docs/ReleaseNotes.rst | 30 ++
 1 file changed, 30 insertions(+)

diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst
index f08a5d8a65d12db..c30c69f5fd09d1e 100644
--- a/llvm/docs/ReleaseNotes.rst
+++ b/llvm/docs/ReleaseNotes.rst
@@ -95,15 +95,45 @@ Changes to LLVM infrastructure
   `RFC  `_
   for more details.
 
+* ``ValueTypes.td`` is made richer to represent attributes for
+  ``MVT``.
+
+* ``Intrinsics.td`` is able to emit definitions of
+  ``TypeSig``. ``IntrinsicEmitter`` doesn't depend on
+  ``MachineValueTypes.h`` anymore.
+
+* ``llvm/CodeGen/MachineValueType.h`` is moved from ``llvm/Support``.
+  It uses values defined in ``ValueTypes.td``.
+
 Changes to building LLVM
 
 
+* ``llvm-min-tblgen`` is internally introduced to build LLVM public
+  headers. Note that ``llvm-tblgen`` depends on `GenVT.inc` that is
+  generated by ``llvm-min-tblgen``. Specify the external
+  ``llvm-tblgen`` for ``LLVM_TABLEGEN`` when you use prebuilt tablegen
+  tools, since ``llvm-tblgen`` is built as the superset of
+  ``llvm-min-tblgen``.
+
 Changes to TableGen
 ---
 
 * Named arguments are supported. Arguments can be specified in the form of
   ``name=value``.
 
+* Each tablegen backend can declare itself as self-contained with
+  ``llvm::TableGen::Emitter`` as the registry. You don't need to
+  append entries and options to ``TableGen.cpp``. For now, It is
+  applied only to ``llvm-tblgen``.
+
+* The new bang operator ``!range(m, n)`` is introduced.
+
+* A list subscript ``list_var[i]`` accepts not only immutable values
+  but also expressions.
+
+* A list slice ``list_foo[list_bar]`` accepts ``list``
+  expressions.
+
 Changes to Optimizations
 
 

___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] Fill 17.x/ReleaseNotes with my works (PR #73461)

2023-11-26 Thread via llvm-branch-commits

github-actions[bot] wrote:

This repository does not accept pull requests. Please follow 
http://llvm.org/docs/Contributing.html#how-to-submit-a-patch for contribution 
to LLVM.

https://github.com/llvm/llvm-project/pull/73461
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] Fill 17.x/ReleaseNotes with my works (PR #73461)

2023-11-26 Thread via llvm-branch-commits

https://github.com/github-actions[bot] closed 
https://github.com/llvm/llvm-project/pull/73461
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] Fill 17.x/ReleaseNotes with my works (PR #73461)

2023-11-26 Thread via llvm-branch-commits

https://github.com/github-actions[bot] locked 
https://github.com/llvm/llvm-project/pull/73461
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] Fill 17.x/ReleaseNotes with my works (PR #73461)

2023-11-26 Thread NAKAMURA Takumi via llvm-branch-commits

chapuni wrote:

Oh, this is 1st time pull request to me.

https://github.com/llvm/llvm-project/pull/73461
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [lldb] d4cddc1 - Revert "[LLDB] Add more helper functions to CompilerType class. (#73467)"

2023-11-26 Thread via llvm-branch-commits

Author: cmtice
Date: 2023-11-26T16:37:50-08:00
New Revision: d4cddc1a596b60c128996c8f96f63af6fb21506a

URL: 
https://github.com/llvm/llvm-project/commit/d4cddc1a596b60c128996c8f96f63af6fb21506a
DIFF: 
https://github.com/llvm/llvm-project/commit/d4cddc1a596b60c128996c8f96f63af6fb21506a.diff

LOG: Revert "[LLDB] Add more helper functions to CompilerType class. (#73467)"

This reverts commit 42d669f82c4db6abd6f39e1d89e4e62872c4e0a8.

Added: 


Modified: 
lldb/include/lldb/Symbol/CompilerType.h
lldb/source/Symbol/CompilerType.cpp

Removed: 




diff  --git a/lldb/include/lldb/Symbol/CompilerType.h 
b/lldb/include/lldb/Symbol/CompilerType.h
index a3331ad3269c01d..0a9533a1ac0efc1 100644
--- a/lldb/include/lldb/Symbol/CompilerType.h
+++ b/lldb/include/lldb/Symbol/CompilerType.h
@@ -112,7 +112,9 @@ class CompilerType {
 
   /// Tests.
   /// \{
-  explicit operator bool() const { return m_type_system.lock() && m_type; }
+  explicit operator bool() const {
+return m_type_system.lock() && m_type;
+  }
 
   bool IsValid() const { return (bool)*this; }
 
@@ -192,54 +194,6 @@ class CompilerType {
   bool IsTypedefType() const;
 
   bool IsVoidType() const;
-
-  bool IsSmartPtrType() const;
-
-  bool IsInteger() const;
-
-  bool IsFloat() const;
-
-  bool IsEnumerationType() const;
-
-  bool IsUnscopedEnumerationType() const;
-
-  bool IsIntegerOrUnscopedEnumerationType() const;
-
-  bool IsSigned() const;
-
-  bool IsNullPtrType() const;
-
-  bool IsBoolean() const;
-
-  bool IsEnumerationIntegerTypeSigned() const;
-
-  bool IsScalarOrUnscopedEnumerationType() const;
-
-  bool IsPromotableIntegerType() const;
-
-  bool IsPointerToVoid() const;
-
-  bool IsRecordType() const;
-
-  bool IsVirtualBase(CompilerType target_base, CompilerType *virtual_base,
- bool carry_virtual = false) const;
-
-  bool IsContextuallyConvertibleToBool() const;
-
-  bool IsBasicType() const;
-
-  std::string TypeDescription();
-
-  bool CompareTypes(CompilerType rhs) const;
-
-  const char *GetTypeTag();
-
-  uint32_t GetNumberOfNonEmptyBaseClasses();
-
-  CompilerType GetTemplateArgumentType(uint32_t idx);
-
-  CompilerType GetSmartPtrPointeeType();
-
   /// \}
 
   /// Type Completion.
@@ -482,8 +436,8 @@ class CompilerType {
  ExecutionContextScope *exe_scope);
 
   /// Dump to stdout.
-  void DumpTypeDescription(
-  lldb::DescriptionLevel level = lldb::eDescriptionLevelFull) const;
+  void DumpTypeDescription(lldb::DescriptionLevel level =
+   lldb::eDescriptionLevelFull) const;
 
   /// Print a description of the type to a stream. The exact implementation
   /// varies, but the expectation is that eDescriptionLevelFull returns a

diff  --git a/lldb/source/Symbol/CompilerType.cpp 
b/lldb/source/Symbol/CompilerType.cpp
index 854d6cab01b508e..78cc8dad94a9c5f 100644
--- a/lldb/source/Symbol/CompilerType.cpp
+++ b/lldb/source/Symbol/CompilerType.cpp
@@ -54,7 +54,7 @@ bool CompilerType::IsArrayType(CompilerType 
*element_type_ptr, uint64_t *size,
   if (IsValid())
 if (auto type_system_sp = GetTypeSystem())
   return type_system_sp->IsArrayType(m_type, element_type_ptr, size,
- is_incomplete);
+  is_incomplete);
 
   if (element_type_ptr)
 element_type_ptr->Clear();
@@ -157,8 +157,7 @@ bool CompilerType::IsBlockPointerType(
 CompilerType *function_pointer_type_ptr) const {
   if (IsValid())
 if (auto type_system_sp = GetTypeSystem())
-  return type_system_sp->IsBlockPointerType(m_type,
-function_pointer_type_ptr);
+  return type_system_sp->IsBlockPointerType(m_type, 
function_pointer_type_ptr);
   return false;
 }
 
@@ -250,7 +249,7 @@ bool CompilerType::IsPossibleDynamicType(CompilerType 
*dynamic_pointee_type,
   if (IsValid())
 if (auto type_system_sp = GetTypeSystem())
   return type_system_sp->IsPossibleDynamicType(m_type, 
dynamic_pointee_type,
-   check_cplusplus, 
check_objc);
+check_cplusplus, check_objc);
   return false;
 }
 
@@ -303,256 +302,6 @@ bool CompilerType::IsBeingDefined() const {
   return false;
 }
 
-bool CompilerType::IsSmartPtrType() const {
-  // These regular expressions cover shared, unique and weak pointers both from
-  // stdlibc++ and libc+++.
-
-  static llvm::Regex k_libcxx_std_unique_ptr_regex(
-  "^std::__[[:alnum:]]+::unique_ptr<.+>(( )?&)?$");
-  static llvm::Regex k_libcxx_std_shared_ptr_regex(
-  "^std::__[[:alnum:]]+::shared_ptr<.+>(( )?&)?$");
-  static llvm::Regex k_libcxx_std_weak_ptr_regex(
-  "^std::__[[:alnum:]]+::weak_ptr<.+>(( )?&)?$");
-  //
-  static llvm::Regex k_libcxx_std_unique_ptr_regex_2(
-  "^std::unique_ptr<.+>(( )?&)?$");
-  static llvm::Regex k_libcxx

[llvm-branch-commits] [llvm] Fill 17.x/ReleaseNotes with my works (PR #73461)

2023-11-26 Thread Matt Arsenault via llvm-branch-commits

arsenm wrote:

> Oh, this is 1st time pull request to me.

For release branches, I think you are still supposed to use 
https://github.com/llvm/llvm-project-release-prs

https://github.com/llvm/llvm-project/pull/73461
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] Fill 17.x/ReleaseNotes with my works (PR #73461)

2023-11-26 Thread NAKAMURA Takumi via llvm-branch-commits

chapuni wrote:

@tru I cannot find instructions for updating the release notes. Where can I see 
them?
Do I need to create an issue, or push changes to llvm/llvm-project-release-prs ?

@arsenm @ornata I'd be happy if you would review my notes here in advance of 
moving this to elsewhere, even if this is closed.

https://github.com/llvm/llvm-project/pull/73461
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] Fill 17.x/ReleaseNotes with my works (PR #73461)

2023-11-26 Thread Tobias Hieta via llvm-branch-commits

tru wrote:

Hi - prepare a branch in your fork and push the notes there on top of 
release/17.x and I can manually cherry-pick it when you are happy with it.

https://github.com/llvm/llvm-project/pull/73461
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] 201faec - Add RV64 constraint to SRLIW (#69416)

2023-11-26 Thread Tobias Hieta via llvm-branch-commits

Author: Shao-Ce SUN
Date: 2023-11-27T08:26:13+01:00
New Revision: 201faeca595e9c3f0e6763fae86952e08f590b6c

URL: 
https://github.com/llvm/llvm-project/commit/201faeca595e9c3f0e6763fae86952e08f590b6c
DIFF: 
https://github.com/llvm/llvm-project/commit/201faeca595e9c3f0e6763fae86952e08f590b6c.diff

LOG: Add RV64 constraint to SRLIW (#69416)

Fixes #69408

(cherry picked from commit f48dab523784252448dbd42e72f0048ee0463368)

Added: 
llvm/test/CodeGen/RISCV/aext.ll

Modified: 
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp

Removed: 




diff  --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp 
b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
index aa20409da4e2bc6..901204043b3cf5a 100644
--- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
@@ -991,12 +991,12 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
 unsigned TrailingOnes = llvm::countr_one(Mask);
 if (ShAmt >= TrailingOnes)
   break;
-// If the mask has 32 trailing ones, use SRLIW.
+// If the mask has 32 trailing ones, use SRLI on RV32 or SRLIW on RV64.
 if (TrailingOnes == 32) {
-  SDNode *SRLIW =
-  CurDAG->getMachineNode(RISCV::SRLIW, DL, VT, N0->getOperand(0),
- CurDAG->getTargetConstant(ShAmt, DL, VT));
-  ReplaceNode(Node, SRLIW);
+  SDNode *SRLI = CurDAG->getMachineNode(
+  Subtarget->is64Bit() ? RISCV::SRLIW : RISCV::SRLI, DL, VT,
+  N0->getOperand(0), CurDAG->getTargetConstant(ShAmt, DL, VT));
+  ReplaceNode(Node, SRLI);
   return;
 }
 

diff  --git a/llvm/test/CodeGen/RISCV/aext.ll b/llvm/test/CodeGen/RISCV/aext.ll
new file mode 100644
index 000..bff654d4bd6c877
--- /dev/null
+++ b/llvm/test/CodeGen/RISCV/aext.ll
@@ -0,0 +1,21 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \
+; RUN:   | FileCheck -check-prefix=RV32I %s
+; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \
+; RUN:   | FileCheck -check-prefix=RV64I %s
+
+define i24 @aext(i32 %0) {
+; RV32I-LABEL: aext:
+; RV32I:   # %bb.0:
+; RV32I-NEXT:srli a0, a0, 8
+; RV32I-NEXT:ret
+;
+; RV64I-LABEL: aext:
+; RV64I:   # %bb.0:
+; RV64I-NEXT:srliw a0, a0, 8
+; RV64I-NEXT:ret
+  %2 = and i32 %0, -256
+  %3 = lshr exact i32 %2, 8
+  %4 = trunc i32 %3 to i24
+  ret i24 %4
+}



___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] e957e6d - [runtimes] Add missing test dependencies to check-all (#72955)

2023-11-26 Thread Tobias Hieta via llvm-branch-commits

Author: Tom Stellard
Date: 2023-11-24T08:42:42+01:00
New Revision: e957e6dcb29d94e4e1678da9829b77009be88926

URL: 
https://github.com/llvm/llvm-project/commit/e957e6dcb29d94e4e1678da9829b77009be88926
DIFF: 
https://github.com/llvm/llvm-project/commit/e957e6dcb29d94e4e1678da9829b77009be88926.diff

LOG: [runtimes] Add missing test dependencies to check-all (#72955)

The test-depends target contained all the dependencies needed to run the
runtimes tests, but it was never added as a dependency of check-all.
This caused some of the tsan tests to fail, since the custom libcxx
build the tests were looking for was never built. Besides the tsan
failures, this fixes all the other test failures I was seeing with:
cmake -G Ninja -B release-build -S llvm \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt"

This is the same configuration the test-release.sh script uses, so I'm
hoping this will also fix all the test failures we've been seeing when
building the releases.

Fixes #58680

(cherry picked from commit 7f215b1380da49dccbf57da3040a40d25ed898f4)

Added: 


Modified: 
llvm/CMakeLists.txt

Removed: 




diff  --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 79de9eb2e3e71be..be0fc6c2ad76cef 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -1215,6 +1215,7 @@ if( LLVM_INCLUDE_TESTS )
   add_custom_target(test-depends
   DEPENDS ${LLVM_ALL_LIT_DEPENDS} ${LLVM_ALL_ADDITIONAL_TEST_DEPENDS})
   set_target_properties(test-depends PROPERTIES FOLDER "Tests")
+  add_dependencies(check-all test-depends)
 endif()
 
 if (LLVM_INCLUDE_DOCS)



___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] f6c231c - [clang-format] Fix crashes in AlignArrayOfStructures (#72520)

2023-11-26 Thread Tobias Hieta via llvm-branch-commits

Author: Owen Pan
Date: 2023-11-27T08:33:03+01:00
New Revision: f6c231c15ec8b148917abd26233d8be09db49693

URL: 
https://github.com/llvm/llvm-project/commit/f6c231c15ec8b148917abd26233d8be09db49693
DIFF: 
https://github.com/llvm/llvm-project/commit/f6c231c15ec8b148917abd26233d8be09db49693.diff

LOG: [clang-format] Fix crashes in AlignArrayOfStructures (#72520)

Fixed #54815.
Fixed #55269.
Fixed #55493.
Fixed #68431.

Added: 


Modified: 
clang/lib/Format/WhitespaceManager.cpp
clang/lib/Format/WhitespaceManager.h
clang/unittests/Format/FormatTest.cpp

Removed: 




diff  --git a/clang/lib/Format/WhitespaceManager.cpp 
b/clang/lib/Format/WhitespaceManager.cpp
index c1016c44a74a70e..ddb55c4d853a6f3 100644
--- a/clang/lib/Format/WhitespaceManager.cpp
+++ b/clang/lib/Format/WhitespaceManager.cpp
@@ -1263,6 +1263,8 @@ void 
WhitespaceManager::alignArrayInitializersRightJustified(
 auto Offset = std::distance(Cells.begin(), CellIter);
 for (const auto *Next = CellIter->NextColumnElement; Next;
  Next = Next->NextColumnElement) {
+  if (RowCount >= CellDescs.CellCounts.size())
+break;
   auto *Start = (Cells.begin() + RowCount * CellDescs.CellCounts[0]);
   auto *End = Start + Offset;
   ThisNetWidth = getNetWidth(Start, End, CellDescs.InitialSpaces);
@@ -1324,7 +1326,7 @@ void 
WhitespaceManager::alignArrayInitializersLeftJustified(
 auto Offset = std::distance(Cells.begin(), CellIter);
 for (const auto *Next = CellIter->NextColumnElement; Next;
  Next = Next->NextColumnElement) {
-  if (RowCount > CellDescs.CellCounts.size())
+  if (RowCount >= CellDescs.CellCounts.size())
 break;
   auto *Start = (Cells.begin() + RowCount * CellDescs.CellCounts[0]);
   auto *End = Start + Offset;

diff  --git a/clang/lib/Format/WhitespaceManager.h 
b/clang/lib/Format/WhitespaceManager.h
index df7e9add1cd446f..69398fe411502f1 100644
--- a/clang/lib/Format/WhitespaceManager.h
+++ b/clang/lib/Format/WhitespaceManager.h
@@ -317,7 +317,7 @@ class WhitespaceManager {
 auto Offset = std::distance(CellStart, CellStop);
 for (const auto *Next = CellStop->NextColumnElement; Next;
  Next = Next->NextColumnElement) {
-  if (RowCount > MaxRowCount)
+  if (RowCount >= MaxRowCount)
 break;
   auto Start = (CellStart + RowCount * CellCount);
   auto End = Start + Offset;

diff  --git a/clang/unittests/Format/FormatTest.cpp 
b/clang/unittests/Format/FormatTest.cpp
index dc867ab13172f1b..072028270da0532 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -20734,6 +20734,11 @@ TEST_F(FormatTest, CatchExceptionReferenceBinding) {
 TEST_F(FormatTest, CatchAlignArrayOfStructuresRightAlignment) {
   auto Style = getLLVMStyle();
   Style.AlignArrayOfStructures = FormatStyle::AIAS_Right;
+  verifyNoCrash("f({\n"
+"table({}, table({{\"\", false}}, {}))\n"
+"});",
+Style);
+
   Style.AlignConsecutiveAssignments.Enabled = true;
   Style.AlignConsecutiveDeclarations.Enabled = true;
   verifyFormat("struct test demo[] = {\n"
@@ -21142,6 +21147,33 @@ TEST_F(FormatTest, 
CatchAlignArrayOfStructuresLeftAlignment) {
  "that really, in any just world, ought to be split over multiple "
  "lines\"},{-1, 93463, \"world\"},{7, 5, \"!!\"},};",
  Style));
+
+  Style.ColumnLimit = 25;
+  verifyNoCrash("Type foo{\n"
+"{\n"
+"1,  // A\n"
+"2,  // B\n"
+"3,  // C\n"
+"},\n"
+"\"hello\",\n"
+"};",
+Style);
+  verifyNoCrash("Type object[X][Y] = {\n"
+"{{val}, {val}, {val}},\n"
+"{{val}, {val}, // some comment\n"
+"   {val}}\n"
+"};",
+Style);
+
+  Style.ColumnLimit = 120;
+  verifyNoCrash(
+  "T v[] {\n"
+  "{ A::aaa, "
+  "A::, 1, 0.0f, "
+  "\""
+  "\" },\n"
+  "};",
+  Style);
 }
 
 TEST_F(FormatTest, UnderstandsPragmas) {



___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] 2f81917 - [JumpThreading] Remove LVI printer flag

2023-11-26 Thread Aiden Grossman via llvm-branch-commits

Author: Aiden Grossman
Date: 2023-11-26T23:35:55-08:00
New Revision: 2f81917739dd7931059bb65311160a44d9404d5a

URL: 
https://github.com/llvm/llvm-project/commit/2f81917739dd7931059bb65311160a44d9404d5a
DIFF: 
https://github.com/llvm/llvm-project/commit/2f81917739dd7931059bb65311160a44d9404d5a.diff

LOG: [JumpThreading] Remove LVI printer flag

This patch removes the -print-lvi-after-jump-threading flag now that we
can print everything in the LVI cache using the print
pass.

Added: 


Modified: 
llvm/lib/Transforms/Scalar/JumpThreading.cpp
llvm/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll

Removed: 




diff  --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp 
b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
index 59a8b8ad494566c..dfc197ec745fa2d 100644
--- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp
+++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -102,11 +102,6 @@ static cl::opt PhiDuplicateThreshold(
 cl::desc("Max PHIs in BB to duplicate for jump threading"), cl::init(76),
 cl::Hidden);
 
-static cl::opt PrintLVIAfterJumpThreading(
-"print-lvi-after-jump-threading",
-cl::desc("Print the LazyValueInfo cache after JumpThreading"), 
cl::init(false),
-cl::Hidden);
-
 static cl::opt ThreadAcrossLoopHeaders(
 "jump-threading-across-loop-headers",
 cl::desc("Allow JumpThreading to thread across loop headers, for testing"),
@@ -257,11 +252,6 @@ PreservedAnalyses JumpThreadingPass::run(Function &F,
   &DT, nullptr, DomTreeUpdater::UpdateStrategy::Lazy),
   std::nullopt, std::nullopt);
 
-  if (PrintLVIAfterJumpThreading) {
-dbgs() << "LVI for function '" << F.getName() << "':\n";
-LVI.printLVI(F, getDomTreeUpdater()->getDomTree(), dbgs());
-  }
-
   if (!Changed)
 return PreservedAnalyses::all();
 

diff  --git a/llvm/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll 
b/llvm/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll
index 418b575a186bb8f..847882febdbb0a5 100644
--- a/llvm/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll
+++ b/llvm/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll
@@ -1,5 +1,4 @@
-; RUN: opt < %s -passes=jump-threading -print-lvi-after-jump-threading 
-disable-output 2>&1 | FileCheck %s
-; RUN: opt < %s -passes=jump-threading -print-lvi-after-jump-threading 
-disable-output 2>&1 | FileCheck %s
+; RUN: opt < %s -passes="jump-threading,print" 
-disable-output 2>&1 | FileCheck %s
 
 ; Testing LVI cache after jump-threading
 



___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits