Skip to content

Commit 4bde964

Browse files
committed
clang format
1 parent 5dda80c commit 4bde964

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

llvm/lib/Target/RISCV/RISCVLiveVariables.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ class RISCVLiveVariables : public MachineFunctionPass {
101101
void print(raw_ostream &OS, const Module *M = nullptr) const override;
102102

103103
void verifyLiveness(MachineFunction &MF) const;
104+
104105
private:
105106
/// Compute local liveness information (Use and Def sets) for each block
106107
void computeLocalLiveness(MachineFunction &MF);
@@ -205,8 +206,8 @@ void RISCVLiveVariables::processInstruction(const MachineInstr &MI,
205206
Info.Gen.insert(Reg);
206207
if (Reg.isPhysical()) {
207208
for (MCSubRegIterator SubRegs(Reg, TRI, /*IncludeSelf=*/false);
208-
SubRegs.isValid(); ++SubRegs) {
209-
Info.Gen.insert(*SubRegs);
209+
SubRegs.isValid(); ++SubRegs) {
210+
Info.Gen.insert(*SubRegs);
210211
}
211212
}
212213
}

llvm/lib/Target/RISCV/RISCVTargetMachine.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ static cl::opt<bool>
103103
cl::desc("Enable Machine Pipeliner for RISC-V"),
104104
cl::init(false), cl::Hidden);
105105

106-
static cl::opt<bool>
107-
EnableRISCVLiveVariables("riscv-live-variables",
108-
cl::desc("Enable Live Variable Analysis for RISC-V"),
109-
cl::init(false), cl::Hidden);
106+
static cl::opt<bool> EnableRISCVLiveVariables(
107+
"riscv-enable-live-variables",
108+
cl::desc("Enable Live Variable Analysis for RISC-V"), cl::init(false),
109+
cl::Hidden);
110110

111111
extern "C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTarget() {
112112
RegisterTargetMachine<RISCVTargetMachine> X(getTheRISCV32Target());

llvm/test/CodeGen/RISCV/machine-live-variables.mir

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
# RUN: llc -mtriple=riscv64 -verify-machineinstrs -run-pass=riscv-live-variables -debug < %s | FileCheck %s
1+
# RUN: llc -x mir -mtriple=riscv64 -verify-machineinstrs -run-pass=riscv-live-variables -debug < %s 2>&1 \
2+
# RUN: | FileCheck %s
23

34
# REQUIRES: asserts
45

5-
;CHECK: Block: (Number: 1)
6-
;CHECK: Live-In: { }
7-
;CHECK: Live-Out: { }
8-
;CHECK: Use: { }
9-
;CHECK: Def: { $x10 $x11 $x12 $x13 $x14 $x15 $x16 $x10_h $x11_h $x12_h $x13_h $x14_h $x15_h $x16_h $x10_w $x11_w $x12_w $x13_w $x14_w $x15_w $x16_w }
10-
;CHECK:
11-
;CHECK: Block: (Number: 0)
12-
;CHECK: Live-In: { $x11 $x12 $x13 $x14 $x15 $x16 $x17 $x11_h $x12_h $x13_h $x14_h $x15_h $x16_h $x17_h $x11_w $x12_w $x13_w $x14_w $x15_w $x16_w $x17_w }
13-
;CHECK: Live-Out: { }
14-
;CHECK: Use: { $x11 $x12 $x13 $x14 $x15 $x16 $x17 $x11_h $x12_h $x13_h $x14_h $x15_h $x16_h $x17_h $x11_w $x12_w $x13_w $x14_w $x15_w $x16_w $x17_w }
15-
;CHECK: Def: { $x10 $x11 $x12 $x10_h $x11_h $x12_h $x10_w $x11_w $x12_w }
6+
# CHECK: Block: (Number: 0)
7+
# CHECK: Live-In: { $x11 $x12 $x13 $x14 $x15 $x16 $x17 $x11_h $x12_h $x13_h $x14_h $x15_h $x16_h $x17_h $x11_w $x12_w $x13_w $x14_w $x15_w $x16_w $x17_w }
8+
# CHECK: Live-Out: { }
9+
# CHECK: Use: { $x11 $x12 $x13 $x14 $x15 $x16 $x17 $x11_h $x12_h $x13_h $x14_h $x15_h $x16_h $x17_h $x11_w $x12_w $x13_w $x14_w $x15_w $x16_w $x17_w }
10+
# CHECK: Def: { $x10 $x11 $x12 $x10_h $x11_h $x12_h $x10_w $x11_w $x12_w }
1611

1712
--- |
1813

@@ -77,3 +72,5 @@ body: |
7772
SW killed renamable $x12, %stack.0.va, 4 :: (store (s32) into %ir.va + 4)
7873
renamable $x10 = LW killed renamable $x10, 0 :: (load (s32) from %ir.argp.cur)
7974
PseudoRET implicit $x10
75+
76+
...

0 commit comments

Comments
 (0)