Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
7f3b97db
Commit
7f3b97db
authored
Apr 16, 2014
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix OSR bug: OSR entry block has to figure out which is_defined names it will receive
parent
2c7ccccf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
src/codegen/irgen.cpp
src/codegen/irgen.cpp
+9
-0
test/tests/osr_maybe_undefined.py
test/tests/osr_maybe_undefined.py
+0
-2
test/tests/osr_maybe_undefined2.py
test/tests/osr_maybe_undefined2.py
+0
-2
No files found.
src/codegen/irgen.cpp
View file @
7f3b97db
...
@@ -586,6 +586,15 @@ static void emitBBs(IRGenState* irstate, const char* bb_type, GuardList &out_gua
...
@@ -586,6 +586,15 @@ static void emitBBs(IRGenState* irstate, const char* bb_type, GuardList &out_gua
generator
->
giveLocalSymbol
(
*
it
,
var
);
generator
->
giveLocalSymbol
(
*
it
,
var
);
(
*
phis
)[
*
it
]
=
std
::
make_pair
(
type
,
phi
);
(
*
phis
)[
*
it
]
=
std
::
make_pair
(
type
,
phi
);
if
(
source
->
phis
->
isPotentiallyUndefinedAfter
(
*
it
,
block
->
predecessors
[
0
]))
{
std
::
string
is_defined_name
=
"!is_defined_"
+
*
it
;
llvm
::
PHINode
*
phi
=
emitter
->
getBuilder
()
->
CreatePHI
(
g
.
i1
,
block
->
predecessors
.
size
(),
is_defined_name
);
ConcreteCompilerVariable
*
var
=
new
ConcreteCompilerVariable
(
BOOL
,
phi
,
true
);
generator
->
giveLocalSymbol
(
is_defined_name
,
var
);
(
*
phis
)[
is_defined_name
]
=
std
::
make_pair
(
BOOL
,
phi
);
}
}
}
}
else
{
}
else
{
assert
(
pred
);
assert
(
pred
);
...
...
test/tests/osr_maybe_undefined.py
View file @
7f3b97db
# expected: fail
# Regression test to make sure we can do an OSR if one of the live variables
# Regression test to make sure we can do an OSR if one of the live variables
# is potentially-undefined.
# is potentially-undefined.
...
...
test/tests/osr_maybe_undefined2.py
View file @
7f3b97db
# expected: fail
# Regression test to make sure we can do an OSR if one of the live variables
# Regression test to make sure we can do an OSR if one of the live variables
# is potentially-undefined.
# is potentially-undefined.
...
...
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