[google] Use R_ARM_GOT_PREL to simplify global address loading from GOT (issue4433079)

dnovillo@google.com dnovillo@google.com
Thu Apr 28 14:30:00 GMT 2011


I only have some stylistic comments for this patch.  The new pass looks
OK to me, but I do not know this area well enough to do a good review.

In your ChangeLog entries, please remove the directory prefix from the
file names.


http://codereview.appspot.com/4433079/diff/1/gcc/hooks.c
File gcc/hooks.c (right):

http://codereview.appspot.com/4433079/diff/1/gcc/hooks.c#newcode287
gcc/hooks.c:287: return NULL;
+hook_rtx_void_null (void)
+{
+  return NULL;

s/NULL/NULL_RTX/

http://codereview.appspot.com/4433079/diff/1/gcc/simplify-got.c
File gcc/simplify-got.c (right):

http://codereview.appspot.com/4433079/diff/1/gcc/simplify-got.c#newcode83
gcc/simplify-got.c:83: return (optimize > 0) &&
targetm.got_access.get_pic_reg ();
+{
+  return (optimize > 0) && targetm.got_access.get_pic_reg ();

s/(optimize > 0)/optimize/

http://codereview.appspot.com/4433079/diff/1/gcc/simplify-got.c#newcode118
gcc/simplify-got.c:118: if (!(set && (SET_DEST (set) == pic_reg)))
+	  /* If an insn both set and use pic_reg, it is in the process of
+	     constructing the value of pic_reg. We should also ignore it.  */
+	  rtx set = single_set (insn);
+	  if (!(set && (SET_DEST (set) == pic_reg)))

Extra ( ) around SET_DEST are not needed.

http://codereview.appspot.com/4433079/



More information about the Gcc-patches mailing list