<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi Nemanja,<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 2017-11-30 11:38, Nemanja Ivanovic
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAObEeNha9ZqAm-y_2bWAB3f74RSoQwLwC511hz80bQ1=+C1WHQ@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div>
            <div>Hi Jonas,<br>
            </div>
            on PPC we store the "ID for the CPU" in what we call a
            "DarwinDirective" (the name is likely to change in the
            future). The idea is that the CPU identifies itself to the
            Subtarget through a feature. Then you can easily query the
            CPU ID through that feature.<br>
            <br>
          </div>
          For details, you can see `PPCTTIImpl::getCacheLineSize()`.<br>
        </div>
        P.S. I imagine that after so long, you've found the solution
        yourself (or come up with a different one). I am sorry, but I've
        been falling behind on llvm-dev emails this fall so some have
        slipped by.<br>
      </div>
      <div class="gmail_extra"><br>
      </div>
    </blockquote>
    Thanks for the advice...<br>
    <br>
    since this is not really urgently needed (currently not used
    anywhere I think), we decided to wait and hope for the -mtune patch
    to go in soon. Then the checking for a CPU feature (like I also
    thought of) like this would not be needed.<br>
    <br>
    /Jonas<br>
    <br>
    <br>
    <blockquote type="cite"
cite="mid:CAObEeNha9ZqAm-y_2bWAB3f74RSoQwLwC511hz80bQ1=+C1WHQ@mail.gmail.com">
      <div class="gmail_extra">
        <div class="gmail_quote">On Tue, Oct 17, 2017 at 4:48 PM, Jonas
          Paulsson via llvm-dev <span dir="ltr"><<a
              href="mailto:llvm-dev@lists.llvm.org" target="_blank"
              moz-do-not-send="true">llvm-dev@lists.llvm.org</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
            <br>
            While trying to implement the SystemZTTI::getCacheSize()
            method, it became clear that a simple way of retrieving the
            machine ID is somehow missing.<br>
            <br>
            It seems that the Subtarget should set a variable during
            initialization perhaps by looking at the CPU string.<br>
            <br>
            I would like to hear any opinion on how this would actually
            be best implemented.<br>
            <br>
            * Comparing the CPU string seems to duplicate
            SystemZProcessors.td in the sense that it would ideally be
            sufficient to only specify the CPU string once.<br>
            <br>
            * Extend ProcessorModel with a "processor model ID" that the
            Subtarget could later retrieve?<br>
            <br>
            * Or instead extend MCSchedModel with the ID, or even store
            the cache size / assosiativity in MCSchedModel?<br>
            <br>
            / Jonas<br>
            <br>
            <br>
            <br>
            ______________________________<wbr>_________________<br>
            LLVM Developers mailing list<br>
            <a href="mailto:llvm-dev@lists.llvm.org" target="_blank"
              moz-do-not-send="true">llvm-dev@lists.llvm.org</a><br>
            <a
              href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>