Merge branch 'master' into nvptx
This commit is contained in:
3
common.py
Normal file → Executable file
3
common.py
Normal file → Executable file
@@ -121,4 +121,7 @@ def check_tools(m):
|
|||||||
if int(t11[j])<input_tools[t][0][j]:
|
if int(t11[j])<input_tools[t][0][j]:
|
||||||
error(input_tools[t][2], m)
|
error(input_tools[t][2], m)
|
||||||
ret = 0
|
ret = 0
|
||||||
|
break
|
||||||
|
if int(t11[j])>input_tools[t][0][j]:
|
||||||
|
break
|
||||||
return ret
|
return ret
|
||||||
|
|||||||
24
opt.cpp
24
opt.cpp
@@ -514,11 +514,31 @@ Optimize(llvm::Module *module, int optLevel) {
|
|||||||
llvm::initializeInstrumentation(*registry);
|
llvm::initializeInstrumentation(*registry);
|
||||||
llvm::initializeTarget(*registry);
|
llvm::initializeTarget(*registry);
|
||||||
|
|
||||||
optPM.add(llvm::createGlobalDCEPass(), 200);
|
optPM.add(llvm::createGlobalDCEPass(), 185);
|
||||||
|
|
||||||
|
// Setup to use LLVM default AliasAnalysis
|
||||||
|
// Ideally, we want call:
|
||||||
|
// llvm::PassManagerBuilder pm_Builder;
|
||||||
|
// pm_Builder.OptLevel = optLevel;
|
||||||
|
// pm_Builder.addInitialAliasAnalysisPasses(optPM);
|
||||||
|
// but the addInitialAliasAnalysisPasses() is a private function
|
||||||
|
// so we explicitly enable them here.
|
||||||
|
// Need to keep sync with future LLVM change
|
||||||
|
// An alternative is to call populateFunctionPassManager()
|
||||||
|
optPM.add(llvm::createTypeBasedAliasAnalysisPass(), 190);
|
||||||
|
optPM.add(llvm::createBasicAliasAnalysisPass());
|
||||||
|
optPM.add(llvm::createCFGSimplificationPass());
|
||||||
|
// Here clang has an experimental pass SROAPass instead of
|
||||||
|
// ScalarReplAggregatesPass. We should add it in the future.
|
||||||
|
optPM.add(llvm::createScalarReplAggregatesPass());
|
||||||
|
optPM.add(llvm::createEarlyCSEPass());
|
||||||
|
optPM.add(llvm::createLowerExpectIntrinsicPass());
|
||||||
|
optPM.add(llvm::createTypeBasedAliasAnalysisPass());
|
||||||
|
optPM.add(llvm::createBasicAliasAnalysisPass());
|
||||||
|
|
||||||
// Early optimizations to try to reduce the total amount of code to
|
// Early optimizations to try to reduce the total amount of code to
|
||||||
// work with if we can
|
// work with if we can
|
||||||
optPM.add(llvm::createReassociatePass());
|
optPM.add(llvm::createReassociatePass(), 200);
|
||||||
optPM.add(llvm::createConstantPropagationPass());
|
optPM.add(llvm::createConstantPropagationPass());
|
||||||
optPM.add(llvm::createDeadInstEliminationPass());
|
optPM.add(llvm::createDeadInstEliminationPass());
|
||||||
optPM.add(llvm::createCFGSimplificationPass());
|
optPM.add(llvm::createCFGSimplificationPass());
|
||||||
|
|||||||
Reference in New Issue
Block a user