T-shirt and sweatshirt maker Gildan is to lay off 540 workers as part of an ongoing programme to move production offshore.