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: [RFC,PATCH] Provide get_attr functions with alternative parameter



The attached patch provides getter functions with an additional
argument specifying the number of the alternative for which the
attribute value should be returned. In order to get the old behaviour
the functions need to be invoked with -1 as alternative number. Inline
wrappers with the old function names are provided in order to keep
backwards compatibility.

Interesting! Is there a reason (in the patch you're working on) why the inline wrappers couldn't just do


  extract_constrain_insn_cached (insn);
  return get_alt_attr_blah_blah (insn, which_alternative);

instead of supporting the special alternative number -1 in get_alt_attr_blah_blah? (I can see the reason could be code bloat, or GCC deciding not to inline get_attr_blah_blah, but I thought I'd just ask).

Paolo


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