Page MenuHomePhabricator

[LoopVectorize] NFC: Split off clamping from computeFeasibleUserVF into its own function.
AbandonedPublic

Authored by sdesmalen on Feb 4 2021, 5:16 AM.

Details

Summary

This patch is NFC and cleans up computeFeasibleUserVF() by moving the clamping
into a separate function, that can be reused in multiple places, including
computeFeasibleMaxVF. This helps prepare the code to operate on scalable
VFs.

This patch is a preparatory patch with the ultimate goal of making
computeMaxVF() return both a max fixed VF and a max scalable VF,
so that selectVectorizationFactor() can pick the most cost-effective
vectorization factor.

Diff Detail

Unit TestsFailed

TimeTest
2,110 msx64 debian > libarcher.races::lock-unrelated.c
Script: -- : 'RUN: at line 13'; /mnt/disks/ssd0/agent/llvm-project/build/./bin/clang -fopenmp -pthread -fno-experimental-isel -g -O1 -fsanitize=thread -I /mnt/disks/ssd0/agent/llvm-project/openmp/tools/archer/tests -I /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/runtime/src -L /mnt/disks/ssd0/agent/llvm-project/build/lib -Wl,-rpath,/mnt/disks/ssd0/agent/llvm-project/build/lib /mnt/disks/ssd0/agent/llvm-project/openmp/tools/archer/tests/races/lock-unrelated.c -o /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/tools/archer/tests/races/Output/lock-unrelated.c.tmp -latomic && env TSAN_OPTIONS='ignore_noninstrumented_modules=0:ignore_noninstrumented_modules=1' /mnt/disks/ssd0/agent/llvm-project/openmp/tools/archer/tests/deflake.bash /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/tools/archer/tests/races/Output/lock-unrelated.c.tmp 2>&1 | tee /mnt/disks/ssd0/agent/llvm-project/build/projects/openmp/tools/archer/tests/races/Output/lock-unrelated.c.tmp.log | /mnt/disks/ssd0/agent/llvm-project/build/./bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/openmp/tools/archer/tests/races/lock-unrelated.c
120 msx64 debian > lld.MachO/invalid::stub-link.s
Script: -- : 'RUN: at line 6'; mkdir -p /mnt/disks/ssd0/agent/llvm-project/build/tools/lld/test/MachO/invalid/Output/stub-link.s.tmp
70 msx64 windows > LLVM.Instrumentation/InstrProfiling::profiling.ll
Script: -- : 'RUN: at line 1'; c:\ws\w16c2-1\llvm-project\premerge-checks\build\bin\opt.exe < C:\ws\w16c2-1\llvm-project\premerge-checks\llvm\test\Instrumentation\InstrProfiling\profiling.ll -mtriple=x86_64 -passes=instrprof -S | c:\ws\w16c2-1\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w16c2-1\llvm-project\premerge-checks\llvm\test\Instrumentation\InstrProfiling\profiling.ll --check-prefixes=CHECK,ELF,ELF_GENERIC
70 msx64 windows > lld.MachO/invalid::stub-link.s
Script: -- : 'RUN: at line 6'; mkdir -p C:\ws\w16c2-1\llvm-project\premerge-checks\build\tools\lld\test\MachO\invalid\Output\stub-link.s.tmp

Event Timeline

sdesmalen created this revision.Feb 4 2021, 5:16 AM
sdesmalen requested review of this revision.Feb 4 2021, 5:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2021, 5:16 AM
sdesmalen set the repository for this revision to rG LLVM Github Monorepo.
sdesmalen updated this revision to Diff 327896.Mar 3 2021, 1:46 PM
  • Simplified clampFeasibleMaxVF (it no longer returns a tuple).
  • Reuse calculation for MaxSafeVF by passing it to computeFeasibleMaxVF.
sdesmalen abandoned this revision.Mar 12 2021, 7:34 AM

Abandoned in favour of D98509