We utilize assumptions on the input to model IR in polyhedral world. To verify these assumptions we version the code and guard it with a runtime-check (RTC). However, since the RTCs are themselves generated from the polyhedral representation we generate them under the same assumptions that they should verify. In other words, the guarantees that we try to provide with the RTCs do not hold for the RTCs themselves. To this end it is necessary to employ a different check for the RTCs that will verify the assumptions did hold for them too.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
This fixes 1 of the 4 runtime errors in the SPEC benchmarks for an unprofitable run. Additionally, support for truncate operations will cause an overflow in the RTCs in one of the LLVM-TS tests (MultiSource/Benchmarks/Fhourstones-3.1, function: transtore) for an unprofitable run.
Comment Actions
Hi Johannes,
this patch LGTM. Did you check if this results in major performance slowdowns?
It might also be a good idea to add an option that allows to generate RTCs not-at-all, run-time-checks-only, everywhere. Even though the everywhere option is currently probably still too costly, it might be useful in testing.
Best,
Tobias
include/polly/CodeGen/IslExprBuilder.h | ||
---|---|---|
138 ↗ | (On Diff #56896) | tacking -> tracking |
140 ↗ | (On Diff #56896) | the tracking is enabled ... |
lib/CodeGen/IslExprBuilder.cpp | ||
35 ↗ | (On Diff #56896) | This seems overly complicated. Any reason to not write: // Ignore calls that do not change the current state. if (Enable) OverflowState = Builder.getFalse(); else OverflowState = nullptr; |