Hi Anton, > while this patch works, I think it is suboptimal in some cases. > I am still investigating how to avoid this suboptimality. I suggest > this patch be put on hold for a day or two until I have finished.
I don't think it can be improved at this point. However the patch could be a bit neater (see attachment). Ciao, Duncan.
Index: gcc.llvm.master/gcc/llvm-convert.cpp =================================================================== --- gcc.llvm.master.orig/gcc/llvm-convert.cpp 2007-05-23 19:20:09.000000000 +0200 +++ gcc.llvm.master/gcc/llvm-convert.cpp 2007-05-23 19:32:52.000000000 +0200 @@ -1945,7 +1945,13 @@ break; } } - + + CreateExceptionValues(); + + // Fetch and store the exception. + Value *Ex = new CallInst(FuncEHException, "eh_ptr", CurBB); + new StoreInst(Ex, ExceptionValue, CurBB); + if (!TryCatch) return; // Gather the typeinfo. @@ -1953,8 +1959,6 @@ tree Catches = TREE_OPERAND(TryCatch, 1); GatherTypeInfo(Catches, TypeInfos); - CreateExceptionValues(); - // Choose type of landing pad type. Function *F = FuncEHSelector; @@ -1964,10 +1968,6 @@ F = FuncEHFilter; } - // Fetch and store the exception. - Value *Ex = new CallInst(FuncEHException, "eh_ptr", CurBB); - new StoreInst(Ex, ExceptionValue, CurBB); - // Fetch and store exception handler. std::vector<Value*> Args; Args.push_back(new LoadInst(ExceptionValue, "eh_ptr", CurBB));
_______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits