Page MenuHomePhabricator

[RISCV] Add MC support of RISCV zcmp Extension
Needs ReviewPublic

Authored by VincentWu on Aug 28 2022, 8:24 PM.

Details

Summary

This patch add the instructions of zcmp extension.

Instructions in zcmp extension try to optimise mv inst and the prologue & epilogue in functions

co-author: @Scott Egerton, @ZirconLiu, @Lukacma, @Heda Chen, @luxufan, @heyiliang, @liaochunyu

Diff Detail

Event Timeline

VincentWu created this revision.Aug 28 2022, 8:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2022, 8:24 PM
VincentWu requested review of this revision.Aug 28 2022, 8:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2022, 8:24 PM
pcwang-thead added inline comments.Aug 28 2022, 8:30 PM
llvm/lib/Target/RISCV/RISCVFrameLowering.h
49 ↗(On Diff #456238)

Where is the implementation of this function?

VincentWu marked an inline comment as done.

clear patch

Herald added a project: Restricted Project. · View Herald TranscriptAug 29 2022, 10:33 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

I found a lot of ZCE/zce, do we need to change ZCE to ZCMP?

VincentWu updated this revision to Diff 459617.Sep 12 2022, 6:34 PM
VincentWu edited the summary of this revision. (Show Details)
VincentWu added a reviewer: asb.

address comments

VincentWu updated this revision to Diff 459620.Sep 12 2022, 6:35 PM

add newline at end of file

craig.topper added inline comments.Sep 26 2022, 9:55 AM
llvm/lib/Support/RISCVISAInfo.cpp
116

Why is zcb mixed into this patch?

llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
311

Capitalize

llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
189

Can we generate this more programmatically than having 12 unique strings?

llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp
193

Capitalize variables

199

assert(rlistVal != 16 && "Incorrect rlist.");

llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
414

assert(Imm >= 4 && "EABI is currently not implemented");

llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
1077 ↗(On Diff #459620)

This is not MC layer and there's no caller in this patch.

llvm/lib/Target/RISCV/RISCVInstrInfoZc.td
9

This isn't completely accurace since Zca is in RISCVInstrInfoC.td

136

too much indentation

llvm/lib/Target/RISCV/RISCVRegisterInfo.td
189

Where is this used?

VincentWu updated this revision to Diff 463134.Sep 27 2022, 1:02 AM
VincentWu marked 9 inline comments as done.

address comments