Mercurial > hg > Members > tobaru > cbc > CbC_llvm
changeset 66:7a5097301ce3
correct incorrect macro
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 11 Feb 2014 15:35:48 +0900 |
parents | 35ab9e3560be |
children | 58d177b06036 |
files | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/Transforms/IPO/PassManagerBuilder.cpp |
diffstat | 2 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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()) {
--- 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());