[llvm] r193742 - [SystemZ] Automatically detect zEC12 and z196 hosts

Richard Sandiford rsandifo at linux.vnet.ibm.com
Thu Oct 31 06:15:01 PDT 2013


Ulrich Weigand <Ulrich.Weigand at de.ibm.com> writes:
> Richard Sandiford <rsandifo at linux.vnet.ibm.com> wrote:
>> +        if (!Lines[I].drop_front(Pos).getAsInteger(10, Id)) {
>> +          if (Id >= 2827)
>> +            return "zEC12";
>> +          if (Id >= 2817)
>> +            return "z196";
>> +        }
>
> While this has been the case in recent machines, the machine
> type number is not guaranteed to increase with future models.
> For example, the pre-zSeries S/390 machines had the model
> number 9672 ...  (Of course, this was 32-bit only and so
> we don't support it anyway in LLVM.)
>
> It's still probably better to explicitly check for known
> model numbers.

Yeah, I thought about doing that, but I don't think it's necessary.
If IBM uses sensible numbering for future architectures -- and (looks at
pay cheque) I'm sure they will -- then matching ranges means we get the
benefit of zEC12 features automatically.  If for some reason the machine
numbers go down, the worst that will happen is that we'll unnecessarily
pick an older architecture instead.  Whereas if we only match the numbers
we know about, we'll _always_ get the oldest architecture (z10 in our case)
for new machines.

Thanks,
Richard




More information about the llvm-commits mailing list