[all-commits] [llvm/llvm-project] 2556f5: [FuncSpec] Don't specialize function which are eas...
Chuanqi Xu via All-commits
all-commits at lists.llvm.org
Mon Aug 23 04:22:19 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2556f58148836f0af3ad2c73fe54bbdf49f0295a
https://github.com/llvm/llvm-project/commit/2556f58148836f0af3ad2c73fe54bbdf49f0295a
Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
Date: 2021-08-23 (Mon, 23 Aug 2021)
Changed paths:
M llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
A llvm/test/Transforms/FunctionSpecialization/function-specialization-always-inline.ll
M llvm/test/Transforms/FunctionSpecialization/function-specialization-constant-integers.ll
M llvm/test/Transforms/FunctionSpecialization/function-specialization-loop.ll
M llvm/test/Transforms/FunctionSpecialization/function-specialization-stats.ll
M llvm/test/Transforms/FunctionSpecialization/function-specialization2.ll
Log Message:
-----------
[FuncSpec] Don't specialize function which are easy to inline
It would waste time to specialize a function which would inline finally.
This patch did two things:
- Don't specialize functions which are always-inline.
- Don't spescialize functions whose lines of code are less than threshold
(100 by default).
For spec2017int, this patch could reduce the number of specialized
functions by 33%. Then the compile time didn't increase for every
benchmark.
Reviewed By: SjoerdMeijer, xbolva00, snehasish
Differential Revision: https://reviews.llvm.org/D107897
More information about the All-commits
mailing list