已合并
Range Analysis of MUL and MOD #4561
AtomGit-Bot创建于 2023年8月1日
Range Analysis of MUL and MOD #4561
已合并
AtomGit-Bot创建于 2023年8月1日
refs/pull/4561/head合入到master
AtomGit-Bot
2023年8月1日

相关的Issue

https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7PNGT

原因(目的、解决的问题等)

描述(做了什么,变更了什么)

新增 Range Analysis of MUL and MOD以消除不必要的CHECK

fix TypeInfo of MOD and BitwiseOP

测试用例(新增、改动、可能影响的功能)

UT/test262/启动应用/调试应用

//mod CheckRightIsZero
function testcase7() {
    const a: number= 20;
    let b: number = 5 % a;// not gen CheckRightIsZero
    let c: number = 5 % b;// gen CheckRightIsZero
}

//mul_with_overcheck
function testcase8(a:number, x:number) {
    let z = a >>> 1;
    let b: number = z % 10;//range[0, 4095]

    let c: number = 10 * b;//not gen mul_with_overcheck, range[0,262143]
    let d: number = c * b;//not gen mul_with_overcheck, range[0,1073741823]
    let e: number = d * c;//gen mul_with_overcheck

    x = x >>> 1;
    let h: number = x * x;//gen mul_with_overcheck
}
testcase7();
testcase8(4, 107341001);//deopt
likedislike
Pull Request已成功合入, 合并人@
(感谢 AtomGit-Bot 的贡献)
openharmony_ci
openharmony_ci成员
2023年8月1日 评论:

感谢提交 Pull Requests!如果您提交的PR已经开发完毕,请评论 "start build" 触发门禁,更多交互操作,请访问OpenHarmony社区支持命令清单。如果需要调整订阅PR、Issue的变更状态,请访问订阅链接


Thanks for submitting the pull request. If your Pull Request has already been developed, you can leave a "start build" comment to trigger the gated system. For more commands, please visit OpenHarmony Command List. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
openharmony_ci
openharmony_ci成员
2023年8月1日 评论:

感谢提交 Pull Requests!如果您提交的PR已经开发完毕,请评论 "start build" 触发门禁,更多交互操作,请访问OpenHarmony社区支持命令清单。如果需要调整订阅PR、Issue的变更状态,请访问订阅链接


Thanks for submitting the pull request. If your Pull Request has already been developed, you can leave a "start build" comment to trigger the gated system. For more commands, please visit OpenHarmony Command List. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
openharmony_ci
openharmony_ci成员
2023年8月2日 评论:

感谢提交 Pull Requests!如果您提交的PR已经开发完毕,请评论 "start build" 触发门禁,更多交互操作,请访问OpenHarmony社区支持命令清单。如果需要调整订阅PR、Issue的变更状态,请访问订阅链接


Thanks for submitting the pull request. If your Pull Request has already been developed, you can leave a "start build" comment to trigger the gated system. For more commands, please visit OpenHarmony Command List. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
K0u1hw
K0u1hw2023年8月2日进行代码检视1
ecmascript/compiler/number_gate_info.h
@@ -105,2 +105,3 @@
105- static const inline std::vector<int32_t> rangeBounds_ = { INT32_MIN, INT32_MIN + 1,
105+ static constexpr int32_t UINT18_MAX = (1 << 18) - 1;
106+ static const inline std::vector<int32_t> rangeBounds_ = { INT32_MIN, INT32_MIN + 1, -UINT18_MAX, -TYPED_ARRAY_ONHEAP_MAX,
106107 -1, 0, 1, TYPED_ARRAY_ONHEAP_MAX - 1, TYPED_ARRAY_ONHEAP_MAX, TYPED_ARRAY_ONHEAP_MAX + 1,
K0u1hw
K0u1hw2023年8月2日评论:

TYPED_ARRAY_ONHEAP_MAX << 6换个名字

likedislike
K0u1hw
K0u1hw2023年8月2日进行代码检视1
ecmascript/compiler/number_gate_info.h
@@ -160,0 +185,4 @@
185+ 
186+ int32_t GetMaxMulResult(const RangeInfo &rhs) const
187+ {
188+ return std::max({ TryMul(min_, rhs.min_), TryMul(min_, rhs.max_), TryMul(max_, rhs.min_), TryMul(max_, rhs.max_) });
K0u1hw
K0u1hw2023年8月2日评论:

尝试调用MaybeMulOverflow

likedislike
此处折叠了105条消息 查看更多
openharmony_ci
openharmony_ci成员
2023年8月3日 评论:

感谢提交 Pull Requests!如果您提交的PR已经开发完毕,请评论 "start build" 触发门禁,更多交互操作,请访问OpenHarmony社区支持命令清单。如果需要调整订阅PR、Issue的变更状态,请访问订阅链接


Thanks for submitting the pull request. If your Pull Request has already been developed, you can leave a "start build" comment to trigger the gated system. For more commands, please visit OpenHarmony Command List. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
openharmony_ci
openharmony_ci成员
2023年8月3日 评论:

感谢提交 Pull Requests!如果您提交的PR已经开发完毕,请评论 "start build" 触发门禁,更多交互操作,请访问OpenHarmony社区支持命令清单。如果需要调整订阅PR、Issue的变更状态,请访问订阅链接


Thanks for submitting the pull request. If your Pull Request has already been developed, you can leave a "start build" comment to trigger the gated system. For more commands, please visit OpenHarmony Command List. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
openharmony_ci
openharmony_ci成员
2023年8月3日 评论:

本地或库上代码有更新,全量重新构建,重置所有关联PR的验证状态
门禁构建开始,包含静态检查、代码编译和测试【ohos-sdk编译, dayu200测试, hispark_taurus_ark_unittest编译, 格式化检查, dayu200_tdd编译, hap_build编译, dayu200编译】,预计在60分钟内完成,门禁结果会同步发送到码云注册邮箱。您可以通过如下链接跟踪门禁进展:http://ci.openharmony.cn/workbench/cicd/detail/64cb14f664650f998b205e00/runlist

likedislike
openharmony_ci
openharmony_ci成员
2023年8月3日 评论:

代码门禁通过
您可以通过如下链接查看门禁报告:http://ci.openharmony.cn/workbench/cicd/detail/64cb14f664650f998b205e00/runlist

静态检查:

# check type result report
1 codeCheck pass >>>

编译测试:
# Device build result test result package
1 ohos-sdk success NA >>>
2 hispark_taurus_ark_unittest success NA >>>
3 dayu200 success success >>>
4 dayu200_tdd success NA >>>
5 hap_build success NA >>>
6 format_check success NA >>>

likedislike
openharmony_ci
openharmony_ci成员
2023年8月3日 评论:

您好,Committer @gongjunsong @sunzhe23 @weng-changcheng @wuzhefengh ,请分配检视人员检视该PR,可以通过命令"assign [@someone_gitee_id]"分配检视人员,也可以直接评论"assign"分配给自己进行检视。


Hello, Committer @gongjunsong @sunzhe23 @weng-changcheng @wuzhefengh . Please assign someone to review the PR. You can assign a reviewer by using the command "assign [@someone_gitee_id]", or you can comment "assign" to review the PR by yourself.

likedislike