Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ layout: learningpathall

#### Semantic changes between LLVM 19 and LLVM 20

With LLVM 19 at least one more version other than the default is needed to trigger function multiversioning. With LLVM 20 a header file declaration:
With LLVM 19 at least one more version other than the default is needed to trigger function multiversioning.

With LLVM 20 a header file declaration:

```c
__attribute__((target_version("default"))) void f(void);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@ When compiling `file2.c` a resolver is emitted for `func1` due to the presence o

Normally the called symbol is resolved at runtime (dynamically), however it may be possible to determine which function version to call at compile time (statically).

This may be possible when the caller function is compiled with a sufficiently high set of architecture features (explicitly by using the `target` attribute as an optimization hint, or the multiversioning attributes `target_version`/`target_clones`, and implicitly via command line options). See [the example](/learning-paths/cross-platform/function-multiversioning/changes-from-past-releases).
This may be possible when the caller function is compiled with a sufficiently high set of architecture features (explicitly by using the `target` attribute as an optimization hint, or the multiversioning attributes `target_version`/`target_clones`, and implicitly via command line options). Refer the the example in the next section for details.

The compiler optimizes calls to versioned functions which can be statically resolved into direct calls. As a result the versioned function may be inlined into the call site.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: About Function Multiversioning
title: About function multiversioning
weight: 2

### FIXED, DO NOT MODIFY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight: 6
layout: learningpathall
---

Function Multi Versioning is compatible with Arm streaming mode as long as the same calling convention is used across all function versions.
Function multiversioning is compatible with Arm streaming mode as long as the same calling convention is used across all function versions.

Use a text editor to create a file named `streaming.c` with the code below:

Expand Down