In a given triangle, the largest side is twice the length of the smallest side. The other side (that is not the smallest or largest) is 2 units longer than the smallest side. Which expression represents the perimeter of the triangle if x represents the length of the smallest side?