[LLVMdev] Removing TargetMachine CPU auto-detection for PowerPC and SystemZ?
hfinkel at anl.gov
Mon Mar 23 11:42:06 PDT 2015
----- Original Message -----
> From: "Ulrich Weigand" <Ulrich.Weigand at de.ibm.com>
> To: "Hal J. Finkel" <hfinkel at anl.gov>
> Cc: llvmdev at cs.uiuc.edu, grosbach at apple.com
> Sent: Monday, March 23, 2015 12:21:17 PM
> Subject: Removing TargetMachine CPU auto-detection for PowerPC and SystemZ?
> Hi Hal,
> I only just noticed that about a year ago, Jim removed CPU
> for the X86 target:
> >Currently the X86 backend does CPU auto-detection and subtarget
> >detection when the TargetMachine is created if no explicit CPU was
> >specified. It's counterintuitive for low level tools like ‘llc’ to
> >this, as it means the same .ll file compiled on heterogenous
> >generates different results from the same ‘llc’ command line. It is
> >useful to be able to opt-in to such behavior to, for example,
> >clang’s behavior when -mcpu=native is supplied to clang. My thought
> >to do something similar here and teach ‘llc’ to recognize
> >and probe the host CPU if that is given. The subtarget features will
> >then be filled in according to the feature string for that CPU. This
> >(a) changes the auto-detection from opt-out to opt-in and (b) moves
> >the logic out of the core target backend and into the tools drivers.
> >Attached are draft patches that do this for X86. Similar but smaller
> >cleanups can also be done for SystemZ and PowerPC if it’s agreed
> >is a good idea.
> However, this was then never implemented for SystemZ and PowerPC.
> we do so as well?
Yes, I think we should.
> Note that mesa has in the meantime changed to do the auto-detection
> setting up the JIT context, and I assume other JIT users have done so
> well by now. For clang, this was never done automatically anyway.
> Mit freundlichen Gruessen / Best Regards
> Ulrich Weigand
> Dr. Ulrich Weigand | Phone: +49-7031/16-3727
> STSM, GNU/Linux compilers and toolchain
> IBM Deutschland Research & Development GmbH
> Vorsitzende des Aufsichtsrats: Martina Koederitz |
> Geschäftsführung: Dirk
> Sitz der Gesellschaft: Böblingen | Registergericht: Amtsgericht
> Stuttgart, HRB 243294
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-dev