aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-03-12 23:32:57 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-08-07 14:09:39 +0200
commit213ee17897a3a82733e8a0abdb1635a42f6f0d1c (patch)
tree0b53f059d5e2edb4ffef5be5f0906693cb75bb46 /validation/optim
parent6da6517086e523f25cef070f9a89105f43147896 (diff)
downloadsparse-dev-213ee17897a3a82733e8a0abdb1635a42f6f0d1c.tar.gz
avoid infinite simplification loops of the second kind
In simplify_one_memop(), addresses with a constant offset are folded into the load or store operation itself. It's also checked that this address calculation doesn't create a loop (this can currently happen when using undefined variables) as such a loop would create an infinite loop in sparse simplification phase. Independently of the result of this check, the offset is effectively folded into the memop. In such loops there is a mutual dependency between the loaded value and the address. There is a second kind of possible infinite loop: one where the mutual dependency is between the old and the new value of the offset. Of course, both cases are internal errors and should be correctly addressed. but it's not the purpose of this patch. This patch add the detection of this second kind of infinite loop and, since in this case it doesn't make sense to try to update the offset, the 'simplification' of this memop is stopped there (which seems to be a good thing for the first kind too). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim')
0 files changed, 0 insertions, 0 deletions