Method and a device for abstracting instruction sequences with tail merging