private static void AddUse(string id, Instruction c, int num) { if (IsId(id)) { var def = DefList.FindLastIndex(x => x.Id == id); var use = new Use(num, c); if (def != -1) { use.Parent = DefList[def]; DefList[def].Uses.Add(use); } } }
private static void AddUse(string id, Instruction c, int num) { if (id != null && id.StartsWith("!")) // for this case: if !#t1 goto L { id = id.Substring(1); } if (IsId(id)) { var def = DefList.FindLastIndex(x => x.Id == id); var use = new Use(num, c); if (def != -1) { use.Parent = DefList[def]; DefList[def].Uses.Add(use); } } }