Lines Matching defs:IT
158 /// Return true if it is safe to merge these two
163 // It is not safe to merge these two switch instructions if they have a common
183 /// Return true if it is safe and profitable to merge these two terminator
222 /// Update PHI nodes in Succ to indicate that there will now be entries in it
285 // branch to BB, then it must be in the 'conditional' part of the "if
286 // statement". If not, it definitely dominates the region.
295 // If we have seen this instruction before, don't count it again.
298 // Okay, it looks like the instruction IS in the "condition". Check to
299 // see if it's a cheap instruction to unconditionally compute, and if it
300 // only uses stuff defined outside of the condition. If so, hoist it out.
307 // (as long as it is safe to do so).
325 // Okay, it's safe to do this! Remember this instruction.
338 // This is some kind of pointer constant. Turn it into a pointer-sized
365 /// It will depth-first traverse the chain of comparison, seeking for patterns
368 /// Note that if the chain is composed of '||' it will build the set of elements
370 /// while for a chain of '&&' it will build the set elements that make the test
392 /// Try to set the current value used for the comparison, it succeeds only if
393 /// it wasn't set before or if the new value is the same as the old one
427 // If we already have a value for the switch, it has to match!
439 // If we already have a value for the switch, it has to match!
471 // If we already have a value for the switch, it has to match!
503 // If it is a || (or && depending on isEQ), process the operands.
576 /// decode all of the 'cases' that it represents and return the 'default' block.
657 // FoldValueComparisonIntoPredecessors preserves it.
680 // Okay, one of the successors of this condbr is dead. Convert it to a
757 // If not handled by any explicit cases, it is handled by the default case.
1038 // Insert it at the end of the function, because it's either code,
1039 // or it won't matter if it's hot. :)
1091 // Skip debug info if it is not identical.
1109 // broken BB), instead clone it, and remove BI.
1135 // Skip debug info if it is not identical.
1149 // It may not be possible to hoist an invoke.
1163 // eliminate undefined control flow then converting it to a select.
1175 // Okay, it is safe to hoist the terminator.
1223 /// ends with an unconditional branch. If it is true, sink any common code
1442 // Found the previous store make sure it stores to the same location.
1457 /// pass which can do it with full awareness of the resource constraints.
1462 /// it makes very common but simplistic optimizations such as are common in
1533 // Don't hoist the instruction if it's unsafe or expensive.
1810 /// see if we can eliminate it.
1817 // dependence information for this check, but simplifycfg can't keep it up
1838 // instructions. While we are at it, keep track of the instructions
1861 // If we folded the first phi, PN dangles at this point. Refresh it. If
1876 // not, we won't be able to get rid of the control flow, so it's not
1889 // flow, so the xform is not worth it.
1902 // flow, so the xform is not worth it.
2368 // If there is only one store in BB1 and BB2, return it, otherwise return
2392 // If AlternativeV is nullptr, the only value we care about in PHI is V. It
2393 // doesn't matter to us what the other operand is (it'll never get used). We
2395 // increase register pressure if EarlyCSE/InstCombine can't fold it with some
2397 // as an incoming operand. If we find one, we use it, else we create a new
2422 // If V is not an instruction defined in BB, just return it.
2451 // instructions inside are all cheap (arithmetic/GEPs), it's worthwhile to
2556 // stores are conditional, so they can't be unconditionally sunk. But it may
2642 // set_intersect mutates PStoreAddresses in place. Rename it here to make it
2643 // clear what it contains.
2654 /// this function tries to simplify it. We know
2758 // Do not perform this transformation if it would require
2764 // case, it would be unsafe to hoist the operation into a select instruction.
2794 // branch in it, where one edge (OtherDest) goes back to itself but the other
2798 // done) that the block *is* infinite if reached, we just make it an obviously
2801 // Insert it at the end of the function, because it's either code,
2802 // or it won't matter if it's hot. :)
2812 // it alone, but modify PBI.
2862 // it. If it has PHIs though, the PHIs may have different
2882 // This basic block is probably dead. We know it has at least
2887 // Simplifies a terminator by replacing it with a branch to TrueBB if Cond is
2921 // We were only looking for one successor, and it was present.
2922 // Create an unconditional branch to it.
3014 /// default value goes to an uncond block with a seteq in it, we get something
3032 // If the block has any PHIs in it or the icmp has multiple uses, it is too
3050 // V in this block. Substitute it and constant fold the icmp instruction
3061 // BB is now empty, so it is likely to simplify away.
3067 // and zap it.
3077 // BB is now empty, so it is likely to simplify away.
3098 // false depending on if it is EQ or NE.
3132 /// Check to see if it is branching on an or/and chain of icmp instructions, and
3133 /// fold it into a switch instruction if so.
3140 // If this is a bunch of seteq's or'd together, or if it's a bunch of
3170 // FoldValueComparisonIntoPredecessors preserves it.
3184 // right before the condbr to handle it.
3262 // The landingpad is now unreachable. Zap it.
3268 // If this is a trivial cleanup pad that executes no instructions, it can be
3307 // Since BB unwinds to UnwindDest, it has to be in the PHI node.
3311 // value is in the cleanup pad, it must be a PHINode (because we
3337 // so we can just reuse it. We must associate all of BB's
3354 // If the PHI node has no uses, just leave it. It will be erased
3380 // The cleanup pad is now unreachable. Zap it.
3467 // Note that deleting LandingPad's here is in fact okay, although it
3524 // TODO: We can remove a catchswitch if all it's catchpads end in
3528 // If this block is now dead, remove it.
3661 /// and use it to remove dead cases.
3681 // default destination becomes dead and we can remove it. If we know some
3735 /// TryToSimplifyUncondBranchFromEmptyBlock (i.e. it is empty and terminated
3823 /// If V is a Constant, return it. Otherwise, try to look up
3824 /// its constant value in ConstantPool, returning 0 if it's not there.
3897 // the block, it is not safe to bypass the instruction since it would then
4005 // Helper function that checks if it is possible to transform a switch with only
4121 it can be represented in
4125 // store that single value and return it for each lookup.
4220 // This is an undef. We could deal with it, but undefs in lookup tables
4221 // are very seldom. It's probably not worth the additional complexity.
4248 IntegerType *IT = cast<IntegerType>(ValueType);
4249 APInt TableInt(TableSize * IT->getBitWidth(), 0);
4251 TableInt <<= IT->getBitWidth();
4259 BitMapElementTy = IT;
4297 // truncating it to the width of the bitmask is safe.
4314 IntegerType *IT = cast<IntegerType>(Index->getType());
4317 if (TableSize > (1ULL << (IT->getBitWidth() - 1)))
4319 IntegerType::get(IT->getContext(),
4320 IT->getBitWidth() + 1),
4335 auto *IT = dyn_cast<IntegerType>(ElementType);
4336 if (!IT)
4338 // FIXME: If the type is wider than it needs to be, e.g. i8 but all values
4342 if (TableSize >= UINT_MAX/IT->getBitWidth())
4344 return DL.fitsInLegalInteger(TableSize * IT->getBitWidth());
4375 // If each table would fit in a register, we should build it anyway.
4379 // Don't build a table that doesn't fit in-register if it has illegal types.
4447 // Check if the branch instruction dominates the phi node. It's a simple
4449 // Although this check is invariant in the calling loops, it's better to do it
4450 // at this late stage. Practically we do it at most once for a switch.
4459 // The compare yields the same result. We can replace it.
4463 // The compare yields the same result, just inverted. We can replace it.
4480 // Only build lookup table when we have a target that supports it.
4585 "It is impossible for a switch to have more entries than the max "
4714 // If we only have one predecessor, and if it is a branch on this value,
4773 // If the indirectbr has no successors, change it to unreachable.
4780 // If the indirectbr has one successor, change it to a direct branch.
4847 // used to go through BB. We need to delete it or update it.
4927 // If we only have one predecessor, and if it is a branch on this value,
4934 // This block must be empty, except for the setcond inst, if it exists.
4966 // can hoist it up to the branching block.
4973 // execute Successor #0 if it branches to Successor #1.
4982 // execute Successor #1 if it branches to Successor #0.
5119 // eliminate it, do so now.
5152 /// For example, it adjusts branches to branches to eliminate the extra hop,
5154 /// of the CFG. It returns true if a modification was made.