This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Merge Masked and unMasked RVV manual codegen
ClosedPublic

Authored by BeMg on Dec 19 2022, 6:26 PM.

Details

Summary

RVV intrinsic function will generate riscv_vector_builtin_cg.inc for CGBuiltin.cpp to produce the corresponding RVV intrinsic LLVM IR.

In this stage, riscv_vector.td will describe the bunch of manual codegen C++ code to tell CGBuiltin how to handle these instructions.

In this patch, we merge the masked RVV manual codegen and unmasked RVV manual codegen to reduce the number of manual codegen, and make more policy addition easier in the future.

This is a clean-up job that will not affect the RVV intrinsic functionality.

Diff Detail

Event Timeline

BeMg created this revision.Dec 19 2022, 6:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 19 2022, 6:26 PM
BeMg requested review of this revision.Dec 19 2022, 6:26 PM
BeMg edited the summary of this revision. (Show Details)Dec 19 2022, 6:36 PM
BeMg retitled this revision from [WIP][RISCV] Merge Masked and unMasked manual codegen to [WIP][RISCV] Merge Masked and unMasked RVV manual codegen.Dec 19 2022, 6:41 PM
BeMg edited the summary of this revision. (Show Details)
BeMg retitled this revision from [WIP][RISCV] Merge Masked and unMasked RVV manual codegen to [RISCV] Merge Masked and unMasked RVV manual codegen.Dec 20 2022, 6:28 AM
BeMg updated this revision to Diff 484251.Dec 20 2022, 6:41 AM

Update format

craig.topper added inline comments.Dec 20 2022, 3:55 PM
clang/include/clang/Basic/riscv_vector.td
629–640

space after if

648

space after if

712–718

space after if

720–723

space after if

Drop the curly brace since the bodies are single lines

751–757

space after if

759–762

Space after if

Drop the curly braces since the bodies are single lines

1224–1235

Space after if

1273

Indentation looks wrong. The body is only indented once space from the else.

BeMg updated this revision to Diff 484436.Dec 20 2022, 5:35 PM

Update format

BeMg updated this revision to Diff 484437.Dec 20 2022, 5:47 PM

Update format

kito-cheng accepted this revision.Dec 20 2022, 5:51 PM

LGTM, thanks for clean up this!

This revision is now accepted and ready to land.Dec 20 2022, 5:51 PM
BeMg updated this revision to Diff 484459.Dec 20 2022, 9:14 PM

Update format

This revision was landed with ongoing or failed builds.Dec 21 2022, 8:36 PM
This revision was automatically updated to reflect the committed changes.