> PRE is only using stmt_ann->uid as a convenient place to store the uid > for local dominance for purposes of Load PRE. > It's making up the UID on it's own :). > > If there was stmt->aux we'd put it there instead (note that the > current way wastes memory, since we really only care about UID's for > statements that generate vdefs/vuses)
Well, I think we are mostly discussing how to assign your local data (uids or whatever) with statements. Ie whether to use hashtables, uid indexed arrays or aux pointers. in the UID indexed arrays case your example would translate into some sort of local UID and translation array like RTL optimizers commonly use. I would presonally like to avoid aux pointers. Honza > > <while value numbering statements> > ann = stmt_ann (stmt); > > ann->uid = stmt_uid++; > <in another function> > /* See if the vuse is defined by a statement that > comes before us in the block. Phi nodes are not > stores, so they do not count. */ > if (TREE_CODE (def) != PHI_NODE > && stmt_ann (def)->uid < stmt_ann (stmt)->uid) > {