This is an archive of the discontinued LLVM Phabricator instance.

[5/15][Clang][RISCV][NFC] Remove extra attribute Policy::IntrinsicWithoutMU by reusing HasTailPolicy and HasMaskPolicy
ClosedPublic

Authored by eopXD on Jan 14 2023, 4:00 AM.

Details

Summary

Righteously there shouldn't be any special cases here because
HasTailPolicy and HasMaskPolicy is able to express necessary cases.
This commit is a part of the step-by-step effort to remove
Policy::Scheme::Omit, which completely does not make sense in RVV 1.0
because an RVV instruction always executes with vta and vma set
to a certain value.

This is the 5th commit of a patch-set that aims to change the default policy
for RVV intrinsics from TAMU to TAMA.

Please refer to the cover letter in the 1st commit (D141573) for an
overview.

Diff Detail

Event Timeline

eopXD created this revision.Jan 14 2023, 4:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 14 2023, 4:00 AM
eopXD requested review of this revision.Jan 14 2023, 4:00 AM
eopXD updated this revision to Diff 489292.Jan 14 2023, 11:01 AM

Rebase to latest main.

eopXD retitled this revision from [WIP][5/N][Clang][RISCV][NFC] Remove extra attribute Policy::IntrinsicWithoutMU by reusing HasTailPolicy and HasMaskPolicy to [5/15][Clang][RISCV][NFC] Remove extra attribute Policy::IntrinsicWithoutMU by reusing HasTailPolicy and HasMaskPolicy.Jan 15 2023, 7:34 AM
eopXD edited the summary of this revision. (Show Details)
kito-cheng added inline comments.Jan 16 2023, 11:27 PM
clang/include/clang/Support/RISCVVIntrinsicUtils.h
398

Drop const for parameter, you don't need const qualifier for those primitive types on the parameter list.

480

Same here.

clang/lib/Sema/SemaRISCVVectorLookup.cpp
152

Ditto.

clang/lib/Support/RISCVVIntrinsicUtils.cpp
851

Ditto.

1015

Ditto.

Wait, I fell HasTailPolicy and HasMaskPolicy should be part of Policy object, and then it's the Omit to present it's no policy.

This revision is now accepted and ready to land.Jan 17 2023, 4:33 PM
craig.topper requested changes to this revision.Jan 17 2023, 4:34 PM

Oops I didn't mean to approve this with Kito's comments outstanding.

This revision now requires changes to proceed.Jan 17 2023, 4:34 PM
eopXD updated this revision to Diff 491041.Jan 20 2023, 11:27 PM
eopXD marked 4 inline comments as done.

Address comment from Kito.

eopXD marked an inline comment as done.Jan 20 2023, 11:27 PM
eopXD updated this revision to Diff 491042.Jan 20 2023, 11:28 PM

Update code.

Wait, I fell HasTailPolicy and HasMaskPolicy should be part of Policy object, and then it's the Omit to present it's no policy.

I think the simplification here https://reviews.llvm.org/D142016#inline-1372027 should resolve your concern.

This revision is now accepted and ready to land.Jan 23 2023, 11:33 PM
This revision was landed with ongoing or failed builds.Jan 24 2023, 12:10 AM
This revision was automatically updated to reflect the committed changes.