Add header to IR dumps
Add docstrings to macro.py