Wilco Dijkstra via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> Hi Richard,
>
>> I share Richard E's concern about the effect of this on people who run
>> ./cc1 directly.  (And I'm being selfish here, because I regularly run
>> ./cc1 directly on toolchains configured with --with-arch=armv8.2-a+sve.)
>> So TBH my preference would be to keep the TARGET_CPU_DEFAULT_FLAGS stuff.
>
> And what exactly should it do? It didn't work correctly before, and even now 
> it's not
> clear what TARGET_CPU_DEFAULT should be set to for all possible combinations 
> of
> --with-cpu=X --with-arch=Y --with-tune=Z. Should it have exactly the same 
> behaviour
> with and without the driver? If so, that's difficult to achieve in 
> config.gcc, and it would
> require a completely different mechanism to ensure the default ends up the 
> same
> without the driver (eg. store the original strings in TARGET_CPU_DEFAULT and 
> then
> postprocess in the backend as if they were actual --cpu/--arch/--tune 
> commands if
> the command-line didn't already set them, ie. replicating what the driver 
> already does).
> And it would need to be done for --with-abi as well.

The specific case I mentioned works well enough though (given that I also
run ./cc1 without -march, -mcpu or -mtune flags).  I agree it might not
work for all combinations of --with-arch, --with-cpu and --with-tune,
but I'm not sure that's a strong reason to remove the cases that do work
(or at least, work well enough).  This cc1 behaviour is a feature for
developers rather than users after all.

Perhaps I've missed the point, but why do you need to remove this code
in order to do what you need to do?

> So is changing your preferred config to --with-cpu=neoverse-v1 really a 
> problem?

I specifically want to test generic SVE rather than SVE tuned for a
specific core, so --with-arch=armv8.2-a+sve is the thing I want to test.
I think the question is instead whether it's really a problem to change
my workflow so that I don't run cc1 directly any more, or that I remember
to respecify the --with-arch value as an -march flag when running cc1.
And yeah, maybe the right answer is that I should learn to do that.
It's just that I don't personally understand why this change is necessary.

Like I say though, I'm happy to defer to a maintainer who does think the
patch is a good thing.

Thanks,
Richard

Reply via email to