[clang] [clang]MveEmitter: Pass Args as a const reference (PR #89551)

via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 22 04:33:15 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: aniplcc (aniplcc)

<details>
<summary>Changes</summary>

Closes #<!-- -->89192.
Also updated with review patches.
In continuation of: `https://github.com/llvm/llvm-project/pull/89202` [Closed due to a bad rebase]



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


1 Files Affected:

- (modified) clang/utils/TableGen/MveEmitter.cpp (+6-5) 


``````````diff
diff --git a/clang/utils/TableGen/MveEmitter.cpp b/clang/utils/TableGen/MveEmitter.cpp
index 88e7b6e8546595..c455071ed9da7c 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,9 @@ 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,

``````````

</details>


https://github.com/llvm/llvm-project/pull/89551


More information about the cfe-commits mailing list