rajanmaghera / riscv-analysis

WIP
GNU General Public License v3.0
3 stars 0 forks source link

Propogate available values through function calls #12

Open rajanmaghera opened 1 year ago

rajanmaghera commented 1 year ago

https://github.com/rajanmaghera/riscv-analysis/blob/9dc3fa7adc2b306c42035a7d2579d9355dfae491/src/cfg/available.rs#L22

We can use this information to determine whether certain simple values will be available at the beginning of a function or after a call to another function. For example, if a function returns a constant value, or if it performs a simple calculation to a single argument that's a constant, we can estimate that.

We will have to take special care to ensure we don't overestimate across different function calls. Arguments are unique to call sites.