Pass: turn division into multiplication
Implement a pass that transforms:
-
x/pi -> x*(1/pi)
where1/pi
is a compile time constant
So this pass should only be performed when we are dividing by a compile time constant.
Implement a pass that transforms:
x/pi -> x*(1/pi)
where 1/pi
is a compile time constantSo this pass should only be performed when we are dividing by a compile time constant.