i965: Assert that an instruction is not inserted around itself.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
This commit is contained in:
parent
7b208a7312
commit
a607f4aa57
|
@ -948,6 +948,8 @@ adjust_later_block_ips(bblock_t *start_block, int ip_adjustment)
|
||||||
void
|
void
|
||||||
backend_instruction::insert_after(bblock_t *block, backend_instruction *inst)
|
backend_instruction::insert_after(bblock_t *block, backend_instruction *inst)
|
||||||
{
|
{
|
||||||
|
assert(this != inst);
|
||||||
|
|
||||||
if (!this->is_head_sentinel())
|
if (!this->is_head_sentinel())
|
||||||
assert(inst_is_in_block(block, this) || !"Instruction not in block");
|
assert(inst_is_in_block(block, this) || !"Instruction not in block");
|
||||||
|
|
||||||
|
@ -961,6 +963,8 @@ backend_instruction::insert_after(bblock_t *block, backend_instruction *inst)
|
||||||
void
|
void
|
||||||
backend_instruction::insert_before(bblock_t *block, backend_instruction *inst)
|
backend_instruction::insert_before(bblock_t *block, backend_instruction *inst)
|
||||||
{
|
{
|
||||||
|
assert(this != inst);
|
||||||
|
|
||||||
if (!this->is_tail_sentinel())
|
if (!this->is_tail_sentinel())
|
||||||
assert(inst_is_in_block(block, this) || !"Instruction not in block");
|
assert(inst_is_in_block(block, this) || !"Instruction not in block");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue