[PATCH] D146370: [Clang][OpenMP]Solved the the always truth condition in Arm64

2023-03-18 Thread Samuel Maina via Phabricator via cfe-commits
samuelmaina created this revision.
Herald added subscribers: sunshaoce, guansong, kristof.beyls, yaxunl.
Herald added a project: All.
samuelmaina requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: cfe-commits, jplehr, sstefan1.
Herald added a project: clang.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146370

Files:
  clang/lib/CodeGen/CGOpenMPRuntime.cpp

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


[PATCH] D146371: [Clang][OpenMP]Solved the the always truth condition in Arm64

2023-03-18 Thread Samuel Maina via Phabricator via cfe-commits
samuelmaina created this revision.
Herald added subscribers: sunshaoce, guansong, kristof.beyls, yaxunl.
Herald added a project: All.
samuelmaina requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: cfe-commits, jplehr, sstefan1.
Herald added a project: clang.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146371

Files:
  clang/lib/CodeGen/CGOpenMPRuntime.cpp

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


[PATCH] D146370: [Clang][OpenMP]Solved the the always truth condition in Arm64

2023-03-18 Thread Samuel Maina via Phabricator via cfe-commits
samuelmaina updated this revision to Diff 506345.
samuelmaina added a comment.



Updating D146370: [Clang][OpenMP]Solved the the always truth condition in Arm64
===

Reformatted the file
Reformatted the CGOpenMPRuntime.cpp to conform to clang standards


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146370/new/

https://reviews.llvm.org/D146370

Files:
  clang/lib/CodeGen/CGOpenMPRuntime.cpp

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


[PATCH] D146370: [Clang][OpenMP]Solved the the always truth condition in Arm64

2023-03-25 Thread Samuel Maina via Phabricator via cfe-commits
samuelmaina updated this revision to Diff 508381.
samuelmaina edited the summary of this revision.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146370/new/

https://reviews.llvm.org/D146370

Files:
  clang/lib/CodeGen/CGOpenMPRuntime.cpp


Index: clang/lib/CodeGen/CGOpenMPRuntime.cpp
===
--- clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -11170,7 +11170,7 @@
   if (Kind == ParamKindTy::Uniform)
 return false;
 
-  if (Kind == ParamKindTy::LinearUVal || ParamKindTy::LinearRef)
+  if (Kind == ParamKindTy::LinearUVal || Kind == ParamKindTy::LinearRef)
 return false;
 
   if ((Kind == ParamKindTy::Linear || Kind == ParamKindTy::LinearVal) &&


Index: clang/lib/CodeGen/CGOpenMPRuntime.cpp
===
--- clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -11170,7 +11170,7 @@
   if (Kind == ParamKindTy::Uniform)
 return false;
 
-  if (Kind == ParamKindTy::LinearUVal || ParamKindTy::LinearRef)
+  if (Kind == ParamKindTy::LinearUVal || Kind == ParamKindTy::LinearRef)
 return false;
 
   if ((Kind == ParamKindTy::Linear || Kind == ParamKindTy::LinearVal) &&
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D146370: [Clang][OpenMP]Solved the the always truth condition in Arm64

2023-03-25 Thread Samuel Maina via Phabricator via cfe-commits
samuelmaina added a comment.

All the testcases are passing. The first unit tests I could find are for 
functions that are 6 levels  higher from this function .The function is very 
low level and couldn't find a way to affect it from the higher functions.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146370/new/

https://reviews.llvm.org/D146370

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


[PATCH] D147037: [Clang][ICE] Corrected invalid invalid parameter index on some attributes with invalid indices applied to varargs functions

2023-03-28 Thread Samuel Maina via Phabricator via cfe-commits
samuelmaina created this revision.
Herald added a subscriber: arphaman.
Herald added a reviewer: aaron.ballman.
Herald added a project: All.
samuelmaina requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147037

Files:
  clang/lib/Sema/SemaDeclAttr.cpp


Index: clang/lib/Sema/SemaDeclAttr.cpp
===
--- clang/lib/Sema/SemaDeclAttr.cpp
+++ clang/lib/Sema/SemaDeclAttr.cpp
@@ -3763,7 +3763,8 @@
   ParamIdx Idx;
   if (!checkFunctionOrMethodParameterIndex(S, D, AL, 1, IdxExpr, Idx))
 return;
-
+  if (Idx.getASTIndex() >= getFunctionOrMethodNumParams(D))
+return;
   // Make sure the format string is really a string.
   QualType Ty = getFunctionOrMethodParamType(D, Idx.getASTIndex());
 


Index: clang/lib/Sema/SemaDeclAttr.cpp
===
--- clang/lib/Sema/SemaDeclAttr.cpp
+++ clang/lib/Sema/SemaDeclAttr.cpp
@@ -3763,7 +3763,8 @@
   ParamIdx Idx;
   if (!checkFunctionOrMethodParameterIndex(S, D, AL, 1, IdxExpr, Idx))
 return;
-
+  if (Idx.getASTIndex() >= getFunctionOrMethodNumParams(D))
+return;
   // Make sure the format string is really a string.
   QualType Ty = getFunctionOrMethodParamType(D, Idx.getASTIndex());
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits