Select instructions are currently ignored by PGO leading to missing profile data which is useful in guiding the select instruction lowering. This patch implements this missing feature for IRPGO.
A new counter increment intrinsic is introduced (extended from existing increment) that also takes a step argument. It is used to track the number times the true value of a select instruction is taken. The FalseValue count is derived from TrueValue count and the parent BB's profile count.
One out of context comment here -- can't this logic be part of dyn_cast via the classof you addd to InstrProfIncrementInstStep?