Skip to content

Commit

Permalink
[LoongArch] Apply clang formatting to LoongArch target. NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
heiher committed Apr 30, 2024
1 parent d333a0d commit 8d28e58
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ void LoongArchFrameLowering::processFunctionBeforeFrameFinalized(

unsigned ScavSlotsNum = 0;

// Far branches beyond 27-bit offset require a spill slot for scratch register.
// Far branches beyond 27-bit offset require a spill slot for scratch
// register.
bool IsLargeFunction = !isInt<27>(estimateFunctionSizeInBytes(TII, MF));
if (IsLargeFunction)
ScavSlotsNum = 1;
Expand Down
3 changes: 2 additions & 1 deletion llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4950,7 +4950,8 @@ bool LoongArchTargetLowering::isZExtFree(SDValue Val, EVT VT2) const {
return TargetLowering::isZExtFree(Val, VT2);
}

bool LoongArchTargetLowering::isSExtCheaperThanZExt(EVT SrcVT, EVT DstVT) const {
bool LoongArchTargetLowering::isSExtCheaperThanZExt(EVT SrcVT,
EVT DstVT) const {
return Subtarget.is64Bit() && SrcVT == MVT::i32 && DstVT == MVT::i64;
}

Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/LoongArch/LoongArchSubtarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class StringRef;
class LoongArchSubtarget : public LoongArchGenSubtargetInfo {
virtual void anchor();

#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \
#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \
bool ATTRIBUTE = DEFAULT;
#include "LoongArchGenSubtargetInfo.inc"

Expand Down Expand Up @@ -83,7 +83,7 @@ class LoongArchSubtarget : public LoongArchGenSubtargetInfo {
return &TSInfo;
}

#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \
#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \
bool GETTER() const { return ATTRIBUTE; }
#include "LoongArchGenSubtargetInfo.inc"

Expand Down

0 comments on commit 8d28e58

Please sign in to comment.