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]

Re: PATCH RFC: Implement and use VEC(T,stack)


+   #define VEC_{TYPE}_stack_alloc(alloc)                          \
+    (VEC_op(df_ref,stack,alloc1)                                  \
+     (alloc,                                                      \
+      XALLOCAVAR (VEC({TYPE},stack),                              \
+                  VEC_embedded_size ({TYPE}, alloc))))

There's a pasto in these docs (df_ref). Also you can do

#define VEC_stack_alloc(TYPE, ALLOC) \
  (VEC_op(TYPE,stack,alloc1) (ALLOC, \
        XALLOCAVAR (VEC(TYPE, stack), VEC_embedded_size (TYPE, ALLOC))))

and define just

#define VEC_df_ref_stack_alloc(ALLOC) VEC_stack_alloc(df_ref, (ALLOC))

which is (only a bit) nicer. Also, please use a pointer_set as it has less overhead (maybe even a linear scan would do, we don't expect these vectors to live long do we??). Otherwise looks great!

Paolo


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