backing out r99170 because it still fails on clang-x86_64-darwin10-fnt

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99171 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gabor Greif
2010-03-22 09:11:00 +00:00
parent 9b1061e2e3
commit 1cde4af157
11 changed files with 35 additions and 61 deletions

View File

@@ -352,14 +352,14 @@ DAE::Liveness DAE::SurveyUse(Value::use_iterator U, UseVector &MaybeLiveUses,
// argument, since if it was the function argument this would be an
// indirect call and the we know can't be looking at a value of the
// label type (for the invoke instruction).
unsigned ArgNo = CS.getArgumentNo(U);
unsigned ArgNo = CS.getArgumentNo(U.getOperandNo());
if (ArgNo >= F->getFunctionType()->getNumParams())
// The value is passed in through a vararg! Must be live.
return Live;
assert(CS.getArgument(ArgNo)
== CS.getInstruction()->getOperand(U.getOperandNo())
assert(CS.getArgument(ArgNo)
== CS.getInstruction()->getOperand(U.getOperandNo())
&& "Argument is not where we expected it");
// Value passed to a normal call. It's only live when the corresponding

View File

@@ -168,7 +168,7 @@ bool PruneEH::SimplifyFunction(Function *F) {
for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) {
if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator()))
if (II->doesNotThrow()) {
SmallVector<Value*, 8> Args(II->op_begin(), II->op_end() - 3);
SmallVector<Value*, 8> Args(II->op_begin()+3, II->op_end());
// Insert a call instruction before the invoke.
CallInst *Call = CallInst::Create(II->getCalledValue(),
Args.begin(), Args.end(), "", II);