[llvm] [llvm][ARM]Add widen strings pass (PR #107120)

Nashe Mncube via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 18 03:52:05 PDT 2024


================
@@ -2058,6 +2199,14 @@ OptimizeGlobalVars(Module &M,
       continue;
     }
 
+    // Pad global strings if allowed
+    for (Function &F : llvm::make_early_inc_range(M)) {
+      TargetTransformInfo &TTI = GetTTI(F);
+      if (TTI.useWidenGlobalStrings()) {
+        Changed |= tryWidenGlobalStrings(F, GetTTI);
----------------
nasherm wrote:

My latest patch checks the uses of a global variable for memcpys. I believe OptimizeFunctions seems to be primarily concerned with either changing a functions call convention or removing dead functions so I decided to keep the check in OptimizeGlobalVariables

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


More information about the llvm-commits mailing list