Peephole optimizer is scanning a basic block forward. At some point it needs to answer the question "given a pointer to an MI in the current BB, is it located before or after the current instruction".
To perform this, it keeps a set of the MIs already seen during the scan, if a MI is not in the set, it is assumed to be after.
It means that newly created MIs have to be inserted in the set as well.
This patch passes the set to the target-dependent optimizeSelect() so that it can properly update the set with the (potentially) newly created MIs.
Please add a comment for the purpose of the new argument.