[PATCH] D28637: [PPC] Inline expansion of memcmp
Tony Jiang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 30 07:36:28 PST 2017
jtony added inline comments.
Comment at: lib/CodeGen/CodeGenPrepare.cpp:1913
+void EmitLoadCompareBlock(LLVMContext &C, BasicBlock *LoadBlockCurr,
+ BasicBlock *LoadBlockNext, Value *Source1,
+ Value *Source2, Type *LoadType, Type *LoadPtrTy,
I agree with Nemanja here. This function has 11 parameters which is far too many (generally speaking function parameters exceed 7 is not recommended). Maybe you can try splitting the function into smaller ones to reduce the number of parameters need to pass using the Single Responsibility Principle. Or make some of the parameters class members so that you don't need to pass them around (be very careful only make these necessary parameters class members because doing that you are increasing their live scope).
More information about the llvm-commits