[PATCH] D29745: WholeProgramDevirt: Separate the code that applies optzns from the code that decides whether to apply them. NFCI.

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 14:22:00 PST 2017


tejohnson added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:587
+    Value *Cmp = B.CreateICmp(IsOne ? ICmpInst::ICMP_EQ : ICmpInst::ICMP_NE,
+                              Call.VTable, UniqueMemberAddr);
+    Call.replaceAndErase("unique-ret-val", FnName, RemarksEnabled, Cmp);
----------------
Missing the ZExt you added here in D29744.


================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:613
+        ConstantExpr::getBitCast(UniqueMember->Bits->GV, Int8PtrTy);
+    UniqueMemberAddr = ConstantExpr::getGetElementPtr(
+        Int8Ty, UniqueMemberAddr,
----------------
What is the significance of the change from CreateConstGEP1_64 to getGetElementPtr?


https://reviews.llvm.org/D29745





More information about the llvm-commits mailing list