Skip to content

Commit

Permalink
[RISCV] Replace RISCV->RISC-V in strings.
Browse files Browse the repository at this point in the history
To be consistent with RISC-V branding guidelines
https://riscv.org/about/risc-v-branding-guidelines/
Think we should be using RISC-V where possible.

D146449 already updated comments. Strings may have more user impact.

Reviewed By: asb

Differential Revision: https://reviews.llvm.org/D146451
  • Loading branch information
topperc committed Mar 27, 2023
1 parent 2946361 commit 0f4c9c0
Show file tree
Hide file tree
Showing 20 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/AttrDocs.td
Expand Up @@ -2293,7 +2293,7 @@ as ``-mlong-calls`` and ``-mno-long-calls``.

def RISCVInterruptDocs : Documentation {
let Category = DocCatFunction;
let Heading = "interrupt (RISCV)";
let Heading = "interrupt (RISC-V)";
let Content = [{
Clang supports the GNU style ``__attribute__((interrupt))`` attribute on RISCV
targets. This attribute may be attached to a function definition and instructs
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Driver/Options.td
Expand Up @@ -185,7 +185,7 @@ def m_wasm_Features_Driver_Group : OptionGroup<"<wasm driver features group>">,
def m_x86_Features_Group : OptionGroup<"<x86 features group>">,
Group<m_Group>, Flags<[CoreOption]>, DocName<"X86">;
def m_riscv_Features_Group : OptionGroup<"<riscv features group>">,
Group<m_Group>, DocName<"RISCV">;
Group<m_Group>, DocName<"RISC-V">;

def m_libc_Group : OptionGroup<"<m libc group>">, Group<m_mips_Features_Group>,
Flags<[HelpHidden]>;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
Expand Up @@ -53,7 +53,7 @@ class RISCVAsmPrinter : public AsmPrinter {
std::unique_ptr<MCStreamer> Streamer)
: AsmPrinter(TM, std::move(Streamer)) {}

StringRef getPassName() const override { return "RISCV Assembly Printer"; }
StringRef getPassName() const override { return "RISC-V Assembly Printer"; }

bool runOnMachineFunction(MachineFunction &MF) override;

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp
Expand Up @@ -26,7 +26,7 @@
using namespace llvm;

#define DEBUG_TYPE "riscv-codegenprepare"
#define PASS_NAME "RISCV CodeGenPrepare"
#define PASS_NAME "RISC-V CodeGenPrepare"

STATISTIC(NumZExtToSExt, "Number of SExt instructions converted to ZExt");

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/RISCVExpandAtomicPseudoInsts.cpp
Expand Up @@ -24,7 +24,7 @@
using namespace llvm;

#define RISCV_EXPAND_ATOMIC_PSEUDO_NAME \
"RISCV atomic pseudo instruction expansion pass"
"RISC-V atomic pseudo instruction expansion pass"

namespace {

Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
Expand Up @@ -23,8 +23,8 @@

using namespace llvm;

#define RISCV_EXPAND_PSEUDO_NAME "RISCV pseudo instruction expansion pass"
#define RISCV_PRERA_EXPAND_PSEUDO_NAME "RISCV Pre-RA pseudo instruction expansion pass"
#define RISCV_EXPAND_PSEUDO_NAME "RISC-V pseudo instruction expansion pass"
#define RISCV_PRERA_EXPAND_PSEUDO_NAME "RISC-V Pre-RA pseudo instruction expansion pass"

namespace {

Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
Expand Up @@ -59,7 +59,7 @@ class RISCVGatherScatterLowering : public FunctionPass {
}

StringRef getPassName() const override {
return "RISCV gather/scatter lowering";
return "RISC-V gather/scatter lowering";
}

private:
Expand All @@ -81,7 +81,7 @@ class RISCVGatherScatterLowering : public FunctionPass {
char RISCVGatherScatterLowering::ID = 0;

INITIALIZE_PASS(RISCVGatherScatterLowering, DEBUG_TYPE,
"RISCV gather/scatter lowering pass", false, false)
"RISC-V gather/scatter lowering pass", false, false)

FunctionPass *llvm::createRISCVGatherScatterLoweringPass() {
return new RISCVGatherScatterLowering();
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
Expand Up @@ -26,7 +26,7 @@
using namespace llvm;

#define DEBUG_TYPE "riscv-isel"
#define PASS_NAME "RISCV DAG->DAG Pattern Instruction Selection"
#define PASS_NAME "RISC-V DAG->DAG Pattern Instruction Selection"

namespace llvm::RISCV {
#define GET_RISCVVSSEGTable_IMPL
Expand Down Expand Up @@ -134,7 +134,7 @@ void RISCVDAGToDAGISel::PreprocessISelDAG() {
}

if (Result) {
LLVM_DEBUG(dbgs() << "RISCV DAG preprocessing replacing:\nOld: ");
LLVM_DEBUG(dbgs() << "RISC-V DAG preprocessing replacing:\nOld: ");
LLVM_DEBUG(N->dump(CurDAG));
LLVM_DEBUG(dbgs() << "\nNew: ");
LLVM_DEBUG(Result->dump(CurDAG));
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
Expand Up @@ -32,7 +32,7 @@
using namespace llvm;

#define DEBUG_TYPE "riscv-insert-vsetvli"
#define RISCV_INSERT_VSETVLI_NAME "RISCV Insert VSETVLI pass"
#define RISCV_INSERT_VSETVLI_NAME "RISC-V Insert VSETVLI pass"

static cl::opt<bool> DisableInsertVSETVLPHIOpt(
"riscv-disable-insert-vsetvl-phi-opt", cl::init(false), cl::Hidden,
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
Expand Up @@ -951,7 +951,7 @@ unsigned RISCVInstrInfo::insertBranch(
// Shouldn't be a fall through.
assert(TBB && "insertBranch must not be told to insert a fallthrough");
assert((Cond.size() == 3 || Cond.size() == 0) &&
"RISCV branch conditions have two components!");
"RISC-V branch conditions have two components!");

// Unconditional branch.
if (Cond.empty()) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/RISCVMakeCompressible.cpp
Expand Up @@ -75,7 +75,7 @@
using namespace llvm;

#define DEBUG_TYPE "riscv-make-compressible"
#define RISCV_COMPRESS_INSTRS_NAME "RISCV Make Compressible"
#define RISCV_COMPRESS_INSTRS_NAME "RISC-V Make Compressible"

namespace {

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp
Expand Up @@ -23,7 +23,7 @@
using namespace llvm;

#define DEBUG_TYPE "riscv-merge-base-offset"
#define RISCV_MERGE_BASE_OFFSET_NAME "RISCV Merge Base Offset"
#define RISCV_MERGE_BASE_OFFSET_NAME "RISC-V Merge Base Offset"
namespace {

class RISCVMergeBaseOffsetOpt : public MachineFunctionPass {
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/RISCVRVVInitUndef.cpp
Expand Up @@ -39,7 +39,7 @@
using namespace llvm;

#define DEBUG_TYPE "riscv-init-undef"
#define RISCV_INIT_UNDEF_NAME "RISCV init undef pass"
#define RISCV_INIT_UNDEF_NAME "RISC-V init undef pass"

namespace {

Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/RISCV/RISCVRedundantCopyElimination.cpp
Expand Up @@ -56,7 +56,7 @@ class RISCVRedundantCopyElimination : public MachineFunctionPass {
}

StringRef getPassName() const override {
return "RISCV Redundant Copy Elimination";
return "RISC-V Redundant Copy Elimination";
}

private:
Expand All @@ -68,7 +68,7 @@ class RISCVRedundantCopyElimination : public MachineFunctionPass {
char RISCVRedundantCopyElimination::ID = 0;

INITIALIZE_PASS(RISCVRedundantCopyElimination, "riscv-copyelim",
"RISCV redundant copy elimination pass", false, false)
"RISC-V Redundant Copy Elimination", false, false)

static bool
guaranteesZeroRegInBlock(MachineBasicBlock &MBB,
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/RISCV/RISCVSExtWRemoval.cpp
Expand Up @@ -47,13 +47,13 @@ class RISCVSExtWRemoval : public MachineFunctionPass {
MachineFunctionPass::getAnalysisUsage(AU);
}

StringRef getPassName() const override { return "RISCV sext.w Removal"; }
StringRef getPassName() const override { return "RISC-V sext.w Removal"; }
};

} // end anonymous namespace

char RISCVSExtWRemoval::ID = 0;
INITIALIZE_PASS(RISCVSExtWRemoval, DEBUG_TYPE, "RISCV sext.w Removal", false,
INITIALIZE_PASS(RISCVSExtWRemoval, DEBUG_TYPE, "RISC-V sext.w Removal", false,
false)

FunctionPass *llvm::createRISCVSExtWRemovalPass() {
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/RISCV/RISCVStripWSuffix.cpp
Expand Up @@ -40,14 +40,14 @@ class RISCVStripWSuffix : public MachineFunctionPass {
MachineFunctionPass::getAnalysisUsage(AU);
}

StringRef getPassName() const override { return "RISCV Strip W Suffix"; }
StringRef getPassName() const override { return "RISC-V Strip W Suffix"; }
};

} // end anonymous namespace

char RISCVStripWSuffix::ID = 0;
INITIALIZE_PASS(RISCVStripWSuffix, "riscv-strip-w-suffix",
"RISCV Strip W Suffix", false, false)
"RISC-V Strip W Suffix", false, false)

FunctionPass *llvm::createRISCVStripWSuffixPass() {
return new RISCVStripWSuffix();
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
Expand Up @@ -68,7 +68,7 @@ static cl::opt<int> RVVVectorBitsMinOpt(

static cl::opt<bool> EnableRISCVCopyPropagation(
"riscv-enable-copy-propagation",
cl::desc("Enable the copy propagation with RISCV copy instr"),
cl::desc("Enable the copy propagation with RISC-V copy instr"),
cl::init(true), cl::Hidden);

extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTarget() {
Expand Down
14 changes: 7 additions & 7 deletions llvm/test/CodeGen/RISCV/O0-pipeline.ll
Expand Up @@ -36,11 +36,11 @@
; CHECK-NEXT: Insert stack protectors
; CHECK-NEXT: Module Verifier
; CHECK-NEXT: Assignment Tracking Analysis
; CHECK-NEXT: RISCV DAG->DAG Pattern Instruction Selection
; CHECK-NEXT: RISC-V DAG->DAG Pattern Instruction Selection
; CHECK-NEXT: Finalize ISel and expand pseudo-instructions
; CHECK-NEXT: Local Stack Slot Allocation
; CHECK-NEXT: RISCV Pre-RA pseudo instruction expansion pass
; CHECK-NEXT: RISCV Insert VSETVLI pass
; CHECK-NEXT: RISC-V Pre-RA pseudo instruction expansion pass
; CHECK-NEXT: RISC-V Insert VSETVLI pass
; CHECK-NEXT: Eliminate PHI nodes for register allocation
; CHECK-NEXT: Two-Address instruction pass
; CHECK-NEXT: Fast Register Allocator
Expand All @@ -55,17 +55,17 @@
; CHECK-NEXT: Insert XRay ops
; CHECK-NEXT: Implement the 'patchable-function' attribute
; CHECK-NEXT: Branch relaxation pass
; CHECK-NEXT: RISCV Make Compressible
; CHECK-NEXT: RISC-V Make Compressible
; CHECK-NEXT: Contiguously Lay Out Funclets
; CHECK-NEXT: StackMap Liveness Analysis
; CHECK-NEXT: Live DEBUG_VALUE analysis
; CHECK-NEXT: Machine Sanitizer Binary Metadata
; CHECK-NEXT: Lazy Machine Block Frequency Analysis
; CHECK-NEXT: Machine Optimization Remark Emitter
; CHECK-NEXT: Stack Frame Layout Analysis
; CHECK-NEXT: RISCV pseudo instruction expansion pass
; CHECK-NEXT: RISCV atomic pseudo instruction expansion pass
; CHECK-NEXT: RISC-V pseudo instruction expansion pass
; CHECK-NEXT: RISC-V atomic pseudo instruction expansion pass
; CHECK-NEXT: Lazy Machine Block Frequency Analysis
; CHECK-NEXT: Machine Optimization Remark Emitter
; CHECK-NEXT: RISCV Assembly Printer
; CHECK-NEXT: RISC-V Assembly Printer
; CHECK-NEXT: Free MachineFunction
28 changes: 14 additions & 14 deletions llvm/test/CodeGen/RISCV/O3-pipeline.ll
Expand Up @@ -28,8 +28,8 @@
; CHECK-NEXT: Expand Atomic instructions
; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Natural Loop Information
; CHECK-NEXT: RISCV gather/scatter lowering
; CHECK-NEXT: RISCV CodeGenPrepare
; CHECK-NEXT: RISC-V gather/scatter lowering
; CHECK-NEXT: RISC-V CodeGenPrepare
; CHECK-NEXT: Module Verifier
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
; CHECK-NEXT: Canonicalize natural loops
Expand Down Expand Up @@ -79,7 +79,7 @@
; CHECK-NEXT: Assignment Tracking Analysis
; CHECK-NEXT: Lazy Branch Probability Analysis
; CHECK-NEXT: Lazy Block Frequency Analysis
; CHECK-NEXT: RISCV DAG->DAG Pattern Instruction Selection
; CHECK-NEXT: RISC-V DAG->DAG Pattern Instruction Selection
; CHECK-NEXT: Finalize ISel and expand pseudo-instructions
; CHECK-NEXT: Lazy Machine Block Frequency Analysis
; CHECK-NEXT: Early Tail Duplication
Expand All @@ -103,13 +103,13 @@
; CHECK-NEXT: Machine Trace Metrics
; CHECK-NEXT: Lazy Machine Block Frequency Analysis
; CHECK-NEXT: Machine InstCombiner
; RV64-NEXT: RISCV sext.w Removal
; RV64-NEXT: RISCV Strip W Suffix
; CHECK-NEXT: RISCV Pre-RA pseudo instruction expansion pass
; CHECK-NEXT: RISCV Merge Base Offset
; CHECK-NEXT: RISCV Insert VSETVLI pass
; RV64-NEXT: RISC-V sext.w Removal
; RV64-NEXT: RISC-V Strip W Suffix
; CHECK-NEXT: RISC-V Pre-RA pseudo instruction expansion pass
; CHECK-NEXT: RISC-V Merge Base Offset
; CHECK-NEXT: RISC-V Insert VSETVLI pass
; CHECK-NEXT: Detect Dead Lanes
; CHECK-NEXT: RISCV init undef pass
; CHECK-NEXT: RISC-V init undef pass
; CHECK-NEXT: Process Implicit Definitions
; CHECK-NEXT: Remove unreachable machine basic blocks
; CHECK-NEXT: Live Variable Analysis
Expand All @@ -136,7 +136,7 @@
; CHECK-NEXT: Stack Slot Coloring
; CHECK-NEXT: Machine Copy Propagation Pass
; CHECK-NEXT: Machine Loop Invariant Code Motion
; CHECK-NEXT: RISCV Redundant Copy Elimination
; CHECK-NEXT: RISC-V Redundant Copy Elimination
; CHECK-NEXT: Remove Redundant DEBUG_VALUE analysis
; CHECK-NEXT: Fixup Statepoint Caller Saved
; CHECK-NEXT: PostRA Machine Sink
Expand Down Expand Up @@ -165,7 +165,7 @@
; CHECK-NEXT: Insert XRay ops
; CHECK-NEXT: Implement the 'patchable-function' attribute
; CHECK-NEXT: Branch relaxation pass
; CHECK-NEXT: RISCV Make Compressible
; CHECK-NEXT: RISC-V Make Compressible
; CHECK-NEXT: Machine Copy Propagation Pass
; CHECK-NEXT: Contiguously Lay Out Funclets
; CHECK-NEXT: StackMap Liveness Analysis
Expand All @@ -176,9 +176,9 @@
; CHECK-NEXT: Lazy Machine Block Frequency Analysis
; CHECK-NEXT: Machine Optimization Remark Emitter
; CHECK-NEXT: Stack Frame Layout Analysis
; CHECK-NEXT: RISCV pseudo instruction expansion pass
; CHECK-NEXT: RISCV atomic pseudo instruction expansion pass
; CHECK-NEXT: RISC-V pseudo instruction expansion pass
; CHECK-NEXT: RISC-V atomic pseudo instruction expansion pass
; CHECK-NEXT: Lazy Machine Block Frequency Analysis
; CHECK-NEXT: Machine Optimization Remark Emitter
; CHECK-NEXT: RISCV Assembly Printer
; CHECK-NEXT: RISC-V Assembly Printer
; CHECK-NEXT: Free MachineFunction
2 changes: 1 addition & 1 deletion llvm/utils/TableGen/CompressInstEmitter.cpp
Expand Up @@ -904,4 +904,4 @@ void CompressInstEmitter::run(raw_ostream &o) {
}

static TableGen::Emitter::OptClass<CompressInstEmitter>
X("gen-compress-inst-emitter", "Generate RISCV compressed instructions.");
X("gen-compress-inst-emitter", "Generate compressed instructions.");

0 comments on commit 0f4c9c0

Please sign in to comment.