going from a SYMBOL_REF to a decl node

Mike Stump mrs@windriver.com
Mon Apr 3 20:58:00 GMT 2000


> Date: Mon, 3 Apr 2000 19:32:31 -0700
> From: Zack Weinberg <zack@wolery.cumb.org>
> To: Mike Stump <mrs@windriver.com>

> Maybe I should describe the real problem.

That is usually helpful.

> calculate_can_reach_end needs to know, given only that CALL_INSN,
> whether or not it's calling a noreturn function.   The barrier doesn't
> help; it's always there.

?  No it isn't:

;; Function y
 
;; Register dispositions:
 
;; Hard regs used:  8 15 30
 
(note 2 0 3 "" NOTE_INSN_DELETED)
 
(note 3 2 4 "" NOTE_INSN_FUNCTION_BEG)
 
(note 4 3 6 "" NOTE_INSN_DELETED)
 
(note 6 4 8 0 NOTE_INSN_BLOCK_BEG)
 
;; Start of basic block 0, registers live: 14 [%sp] 30 [%fp] 31 [%i7]
(call_insn 8 6 9 (parallel[ 
            (set (reg:SI 8 %o0)
                (call (mem:SI (symbol_ref:SI ("something")))
                    (const_int 0)))
            (clobber (reg:SI 15 %o7))
        ] ) 372 {*call_value_symbolic_sp32} (nil)
    (expr_list:REG_UNUSED (reg:SI 8 %o0)
        (expr_list:REG_UNUSED (reg:SI 15 %o7)
            (nil)))
    (nil))
;; End of basic block 0
 
(note 9 8 13 0 NOTE_INSN_BLOCK_END)
 
(note 13 9 0 "" NOTE_INSN_DELETED)

?  I'm not an rtl expert, but your statement sounds very wrong.
I would say that a barrier is _exactly_ what you want to know?  A
barrier is a commitment that flow control will not come back to that
point:

@findex barrier
@item barrier
Barriers are placed in the instruction stream when control cannot flow
past them.  They are placed after unconditional jump instructions to
indicate that the jumps are unconditional and after calls to
@code{volatile} functions, which do not return (e.g., @code{exit}).
They contain no information beyond the three standard fields.

?  Let me defer to our many rtl experts at this point with your
specific problem.  Hopefully they can correct anything if I got it
wrong.  I'd hate to confuse the issue.


More information about the Gcc mailing list