[PATCH] D14148: [GlobalOpt] Demote globals to locals more aggressively

Manman Ren via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 09:45:43 PDT 2015


manmanren added a subscriber: manmanren.
manmanren added a comment.

Thanks for working on this! Do you have any performance number?


================
Comment at: lib/Transforms/IPO/GlobalOpt.cpp:100
@@ -90,2 +99,3 @@
     SmallSet<const Comdat *, 8> NotDiscardableComdats;
+    DenseMap<const Function *, bool> FunctionsKnownNotToRecurse;
   };
----------------
Comments will be great.
It is a little strange to name it "FunctionsKnownNotToRecurse" with a bool that tells if the function will recurse.

================
Comment at: lib/Transforms/IPO/GlobalOpt.cpp:1765
@@ +1764,3 @@
+      
+      FunctionsKnownNotToRecurse[F] = functionDoesNotCallItself(SCC[0]);
+    }
----------------
I am not sure if these conditions are sufficient to say the function does not recurse. Are indirect calls handled conservatively in the call graph?


Repository:
  rL LLVM

http://reviews.llvm.org/D14148





More information about the llvm-commits mailing list