This is the mail archive of the gcc@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: [tree-ssa] A pass to remove a large number of casts in C++ code


Looks like a good pass.  Just a few notes.

The comments need serious cleanup.
As well as various typos, spelling errors, and grammar errors, some are very
confusing:

+   It changes (INT_TYPE)!a into a == 0 iff a is an INT_TYPE, the reason why we do
+    not change it into !a where the type of the ! expression is because fold converts
+    (int)(bool)!a into !(int)(bool)a which is wrong, I have not figured out how to get
+    around this problem (but it might be fixed by the second next transformation which
+    is done, I have not tried it after adding that one).
What is the "second next transformation"?

+   It transforms (type1)(type2)a to (type1)a or just a where a is of type1
+    and type2's precission is larger than or equal to type1's precission.
Does it transform it to (type1)a or to a?  The code appears to just transform
it to (a).

Also, the function "reduce_comparions_replacement" should be
"reduce_comparisons_replacement" (notice the missing s).

I'm wondering about ordering of the different transformations; it seems
worth being quite careful about that and documenting why they're done in
that order of priority.

-- 
Make sure your vote will count.
http://www.verifiedvoting.org/


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