This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Static branch prediction: compare IV to loop bound variable (issue 5504086)
- From: davidxl at google dot com
- To: dehao at google dot com
- Cc: gcc-patches at gcc dot gnu dot org, reply at codereview-hr dot appspotmail dot com
- Date: Tue, 31 Jan 2012 01:25:42 +0000
- Subject: Re: Static branch prediction: compare IV to loop bound variable (issue 5504086)
- Reply-to: dehao at google dot com, davidxl at google dot com, gcc-patches at gcc dot gnu dot org, reply at codereview-hr dot appspotmail dot com
Ok for google branches for now.
thanks,
David
http://codereview.appspot.com/5504086/diff/1004/gcc/predict.c
File gcc/predict.c (right):
http://codereview.appspot.com/5504086/diff/1004/gcc/predict.c#newcode958
gcc/predict.c:958: find_qualified_ssa_name (tree t1, tree t2)
Better change the name into 'strips_small_constant'
http://codereview.appspot.com/5504086/diff/1004/gcc/predict.c#newcode991
gcc/predict.c:991: Return NULL if T does not satisfy IV_COMPARE
condition. */
Fix comment -- there is no IV_COMPARE used here.
http://codereview.appspot.com/5504086/diff/1004/gcc/predict.c#newcode995
gcc/predict.c:995: {
Better change the name into 'get_base_value (tree t)' because the method
basically strips the constant 'offset' away.
http://codereview.appspot.com/5504086/diff/1004/gcc/predict.c#newcode1102
gcc/predict.c:1102: a similar variable. */
Fix the comments. Returns true if T1 and T2 are value coherent.
http://codereview.appspot.com/5504086/diff/1004/gcc/predict.c#newcode1106
gcc/predict.c:1106: {
May be changing the name to
expr_coherent_p (tree t1, tree t2)
http://codereview.appspot.com/5504086/diff/1004/gcc/predict.c#newcode1206
gcc/predict.c:1206: && (compare_code == LT_EXPR || compare_code ==
LE_EXPR))
Fix indentation.
http://codereview.appspot.com/5504086/