On Tue, Jun 10, 2008 at 01:44:08PM -0400, Kaveh R. GHAZI wrote:
> I don't understand the point about the asm.

I need to modify the SET_SRC of the individual SETs presented by
note_stores.  The caller of note_stores can't pass in the SET RTXes,
since they vary for each call of the callback function; it can only pass
in a copy of the entire instruction pattern.
So this would be something like:

write_profile_sections (rtx dest ATTRIBUTE_UNUSED, const_rtx const_x,
                        void *data)
{
  write_profile_sections_data *r = data;
  htab_t htab = r->htab;
  rtx x;

  __asm__ ("" : "=rX" (x) : "0" (const_x), "X" (r->pattern));
...

> And IMHO you overstate the
> effort required to "put all the code in to use [the ad-hoc struct]".

The current note_stores / walk_stores call is in an if clause, so adding
a variable declaration and two assignments also means that there needs
to be a new block statement.
note_stores isn't very large, and with the assembly cruft thrown in
and all this pretending to use const types when we aren't, the balance
is tilted in favour of another note_stores copy.

Reply via email to