[PATCH] D25385: Make the FunctionComparator of the MergeFunctions pass a stand-alone utility in a separate file
Erik Eckstein via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 10 15:29:10 PDT 2016
eeckstein added inline comments.
================
Comment at: lib/Transforms/Utils/FunctionComparator.cpp:475
+ if (const GetElementPtrInst *GEPL = dyn_cast<GetElementPtrInst>(L)) {
+ needToCmpOperands = false;
+ const GetElementPtrInst *GEPR = cast<GetElementPtrInst>(R);
----------------
tobiasvk wrote:
> Do you really need needToCmpOperands? You could just check in the caller whether isa<GetElementPtrInst>(L). Do you foresee any uses other than GEPs?
It was my intention that a caller of cmpOperations does not have to check for GEPs. In the SwiftMergeFunctions pass there is another caller and I didn't wanted to duplicate the code (which checks for GEPs). I thought it's a little bit safer this way.
https://reviews.llvm.org/D25385
More information about the llvm-commits
mailing list