commit | 6c1932ffd82e733325180fe13ef46b24ff606eab | [log] [tgz] |
---|---|---|
author | Yingwei Zheng <dtcxzyw2333@gmail.com> | Sat Mar 23 14:57:35 2024 +0800 |
committer | GitHub <noreply@github.com> | Sat Mar 23 14:57:35 2024 +0800 |
tree | 8327d8e8bc592f4510c151810d1725b481c212ab | |
parent | 635ea257eca7c8e95c6ea30ca3816a0b5584ab37 [diff] [blame] |
[LLVM] Pass APInt by const reference. NFC. (#86278) This patch adjusts argument passing for `APInt` to improve the compile-time. Compile-time improvement: https://llvm-compile-time-tracker.com/compare.php?from=d1f182c895728d89c5c3d198b133e212a5d9d4a3&to=32d6611af69bf4e76373f9bc7d9649650f760e48&stat=instructions:u
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp index 8d608f6..1b25da8 100644 --- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp +++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
@@ -7855,7 +7855,7 @@ //{ (Src & Mask) >> N } | { (Src << N) & Mask } static MachineInstrBuilder SwapN(unsigned N, DstOp Dst, MachineIRBuilder &B, - MachineInstrBuilder Src, APInt Mask) { + MachineInstrBuilder Src, const APInt &Mask) { const LLT Ty = Dst.getLLTTy(*B.getMRI()); MachineInstrBuilder C_N = B.buildConstant(Ty, N); MachineInstrBuilder MaskLoNTo0 = B.buildConstant(Ty, Mask);