Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
latte
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zygzagZ
latte
Commits
c34a692b
Commit
c34a692b
authored
Jan 12, 2021
by
zygzagZ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
46d82364
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
8 deletions
+1
-8
QuadrupleGenerator.cpp
src/codeGen/QuadrupleGenerator.cpp
+0
-2
QuadrupleGenerator.h
src/codeGen/QuadrupleGenerator.h
+0
-5
RegisterAllocator.cpp
src/codeGen/RegisterAllocator.cpp
+1
-1
No files found.
src/codeGen/QuadrupleGenerator.cpp
View file @
c34a692b
...
...
@@ -116,12 +116,10 @@ void QuadrupleGenerator::visitELitInt(ELitInt *p) {
void
QuadrupleGenerator
::
visitELitTrue
(
ELitTrue
*
p
)
{
lastVar
=
alloc
(
1
);
// if (labelTrue) addQuad<QJump>(labelTrue);
}
void
QuadrupleGenerator
::
visitELitFalse
(
ELitFalse
*
p
)
{
lastVar
=
alloc
(
0
);
// if (labelFalse) addQuad<QJump>(labelFalse);
}
void
QuadrupleGenerator
::
visitEString
(
EString
*
p
)
{
...
...
src/codeGen/QuadrupleGenerator.h
View file @
c34a692b
...
...
@@ -101,8 +101,6 @@ private:
void
addLastVarCondJump
(
const
VariablePtr
&
l
,
Quadruple
::
Op
op
,
const
VariablePtr
&
r
)
{
if
(
labelTrue
&&
labelFalse
)
{
addQuad
<
QJumpCond
>
(
labelTrue
,
l
,
op
,
r
);
// testy jump assign
// addQuad<QAssign>(lastVar, l, op, r);
addQuad
<
QJump
>
(
labelFalse
);
return
;
}
else
if
(
labelTrue
)
{
...
...
@@ -111,9 +109,6 @@ private:
}
else
if
(
labelFalse
)
{
addQuad
<
QJumpCond
>
(
labelFalse
,
l
,
op
.
neg
(),
r
);
lastVar
=
alloc
(
1
);
}
else
{
// testy jump assign
// return;
}
addQuad
<
QAssign
>
(
lastVar
,
l
,
op
,
r
);
}
...
...
src/codeGen/RegisterAllocator.cpp
View file @
c34a692b
...
...
@@ -9,7 +9,7 @@ void RegisterAllocator::analyseLive() {
for
(
const
auto
&
q
:
v
->
writes
)
{
q
->
block
->
flow
.
addDef
(
v
);
}
if
(
/*!v->info ||*/
v
->
constExpr
)
continue
;
if
(
v
->
constExpr
)
continue
;
for
(
const
auto
&
q
:
v
->
uses
)
{
q
->
block
->
flow
.
addUse
(
v
);
}
...
...
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