Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mu-impl-fast
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
40
Issues
40
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mu
mu-impl-fast
Commits
9c9c9b2b
Commit
9c9c9b2b
authored
Mar 01, 2017
by
qinsoon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[wip] small fixes
parent
e53f5d4f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
ir.rs
src/ast/src/ir.rs
+9
-3
alive_entry.rs
src/compiler/backend/reg_alloc/validate/alive_entry.rs
+1
-1
mod.rs
src/compiler/backend/reg_alloc/validate/mod.rs
+4
-3
No files found.
src/ast/src/ir.rs
View file @
9c9c9b2b
...
...
@@ -684,7 +684,7 @@ pub enum TreeNode_ {
}
/// always use with P<Value>
#[derive(
Debug,
PartialEq,
RustcEncodable,
RustcDecodable)]
#[derive(PartialEq,
RustcEncodable,
RustcDecodable)]
pub
struct
Value
{
pub
hdr
:
MuEntityHeader
,
pub
ty
:
P
<
MuType
>
,
...
...
@@ -769,6 +769,12 @@ impl Value {
const
DISPLAY_TYPE
:
bool
=
false
;
impl
fmt
::
Debug
for
Value
{
fn
fmt
(
&
self
,
f
:
&
mut
fmt
::
Formatter
)
->
fmt
::
Result
{
write!
(
f
,
"{}"
,
self
)
}
}
impl
fmt
::
Display
for
Value
{
fn
fmt
(
&
self
,
f
:
&
mut
fmt
::
Formatter
)
->
fmt
::
Result
{
if
DISPLAY_TYPE
{
...
...
@@ -792,7 +798,7 @@ impl fmt::Display for Value {
write!
(
f
,
"
%
{}"
,
self
.hdr
)
},
Value_
::
Constant
(
ref
c
)
=>
{
write!
(
f
,
"{}
@{}"
,
c
,
self
.hdr
)
write!
(
f
,
"{}
"
,
c
)
},
Value_
::
Global
(
_
)
=>
{
write!
(
f
,
"GLOBAL @{}"
,
self
.hdr
)
...
...
@@ -921,7 +927,7 @@ pub enum Constant {
impl
fmt
::
Display
for
Constant
{
fn
fmt
(
&
self
,
f
:
&
mut
fmt
::
Formatter
)
->
fmt
::
Result
{
match
self
{
&
Constant
::
Int
(
v
)
=>
write!
(
f
,
"{}"
,
v
),
&
Constant
::
Int
(
v
)
=>
write!
(
f
,
"{}"
,
v
as
i64
),
&
Constant
::
Float
(
v
)
=>
write!
(
f
,
"{}"
,
v
),
&
Constant
::
Double
(
v
)
=>
write!
(
f
,
"{}"
,
v
),
// &Constant::IRef(v) => write!(f, "{}", v),
...
...
src/compiler/backend/reg_alloc/validate/alive_entry.rs
View file @
9c9c9b2b
...
...
@@ -173,7 +173,7 @@ impl AliveEntries {
}
pub
fn
add_temp_in_mem
(
&
mut
self
,
temp
:
MuID
,
mem
:
P
<
Value
>
)
{
debug!
(
"a
live
alive temp in mem: {} in {}"
,
temp
,
mem
);
debug!
(
"a
dding
alive temp in mem: {} in {}"
,
temp
,
mem
);
let
entry_exists
=
self
.has_entries_for_temp
(
temp
);
...
...
src/compiler/backend/reg_alloc/validate/mod.rs
View file @
9c9c9b2b
...
...
@@ -46,9 +46,10 @@ pub fn validate_regalloc(cf: &CompiledFunction,
for
(
_
,
reg
)
in
frame
.argument_by_reg
.iter
()
{
alive
.new_alive_reg
(
alias
(
reg
.id
()));
}
for
(
_
,
stack
)
in
frame
.argument_by_stack
.iter
()
{
alive
.new_alive_mem
(
stack
.clone
());
}
// we do not consider mem loc for arguments - we do consider mem loc for spilling
// for (_, stack) in frame.argument_by_stack.iter() {
// alive.new_alive_mem(stack.clone());
// }
debug!
(
"alive entries in the beginning"
);
debug!
(
"{}"
,
alive
);
...
...
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