  This paper reinterprets Freidlin-Wentzell's variational construction of the
rate function in the large deviation principle for invariant measures from the
weak KAM perspective. Through a one-dimensional irreversible diffusion process
on a torus, we explicitly characterize essential concepts in the weak KAM
theory, such as the Peierls barrier and the projected Mather/Aubry/Ma\~n\'e
sets. The weak KAM representation of Freidlin-Wentzell's variational
construction of the rate function is discussed based on the global adjustment
for the boundary data on the Aubry set and the local trimming from the lifted
Peierls barriers. This rate function gives the maximal Lipschitz continuous
viscosity solution to the corresponding stationary Hamilton-Jacobi equation
(HJE), satisfying Freidlin-Wentzell's variational formula for the boundary
data. Choosing meaningful self-consistent boundary data at each local attractor
are essential to select a unique weak KAM solution to stationary HJE. This
selected viscosity solution also serves as the global energy landscape of the
original stochastic process. This selection for stationary HJEs can be
described by first taking the long time limit and then taking the zero noise
limit, which also provides a special construction of vanishing viscosity
approximation.
