shithub: scc

ref: 200e2387df6fa8f874a4504437b3787df5327368
dir: /cc2/optm.c/

View raw version

#include "arch.h"
#include "cc2.h"

Node *
optm(Node *np)
{
	Node *dst;

	switch (np->op) {
	case OJMP:
	case OBRANCH:
		dst = np->u.sym->u.stmt;
		if (dst->op == OJMP)
			np->u.sym = dst->u.sym;
		break;
	}
	return np;
}