Skip to content

Conversation

@dmakarov
Copy link

No description provided.

- the calls to rust alloc/dealloc routines need to be preserved and
not replaced by compiler generated builtin inlined code
LibFunc &F) const {
// Intrinsics don't overlap w/libcalls; if our module has a large number of
// intrinsics, this ends up being an interesting compile time win since we
// avoid string normalization and comparison.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes probably not necessary

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep it... the trailing white space is bad in source code (my editor automatically deletes it on saving a file)

}

if (T.isBPF()) {
TLI.setUnavailable(LibFunc_rust_alloc);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does llvm have to have any knowledge of these rust functions?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does. It replaces them with internal built-ins, which these calls to TLI.setUnavailable() prevent from happening.

@dmakarov dmakarov merged commit 55b88a4 into anza-xyz:solana-rustc/10.0-2020-05-05 Feb 17, 2021
LucasSte pushed a commit that referenced this pull request Feb 16, 2024
* [BPF] Make rust allocation builtins unavailable for BPF target

- the calls to rust alloc/dealloc routines need to be preserved and
not replaced by compiler generated builtin inlined code
LucasSte pushed a commit to LucasSte/llvm-project that referenced this pull request Jun 28, 2024
…a-xyz#4)

* [BPF] Make rust allocation builtins unavailable for BPF target

- the calls to rust alloc/dealloc routines need to be preserved and
not replaced by compiler generated builtin inlined code
LucasSte pushed a commit that referenced this pull request Aug 19, 2024
* [BPF] Make rust allocation builtins unavailable for BPF target

- the calls to rust alloc/dealloc routines need to be preserved and
not replaced by compiler generated builtin inlined code
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