Re: [PATCH 019/236] Strengthen return type of gen_label_rtx

2014-08-19 Thread David Malcolm
On Tue, 2014-08-12 at 16:00 -0600, Jeff Law wrote:
 On 08/06/14 11:19, David Malcolm wrote:
  gcc/
  * rtl.h (gen_label_rtx): Strengthen return type from rtx to
  rtx_code_label *.
 
  * emit-rtl.c (gen_label_rtx): Likewise.
 Presumably at some point we'll look at the gen_XXX and split out 
 those which return items for the chain vs everything else.
 
 OK.

Thanks; committed to trunk as r214179, having verified
bootstrapregrtest on x86_64-unknown-linux-gnu (Fedora 20) albeit in
combination with patches 9-29 [1], and verified that it builds
standalone with 10 targets.

Dave



Re: [PATCH 019/236] Strengthen return type of gen_label_rtx

2014-08-12 Thread Jeff Law

On 08/06/14 11:19, David Malcolm wrote:

gcc/
* rtl.h (gen_label_rtx): Strengthen return type from rtx to
rtx_code_label *.

* emit-rtl.c (gen_label_rtx): Likewise.
Presumably at some point we'll look at the gen_XXX and split out 
those which return items for the chain vs everything else.


OK.

Thanks,
jeff



[PATCH 019/236] Strengthen return type of gen_label_rtx

2014-08-06 Thread David Malcolm
gcc/
* rtl.h (gen_label_rtx): Strengthen return type from rtx to
rtx_code_label *.

* emit-rtl.c (gen_label_rtx): Likewise.
---
 gcc/emit-rtl.c | 7 ---
 gcc/rtl.h  | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index c51b7d8..5175284 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -2468,11 +2468,12 @@ set_mem_attrs_for_spill (rtx mem)
 
 /* Return a newly created CODE_LABEL rtx with a unique label number.  */
 
-rtx
+rtx_code_label *
 gen_label_rtx (void)
 {
-  return gen_rtx_CODE_LABEL (VOIDmode, NULL_RTX, NULL_RTX,
-NULL, label_num++, NULL);
+  return as_a rtx_code_label * (
+   gen_rtx_CODE_LABEL (VOIDmode, NULL_RTX, NULL_RTX,
+   NULL, label_num++, NULL));
 }
 
 /* For procedure integration.  */
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 049f01e..a703e34 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -2278,7 +2278,7 @@ extern rtx gen_reg_rtx (enum machine_mode);
 extern rtx gen_rtx_REG_offset (rtx, enum machine_mode, unsigned int, int);
 extern rtx gen_reg_rtx_offset (rtx, enum machine_mode, int);
 extern rtx gen_reg_rtx_and_attrs (rtx);
-extern rtx gen_label_rtx (void);
+extern rtx_code_label *gen_label_rtx (void);
 extern rtx gen_lowpart_common (enum machine_mode, rtx);
 
 /* In cse.c */
-- 
1.8.5.3