Page MenuHomePhabricator

[LoopVectorize][NFC] Add optional Name parameter to VPInstruction

Authored by david-arm on Jul 1 2022, 3:57 AM.



This patch is a simple piece of refactoring that now permits users
to create VPInstructions and specify the name of the value being
generated. This is useful for creating more readable/meaningful
names in IR.

Diff Detail

Unit TestsFailed

240 msx64 debian > BOLT.runtime/X86::user-func-reorder.c
Script: -- : 'RUN: at line 30'; /usr/bin/clang --target=x86_64-linux -fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -no-pie /var/lib/buildkite-agent/builds/llvm-project/bolt/test/runtime/X86/user-func-reorder.c -o /var/lib/buildkite-agent/builds/llvm-project/build/tools/bolt/test/runtime/X86/Output/user-func-reorder.c.tmp.exe -Wl,-q
60,430 msx64 debian > Clang.Driver::fsanitize.c
Script: -- : 'RUN: at line 1'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/clang -target x86_64-linux-gnu -fsanitize=undefined -fsanitize-trap=undefined /var/lib/buildkite-agent/builds/llvm-project/clang/test/Driver/fsanitize.c -### 2>&1 | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck /var/lib/buildkite-agent/builds/llvm-project/clang/test/Driver/fsanitize.c --check-prefix=CHECK-UNDEFINED-TRAP

Event Timeline

david-arm created this revision.Jul 1 2022, 3:57 AM
david-arm requested review of this revision.Jul 1 2022, 3:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 1 2022, 3:57 AM
paulwalker-arm added inline comments.Jul 5 2022, 5:04 PM

Is Twine something typically used as a storage type? Most instances seem to be for parameter passing. Which makes me wonder if the storage type should be std::string?

david-arm updated this revision to Diff 442551.Jul 6 2022, 6:43 AM
david-arm marked an inline comment as done.
paulwalker-arm accepted this revision.Jul 7 2022, 6:11 AM
This revision is now accepted and ready to land.Jul 7 2022, 6:11 AM
fhahn accepted this revision.Jul 7 2022, 10:16 PM

LGTM, thanks! I think eventually it would be desirable to keep track of names in a separate table so we don't have to keep those (optional) strings directly in the recipes (similar to LLVM IR value naming), but this seems like a good first step.


nit: unrelated whitespace change.

This revision was landed with ongoing or failed builds.Jul 11 2022, 1:23 AM
This revision was automatically updated to reflect the committed changes.