To utterly oversimplify things for a moment. Currently both the UK and Ireland are not in the schengen area. That means we dont have open borders and why we do have the problem in Calais.
What we do have currently are the same 'rules' applying in NI as in Ireland, so entry and movement within. (eu and non eu entry requirements) is not an issue. The checks are made at the point you arrive on the island.
There is also the historic 'special' agreement with Ireland extending rights of the Irish people to move freely through the UK and which reflects the EU laws on freedom of movement. In effect, a schengen agreement between Ireland and the UK, the CTA.
Now we have to look at some laws that have already been implemented. Heres David Camerons speech on his commitment to control immigration.
www.gov.uk/government/speeches/pm-speech-on-immigration
Ideed, in 2010 Gordon Brown stated "we are already counting".
Here is also, the current UK situation on "exit" checks.
www.gov.uk/government/publications/exit-checks-on-passengers-leaving-the-uk/exit-checks-fact-sheet
Those within the Common Travel Area, have been excluded from this legislation. In effect, what that is saying, is there is and will be co-operation between those in the CTA to meet the UKs requirement re exit checks. The CTA top trumps UK legislation on exit checks.
And this has all been done whilst under EU law.
Is it an irrelevant point whilst in the EU? No.
You have placed a restriction, on people crossing a border. You have allowed a 'count' to happen, between eu member states. Could France ask to 'count' over the border to Belgium? No. Hungary tried to put a fence up on the border with Slovenia. It lasted 2 days. Those within the schengen area have no passport control, no count, no border. Those outside, have passport control and fierce borders. (Well lets not mention Croatia)
The UK placed the CTA higher than uk border legislation. They will do so again. Remember Irish citizens share the CTA rights, not eu citizens living in Ireland. So what will the EU do if the UK again allow the CTA to top trump border control? It will be for the EU to force a hard border between the two.
Remember with NI outside the EU, there is no longer an eu citizens right to reside, work, register for benefits, tax credits etc. However an Irish citizen can (under the CTA).
You also have to look historically at switzerland. No hard border but part of schengen yet outside the EU. The EU can and has allowed non eu members to be borderless.
Yes the prize, the single market, but having put a 'price' on a border, they cant really argue a hard border on a point of principle. i.e. territorial.
(This entire discussion would also be happening if David Cameron had secured a 'controlled migration' deal within the EU and we had subsequently remained. How was he going to count the migration into the UK from Ireland as 2 seperate eu member states?)
So for me, there is one sticking point. Will Ireland and the EU allow the CTA to top trump? I think they have to, as the alternative quite simply becomes a territorial issue. Just IMO.