LoopPreheaderAndPostExit示例代码的问题 [英] Problem with LoopPreheaderAndPostExit sample code

查看:89
本文介绍了LoopPreheaderAndPostExit示例代码的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

Hello,

我借用了LoopPreheaderAndPostExit示例中的代码来做循环检测,我遇到了一个小问题。我相信如果循环包含一个BasicBlock,就像do ... while循环一样,FindLoopBody代码会中断。

I had borrowed the code in the LoopPreheaderAndPostExit sample to do loop detection and I ran into a slight problem. I believe the FindLoopBody code breaks if the loop consists of one BasicBlock, like a do...while loop.

我想在FindLoopBody的第一个循环中添加一个检查,以便只将除LoopHeader之外的块添加到blocksToVisit中才能解决问题。

I think adding a check in the first loop of FindLoopBody so that only blocks other than the LoopHeader is added to blocksToVisit should solve the problem.

如果我错了,请随时纠正我。

Please feel free to correct me if I'm wrong.

Sain

推荐答案

有趣的是,我们可能在样本中忽略了这一点。我明天会检查。


这篇关于LoopPreheaderAndPostExit示例代码的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆