mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
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:
@@ -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
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user