diff mbox

[PR,tree-optimization/64823] Handle threading through blocks with PHIs, but no statements V2

Message ID 54E35F49.8050407@redhat.com
State New
Headers show

Commit Message

Jeff Law Feb. 17, 2015, 3:33 p.m. UTC
On 02/16/15 18:09, Jeff Law wrote:
> On 02/16/15 14:11, Jakub Jelinek wrote:
>> On Mon, Feb 16, 2015 at 02:00:32PM -0700, Jeff Law wrote:
>>> --- a/gcc/tree-vrp.c
>>> +++ b/gcc/tree-vrp.c
>>> @@ -10176,13 +10176,20 @@ identify_jump_threads (void)
>>>         /* We only care about blocks ending in a COND_EXPR.  While there
>>>        may be some value in handling SWITCH_EXPR here, I doubt it's
>>>        terribly important.  */
>>> -      last = gsi_stmt (gsi_last_bb (bb));
>>> +      last = gsi_stmt (gsi_last_nondebug_bb (bb));
>>
>> Isn't that just
>>     last = last_stmt (bb);
>> equivalent?
> It is.  I'll make that change and update the comment as well.
Bootstrap and regression tested on x86_64-unknown-linux-gnu.  Installed 
on the trunk.


Jeff
diff mbox

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index db1cdb7..dcd3d26 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@ 
+2015-02-17  Jeff Law  <law@redhat.com>
+
+	* tree-vrp.c (identify_jump_threads): Use last_stmt.  Remove
+	obsolete comment.
+
 2015-02-17  James Greenhalgh  <james.greenhalgh@arm.com>
 
 	* haifa-sched.c (recompute_todo_spec): Treat SCHED_GROUP_P
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index d996bcc..9556ede 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -10173,10 +10173,7 @@  identify_jump_threads (void)
       if (! potentially_threadable_block (bb))
 	continue;
 
-      /* We only care about blocks ending in a COND_EXPR.  While there
-	 may be some value in handling SWITCH_EXPR here, I doubt it's
-	 terribly important.  */
-      last = gsi_stmt (gsi_last_nondebug_bb (bb));
+      last = last_stmt (bb);
 
       /* We're basically looking for a switch or any kind of conditional with
 	 integral or pointer type arguments.  Note the type of the second