<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div style="RIGHT: auto">Hi All,</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">I was searching for, extracting information about 'typedefed struct types' from 'module'. <BR>I have 'struct' typedefed in a .h file. I try to use this structure instance inside a function. </div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">My .ll file rightly defines this type in the beginning so that it can be used later. (for example below)<BR style="RIGHT: auto">%struct.DEBLOCK_UNIT = type { i8*, i8*, i8*, i8, i32, i32, %struct.DEBLOCK_UNIT*, %struct.DEBLOCK_UNIT*, %struct.DEBLOCK_UNIT* }</div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif; COLOR: rgb(0,0,0); FONT-SIZE: 13px; RIGHT: auto">.....<BR>define void @DeblockAreaFetch(i8* %SrcY, i8* %SrcU, i8* %SrcV, i32 %FrameWidth, %struct.DEBLOCK_UNIT* nocapture %DeblockUnit, i32 %TransferWidth) nounwind {<BR>entry:<BR>}</div>
<div style="RIGHT: auto"> </div>
<div>How to I get information about "%struct.DEBLOCK_UNIT" from the 'Module' of this file ?</div>
<div style="RIGHT: auto">The approach I tried was to iterate through the "global variable list" and extract type from there. This works well for below case.<BR>%struct._D_ChannelReg = type { %struct._D_ChannelReg*, i8*, i8*, i32, i32, i32, [2 x i32] }<BR>@gInterPredD = external global %struct._D_ChannelReg*<BR>In this case "gInterPredD" is a global variable and hence I easily get information about it's type and their element type. </div>
<div style="RIGHT: auto"> </div>
<div>But for the case, where an instance of this 'typedefed struct' is passed as a variable or used inside a function, </div>
<div style="RIGHT: auto">In llvm2.9, we had TypeSymbolTable in module which used to have information about all the types explicitly. I think no such information is present from llvm3.0 onwards due to type system change. <BR>So, is it the case that I have to get the type information as and when I encounter any variable which is of type 'typedefed struct' only ?</div>
<div style="RIGHT: auto"> </div>
<div>Thanks & Regards,<BR>Pankaj<BR><VAR id=yui-ie-cursor></VAR></div></div></body></html>