Patchwork PATCH: Fix bootstrap on x86

login
register
mail settings
Submitter H.J. Lu
Date Sept. 13, 2010, 8:35 p.m.
Message ID <AANLkTi=hcUksWf4VtpedbS6heG5W1mdhqV3kCwGNU+7U@mail.gmail.com>
Download mbox | patch
Permalink /patch/64649/
State New
Headers show

Comments

H.J. Lu - Sept. 13, 2010, 8:35 p.m.
On Mon, Sep 13, 2010 at 1:15 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Mon, Sep 13, 2010 at 12:29 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>
>> This is the patch I checked in.
>>
>> Thanks.
>>
>> --
>> H.J.
>> ---
>> gcc/
>>
>> 2010-09-13  H.J. Lu  <hongjiu.lu@intel.com>
>>
>>        * config/i386/i386-protos.h (ix86_units_per_simd_word): New.
>>
>>        * config/i386/i386.c (initial_ix86_tune_features): Add
>>        X86_TUNE_VECTORIZE_DOUBLE.
>>        (ix86_units_per_simd_word): New.
>>
>>        * config/i386/i386.h (ix86_tune_indices): Likewise.
>>        (TARGET_VECTORIZE_DOUBLE): New.
>>        (UNITS_PER_SIMD_WORD): Defined with ix86_units_per_simd_word.
>
>
> This causes a bootstrap failure on i686-linux-gnu:
> /home/regress/tbox/svn-gcc/gcc/tree-vect-stmts.c: In function
> 'get_vectype_for_scalar_type':
> /home/regress/tbox/svn-gcc/gcc/tree-vect-stmts.c:4678:3: error:
> implicit declaration of function 'ix86_units_per_simd_word'
> [-Werror=implicit-function-declaration]
> /home/regress/tbox/svn-gcc/gcc/tree-vect-stmts.c:4678:29: error:
> comparison between signed and unsigned integer expressions
> [-Werror=sign-compare]
> cc1: all warnings being treated as errors
>
>

This patch fixes it. OK for trunk with a ChangeLog entry?

Thanks.
Andrew Pinski - Sept. 13, 2010, 8:38 p.m.
On Mon, Sep 13, 2010 at 1:35 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>>        * config/i386/i386.h (ix86_tune_indices): Likewise.
>>>        (TARGET_VECTORIZE_DOUBLE): New.
>>>        (UNITS_PER_SIMD_WORD): Defined with ix86_units_per_simd_word.

I think it is time to change UNITS_PER_SIMD_WORD into a target hook
rather than including tm_p.h everywhere.

-- Pinski

Patch

diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 6d15bda..be5dec0 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -26,6 +26,7 @@  along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "ggc.h"
 #include "tree.h"
+#include "tm_p.h"
 #include "target.h"
 #include "basic-block.h"
 #include "tree-pretty-print.h"