in the datasheet there is written that the TRISIO register has something to do with the inputs and outputs of the comparator... in fact it says that for the output at GP2 to be enabled TRISIO<2> must be set (page 38)...
now do i also have to swt the TRISIO bit for the analogue input as 1 so to enable the analogue input?
For the comparator output on GPIO2, TRISIO2 should be set (input) as in the datasheet. As for the comparator inputs, TRISIO should be set too (beginning of sec 6.2, page 37).
For the information of which SFR that affects the module your're using, please refer to the very end of the topic for the module. For comparator, it's in Table 6-2, page 40.