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

Rustc outputs LLVM IR that contains llvm intrinsics that should be inlined #1393

Closed
jackcmay opened this issue Sep 28, 2018 · 1 comment
Closed
Assignees

Comments

@jackcmay
Copy link
Contributor

This results in external call references in the BPF assembly code:

This is normally taken care of by the linker who will implementations of the necessary intrinsics into the resulting binary/shared module. In our case, we are compiling to BPF which stops at the .o stage and does not continue to the final linked binary/shared module.

Possible solutions:

  • Custom compilation pass that inlines references to the intrinsic calls with equivalent in-lined code
  • Export equivalent helper calls from the bpf vm so that they are resolved at run-time.
  • Enhance rustc to pass -fno-builtin or maybe -always-inline through to llvm which should result in equivalent in-lined code in place of all intrinsics and builtins.
@jackcmay jackcmay added this to the The Future! milestone Sep 28, 2018
@jackcmay jackcmay self-assigned this Sep 28, 2018
@jackcmay
Copy link
Contributor Author

jackcmay commented Jan 3, 2019

Included in #2178

@jackcmay jackcmay closed this as completed Jan 3, 2019
@garious garious modified the milestones: The Future!, v0.11 Tabletops Jan 8, 2019
vkomenda pushed a commit to vkomenda/solana that referenced this issue Aug 29, 2021
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

No branches or pull requests

2 participants