edA-qa mort-ora-y
2013-Apr-13 03:42 UTC
[LLVMdev] pass to eliminate unneeded "br" statements
I've been added various optimizer passes and I end up with code which looks like this: define i32 @main() uwtable { entry: store i32 ()* @_main_1, i32 ()** @_main, align 8 br label %end end: ; preds = %entry ret i32 0 } Is there another pass to get rid of that "br" instruction and just inline the "end" block? -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130413/94ece8fb/attachment.sig>
Caldarale, Charles R
2013-Apr-13 04:13 UTC
[LLVMdev] pass to eliminate unneeded "br" statements
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of edA-qa mort-ora-y > Subject: [LLVMdev] pass to eliminate unneeded "br" statements> define i32 @main() uwtable { > entry: > store i32 ()* @_main_1, i32 ()** @_main, align 8 > br label %end > end: ; preds = %entry > ret i32 0 > }> Is there another pass to get rid of that "br" instruction and just > inline the "end" block?I would think SimplifyCFG should take care of it. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
edA-qa mort-ora-y
2013-Apr-13 04:18 UTC
[LLVMdev] pass to eliminate unneeded "br" statements
On 13/04/13 06:13, Caldarale, Charles R wrote:> I would think SimplifyCFG should take care of it.Yes, thank you. I just had to get the order of my passes correct (it was being done too early). -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130413/2606daf0/attachment.sig>