-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Squint -- a peephole optimizer for amacc #87
Commits on Jan 31, 2022
-
Squint -- a peephole optimizer for amacc
This pull request is a starting point for discussion on how to integrate Squint most effectively with amacc. It may best be done with separate repos that are tied through modules, but I don't know. I added a -p option to amacc.c that must currently be used with the amacc -o option to produce an ELF file that can be optimized with scripts/peep. In order for peep to work, a version of squint must be compiled, e.g. gcc -o squint squint.c . Example: % gcc -o amacc-gcc amacc.c -ldl % ./amacc-gcc -p -o amacc amacc.c % scripts/disasm amacc > amacc.s % gcc -o squint squint.c % scripts/peep amacc executable file amacc was optimized. % scripts/disasm amacc > amacc.s.opt % sdiff -W -d -w 180 amacc.s amacc.s.opt I have more advanced versions of this that has even beat gcc -O1 for fib.c and possibly other things, but I suspect you will not like my coding style, so we will have to discuss.
HPCguy authored and HPCguy committedJan 31, 2022 Configuration menu - View commit details
-
Copy full SHA for 0daa102 - Browse repository at this point
Copy the full SHA 0daa102View commit details
Commits on Feb 2, 2022
-
Add register allocation for frame variables
Add sieve.c to benchmark peephole optimization Try to clean up some spacing issues The peephole optimization is 150 lines, but results in code slightly faster than gcc -O0. By adding just a few hundred more lines to the peephole optimizer, performance can be. The current code strikes a balance between being small, educational, and performant.
HPCguy authored and HPCguy committedFeb 2, 2022 Configuration menu - View commit details
-
Copy full SHA for 54a2c6d - Browse repository at this point
Copy the full SHA 54a2c6dView commit details -
Simplify peephole frame variable to register transformation
I traced back a problem to a use-def analysis across a basic block boundary. This is not a problem in my private version of Squint which is more complete. I "dubded down" the algorithm, so it is no longer faster than gcc -O0, but on the other hand, it is not much slower considering how much dumber the algorithm is.
HPCguy authored and HPCguy committedFeb 2, 2022 Configuration menu - View commit details
-
Copy full SHA for 1ed26e0 - Browse repository at this point
Copy the full SHA 1ed26e0View commit details -
Add High Level document for Squint peephole optimizer.
Also, so a little more syntax cleanup of squint.c
HPCguy authored and HPCguy committedFeb 2, 2022 Configuration menu - View commit details
-
Copy full SHA for da9fcd4 - Browse repository at this point
Copy the full SHA da9fcd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for e51fd5c - Browse repository at this point
Copy the full SHA e51fd5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5200479 - Browse repository at this point
Copy the full SHA 5200479View commit details -
Configuration menu - View commit details
-
Copy full SHA for 071a779 - Browse repository at this point
Copy the full SHA 071a779View commit details -
Configuration menu - View commit details
-
Copy full SHA for cabe649 - Browse repository at this point
Copy the full SHA cabe649View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30d6de1 - Browse repository at this point
Copy the full SHA 30d6de1View commit details
Commits on Feb 3, 2022
-
Attempt to create test harness for squint optimization
I'll be honest. I am flying blind here. My environment does not support any of the features required for the AMaCC test environemtn. I just took a wild guess at what was needed, and will likely have trouble correcting any errors in what I've done.
HPCguy authored and HPCguy committedFeb 3, 2022 Configuration menu - View commit details
-
Copy full SHA for 966334a - Browse repository at this point
Copy the full SHA 966334aView commit details -
My editor automatically expands tabs to spaces. WHoops!
HPCguy authored and HPCguy committedFeb 3, 2022 Configuration menu - View commit details
-
Copy full SHA for 489a232 - Browse repository at this point
Copy the full SHA 489a232View commit details -
Again, just duessing since I can't run any of the test scripts, not even make.
HPCguy authored and HPCguy committedFeb 3, 2022 Configuration menu - View commit details
-
Copy full SHA for 71839b4 - Browse repository at this point
Copy the full SHA 71839b4View commit details -
Make a change to try and force a build
HPCguy authored and HPCguy committedFeb 3, 2022 Configuration menu - View commit details
-
Copy full SHA for 7cdbece - Browse repository at this point
Copy the full SHA 7cdbeceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 15fde22 - Browse repository at this point
Copy the full SHA 15fde22View commit details -
Merge branch 'squint0' of https://github.com/HPCguy/amacc into squint0
HPCguy authored and HPCguy committedFeb 3, 2022 Configuration menu - View commit details
-
Copy full SHA for cd443df - Browse repository at this point
Copy the full SHA cd443dfView commit details -
HPCguy authored and HPCguy committed
Feb 3, 2022 Configuration menu - View commit details
-
Copy full SHA for 5886dea - Browse repository at this point
Copy the full SHA 5886deaView commit details -
aFix Makefile typo and change PD/P0 to PHD/PHR0
HPCguy authored and HPCguy committedFeb 3, 2022 Configuration menu - View commit details
-
Copy full SHA for df3acee - Browse repository at this point
Copy the full SHA df3aceeView commit details -
Try to fix Makefile again without being able to run Makefile locally
HPCguy authored and HPCguy committedFeb 3, 2022 Configuration menu - View commit details
-
Copy full SHA for 90a1682 - Browse repository at this point
Copy the full SHA 90a1682View commit details -
Use make -d option to try and remotely debug the make problem
HPCguy authored and HPCguy committedFeb 3, 2022 Configuration menu - View commit details
-
Copy full SHA for d298f9b - Browse repository at this point
Copy the full SHA d298f9bView commit details -
Use make --debug=j to try and get insight into remote make command
HPCguy authored and HPCguy committedFeb 3, 2022 Configuration menu - View commit details
-
Copy full SHA for 3fc43e7 - Browse repository at this point
Copy the full SHA 3fc43e7View commit details -
HPCguy authored and HPCguy committed
Feb 3, 2022 Configuration menu - View commit details
-
Copy full SHA for 5d3d65d - Browse repository at this point
Copy the full SHA 5d3d65dView commit details
Commits on Feb 4, 2022
-
HPCguy authored and HPCguy committed
Feb 4, 2022 Configuration menu - View commit details
-
Copy full SHA for 7e9f5d6 - Browse repository at this point
Copy the full SHA 7e9f5d6View commit details
Commits on Feb 5, 2022
-
Try new Makefile created by jserv
Also, fix a use-def overstep dealing with AMaCC comparison construct.
HPCguy authored and HPCguy committedFeb 5, 2022 Configuration menu - View commit details
-
Copy full SHA for b1e6349 - Browse repository at this point
Copy the full SHA b1e6349View commit details
Commits on Feb 6, 2022
-
HPCguy authored and HPCguy committed
Feb 6, 2022 Configuration menu - View commit details
-
Copy full SHA for 93782cf - Browse repository at this point
Copy the full SHA 93782cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 962534c - Browse repository at this point
Copy the full SHA 962534cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c5252b - Browse repository at this point
Copy the full SHA 0c5252bView commit details
Commits on Feb 14, 2022
-
Merge branch 'master' into squint0
HPCguy authored and HPCguy committedFeb 14, 2022 Configuration menu - View commit details
-
Copy full SHA for 283243c - Browse repository at this point
Copy the full SHA 283243cView commit details
Commits on Feb 18, 2022
-
Address reviewer issues for Suint.c pull request.
There is a lot here to keep track of. It would be nice to address any further issues in a subsequent pull request. A very small Squint follow-up pull requests is planned to improve/finalize squint testing and to add an option to configure squint as a shared library in addition to current standalone mode.
HPCguy authored and HPCguy committedFeb 18, 2022 Configuration menu - View commit details
-
Copy full SHA for 4108d18 - Browse repository at this point
Copy the full SHA 4108d18View commit details -
Fix overlooked change needed as a part of fixing reviewer comments.
HPCguy authored and HPCguy committedFeb 18, 2022 Configuration menu - View commit details
-
Copy full SHA for 7cdac4b - Browse repository at this point
Copy the full SHA 7cdac4bView commit details
Commits on Feb 22, 2022
-
HPCguy authored and HPCguy committed
Feb 22, 2022 Configuration menu - View commit details
-
Copy full SHA for d347e5f - Browse repository at this point
Copy the full SHA d347e5fView commit details
Commits on Feb 26, 2022
-
HPCguy authored and HPCguy committed
Feb 26, 2022 Configuration menu - View commit details
-
Copy full SHA for 566d71f - Browse repository at this point
Copy the full SHA 566d71fView commit details
Commits on Mar 8, 2022
-
Move function call check for enhanced safety.
HPCguy authored and HPCguy committedMar 8, 2022 Configuration menu - View commit details
-
Copy full SHA for fb40810 - Browse repository at this point
Copy the full SHA fb40810View commit details