You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7450 Reporter: markghayden Assigned to:@chambart Status: assigned (set by @chambart on 2017-01-03T21:03:08Z) Resolution: open Priority: normal Severity: feature Platform: AMD64 OS: MacOS OS Version: 10.12.2 Version: 4.04.0 Category: middle end (typedtree to clambda) Tags: flambda
Bug description
Compile a file such as:
let v0 = [0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17] ;;
Then review the order of the constant blocks in the resulting assembly (attached). They appear to be in a random order, perhaps as though they were dumped from a hash table.
It is understood that with shared constant blocks the order may at times depend on the specifics of the sharing. However, it seems like a better idea would be to follow some heuristic order rather than scrambling them. with a goal to achieve better locality and cache-behavior. For instance, in this case it might be better if the order were in depth-traversal so that scanning the list resulted in reading forward through memory. Perhaps enumerating constant blocks first by file-order in which the containing block first appeared and then by depth traversal order would be simple and effective.
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
I think this one has been fixed some time ago. At least with the provided example, the constant blocks appear in the source file order in this particular case.
Feel free to reopen if you find other examples of bad ordering.
Original bug ID: 7450
Reporter: markghayden
Assigned to: @chambart
Status: assigned (set by @chambart on 2017-01-03T21:03:08Z)
Resolution: open
Priority: normal
Severity: feature
Platform: AMD64
OS: MacOS
OS Version: 10.12.2
Version: 4.04.0
Category: middle end (typedtree to clambda)
Tags: flambda
Bug description
Compile a file such as:
let v0 = [0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17] ;;
Then review the order of the constant blocks in the resulting assembly (attached). They appear to be in a random order, perhaps as though they were dumped from a hash table.
It is understood that with shared constant blocks the order may at times depend on the specifics of the sharing. However, it seems like a better idea would be to follow some heuristic order rather than scrambling them. with a goal to achieve better locality and cache-behavior. For instance, in this case it might be better if the order were in depth-traversal so that scanning the list resulted in reading forward through memory. Perhaps enumerating constant blocks first by file-order in which the containing block first appeared and then by depth traversal order would be simple and effective.
Steps to reproduce
Compiled with 4.05.0+flambda trunk.
File attachments
The text was updated successfully, but these errors were encountered: