aborting a compilation with illegal arguments

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

aborting a compilation with illegal arguments

Neil Nelson via cfe-dev
Hi,

SystemZ only has vector support on z13, and therefore it does not make
sense to pass the -fzvector option without specifying z13 as well.
Currently, if compiling with clang, the compilation will abort during
isel in cases where -fzvector is used incorrectly, but it seems best to
abort early, in the FE, if possible.

I would like to ask how one would best handle this. SystemZTargetInfo
has a vector feature, which it would make sense to check against. One
could also check the CPU string, I guess.

/Jonas Paulsson

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: aborting a compilation with illegal arguments

Neil Nelson via cfe-dev
Hi Jonas,

We have a similar set of checks for -mpower8-vector and -mvsx, see ppcUserFeaturesCheck in lib/Basic/Targets.cpp.

 -Hal

----- Original Message -----

> From: "Jonas Paulsson via cfe-dev" <[hidden email]>
> To: [hidden email]
> Sent: Friday, December 4, 2015 8:03:32 AM
> Subject: [cfe-dev] aborting a compilation with illegal arguments
>
> Hi,
>
> SystemZ only has vector support on z13, and therefore it does not
> make
> sense to pass the -fzvector option without specifying z13 as well.
> Currently, if compiling with clang, the compilation will abort during
> isel in cases where -fzvector is used incorrectly, but it seems best
> to
> abort early, in the FE, if possible.
>
> I would like to ask how one would best handle this. SystemZTargetInfo
> has a vector feature, which it would make sense to check against. One
> could also check the CPU string, I guess.
>
> /Jonas Paulsson
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>

--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: aborting a compilation with illegal arguments

Neil Nelson via cfe-dev
Hi Hal,

thanks for help!

The FeaturesVec is however empty in initFeatureMap(). Passing -fzvector
is recognized in ParseLangArgs():

   if (Args.hasArg(OPT_fzvector))
     Opts.ZVector = 1;

It however does not seem like this flag is accessible in
initFeatureMap(). What should I do?

/Jonas


On 2015-12-04 15:24, Hal Finkel wrote:

> Hi Jonas,
>
> We have a similar set of checks for -mpower8-vector and -mvsx, see ppcUserFeaturesCheck in lib/Basic/Targets.cpp.
>
>   -Hal
>
> ----- Original Message -----
>> From: "Jonas Paulsson via cfe-dev" <[hidden email]>
>> To: [hidden email]
>> Sent: Friday, December 4, 2015 8:03:32 AM
>> Subject: [cfe-dev] aborting a compilation with illegal arguments
>>
>> Hi,
>>
>> SystemZ only has vector support on z13, and therefore it does not
>> make
>> sense to pass the -fzvector option without specifying z13 as well.
>> Currently, if compiling with clang, the compilation will abort during
>> isel in cases where -fzvector is used incorrectly, but it seems best
>> to
>> abort early, in the FE, if possible.
>>
>> I would like to ask how one would best handle this. SystemZTargetInfo
>> has a vector feature, which it would make sense to check against. One
>> could also check the CPU string, I guess.
>>
>> /Jonas Paulsson
>>
>> _______________________________________________
>> cfe-dev mailing list
>> [hidden email]
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: aborting a compilation with illegal arguments

Neil Nelson via cfe-dev
Hi Jonas,

Please see getPPCTargetFeatures in lib/Driver/Tools.cpp (you'll need look for OPT_fzvector and add some corresponding feature for the cc1 invocation).

 -Hal

----- Original Message -----

> From: "Jonas Paulsson" <[hidden email]>
> To: "Hal Finkel" <[hidden email]>
> Cc: [hidden email]
> Sent: Monday, December 7, 2015 9:21:35 AM
> Subject: Re: [cfe-dev] aborting a compilation with illegal arguments
>
> Hi Hal,
>
> thanks for help!
>
> The FeaturesVec is however empty in initFeatureMap(). Passing
> -fzvector
> is recognized in ParseLangArgs():
>
>    if (Args.hasArg(OPT_fzvector))
>      Opts.ZVector = 1;
>
> It however does not seem like this flag is accessible in
> initFeatureMap(). What should I do?
>
> /Jonas
>
>
> On 2015-12-04 15:24, Hal Finkel wrote:
> > Hi Jonas,
> >
> > We have a similar set of checks for -mpower8-vector and -mvsx, see
> > ppcUserFeaturesCheck in lib/Basic/Targets.cpp.
> >
> >   -Hal
> >
> > ----- Original Message -----
> >> From: "Jonas Paulsson via cfe-dev" <[hidden email]>
> >> To: [hidden email]
> >> Sent: Friday, December 4, 2015 8:03:32 AM
> >> Subject: [cfe-dev] aborting a compilation with illegal arguments
> >>
> >> Hi,
> >>
> >> SystemZ only has vector support on z13, and therefore it does not
> >> make
> >> sense to pass the -fzvector option without specifying z13 as well.
> >> Currently, if compiling with clang, the compilation will abort
> >> during
> >> isel in cases where -fzvector is used incorrectly, but it seems
> >> best
> >> to
> >> abort early, in the FE, if possible.
> >>
> >> I would like to ask how one would best handle this.
> >> SystemZTargetInfo
> >> has a vector feature, which it would make sense to check against.
> >> One
> >> could also check the CPU string, I guess.
> >>
> >> /Jonas Paulsson
> >>
> >> _______________________________________________
> >> cfe-dev mailing list
> >> [hidden email]
> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> >>
>
>

--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev