[llvm] [llvm][ARM]Add widen strings pass (PR #107120)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 16 08:55:50 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);
----------------
davemgreen wrote:
Could this either be in OptimizeFunctions, or look for the uses of global variables to find the memcpy? The aim would be to keep the runtime down by limiting what needs to be scanned through.
https://github.com/llvm/llvm-project/pull/107120
More information about the llvm-commits
mailing list