Skip to content

[layout] Pack slot indexes before register allocation#62

Merged
blackgeorge-boom merged 1 commit into
developmentfrom
unifico-issue-291
Sep 29, 2023
Merged

[layout] Pack slot indexes before register allocation#62
blackgeorge-boom merged 1 commit into
developmentfrom
unifico-issue-291

Conversation

@blackgeorge-boom

@blackgeorge-boom blackgeorge-boom commented Sep 29, 2023

Copy link
Copy Markdown
Owner

Applies LLVM patches/PRs:
66334
67038

Packing the slot indexes before register allocation is useful for us because it evens the gaps between slots after all the optimization passes that happen before greedy and may have removed a different number of instructions between AArch64 and X86. This leads to different slot gaps and, hence, slightly different regalloc in some cases.

We backport the above patches for our LLVM, with the main difference being the absence of some convenient data structure iterators, which we had to convert to be compatible with our ADT infrastructure.

We add the -pack-indexes flag to activate this.

Addressses: systems-nuts/unifico#291

Applies:
llvm#66334
llvm#67038

Packing the slot indexes before register allocation is useful for us
because it evens the gaps between slots after all the optimization
passes that happen before `greedy` and may have removed a different number
of instructions between AArch64 and X86. This leads to different slot gaps
and, hence, slightly different regalloc in some cases.

We backport the above patches for our LLVM, with the main difference
being the absence of some convenient data structure iterators, which we
had to convert to be compatible with our ADT infrastructure.

We add the `-pack-indexes` flag to activate this.

Addressses: systems-nuts/unifico#291
@blackgeorge-boom blackgeorge-boom merged this pull request into development Sep 29, 2023
@blackgeorge-boom blackgeorge-boom deleted the unifico-issue-291 branch September 29, 2023 16:33
@jayfoad

jayfoad commented Oct 3, 2023

Copy link
Copy Markdown

Would you care to comment on the upstream PR? Not too many people have taken an interest in it. Thanks.

@blackgeorge-boom

Copy link
Copy Markdown
Owner Author

@jayfoad Sure, I'll try to have a look today!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants