add compiler pass for tagged contexts