# HG changeset patch # User Kaito Tokumori # Date 1392100548 -32400 # Node ID 7a5097301ce3d12aa7af5dbe62b48fdfe092fe68 # Parent 35ab9e3560beb6f759d5fde8697617e31ce38904 correct incorrect macro diff -r 35ab9e3560be -r 7a5097301ce3 lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Tue Feb 11 02:09:46 2014 +0900 +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Tue Feb 11 15:35:48 2014 +0900 @@ -5461,12 +5461,14 @@ #ifndef noCbC // if code segment's tail call flag was changed false , we report it on error. if (CLI.RetTy->is__CodeTy() && CS.getCaller()->getReturnType()->is__CodeTy() && !isTailCall) { + /* if (CS.getCalledFunction()) // if this call is direct access; ex) goto codesegment(); DAG.getContext()->emitError(CS.getInstruction(), CS.getCaller()->getName() + " : Tail call elimination was failed on goto " + CS.getCalledFunction()->getName() + " !"); else if (CS.getCalledValue()->getType()->isPointerTy()) // if the pointer access; ex) goto codesegmentPointer; DAG.getContext()->emitError(CS.getInstruction(), CS.getCaller()->getName() + " : Tail call elimination was failed on codesegment which is accessed by pointer!"); // we can't get name from Type... + */ } #endif if (Result.first.getNode()) { diff -r 35ab9e3560be -r 7a5097301ce3 lib/Transforms/IPO/PassManagerBuilder.cpp --- a/lib/Transforms/IPO/PassManagerBuilder.cpp Tue Feb 11 02:09:46 2014 +0900 +++ b/lib/Transforms/IPO/PassManagerBuilder.cpp Tue Feb 11 15:35:48 2014 +0900 @@ -111,14 +111,16 @@ if (LibraryInfo) FPM.add(new TargetLibraryInfo(*LibraryInfo)); #ifndef noCbC - if (UseNewSROA) - FPM.add(createSROAPass(true,true)); - else - FPM.add(createScalarReplAggregatesPass()); + if (OptLevel == 0) { + if (UseNewSROA) + FPM.add(createSROAPass(true,true)); + else + FPM.add(createScalarReplAggregatesPass()); + } +#else + if (OptLevel == 0) return; #endif - if (OptLevel == 0) return; - addInitialAliasAnalysisPasses(FPM); FPM.add(createCFGSimplificationPass());