aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorAart Bik <ajcbik@google.com>2020-12-17 15:42:23 -0800
committerAart Bik <ajcbik@google.com>2020-12-17 16:12:21 -0800
commit14da25b4b2eedf8a16aae34edfefd7bcaa5ceae5 (patch)
tree571258ebd081a7aa283e483b1aa846b0d54377bb /clang/lib/CodeGen/CodeGenModule.cpp
parent9887097d802d0a585807e693727ab8836790da8d (diff)
downloadllvm-14da25b4b2eedf8a16aae34edfefd7bcaa5ceae5.zip
llvm-14da25b4b2eedf8a16aae34edfefd7bcaa5ceae5.tar.gz
llvm-14da25b4b2eedf8a16aae34edfefd7bcaa5ceae5.tar.bz2
[mlir][sparse] scalarize reductions in for-loops during sparse codegen
Reductions in innermost loops become harder for the backend to disambiguate after bufferization into memrefs, resulting in less efficient load-update-store cycles. By scalarizing innermost reductions, the backend is more likely to assign a register to perform the reduction (also prepares vectorization). Even though we could scalarize reductions for more outer loops and while-loops as well, currently scalarization is only done for chains of innermost for-loops, where it matters most, to avoid complicating codegen unnecessary (viz. adding lots of yield instructions). This CL also refactors condition simplification into the merger class, where it belongs, so that conditions are simplified only once per loop nest and not repeatedly as was currently done. This CL also fixes a few minor bugs, some layout issues, and comments. Reviewed By: penpornk Differential Revision: https://reviews.llvm.org/D93143
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions