Fix a bug where arguments should be updated weakly. Rewrote the priority
assignment function. We fall back to inter-procedural priority
assignment because intraprocedural one is far harder to make correct.