[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)

2023-12-28 Thread Steve Scalpone via cfe-commits

sscalpone wrote:

Still gathering feedback 
https://discourse.llvm.org/t/proposal-rename-flang-new-to-flang/69462/54

https://github.com/llvm/llvm-project/pull/74377
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [flang] [RFC][flang][runtime] Add FortranFloat128Math wrapper library. (PR #81971)

2024-02-17 Thread Steve Scalpone via cfe-commits


@@ -657,10 +657,61 @@ static llvm::cl::opt
 "instead of libm complex operations"),
  llvm::cl::init(false));
 
+/// Return a string containing the given Fortran intrinsic name
+/// with the type of its arguments specified in funcType
+/// surrounded by the given prefix/suffix.
+static std::string
+prettyPrintIntrinsicName(fir::FirOpBuilder &builder, mlir::Location loc,
+ llvm::StringRef prefix, llvm::StringRef name,
+ llvm::StringRef suffix, mlir::FunctionType funcType) {
+  std::string output = prefix.str();
+  llvm::raw_string_ostream sstream(output);
+  if (name == "pow") {
+assert(funcType.getNumInputs() == 2 && "power operator has two arguments");
+std::string displayName{" ** "};
+sstream << numericMlirTypeToFortran(builder, funcType.getInput(0), loc,
+displayName)
+<< displayName
+<< numericMlirTypeToFortran(builder, funcType.getInput(1), loc,
+displayName);
+  } else {
+sstream << name.upper() << "(";
+if (funcType.getNumInputs() > 0)
+  sstream << numericMlirTypeToFortran(builder, funcType.getInput(0), loc,
+  name);
+for (mlir::Type argType : funcType.getInputs().drop_front()) {
+  sstream << ", " << numericMlirTypeToFortran(builder, argType, loc, name);
+}
+sstream << ")";
+  }
+  sstream << suffix;
+  return output;
+}
+
+// Generate a call to the Fortran runtime library providing
+// support for 128-bit float math via a third-party library.
+// If the compiler is built without FLANG_RUNTIME_F128_MATH_LIB,
+// this function will report an error.
+static mlir::Value genLibF128Call(fir::FirOpBuilder &builder,
+  mlir::Location loc,
+  const MathOperation &mathOp,
+  mlir::FunctionType libFuncType,
+  llvm::ArrayRef args) {
+#ifndef FLANG_RUNTIME_F128_MATH_LIB
+  std::string message = prettyPrintIntrinsicName(
+  builder, loc, "compiler is built without support for '", mathOp.key, "'",

sscalpone wrote:

OK for this message to use a form with "not yet implemented:"?

https://github.com/llvm/llvm-project/pull/81971
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-04-02 Thread Steve Scalpone via cfe-commits

sscalpone wrote:

@ergawy Nice work!  Thanks!

https://github.com/llvm/llvm-project/pull/126026
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits