[PATCH] D13831: [Polly][FIX][WIP] Restructure invariant load equivalence classes
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 16 13:42:58 PDT 2015
jdoerfert created this revision.
jdoerfert added reviewers: grosser, Meinersbur.
jdoerfert added a subscriber: Polly.
Herald added a subscriber: sanjoy.
Invariant load equivalence classes had some problems during the code
generation as well as the modeling. The latter was due to the
complicated sorting that did not always yield the simple code
generation order we wanted, the former was mainly due to type
problems. This patch will fix these problems and add a couple of test
cases from the test suite.
1) Sorting is replaced by a demand driven code generation that will
preload a value when it is needed or, if it was not needed
before, at some point determined by the order of invariant
accesses in the program. Only in very little cases this demand
driven preloading will kick in, though it will prevent us from
generating faulty code. An example where it is needed is shown
in test/ScopInfo/invariant_loads_complicated_dependences.ll .
2) Invariant loads that appear in parameters but are not on the
top-level (e.g., the parameter is not a SCEVUnknown) will not be
treated correctly.
3) Preloaded values will no be casted to the type of the original
load, though we will not distinguish values loaded from the same
pointer address with different types.
-------------------------- NOTE --------------------------
This patch is not yet 100% ready and will be splitted once it is,
though it might be usefull to discuss it first and even use it if
the current head makes you problems.
http://reviews.llvm.org/D13831
Files:
include/polly/CodeGen/IslNodeBuilder.h
include/polly/ScopInfo.h
lib/Analysis/ScopInfo.cpp
lib/CodeGen/BlockGenerators.cpp
lib/CodeGen/IslNodeBuilder.cpp
test/Isl/CodeGen/inv-load-lnt-crash-cyclic-dependences.ll
test/Isl/CodeGen/inv-load-lnt-crash-empty-equiv-class.ll
test/Isl/CodeGen/inv-load-lnt-crash-wrong-order-2.ll
test/ScopInfo/invariant_load_access_classes_different_base_type.ll
test/ScopInfo/invariant_load_access_classes_different_base_type_escaping.ll
test/ScopInfo/invariant_load_access_classes_different_base_type_same_pointer.ll
test/ScopInfo/invariant_load_access_classes_different_base_type_same_pointer_escaping.ll
test/ScopInfo/invariant_loads_complicated_dependences.ll
test/ScopInfo/invariant_loop_bounds.ll
test/ScopInfo/invariant_same_loop_bound_multiple_times-1.ll
test/ScopInfo/invariant_same_loop_bound_multiple_times-2.ll
test/ScopInfo/multidim_parameter_addrec_product.ll
test/ScopInfo/required-invariant-loop-bounds.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13831.37636.patch
Type: text/x-patch
Size: 175247 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151016/5baa612d/attachment-0001.bin>
More information about the llvm-commits
mailing list