filter-joins function

Filtering joins for an ir object