GAP incorrectly refers to field "__b_BaseClass" in derived classes

GAP incorrectly refers to field "__b_BaseClass" in derived classes

Bild des Benutzers Ricardo Costa

Hello,

GAP is generating some remarks that refer to a non-existent field "__b_BaseClass" in derived classes, where BaseClass is the name ofthe base class.

Consider the following code (gap.cpp), compiled with icl gap.cpp /O2 /Qguide:3


struct Base

{

int a;

int b;

};

struct Derived : public Base

{

int c;

};

int main ()

{

Derived x;

return x.b + x.c;

}

GAP generates the following remarks:

GAP REPORT LOG OPENED ON Fri May 28 03:01:30 2010

remark #30761: Add -Qparallel option if you want the compiler to generate recommendations for improving auto-parallelization.

D:\\sandbox\\gap.cpp(7): remark #30757: (DTRANS) References to fields: '__b_Base' in 'Derived' are not seen. Removing these fields from the structure definition may improve performance. [VERIFY] Make sure that the restructured code satisfies the original program semantics.

D:\\sandbox\\gap.cpp(1): remark #30757: (DTRANS) References to fields: 'a' in 'Base' are not seen. Removing these fields from the structure definition may improve performance. [VERIFY] Make sure that the restructured code satisfies the original program semantics.

END OF GAP REPORT LOG

The field "__b_Base" does not exist in Derived.

The same problemhappens in warning #30756. For example, this is what I gotby usingGAP on my project, which has an OTCreature class derived fromthe Creature class:

warning #30756: (DTRANS) Splitting the structure 'OTCreature' into two parts will improve data locality and is highly recommended. Frequently accessed fields are 'm_direction, m_baseSpeed, m_varSpeed'; performance may improve by putting these fields into one structure and the remaining fields into another structure. Alternatively, performance may also improve by reordering the fields of the structure. Suggested field order:'m_direction, m_baseSpeed, m_varSpeed, m_experience, __b_Creature, m_position, m_level, m_magicLevel, m_light, m_mana, m_health'. [VERIFY] The suggestion is based on the field references in current compilation. Please make sure that the restructuring is applied to field references in all source files of the application. Also make sure that the restructured code satisfies the original program semantics.

Again, there's a reference to a"__b_Creature" field. I couldn't make a simple test case for this one, but I believe the root of the problem is the same.

Regards,
Ricardo.

3 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

Yes, it does look like a bug. I'll update this thread when we have a resolution.

This issue is resolved with the latest update ofIntel Parallel Composer 2011 or Composer XE products.

Melden Sie sich an, um einen Kommentar zu hinterlassen.