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

2024-04-26 Thread via cfe-commits

https://github.com/NagyDonat closed 
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] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-25 Thread via cfe-commits

NagyDonat wrote:

@Troy-Butler
I initiated the merge, but it seems that github mangles the email metadata:
![image](https://github.com/llvm/llvm-project/assets/43410265/d783c97f-f5f7-469f-9f77-9689275ea429)
(Note that I obscured your email address in this screenshot, but it can be 
found within the commits that you published.)

- If you want to use your "real" email address as the Author of this commit, 
then 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.)
- 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.


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-24 Thread via cfe-commits

https://github.com/NagyDonat approved this pull request.

Thanks for the update! I'll merge the PR within ~a day if nobody objects.

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

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 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

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 via cfe-commits

NagyDonat 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.

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


@@ -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] [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

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/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

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-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-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-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 via cfe-commits

github-actions[bot] wrote:




:warning: C/C++ code formatter, clang-format found issues in your code. 
:warning:



You can test this locally with the following command:


``bash
git-clang-format --diff adc4f6233df734fbe3793118ecc89d3584e0c90f 
f03466fa44a3c7210e7590e6305bc0c9f9aeb446 -- 
clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
llvm/lib/Transforms/InstCombine/InstCombineInternal.h 
llvm/lib/Transforms/Vectorize/VPlan.h 
mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
``





View the diff from clang-format here.


``diff
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
index e60a49f68b..ef23b160a3 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
@@ -225,15 +225,11 @@ public:
   ///   invalidated. This should include any regions explicitly invalidated
   ///   even if they do not currently have bindings. Pass \c NULL if this
   ///   information will not be used.
-  virtual StoreRef invalidateRegions(Store store,
-  ArrayRef Values,
-  const Expr *Ex, unsigned Count,
-  const LocationContext *LCtx,
-  const CallEvent *Call,
-  InvalidatedSymbols &IS,
-  RegionAndSymbolInvalidationTraits &ITraits,
-  InvalidatedRegions *TopLevelRegions,
-  InvalidatedRegions *Invalidated) = 0;
+  virtual StoreRef invalidateRegions(
+  Store store, ArrayRef Values, const Expr *Ex, unsigned Count,
+  const LocationContext *LCtx, const CallEvent *Call,
+  InvalidatedSymbols &IS, RegionAndSymbolInvalidationTraits &ITraits,
+  InvalidatedRegions *TopLevelRegions, InvalidatedRegions *Invalidated) = 
0;
 
   /// enterStackFrame - Let the StoreManager to do something when execution
   /// engine is about to execute into a callee.
diff --git 
a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h 
b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
index 38f8c8423f..46b923250d 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h
@@ -286,7 +286,8 @@ private:
 /// Helper function to create a TensorLevel object from given `tensor`.
 std::unique_ptr makeSparseTensorLevel(OpBuilder &b,
  Location l, Value t,
- unsigned tid, Level 
lvl);
+ unsigned tid,
+ Level lvl);
 
 /// Helper function to create a simple SparseIterator object that iterate over
 /// the SparseTensorLevel.

``




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-20 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-mlir-sparse

Author: Troy Butler (Troy-Butler)


Changes

Addresses issue #88716.

---
Full diff: https://github.com/llvm/llvm-project/pull/89512.diff


4 Files Affected:

- (modified) clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
(+2-2) 
- (modified) llvm/lib/Transforms/InstCombine/InstCombineInternal.h (+1-1) 
- (modified) llvm/lib/Transforms/Vectorize/VPlan.h (+2-2) 
- (modified) 
mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h (+3-3) 


``diff
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.

``




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-20 Thread via cfe-commits

llvmbot wrote:



@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-clang-static-analyzer-1

Author: Troy Butler (Troy-Butler)


Changes

Addresses issue #88716.

---
Full diff: https://github.com/llvm/llvm-project/pull/89512.diff


4 Files Affected:

- (modified) clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h 
(+2-2) 
- (modified) llvm/lib/Transforms/InstCombine/InstCombineInternal.h (+1-1) 
- (modified) llvm/lib/Transforms/Vectorize/VPlan.h (+2-2) 
- (modified) 
mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.h (+3-3) 


``diff
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.

``




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-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