This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [trans-mem] PR46270: handle throwing statements


On 11/19/10 11:26, Richard Henderson wrote:
+ if (!gimple_call_nothrow_p (stmt)
+ && gsi_one_before_end_p (*gsi))
As I said before: stmt_can_throw_internal. You're doing
unnecessary splitting in the case the call *can* throw,
but there's no handler within the current function.

Poop, missed that. Thanks.
+ gsi_insert_on_edge_immediate (fallthru_edge, stmt);
+
+ /* Split the block so the instrumentation code resides in
+ it's own separate BB. Then we can mark this BB as handled
+ and avoid rescanning it again. */
+ bb = gimple_bb (stmt);
+ split_block (bb, stmt);
+ *gsi = gsi_start_bb (bb);
Splitting the block is pointless. If you don't want to process
Watcha talking about Willis? If I split it, it ends up all by itself, and I can mark it quite nicely. Not that it's elegant, or anything... Just curious, why is it pointless?

the statement, and you're worried about it being placed into a
block that you've not yet processed, then use the non-immediate
form of edge insertion and then use gsi_commit_edge_inserts at
the end.

Normally when we do that, we also accumulate a flag that says
whether calling gsi_commit_edge_inserts is necessary.

Sigh, I'm beginning to see that there is no elegant solution. Yuck, one more flag.


This is all nasty, but here it is...

OK?

Attachment: curr
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]