mutate-joins function

Mutating joins for an ir object