https://github.com/halide/Halide
Revision 24d6bd668443039a632e31c49230c8002f8f9bf1 authored by Steven Johnson on 29 August 2021, 20:02:34 UTC, committed by GitHub on 29 August 2021, 20:02:34 UTC
* Hoist unrolled prefetches to top of the block

When a loop with prefetch is unrolled, the prefetch instructions getting scattered through the loop can cause LLVM codegen issues in some cases (see https://bugs.llvm.org/show_bug.cgi?id=51172). As a partial mitigation for that issue, this PR adds a pass to hoist all prefetch instructions to the top of their loop. This is still a bit experimental; it definitely addresses the codegen issues we see, but makes the use of prefetch potentially less effective (since the hoisted prefetch may be too far from the eventual use to be effective).

* appease clang-tidy

* Avoid quadratic behavior

* Use template instead of std::function

* Require prefetch offset to be pure
1 parent 085e11e
History
Tip revision: 24d6bd668443039a632e31c49230c8002f8f9bf1 authored by Steven Johnson on 29 August 2021, 20:02:34 UTC
Hoist unrolled prefetches to top of the block (#6230)
Tip revision: 24d6bd6
File Mode Size
.github
apps
cmake
dependencies
doc
packaging
python_bindings
src
test
tools
tutorial
util
.clang-format -rw-r--r-- 1.4 KB
.clang-format-ignore -rw-r--r-- 265 bytes
.clang-tidy -rw-r--r-- 1.7 KB
.gitattributes -rw-r--r-- 342 bytes
.gitignore -rw-r--r-- 1.1 KB
.gitmodules -rw-r--r-- 0 bytes
CMakeLists.txt -rw-r--r-- 5.5 KB
CMakePresets.json -rw-r--r-- 5.2 KB
CODE_OF_CONDUCT.md -rw-r--r-- 3.5 KB
LICENSE.txt -rw-r--r-- 3.2 KB
Makefile -rw-r--r-- 100.8 KB
README.md -rw-r--r-- 16.5 KB
README_cmake.md -rw-r--r-- 69.3 KB
README_rungen.md -rw-r--r-- 12.1 KB
README_webassembly.md -rw-r--r-- 8.6 KB
run-clang-format.sh -rwxr-xr-x 1.4 KB
run-clang-tidy.sh -rwxr-xr-x 3.2 KB

README.md

back to top