Page MenuHomePhabricator

[RISCV][NFC] Use more Arrayref in TargetLowering functions.
Needs ReviewPublic

Authored by jacquesguan on May 15 2022, 8:02 PM.

Details

Summary

This patch replaces some foreach with Arrayref, and abstract some same literal array with a variable.

Diff Detail

Unit TestsFailed

TimeTest
60,110 msx64 debian > AddressSanitizer-x86_64-linux-dynamic.TestCases::scariness_score_test.cpp
Script: -- : 'RUN: at line 4'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m64 -shared-libasan -O0 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/asan/TestCases/scariness_score_test.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/asan/X86_64LinuxDynamicConfig/TestCases/Output/scariness_score_test.cpp.tmp
60,120 msx64 debian > AddressSanitizer-x86_64-linux.TestCases::scariness_score_test.cpp
Script: -- : 'RUN: at line 4'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m64 -O0 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/asan/TestCases/scariness_score_test.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/asan/X86_64LinuxConfig/TestCases/Output/scariness_score_test.cpp.tmp

Event Timeline

jacquesguan created this revision.May 15 2022, 8:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 15 2022, 8:02 PM
jacquesguan requested review of this revision.May 15 2022, 8:02 PM
reames added a subscriber: reames.May 16 2022, 7:56 AM
reames added inline comments.
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
285

Er, this looks like an undesirable change. Could we add a typed overload for setOperationAction instead?

jacquesguan added inline comments.May 18 2022, 12:38 AM
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
285

Do you mean create a new function with ArrayRef<ISD::NodeType> as argument? I think this may cause ambiguous calling when we use setOperationAction with a single ISD::NodeType.

reames removed a subscriber: reames.Tue, May 31, 10:47 AM