[PATCH] D17948: Use CXX_FAST_TLS to enable shrink wrapping on PPC

Chuang-Yu Cheng via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 13 20:26:58 PDT 2016


cycheng added inline comments.

================
Comment at: lib/Target/PowerPC/PPCEnableShrinkWrap.cpp:50
@@ +49,3 @@
+static cl::
+opt<bool> DisablePPCEnableShrink("disable-ppc-enable-shrink-wrap", cl::Hidden,
+                                 cl::desc("Disable PPC enable shrink wrap pass"));
----------------
Since the patch aims for creating more shrink-wrapping chances, maybe we could use more appropriate names?

================
Comment at: lib/Target/PowerPC/PPCEnableShrinkWrap.cpp:131
@@ +130,3 @@
+      for (auto &I : BB)
+        if (isa<CallInst>(I) && !isa<IntrinsicInst>(I))
+          return true;
----------------
use std::any_of ?

================
Comment at: lib/Target/PowerPC/PPCEnableShrinkWrap.cpp:201
@@ +200,3 @@
+
+    F.setCallingConv(CallingConv::CXX_FAST_TLS);
+
----------------
This do affect sibling call optimization, because callee and caller should have same calling convention, so SCO have to handle this case.

================
Comment at: test/CodeGen/PowerPC/EnableShrinkWrapTest.ll:1
@@ +1,2 @@
+; RUN: opt -create-wrapper-opps -S -o - < %s | FileCheck %s
+
----------------
It would be better if we could have test cases for llc, because we would like to see how this change final code gen


http://reviews.llvm.org/D17948





More information about the llvm-commits mailing list