diff --git a/src/ipa/libipa/pwl.cpp b/src/ipa/libipa/pwl.cpp
index 69a9334112e8..1858ab37b101 100644
--- a/src/ipa/libipa/pwl.cpp
+++ b/src/ipa/libipa/pwl.cpp
@@ -169,6 +169,12 @@ void Pwl::prepend(double x, double y, const double eps)
  * \return The number of points in the piecewise linear function
  */
 
+/**
+ * \fn Pwl::swap(Pwl &other)
+ * \brief Swap the contents with another PWL
+ * \param[in] other The PWL to swap with
+ */
+
 /**
  * \brief Get the domain of the piecewise linear function
  * \return An interval representing the domain
diff --git a/src/ipa/libipa/pwl.h b/src/ipa/libipa/pwl.h
index c1496c300ee0..add20b5867af 100644
--- a/src/ipa/libipa/pwl.h
+++ b/src/ipa/libipa/pwl.h
@@ -51,6 +51,7 @@ public:
 	bool empty() const { return points_.empty(); }
 	void clear() { points_.clear(); }
 	size_t size() const { return points_.size(); }
+	void swap(Pwl &other) { points_.swap(other.points_); }
 
 	Interval domain() const;
 	Interval range() const;
