Halliday & Matthiessen (2014: 485):
Note that perfective non-finite clauses (e.g. to jazz up the title) typically express purpose, but they sometimes express result instead, just as finite clauses introduced by so that may express either result or purpose; in other words, purpose (‘irrealis’) may shade into result (‘realis’).