<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><base href="x-msg://3051/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Guy,</div><div><br></div><div><br></div><div>+    case BuiltinType::OCLSampler:</div><div>+    case BuiltinType::OCLEvent:</div><div>+    case BuiltinType::OCLImage1d:</div><div>+    case BuiltinType::OCLImage1dArray:</div><div>+    case BuiltinType::OCLImage1dBuffer:</div><div>+    case BuiltinType::OCLImage2d:</div><div>+    case BuiltinType::OCLImage2dArray:</div><div>+    case BuiltinType::OCLImage3d:</div><div>+      // Currently these types are pointers to opaque types.</div><div>+      Width = Target->getPointerWidth(0);</div><div>+      Align = Target->getPointerAlign(0);</div><div>+      break;</div><div>     }</div><div><br></div><div>Is wrong if sampler is i32 I think.</div><div><br></div><div>Also, probably wrong:</div><div><div>+  case BuiltinType::OCLSampler:</div><div>+    return getOrCreateStructPtrType("opencl_sampler_t", OCLSamplerDITy);</div></div><div><br></div><div>Why do this?</div><div><div>+  } else if (type->isSamplerT()) {</div><div>+    CGM.getOpenCLRuntime().initializeOpenCLSampler(this, lvalue.getAddress(), EmitScalarExpr(init));</div><div>   } </div></div><div><br></div><div>I also don't understand  why you need to go through the OpenCLRuntime for this.</div><div><div>+  if (D->getType()->isSamplerT()) {</div><div>+    getOpenCLRuntime().initializeOpenCLSampler(NULL, GV, Init);</div><div>+  } else {</div><div>+    GV->setInitializer(Init);</div><div>+  }</div></div><div><br></div><div>I would rather just see sampler ripped out for now. I have no issues with the images/event code.</div><div><br></div><div>-Tanya</div><div><br></div><div><br></div><div><div>On Oct 16, 2012, at 1:40 PM, Benyei, Guy wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Attached a patch that makes sampler_t an i32 – I still think opaque types would be more in the OpenCL spec’s spirit, however it’s more important to get this patch committed. Changing the sampler_t representation won’t be a big issue on top of this.<o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">I’ve also added sampler_t initialization including restrictions, and fixed Anton Lokhmotov’s latest remarks.<o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Please review.<o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Thanks<o:p></o:p></span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></div><div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><span><image001.png></span><o:p></o:p></span></div></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></div><div><div style="border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-top-style: solid; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding-top: 3pt; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; "><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">From:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><span class="Apple-converted-space"> </span>Tanya Lattner [mailto:lattner@<a href="http://apple.com">apple.com</a>]<span class="Apple-converted-space"> </span><br><b>Sent:</b><span class="Apple-converted-space"> </span>Monday, October 15, 2012 20:47<br><b>To:</b><span class="Apple-converted-space"> </span>Benyei, Guy<br><b>Cc:</b><span class="Apple-converted-space"> </span>Richard Smith;<span class="Apple-converted-space"> </span><a href="mailto:cfe-dev@cs.uiuc.edu" style="color: blue; text-decoration: underline; ">cfe-dev@cs.uiuc.edu</a>; Villmow, Micah;<span class="Apple-converted-space"> </span><a href="mailto:Anton.Lokhmotov@arm.com" style="color: blue; text-decoration: underline; ">Anton.Lokhmotov@arm.com</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [cfe-dev] OpenCL & SPIR specific types - proposal and patch<o:p></o:p></span></div></div></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><o:p> </o:p></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; ">Given there is some discussion on sampler still, I suggest you remove it from your patch so the rest can get a final review and hopefully get into the tree.<o:p></o:p></div><div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><o:p> </o:p></div></div><div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; ">-Tanya<o:p></o:p></div></div><div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><o:p> </o:p></div><div><div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; ">On Oct 9, 2012, at 1:49 PM, "Benyei, Guy" <<a href="mailto:guy.benyei@intel.com" style="color: blue; text-decoration: underline; ">guy.benyei@intel.com</a>> wrote:<o:p></o:p></div></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><br><br><o:p></o:p></div><div><div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">I’ve refactored the code to remove the repeated parts, and also fixed Anton Lokhmotov’s comments.</span><o:p></o:p></div></div><div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span><o:p></o:p></div></div><div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Please review.</span><o:p></o:p></div></div><div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span><o:p></o:p></div></div><div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Thanks</span><o:p></o:p></div></div><div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><image001.png></span><o:p></o:p></div></div></div></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0in; margin-bottom: 0.0001pt; "><o:p> </o:p></div></div></div><span><opencl_types5.patch></span><p style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; ">---------------------------------------------------------------------<br>Intel Israel (74) Limited</p><p style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; ">This e-mail and any attachments may contain confidential material for<br>the sole use of the intended recipient(s). Any review or distribution<br>by others is strictly prohibited. If you are not the intended<br>recipient, please contact the sender and delete all copies.</p></div></blockquote></div><br></body></html>