Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
Open Source
>
Development Tools
>
Compile/Build/Deploy
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
1.4K
Star
7.6K
Fork
1.4K
GVP
方舟编译器
/
OpenArkCompiler
Code
Issues
200
Pull Requests
14
Wiki
Insights
Pipelines
Service
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
rematerialization opportunity
Backlog
#I471RO
lisa_xhy
member
Opened this issue
2021-08-24 17:40
spec 502 , df-core.c Function df_worklist_dataflow_doublequeue the third arg "considered" is used as "considered)->elms [(e->src->index) / ((unsigned) (8 * 8))]" in the inner-most loop before subcall bitmap_set_bit . then we have an extra add to access elems before the loop Basically we assign registers for both "considered" and "&(considered->elms)", which the latter could be a perfect candidate of rematerialization. ```c regassign ptr %542 (iaddrof ptr <* <$simple_bitmap_def>> 4 (regread ptr %529)) ``` ```c === BB <BB_ft> <95> [Loop level 2, head BB 5]succs: 96 === frequency:0 < 1044 > ldr(196) (opnd0: vreg:R3994 class: [I] validBitNum: [64]) (opnd1: Mem:base: reg:R29 class: [I] validBitNum: [64]offset:ofst:24 intact) < 1047 > mov(1) (opnd0: vreg:R741 class: [I] validBitNum: [64]) (opnd1: vreg:R3994 class: [I] validBitNum: [64]) < 1050 > add(19) (opnd0: vreg:R742 class: [I] validBitNum: [64]) (opnd1: vreg:R729 class: [I] validBitNum: [64]) (opnd2: imm:16) ================== here === BB <BB_if[labeled with 213 ==> @@213]> <96> [Loop level 3, head BB 96]succs: 288 97 === frequency:0 < 1053 > ldr(196) (opnd0: vreg:R219 class: [I] validBitNum: [64]) (opnd1: Mem:base:vreg:R3886 class: [I] validBitNum: [64]offset:ofst:8 intact) < 1056 > ldr(195) (opnd0: vreg:R220 class: [I] validBitNum: [32]) (opnd1: Mem:base:vreg:R219 class: [I] validBitNum: [64]offset:ofst:80 intact) < 1059 > lsr(145) (opnd0: vreg:R3996 class: [I] validBitNum: [32]) (opnd1: vreg:R220 class: [I] validBitNum: [32]) (opnd2: imm:6) < 1062 > ldr(196) (opnd0: vreg:R3995 class: [I] validBitNum: [64]) (opnd1: Mem:base:vreg:R742 class: [I] validBitNum: [64]offset:vreg:R3996 class: [I] validBitNum: [32] SXTW shift: 3) < 1065 > and(103) (opnd0: vreg:R3997 class: [I] validBitNum: [32]) (opnd1: vreg:R220 class: [I] validBitNum: [32]) (opnd2: imm:63) < 1068 > lsr(150) (opnd0: vreg:R4000 class: [I] validBitNum: [64]) (opnd1: vreg:R3995 class: [I] validBitNum: [64]) (opnd2: vreg:R3997 class: [I] validBitNum: [32]) < 0 > tbz(286) (opnd0: vreg:R4000 class: [I] validBitNum: [64]) (opnd1: imm:0) (opnd2: label:392) === BB <BB_ft> <97> [Loop level 3, head BB 96]succs: 98 === frequency:0 < 1077 > //(428) (opnd0: # callassigned : bitmap_set_bit) < 1080 > //(428) (opnd0: # bitmap_set_bit) < 1083 > mov(1) (opnd0: reg:R0 class: [I] validBitNum: [64]) (opnd1: vreg:R832 class: [I] validBitNum: [64]) < 1086 > mov(1) (opnd0: vreg:R4003 class: [I] validBitNum: [64]) (opnd1: vreg:R220 class: [I] validBitNum: [32]) < 1089 > ldr(195) (opnd0: reg:R1 class: [I] validBitNum: [32]) (opnd1: Mem:base:vreg:R727 class: [I] validBitNum: [64]offset:vreg:R4003 class: [I] validBitNum: [64] LSL shift: 2) < 1095 > bl(185) (opnd0: bitmap_set_bit) (opnd1: reg:R0 class: [I] validBitNum: [64] reg:R1 class: [I] validBitNum: [32]) === BB <BB_if[labeled with 186 ==> @@186]> <98> [Loop level 3, head BB 96]succs: 289 99 === ``` R742, R729 occupy two seperate callee save regs.
spec 502 , df-core.c Function df_worklist_dataflow_doublequeue the third arg "considered" is used as "considered)->elms [(e->src->index) / ((unsigned) (8 * 8))]" in the inner-most loop before subcall bitmap_set_bit . then we have an extra add to access elems before the loop Basically we assign registers for both "considered" and "&(considered->elms)", which the latter could be a perfect candidate of rematerialization. ```c regassign ptr %542 (iaddrof ptr <* <$simple_bitmap_def>> 4 (regread ptr %529)) ``` ```c === BB <BB_ft> <95> [Loop level 2, head BB 5]succs: 96 === frequency:0 < 1044 > ldr(196) (opnd0: vreg:R3994 class: [I] validBitNum: [64]) (opnd1: Mem:base: reg:R29 class: [I] validBitNum: [64]offset:ofst:24 intact) < 1047 > mov(1) (opnd0: vreg:R741 class: [I] validBitNum: [64]) (opnd1: vreg:R3994 class: [I] validBitNum: [64]) < 1050 > add(19) (opnd0: vreg:R742 class: [I] validBitNum: [64]) (opnd1: vreg:R729 class: [I] validBitNum: [64]) (opnd2: imm:16) ================== here === BB <BB_if[labeled with 213 ==> @@213]> <96> [Loop level 3, head BB 96]succs: 288 97 === frequency:0 < 1053 > ldr(196) (opnd0: vreg:R219 class: [I] validBitNum: [64]) (opnd1: Mem:base:vreg:R3886 class: [I] validBitNum: [64]offset:ofst:8 intact) < 1056 > ldr(195) (opnd0: vreg:R220 class: [I] validBitNum: [32]) (opnd1: Mem:base:vreg:R219 class: [I] validBitNum: [64]offset:ofst:80 intact) < 1059 > lsr(145) (opnd0: vreg:R3996 class: [I] validBitNum: [32]) (opnd1: vreg:R220 class: [I] validBitNum: [32]) (opnd2: imm:6) < 1062 > ldr(196) (opnd0: vreg:R3995 class: [I] validBitNum: [64]) (opnd1: Mem:base:vreg:R742 class: [I] validBitNum: [64]offset:vreg:R3996 class: [I] validBitNum: [32] SXTW shift: 3) < 1065 > and(103) (opnd0: vreg:R3997 class: [I] validBitNum: [32]) (opnd1: vreg:R220 class: [I] validBitNum: [32]) (opnd2: imm:63) < 1068 > lsr(150) (opnd0: vreg:R4000 class: [I] validBitNum: [64]) (opnd1: vreg:R3995 class: [I] validBitNum: [64]) (opnd2: vreg:R3997 class: [I] validBitNum: [32]) < 0 > tbz(286) (opnd0: vreg:R4000 class: [I] validBitNum: [64]) (opnd1: imm:0) (opnd2: label:392) === BB <BB_ft> <97> [Loop level 3, head BB 96]succs: 98 === frequency:0 < 1077 > //(428) (opnd0: # callassigned : bitmap_set_bit) < 1080 > //(428) (opnd0: # bitmap_set_bit) < 1083 > mov(1) (opnd0: reg:R0 class: [I] validBitNum: [64]) (opnd1: vreg:R832 class: [I] validBitNum: [64]) < 1086 > mov(1) (opnd0: vreg:R4003 class: [I] validBitNum: [64]) (opnd1: vreg:R220 class: [I] validBitNum: [32]) < 1089 > ldr(195) (opnd0: reg:R1 class: [I] validBitNum: [32]) (opnd1: Mem:base:vreg:R727 class: [I] validBitNum: [64]offset:vreg:R4003 class: [I] validBitNum: [64] LSL shift: 2) < 1095 > bl(185) (opnd0: bitmap_set_bit) (opnd1: reg:R0 class: [I] validBitNum: [64] reg:R1 class: [I] validBitNum: [32]) === BB <BB_if[labeled with 186 ==> @@186]> <98> [Loop level 3, head BB 96]succs: 289 99 === ``` R742, R729 occupy two seperate callee save regs.
Comments (
14
)
Sign in
to comment
Status
Backlog
Backlog
Doing
Done
Closed
Assignees
Not set
Brice Dobry
fw_brice
Assignee
Collaborator
+Assign
+Mention
fredchow
fredchow
Assignee
Collaborator
+Assign
+Mention
Labels
Not set
Label settings
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (27)
Tags (2)
master
lite_maplecg_assembler
merge_branch_20230823
merge_branch_20230608
lite_maplecg
update_llvm_15
merge_branch
wchen_merge169
dev_MapleFE
newir09
fredchow_ginlinepgo1
fredchow_lfovect1
wchen_merge174
fye_pgo_cglower
wchen_merge175
fredchow_lfounroll4
fredchow_funcdelete1
newir08
wchen_merge170
ahuang_m103
newir07
wchen_merge173
newir06
newir05
dev_MapleFE_v2
newir04
abstractir
v1.0.0
v0.2.1
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
参与者(2)
C++
1
https://gitee.com/openarkcompiler/OpenArkCompiler.git
git@gitee.com:openarkcompiler/OpenArkCompiler.git
openarkcompiler
OpenArkCompiler
OpenArkCompiler
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register