Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Factor key computations out of the ready list into the KeysHelper class, and implements and use a simpler ready list data structure for ACO.
Dr. Shobaki suggested a code review to try and figure out the issues I have been having debugging these changes.
I have noticed that the spill costs are roughly the same compared to the master branch, but the schedule lengths are longer. I have noticed this most easily on a specific region in cactus (_ZL24ML_BSSN_constraints_BodyPK4_cGHiiPKdS3_S3_PKiS5_iPKPd:436) where pass two often starts with a schedule around length ~12,500. In pass 2, master branch will quickly find a schedule around length 10,000, whereas this branch does not find a schedule below length 12,000.
My two thoughts as to possible leads are that there could be an error in how this new ready list is used, causing it to select instructions in a worse manner than before. There also could be an error in how the heuristics are calculated, leading to poor schedule quality.
Here are the heuristics I am using in sched.ini:
I also want to mention that I have noticed one bug with the LLVM Heuristic that I have fixed. On line 63 of ready_list.cpp, the line
MaxNID = MaxKVs[LSH_NID];
should beMaxNID = MaxNID = DDG->GetInstCnt() - 1;
, since the former only sets MaxNID for if the NID Heuristic is used, but not if LLVM is used without NID. I do not have permission to push changes to this repository, so I cannot fix this bug on this branch.Another observation from using that same region in Cactus, while printing the schedule that is passed into the beginning of pass two, both branches give a schedule that has the instructions in the same order, but the cycles they are scheduled on are different across the two branches.I did not realize that instruction numbers are not guaranteed to be consistent between passes, so these are probably not the same instructions in the same order
Example:vs.