Second call for code review. My boss asked me to check-in a fix to this blocker ASAP...
Thanks Shuxin On Wed, Dec 8, 2010 at 10:48 AM, shuxin yang <shuxin.ope...@gmail.com>wrote: > Hi, there: > > Bug 586 is about back-end folding gcc extension __builtin_object_size() > into a compile time constant. > > If I understand right, "__builtin_object_size(void*p, int type)" depends > on compiler's capability > of data flow analysis; if the compiler is able to reveal the object O that > <p> points to, it will returns > sizeof(typeof(O)); otherwise, it returns "type < 2? -1 : 0". > > gcc tries to fold this built-in function in many places; it calls > fold_builtin_object_size()@builtin.c > prior to generic -> gspin conversion. However, fold_builtin_object_size() > is only able to handle simple cases; > general cases are taken cared by a pass named "objsz" (see > tree-object-size.c) which rely on > SSA and it is called after the generic->gspin conversion. > > My fix, honestly kludge, is simply to replace the builtin function with > "type < 2 ? -1 : 0". > In the long run, the back-end should have full-blown support. > > Thanks > Shuxin > >
------------------------------------------------------------------------------
_______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel