<html><head><base href="x-msg://2080/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div><div><div>On Oct 12, 2012, at 7:56 AM, Anton Lokhmotov wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-GB" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">I agree with Micah and Guy that the sampler type should be an opaque type.  The i32 solution has too many cons, and the pros are not clear-cut either.  (For example, I don’t quite understand why constant propagation on samplers should even work.)<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "></span></div></div></div></span></blockquote><div><br></div><div>Sorry, can you please explain why constant propagation shouldn't work on program scope samplers?</div><div><br></div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-GB" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">The problem with renaming of opaque types should better be solved by extending LLVM to disallow renaming given types.<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Without seeing a follow-up patch, I cannot comment on the use of functions to initialize samplers.  In our implementation, we use both opaque types and metadata, which works fine.<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Anton.<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; position: static; z-index: auto; "><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: 0cm; padding-bottom: 0cm; padding-left: 0cm; position: static; z-index: auto; "><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><b><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif; ">From:</span></b><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif; "><span class="Apple-converted-space"> </span>Villmow, Micah [mailto:Micah.Villmow@amd.com]<span class="Apple-converted-space"> </span><br><b>Sent:</b><span class="Apple-converted-space"> </span>12 October 2012 00:02<br><b>To:</b><span class="Apple-converted-space"> </span>Tanya Lattner<br><b>Cc:</b><span class="Apple-converted-space"> </span>Benyei, Guy;<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>; Anton Lokhmotov<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: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><o:p> </o:p></div><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; position: static; z-index: auto; "><div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US">If the type gets renamed, how are you going to identify what is a sampler?<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><b><i><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">[Villmow, Micah] Usage.</span></i></b><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p></o:p></span></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US"><o:p> </o:p></span></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US">See my comment above about linking and opaque types as it doesn't solve that problem for you either.<o:p></o:p></span></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US"><o:p> </o:p></span></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US">Can you please share your list of pros and cons of pointer to opaque type versus int? <o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><b><i><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">[Villmow, Micah] Sure, here is what I view as the pros and cons.<o:p></o:p></span></i></b></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><b><i><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Opaque type:<o:p></o:p></span></i></b></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><b><i><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Pros:<o:p></o:p></span></i></b></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Implementation details are target dependent<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">No confusion with valid i32 type<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Utilizes the type system instead of metadata<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Can be materialized to i32 if needed</span></div></div></div></div></div></div></div></span></blockquote><div><br></div><div>Sorry, I don't quite understand.  If it can be materialized as a i32 type, wouldn't this transformation lead it to be confused as a valid i32 type?</div><div><br></div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-GB" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; position: static; z-index: auto; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; position: static; z-index: auto; "><div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); "><o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">No operations can occur on the type.<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Easier to track through stack.<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Cons:<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Can be renamed and loose information<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Requires initialization function</span></div></div></div></div></div></div></div></span></blockquote><div><br></div><div>Requiring initialization functions to be generated for CL where CLK_* are integer enums is a bit strange for a C based language.</div><div>  <span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 12px; ">const sampler_t </span><span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 12px; "><b>samplerA </b></span><span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 12px; ">= CLK_NORMALIZED_COORDS_TRUE | CLK_ADDRESS_REPEAT</span><span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 12px; "><span class="Apple-tab-span" style="white-space:pre"> </span></span><span class="Apple-style-span" style="font-family: 'Courier New'; font-size: 12px; ">|</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal 'Courier New'; ">CLK_FILTER_NEAREST;</div><div><br></div><br><blockquote type="cite"><div lang="EN-GB" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; position: static; z-index: auto; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; position: static; z-index: auto; "><div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); "><o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Requires global variables</span></div></div></div></div></div></div></div></blockquote><div><br></div><div>I'm not sure what that means.  For program scope samplers, wouldn't we use global variables?</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-GB" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; position: static; z-index: auto; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; position: static; z-index: auto; "><div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); "><o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">I32:<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Pros:<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Can be initialized inline and constant propagated.<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Already works(for AMD at least).<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Metadata can make for easy identification if it exists.<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Maps 1-1 to initializers<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Cons:<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Optimizers don’t know the differences between sampler and other i32</span></div></div></div></div></div></div></div></span></blockquote><div><br></div><div>We know at the CL language level that this is a const value or a constant.  I don't see why we would do any optimizations on this variable other than constant propagating to its use as a bad thing  (in the case of program scope sampler).</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-GB" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; position: static; z-index: auto; "><div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); "><o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Harder to track through stack</span></div></div></div></div></div></div></div></span></blockquote><div><br></div><div>I'm not sure what you mean here of harder to track through the stack.  Since this a const value, I would expect it to be used directly by its use (e.g., read_image).</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-GB" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; position: static; z-index: auto; "><div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); "><o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">An integer i32 and a sampler_t i32 is only determined by usage and not type.</span></div></div></div></div></div></div></div></span></blockquote><div><br></div><div>If you use metadata, this is not an issue.  Are we trying to make LLVM IR here into a high level IR with type safety? </div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-GB" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; position: static; z-index: auto; "><div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); "><o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Operations can work on the type, which is illegal.</span></div></div></div></div></div></div></div></span></blockquote><div><br></div><div>What operations will be done on this type?  It is true that this could happen but since at the CL level, the value is const so I don't expect any optimization to manipulate it other than to constant propagate the value to its use.</div><div><br></div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-GB" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; position: static; z-index: auto; "><div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); "><o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); ">Metadata can be lost requiring extensive analysis which cannot always be determined.<o:p></o:p></span></div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); "><o:p> </o:p></span></div></div></div></div></div></div></div></span></blockquote><div><br></div><div>Metadata doesn't get dropped on globals or functions.</div><div><br></div><div><br></div><div>-- Mon Ping</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-GB" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; "><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0cm; padding-right: 0cm; padding-bottom: 0cm; padding-left: 4pt; position: static; z-index: auto; "><div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US" style="color: rgb(31, 73, 125); "><o:p> </o:p></span></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US">-Tanya<o:p></o:p></span></div></div><div><div style="margin-right: 0cm; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; margin-top: 0cm; margin-bottom: 0.0001pt; "><span lang="EN-US"><o:p> </o:p></span></div></div></div></div></div></div>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu" style="color: blue; text-decoration: underline; ">cfe-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" style="color: blue; text-decoration: underline; ">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br></div></span></blockquote></div><br></div></body></html>