[clang] [clang]MveEmitter: Pass Args as a const reference (PR #89551)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 21 10:47:00 PDT 2024
https://github.com/aniplcc created https://github.com/llvm/llvm-project/pull/89551
Closes #89192.
Also updated with review patches.
In continuation of: `https://github.com/llvm/llvm-project/pull/89202` [Closed due to a bad rebase]
>From 21ef2c83063a16866edec3eaa1847db7b34592c4 Mon Sep 17 00:00:00 2001
From: aniplcc <aniplccode at gmail.com>
Date: Sun, 21 Apr 2024 23:01:20 +0530
Subject: [PATCH 1/2] [clang]MveEmitter: Pass Args as a const reference
---
clang/utils/TableGen/MveEmitter.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/clang/utils/TableGen/MveEmitter.cpp b/clang/utils/TableGen/MveEmitter.cpp
index 88e7b6e8546595..5f6546a6498c3c 100644
--- a/clang/utils/TableGen/MveEmitter.cpp
+++ b/clang/utils/TableGen/MveEmitter.cpp
@@ -658,9 +658,9 @@ class IRBuilderResult : public Result {
std::vector<Ptr> Args;
std::set<unsigned> AddressArgs;
std::map<unsigned, std::string> IntegerArgs;
- IRBuilderResult(StringRef CallPrefix, std::vector<Ptr> Args,
- std::set<unsigned> AddressArgs,
- std::map<unsigned, std::string> IntegerArgs)
+ IRBuilderResult(StringRef CallPrefix, const std::vector<Ptr> &Args,
+ const std::set<unsigned> &AddressArgs,
+ const std::map<unsigned, std::string> &IntegerArgs)
: CallPrefix(CallPrefix), Args(Args), AddressArgs(AddressArgs),
IntegerArgs(IntegerArgs) {}
void genCode(raw_ostream &OS,
@@ -727,8 +727,8 @@ class IRIntrinsicResult : public Result {
std::string IntrinsicID;
std::vector<const Type *> ParamTypes;
std::vector<Ptr> Args;
- IRIntrinsicResult(StringRef IntrinsicID, std::vector<const Type *> ParamTypes,
- std::vector<Ptr> Args)
+ IRIntrinsicResult(StringRef IntrinsicID, const std::vector<const Type *> &ParamTypes,
+ const std::vector<Ptr> &Args)
: IntrinsicID(std::string(IntrinsicID)), ParamTypes(ParamTypes),
Args(Args) {}
void genCode(raw_ostream &OS,
>From d0bfc710b9fa90d71f544451432577620b4cf610 Mon Sep 17 00:00:00 2001
From: aniplcc <aniplccode at gmail.com>
Date: Sun, 21 Apr 2024 23:13:50 +0530
Subject: [PATCH 2/2] format fixes
---
clang/utils/TableGen/MveEmitter.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/clang/utils/TableGen/MveEmitter.cpp b/clang/utils/TableGen/MveEmitter.cpp
index 5f6546a6498c3c..c455071ed9da7c 100644
--- a/clang/utils/TableGen/MveEmitter.cpp
+++ b/clang/utils/TableGen/MveEmitter.cpp
@@ -727,7 +727,8 @@ class IRIntrinsicResult : public Result {
std::string IntrinsicID;
std::vector<const Type *> ParamTypes;
std::vector<Ptr> Args;
- IRIntrinsicResult(StringRef IntrinsicID, const std::vector<const Type *> &ParamTypes,
+ IRIntrinsicResult(StringRef IntrinsicID,
+ const std::vector<const Type *> &ParamTypes,
const std::vector<Ptr> &Args)
: IntrinsicID(std::string(IntrinsicID)), ParamTypes(ParamTypes),
Args(Args) {}
More information about the cfe-commits
mailing list