Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
76b3c332
Commit
76b3c332
authored
Jul 23, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #748 from kmod/perf2
Reduce number of optimization passes we run
parents
fa424a37
a96bd04f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
20 deletions
+29
-20
src/codegen/entry.cpp
src/codegen/entry.cpp
+2
-0
src/codegen/irgen.cpp
src/codegen/irgen.cpp
+27
-20
No files found.
src/codegen/entry.cpp
View file @
76b3c332
...
...
@@ -513,6 +513,8 @@ void initCodegen() {
// llvm_args.push_back("--debug-only=stackmaps");
#endif
// llvm_args.push_back("--time-passes");
// llvm_args.push_back("--print-after-all");
// llvm_args.push_back("--print-machineinstrs");
if
(
USE_REGALLOC_BASIC
)
...
...
src/codegen/irgen.cpp
View file @
76b3c332
...
...
@@ -108,20 +108,27 @@ static void optimizeIR(llvm::Function* f, EffortLevel effort) {
if
(
ENABLE_PYSTON_PASSES
)
fpm
.
add
(
createMallocsNonNullPass
());
// TODO Find the right place for this pass (and ideally not duplicate it)
if
(
ENABLE_PYSTON_PASSES
)
{
fpm
.
add
(
llvm
::
createGVNPass
());
fpm
.
add
(
createConstClassesPass
());
}
// TODO: find the right set of passes
if
(
0
)
{
//
My original set of passes, that seem to get about 90% of the benefit
:
if
(
1
)
{
//
Small set of passes
:
fpm
.
add
(
llvm
::
createInstructionCombiningPass
());
fpm
.
add
(
llvm
::
createReassociatePass
());
fpm
.
add
(
llvm
::
createGVNPass
());
fpm
.
add
(
llvm
::
createCFGSimplificationPass
());
if
(
ENABLE_PYSTON_PASSES
)
{
fpm
.
add
(
createConstClassesPass
());
fpm
.
add
(
createDeadAllocsPass
());
fpm
.
add
(
llvm
::
createInstructionCombiningPass
());
fpm
.
add
(
llvm
::
createCFGSimplificationPass
());
}
}
else
{
// TODO Find the right place for this pass (and ideally not duplicate it)
if
(
ENABLE_PYSTON_PASSES
)
{
fpm
.
add
(
llvm
::
createGVNPass
());
fpm
.
add
(
createConstClassesPass
());
}
// copied + slightly modified from llvm/lib/Transforms/IPO/PassManagerBuilder.cpp::populateModulePassManager
fpm
.
add
(
llvm
::
createEarlyCSEPass
());
// Catch trivial redundancies
fpm
.
add
(
llvm
::
createJumpThreadingPass
());
// Thread jumps.
...
...
@@ -165,19 +172,19 @@ static void optimizeIR(llvm::Function* f, EffortLevel effort) {
// fpm.add(llvm::createLoopVectorizePass(DisableUnrollLoops, LoopVectorize));
fpm
.
add
(
llvm
::
createInstructionCombiningPass
());
fpm
.
add
(
llvm
::
createCFGSimplificationPass
());
}
// TODO Find the right place for this pass (and ideally not duplicate it)
if
(
ENABLE_PYSTON_PASSES
)
{
fpm
.
add
(
createConstClassesPass
());
fpm
.
add
(
llvm
::
createInstructionCombiningPass
());
fpm
.
add
(
llvm
::
createCFGSimplificationPass
());
fpm
.
add
(
createConstClassesPass
());
fpm
.
add
(
createDeadAllocsPass
());
// fpm.add(llvm::createSCCPPass()); // Constant prop with SCCP
// fpm.add(llvm::createEarlyCSEPass()); // Catch trivial redundancies
// fpm.add(llvm::createInstructionCombiningPass());
// fpm.add(llvm::createCFGSimplificationPass());
// TODO Find the right place for this pass (and ideally not duplicate it)
if
(
ENABLE_PYSTON_PASSES
)
{
fpm
.
add
(
createConstClassesPass
());
fpm
.
add
(
llvm
::
createInstructionCombiningPass
());
fpm
.
add
(
llvm
::
createCFGSimplificationPass
());
fpm
.
add
(
createConstClassesPass
());
fpm
.
add
(
createDeadAllocsPass
());
// fpm.add(llvm::createSCCPPass()); // Constant prop with SCCP
// fpm.add(llvm::createEarlyCSEPass()); // Catch trivial redundancies
// fpm.add(llvm::createInstructionCombiningPass());
// fpm.add(llvm::createCFGSimplificationPass());
}
}
fpm
.
doInitialization
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment