cmd/compile: free IR fields after compiling each function