Commit 7ec25d0a authored by Giovanni Bajo's avatar Giovanni Bajo
Browse files

cmd/compile: implement loop BCE in prove

Reuse findIndVar to discover induction variables, and then
register the facts we know about them into the facts table
when entering the loop block.

Moreover, handle "x+delta > w" while updating the facts table,
to be able to prove accesses to slices with constant offsets
such as slice[i-10].

Change-Id: I2a63d050ed58258136d54712ac7015b25c893d71
Reviewed-on: https://go-review.googlesource.com/104038


Run-TryBot: Giovanni Bajo <rasky@develer.com>
Reviewed-by: default avatarDavid Chase <drchase@google.com>
parent 29162ec9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment