This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/38844] [4.3/4.4 Regression] deadlock with __attribute__((always_inline)) at -O1 and above



------- Comment #9 from jakub at gcc dot gnu dot org  2009-01-28 21:08 -------
The #c6 patch doesn't make sense to me.

Two alternative testcases:

inline __attribute__ ((always_inline))
void A (void)
{
  int i;
  asm volatile ("" : "=m" (i));
  A ();
  A ();
}

int
main ()
{
  A ();
  return 0;
}

and

inline void A (void);
inline void B (void);

inline __attribute__ ((always_inline))
void C (void)
{
  B ();
}

inline __attribute__ ((always_inline))
void B (void)
{
  A ();
}

inline __attribute__ ((always_inline))
void A (void)
{
  int i;
  asm volatile ("" : "=m" (i));
  A ();
  C ();
}

int
main ()
{
  A ();
  return 0;
}

As the cgraph_decide_inlining_incrementally + try_inline combo goes
depth-first, it discovers just the first (perhaps indirect) recursive inlining
only, the others mean we keep recursing with deeper and deeper depths.  I
wonder if it couldn't go breadth-first instead.  Honza?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38844


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