[PATCH] D29745: WholeProgramDevirt: Separate the code that applies optzns from the code that decides whether to apply them. NFCI.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 14 14:49:36 PST 2017
pcc added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:613
+ ConstantExpr::getBitCast(UniqueMember->Bits->GV, Int8PtrTy);
+ UniqueMemberAddr = ConstantExpr::getGetElementPtr(
+ Int8Ty, UniqueMemberAddr,
----------------
tejohnson wrote:
> What is the significance of the change from CreateConstGEP1_64 to getGetElementPtr?
The new code simply builds the same constant but using the ConstantExpr APIs, which can be used outside of a function context. In the old code I used IRBuilder to create this constant because it was convenient to do so. In a later change I will need the constant outside of a function context (see D29917) so I cannot use IRBuilder to create it.
https://reviews.llvm.org/D29745
More information about the llvm-commits
mailing list