  In this paper, with the help of an intelligent reflecting surface (IRS), the
source (S) and destination (D) exchange information through the two-way
decode-and-forward relay (TW-DFR). We mainly focus on the phase optimization of
IRS to improve the system rate performance. Firstly, a maximizing receive power
sum (Max-RPS) method is proposed via eigenvalue decomposition (EVD) with an
appreciable rate enhancement, which is called Max-RPS-EVD. To further achieve a
higher rate, a method of maximizing minimum rate (Max-Min-R) is proposed with
high complexity. To reduce its complexity, a low-complexity method of
maximizing the sum rate (Max-SR) via general power iterative (GPI) is proposed,
which is called Max-SR-GPI. Simulation results show that the proposed three
methods outperform the case of random phase method, especially the proposed
Max-SR-GPI method is the best one achieving at least 20\% rate gain over random
phase. Additionally, it is also proved the optimal rate can be achieved when
TW-DFR and IRS are located in the middle of S and D.
