[llvm] [polly] [TableGen] Refactor Intrinsic handling in TableGen (PR #103980)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 14:47:28 PDT 2024


================
@@ -143,11 +144,11 @@ static void replace(std::string &str, StringRef find, StringRef replace) {
 }
 
 static void makeIslCompatible(std::string &str) {
-  replace(str, ".", "_");
-  replace(str, "\"", "_");
-  replace(str, " ", "__");
-  replace(str, "=>", "TO");
-  replace(str, "+", "_");
+  replace(str, '.', '_');
----------------
jurahul wrote:

For some reason, the compiler is resolving this replace() to the one I added and not the static one defined above. Hence this change. Also, using std::replace to replace one char with another is likely faster than using string based replacement.

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


More information about the llvm-commits mailing list