Hi,
When reading code in ScopBuilder::buildEqivClassBlockStmts, I think the main statement flag computation can be simplified, here is the patch. It's based on two simple facts that: 1, Instruction won't be removed once it's inserted into UnionFind. 2, Main statement must be set if there is non-trivial statement besides the last one. The patch also saves std::find call. Any comments?
BTW, this is my first patch to LLVM/Polly. Please correct me if there is anything wrong. Thanks in advance.
Thanks,
"yet" does not fit the context: The decision of which is the main statement has been made before, and will not change during this loop. I suggest to just remove the "yet" (or keep the original comment, I don't see any change in meaning)