<div dir="ltr"><div>Hi Bekket,</div><div>yes I think you are right :)</div><div><br></div><div>Thanks again</div><div>Alberto<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno sab 27 apr 2019 alle ore 07:19 Bekket McClane <<a href="mailto:bekket.mcclane@gmail.com">bekket.mcclane@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">I think %0, in that context, means entry block<div>So I guess it’s incorrect to say the BB, '<label>3’, has no predecessor</div><div><br></div><div>Bekket<br><div><br><blockquote type="cite"><div>On Apr 26, 2019, at 10:49 PM, Alberto Barbaro via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="gmail-m_-3802677446693129569Apple-interchange-newline"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi all,</div><div>I have seen in multiple cases that, usually at the beginning of the function. if a BranchInst is encountered the next block might have %0 indicated as predecessor. I think it is a way to say "no predecessors found". Am I correct?</div><div><br></div><div>Few examples just for clarifying what I mean:</div><div><br></div><div>define noalias %struct.png_struct_def* @png_create_read_struct_2(i8* %user_png_ver, i8* %error_ptr, void (%struct.png_struct_def*, i8*)* %error_fn, void (%struct.png_struct_def*, i8*)* %warn_fn, i8* %mem_ptr, i8* (%struct.png_struct_def*, i64)* %malloc_fn, void (%struct.png_struct_def*, i8*)* %free_fn) #5 {<br> %1 = tail call noalias %struct.png_struct_def* @png_create_png_struct(i8* %user_png_ver, i8* %error_ptr, void (%struct.png_struct_def*, i8*)* %error_fn, void (%struct.png_struct_def*, i8*)* %warn_fn, i8* %mem_ptr, i8* (%struct.png_struct_def*, i64)* %malloc_fn, void (%struct.png_struct_def*, i8*)* %free_fn) #15<br> %2 = icmp eq %struct.png_struct_def* %1, null<br> br i1 %2, label %9, label %3<br><br>; <label>:3: <b>; preds = %0</b><br> %4 = getelementptr inbounds %struct.png_struct_def, %struct.png_struct_def* %1, i64 0, i32 15<br>...</div><div>}</div><div><br></div><div>define noalias %struct.png_struct_def* @png_create_read_struct(i8* %user_png_ver, i8* %error_ptr, void (%struct.png_struct_def*, i8*)* %error_fn, void (%struct.png_struct_def*, i8*)* %warn_fn) #5 {<br> %1 = tail call noalias %struct.png_struct_def* @png_create_png_struct(i8* %user_png_ver, i8* %error_ptr, void (%struct.png_struct_def*, i8*)* %error_fn, void (%struct.png_struct_def*, i8*)* %warn_fn, i8* null, i8* (%struct.png_struct_def*, i64)* null, void (%struct.png_struct_def*, i8*)* null) #15<br> %2 = icmp eq %struct.png_struct_def* %1, null<br> br i1 %2, label %png_create_read_struct_2.exit, label %3<br><br>; <label>:3: <b>; preds = %0</b><br> %4 = getelementptr inbounds %struct.png_struct_def, %struct.png_struct_def* %1, i64 0, i32 15<br> ...</div><div>}</div><div><br></div><div>Thanks<br></div></div></div></div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br></div></blockquote></div><br></div></div></blockquote></div>