index b6a969787aca19b2bc39114ea57020b0c88a2b3a..b39bbd7c713ed00b3ef2848c1694b65408740794 100644 (file)
#define pg_attribute_noreturn()
#endif
+
+/*
+ * Forcing a function not to be inlined can be useful if it's the slow-path of
+ * a performance critical function, or should be visible in profiles to allow
+ * for proper cost attribution.
+ */
+/* GCC, Sunpro and XLC support noinline via __attribute */
+#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
+#define pg_noinline __attribute__((noinline))
+/* msvc via declspec */
+#elif defined(_MSC_VER)
+#define pg_noinline __declspec(noinline)
+#else
+#define pg_noinline
+#endif
+
/* ----------------------------------------------------------------
* Section 6: assertions
* ----------------------------------------------------------------