diff options
| author | Jeff Garzik <jeff@garzik.org> | 2011-11-23 00:55:11 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@redhat.com> | 2011-11-23 00:55:11 -0500 |
| commit | 174aa10430f7a15bbabc87c23ec4ba6d63f88c59 (patch) | |
| tree | cbfed753d3492deb9409c6e1962e59aab51e6b4f /validation | |
| parent | ce2aacc7ce377c9871e8a5c362d2c7c0aae8ebd6 (diff) | |
| download | sparse-dev-174aa10430f7a15bbabc87c23ec4ba6d63f88c59.tar.gz | |
sparse, llvm: Fix loops, by properly handling OP_PHI forward references
Previous code simply omitted PHI sources that had not been assigned a
LLVMValueRef at the time of OP_PHI.
Fix by creating a list of such instances, and attempt to resolve forward
references at each OP_PHISOURCE appearance.
Testcase:
extern int bar (int);
int foo (int x)
{
int y = 0;
while (y < 1000) {
y += bar(x);
}
return y;
}
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'validation')
0 files changed, 0 insertions, 0 deletions
