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] Fix ssa coalescing with inline asm (PR middle-end/70593)


On Fri, Apr 08, 2016 at 06:04:38PM +0200, Richard Biener wrote:
> Hmm, don't we simply want to do this for all stmts (OK, only asm have multiple defs...)?

For all stmts that have multiple defs (which is only GIMPLE_ASM right now).
Though, of course, if you want, unconditionally doing:
	  bool first = true;
	  FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_DEF)
	    if (first)
	      first = false;
	    else
	      live_track_process_use (live, var);
would work too and would be prepared for future hypothetical stmts
with multiple defs.  The reason why I'm not calling live_track_process_use
on the first SSA_OP_DEF operand is that it is completely useless,
because the first live_track_process_def will undo it immediately.
For the above, I guess I'd just slightly adjust the comment, instead of
	For GIMPLE_ASM as the only statement which can have
	more than one SSA_NAME definition, ...
say
	For stmts with more than one SSA_NAME definition, ...

	Jakub


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