[PATCH] Refactoring SimplifyLibCalls to remove static initializers and generally cleaning up the code.

Chris Bieneman beanz at apple.com
Tue Sep 16 18:12:21 PDT 2014


I'm going to work on revisions based on the feedback, but I had a few comments.

================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:1902
@@ -2124,1 +1901,3 @@
   if (TLI->getLibFunc(FuncName, Func) && TLI->has(Func)) {
+    // We never change the calling convention.
+    if (!ignoreCallingConv(Func) && !isCallingConvC)
----------------
morisset wrote:
> This looks like a behavior change. If so it should probably be in a separate patch (this one is already rather bulky).
This actually isn't a behavior change. It was part of LibCallOptimization::optimizeCall. Since the refactoring removed that method I've moved the check here.

================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:2046
@@ -2265,1 +2045,3 @@
 
+  if (!isCallingConvC)
+    return nullptr;
----------------
morisset wrote:
> Same as before, this does not look like just a part of the refactor.
This actually isn't a behavior change. It was also part of LibCallOptimization::optimizeCall.

http://reviews.llvm.org/D5364






More information about the llvm-commits mailing list