From fa1211f69bff82013a10a89298229398da8fab9b Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 23 Jul 2008 00:34:11 +0000 Subject: Enable first-class aggregates support. Remove the GetResultInst instruction. It is still accepted in LLVM assembly and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove support for return instructions with multiple values. These are auto-upgraded to use InsertValueInst instructions. The IRBuilder still accepts multiple-value returns, and auto-upgrades them to InsertValueInst instructions. llvm-svn: 53941 --- llvm/lib/Transforms/IPO/IPConstantPropagation.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'llvm/lib/Transforms/IPO/IPConstantPropagation.cpp') diff --git a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp index fa004fda1ed..42c02e6a45c 100644 --- a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp @@ -255,9 +255,7 @@ bool IPCP::PropagateConstantReturn(Function &F) { // Find the index of the retval to replace with int index = -1; - if (GetResultInst *GR = dyn_cast(Ins)) - index = GR->getIndex(); - else if (ExtractValueInst *EV = dyn_cast(Ins)) + if (ExtractValueInst *EV = dyn_cast(Ins)) if (EV->hasIndices()) index = *EV->idx_begin(); -- cgit v1.2.3