I have not received any comments so far. Can a gatekeeper please the review 
this patch?

Thanks.
-Pallavi

From: Mathew, Pallavi
Sent: Wednesday, May 25, 2011 1:57 PM
To: open64-devel@lists.sourceforge.net
Subject: Code review request for front-end bugfix patch

Hi,
Can a gatekeeper please review the patch below?

Index: osprey-gcc-4.2.0/gcc/tree-inline.c
===================================================================
--- osprey-gcc-4.2.0/gcc/tree-inline.c     (revision 3599)
+++ osprey-gcc-4.2.0/gcc/tree-inline.c     (working copy)
@@ -2028,6 +2028,7 @@
     {
       if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn))
       /* Avoid warnings during early inline pass. */
+      && !DECL_IN_SYSTEM_HEADER (fn)
       && (!flag_unit_at_a_time || cgraph_global_info_ready))
     {
       sorry ("inlining failed in call to %q+F: %s", fn, reason);


Failing testcase when compiled with 'openCC -Winline':
#include <xmmintrin.h>
typedef __m64 m64;

m64 add(const m64 &a, const m64 &b) {
  return _mm_adds_pu16 (a, b);
}
int main()
{
  m64 a,b;
  add(a,b);
  return 0;
}

Problem/Fix Description:
When is compiled with -Winline, the above testcase gives the message:
...lib/gcc/x86_64-redhat-linux/4.2.0/include/mmintrin.h: In function 'int 
__vector__ add(const int __vector__&, const int __vector__&)'
 .../lib/gcc/x86_64-redhat-linux/4.2.0/include/mmintrin.h:361: sorry, 
unimplemented: inlining failed in call to 'int __vector__ _mm_adds_pu16(int 
__vector__, int __vector__)': function not inlinable
<testcase>.cpp:5: sorry, unimplemented: called from here

gcc does not give an error message.

The problem is in file osprey-gcc-4.2.0/gcc/tree-inline.c, function 
expand_call_inline.  The fix is to emit no (error or warning) message if the
function marked for inlining is declared in a system header file.

Thanks.
Pallavi
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to