================
@@ -29,14 +29,63 @@
#include "clang/CIR/Dialect/IR/CIROpsDialect.cpp.inc"
#include "clang/CIR/Dialect/IR/CIROpsEnums.cpp.inc"
#include "clang/CIR/MissingFeatures.h"
+#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/LogicalResult.h"
+#include "llvm/Support/Mutex.h"
using namespace mlir;
using namespace cir;
+namespace {
+struct CIRBuilderFPDefaults {
+ FenvAttr (*fenv)(void *);
+ FastMathFlagsAttr (*fastMath)(void *);
+ void *self;
+};
+
+llvm::sys::SmartMutex<true> &cirBuilderFPMutex() {
+ static llvm::sys::SmartMutex<true> mutex;
+ return mutex;
+}
+
+llvm::DenseMap<mlir::OpBuilder *, CIRBuilderFPDefaults> &cirBuilderFPMap() {
----------------
RiverDave wrote:
Thanks! I've moved this state to the base builder; please check:
https://github.com/llvm/llvm-project/pull/226334/changes/3bb794c0888e49a4d7722d9d653a5d80304067df
https://github.com/llvm/llvm-project/pull/226334
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits