<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 7/10/20 2:33 AM, Sharma, Reshabh
      Kumar via llvm-dev wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:BN6PR12MB1681197885DDAD9804CBC217F0650@BN6PR12MB1681.namprd12.prod.outlook.com">
      
      <style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;}</style>
      <p style="font-family:Arial;font-size:10pt;color:#0078D7;margin:15pt;" align="Left">...<br>
      </p>
      <br>
      <div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0); background-color:
          rgb(255, 255, 255);">
          <div>
            <p style="font-weight: normal; color: windowtext;
              text-align: left;"><span style="font-family: Calibri,
                Arial, Helvetica, sans-serif; font-size: 12pt; color:
                rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Hi
                everyone,<br>
              </span></p>
            <p style="font-weight: normal; color: windowtext;
              text-align: left;"><span style="font-family: Calibri,
                Arial, Helvetica, sans-serif; font-size: 12pt; color:
                rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><br>
              </span></p>
            <p style="font-weight: normal; color: windowtext;
              text-align: left;"><span style="font-family: Calibri,
                Arial, Helvetica, sans-serif; font-size: 12pt; color:
                rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Asan
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">instrumentation</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> introduces a </span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">ptrtoint</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> instruction
                which is used as an argument to </span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">a number of</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> runtime
                functions</span><span style="font-family: Calibri,
                Arial, Helvetica, sans-serif; font-size: 12pt; color:
                rgb(0, 0, 0); background-color: rgb(255, 255, 255);">.
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">Every
                instrumented load/store ends up having
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">at least
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">one
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">ptrtoint</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> attached to its
                address.</span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">However, the
                community has now
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">raised
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">a</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> number of</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> concerns
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">about the use
                of
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">LLVM
                generated
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">ptrtoint</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> & </span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">inttoptr</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> [1]</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">and have
                pointed out its effect</span><span style="font-family:
                Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;
                color: rgb(0, 0, 0); background-color: rgb(255, 255,
                255);"> on different optimization</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">s</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">. </span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">ptrtoint</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">/</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">inttoptr</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> leads to
                conservative analysis results which </span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">does
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">affect the
                performance. </span><span style="font-family: Calibri,
                Arial, Helvetica, sans-serif; font-size: 12pt; color:
                rgb(0, 0, 0); background-color: rgb(255, 255, 255);"> </span></p>
          </div>
          <div>
            <p style="text-align: left; color: windowtext;"><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> </span></p>
          </div>
          <div>
            <p style="text-align: left; color: windowtext;"><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">We are thinking
                of extending
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">the LLVM
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">sanitizers</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">, starting with </span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">asan</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">,
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">to
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">heterogeneous</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> situations such
                as </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">those found
                in
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">OpenCL</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> and</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> HIP.</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">This will
                require
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">asan</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> to handle
                address spaces</span><span style="font-family: Calibri,
                Arial, Helvetica, sans-serif; font-size: 12pt; color:
                rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
                other than
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">default
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">0</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">.</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">We want to
                handle address spaces</span><span style="font-family:
                Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;
                color: rgb(0, 0, 0); background-color: rgb(255, 255,
                255);">
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">similarly to
                how</span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);"> it is done
                in the present </span><span style="font-family:
                Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;
                color: rgb(0, 0, 0); background-color: rgb(255, 255,
                255);">asan</span><span style="font-family: Calibri,
                Arial, Helvetica, sans-serif; font-size: 12pt; color:
                rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
                instrumentation, using inline shadow memory mapping</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">. The required
                information to calculate
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">shadow
                address is not known for a few address spaces at compile
                time,
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">and
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">for
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">such use
                cases we plan to introduce runtime calls that can return
                the
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">required
                shadow address.
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);"> </span></p>
          </div>
          <div>
            <p style="text-align: left; color: windowtext;"><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> </span></p>
          </div>
          <div>
            <p style="text-align: left; color: windowtext;"><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">T</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">he
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">ptrtoint</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">introduced
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">by
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">the
                instrumentation
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">hinder</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> optimization</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">s that are
                important for
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">OpenCL and
                other heterogeneous languages which directly or
                indirectly use address
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">spaces</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">.</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">For
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">example</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">, 
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">InferAddressSpace</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">which</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> statically</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> determine</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">s</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> the address
                space of generic addresses, it does not work after
                seeing </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">ptrtoint</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> as one of the
                uses. </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">The same
                applies to any optimization that deals with alias
                analysis or pointers in general. </span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> </span></p>
          </div>
          <div>
            <p style="text-align: left; color: windowtext;"><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> </span></p>
          </div>
          <div>
            <p style="text-align: left; color: windowtext;"><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">The hurdle in
                getting rid of the
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">introduced</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">ptrtoint</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">in
                instrumentation
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">is
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">the fact that
                all runtime
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">function
                expects</span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);"> the address
                as a </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">uptr</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> (</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">uptr</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> is unsigned
                long)</span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">.</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">Changing the
                data type of
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">address</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">es passed to
                sanitizer</span><span style="font-family: Calibri,
                Arial, Helvetica, sans-serif; font-size: 12pt; color:
                rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">runtime
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">functions</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> from </span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">uptr</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> to </span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">void*
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">will
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">eliminate the
                need for</span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">the
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">conversion</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> to integer using
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">ptrtoint</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">.
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">Removing the
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">ptrtoint</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> from </span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">asan</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> instrumentation
                will boost the performance </span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">and</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> will reduce the
              </span><span style="font-family: Calibri, Arial,
                Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0,
                0); background-color: rgb(255, 255, 255);">differences</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> with </span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);">uninstrumented</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> code.</span><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> </span></p>
          </div>
          <div>
            <p style="text-align: left; color: windowtext;"><span style="font-family: Calibri, Arial, Helvetica,
                sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                background-color: rgb(255, 255, 255);"> </span></p>
          </div>
          <div>
            <ol>
              <li style="font-size: 11pt; font-family: Times New Roman,
                Times New Roman_MSFontService, serif">
                <p style="font-weight: normal; color: windowtext;
                  text-align: left;"><span style="font-family: Calibri,
                    Arial, Helvetica, sans-serif; font-size: 12pt;
                    color: rgb(0, 0, 0); background-color: rgb(255, 255,
                    255);"><a href="http://lists.llvm.org/pipermail/llvm-dev/2019-January/129095.html" id="LPlnk752550" moz-do-not-send="true">http://lists.llvm.org/pipermail/llvm-dev/2019-January/129095.html</a></span><span style="font-family: Calibri, Arial, Helvetica,
                    sans-serif; font-size: 12pt; color: rgb(0, 0, 0);
                    background-color: rgb(255, 255, 255);">
                    <br>
                  </span></p>
              </li>
            </ol>
            <div><br>
            </div>
            <div>Many thanks,<br>
            </div>
          </div>
        </div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0); background-color:
          rgb(255, 255, 255);">
          Reshabh and Brian<br>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p>First, let me say that I think it's wonderful that you're
      interested in making the sanitizers work in heterogeneous
      environments. I definitely hope that you're able to make this
      work.</p>
    <p><br>
    </p>
    <p> Second, for the reasons you've highlighted, our best practice is
      for optimizations not to introduce ptrtoint/inttoptr. i8* GEPs,
      along with casts as necessary, are preferred whenever possible.
      Given that one benefit of the Sanitizers is that the
      instrumentation can be optimized along with the program, I think
      it makes sense to consider these instrumentation passes in that
      category. It's true that, in the traditional use case, the fact
      that the ptrtoint obscures aliasing information isn't a big deal
      when the int is just being passed into a function with side
      effects (as it sounds like is the case here). If we have a use
      case that motivates changing this, however, I think that we should
      consider doing so.</p>
    <p><br>
    </p>
    <p> -Hal<br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite" cite="mid:BN6PR12MB1681197885DDAD9804CBC217F0650@BN6PR12MB1681.namprd12.prod.outlook.com">
      <div>
        <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
          font-size: 12pt; color: rgb(0, 0, 0); background-color:
          rgb(255, 255, 255);">
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
  </body>
</html>