Structure phase transitions of polymorphic compounds with layered crystal structures: The REIr2Si2 case