Skip to content
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

Support embedding LLVM bitcode on AIX #109524

Merged
merged 2 commits into from
Jun 30, 2023
Merged

Conversation

bzEq
Copy link
Contributor

@bzEq bzEq commented Mar 23, 2023

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented Mar 23, 2023

r? @WaffleLapkin

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 23, 2023
@WaffleLapkin
Copy link
Member

r? compiler

@rustbot rustbot assigned b-naber and unassigned WaffleLapkin Mar 23, 2023
@b-naber
Copy link
Contributor

b-naber commented Mar 23, 2023

r? @nagisa

@rustbot rustbot assigned nagisa and unassigned b-naber Mar 23, 2023
@nagisa
Copy link
Member

nagisa commented Mar 29, 2023

Could you please reference some documentation on the section names AIX expects? IPA in .ipa appears to stand for inter-procedural-analysis. Is whatever stored there otherwise some sort of bytecode?

I’m particularly curious what happens if you try to link together some system library with an .ipa section with a rust library containing an .ipa section. Does that work correctly?

@bzEq
Copy link
Contributor Author

bzEq commented Apr 10, 2023

Could you please reference some documentation on the section names AIX expects?

No, there isn't currently. We haven't support -fembed-bitcode in clang for XCOFF yet. See https://github.com/llvm/llvm-project/blob/267708f9d5150c5153e92e913c021918b790ac4f/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp#L5102.

The purpose of this PR currently is to workaround linking issue we have encountered during bootstrap, since the linker doesn't recognize the inline assembly generated by

.

IPA in .ipa appears to stand for inter-procedural-analysis. Is whatever stored there otherwise some sort of bytecode?

We are planning to support LTO on AIX, and this might be the name of the section to store LLVM bitcode.

I’m particularly curious what happens if you try to link together some system library with an .ipa section with a rust library containing an .ipa section.

AIX linker will ignore .ipa sections and they won't appear in the final object file if no symbol references this section.

@bzEq
Copy link
Contributor Author

bzEq commented May 29, 2023

@rustbot ready

@nagisa
Copy link
Member

nagisa commented Jun 29, 2023

Ah, sorry for missing this!

AIX linker will ignore .ipa sections and they won't appear in the final object file if no symbol references this section.

Awesome, this is the behaviour that resolves any worries I might have had about keeping this section.

@bors r+

@bors
Copy link
Contributor

bors commented Jun 29, 2023

📌 Commit 7b79cb1 has been approved by nagisa

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 29, 2023
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Jun 30, 2023
@bors
Copy link
Contributor

bors commented Jun 30, 2023

⌛ Testing commit 7b79cb1 with merge 56d507d...

@bors
Copy link
Contributor

bors commented Jun 30, 2023

☀️ Test successful - checks-actions
Approved by: nagisa
Pushing 56d507d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 30, 2023
@bors bors merged commit 56d507d into rust-lang:master Jun 30, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 30, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (56d507d): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.9% [0.5%, 1.3%] 2
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
-0.8% [-1.5%, -0.4%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-1.5%, 1.3%] 6

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.8% [2.8%, 2.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 659.918s -> 660.386s (0.07%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants