tree-cfg.c (gimple_redirect_edge_and_branch): Create the decl label for the new dest block on demand.
* tree-cfg.c (gimple_redirect_edge_and_branch) <case GIMPLE_ASM>: Create the decl label for the new dest block on demand. Require a fallthrough edge if no asm labels were redirected. From-SVN: r154213
This commit is contained in:
parent
a81f2330a3
commit
f8981d1c08
2 changed files with 17 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2009-11-16 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* tree-cfg.c (gimple_redirect_edge_and_branch) <case GIMPLE_ASM>:
|
||||
Create the decl label for the new dest block on demand. Require
|
||||
a fallthrough edge if no asm labels were redirected.
|
||||
|
||||
2009-11-16 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* config/i386/i386.md (cbranchsi4): Use nonimmediate_operand for
|
||||
|
|
|
@ -4666,14 +4666,23 @@ gimple_redirect_edge_and_branch (edge e, basic_block dest)
|
|||
case GIMPLE_ASM:
|
||||
{
|
||||
int i, n = gimple_asm_nlabels (stmt);
|
||||
tree label = gimple_block_label (dest);
|
||||
tree label = NULL;
|
||||
|
||||
for (i = 0; i < n; ++i)
|
||||
{
|
||||
tree cons = gimple_asm_label_op (stmt, i);
|
||||
if (label_to_block (TREE_VALUE (cons)) == e->dest)
|
||||
TREE_VALUE (cons) = label;
|
||||
{
|
||||
if (!label)
|
||||
label = gimple_block_label (dest);
|
||||
TREE_VALUE (cons) = label;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we didn't find any label matching the former edge in the
|
||||
asm labels, we must be redirecting the fallthrough
|
||||
edge. */
|
||||
gcc_assert (label || (e->flags & EDGE_FALLTHRU));
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue