[clang] [Clang][TableGen] Use const pointers for various `Init *` pointers in SA checker emitter (PR #112321)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/112321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Use const pointers for various `Init *` pointers in SA checker emitter (PR #112321)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/112321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Use const pointers for various Init objects in NeonEmitter (PR #112317)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/112317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Use const pointers for various Init objects in Diagnostic Emitter (PR #112318)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/112318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Refactor ClangDiagnosticEmitter to use more StringRef (PR #115212)

2024-11-08 Thread Rahul Joshi via cfe-commits
jurahul wrote: > Is there any way you could split up into several patches? It's hard to follow > when you do multiple things in one patch. Thanks! Let me try to do it. May be a PR for just range based for loops to start with https://github.com/llvm/llvm-project/pull/115212

[clang] [NFC][Clang] Use range for loops in ClangDiagnosticsEmitter (PR #115573)

2024-11-08 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/115573 Use range based for loops in Clang diagnostics emitter. >From af56060f8d27bb84ce642f6fd53de14ad8765bef Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Fri, 8 Nov 2024 16:04:53 -0800 Subject: [PATCH] [NFC][Clan

[clang] [NFC][Clang][TableGen] Fix file header comments (PR #116491)

2024-11-16 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/116491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang][TableGen] Fix file header comments (PR #116491)

2024-11-16 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/116491 None >From a69664043703506d4331ff008d97de0c978a8aed Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Fri, 15 Nov 2024 09:49:12 -0800 Subject: [PATCH] [NFC][Clang][TableGen] Fix file header comments --- clang/

[clang] [NFC][Clang][TableGen] Fix file header comments (PR #116491)

2024-11-17 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/116491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][tablegen][NFC]add static for internal linkage function (PR #117479)

2024-11-24 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/117479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix a dangling reference in clang/utils/TableGen/ClangDiagnosticsEmitter.cpp (PR #119197)

2024-12-09 Thread Rahul Joshi via cfe-commits
@@ -1908,7 +1908,7 @@ void clang::EmitClangDiagDocs(const RecordKeeper &Records, raw_ostream &OS) { for (const Record *G : DiagGroups) { bool IsRemarkGroup = isRemarkGroup(G, DiagsInGroup); auto &GroupInfo = -DiagsInGroup[std::string(G->getValueAsString("Grou

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] [polly] Add static to command line option (cl::opt) (PR #126243)

2025-02-07 Thread Rahul Joshi via cfe-commits
@@ -20,7 +20,7 @@ using namespace mlir::lsp; LogicalResult mlir::MlirLspServerMain(int argc, char **argv, DialectRegistry ®istry) { - llvm::cl::opt inputStyle{ + static llvm::cl::opt inputStyle{ jurahul wrote: These are

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] [polly] Add static to command line option (cl::opt) (PR #126243)

2025-02-07 Thread Rahul Joshi via cfe-commits
@@ -119,24 +119,24 @@ int main(int argc, char **argv) { // options as static variables.. some of which overlap with our options. llvm::cl::ResetCommandLineParser(); - llvm::cl::opt inputFilename( + static llvm::cl::opt inputFilename( jurahul wrote: Thes

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] [polly] Add static to command line option (cl::opt) (PR #126243)

2025-02-07 Thread Rahul Joshi via cfe-commits
jurahul wrote: > > I don't quite follow the motivation for this, can you expand on this in the > > description please? Right now this seems unnecessary for the changes I can > > see in MLIR for example. > > The linked bug seems to explain it, I think? It seems to be the usual "if > something

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] [polly] Add static to command line option (cl::opt) (PR #126243)

2025-02-07 Thread Rahul Joshi via cfe-commits
jurahul wrote: Also, the commit description should be something like: "[NFC] Make file-local cl::opt global variables static" or something like that https://github.com/llvm/llvm-project/pull/126243 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] [polly] Add static to command line option (cl::opt) (PR #126243)

2025-02-07 Thread Rahul Joshi via cfe-commits
jurahul wrote: I understand this is mostly mechanical changes, but wondering if review wise it will help if its split up into 4-5 PRs. For example, bolt, clang, flag, llvm, mlir etc. https://github.com/llvm/llvm-project/pull/126243 ___ cfe-commits ma

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] [polly] Add static to command line option (cl::opt) (PR #126243)

2025-02-07 Thread Rahul Joshi via cfe-commits
jurahul wrote: Yeah, that’s why the description said most but not all. We should get link failures if one of these is made static. On Fri, Feb 7, 2025 at 7:17 AM Joseph Huber ***@***.***> wrote: > ***@***. commented on this pull request. > > This should definitely be split up. Also some opt

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] [polly] Add static to command line option (cl::opt) (PR #126243)

2025-02-07 Thread Rahul Joshi via cfe-commits
jurahul wrote: You can check the CI logs for the exact command line it uses and replicate it locally. On Fri, Feb 7, 2025 at 7:46 AM chrisPyr ***@***.***> wrote: > OK, I'll do it. > Except for checking it on CI, is there any other method I can test > locally? E.g. what options should I add > I'

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] [polly] Add static to command line option (cl::opt) (PR #126243)

2025-02-07 Thread Rahul Joshi via cfe-commits
jurahul wrote: @arsenm did you intent to approve it without splitting? Is this trivial enough to not need splitting as long as CI checks pass? https://github.com/llvm/llvm-project/pull/126243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [clang] Fix a dangling reference in clang/utils/TableGen/ClangDiagnosticsEmitter.cpp (PR #119197)

2024-12-10 Thread Rahul Joshi via cfe-commits
@@ -1908,7 +1908,7 @@ void clang::EmitClangDiagDocs(const RecordKeeper &Records, raw_ostream &OS) { for (const Record *G : DiagGroups) { bool IsRemarkGroup = isRemarkGroup(G, DiagsInGroup); auto &GroupInfo = -DiagsInGroup[std::string(G->getValueAsString("Grou

[clang] [clang] Fix a dangling reference in clang/utils/TableGen/ClangDiagnosticsEmitter.cpp (PR #119197)

2024-12-10 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/119197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix a dangling reference in clang/utils/TableGen/ClangDiagnosticsEmitter.cpp (PR #119197)

2024-12-10 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/119197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] [polly] Add static to command line option (cl::opt) (PR #126243)

2025-02-08 Thread Rahul Joshi via cfe-commits
jurahul wrote: Even if a variable is defined in the main file, it could conflict with another one in a library being linked. In any case, my understanding is that this is a common C++ practice, thought I do not see it spelled out explicitly in the coding standards doc: file scoped global variabl

[clang] [Clang][NFC] Code cleanup in CGBuiltin.cpp (PR #132060)

2025-03-19 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/132060 - Use `Intrinsic::` directly instead of `llvm::Intrinsic::`. - Eliminate redundant `nullptr` for some `CreateIntrinsic` calls. - Eliminate redundant `ArrayRef` casts. - Use C++17 structured binding instead of `st

[clang] [llvm] [IRBuilder] Add new overload for CreateIntrinsic (PR #131942)

2025-03-24 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/131942 >From 321ac988a49489d910bf8ba90a28d05db853cc0d Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Tue, 18 Mar 2025 13:19:24 -0700 Subject: [PATCH] [IRBuilder] Add new overload for CreateIntrinsic Add a new `Creat

[clang] [llvm] [IRBuilder] Add new overload for CreateIntrinsic (PR #131942)

2025-03-19 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/131942 >From e24106ee27fc6143914e92243556d5206cd230cf Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Tue, 18 Mar 2025 13:19:24 -0700 Subject: [PATCH] [IRBuilder] Add new overload for CreateIntrinsic Add a new `Creat

[clang] [llvm] [IRBuilder] Add new overload for CreateIntrinsic (PR #131942)

2025-04-05 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/131942 >From 7f7f0ea87f460a951011ce75926f3e27900bb384 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Tue, 18 Mar 2025 13:19:24 -0700 Subject: [PATCH] [IRBuilder] Add new overload for CreateIntrinsic Add a new `Creat

[clang] [llvm] [IRBuilder] Add new overload for CreateIntrinsic (PR #131942)

2025-03-26 Thread Rahul Joshi via cfe-commits
jurahul wrote: @nikic any concerns? I'll merge in a couple of days https://github.com/llvm/llvm-project/pull/131942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IRBuilder] Add new overload for CreateIntrinsic (PR #131942)

2025-03-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/131942 >From 248b40f44df94093db8b1c8cd4284894be5b348a Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Tue, 18 Mar 2025 13:19:24 -0700 Subject: [PATCH] [IRBuilder] Add new overload for CreateIntrinsic Add a new `Creat

[clang] [llvm] Fix nvptx range check (PR #136296)

2025-04-18 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/136296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][GPU] Fix unit test for NVPTX tid.x intrinsic (PR #136297)

2025-04-18 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/136297 - llvm.nvvm.read.ptx.sreg.tid.x does not have the result range attribute yet. >From d2731a74ee04d2b11b521b76c0a87bb68f0ba03a Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Fri, 18 Apr 2025 04:56:55 -0700 Subj

[clang] [Clang][GPU] Fix unit test for NVPTX tid.x intrinsic (PR #136297)

2025-04-18 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/136297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Fix nvptx range check (PR #136296)

2025-04-18 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/136296 None >From 8d0178850b74c568c03e98de47dbc9a94adedd05 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Thu, 17 Apr 2025 15:59:56 -0700 Subject: [PATCH 1/2] [NFC][LLVM][TableGen] Use `decodeULEB128` for `OPC_Soft

[clang] [Clang][GPU] Fix unit test for NVPTX tid.x intrinsic (PR #136297)

2025-04-18 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/136297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Mark workitem ID intrinsics with range attribute (PR #136196)

2025-04-18 Thread Rahul Joshi via cfe-commits
jurahul wrote: I think you guess is right: this one for example complains when range() is present in the checks: https://lab.llvm.org/buildbot/#/builders/65/builds/15490 and it only has AArch64 backend enabled. https://github.com/llvm/llvm-project/pull/136196 _

[clang] [llvm] AMDGPU: Mark workitem ID intrinsics with range attribute (PR #136196)

2025-04-18 Thread Rahul Joshi via cfe-commits
jurahul wrote: So may be we can make the check more permissive for now? https://github.com/llvm/llvm-project/pull/136196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][GPU] Make NVPTX check more permissive in unit test (PR #136301)

2025-04-18 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/136301 - Seems based on whether NVPTX backend is enabled or not, this call can have the range() attribute or not. So make this check more permissive. >From 196e2adb9e5e700f7c13d1655746cb79af926a04 Mon Sep 17 00:00:00

[clang] [Clang][GPU] Make NVPTX check more permissive in unit test (PR #136301)

2025-04-18 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/136301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Mark workitem ID intrinsics with range attribute (PR #136196)

2025-04-18 Thread Rahul Joshi via cfe-commits
jurahul wrote: https://github.com/llvm/llvm-project/pull/136301 ? Yeah, ultimately, we want the range on the intrinsic declaration. https://github.com/llvm/llvm-project/pull/136196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [llvm] AMDGPU: Mark workitem ID intrinsics with range attribute (PR #136196)

2025-04-18 Thread Rahul Joshi via cfe-commits
jurahul wrote: I attempted to fix the failure in clang/test/Headers/gpuintrin_lang.c by removing the range() in the CHECK, but now some other build fails and complains that the range() is missing: https://lab.llvm.org/buildbot/#/builders/174/builds/16421/steps/6/logs/FAIL__Clang__gpuintrin_lan

[clang] [Clang][GPU] Make NVPTX check more permissive in unit test (PR #136301)

2025-04-18 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/136301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-05 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/138174 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-05 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/138174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-05 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/138174 >From 278179a35bacc7c70dd1724e7ef7a41e9cdd999a Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 30 Apr 2025 23:47:37 -0700 Subject: [PATCH] [NFC][Support] Add llvm::uninitialized_copy Add `llvm::uninitiali

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-05 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/138174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/138174 >From 7c67ef6748f8813b7aaa91f8e6b463d9fde57d94 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 30 Apr 2025 23:47:37 -0700 Subject: [PATCH] [NFC][Support] Add llvm::uninitialized_copy Add `llvm::uninitiali

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
@@ -2981,7 +2981,7 @@ ScalarEvolution::getOrCreateAddExpr(ArrayRef Ops, static_cast(UniqueSCEVs.FindNodeOrInsertPos(ID, IP)); if (!S) { const SCEV **O = SCEVAllocator.Allocate(Ops.size()); -std::uninitialized_copy(Ops.begin(), Ops.end(), O); +llvm::uninitial

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
@@ -22,8 +22,8 @@ Checksum &Checksum::operator=(const Checksum &checksum) { } void Checksum::SetMD5(llvm::MD5::MD5Result md5) { - const constexpr size_t md5_length = 16; - std::uninitialized_copy_n(md5.begin(), md5_length, m_checksum.begin()); + static_assert(sizeof(md5) ==

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
@@ -2038,6 +2038,11 @@ template auto mismatch(R1 &&Range1, R2 &&Range2) { adl_end(Range2)); } +template +auto uninitialized_copy(R1 &&Src, IterTy Dst) { jurahul wrote: Thanks, fixed. https://github.com/llvm/llvm-project/pull/138174

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/138174 >From 46542ce5b946735c2c0a8f65e185761ebbf77073 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 30 Apr 2025 23:47:37 -0700 Subject: [PATCH] [NFC][Support] Add llvm::uninitialized_copy Add `llvm::uninitiali

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
@@ -22,8 +22,8 @@ Checksum &Checksum::operator=(const Checksum &checksum) { } void Checksum::SetMD5(llvm::MD5::MD5Result md5) { - const constexpr size_t md5_length = 16; - std::uninitialized_copy_n(md5.begin(), md5_length, m_checksum.begin()); + static_assert(sizeof(md5) ==

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
@@ -2981,7 +2981,7 @@ ScalarEvolution::getOrCreateAddExpr(ArrayRef Ops, static_cast(UniqueSCEVs.FindNodeOrInsertPos(ID, IP)); if (!S) { const SCEV **O = SCEVAllocator.Allocate(Ops.size()); -std::uninitialized_copy(Ops.begin(), Ops.end(), O); +llvm::uninitial

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/138174 >From de1b49fc6b8819b591e48b81634567ceeffe5089 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 30 Apr 2025 23:47:37 -0700 Subject: [PATCH] [NFC][Support] Add llvm::uninitialized_copy Add `llvm::uninitiali

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/138174 >From fbe3ca0c2e4d195149f5e3e6b8d32797cf47b9df Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 30 Apr 2025 23:47:37 -0700 Subject: [PATCH] [NFC][Support] Add llvm::uninitialized_copy Add `llvm::uninitiali

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/138174 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/138174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/138174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/138174 None >From d6f69414e3ac5c1a22f6509149609258ef980c13 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 30 Apr 2025 23:47:37 -0700 Subject: [PATCH] [NFC][Support] Add llvm::uninitialized_copy --- clang/incl

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-01 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/138174 >From b34e9b6c708dfbe097504804a0a85e1169518911 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 30 Apr 2025 23:47:37 -0700 Subject: [PATCH] [NFC][Support] Add llvm::uninitialized_copy --- clang/include/cl

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/138174 >From 705699c4b1772915f6d8773ce786d5601de0a926 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Wed, 30 Apr 2025 23:47:37 -0700 Subject: [PATCH] [NFC][Support] Add llvm::uninitialized_copy Add `llvm::uninitiali

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
@@ -2981,7 +2981,7 @@ ScalarEvolution::getOrCreateAddExpr(ArrayRef Ops, static_cast(UniqueSCEVs.FindNodeOrInsertPos(ID, IP)); if (!S) { const SCEV **O = SCEVAllocator.Allocate(Ops.size()); -std::uninitialized_copy(Ops.begin(), Ops.end(), O); +llvm::uninitial

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
@@ -2981,7 +2981,7 @@ ScalarEvolution::getOrCreateAddExpr(ArrayRef Ops, static_cast(UniqueSCEVs.FindNodeOrInsertPos(ID, IP)); if (!S) { const SCEV **O = SCEVAllocator.Allocate(Ops.size()); -std::uninitialized_copy(Ops.begin(), Ops.end(), O); +llvm::uninitial

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/138174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-02 Thread Rahul Joshi via cfe-commits
jurahul wrote: > This looks right, but I'd like someone else to go through to make sure it is > right everywhere. > > Also, the md5 change looks... odd and counts a lot on the internal > representation of md5, so I'm not sure about that one, but at least it is > right NOW (Since MD5 inherits

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-07 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/138174 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang] [lldb] [llvm] [mlir] [NFC][Support] Add llvm::uninitialized_copy (PR #138174)

2025-05-07 Thread Rahul Joshi via cfe-commits
jurahul wrote: Thanks @jpienaar. Given I have 2 approvals, will commit it today. https://github.com/llvm/llvm-project/pull/138174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IRBuilder] Add new overload for CreateIntrinsic (PR #131942)

2025-03-31 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/131942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IRBuilder] Add new overload for CreateIntrinsic (PR #131942)

2025-03-20 Thread Rahul Joshi via cfe-commits
@@ -114,22 +114,23 @@ static Value *handleHlslClip(const CallExpr *E, CodeGenFunction *CGF) { CMP = CGF->Builder.CreateIntrinsic( CGF->Builder.getInt1Ty(), CGF->CGM.getHLSLRuntime().getAnyIntrinsic(), {FCompInst}, nullptr); - } else + } else { CMP =

[clang] [Clang][NFC] Code cleanup in CGBuiltin.cpp (PR #132060)

2025-04-04 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/132060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TableGen] Use StringRef::substr instead of StringRef::slice (NFC) (PR #139485)

2025-05-11 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul approved this pull request. https://github.com/llvm/llvm-project/pull/139485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Adopt `TrailingObjects` convenience API in MacroArgs (PR #139635)

2025-05-12 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/139635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TableGen] Use std::tie to implement operator< (NFC) (PR #139405)

2025-05-10 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul approved this pull request. https://github.com/llvm/llvm-project/pull/139405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Adopt `TrailingObjects` convenience API in MacroArgs (PR #139635)

2025-05-12 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/139635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Adopt `TrailingObjects` convenience API in MacroArgs (PR #139635)

2025-05-12 Thread Rahul Joshi via cfe-commits
jurahul wrote: I filled in the description now. I am doing similar changes on LLVM/MLIR side (change has been approved). I added these convenience APIs to TrailingObjects to support the common code patterns of a single trailing type as well as creating an ArrayRef from the trailing objects po

[clang] [NFC][Clang] Adopt `TrailingObjects` convenience API in MacroArgs (PR #139635)

2025-05-12 Thread Rahul Joshi via cfe-commits
jurahul wrote: FYI, LLVM and MLIR change of similar nature: https://github.com/llvm/llvm-project/pull/138554 https://github.com/llvm/llvm-project/pull/139635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [NFC][Clang] Adopt `TrailingObjects` convienence API in MacroArgs (PR #139635)

2025-05-12 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/139635 None >From 0207459bd4387a4af801cadb3c1213983563509e Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 12 May 2025 15:46:51 -0700 Subject: [PATCH] [NFC][Clang] Adopt `TrailingObjects` convienence API in Mac

[clang] [NFC][Clang] Adopt `TrailingObjects` API to build ArrayRef (PR #139639)

2025-05-12 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/139639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Adopt `TrailingObjects` convenience API in MacroArgs (PR #139635)

2025-05-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/139635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Adopt `TrailingObjects` API to build ArrayRef (PR #139639)

2025-05-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/139639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Adopt `TrailingObjects` API to build ArrayRef (PR #139639)

2025-05-12 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/139639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/139749 Add a `setExprs` overload to `OpenACCClauseWithExprs` that allows initializing the trailing storage to help eliminate some code duplication in various subclass constructors. Rate limit

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/139749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/139749 >From cddc08de74e539c47e93efc4eb65cb4417b747de Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Tue, 13 May 2025 08:04:08 -0700 Subject: [PATCH] [NFC][Clang] Add `setExprs` overload to reduce some code duplicat

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
@@ -506,6 +506,14 @@ class OpenACCClauseWithExprs : public OpenACCClauseWithParams { Exprs = NewExprs; } + /// Used only for initialization, the leaf class can initialize this to + /// trailing storage, and initialize the data in the trailing storage as well. + void

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
@@ -501,20 +501,28 @@ class OpenACCClauseWithExprs : public OpenACCClauseWithParams { /// Used only for initialization, the leaf class can initialize this to /// trailing storage. - void setExprs(MutableArrayRef NewExprs) { -assert(Exprs.empty() && "Cannot change Exp

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/139749 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
@@ -501,20 +501,28 @@ class OpenACCClauseWithExprs : public OpenACCClauseWithParams { /// Used only for initialization, the leaf class can initialize this to /// trailing storage. - void setExprs(MutableArrayRef NewExprs) { -assert(Exprs.empty() && "Cannot change Exp

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
@@ -501,20 +501,28 @@ class OpenACCClauseWithExprs : public OpenACCClauseWithParams { /// Used only for initialization, the leaf class can initialize this to /// trailing storage. - void setExprs(MutableArrayRef NewExprs) { -assert(Exprs.empty() && "Cannot change Exp

[clang] [NFC][Clang] Add `setExprs` overload to reduce some code duplication (PR #139749)

2025-05-13 Thread Rahul Joshi via cfe-commits
@@ -492,7 +492,7 @@ class OpenACCSelfClause final /// Represents a clause that has one or more expressions associated with it. class OpenACCClauseWithExprs : public OpenACCClauseWithParams { - MutableArrayRef Exprs; + MutableArrayRef Storage; jurahul wrote:

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in Expr.cpp/h (PR #140102)

2025-05-16 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/140102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [LLVM][TableGen] Rename `ListInit::getValues()` to `getElements()` (PR #140289)

2025-05-16 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/140289 >From 95948513fbfad39731abb01f40eab586bbaa26c5 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Fri, 16 May 2025 10:54:33 -0700 Subject: [PATCH] [LLVM][TableGen] Rename `ListInit::getValues()` to `getElements()

[clang] [llvm] [mlir] [LLVM][TableGen] Rename `ListInit::getValues()` to `getElements()` (PR #140289)

2025-05-16 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/140289 Rename `ListInit::getValues()` to `getElements()` to better match with other `ListInit` members like `getElement`. Rate limit · GitHub body { background-color: #f

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in ASTConcept (PR #139974)

2025-05-14 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/139974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in Decl/DeclTemplate (PR #139977)

2025-05-14 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/139977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in Expr.cpp/h (PR #140102)

2025-05-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/140102 Adopt non-templated and array-ref returning forms of `getTrailingObjects` in Expr.cpp/.h. Use ArrayRef forms to eliminate manual asserting for OOB index. Use llvm::copy() instead of std::copy() in some instanc

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in Decl/StmtOpenACC (PR #140087)

2025-05-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/140087 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in Expr.cpp/h (PR #140102)

2025-05-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/140102 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in DeclCXX (PR #140078)

2025-05-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/140078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in DeclCXX (PR #140078)

2025-05-15 Thread Rahul Joshi via cfe-commits
jurahul wrote: > Hi, no objections to the patch, but I am wondering if there is a larger > reason behind this effort to simplify all these uses of getTrailingObjects. > > Are you planning on an API change in this area for instance? Not really. I added simplifications to the TrailingObjects cla

[clang] [NFC][Clang] Adopt simplified `getTrailingObjects` in Decl/StmtOpenACC (PR #140087)

2025-05-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/140087 Adopt non-templated and array-ref returning forms of `getTrailingObjects` in DeclOpenACC and StmtOpenACC. Also use std::uninitialized_contruct_n to make the code a little concise. Rate

<    1   2   3   4   5   6   >