forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: zstd: Remove large inline functions from zstd_{double_,}fast.c
Backport of upstream PR #2863 [0]. Large functions with excessive force inlining can cause trouble for compilers, and can sometimes take excess stack space because the compiler isn't able to fully analyze the function. This commit splits functions that have multiple copies of the same body into multiple smaller functions, which can help the compiler. This was specifically causing issues on the parisc architecture [1]. In this configuration, especially with UBSAN enabled, these functions stack usage could get quite large. This is because the compiler was doing a poor job handling the extremely large function which had multiple copies of the function body inlined into it. After this commit we see: [0] facebook/zstd#2863 [1] https://lkml.org/lkml/2021/11/15/710 Reported-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Nick Terrell <[email protected]>
- Loading branch information
Showing
2 changed files
with
104 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters