Modify MAX_INLINE_CALL_ALLOWED

Issues: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7YHIN
Signed-off-by: K0u1hw <wangchunyang15@huawei.com>

Change-Id: I2f91b7f1ad8c01cb6443e28caaccbb195ddf98c0
This commit is contained in:
K0u1hw 2023-09-04 20:18:39 +08:00
parent 788dac7473
commit 8b1653cd81
5 changed files with 17 additions and 2 deletions

View File

@ -107,7 +107,7 @@ private:
class TSInlineLowering {
public:
static constexpr size_t MAX_INLINE_CALL_ALLOWED = 5;
static constexpr size_t MAX_INLINE_CALL_ALLOWED = 6;
TSInlineLowering(Circuit *circuit, PassContext *ctx, bool enableLog, const std::string& name,
NativeAreaAllocator* nativeAreaAllocator, PassOptions *options, uint32_t methodOffset)
: circuit_(circuit),

View File

@ -21,4 +21,6 @@ foo3
foo4
[trace] aot inline function name: foo5@ts_inline_max_call caller function name: func_main_0@ts_inline_max_call
foo5
[trace] aot inline function name: foo6@ts_inline_max_call caller function name: func_main_0@ts_inline_max_call
foo6
foo7

View File

@ -39,10 +39,15 @@ function foo6() {
print("foo6");
}
function foo7() {
print("foo7");
}
// max inline call allowed is 5
foo1()
foo2()
foo3()
foo4()
foo5()
foo6()
foo6()
foo7()

View File

@ -27,5 +27,8 @@ bar
[trace] aot inline function name: foo5@ts_multi_inline_max_call caller function name: foo@ts_multi_inline_max_call
[trace] aot inline function name: bar@ts_multi_inline_max_call caller function name: foo5@ts_multi_inline_max_call
bar
[trace] aot inline function name: foo6@ts_multi_inline_max_call caller function name: foo@ts_multi_inline_max_call
[trace] aot inline function name: bar@ts_multi_inline_max_call caller function name: foo6@ts_multi_inline_max_call
bar
[trace] aot inline function name: bar@ts_multi_inline_max_call caller function name: foo7@ts_multi_inline_max_call
bar

View File

@ -22,6 +22,7 @@ function foo() {
foo4();
foo5();
foo6();
foo7();
}
function foo1() {
@ -48,6 +49,10 @@ function foo6() {
bar();
}
function foo7() {
bar();
}
function bar() {
print("bar")
}