[PATCH] D24237: [ARM] Promote small global constants to constant pools

Oliver Stannard via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 5 09:53:39 PDT 2016


olista01 added inline comments.

================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:2890
@@ +2889,3 @@
+  //
+  // Only do this if the only users of the constant are in this function (to
+  // avoid duplicating the constant).
----------------
Would it also be worth doing this for very small constants with multiple uses? If the constant is no larger than a pointer then this won't increase code size, and should help performance by removing a layer of indirection.

================
Comment at: test/CodeGen/ARM/constantpool-promote.ll:42
@@ +41,3 @@
+; Function Attrs: nounwind
+define void @test4() #0 {
+  tail call void @a(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str3, i32 0, i32 0)) #2
----------------
Missing CHECK lines?


Repository:
  rL LLVM

https://reviews.llvm.org/D24237





More information about the llvm-commits mailing list