Lines Matching defs:constant

10 // This file implements sparse conditional constant propagation and merging:
13 // * Assumes values are constant unless proven otherwise
15 // * Proves values to be constant, and replaces them with constants
49 STATISTIC(IPNumArgsElimed ,"Number of arguments constant propagated by IPSCCP");
50 STATISTIC(IPNumGlobalConst, "Number of globals found to be constant by IPSCCP");
61 /// constant - This LLVM Value has a specific constant value.
62 constant,
65 /// ResolvedUndefsIn. This is treated just like 'constant', but if merged
66 /// with another (different) constant, it goes to overdefined, instead of
70 /// overdefined - This instruction is not known to be constant, and we know
76 /// the constant if this is a 'constant' or 'forcedconstant' value.
88 return getLatticeValue() == constant || getLatticeValue() == forcedconstant;
93 assert(isConstant() && "Cannot get the constant of a non-constant!");
108 if (getLatticeValue() == constant) { // Constant but not forcedconstant.
109 assert(getConstant() == V && "Marking constant with different value");
114 Val.setInt(constant);
115 assert(V && "Marking constant with NULL");
119 "Cannot move from overdefined to constant!");
120 // Stay at forcedconstant if the constant is the same.
124 // forced value are possibly wrong. Assuming this is another constant
131 /// getConstantInt - If this is a constant with a ConstantInt value, return it
167 /// variable, we keep a mapping from the constant accessor to the element of
302 // markConstant - Make a value be marked as "constant". If the value
303 // is not already a constant, add it to the instruction work list so that
380 LV.markConstant(C); // Constants are constant
407 LV.markOverdefined(); // Unknown sort of constant.
411 LV.markConstant(Elt); // Constants are constant.
527 // Overdefined condition variables, and branches on unfoldable constant
642 // PHI node becomes a constant value equal to that.
646 // 6. If a conditional branch has a value that is constant, make the selected
660 // Super-extra-high-degree PHI nodes are unlikely to ever be marked constant,
667 // constant, and they agree with each other, the PHI becomes the identical
668 // constant. If they are constant and don't agree, the PHI is overdefined.
697 // If we exited the loop, this means that the PHI node only has constant
698 // arguments that agree with each other(and OperandVal is the constant) or
749 else if (OpSt.isConstant()) // Propagate constant value
825 // Otherwise, the condition is overdefined or a constant we can't evaluate.
977 // A mix of constant/undef inputs.
1034 // Handle load instructions. If the operand is a constant pointer to a constant
1035 // global, we can replace the load with the loaded constant value!
1056 // Transform load (constant global) into the value loaded.
1069 // Transform load from a constant into a constant if possible.
1091 // a declaration, maybe we can constant fold it.
1108 // If we can constant fold this, mark the result of the call as a
1109 // constant.
1178 // bottom to constant, or to overdefined.
1197 // constant.
1395 if (!Op1LV.isConstant()) // Pick the constant one if there is any.
1427 // 2. It could be constant-foldable.
1434 // If the call is constant-foldable, we mark it overdefined because
1479 // the first constant.
1590 // constants if we have found them to be of constant values.
1609 // Replaces all of the uses of a variable with uses of the constant.
1752 // constants if we have found them to be of constant values.
1763 // result is a constant and replace it entirely if so.
1773 // constant.
1807 // result is a constant and replace it entirely if so.
1818 // constant.
1831 // Now that all instructions in the function are constant folded, erase dead
1849 // The constant folder may not have been able to fold the terminator
1882 // If we inferred constant or undef return values for a function, we replaced
1918 // If we inferred constant or undef values for globals variables, we can
1926 DEBUG(dbgs() << "Found that GV '" << GV->getName() << "' is constant!\n");