• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/llvmCore-3425.0.34/lib/Transforms/Scalar/

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
309 // markConstant - Make a value be marked as "constant". If the value
310 // is not already a constant, add it to the instruction work list so that
387 LV.markConstant(C); // Constants are constant
414 LV.markOverdefined(); // Unknown sort of constant.
418 LV.markConstant(Elt); // Constants are constant.
534 // Overdefined condition variables, and branches on unfoldable constant
649 // PHI node becomes a constant value equal to that.
653 // 6. If a conditional branch has a value that is constant, make the selected
667 // Super-extra-high-degree PHI nodes are unlikely to ever be marked constant,
674 // constant, and they agree with each other, the PHI becomes the identical
675 // constant. If they are constant and don't agree, the PHI is overdefined.
704 // If we exited the loop, this means that the PHI node only has constant
705 // arguments that agree with each other(and OperandVal is the constant) or
759 else if (OpSt.isConstant()) // Propagate constant value
835 // Otherwise, the condition is overdefined or a constant we can't evaluate.
987 // A mix of constant/undef inputs.
1044 // Handle load instructions. If the operand is a constant pointer to a constant
1045 // global, we can replace the load with the loaded constant value!
1066 // Transform load (constant global) into the value loaded.
1079 // Transform load from a constant into a constant if possible.
1101 // a declaration, maybe we can constant fold it.
1118 // If we can constant fold this, mark the result of the call as a
1119 // constant.
1188 // bottom to constant
1207 // constant.
1405 if (!Op1LV.isConstant()) // Pick the constant one if there is any.
1437 // 2. It could be constant-foldable.
1444 // If the call is constant-foldable, we mark it overdefined because
1489 // the first constant.
1600 // constants if we have found them to be of constant values.
1619 // Replaces all of the uses of a variable with uses of the constant.
1762 // constants if we have found them to be of constant values.
1773 // result is a constant and replace it entirely if so.
1783 // constant.
1817 // result is a constant and replace it entirely if so.
1828 // constant.
1841 // Now that all instructions in the function are constant folded, erase dead
1859 // The constant folder may not have been able to fold the terminator
1892 // If we inferred constant or undef return values for a function, we replaced
1928 // If we inferred constant or undef values for globals variables, we can
1936 DEBUG(dbgs() << "Found that GV '" << GV->getName() << "' is constant!\n");