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 middle-end/35560] Missing CSE/PRE for memory operations involved in virtual call.


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35560

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
                 CC|                            |hubicka at gcc dot gnu.org
           Assignee|davidxl at gcc dot gnu.org         |unassigned at gcc dot gnu.org

--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> ---
The devirt machinery nowadays might have enough tools to do the disambiguation.
 IIRC david is no longer working on GCC so unassigning him.

Current GIMPLE IL is

  <bb 2> [100.00%]:
  _1 = ap_9(D)->_vptr.A;
  _2 = *_1;
  _12 = OBJ_TYPE_REF(_2;(struct A)ap_9(D)->0) (ap_9(D), i_10(D));
  _3 = ap_9(D)->_vptr.A;
  _4 = MEM[(int (*__vtbl_ptr_type) () *)_3 + 8B];
  _14 = OBJ_TYPE_REF(_4;(struct A)ap_9(D)->1) (ap_9(D), i_10(D));
  _5 = _12 + _14;
  _6 = ap_9(D)->_vptr.A;
  _7 = *_6;
  _16 = OBJ_TYPE_REF(_7;(struct A)ap_9(D)->0) (ap_9(D), i_10(D));
  _17 = _5 + _16;
  return _17;

I believe our representation of virtual calls is less than optimal here for
the purpose of CSE and disambiguation.

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