search for: replaceusewithinstr

Displaying 3 results from an estimated 3 matches for "replaceusewithinstr".

2008 Jun 17
4
[LLVMdev] Transforming ConstantExprs to Instructions
...ntExpr::replaceWithInstr() virtual method, which translates all of the uses of a constantexpr with their Instruction equivalents, whenever possible. Each of the subclasses of ConstantExpr can implement this as appropriate. Or, thinking of it, it's probably better to have a protected and virtual replaceUseWithInstr method which is called for each use by replaceWithInstr(). Is this a useful addition? Is this a sane approach? Gr. Matthijs -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature UR...
2008 Jun 17
0
[LLVMdev] Transforming ConstantExprs to Instructions
...nstr() virtual method, which > translates all of the uses of a constantexpr with their Instruction > equivalents, whenever possible. Each of the subclasses of ConstantExpr can > implement this as appropriate. Or, thinking of it, it's probably better to > have a protected and virtual replaceUseWithInstr method which is called for > each use by replaceWithInstr(). > > Is this a useful addition? Is this a sane approach? Is it possible to design the pass to work with both? The general approach is to make stuff handle "User"s instead of Instructions. It is much more compile tim...
2008 Jun 17
0
[LLVMdev] Transforming ConstantExprs to Instructions
...nstr() virtual method, which > translates all of the uses of a constantexpr with their Instruction > equivalents, whenever possible. Each of the subclasses of ConstantExpr can > implement this as appropriate. Or, thinking of it, it's probably better to > have a protected and virtual replaceUseWithInstr method which is called for > each use by replaceWithInstr(). > > Is this a useful addition? Is this a sane approach? I can't imagine any uses for a method like that besides a pass like yours. (This method is essentially the opposite of ConstantFoldInstruction, and is therefore usuall...