Commit Graph

260 Commits

Author SHA1 Message Date
h30044958
7bbf2eab26 fix IF_SUCCESS requires depend node
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I97H8Y

Signed-off-by: h30044958 <herongpeng@huawei.com>
Change-Id: Id4150f9e2e4982f728386e5232f71321d963a509
2024-03-11 15:35:55 +08:00
ginxu
6c071437e2 Refactor GetConstpool
1. Change the way to get constpool from the current jsFunc to the current frameargs.
2. Having the same constpoolId before and after inline will no longer generate a new getconstpool opcode.
3. Deleted some useless code

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I95U7D
Signed-off-by: ginxu <xujie101@huawei.com>
Change-Id: I225cd89f736acaa4670eb3f216348c013d13a818
2024-03-06 16:21:43 +08:00
weng-xi
2b384bff97 AOT development branch code integration
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8PYAN
Signed-off-by: weng-xi <wengxi1@huawei.com>
Change-Id: Iff4ddb646f7f9d6455ca2a3328ab3f94f9dd8757
2023-12-25 18:17:52 +08:00
linxiang8
badaa33515 fix transition class bugfix.
Signed-off-by: linxiang8 <linxiang8@huawei.com>
Change-Id: I10b4f8f8e21a801beb2904092054b4c4959faa36
2023-11-22 09:19:34 +08:00
sunzhe23
ef1c190c0e Bugfix: fill values for saveRegister gate
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I88W5H

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2023-11-06 10:31:03 +08:00
yycc
8fce55f084 Bugfix: isinsamedominatorchain() and valueselector input count wrong
Description: Clear unlive frame values to avoid different value in
different dominator chain in async function
lowering. Now loopbegin has more than 2 inputs, async function should adapt it.

Signed-off-by: yycc <yuyicen1@huawei.com>
Change-Id: Id7a94a5d7748e91c48ca874a4da8c200f53c5c50
2023-11-06 09:19:53 +08:00
sunzhe23
7dce51adc3 Refactor bytecode graph builder
There will be following changes:
1. LoopHeader IR will have more than two input
2. Add DepenedRelay for DeoptCheck
3. Refactor dead region elimination for 'BytecodeCircuitBuilder'
4. Fix live range analysis bug for try catch
5. Refactor gate generating for 'phi' 'merge' 'loopexit' and genenator gates
6. Refactor frameState generating, all merge(LoopExit) and side-effect gate will have frameState
7. Refactor loopAnalysis for 'BytecodeCircuitBuilder'
8. Add GetLoopInfo for GraphLinearizer's 'GateRegion'
9. Fix a LoopAnalysis bug
10. Fix a TypeInfer bug for infer namespace object
11. Remove dead StateSplit in state split linearizer pass

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I88W5H

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2023-11-06 09:19:36 +08:00
zhangyukun8
cba971f0e7 Impl for-of and for-in HIR lowering
1.Inline getnextpropname HIR of for-in
2.profile iterator type of for-of
3.Inline getiterator and next(call) of for-of
4.Update detector when set prototype

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I89SMQ?from=project-issue
Signed-off-by: zhangyukun8 <zhangyukun8@huawei.com>
Change-Id: Ib18d8b9529c41ec435d5d2d97839d82c389267b6
2023-10-26 15:40:03 +08:00
like
2fc3873f4f fix exception does not throw after inline
Signed-off-by: like <zhenglike@huawei.com>
Change-Id: Ia88a43317c6c7740f8eb4ace2a8f1989fbdd3bb0
2023-10-18 10:07:08 +08:00
openharmony_ci
683d30509e
!4948 Bugfix: CreateObjectWithExcludedKeys 修复
Merge pull request !4948 from 刘智杰/excludedkeys
2023-10-09 12:40:00 +00:00
liuzhijie
14080277e8 CreateObjectWithExcludedKeys 修复
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I867FR?from=project-issue
Signed-off-by: liuzhijie <jay.lau2020.work@outlook.com>

Change-Id: I86512bd58c15ab2154ec412cafd6ef5d4dcae37c
2023-10-09 17:31:58 +08:00
weng-xi
4b44a8fae2 AOT type and snapshot support hsp
1. Moving AOT type creation to before compilation
2. Snapshot support multi-abc files

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I83SUG
Signed-off-by: weng-xi <wengxi1@huawei.com>
Change-Id: Ibc82dfd3b859b4a86acc47d8e47406c96de2be7a
2023-10-08 17:33:02 +08:00
zhangyukun8
f31710d73d AOT callstack supports inline functions
1.Add frame args chain on bytecodes which can throw
2.Record inline method offsets in frame args
3.Push method offsets of inlined methods into stackmaps when callout aot
4.Collect inline method offsets and output them
5.Fix literal offsets error before try-catch
6.Add testcases
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7Z24N?from=project-issue

Signed-off-by: zhangyukun8 <zhangyukun8@huawei.com>
Change-Id: I7f4927a2dfc6a71e44b59cb392acb9b2d3f408e2
2023-09-14 19:24:35 +08:00
openharmony_ci
e2c3b720c1
!4707 Add Redundant Phi Elimination Pass
Merge pull request !4707 from ChunyangWang/dead_phi
2023-09-14 07:35:17 +00:00
K0u1hw
4f89750d04 Add Redundant Phi Optimization Pass
Details: 1. Add Redundant Phi Elimination Pass.
         2. Use caller's type rather than callee's arg type when infer callee type.
Issues: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7WQZE

Signed-off-by: K0u1hw <wangchunyang15@huawei.com>
Change-Id: Id9c799270ea5cf9b6875ed917c7069bac9ba3b37
2023-09-07 15:27:49 +08:00
linxiang8
ff7cd71fe5 Bugfix applicaton compiler failed
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7Z5OU
Signed-off-by: linxiang8 <linxiang8@huawei.com>
Change-Id: I8e3cd9971226fcd77180ee76c67128fb81167585
2023-09-07 10:16:14 +08:00
linxiang8
88294ef9e6 open compiler mode
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7W6NE
Signed-off-by: linxiang8 <linxiang8@huawei.com>
Change-Id: Ib71ba73e79ab94c1dded646bac2abef99530501b
2023-08-28 15:34:37 +08:00
wupengyong
b389b49691 Reason:add aot call stack overflow check
Description:add aot call stack overflow check
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7PMSM?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I1a31c928fc406364aa81cc2a5a5037d920f1ed04
2023-08-07 16:24:38 +08:00
zhangyukun8
25f6530062 Function ptr support pgo inline
1. Collect method id of calltarget when call js function
2. Load gt by method id from pgo
3. Set call insts' calltarget type
4. Fix process method bug
5. Support pgo-aot testcases
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7NMOO?from=project-issue
Signed-off-by: zhangyukun8 <zhangyukun8@huawei.com>

Change-Id: Ib7e92ab1b529195367af16f923c2e620f40f8a36
2023-08-01 18:48:24 +08:00
linxiang8
34c3b89b4c Bugfix: fix some compiler bug
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6NLEV
Signed-off-by: linxiang8 <linxiang8@huawei.com>
Change-Id: I1f877a658cb7838d73bce1a11ed647881c124249
2023-07-26 20:59:01 +08:00
weng-xi
b1719d8fd8 Optimize the CreateClassWithBuffer instruction of AOT
Optimize the CreateClassWithBuffer instruction of AOT

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7KW21
Signed-off-by: weng-xi <wengxi1@huawei.com>
Change-Id: I42ae8d0516cf4c74a2749ef3d4cae6cb91ec4b2f
2023-07-21 14:56:28 +08:00
wupengyong
f0efab85b0 Reason:add aot no gc call
Description:add aot no gc call
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7KF8J?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I7d6599ce55c493894c42e42570b31be945c59701
2023-07-18 16:18:24 +08:00
weng-xi
8df3bd91e0 Part2: AOT obj literal use pgo type
AOT support obj literal

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7GFJA
Signed-off-by: weng-xi <wengxi1@huawei.com>
Change-Id: I7acdb5801f572689cf1f83b5c621350efeef660f
2023-07-04 10:52:12 +08:00
ginxu
9511cd87ec Some TSAOT Wrokload Optimization
1. Add nocheck option to remove aot check
2. Add LLVM Optimization pass
3. Remove Inline UpdateHotness
4. Modify TypedArray on heap size frome 64 to 512
5. Add us Timing tool

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7HP4E

Signed-off-by: ginxu <xujie101@huawei.com>
Change-Id: I151f3ffd5769ae142fef9e0cf719e27ce5d5f5e7
2023-07-02 18:09:41 +08:00
linxiang8
5e6aa1b986 Bugfix: fix some compiler bugs
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6G3DYs
Signed-off-by: linxiang8 <linxiang8@huawei.com>
Change-Id: Ib6bda13f3309347dbef45f3739bbb3d5aefc3eb6
2023-06-28 14:00:29 +08:00
yingguofeng@huawei.com
c85c0e5238 Feat(Aot): PGO hclass dump Inheritance relationship and suppor poly
Issue: #I79QXC
Change-Id: Ia955bc33c78531daccfa5ae5b6ce1c047c3ae8b6
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2023-06-17 19:33:10 +08:00
sunzhe23
a9774d4efe Support Floating state gate
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I79K9W

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2023-06-09 10:13:24 +08:00
ginxu
9547f8b3bd Remove ConstData
1. Remove constadata to prevent node from entering entry bb

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7BDJV
Signed-off-by: ginxu <xujie101@huawei.com>
Change-Id: I1d9f799150cec3f895b82866b1251145fdda713c
2023-06-08 11:54:16 +08:00
yingguofeng@huawei.com
bfc478a38b Feat(Aot): PGO extension supports hclass dump
Issue: #I78U0R
Change-Id: If7079aeb03cc265b68487f4997fc20d35626fe7f
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2023-06-01 19:54:22 +08:00
yingguofeng@huawei.com
cca4ba8fe4 Feat(PGO): PGO Support profile number type of object field
Issue: #I739C3
Change-Id: Ie57b6174d7b68121e81b72ffd8d71ec1b0d5f80f
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2023-05-24 15:36:53 +08:00
wupengyong
c0fa165ab0 Reason:add fast call and change calling conversion to cc
Description:add fast call and change calling conversion to cc
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6TTCX?from=project-issue

Signed-off-by: wupengyong <wupengyong@huawei.com>
Change-Id: I7c35619d73a4d961799232bc22b78b6513f65e71
2023-05-18 19:23:25 +08:00
ginxu
d88428b060 Some TsAot Inline Modification
1. Resolves conflicts between inline and loop optimizations
2. Adds an inline target check to prevent changes
3. Modify the framestate metadata structure
4. Add inline testcase

ISSUE:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I73MZY

Signed-off-by: ginxu <xujie101@huawei.com>
Change-Id: I4256b3edce3e901afb67d48b0e649f39f6c251a4
2023-05-18 11:24:10 +08:00
sunzhe23
495983e5d2 Refactor State split,add state split linearizer
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I73OTM

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2023-05-17 09:30:03 +08:00
K0u1hw
87cdd57714 Description: Loop Analysis & Loop Peeling
Issues: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I71TRP
Signed-off-by: K0u1hw <wangchunyang15@huawei.com>

Change-Id: I9e8981b9b87679135edd11206e300411c4459eea
2023-05-13 14:58:49 +08:00
sunzhe23
2505d71290 Optimize UpdateHotness
remove unused UpdateHotness, add TypeConvert/Constant convert

Issue: https://e.gitee.com/open_harmony/dashboard?issue=I703O9

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2023-05-08 17:56:47 +08:00
dingding
71fa18c9fd Fix FrameState ComputeLiveOut
1.Fix FrameState ComputeLiveOut when mov alive null gate, should find define.
2.Fix error READ_ACC flag between RETURN and RETURNUNDEFINED
3.Add regression test case

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6YVCM

Signed-off-by: dingding <dingding5@huawei.com>
Change-Id: I2e3aa8b293abb63ed8f1f2cd42244d95a0c2081b
2023-04-27 19:16:57 +08:00
weng-xi
3e37a79f72 Fix the bug that the Phi node is not generated
If the loop head is the first bb block, the variables used in the head cannot correctly generate Phi node

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6Y4JU
Signed-off-by: weng-xi <wengxi1@huawei.com>
Change-Id: I57927992e19ef9c53c598197609a17ba69b6f3ff
2023-04-24 11:14:09 +08:00
weng-xi
02f07cb331 Fix the compilation bug in the process of bytecode to circuit
When there is only one predecessor (input) of the BB, the value_selector gate is no longer generated.
However, the logic of frame_state.cpp was not modified, resulting in compilation failure

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6X14O
Signed-off-by: weng-xi <wengxi1@huawei.com>
Change-Id: Icbcec395e66b68ab372894032f9dae709a0b864b
2023-04-20 19:05:50 +08:00
linxiang8
050c261457 Fix some compiler bug
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6VU0D

Signed-off-by: linxiang8 <linxiang8@huawei.com>
Change-Id: I72c99ec297f6dbc06a2c75b23af67565d105efc3
2023-04-18 15:18:10 +08:00
openharmony_ci
c71c5b83b9
!3877 async generator & for-await-of aot adapt
Merge pull request !3877 from maojunwei/async_aot
2023-04-17 01:59:51 +00:00
dov1s
946c4b08f1 Async generator & for-await-of AOT adapt
Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6T82W

Signed-off-by: dov1s <maojunwei1@huawei.com>
Change-Id: I27db458545b09d50a71c92640f4e8e4c2dfd4277
2023-04-14 16:57:16 +08:00
sunzhe23
f717c511ce Add loop exit for loop peeling
Issue: I6QTH5
Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2023-04-04 18:17:50 +08:00
openharmony_ci
47e1932b58
!3844 [Inline Call part3] Remove Aot Function Env Arg
Merge pull request !3844 from 许杰/inline_call_part3
2023-03-31 07:01:00 +00:00
xujie
14878d00f9 [Inline Call part3] Remove Aot Function Env Arg
1. Remove env in aot call signature.
2. Remove env in optimizedJSFunctionFrame.
3. Modify x64 and arm64 asm bridge.

Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6RR4F

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: I5fbb63c662d82a41073e2ff4456fdc42fb651f6a
2023-03-31 09:36:42 +08:00
yingguofeng@huawei.com
a6ddc25b6e feat>(compiler): PGO type profiler
1、PGO Support type profiler for asm interpreter
    2、Optimization function call profiler
    3、ap version promote to 0.0.0.2
    4、Adaptor number speculative phase supporting pgo type

link #I6JPH4

Change-Id: I18043c4f99af93e5ba6eb2e895039fe0edfe5b4e
Signed-off-by: yingguofeng@huawei.com <yingguofeng@huawei.com>
2023-03-30 20:39:06 +08:00
xujie
6d377f01d8 [Inline Call part2] Refactor Common Args Accessor
1. Modify JSBytecode and FramState opcode which have framestate in.
2. Changes the way common args are fetched during lowering.
3. Common args are no longer fetched from the stack during deopt.

Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6L28B
Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: I1e26ad526209f27edc42aa2a5f364b1566ed4d26
2023-03-28 10:27:30 +08:00
xujie
a7e31a9987 [Inline Call part1] Env Refactor
1. Remove env slot from optimizedJSfunctionframe.
2. Use env vreg to pass in circuit ir graph.
3. Remove some discarded interface and fast some bc lowering associated with env.

Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6GY5M

Signed-off-by: xujie <xujie101@huawei.com>
Change-Id: I34d65b59e103e9c8d3b203dbf82b8f2bea7e9feb
2023-03-04 16:12:22 +08:00
zhangyukun8
62a3e35295 AOT support js stacktrace
1. add pcOffset into stackmap before call In AOT
2. parse stackmap to find pcOffset before any OptimziedJSFunctionFrame
3. remove use code of stubs in AOT
4. add testcase for js stacktrace of AOT

Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6GXRR?from=project-issue

Signed-off-by: zhangyukun8 <zhangyukun8@huawei.com>
Change-Id: Ib21646b7319628fb425ac8ce489dc2370a347b81
2023-03-03 10:08:54 +08:00
lijincheng
0e4b8b5a72 Improve TypeInfer ability through cocos-test
1.Refine some number Type to Int
2.Bugfix for stlexvar when using var instead of let
3.Change .length of array/typedarray to int
4.Adjust strategy for loop phi infer and add another round of infer
5.Refine div/add to double
6.Bugfix for EmptyType GetException in catch phi with a gc-related type

issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6B9OH

Signed-off-by: lijincheng <lijincheng13@huawei.com>
2023-02-25 10:53:48 +08:00
sunzhe23
e00e3e3643 Simplifield circuit graph
1 delete dependAnd
2 Refactor ReplaceHirXXX
3 add no throw flag for bc meta data

issues:#I6EO24

Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
2023-02-14 16:46:19 +08:00