For expansion to have effect on the generated IR, the DependenceInfo need to be cleared after expansion.
To do that, I take inspiration from JSONImporter which basically do the same things as expansion : modifying scop.
Unfortunately, the generated IRs has no traces of any expansion.
To generate the optimised IR as I use the following command :
clang-5.0 -O3 -mllvm -polly -mllvm -polly-enable-mse -mllvm -debug-pass=Structure -Rpass-analysis="polly-mse" <c_file> -o <output_ll_file>-S -emit-llvm
where <c_file> is the input c file and <output_ll_file> is the optimised IR.
With clang, the generated IR does not take into account the expansion.
I also try with opt alone with the following command :
opt -pass-remarks-analysis="polly-*" -polly-process-unprofitable -polly-remarks-minimal -polly-use-llvm-names -polly-import-jscop-dir=<local_path> -polly-mse -S < <input_ll_file>
where <input_ll_file> is any working test case file.
With opt, I get exactly the same IR that is in the test case file.
Moreover, I tried to generate code after importing a jscop file (without doing expansion, only importing jscop file), and I didn't succeed to have any effect on the newly created IR.
In both cases (JSONImporter and MaximalStaticExpansion), the scop is modified because the printings are correct. But the generated IR does not take into account these modifications.
Anyone have an idea why my implementation of DependenceInfo clearing doesn't work ?