Index: contrib/arch/hadlbppp.py
===================================================================
--- contrib/arch/hadlbppp.py	(revision 51d4040da629a823b7cc291e0c50eb3402dfb20d)
+++ contrib/arch/hadlbppp.py	(revision f1fb1d1a2dc2ad325f32210387e3ccac91864cfc)
@@ -422,4 +422,33 @@
 	outf.close()
 
+def flatten_binds(binds, delegates, subsumes):
+	"Remove bindings which are replaced by delegation or subsumption"
+	
+	result = []
+	stable = True
+	
+	for bind in binds:
+		keep = True
+		
+		for delegate in delegates:
+			if (bind['to'] == delegate['to']):
+				keep = False
+				result.append({'from': bind['from'], 'to': delegate['rep']})
+		
+		for subsume in subsumes:
+			if (bind['from'] == subsume['from']):
+				keep = False
+				result.append({'from': subsume['rep'], 'to': bind['to']})
+		
+		if (keep):
+			result.append(bind)
+		else:
+			stable = False
+	
+	if (stable):
+		return result
+	else:
+		return flatten_binds(result, delegates, subsumes)
+
 def merge_subarch(prefix, arch, outdir):
 	"Merge subarchitecture into architexture"
@@ -512,15 +541,5 @@
 		dump_frame(inst['frame'], outdir, inst['var'], outf)
 	
-	for bind in binds:
-		for delegate in delegates:
-			if (bind['to'] == delegate['to']):
-				bind['to'] = delegate['rep']
-				break
-		
-		for subsume in subsumes:
-			if (bind['from'] == subsume['from']):
-				bind['from'] = subsume['rep']
-				break
-		
+	for bind in flatten_binds(binds, delegates, subsumes):
 		outf.write("bind %s to %s\n" % (bind['from'], bind['to']))
 	
