kbuild: Add support for Clang's polyhedral loop optimizer
* Default N
This commit is contained in:
parent
032c56014f
commit
d8b5868b62
2 changed files with 24 additions and 0 deletions
15
Makefile
15
Makefile
|
@ -721,6 +721,21 @@ KBUILD_CFLAGS += $(call cc-option,-fno-reorder-blocks,) \
|
|||
$(call cc-option,-fno-partial-inlining)
|
||||
endif
|
||||
|
||||
ifdef CONFIG_LLVM_POLLY
|
||||
KBUILD_CFLAGS += -mllvm -polly \
|
||||
-mllvm -polly-ast-use-context \
|
||||
-mllvm -polly-invariant-load-hoisting \
|
||||
-mllvm -polly-run-inliner \
|
||||
-mllvm -polly-vectorizer=stripmine
|
||||
# Polly may optimise loops with dead paths beyound what the linker
|
||||
# # can understand. This may negate the effect of the linker's DCE
|
||||
# # so we tell Polly to perfom proven DCE on the loops it optimises
|
||||
# # in order to preserve the overall effect of the linker's DCE.
|
||||
ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
|
||||
KBUILD_CFLAGS += -mllvm -polly-run-dce
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_FRAME_WARN),0)
|
||||
KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
|
||||
endif
|
||||
|
|
|
@ -594,6 +594,15 @@ config SHADOW_CALL_STACK_VMAP
|
|||
provides better stack exhaustion protection, but increases per-thread
|
||||
memory consumption as a full page is allocated for each shadow stack.
|
||||
|
||||
config LLVM_POLLY
|
||||
bool "Enable LLVM's polyhedral loop optimizer (Polly)"
|
||||
default n
|
||||
help
|
||||
This option enables LLVM's polyhedral loop optimizer known as Polly.
|
||||
Polly is able to optimize various loops throughout the kernel for
|
||||
maximum cache locality. This requires an LLVM toolchain explicitly
|
||||
compiled with Polly support.
|
||||
|
||||
config HAVE_ARCH_WITHIN_STACK_FRAMES
|
||||
bool
|
||||
help
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue