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]

[lno] RFC/PATCH: remove redundant casts


This is only a request for comments now as I do not know if this is the right
approach but it helps the gzip vectorizing problem by removing the extraneous
casts in that loop (also fixes PR 14287 by removing the extra cast before
getting to the RTL level).


Note I have not bootstrapped this patch yet.
I also have not added all comments that I want to add.

Basically what the pass does is the following:

short t;
int y;
short u;

....
y_1 = (int)t_2;
....
u_3 = (short)y_1;

into:

....
y_1 = (int)t_2;
....
u_3 = t_2;

Thanks,
Andrew Pinski

ChangeLog:

	* Makefile.in: Add tree-ssa-cast.c
	* tree-optimize.c (init_tree_optimization_passes):
	Add pass_cast to the passes.
	* tree-pass.h (pass_cast): Declare.



Attachment: tree-ssa-cast.c
Description: Text document


Attachment: cast.patch.txt
Description: Text document


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