This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa][PATCH] Let remove_stmt not always remoev annotations(was Re: [tree-ssa]: Code movement is a pain in the ass.)
On Mon, 2003-08-11 at 16:39, Daniel Berlin wrote:
> On Mon, 11 Aug 2003, Daniel Berlin wrote:
> Actually, doing it this way is going to make bsi_remove a do nothing
> function that is only a single line wrapper for the new function. This
> seems odd all not to just add a parameter.
I know, but when you are dealing with a client API, the second parameter
is going to serve no purpose... bsi_remove should remove the stmt the
iterator points to. Adding a flag to adjust internal only things merely
obfuscates it. Anyone going to use it or read the code is going to have
to go and lookup what the flag does. Much cleaner to let bsi_remove
simply have one parameter. Plus then you dont go changing any client
code, which is really the point to having an API in the first place.
I also wouldn't call it bsi_remove_real, that seems a little bit
flippant :-). Besides, it would require extra reading to figure out
which one you need... :-)
Try calling it remove_stmt_from_block() or remove_bsi_from_block() or
something like that instead... I think it makes the connection better.
Since its not an exposed interface routine, it doesn't have to start