<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I think %0, in that context, means entry block<div class="">So I guess it’s incorrect to say the BB, '<label>3’, has no predecessor</div><div class=""><br class=""></div><div class="">Bekket<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 26, 2019, at 10:49 PM, Alberto Barbaro via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">Hi all,</div><div class="">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 class=""><br class=""></div><div class="">Few examples just for clarifying what I mean:</div><div class=""><br class=""></div><div class="">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 class=""> %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 class=""> %2 = icmp eq %struct.png_struct_def* %1, null<br class=""> br i1 %2, label %9, label %3<br class=""><br class="">; <label>:3: <b class="">; preds = %0</b><br class=""> %4 = getelementptr inbounds %struct.png_struct_def, %struct.png_struct_def* %1, i64 0, i32 15<br class="">...</div><div class="">}</div><div class=""><br class=""></div><div class="">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 class=""> %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 class=""> %2 = icmp eq %struct.png_struct_def* %1, null<br class=""> br i1 %2, label %png_create_read_struct_2.exit, label %3<br class=""><br class="">; <label>:3: <b class="">; preds = %0</b><br class=""> %4 = getelementptr inbounds %struct.png_struct_def, %struct.png_struct_def* %1, i64 0, i32 15<br class=""> ...</div><div class="">}</div><div class=""><br class=""></div><div class="">Thanks<br class=""></div></div></div></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></div></body></html>