llvm.org GIT mirror llvm / c654d1b
cache result of operator* git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107979 91177308-0d34-0410-b5e6-96231b3b80d8 Gabor Greif 9 years ago
1 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
252252 // at once.
253253 while (!Placeholder->use_empty()) {
254254 Value::use_iterator UI = Placeholder->use_begin();
255 User *U = *UI;
255256
256257 // If the using object isn't uniqued, just update the operands. This
257258 // handles instructions and initializers for global variables.
258 if (!isa(*UI) || isa(*UI)) {
259 if (!isa(U) || isa(U)) {
259260 UI.getUse().set(RealVal);
260261 continue;
261262 }
262263
263264 // Otherwise, we have a constant that uses the placeholder. Replace that
264265 // constant with a new constant that has *all* placeholder uses updated.
265 Constant *UserC = cast(*UI);
266 Constant *UserC = cast(U);
266267 for (User::op_iterator I = UserC->op_begin(), E = UserC->op_end();
267268 I != E; ++I) {
268269 Value *NewOp;