[llvm] 80eacb1 - [NFC] Inline variable

Guillaume Chatelet via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 6 01:08:36 PST 2023


Author: Guillaume Chatelet
Date: 2023-02-06T09:08:23Z
New Revision: 80eacb1bc21f185ee62814e302c135cadbf1d26c

URL: https://github.com/llvm/llvm-project/commit/80eacb1bc21f185ee62814e302c135cadbf1d26c
DIFF: https://github.com/llvm/llvm-project/commit/80eacb1bc21f185ee62814e302c135cadbf1d26c.diff

LOG: [NFC] Inline variable

Added: 
    

Modified: 
    llvm/lib/Target/CSKY/CSKYISelLowering.cpp
    llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/CSKY/CSKYISelLowering.cpp b/llvm/lib/Target/CSKY/CSKYISelLowering.cpp
index a65a0283777f0..a08ba27f6ec36 100644
--- a/llvm/lib/Target/CSKY/CSKYISelLowering.cpp
+++ b/llvm/lib/Target/CSKY/CSKYISelLowering.cpp
@@ -153,8 +153,7 @@ CSKYTargetLowering::CSKYTargetLowering(const TargetMachine &TM,
   setMaxAtomicSizeInBitsSupported(0);
 
   setStackPointerRegisterToSaveRestore(CSKY::R14);
-  const Align FunctionAlignment(2);
-  setMinFunctionAlignment(FunctionAlignment);
+  setMinFunctionAlignment(Align(2));
   setSchedulingPreference(Sched::Source);
 }
 

diff  --git a/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
index de720c5ece898..233eb3ab9542c 100644
--- a/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
@@ -195,8 +195,7 @@ LoongArchTargetLowering::LoongArchTargetLowering(const TargetMachine &TM,
   setMinCmpXchgSizeInBits(32);
 
   // Function alignments.
-  const Align FunctionAlignment(4);
-  setMinFunctionAlignment(FunctionAlignment);
+  setMinFunctionAlignment(Align(4));
 
   setTargetDAGCombine(ISD::AND);
   setTargetDAGCombine(ISD::OR);


        


More information about the llvm-commits mailing list