qsharp-compiler
qsharp-compiler copied to clipboard
Optimize conditions with compile time Booleans
This change optimizes handling of conditions where some of the values are known compile time Boolean values. In particular, it expands handling of if-elif-else sequences by compressing known true branches into the current block and skipping any other branches. Likewise, for compound conditional evaluation it adds handling for special cases where part of a logical and
or logical or
statement is known to be constant, removing the need for a phi-node and propagating the appropriate constant or dynamic value.
New and updated test cases were manually verified for correct output.
/azp run
Azure Pipelines successfully started running 2 pipeline(s).