Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
2
2025ustc-jianmu-compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
compiler_staff
2025ustc-jianmu-compiler
Commits
d298bd3e
Commit
d298bd3e
authored
Oct 10, 2025
by
Yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix lab2 bug
parent
52615882
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
src/lightir/Function.cpp
src/lightir/Function.cpp
+4
-2
tests/2-ir-gen/autogen/eval_lab2.py
tests/2-ir-gen/autogen/eval_lab2.py
+7
-6
No files found.
src/lightir/Function.cpp
View file @
d298bd3e
...
...
@@ -156,7 +156,8 @@ void Function::check_for_block_relation_error()
}
}
// 检查基本块的前驱和后继表不包含重复的基本块
for
(
auto
&
bb
:
basic_blocks_
)
/*
for (auto& bb : basic_blocks_)
{
bbs.clear();
for(auto suc: bb.get_succ_basic_blocks()){
...
...
@@ -168,6 +169,7 @@ void Function::check_for_block_relation_error()
bbs.emplace(suc);
}
}
*/
// 检查基本块基本信息
for
(
auto
&
bb
:
basic_blocks_
)
{
...
...
@@ -197,7 +199,7 @@ void Function::check_for_block_relation_error()
for
(
auto
i
:
suc_table
)
{
bool
ok
=
false
;
for
(
auto
j
:
i
->
get_pre_basic_blocks
())
{
if
(
j
==
i
){
if
(
j
==
&
bb
){
ok
=
true
;
break
;
}
...
...
tests/2-ir-gen/autogen/eval_lab2.py
View file @
d298bd3e
...
...
@@ -76,7 +76,7 @@ lv1 = {
"transfer_int_to_float"
:
(
1
,
False
),
}
# 2
3
# 2
4
lv2
=
{
"funcall_chain"
:
(
2
,
False
),
"assign_chain"
:
(
2
,
False
),
...
...
@@ -86,16 +86,17 @@ lv2 = {
"funcall_array_array"
:
(
2
,
False
),
"return_in_middle1"
:
(
2
,
False
),
"return_in_middle2"
:
(
2
,
False
),
"funcall_type_mismatch1"
:
(
2
,
False
),
"funcall_type_mismatch2"
:
(
2
,
False
),
"funcall_type_mismatch1"
:
(
1.5
,
False
),
"funcall_type_mismatch2"
:
(
1.5
,
False
),
"return_type_mismatch1"
:
(
1.5
,
False
),
"return_type_mismatch2"
:
(
1.5
,
False
),
"alloca_in_loop"
:
(
2
,
False
)
}
# 1
1
# 1
0
lv3
=
{
"complex1"
:
(
3
,
False
),
"complex2"
:
(
3
,
True
),
"complex1"
:
(
2.5
,
False
),
"complex2"
:
(
2.5
,
True
),
"complex3"
:
(
2
,
True
),
"complex4"
:
(
3
,
False
),
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment