Code generate parameters and run-time checks after branching new code region
authorTobias Grosser <tobias@grosser.es>
Sat, 28 Mar 2015 09:34:40 +0000 (09:34 +0000)
committerTobias Grosser <tobias@grosser.es>
Sat, 28 Mar 2015 09:34:40 +0000 (09:34 +0000)
commit6794238c70c3c2d06f0ff57931a650232038952e
treef676c3258348c01c82389ed18ffdd9a601b8fe60
parent17778eb826b59e200891fdc2191e86898daf05ae
Code generate parameters and run-time checks after branching new code region

When creating parameters the SCEVexpander may introduce new induction variables,
that possibly create scalar dependences in the original scop, before we code
generate the scop. The resulting scalar dependences may then inhibit correct
code generation of the scop. To prevent this, we first version the code without
a run-time check and only then introduce new parameters and the run-time
condition. The if-condition that guards the original scop from being modified by
the SCEVexpander.

This change causes some test case changes as the run-time conditions are now
introduced in the split basic block rather than in the entry basic block.

This fixes http://llvm.org/PR22069

Test case reduced by: Karthik Senthil

llvm-svn: 233477
polly/lib/CodeGen/IslCodeGeneration.cpp
polly/test/Isl/CodeGen/20150328-SCEVExpanderIntroducesNewIV.ll [new file with mode: 0644]
polly/test/Isl/CodeGen/aliasing_different_pointer_types.ll
polly/test/Isl/CodeGen/multidim_2d_parametric_array_static_loop_bounds.ll
polly/test/Isl/CodeGen/run-time-condition-with-scev-parameters.ll