[Polly][ScopBuilder] Use only modeled instructions to compute statement granularity.

ScopBuilder distributes independent instructions between statements.
Only modeled (e.g. not synthesizable) instructions are represented.
To compute independence, non-modeled instructions were used in some
parts of determining instruction independence, which could lead to the
re-introduction of non-model instructions.

In particular, required invariant loads could be added to instruction
list, which then led to redundant MemoryAccesses for such a load.

This fixes llvm.org/PR48059.

GitOrigin-RevId: e408935bb5339e20035d84307c666fbdd15e99e0
2 files changed