[clang] [llvm] [mlir] Fix Definition Mismatches (PR #89294)

2024-04-18 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler created 
https://github.com/llvm/llvm-project/pull/89294

Addresses issue #88716

>From fba4b0556340a00c1e059a8abdba5fdd1b0e38ea Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Mon, 25 Mar 2024 13:28:45 -0400
Subject: [PATCH 1/3] [LLVM][LIB] Refactor Redundant Condition

Signed-off-by: Troy-Butler 
---
 llvm/lib/TextAPI/TextStub.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/TextAPI/TextStub.cpp b/llvm/lib/TextAPI/TextStub.cpp
index 0f742523f8207c..d903ba409360d6 100644
--- a/llvm/lib/TextAPI/TextStub.cpp
+++ b/llvm/lib/TextAPI/TextStub.cpp
@@ -276,7 +276,7 @@ namespace yaml {
 template <> struct MappingTraits {
   static void mapping(IO &IO, ExportSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);
@@ -298,7 +298,7 @@ template <> struct MappingTraits {
 template <> struct MappingTraits {
   static void mapping(IO &IO, UndefinedSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);

>From 780151b741f5a992ee253f74f96cefbb2a2df960 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Mon, 25 Mar 2024 13:28:45 -0400
Subject: [PATCH 2/3] [LLVM][TextAPI] Refactor Redundant Condition

Signed-off-by: Troy-Butler 
---
 llvm/lib/TextAPI/TextStub.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/TextAPI/TextStub.cpp b/llvm/lib/TextAPI/TextStub.cpp
index 0f742523f8207c..d903ba409360d6 100644
--- a/llvm/lib/TextAPI/TextStub.cpp
+++ b/llvm/lib/TextAPI/TextStub.cpp
@@ -276,7 +276,7 @@ namespace yaml {
 template <> struct MappingTraits {
   static void mapping(IO &IO, ExportSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);
@@ -298,7 +298,7 @@ template <> struct MappingTraits {
 template <> struct MappingTraits {
   static void mapping(IO &IO, UndefinedSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);

>From 7315c8468ac411f73f1ba9c304aae7d6bdfa2132 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Thu, 18 Apr 2024 15:47:14 -0400
Subject: [PATCH 3/3] Fix Definition Mismatches

Signed-off-by: Troy-Butler 
---
 .../include/clang/StaticAnalyzer/Core/PathSensitive/Store.h | 4 ++--
 llvm/lib/Transforms/InstCombine/InstCombineInternal.h   | 2 +-
 llvm/lib/Transforms/Vectorize/VPlan.h   | 4 ++--
 .../SparseTensor/Transforms/Utils/SparseTensorLevel.h   | 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index fac0c04ae2caab..e60a49f68b7a0d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -227,12 +227,12 @@ class StoreManager {
   ///   information will not be used.
   virtual StoreRef invalidateRegions(Store store,
   ArrayRef Values,
-  const Expr *E, unsigned Count,
+  const Expr *Ex, unsigned Count,
   const LocationContext *LCtx,
   const CallEvent *Call,
   InvalidatedSymbols &IS,
   RegionAndSymbolInvalidationTraits &ITraits,
-  InvalidatedRegions *InvalidatedTopLevel,
+  InvalidatedRegions *TopLevelRegions,
   InvalidatedRegions *Invalidated) = 0;
 
   /// enterStackFrame - Let the StoreManager to do something when execution
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h 
b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index b9ad3a74007929..90293feb9c1b82 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
   Value *foldAndOrOfICmpsOf

[clang] [llvm] [mlir] Fix Definition Mismatches (PR #89294)

2024-04-18 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler updated 
https://github.com/llvm/llvm-project/pull/89294

>From fba4b0556340a00c1e059a8abdba5fdd1b0e38ea Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Mon, 25 Mar 2024 13:28:45 -0400
Subject: [PATCH 1/4] [LLVM][LIB] Refactor Redundant Condition

Signed-off-by: Troy-Butler 
---
 llvm/lib/TextAPI/TextStub.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/TextAPI/TextStub.cpp b/llvm/lib/TextAPI/TextStub.cpp
index 0f742523f8207c..d903ba409360d6 100644
--- a/llvm/lib/TextAPI/TextStub.cpp
+++ b/llvm/lib/TextAPI/TextStub.cpp
@@ -276,7 +276,7 @@ namespace yaml {
 template <> struct MappingTraits {
   static void mapping(IO &IO, ExportSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);
@@ -298,7 +298,7 @@ template <> struct MappingTraits {
 template <> struct MappingTraits {
   static void mapping(IO &IO, UndefinedSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);

>From 780151b741f5a992ee253f74f96cefbb2a2df960 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Mon, 25 Mar 2024 13:28:45 -0400
Subject: [PATCH 2/4] [LLVM][TextAPI] Refactor Redundant Condition

Signed-off-by: Troy-Butler 
---
 llvm/lib/TextAPI/TextStub.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/TextAPI/TextStub.cpp b/llvm/lib/TextAPI/TextStub.cpp
index 0f742523f8207c..d903ba409360d6 100644
--- a/llvm/lib/TextAPI/TextStub.cpp
+++ b/llvm/lib/TextAPI/TextStub.cpp
@@ -276,7 +276,7 @@ namespace yaml {
 template <> struct MappingTraits {
   static void mapping(IO &IO, ExportSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);
@@ -298,7 +298,7 @@ template <> struct MappingTraits {
 template <> struct MappingTraits {
   static void mapping(IO &IO, UndefinedSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);

>From 7315c8468ac411f73f1ba9c304aae7d6bdfa2132 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Thu, 18 Apr 2024 15:47:14 -0400
Subject: [PATCH 3/4] Fix Definition Mismatches

Signed-off-by: Troy-Butler 
---
 .../include/clang/StaticAnalyzer/Core/PathSensitive/Store.h | 4 ++--
 llvm/lib/Transforms/InstCombine/InstCombineInternal.h   | 2 +-
 llvm/lib/Transforms/Vectorize/VPlan.h   | 4 ++--
 .../SparseTensor/Transforms/Utils/SparseTensorLevel.h   | 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index fac0c04ae2caab..e60a49f68b7a0d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -227,12 +227,12 @@ class StoreManager {
   ///   information will not be used.
   virtual StoreRef invalidateRegions(Store store,
   ArrayRef Values,
-  const Expr *E, unsigned Count,
+  const Expr *Ex, unsigned Count,
   const LocationContext *LCtx,
   const CallEvent *Call,
   InvalidatedSymbols &IS,
   RegionAndSymbolInvalidationTraits &ITraits,
-  InvalidatedRegions *InvalidatedTopLevel,
+  InvalidatedRegions *TopLevelRegions,
   InvalidatedRegions *Invalidated) = 0;
 
   /// enterStackFrame - Let the StoreManager to do something when execution
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h 
b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index b9ad3a74007929..90293feb9c1b82 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
   Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LH

[clang] [llvm] [mlir] Fix Definition Mismatches (PR #89294)

2024-04-18 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler updated 
https://github.com/llvm/llvm-project/pull/89294

>From fba4b0556340a00c1e059a8abdba5fdd1b0e38ea Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Mon, 25 Mar 2024 13:28:45 -0400
Subject: [PATCH 1/4] [LLVM][LIB] Refactor Redundant Condition

Signed-off-by: Troy-Butler 
---
 llvm/lib/TextAPI/TextStub.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/TextAPI/TextStub.cpp b/llvm/lib/TextAPI/TextStub.cpp
index 0f742523f8207c..d903ba409360d6 100644
--- a/llvm/lib/TextAPI/TextStub.cpp
+++ b/llvm/lib/TextAPI/TextStub.cpp
@@ -276,7 +276,7 @@ namespace yaml {
 template <> struct MappingTraits {
   static void mapping(IO &IO, ExportSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);
@@ -298,7 +298,7 @@ template <> struct MappingTraits {
 template <> struct MappingTraits {
   static void mapping(IO &IO, UndefinedSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);

>From 780151b741f5a992ee253f74f96cefbb2a2df960 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Mon, 25 Mar 2024 13:28:45 -0400
Subject: [PATCH 2/4] [LLVM][TextAPI] Refactor Redundant Condition

Signed-off-by: Troy-Butler 
---
 llvm/lib/TextAPI/TextStub.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/TextAPI/TextStub.cpp b/llvm/lib/TextAPI/TextStub.cpp
index 0f742523f8207c..d903ba409360d6 100644
--- a/llvm/lib/TextAPI/TextStub.cpp
+++ b/llvm/lib/TextAPI/TextStub.cpp
@@ -276,7 +276,7 @@ namespace yaml {
 template <> struct MappingTraits {
   static void mapping(IO &IO, ExportSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);
@@ -298,7 +298,7 @@ template <> struct MappingTraits {
 template <> struct MappingTraits {
   static void mapping(IO &IO, UndefinedSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);

>From 7315c8468ac411f73f1ba9c304aae7d6bdfa2132 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Thu, 18 Apr 2024 15:47:14 -0400
Subject: [PATCH 3/4] Fix Definition Mismatches

Signed-off-by: Troy-Butler 
---
 .../include/clang/StaticAnalyzer/Core/PathSensitive/Store.h | 4 ++--
 llvm/lib/Transforms/InstCombine/InstCombineInternal.h   | 2 +-
 llvm/lib/Transforms/Vectorize/VPlan.h   | 4 ++--
 .../SparseTensor/Transforms/Utils/SparseTensorLevel.h   | 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index fac0c04ae2caab..e60a49f68b7a0d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -227,12 +227,12 @@ class StoreManager {
   ///   information will not be used.
   virtual StoreRef invalidateRegions(Store store,
   ArrayRef Values,
-  const Expr *E, unsigned Count,
+  const Expr *Ex, unsigned Count,
   const LocationContext *LCtx,
   const CallEvent *Call,
   InvalidatedSymbols &IS,
   RegionAndSymbolInvalidationTraits &ITraits,
-  InvalidatedRegions *InvalidatedTopLevel,
+  InvalidatedRegions *TopLevelRegions,
   InvalidatedRegions *Invalidated) = 0;
 
   /// enterStackFrame - Let the StoreManager to do something when execution
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h 
b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index b9ad3a74007929..90293feb9c1b82 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
   Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LH

[clang] [llvm] [mlir] Fix warning about mismatches between function parameter and call-site args names (PR #89294)

2024-04-19 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler closed 
https://github.com/llvm/llvm-project/pull/89294
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [mlir] Fix warning about mismatches between function parameter and call-site args names (PR #89294)

2024-04-19 Thread Troy Butler via cfe-commits

Troy-Butler wrote:

> > Isn't the warning about a mismatch between declaration and definition, not 
> > call args? The InstCombine change does make the definition and declaration 
> > match.
> > […](#)
> > On Fri, Apr 19, 2024, at 17:07, Mehdi Amini wrote: _**@**_. commented 
> > on this pull request. In 
> > llvm/lib/Transforms/InstCombine/InstCombineInternal.h <[#89294 
> > (comment)](https://github.com/llvm/llvm-project/pull/89294#discussion_r1571996570)>:
> >  > @@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final 
> > Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS, 
> > Instruction *CxtI, bool IsAnd, bool IsLogical = false); - Value 
> > *matchSelectFromAndOr(Value *A, Value _B, Value _C, Value _D, You could fix 
> > the warning by using vastly different names for the function parameters? — 
> > Reply to this email directly, view it on GitHub <[#89294 
> > (comment)](https://github.com/llvm/llvm-project/pull/89294#discussion_r1571996570)>,
> >  or unsubscribe 
> > https://github.com/notifications/unsubscribe-auth/AABUYEAZJZLPIULGGF2GY3TY6DGDPAVCNFSM6ABGN5RRXWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAMJQG44TSNJQGY.
> >  You are receiving this because your review was requested.Message ID: 
> > _**@**_.___>
> 
> Sorry for my misreading. Would be better to add a header comment for the 
> declaration of `matchSelectFromAndOr`.



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


[clang] [llvm] [mlir] Fix warning about mismatches between function parameter and call-site args names (PR #89294)

2024-04-19 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler reopened 
https://github.com/llvm/llvm-project/pull/89294
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [mlir] Fix warning about mismatches between function parameter and call-site args names (PR #89294)

2024-04-19 Thread Troy Butler via cfe-commits

Troy-Butler wrote:

> > Isn't the warning about a mismatch between declaration and definition, not 
> > call args? The InstCombine change does make the definition and declaration 
> > match.
> > […](#)
> > On Fri, Apr 19, 2024, at 17:07, Mehdi Amini wrote: _**@**_. commented 
> > on this pull request. In 
> > llvm/lib/Transforms/InstCombine/InstCombineInternal.h <[#89294 
> > (comment)](https://github.com/llvm/llvm-project/pull/89294#discussion_r1571996570)>:
> >  > @@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final 
> > Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS, 
> > Instruction *CxtI, bool IsAnd, bool IsLogical = false); - Value 
> > *matchSelectFromAndOr(Value *A, Value _B, Value _C, Value _D, You could fix 
> > the warning by using vastly different names for the function parameters? — 
> > Reply to this email directly, view it on GitHub <[#89294 
> > (comment)](https://github.com/llvm/llvm-project/pull/89294#discussion_r1571996570)>,
> >  or unsubscribe 
> > https://github.com/notifications/unsubscribe-auth/AABUYEAZJZLPIULGGF2GY3TY6DGDPAVCNFSM6ABGN5RRXWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAMJQG44TSNJQGY.
> >  You are receiving this because your review was requested.Message ID: 
> > _**@**_.___>
> 
> Sorry for my misreading. Would be better to add a header comment for the 
> declaration of `matchSelectFromAndOr`.

What do I need to change?

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


[clang] [lldb] [llvm] [mlir] [lldb][Core] Remove pointless condition (PR #89480)

2024-04-19 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler created 
https://github.com/llvm/llvm-project/pull/89480

Addresses issue #85984

>From fba4b0556340a00c1e059a8abdba5fdd1b0e38ea Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Mon, 25 Mar 2024 13:28:45 -0400
Subject: [PATCH 1/4] [LLVM][LIB] Refactor Redundant Condition

Signed-off-by: Troy-Butler 
---
 llvm/lib/TextAPI/TextStub.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/TextAPI/TextStub.cpp b/llvm/lib/TextAPI/TextStub.cpp
index 0f742523f8207c..d903ba409360d6 100644
--- a/llvm/lib/TextAPI/TextStub.cpp
+++ b/llvm/lib/TextAPI/TextStub.cpp
@@ -276,7 +276,7 @@ namespace yaml {
 template <> struct MappingTraits {
   static void mapping(IO &IO, ExportSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);
@@ -298,7 +298,7 @@ template <> struct MappingTraits {
 template <> struct MappingTraits {
   static void mapping(IO &IO, UndefinedSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);

>From 780151b741f5a992ee253f74f96cefbb2a2df960 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Mon, 25 Mar 2024 13:28:45 -0400
Subject: [PATCH 2/4] [LLVM][TextAPI] Refactor Redundant Condition

Signed-off-by: Troy-Butler 
---
 llvm/lib/TextAPI/TextStub.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/TextAPI/TextStub.cpp b/llvm/lib/TextAPI/TextStub.cpp
index 0f742523f8207c..d903ba409360d6 100644
--- a/llvm/lib/TextAPI/TextStub.cpp
+++ b/llvm/lib/TextAPI/TextStub.cpp
@@ -276,7 +276,7 @@ namespace yaml {
 template <> struct MappingTraits {
   static void mapping(IO &IO, ExportSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);
@@ -298,7 +298,7 @@ template <> struct MappingTraits {
 template <> struct MappingTraits {
   static void mapping(IO &IO, UndefinedSection &Section) {
 const auto *Ctx = reinterpret_cast(IO.getContext());
-assert((!Ctx || (Ctx && Ctx->FileKind != FileType::Invalid)) &&
+assert((!Ctx || Ctx->FileKind != FileType::Invalid) &&
"File type is not set in YAML context");
 
 IO.mapRequired("archs", Section.Architectures);

>From 7315c8468ac411f73f1ba9c304aae7d6bdfa2132 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Thu, 18 Apr 2024 15:47:14 -0400
Subject: [PATCH 3/4] Fix Definition Mismatches

Signed-off-by: Troy-Butler 
---
 .../include/clang/StaticAnalyzer/Core/PathSensitive/Store.h | 4 ++--
 llvm/lib/Transforms/InstCombine/InstCombineInternal.h   | 2 +-
 llvm/lib/Transforms/Vectorize/VPlan.h   | 4 ++--
 .../SparseTensor/Transforms/Utils/SparseTensorLevel.h   | 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index fac0c04ae2caab..e60a49f68b7a0d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -227,12 +227,12 @@ class StoreManager {
   ///   information will not be used.
   virtual StoreRef invalidateRegions(Store store,
   ArrayRef Values,
-  const Expr *E, unsigned Count,
+  const Expr *Ex, unsigned Count,
   const LocationContext *LCtx,
   const CallEvent *Call,
   InvalidatedSymbols &IS,
   RegionAndSymbolInvalidationTraits &ITraits,
-  InvalidatedRegions *InvalidatedTopLevel,
+  InvalidatedRegions *TopLevelRegions,
   InvalidatedRegions *Invalidated) = 0;
 
   /// enterStackFrame - Let the StoreManager to do something when execution
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h 
b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index b9ad3a74007929..90293feb9c1b82 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
   Value *foldAndOrOfICmpsOf

[clang] [lldb] [llvm] [mlir] [lldb][Core] Remove pointless condition (PR #89480)

2024-04-19 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler closed 
https://github.com/llvm/llvm-project/pull/89480
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [lldb] [llvm] [mlir] [lldb][Core] Remove pointless condition (PR #89480)

2024-04-19 Thread Troy Butler via cfe-commits

Troy-Butler wrote:

I apologize - I'm not sure how this happened. I was careful to refresh my 
fork/clone before starting on this issue, but somehow not all of the files were 
updated, and now my PR requests are getting wires crossed. I think it would be 
safest for me to close this issue, delete my existing fork/clone, and start 
fresh.

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


[clang] [llvm] [mlir] Fix warning about mismatches between function parameter and call-site args names (PR #89294)

2024-04-19 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler closed 
https://github.com/llvm/llvm-project/pull/89294
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [mlir] Fix warning about mismatches between function parameter and call-site args names (PR #89294)

2024-04-19 Thread Troy Butler via cfe-commits

Troy-Butler wrote:

I'm not sure of how it happened, but despite fetching the latest version of 
files, my clone/fork didn't fully update before I made this pull request, and 
it's causing issues that I'm not experienced enough to resolve. To be safe, I'm 
going to close this pull request, erase my fork/clone, and start again. I 
apologize.

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


[clang] [llvm] [mlir] Fix warning about mismatches between function parameter and call-site args names (PR #89294)

2024-04-20 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler edited 
https://github.com/llvm/llvm-project/pull/89294
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-20 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler created 
https://github.com/llvm/llvm-project/pull/89512

Addresses issue #88716.

>From f03466fa44a3c7210e7590e6305bc0c9f9aeb446 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Sat, 20 Apr 2024 15:13:09 -0400
Subject: [PATCH] Fix Definition-Declaration Mismatches

Signed-off-by: Troy-Butler 
---
 .../include/clang/StaticAnalyzer/Core/PathSensitive/Store.h | 4 ++--
 llvm/lib/Transforms/InstCombine/InstCombineInternal.h   | 2 +-
 llvm/lib/Transforms/Vectorize/VPlan.h   | 4 ++--
 .../SparseTensor/Transforms/Utils/SparseTensorIterator.h| 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index fac0c04ae2caab..e60a49f68b7a0d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -227,12 +227,12 @@ class StoreManager {
   ///   information will not be used.
   virtual StoreRef invalidateRegions(Store store,
   ArrayRef Values,
-  const Expr *E, unsigned Count,
+  const Expr *Ex, unsigned Count,
   const LocationContext *LCtx,
   const CallEvent *Call,
   InvalidatedSymbols &IS,
   RegionAndSymbolInvalidationTraits &ITraits,
-  InvalidatedRegions *InvalidatedTopLevel,
+  InvalidatedRegions *TopLevelRegions,
   InvalidatedRegions *Invalidated) = 0;
 
   /// enterStackFrame - Let the StoreManager to do something when execution
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h 
b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index 4479afbd09afde..4ec5f417998273 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
   Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS,
Instruction *CxtI, bool IsAnd,
bool IsLogical = false);
-  Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D,
+  Value *matchSelectFromAndOr(Value *A, Value *C, Value *B, Value *D,
   bool InvertFalseVal = false);
   Value *getSelectCondition(Value *A, Value *B, bool ABIsTheSame);
 
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h 
b/llvm/lib/Transforms/Vectorize/VPlan.h
index c74329a0bcc4ac..21b088cd238660 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -3278,8 +3278,8 @@ class VPlan {
 private:
   /// Add to the given dominator tree the header block and every new basic 
block
   /// that was created between it and the latch block, inclusive.
-  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopLatchBB,
-  BasicBlock *LoopPreHeaderBB,
+  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB,
+  BasicBlock *LoopLatchBB,
   BasicBlock *LoopExitBB);
 };
 
diff --git 
a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h 
b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
index 9d69a233555986..38f8c8423fd16f 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
@@ -284,9 +284,9 @@ class SparseIterator {
 };
 
 /// Helper function to create a TensorLevel object from given `tensor`.
-std::unique_ptr makeSparseTensorLevel(OpBuilder &builder,
- Location loc, Value t,
- unsigned tid, Level 
l);
+std::unique_ptr makeSparseTensorLevel(OpBuilder &b,
+ Location l, Value t,
+ unsigned tid, Level 
lvl);
 
 /// Helper function to create a simple SparseIterator object that iterate over
 /// the SparseTensorLevel.

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


[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-20 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler updated 
https://github.com/llvm/llvm-project/pull/89512

>From f03466fa44a3c7210e7590e6305bc0c9f9aeb446 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Sat, 20 Apr 2024 15:13:09 -0400
Subject: [PATCH 1/2] Fix Definition-Declaration Mismatches

Signed-off-by: Troy-Butler 
---
 .../include/clang/StaticAnalyzer/Core/PathSensitive/Store.h | 4 ++--
 llvm/lib/Transforms/InstCombine/InstCombineInternal.h   | 2 +-
 llvm/lib/Transforms/Vectorize/VPlan.h   | 4 ++--
 .../SparseTensor/Transforms/Utils/SparseTensorIterator.h| 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index fac0c04ae2caab..e60a49f68b7a0d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -227,12 +227,12 @@ class StoreManager {
   ///   information will not be used.
   virtual StoreRef invalidateRegions(Store store,
   ArrayRef Values,
-  const Expr *E, unsigned Count,
+  const Expr *Ex, unsigned Count,
   const LocationContext *LCtx,
   const CallEvent *Call,
   InvalidatedSymbols &IS,
   RegionAndSymbolInvalidationTraits &ITraits,
-  InvalidatedRegions *InvalidatedTopLevel,
+  InvalidatedRegions *TopLevelRegions,
   InvalidatedRegions *Invalidated) = 0;
 
   /// enterStackFrame - Let the StoreManager to do something when execution
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h 
b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index 4479afbd09afde..4ec5f417998273 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
   Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS,
Instruction *CxtI, bool IsAnd,
bool IsLogical = false);
-  Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D,
+  Value *matchSelectFromAndOr(Value *A, Value *C, Value *B, Value *D,
   bool InvertFalseVal = false);
   Value *getSelectCondition(Value *A, Value *B, bool ABIsTheSame);
 
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h 
b/llvm/lib/Transforms/Vectorize/VPlan.h
index c74329a0bcc4ac..21b088cd238660 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -3278,8 +3278,8 @@ class VPlan {
 private:
   /// Add to the given dominator tree the header block and every new basic 
block
   /// that was created between it and the latch block, inclusive.
-  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopLatchBB,
-  BasicBlock *LoopPreHeaderBB,
+  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB,
+  BasicBlock *LoopLatchBB,
   BasicBlock *LoopExitBB);
 };
 
diff --git 
a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h 
b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
index 9d69a233555986..38f8c8423fd16f 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
@@ -284,9 +284,9 @@ class SparseIterator {
 };
 
 /// Helper function to create a TensorLevel object from given `tensor`.
-std::unique_ptr makeSparseTensorLevel(OpBuilder &builder,
- Location loc, Value t,
- unsigned tid, Level 
l);
+std::unique_ptr makeSparseTensorLevel(OpBuilder &b,
+ Location l, Value t,
+ unsigned tid, Level 
lvl);
 
 /// Helper function to create a simple SparseIterator object that iterate over
 /// the SparseTensorLevel.

>From 4fe63ddecc056bc521d439952fb2b7fc5d83d9b6 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Sat, 20 Apr 2024 15:33:43 -0400
Subject: [PATCH 2/2] Fix Code Formatting Issues

Signed-off-by: Troy-Butler 
---
 .../StaticAnalyzer/Core/PathSensitive/Store.h  | 14 +-
 .../Transforms/Utils/SparseTensorIterator.h|  3 ++-
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensiti

[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-20 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler updated 
https://github.com/llvm/llvm-project/pull/89512

>From f03466fa44a3c7210e7590e6305bc0c9f9aeb446 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Sat, 20 Apr 2024 15:13:09 -0400
Subject: [PATCH 1/3] Fix Definition-Declaration Mismatches

Signed-off-by: Troy-Butler 
---
 .../include/clang/StaticAnalyzer/Core/PathSensitive/Store.h | 4 ++--
 llvm/lib/Transforms/InstCombine/InstCombineInternal.h   | 2 +-
 llvm/lib/Transforms/Vectorize/VPlan.h   | 4 ++--
 .../SparseTensor/Transforms/Utils/SparseTensorIterator.h| 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index fac0c04ae2caab..e60a49f68b7a0d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -227,12 +227,12 @@ class StoreManager {
   ///   information will not be used.
   virtual StoreRef invalidateRegions(Store store,
   ArrayRef Values,
-  const Expr *E, unsigned Count,
+  const Expr *Ex, unsigned Count,
   const LocationContext *LCtx,
   const CallEvent *Call,
   InvalidatedSymbols &IS,
   RegionAndSymbolInvalidationTraits &ITraits,
-  InvalidatedRegions *InvalidatedTopLevel,
+  InvalidatedRegions *TopLevelRegions,
   InvalidatedRegions *Invalidated) = 0;
 
   /// enterStackFrame - Let the StoreManager to do something when execution
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h 
b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index 4479afbd09afde..4ec5f417998273 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
   Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS,
Instruction *CxtI, bool IsAnd,
bool IsLogical = false);
-  Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D,
+  Value *matchSelectFromAndOr(Value *A, Value *C, Value *B, Value *D,
   bool InvertFalseVal = false);
   Value *getSelectCondition(Value *A, Value *B, bool ABIsTheSame);
 
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h 
b/llvm/lib/Transforms/Vectorize/VPlan.h
index c74329a0bcc4ac..21b088cd238660 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -3278,8 +3278,8 @@ class VPlan {
 private:
   /// Add to the given dominator tree the header block and every new basic 
block
   /// that was created between it and the latch block, inclusive.
-  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopLatchBB,
-  BasicBlock *LoopPreHeaderBB,
+  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB,
+  BasicBlock *LoopLatchBB,
   BasicBlock *LoopExitBB);
 };
 
diff --git 
a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h 
b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
index 9d69a233555986..38f8c8423fd16f 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
@@ -284,9 +284,9 @@ class SparseIterator {
 };
 
 /// Helper function to create a TensorLevel object from given `tensor`.
-std::unique_ptr makeSparseTensorLevel(OpBuilder &builder,
- Location loc, Value t,
- unsigned tid, Level 
l);
+std::unique_ptr makeSparseTensorLevel(OpBuilder &b,
+ Location l, Value t,
+ unsigned tid, Level 
lvl);
 
 /// Helper function to create a simple SparseIterator object that iterate over
 /// the SparseTensorLevel.

>From 4fe63ddecc056bc521d439952fb2b7fc5d83d9b6 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Sat, 20 Apr 2024 15:33:43 -0400
Subject: [PATCH 2/3] Fix Code Formatting Issues

Signed-off-by: Troy-Butler 
---
 .../StaticAnalyzer/Core/PathSensitive/Store.h  | 14 +-
 .../Transforms/Utils/SparseTensorIterator.h|  3 ++-
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensiti

[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-22 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler edited 
https://github.com/llvm/llvm-project/pull/89512
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-23 Thread Troy Butler via cfe-commits

Troy-Butler wrote:

I do not have the ability to merge, so if everything looks good with my pull 
request, can the last reviewer please merge this? Thank you!

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


[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-23 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler updated 
https://github.com/llvm/llvm-project/pull/89512

>From f03466fa44a3c7210e7590e6305bc0c9f9aeb446 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Sat, 20 Apr 2024 15:13:09 -0400
Subject: [PATCH 1/4] Fix Definition-Declaration Mismatches

Signed-off-by: Troy-Butler 
---
 .../include/clang/StaticAnalyzer/Core/PathSensitive/Store.h | 4 ++--
 llvm/lib/Transforms/InstCombine/InstCombineInternal.h   | 2 +-
 llvm/lib/Transforms/Vectorize/VPlan.h   | 4 ++--
 .../SparseTensor/Transforms/Utils/SparseTensorIterator.h| 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index fac0c04ae2caab..e60a49f68b7a0d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -227,12 +227,12 @@ class StoreManager {
   ///   information will not be used.
   virtual StoreRef invalidateRegions(Store store,
   ArrayRef Values,
-  const Expr *E, unsigned Count,
+  const Expr *Ex, unsigned Count,
   const LocationContext *LCtx,
   const CallEvent *Call,
   InvalidatedSymbols &IS,
   RegionAndSymbolInvalidationTraits &ITraits,
-  InvalidatedRegions *InvalidatedTopLevel,
+  InvalidatedRegions *TopLevelRegions,
   InvalidatedRegions *Invalidated) = 0;
 
   /// enterStackFrame - Let the StoreManager to do something when execution
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h 
b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index 4479afbd09afde..4ec5f417998273 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
   Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS,
Instruction *CxtI, bool IsAnd,
bool IsLogical = false);
-  Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D,
+  Value *matchSelectFromAndOr(Value *A, Value *C, Value *B, Value *D,
   bool InvertFalseVal = false);
   Value *getSelectCondition(Value *A, Value *B, bool ABIsTheSame);
 
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h 
b/llvm/lib/Transforms/Vectorize/VPlan.h
index c74329a0bcc4ac..21b088cd238660 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -3278,8 +3278,8 @@ class VPlan {
 private:
   /// Add to the given dominator tree the header block and every new basic 
block
   /// that was created between it and the latch block, inclusive.
-  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopLatchBB,
-  BasicBlock *LoopPreHeaderBB,
+  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB,
+  BasicBlock *LoopLatchBB,
   BasicBlock *LoopExitBB);
 };
 
diff --git 
a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h 
b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
index 9d69a233555986..38f8c8423fd16f 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
@@ -284,9 +284,9 @@ class SparseIterator {
 };
 
 /// Helper function to create a TensorLevel object from given `tensor`.
-std::unique_ptr makeSparseTensorLevel(OpBuilder &builder,
- Location loc, Value t,
- unsigned tid, Level 
l);
+std::unique_ptr makeSparseTensorLevel(OpBuilder &b,
+ Location l, Value t,
+ unsigned tid, Level 
lvl);
 
 /// Helper function to create a simple SparseIterator object that iterate over
 /// the SparseTensorLevel.

>From 4fe63ddecc056bc521d439952fb2b7fc5d83d9b6 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Sat, 20 Apr 2024 15:33:43 -0400
Subject: [PATCH 2/4] Fix Code Formatting Issues

Signed-off-by: Troy-Butler 
---
 .../StaticAnalyzer/Core/PathSensitive/Store.h  | 14 +-
 .../Transforms/Utils/SparseTensorIterator.h|  3 ++-
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensiti

[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-23 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler updated 
https://github.com/llvm/llvm-project/pull/89512

>From f03466fa44a3c7210e7590e6305bc0c9f9aeb446 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Sat, 20 Apr 2024 15:13:09 -0400
Subject: [PATCH 1/5] Fix Definition-Declaration Mismatches

Signed-off-by: Troy-Butler 
---
 .../include/clang/StaticAnalyzer/Core/PathSensitive/Store.h | 4 ++--
 llvm/lib/Transforms/InstCombine/InstCombineInternal.h   | 2 +-
 llvm/lib/Transforms/Vectorize/VPlan.h   | 4 ++--
 .../SparseTensor/Transforms/Utils/SparseTensorIterator.h| 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index fac0c04ae2caab..e60a49f68b7a0d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -227,12 +227,12 @@ class StoreManager {
   ///   information will not be used.
   virtual StoreRef invalidateRegions(Store store,
   ArrayRef Values,
-  const Expr *E, unsigned Count,
+  const Expr *Ex, unsigned Count,
   const LocationContext *LCtx,
   const CallEvent *Call,
   InvalidatedSymbols &IS,
   RegionAndSymbolInvalidationTraits &ITraits,
-  InvalidatedRegions *InvalidatedTopLevel,
+  InvalidatedRegions *TopLevelRegions,
   InvalidatedRegions *Invalidated) = 0;
 
   /// enterStackFrame - Let the StoreManager to do something when execution
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h 
b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index 4479afbd09afde..4ec5f417998273 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
   Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS,
Instruction *CxtI, bool IsAnd,
bool IsLogical = false);
-  Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D,
+  Value *matchSelectFromAndOr(Value *A, Value *C, Value *B, Value *D,
   bool InvertFalseVal = false);
   Value *getSelectCondition(Value *A, Value *B, bool ABIsTheSame);
 
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h 
b/llvm/lib/Transforms/Vectorize/VPlan.h
index c74329a0bcc4ac..21b088cd238660 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -3278,8 +3278,8 @@ class VPlan {
 private:
   /// Add to the given dominator tree the header block and every new basic 
block
   /// that was created between it and the latch block, inclusive.
-  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopLatchBB,
-  BasicBlock *LoopPreHeaderBB,
+  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB,
+  BasicBlock *LoopLatchBB,
   BasicBlock *LoopExitBB);
 };
 
diff --git 
a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h 
b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
index 9d69a233555986..38f8c8423fd16f 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
@@ -284,9 +284,9 @@ class SparseIterator {
 };
 
 /// Helper function to create a TensorLevel object from given `tensor`.
-std::unique_ptr makeSparseTensorLevel(OpBuilder &builder,
- Location loc, Value t,
- unsigned tid, Level 
l);
+std::unique_ptr makeSparseTensorLevel(OpBuilder &b,
+ Location l, Value t,
+ unsigned tid, Level 
lvl);
 
 /// Helper function to create a simple SparseIterator object that iterate over
 /// the SparseTensorLevel.

>From 4fe63ddecc056bc521d439952fb2b7fc5d83d9b6 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Sat, 20 Apr 2024 15:33:43 -0400
Subject: [PATCH 2/5] Fix Code Formatting Issues

Signed-off-by: Troy-Butler 
---
 .../StaticAnalyzer/Core/PathSensitive/Store.h  | 14 +-
 .../Transforms/Utils/SparseTensorIterator.h|  3 ++-
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensiti

[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-23 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler updated 
https://github.com/llvm/llvm-project/pull/89512

>From f03466fa44a3c7210e7590e6305bc0c9f9aeb446 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Sat, 20 Apr 2024 15:13:09 -0400
Subject: [PATCH 1/6] Fix Definition-Declaration Mismatches

Signed-off-by: Troy-Butler 
---
 .../include/clang/StaticAnalyzer/Core/PathSensitive/Store.h | 4 ++--
 llvm/lib/Transforms/InstCombine/InstCombineInternal.h   | 2 +-
 llvm/lib/Transforms/Vectorize/VPlan.h   | 4 ++--
 .../SparseTensor/Transforms/Utils/SparseTensorIterator.h| 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index fac0c04ae2caab..e60a49f68b7a0d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -227,12 +227,12 @@ class StoreManager {
   ///   information will not be used.
   virtual StoreRef invalidateRegions(Store store,
   ArrayRef Values,
-  const Expr *E, unsigned Count,
+  const Expr *Ex, unsigned Count,
   const LocationContext *LCtx,
   const CallEvent *Call,
   InvalidatedSymbols &IS,
   RegionAndSymbolInvalidationTraits &ITraits,
-  InvalidatedRegions *InvalidatedTopLevel,
+  InvalidatedRegions *TopLevelRegions,
   InvalidatedRegions *Invalidated) = 0;
 
   /// enterStackFrame - Let the StoreManager to do something when execution
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h 
b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index 4479afbd09afde..4ec5f417998273 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
   Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS,
Instruction *CxtI, bool IsAnd,
bool IsLogical = false);
-  Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D,
+  Value *matchSelectFromAndOr(Value *A, Value *C, Value *B, Value *D,
   bool InvertFalseVal = false);
   Value *getSelectCondition(Value *A, Value *B, bool ABIsTheSame);
 
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h 
b/llvm/lib/Transforms/Vectorize/VPlan.h
index c74329a0bcc4ac..21b088cd238660 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -3278,8 +3278,8 @@ class VPlan {
 private:
   /// Add to the given dominator tree the header block and every new basic 
block
   /// that was created between it and the latch block, inclusive.
-  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopLatchBB,
-  BasicBlock *LoopPreHeaderBB,
+  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB,
+  BasicBlock *LoopLatchBB,
   BasicBlock *LoopExitBB);
 };
 
diff --git 
a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h 
b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
index 9d69a233555986..38f8c8423fd16f 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
@@ -284,9 +284,9 @@ class SparseIterator {
 };
 
 /// Helper function to create a TensorLevel object from given `tensor`.
-std::unique_ptr makeSparseTensorLevel(OpBuilder &builder,
- Location loc, Value t,
- unsigned tid, Level 
l);
+std::unique_ptr makeSparseTensorLevel(OpBuilder &b,
+ Location l, Value t,
+ unsigned tid, Level 
lvl);
 
 /// Helper function to create a simple SparseIterator object that iterate over
 /// the SparseTensorLevel.

>From 4fe63ddecc056bc521d439952fb2b7fc5d83d9b6 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Sat, 20 Apr 2024 15:33:43 -0400
Subject: [PATCH 2/6] Fix Code Formatting Issues

Signed-off-by: Troy-Butler 
---
 .../StaticAnalyzer/Core/PathSensitive/Store.h  | 14 +-
 .../Transforms/Utils/SparseTensorIterator.h|  3 ++-
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensiti

[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-23 Thread Troy Butler via cfe-commits


@@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
   Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS,
Instruction *CxtI, bool IsAnd,
bool IsLogical = false);
-  Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D,
+  Value *matchSelectFromAndOr(Value *A, Value *C, Value *B, Value *D,

Troy-Butler wrote:

The pre-commit version of the function declaration listed the parameters in the 
order A, C, B, D to indicate the expected grouping of arguments, i.e. (A & C) | 
(B & D). Changing the order to A, B, C, D would have required reworking the 
function, which seemed outside the scope of this issue - so I opted to reflect 
the A, C, B, D order in the function declaration instead. However, as 
requested, I have modified the parameter names, listed them in logically 
ascending order, and reworked the function to match.

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


[clang] [clang][Lex] Reformat suspicious condition (PR #89923)

2024-04-24 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler created 
https://github.com/llvm/llvm-project/pull/89923

Addresses issue #89805.

Assignment + comparison performed in conditional statement. Resolved by 
parenthesizing comparison operation.

>From cde48906d4b9a08dc436ab94f183c124ee336e5a Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Wed, 24 Apr 2024 09:23:29 -0400
Subject: [PATCH] [clang][Lex] Reformat suspicious condition

Signed-off-by: Troy-Butler 
---
 clang/lib/Lex/Pragma.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp
index 499813f8ab7df0..ced407355e0015 100644
--- a/clang/lib/Lex/Pragma.cpp
+++ b/clang/lib/Lex/Pragma.cpp
@@ -1444,7 +1444,7 @@ struct PragmaWarningHandler : public PragmaHandler {
  .Case("once", PPCallbacks::PWS_Once)
  .Case("suppress", PPCallbacks::PWS_Suppress)
  .Default(-1);
-  if ((SpecifierValid = SpecifierInt != -1))
+  if (SpecifierValid = (SpecifierInt != -1))
 Specifier =
 static_cast(SpecifierInt);
 

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


[clang] [clang][NFC] Reformat suspicious condition (PR #89923)

2024-04-24 Thread Troy Butler via cfe-commits

Troy-Butler wrote:

> Thanks for your contribution. Will you need me to merge that for you?

Yes please! I don't have merging rights. Thank you!

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


[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-24 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler updated 
https://github.com/llvm/llvm-project/pull/89512

>From f03466fa44a3c7210e7590e6305bc0c9f9aeb446 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Sat, 20 Apr 2024 15:13:09 -0400
Subject: [PATCH 1/7] Fix Definition-Declaration Mismatches

Signed-off-by: Troy-Butler 
---
 .../include/clang/StaticAnalyzer/Core/PathSensitive/Store.h | 4 ++--
 llvm/lib/Transforms/InstCombine/InstCombineInternal.h   | 2 +-
 llvm/lib/Transforms/Vectorize/VPlan.h   | 4 ++--
 .../SparseTensor/Transforms/Utils/SparseTensorIterator.h| 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index fac0c04ae2caab..e60a49f68b7a0d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -227,12 +227,12 @@ class StoreManager {
   ///   information will not be used.
   virtual StoreRef invalidateRegions(Store store,
   ArrayRef Values,
-  const Expr *E, unsigned Count,
+  const Expr *Ex, unsigned Count,
   const LocationContext *LCtx,
   const CallEvent *Call,
   InvalidatedSymbols &IS,
   RegionAndSymbolInvalidationTraits &ITraits,
-  InvalidatedRegions *InvalidatedTopLevel,
+  InvalidatedRegions *TopLevelRegions,
   InvalidatedRegions *Invalidated) = 0;
 
   /// enterStackFrame - Let the StoreManager to do something when execution
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h 
b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index 4479afbd09afde..4ec5f417998273 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
   Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS,
Instruction *CxtI, bool IsAnd,
bool IsLogical = false);
-  Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D,
+  Value *matchSelectFromAndOr(Value *A, Value *C, Value *B, Value *D,
   bool InvertFalseVal = false);
   Value *getSelectCondition(Value *A, Value *B, bool ABIsTheSame);
 
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h 
b/llvm/lib/Transforms/Vectorize/VPlan.h
index c74329a0bcc4ac..21b088cd238660 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -3278,8 +3278,8 @@ class VPlan {
 private:
   /// Add to the given dominator tree the header block and every new basic 
block
   /// that was created between it and the latch block, inclusive.
-  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopLatchBB,
-  BasicBlock *LoopPreHeaderBB,
+  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB,
+  BasicBlock *LoopLatchBB,
   BasicBlock *LoopExitBB);
 };
 
diff --git 
a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h 
b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
index 9d69a233555986..38f8c8423fd16f 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
@@ -284,9 +284,9 @@ class SparseIterator {
 };
 
 /// Helper function to create a TensorLevel object from given `tensor`.
-std::unique_ptr makeSparseTensorLevel(OpBuilder &builder,
- Location loc, Value t,
- unsigned tid, Level 
l);
+std::unique_ptr makeSparseTensorLevel(OpBuilder &b,
+ Location l, Value t,
+ unsigned tid, Level 
lvl);
 
 /// Helper function to create a simple SparseIterator object that iterate over
 /// the SparseTensorLevel.

>From 4fe63ddecc056bc521d439952fb2b7fc5d83d9b6 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Sat, 20 Apr 2024 15:33:43 -0400
Subject: [PATCH 2/7] Fix Code Formatting Issues

Signed-off-by: Troy-Butler 
---
 .../StaticAnalyzer/Core/PathSensitive/Store.h  | 14 +-
 .../Transforms/Utils/SparseTensorIterator.h|  3 ++-
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensiti

[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-24 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler updated 
https://github.com/llvm/llvm-project/pull/89512

>From f03466fa44a3c7210e7590e6305bc0c9f9aeb446 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Sat, 20 Apr 2024 15:13:09 -0400
Subject: [PATCH 1/8] Fix Definition-Declaration Mismatches

Signed-off-by: Troy-Butler 
---
 .../include/clang/StaticAnalyzer/Core/PathSensitive/Store.h | 4 ++--
 llvm/lib/Transforms/InstCombine/InstCombineInternal.h   | 2 +-
 llvm/lib/Transforms/Vectorize/VPlan.h   | 4 ++--
 .../SparseTensor/Transforms/Utils/SparseTensorIterator.h| 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index fac0c04ae2caab..e60a49f68b7a0d 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -227,12 +227,12 @@ class StoreManager {
   ///   information will not be used.
   virtual StoreRef invalidateRegions(Store store,
   ArrayRef Values,
-  const Expr *E, unsigned Count,
+  const Expr *Ex, unsigned Count,
   const LocationContext *LCtx,
   const CallEvent *Call,
   InvalidatedSymbols &IS,
   RegionAndSymbolInvalidationTraits &ITraits,
-  InvalidatedRegions *InvalidatedTopLevel,
+  InvalidatedRegions *TopLevelRegions,
   InvalidatedRegions *Invalidated) = 0;
 
   /// enterStackFrame - Let the StoreManager to do something when execution
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h 
b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index 4479afbd09afde..4ec5f417998273 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -433,7 +433,7 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
   Value *foldAndOrOfICmpsOfAndWithPow2(ICmpInst *LHS, ICmpInst *RHS,
Instruction *CxtI, bool IsAnd,
bool IsLogical = false);
-  Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D,
+  Value *matchSelectFromAndOr(Value *A, Value *C, Value *B, Value *D,
   bool InvertFalseVal = false);
   Value *getSelectCondition(Value *A, Value *B, bool ABIsTheSame);
 
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h 
b/llvm/lib/Transforms/Vectorize/VPlan.h
index c74329a0bcc4ac..21b088cd238660 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -3278,8 +3278,8 @@ class VPlan {
 private:
   /// Add to the given dominator tree the header block and every new basic 
block
   /// that was created between it and the latch block, inclusive.
-  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopLatchBB,
-  BasicBlock *LoopPreHeaderBB,
+  static void updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB,
+  BasicBlock *LoopLatchBB,
   BasicBlock *LoopExitBB);
 };
 
diff --git 
a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h 
b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
index 9d69a233555986..38f8c8423fd16f 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
@@ -284,9 +284,9 @@ class SparseIterator {
 };
 
 /// Helper function to create a TensorLevel object from given `tensor`.
-std::unique_ptr makeSparseTensorLevel(OpBuilder &builder,
- Location loc, Value t,
- unsigned tid, Level 
l);
+std::unique_ptr makeSparseTensorLevel(OpBuilder &b,
+ Location l, Value t,
+ unsigned tid, Level 
lvl);
 
 /// Helper function to create a simple SparseIterator object that iterate over
 /// the SparseTensorLevel.

>From 4fe63ddecc056bc521d439952fb2b7fc5d83d9b6 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Sat, 20 Apr 2024 15:33:43 -0400
Subject: [PATCH 2/8] Fix Code Formatting Issues

Signed-off-by: Troy-Butler 
---
 .../StaticAnalyzer/Core/PathSensitive/Store.h  | 14 +-
 .../Transforms/Utils/SparseTensorIterator.h|  3 ++-
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensiti

[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-24 Thread Troy Butler via cfe-commits

Troy-Butler wrote:

> > The pre-commit version of the function declaration listed the parameters in 
> > the order A, C, B, D to indicate the expected grouping of arguments, i.e. 
> > (A & C) | (B & D). Changing the order to A, B, C, D would have required 
> > reworking the function, which seemed outside the scope of this issue - so I 
> > opted to reflect the A, C, B, D order in the function declaration instead. 
> > However, as requested, I have modified the parameter names, listed them in 
> > logically ascending order, and reworked the function to match.
> 
> Thanks for explaining the situation and updating the code!
> 
> I think declaring the variable names in an alphabetical order will make the 
> code less surprising and easier to read. However, now that I know more about 
> the context where these variables are used, I think returning to the 
> single-letter `A`, `B`, `C` and `D` would be better than the `valA`, `valB`, 
> `valC`, `valD` that you introduced for two reasons:
> 
> * Previously I neglected to look at the definition of this function; now that 
> I see that it's dealing with abstract Boolean predicates, I think that it's a 
> good choice to use the single-letter names that are customary as mathematical 
> notation.
> * There is also a [design 
> rule](https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly)
>  which says that variables need to be capitalized, so the lowercase `val` 
> prefix should not be introduced. (BTW this rule is not absolute: in existing 
> code that uses a different naming convention, it's permissible/preferred to 
> use that convention for the sake of consistency.)
> 
> I know that you probably introduced the `val` prefix because of my complaint 
> about the "meaningless single letter" variable names; please excuse me for 
> these back-and-forth suggestions.

No worries, I understand. I've reverted the parameter variable names back to 
single letter form. 

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


[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-24 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler edited 
https://github.com/llvm/llvm-project/pull/89512
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-25 Thread Troy Butler via cfe-commits

Troy-Butler wrote:

> @Troy-Butler I started to do the merge, but I cancelled it for now because it 
> seems that github mangles the email metadata: 
> ![image](https://private-user-images.githubusercontent.com/43410265/325606235-d783c97f-f5f7-469f-9f77-9689275ea429.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTQwNDk5ODMsIm5iZiI6MTcxNDA0OTY4MywicGF0aCI6Ii80MzQxMDI2NS8zMjU2MDYyMzUtZDc4M2M5N2YtZjVmNy00NjlmLTlmNzctOTY4OTI3NWVhNDI5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA0MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDI1VDEyNTQ0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI4Zjk0YmRlNzhmM2U3YzhkMzdjOTYwMzRlNTkzNzFjNWFjMDY4NzNlNTU4MTQxOTIzMDBjMDNmNjk2NTRhMDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.zJuB-MK7hKiN7DwagaI-3SEWA5q5MoVMJYY88Ss4ckU)
>  (Note that I obscured your email address in this screenshot, but it can be 
> found within the commits that you published.)
> 
> * I'd guess that want to use your "real" email address as the Author of this 
> commit -- that case you probably need to change your github account settings. 
> (I don't know the exact details but IIRC you can toggle whether it will use 
> your email address in your commits.) Ping me when you're ready and I'll check 
> the merge again.
> * If you don't want to embed that email address into the LLVM git history, 
> then I can merge the commit without the `Signed-off-by` and `Co-authored-by` 
> lines that mention it. The address will remain on the internet (in this pull 
> request), but it won't be part of the LLVM main branch.

Thank you for pointing that out. I don't have any issues with that email 
address being embedded in LLVM's git history - you can  go ahead and commit. 
Thanks!

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


[clang] [clang][NFC] Reformat suspicious condition (PR #89923)

2024-04-25 Thread Troy Butler via cfe-commits

Troy-Butler wrote:

I see that the build has failed - what do I need to do to fix this?

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


[clang] [clang][NFC] Reformat suspicious condition (PR #89923)

2024-04-25 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler updated 
https://github.com/llvm/llvm-project/pull/89923

>From cde48906d4b9a08dc436ab94f183c124ee336e5a Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Wed, 24 Apr 2024 09:23:29 -0400
Subject: [PATCH 1/2] [clang][Lex] Reformat suspicious condition

Signed-off-by: Troy-Butler 
---
 clang/lib/Lex/Pragma.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp
index 499813f8ab7df0..ced407355e0015 100644
--- a/clang/lib/Lex/Pragma.cpp
+++ b/clang/lib/Lex/Pragma.cpp
@@ -1444,7 +1444,7 @@ struct PragmaWarningHandler : public PragmaHandler {
  .Case("once", PPCallbacks::PWS_Once)
  .Case("suppress", PPCallbacks::PWS_Suppress)
  .Default(-1);
-  if ((SpecifierValid = SpecifierInt != -1))
+  if (SpecifierValid = (SpecifierInt != -1))
 Specifier =
 static_cast(SpecifierInt);
 

>From db61b6d6e2c5ff75ffcf43874bfed60243e4e671 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Thu, 25 Apr 2024 10:44:08 -0400
Subject: [PATCH 2/2] temporary commit to restart build

Signed-off-by: Troy-Butler 
---
 clang/lib/Lex/Pragma.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp
index ced407355e0015..aaf7823fd2ada3 100644
--- a/clang/lib/Lex/Pragma.cpp
+++ b/clang/lib/Lex/Pragma.cpp
@@ -1444,7 +1444,7 @@ struct PragmaWarningHandler : public PragmaHandler {
  .Case("once", PPCallbacks::PWS_Once)
  .Case("suppress", PPCallbacks::PWS_Suppress)
  .Default(-1);
-  if (SpecifierValid = (SpecifierInt != -1))
+  if (SpecifierValid = (SpecifierInt != -1)) 
 Specifier =
 static_cast(SpecifierInt);
 

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


[clang] [clang][NFC] Reformat suspicious condition (PR #89923)

2024-04-25 Thread Troy Butler via cfe-commits

https://github.com/Troy-Butler updated 
https://github.com/llvm/llvm-project/pull/89923

>From cde48906d4b9a08dc436ab94f183c124ee336e5a Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Wed, 24 Apr 2024 09:23:29 -0400
Subject: [PATCH 1/3] [clang][Lex] Reformat suspicious condition

Signed-off-by: Troy-Butler 
---
 clang/lib/Lex/Pragma.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp
index 499813f8ab7df0..ced407355e0015 100644
--- a/clang/lib/Lex/Pragma.cpp
+++ b/clang/lib/Lex/Pragma.cpp
@@ -1444,7 +1444,7 @@ struct PragmaWarningHandler : public PragmaHandler {
  .Case("once", PPCallbacks::PWS_Once)
  .Case("suppress", PPCallbacks::PWS_Suppress)
  .Default(-1);
-  if ((SpecifierValid = SpecifierInt != -1))
+  if (SpecifierValid = (SpecifierInt != -1))
 Specifier =
 static_cast(SpecifierInt);
 

>From db61b6d6e2c5ff75ffcf43874bfed60243e4e671 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Thu, 25 Apr 2024 10:44:08 -0400
Subject: [PATCH 2/3] temporary commit to restart build

Signed-off-by: Troy-Butler 
---
 clang/lib/Lex/Pragma.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp
index ced407355e0015..aaf7823fd2ada3 100644
--- a/clang/lib/Lex/Pragma.cpp
+++ b/clang/lib/Lex/Pragma.cpp
@@ -1444,7 +1444,7 @@ struct PragmaWarningHandler : public PragmaHandler {
  .Case("once", PPCallbacks::PWS_Once)
  .Case("suppress", PPCallbacks::PWS_Suppress)
  .Default(-1);
-  if (SpecifierValid = (SpecifierInt != -1))
+  if (SpecifierValid = (SpecifierInt != -1)) 
 Specifier =
 static_cast(SpecifierInt);
 

>From 59c4278a382b8e7b7544325819b30229dd6e7b58 Mon Sep 17 00:00:00 2001
From: Troy-Butler 
Date: Thu, 25 Apr 2024 10:45:21 -0400
Subject: [PATCH 3/3] remove trailing whitespace

Signed-off-by: Troy-Butler 
---
 clang/lib/Lex/Pragma.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp
index aaf7823fd2ada3..ced407355e0015 100644
--- a/clang/lib/Lex/Pragma.cpp
+++ b/clang/lib/Lex/Pragma.cpp
@@ -1444,7 +1444,7 @@ struct PragmaWarningHandler : public PragmaHandler {
  .Case("once", PPCallbacks::PWS_Once)
  .Case("suppress", PPCallbacks::PWS_Suppress)
  .Default(-1);
-  if (SpecifierValid = (SpecifierInt != -1)) 
+  if (SpecifierValid = (SpecifierInt != -1))
 Specifier =
 static_cast(SpecifierInt);
 

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