[llvm] [ANALYSIS][CODEGEN] Added const reference for params with size >= 16 bytes (PR #125090)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 30 08:42:38 PST 2025


================
@@ -3705,9 +3705,9 @@ static void emitGlobalConstantStruct(const DataLayout &DL,
          "Layout of constant struct may be incorrect!");
 }
 
-static void emitGlobalConstantFP(APFloat APF, Type *ET, AsmPrinter &AP) {
+static void emitGlobalConstantFP(const APFloat &APF, Type *ET, AsmPrinter &AP) {
   assert(ET && "Unknown float type");
-  APInt API = APF.bitcastToAPInt();
+  const APInt &API = APF.bitcastToAPInt();
----------------
RKSimon wrote:

What's going on here? bitcastToAPInt doesn't return a reference

https://github.com/llvm/llvm-project/pull/125090


More information about the llvm-commits mailing list