diff options
author | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-08 11:13:41 +0000 |
---|---|---|
committer | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-08 11:13:41 +0000 |
commit | 4c0315d05fa0f707875686abc4f91f7a979a7c7b (patch) | |
tree | e07de8d0b6265f8d72388d335bd471022e753d57 /gcc/cfgbuild.c | |
parent | bf09288ee7b5f264f28081a84fde4c6aa1ac5c82 (diff) | |
download | gcc-4c0315d05fa0f707875686abc4f91f7a979a7c7b.tar.gz |
Merge from transactional-memory branch.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181154 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgbuild.c')
-rw-r--r-- | gcc/cfgbuild.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c index 6f0d69e4523..692fea8a17b 100644 --- a/gcc/cfgbuild.c +++ b/gcc/cfgbuild.c @@ -338,18 +338,30 @@ make_edges (basic_block min, basic_block max, int update_p) /* Add any appropriate EH edges. */ rtl_make_eh_edge (edge_cache, bb, insn); - if (code == CALL_INSN && nonlocal_goto_handler_labels) + if (code == CALL_INSN) { - /* ??? This could be made smarter: in some cases it's possible - to tell that certain calls will not do a nonlocal goto. - For example, if the nested functions that do the nonlocal - gotos do not have their addresses taken, then only calls to - those functions or to other nested functions that use them - could possibly do nonlocal gotos. */ if (can_nonlocal_goto (insn)) - for (x = nonlocal_goto_handler_labels; x; x = XEXP (x, 1)) - make_label_edge (edge_cache, bb, XEXP (x, 0), - EDGE_ABNORMAL | EDGE_ABNORMAL_CALL); + { + /* ??? This could be made smarter: in some cases it's + possible to tell that certain calls will not do a + nonlocal goto. For example, if the nested functions + that do the nonlocal gotos do not have their addresses + taken, then only calls to those functions or to other + nested functions that use them could possibly do + nonlocal gotos. */ + for (x = nonlocal_goto_handler_labels; x; x = XEXP (x, 1)) + make_label_edge (edge_cache, bb, XEXP (x, 0), + EDGE_ABNORMAL | EDGE_ABNORMAL_CALL); + } + + if (flag_tm) + { + rtx note; + for (note = REG_NOTES (insn); note; note = XEXP (note, 1)) + if (REG_NOTE_KIND (note) == REG_TM) + make_label_edge (edge_cache, bb, XEXP (note, 0), + EDGE_ABNORMAL | EDGE_ABNORMAL_CALL); + } } } |