[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:16 PDT 2024


================
@@ -2029,6 +2031,145 @@ OptimizeFunctions(Module &M,
   return Changed;
 }
 
+static bool IsCharArray(Type *t) {
+  const unsigned int CHAR_BIT_SIZE = 8;
+  return t && t->isArrayTy() && t->getArrayElementType()->isIntegerTy() &&
+         t->getArrayElementType()->getIntegerBitWidth() == CHAR_BIT_SIZE;
+}
+
+static bool
+tryWidenGlobalStrings(Function &F,
+                      function_ref<TargetTransformInfo &(Function &)> GetTTI) {
+  bool changed = false;
----------------
nasherm wrote:

Done

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


More information about the llvm-commits mailing list