aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2021-03-17 10:57:50 +0000
committerDavid Green <david.green@arm.com>2021-03-17 10:57:50 +0000
commit3c25c40d51e80492ad4368c6bfdf37e02848f49d (patch)
tree5a4fc526098528cde70c27caf12fbd01892ffa0e /clang/lib/Frontend/InitPreprocessor.cpp
parent9abe5004733034a17e79ef6b7e9b19000c4ea4be (diff)
downloadllvm-3c25c40d51e80492ad4368c6bfdf37e02848f49d.zip
llvm-3c25c40d51e80492ad4368c6bfdf37e02848f49d.tar.gz
llvm-3c25c40d51e80492ad4368c6bfdf37e02848f49d.tar.bz2
[LV] Account for the cost of predication of scalarized load/store
This adds the cost of an i1 extract and a branch to the cost in getMemInstScalarizationCost when the instruction is predicated. These predicated loads/store would generate blocks of something like: %c1 = extractelement <4 x i1> %C, i32 1 br i1 %c1, label %if, label %else if: %sa = extractelement <4 x i32> %a, i32 1 %sb = getelementptr inbounds float, float* %pg, i32 %sa %sv = extractelement <4 x float> %x, i32 1 store float %sa, float* %sb, align 4 else: So this increases the cost by the extract and branch. This is probably still too low in many cases due to the cost of all that branching, but there is already an existing hack increasing the cost using useEmulatedMaskMemRefHack. It will increase the cost of a memop if it is a load or there are more than one store. This patch improves the cost for when there is only a single store, and hopefully at some point in the future the hack can be removed. Differential Revision: https://reviews.llvm.org/D98243
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions