Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Chen Yisong
glslang
Commits
5fe789b4
Commit
5fe789b4
authored
Jan 17, 2016
by
Dejan Mircevski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Block::successors.
parent
60a7f3f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
SpvBuilder.cpp
SPIRV/SpvBuilder.cpp
+1
-1
spvIR.h
SPIRV/spvIR.h
+4
-3
No files found.
SPIRV/SpvBuilder.cpp
View file @
5fe789b4
...
...
@@ -857,7 +857,7 @@ void Builder::leaveFunction()
if
(
!
block
->
isTerminated
())
{
// Whether we're in an unreachable (non-entry) block.
bool
unreachable
=
function
.
getEntryBlock
()
!=
block
&&
block
->
get
NumPredecessors
()
==
0
;
bool
unreachable
=
function
.
getEntryBlock
()
!=
block
&&
block
->
get
Predecessors
().
empty
()
;
if
(
unreachable
)
{
// Given that this block is at the end of a function, it must be right after an
...
...
SPIRV/spvIR.h
View file @
5fe789b4
...
...
@@ -162,9 +162,10 @@ public:
Function
&
getParent
()
const
{
return
parent
;
}
void
addInstruction
(
std
::
unique_ptr
<
Instruction
>
inst
);
void
addPredecessor
(
Block
*
pred
)
{
predecessors
.
push_back
(
pred
);
}
void
addPredecessor
(
Block
*
pred
)
{
predecessors
.
push_back
(
pred
);
pred
->
successors
.
push_back
(
this
);
}
void
addLocalVariable
(
std
::
unique_ptr
<
Instruction
>
inst
)
{
localVariables
.
push_back
(
std
::
move
(
inst
));
}
int
getNumPredecessors
()
const
{
return
(
int
)
predecessors
.
size
();
}
const
std
::
vector
<
Block
*>
getPredecessors
()
const
{
return
predecessors
;
}
const
std
::
vector
<
Block
*>
getSuccessors
()
const
{
return
successors
;
}
void
setUnreachable
()
{
unreachable
=
true
;
}
bool
isUnreachable
()
const
{
return
unreachable
;
}
...
...
@@ -206,7 +207,7 @@ protected:
friend
Function
;
std
::
vector
<
std
::
unique_ptr
<
Instruction
>
>
instructions
;
std
::
vector
<
Block
*>
predecessors
;
std
::
vector
<
Block
*>
predecessors
,
successors
;
std
::
vector
<
std
::
unique_ptr
<
Instruction
>
>
localVariables
;
Function
&
parent
;
...
...
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