Selectively calling a function in GLSL

Hello All,

I need to selectively call a function within my vertex shader, this decision is based on a per vertex “flag”.
So, it would be something like:

if ( flag_set )

I understand that branching instructions in shaders are costly. Is there some other way i can achieve the same thing without the “if” condition?