Skip to content

Commit d0e5b45

Browse files
committed
clang-format and add correct flags to the tests
1 parent 3e2d2d8 commit d0e5b45

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

llvm/lib/Target/RISCV/RISCVLiveVariables.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
#include "llvm/Support/ErrorHandling.h"
3636
#include "llvm/Support/raw_ostream.h"
3737

38-
#include <unordered_map>
3938
#include <set>
39+
#include <unordered_map>
4040

4141
using namespace llvm;
4242

@@ -385,8 +385,8 @@ void RISCVLiveVariables::verifyLiveness(MachineFunction &MF) const {
385385
}
386386

387387
void RISCVLiveVariables::markKills(MachineFunction &MF) {
388-
auto KillSetSize = PreRegAlloc ? RegCounter : TRI->getNumRegs();
389-
for (MachineBasicBlock *MBB : post_order(&MF)) {
388+
auto KillSetSize = PreRegAlloc ? RegCounter : TRI->getNumRegs();
389+
for (MachineBasicBlock *MBB : post_order(&MF)) {
390390
// Set all the registers that are not live-out of the block.
391391
// Since the global liveness is available (even though a bit conservative),
392392
// this initialization is safe.
@@ -405,7 +405,8 @@ void RISCVLiveVariables::markKills(MachineFunction &MF) {
405405

406406
Register Reg = MO.getReg();
407407
// Does not track physical registers pre-regalloc.
408-
if ((PreRegAlloc && Reg.isPhysical()) || !isTrackableRegister(Reg, TRI, MRI))
408+
if ((PreRegAlloc && Reg.isPhysical()) ||
409+
!isTrackableRegister(Reg, TRI, MRI))
409410
continue;
410411

411412
assert(TrackedRegisters.find(Reg) != TrackedRegisters.end() &&

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2-
# RUN: llc -mtriple=riscv64 -run-pass=riscv-live-variables -verify-machineinstrs -o - %s | FileCheck %s
2+
# RUN: llc -mtriple=riscv64 -riscv-enable-live-variables -verify-machineinstrs -o - %s | FileCheck %s
33
#
44
# Test basic live variable analysis with simple control flow and basic blocks
55

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2-
# RUN: llc -mtriple=riscv64 -run-pass=riscv-live-variables -verify-machineinstrs -o - %s | FileCheck %s
2+
# RUN: llc -mtriple=riscv64 -riscv-enable-live-variables -verify-machineinstrs -o - %s | FileCheck %s
33
#
44
# Test live variable analysis with function calls and register clobbering
55
# Function calls clobber caller-saved registers, which affects liveness

llvm/test/CodeGen/RISCV/live-variables-edge-cases.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2-
# RUN: llc -mtriple=riscv64 -run-pass=riscv-live-variables -verify-machineinstrs -o - %s | FileCheck %s
2+
# RUN: llc -mtriple=riscv64 -riscv-enable-live-variables -verify-machineinstrs -o - %s | FileCheck %s
33
#
44
# Test live variable analysis edge cases and special scenarios
55
# Including: dead code, unreachable blocks, critical edges, and complex phi nodes

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2-
# RUN: llc -mtriple=riscv64 -run-pass=riscv-live-variables -verify-machineinstrs -o - %s | FileCheck %s
2+
# RUN: llc -mtriple=riscv64 -riscv-enable-live-variables -verify-machineinstrs -o - %s | FileCheck %s
33
#
44
# Test live variable analysis with loops and backward edges
55
# Loops create interesting liveness patterns with phi nodes and variables

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2-
# RUN: llc -mtriple=riscv64 -run-pass=riscv-live-variables -verify-machineinstrs -o - %s | FileCheck %s
2+
# RUN: llc -mtriple=riscv64 -riscv-enable-live-variables -verify-machineinstrs -o - %s | FileCheck %s
33
#
44
# Test live variable analysis for RV64-specific scenarios
55
# This includes 64-bit operations, wide registers, and RV64-specific instructions
@@ -70,10 +70,9 @@ body: |
7070
7171
%0:gpr = COPY $x10
7272
%1:gpr = COPY $x11
73-
; SLLI for 64-bit shift (RV64-specific immediate range)
7473
%2:gpr = SLLI %0, 32
7574
%3:gpr = OR %2, %1
76-
$x10 = COPY %3
75+
%4:gpr = COPY %3
7776
PseudoRET implicit $x10
7877
...
7978
---

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: llc -x mir -mtriple=riscv64 -verify-machineinstrs -run-pass=riscv-live-variables -debug < %s 2>&1 \
1+
# RUN: llc -x mir -mtriple=riscv64 -verify-machineinstrs -riscv-enable-live-variables -debug < %s 2>&1 \
22
# RUN: | FileCheck %s
33

44
# REQUIRES: asserts

0 commit comments

Comments
 (0)