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: [PATCH] Hoist reciprocal invariant out of loop


>>>>> Zdenek Dvorak writes:

Zdenek> Do you really need MOVE_RECIPROCAL, then?  Just checking for this
Zdenek> pattern in determine_invariantness_stmt in case MOVE_POSSIBLE is
Zdenek> returned should work as well.  Probably not that important.

	With the proposed change to tree_could_trap_p(), I guess that I
could move it all to determine_invariantness_stmt().

Zdenek> One more detail I noticed now; using expr_invariant_in_loop_p is
Zdenek> a bit too conservative inside invariant analysis.  You may use
Zdenek> outermost_invariant_loop (or outermost_invariant_loop_expr).

	I noticed those functions and tried them originally, but I had
difficulty getting the expected results.  Also, those functions are
somewhat duplicative of expr_invariant_in_loop_p() and I was advised to
switch to the latter function.  Those routines should be merged together,
possibly with a flag for more or less conservative behavior.

David


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