LLVM API Documentation
#include "llvm/Transforms/Scalar.h"#include "llvm/IntrinsicInst.h"#include "llvm/Pass.h"#include "llvm/DerivedTypes.h"#include "llvm/GlobalVariable.h"#include "llvm/Analysis/ConstantFolding.h"#include "llvm/Analysis/ValueTracking.h"#include "llvm/Target/TargetData.h"#include "llvm/Transforms/Utils/BasicBlockUtils.h"#include "llvm/Transforms/Utils/Local.h"#include "llvm/Support/CallSite.h"#include "llvm/Support/ConstantRange.h"#include "llvm/Support/Debug.h"#include "llvm/Support/GetElementPtrTypeIterator.h"#include "llvm/Support/InstVisitor.h"#include "llvm/Support/MathExtras.h"#include "llvm/Support/PatternMatch.h"#include "llvm/Support/Compiler.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/Statistic.h"#include "llvm/ADT/STLExtras.h"#include <algorithm>#include <climits>#include <sstream>Include dependency graph for InstructionCombining.cpp:

Go to the source code of this file.
Classes | |
| class | InstCombiner |
| struct | AddRHS |
| struct | AddMaskingAnd |
| struct | FoldICmpLogical |
| struct | XorSelf |
Defines | |
| #define | DEBUG_TYPE "instcombine" |
Functions | |
| STATISTIC (NumCombined,"Number of insts combined") | |
| STATISTIC (NumConstProp,"Number of constant folds") | |
| STATISTIC (NumDeadInst,"Number of dead inst eliminated") | |
| STATISTIC (NumDeadStore,"Number of dead stores eliminated") | |
| STATISTIC (NumSunkInst,"Number of instructions sunk") | |
| unsigned | getComplexity (Value *V) |
| bool | isOnlyUse (Value *V) |
| const Type * | getPromotedType (const Type *Ty) |
| Value * | getBitCastOperand (Value *V) |
| Instruction::CastOps | isEliminableCastPair (const CastInst *CI, unsigned opcode, const Type *DstTy, TargetData *TD) |
| bool | ValueRequiresCast (Instruction::CastOps opcode, const Value *V, const Type *Ty, TargetData *TD) |
| Value * | dyn_castNegVal (Value *V) |
| Value * | dyn_castNotVal (Value *V) |
| Value * | dyn_castFoldableMul (Value *V, ConstantInt *&CST) |
| User * | dyn_castGetElementPtr (Value *V) |
| unsigned | getOpcode (const Value *V) |
| ConstantInt * | AddOne (ConstantInt *C) |
| AddOne - Add one to a ConstantInt. | |
| ConstantInt * | SubOne (ConstantInt *C) |
| SubOne - Subtract one from a ConstantInt. | |
| ConstantInt * | Add (ConstantInt *C1, ConstantInt *C2) |
| Add - Add two ConstantInts together. | |
| ConstantInt * | And (ConstantInt *C1, ConstantInt *C2) |
| And - Bitwise AND two ConstantInts together. | |
| ConstantInt * | Subtract (ConstantInt *C1, ConstantInt *C2) |
| Subtract - Subtract one ConstantInt from another. | |
| ConstantInt * | Multiply (ConstantInt *C1, ConstantInt *C2) |
| Multiply - Multiply two ConstantInts together. | |
| bool | MultiplyOverflows (ConstantInt *C1, ConstantInt *C2, bool sign) |
| bool | ShrinkDemandedConstant (Instruction *I, unsigned OpNo, APInt Demanded) |
| void | ComputeSignedMinMaxValuesFromKnownBits (const Type *Ty, const APInt &KnownZero, const APInt &KnownOne, APInt &Min, APInt &Max) |
| void | ComputeUnsignedMinMaxValuesFromKnownBits (const Type *Ty, const APInt &KnownZero, const APInt &KnownOne, APInt &Min, APInt &Max) |
| template<typename Functor> | |
| Instruction * | AssociativeOpt (BinaryOperator &Root, const Functor &F) |
| Value * | FoldOperationIntoSelectOperand (Instruction &I, Value *SO, InstCombiner *IC) |
| Instruction * | FoldOpIntoSelect (Instruction &Op, SelectInst *SI, InstCombiner *IC) |
| bool | isSignBitCheck (ICmpInst::Predicate pred, ConstantInt *RHS, bool &TrueIfSigned) |
| bool | isOneBitSet (const ConstantInt *CI) |
| bool | isHighOnes (const ConstantInt *CI) |
| unsigned | getICmpCode (const ICmpInst *ICI) |
| Value * | getICmpValue (bool sign, unsigned code, Value *LHS, Value *RHS) |
| bool | PredicatesFoldable (ICmpInst::Predicate p1, ICmpInst::Predicate p2) |
| bool | isRunOfOnes (ConstantInt *Val, uint32_t &MB, uint32_t &ME) |
| bool | CollectBSwapParts (Value *V, SmallVector< Value *, 8 > &ByteValues) |
| bool | AddWithOverflow (ConstantInt *&Result, ConstantInt *In1, ConstantInt *In2, bool IsSigned=false) |
| Value * | EmitGEPOffset (User *GEP, Instruction &I, InstCombiner &IC) |
| Value * | EvaluateGEPOffsetExpression (User *GEP, Instruction &I, InstCombiner &IC) |
| Value * | DecomposeSimpleLinearExpr (Value *Val, unsigned &Scale, int &Offset) |
| Constant * | FitsInFPType (ConstantFP *CFP, const fltSemantics &Sem) |
| Value * | LookThroughFPExtensions (Value *V) |
| unsigned | GetSelectFoldableOperands (Instruction *I) |
| Constant * | GetSelectFoldableConstant (Instruction *I) |
| unsigned | EnforceKnownAlignment (Value *V, unsigned Align, unsigned PrefAlign) |
| bool | isSafeToEliminateVarargsCast (const CallSite CS, const CastInst *const CI, const TargetData *const TD, const int ix) |
| bool | isSafeToSinkLoad (LoadInst *L) |
| bool | DeadPHICycle (PHINode *PN, SmallPtrSet< PHINode *, 16 > &PotentiallyDeadPHIs) |
| bool | PHIsEqualValue (PHINode *PN, Value *NonPhiInVal, SmallPtrSet< PHINode *, 16 > &ValueEqualPHIs) |
| Value * | InsertCastToIntPtrTy (Value *V, const Type *DTy, Instruction *InsertPoint, InstCombiner *IC) |
| Instruction * | InstCombineLoadCast (InstCombiner &IC, LoadInst &LI, const TargetData *TD) |
| InstCombineLoadCast - Fold 'load (cast P)' -> cast (load P)' when possible. | |
| bool | isSafeToLoadUnconditionally (Value *V, Instruction *ScanFrom) |
| Value * | GetUnderlyingObject (Value *Ptr) |
| Instruction * | InstCombineStoreToCast (InstCombiner &IC, StoreInst &SI) |
| bool | CheapToScalarize (Value *V, bool isConstant) |
| std::vector< unsigned > | getShuffleMask (const ShuffleVectorInst *SVI) |
| Value * | FindScalarElement (Value *V, unsigned EltNo) |
| bool | CollectSingleShuffleElements (Value *V, Value *LHS, Value *RHS, std::vector< Constant * > &Mask) |
| Value * | CollectShuffleElements (Value *V, std::vector< Constant * > &Mask, Value *&RHS) |
| bool | TryToSinkInstruction (Instruction *I, BasicBlock *DestBlock) |
| void | AddReachableCodeToWorklist (BasicBlock *BB, SmallPtrSet< BasicBlock *, 64 > &Visited, InstCombiner &IC, const TargetData *TD) |
Variables | |
| RegisterPass< InstCombiner > | X ("instcombine","Combine redundant instructions") |
|
|
Definition at line 36 of file InstructionCombining.cpp. |
|
||||||||||||
|
Add - Add two ConstantInts together.
Definition at line 639 of file InstructionCombining.cpp. References llvm::ConstantInt::getValue(). Referenced by AddWithOverflow(), AddMaskingAnd::apply(), AddRHS::apply(), InstCombiner::visitAdd(), InstCombiner::visitAnd(), InstCombiner::visitMul(), InstCombiner::visitOr(), and InstCombiner::visitURem(). |
|
|
AddOne - Add one to a ConstantInt.
Definition at line 629 of file InstructionCombining.cpp. References llvm::ConstantInt::getValue(). Referenced by InstCombiner::FoldICmpDivCst(), InstCombiner::visitAdd(), InstCombiner::visitAnd(), InstCombiner::visitICmpInst(), InstCombiner::visitICmpInstWithInstAndIntCst(), InstCombiner::visitOr(), and InstCombiner::visitSub(). |
|
||||||||||||||||||||
|
||||||||||||||||||||
|
AddWithOverflow - Compute Result = In1+In2, returning true if the result overflowed for this type. Definition at line 4619 of file InstructionCombining.cpp. References Add(), llvm::ConstantInt::getValue(), llvm::APInt::isNegative(), llvm::APInt::sgt(), llvm::APInt::slt(), and llvm::APInt::ult(). Referenced by InstCombiner::FoldICmpDivCst(). |
|
||||||||||||
|
And - Bitwise AND two ConstantInts together.
Definition at line 643 of file InstructionCombining.cpp. References llvm::ConstantInt::getValue(). Referenced by InstCombiner::visitAdd(), and InstCombiner::visitXor(). |
|
||||||||||||||||
|
AssociativeOpt - Perform an optimization on an associative operator. This function is designed to check a chain of associative operators for a potential to apply a certain optimization. Since the optimization may be applicable if the expression was reassociated, this checks the chain, then reassociates the expression as necessary to expose the optimization opportunity. This makes use of a special Functor, which must define 'shouldApply' and 'apply' methods. Definition at line 1621 of file InstructionCombining.cpp. References llvm::Instruction::getOpcode(), llvm::BinaryOperator::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), llvm::Value::hasOneUse(), llvm::Instruction::moveBefore(), llvm::Value::replaceAllUsesWith(), and llvm::User::setOperand(). Referenced by InstCombiner::visitAdd(), InstCombiner::visitAnd(), InstCombiner::visitOr(), and InstCombiner::visitXor(). |
|
||||||||||||
|
CheapToScalarize - Return true if the value is cheaper to scalarize than it is to leave as a vector operation. Definition at line 10789 of file InstructionCombining.cpp. References llvm::User::getNumOperands(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::Constant::getOperand(), and llvm::Value::hasOneUse(). Referenced by InstCombiner::visitExtractElementInst(). |
|
||||||||||||
|
CollectBSwapParts - Look to see if the specified value defines a single byte in the result. If it does, and if the specified byte hasn't been filled in yet, fill it in and return false. Definition at line 3826 of file InstructionCombining.cpp. References llvm::APInt::getActiveBits(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::Type::getPrimitiveSizeInBits(), llvm::Value::getType(), llvm::ConstantInt::getValue(), llvm::ConstantInt::getZExtValue(), llvm::Instruction::isShift(), llvm::PatternMatch::m_And(), llvm::PatternMatch::m_ConstantInt(), llvm::PatternMatch::m_Shift(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), and llvm::SmallVectorImpl< T >::size(). |
|
||||||||||||||||
|
CollectShuffleElements - We are building a shuffle of V, using RHS as the RHS of the shuffle instruction, if it is not null. Return a shuffle mask that computes V and the LHS value of the shuffle. Definition at line 11087 of file InstructionCombining.cpp. References CollectSingleShuffleElements(), llvm::User::getOperand(), and llvm::Value::getType(). Referenced by InstCombiner::visitInsertElementInst(). |
|
||||||||||||||||||||
|
CollectSingleShuffleElements - If V is a shuffle of values that ONLY returns elements from either LHS or RHS, return the shuffle mask and true. Otherwise, return false. Definition at line 11017 of file InstructionCombining.cpp. References llvm::User::getOperand(), and llvm::Value::getType(). Referenced by CollectShuffleElements(). |
|
||||||||||||||||||||||||
|
Definition at line 706 of file InstructionCombining.cpp. References llvm::APInt::clear(), llvm::APInt::getBitWidth(), and llvm::APInt::set(). Referenced by InstCombiner::visitICmpInst(). |
|
||||||||||||||||||||||||
|
Definition at line 732 of file InstructionCombining.cpp. References llvm::APInt::getBitWidth(). Referenced by InstCombiner::visitICmpInst(). |
|
||||||||||||
|
DeadPHICycle - Return true if this PHI node is only used by a PHI node cycle that is dead. Definition at line 9539 of file InstructionCombining.cpp. References llvm::Value::hasOneUse(), llvm::SmallPtrSet< PtrType, SmallSize >::insert(), llvm::SmallPtrSetImpl::size(), llvm::Instruction::use_back(), and llvm::Value::use_empty(). Referenced by InstCombiner::visitPHINode(). |
|
||||||||||||||||
|
DecomposeSimpleLinearExpr - Analyze 'Val', seeing if it is a simple linear expression. If so, decompose it, returning some value X, such that Val is X*Scale+Offset. Definition at line 6777 of file InstructionCombining.cpp. References llvm::BinaryOperator::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), and llvm::ConstantInt::getZExtValue(). |
|
||||||||||||
|
Definition at line 589 of file InstructionCombining.cpp. References llvm::ConstantInt::getLimitedValue(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), llvm::Value::hasOneUse(), llvm::Type::isInteger(), and llvm::APIntOps::shl(). Referenced by InstCombiner::visitAdd(), and InstCombiner::visitSub(). |
|
|
dyn_castGetElementPtr - If this is a getelementptr instruction or constant expression, return it. Definition at line 609 of file InstructionCombining.cpp. References llvm::ConstantExpr::getOpcode(). Referenced by InstCombiner::FoldGEPICmp(), InstCombiner::visitGetElementPtrInst(), and InstCombiner::visitICmpInst(). |
|
|
Definition at line 559 of file InstructionCombining.cpp. References llvm::SequentialType::getElementType(), llvm::ConstantVector::getType(), and llvm::Type::isInteger(). Referenced by InstCombiner::visitAdd(), InstCombiner::visitICmpInstWithInstAndIntCst(), InstCombiner::visitMul(), InstCombiner::visitSDiv(), InstCombiner::visitSRem(), and InstCombiner::visitSub(). |
|
|
Definition at line 574 of file InstructionCombining.cpp. References llvm::ConstantInt::getValue(). Referenced by InstCombiner::visitAdd(), InstCombiner::visitAnd(), and InstCombiner::visitXor(). |
|
||||||||||||||||
|
EmitGEPOffset - Given a getelementptr instruction/constantexpr, emit the code necessary to compute the offset from the base pointer (without adding in the base pointer). Return the result as a signed integer of intptr size. Definition at line 4635 of file InstructionCombining.cpp. References llvm::gep_type_begin(), llvm::gep_type_iterator, llvm::TargetData::getABITypeSize(), llvm::StructLayout::getElementOffset(), llvm::generic_gep_type_iterator< ItTy >::getIndexedType(), llvm::TargetData::getIntPtrType(), llvm::Value::getName(), llvm::TargetData::getPointerSizeInBits(), llvm::TargetData::getStructLayout(), InstCombiner::getTargetData(), llvm::Value::getType(), llvm::ConstantInt::getValue(), llvm::ConstantInt::getZExtValue(), InstCombiner::InsertNewInstBefore(), llvm::ConstantInt::isZero(), llvm::User::op_begin(), llvm::User::op_end(), and llvm::User::op_iterator. Referenced by InstCombiner::commonPointerCastTransforms(), and InstCombiner::FoldGEPICmp(). |
|
||||||||||||||||
|
EnforceKnownAlignment - If the specified pointer points to an object that we control, modify the object's alignment to PrefAlign. This isn't often possible though. If alignment is important, a more reliable approach is to simply align all global variables and allocation instructions to their preferred alignment from the beginning. Definition at line 8419 of file InstructionCombining.cpp. References getOpcode(), llvm::User::getOperand(), llvm::GlobalValue::isDeclaration(), llvm::User::op_begin(), llvm::User::op_end(), llvm::User::op_iterator, llvm::AllocationInst::setAlignment(), and llvm::GlobalValue::setAlignment(). |
|
||||||||||||||||
|
EvaluateGEPOffsetExpression - Return an value that can be used to compare of the *offset* implied by GEP to zero. For example, if we have &A[i], we want to return 'i' for "icmp ne i, 0". Note that, in general, indices can be complex, and scales are involved. The above expression would also be legal to codegen as "icmp ne (i*4), 0" (assuming A is a pointer to i32). This later form is less amenable to optimization though, and we are allowed to generate the first by knowing that pointer arithmetic doesn't overflow. If we can't emit an optimized form for this expression, this returns null. Definition at line 4718 of file InstructionCombining.cpp. References llvm::gep_type_begin(), llvm::gep_type_iterator, llvm::TargetData::getABITypeSize(), llvm::StructLayout::getElementOffset(), llvm::generic_gep_type_iterator< ItTy >::getIndexedType(), llvm::TargetData::getIntPtrType(), llvm::Value::getNameStart(), llvm::User::getNumOperands(), llvm::User::getOperand(), llvm::TargetData::getPointerSizeInBits(), llvm::Type::getPrimitiveSizeInBits(), llvm::ConstantInt::getSExtValue(), llvm::TargetData::getStructLayout(), InstCombiner::getTargetData(), llvm::Value::getType(), llvm::ConstantInt::getZExtValue(), and llvm::ConstantInt::isZero(). Referenced by InstCombiner::FoldGEPICmp(). |
|
||||||||||||
|
FindScalarElement - Given a vector and an element number, see if the scalar value is already around as a register, for example if it were inserted then extracted from the vector. Definition at line 10849 of file InstructionCombining.cpp. References llvm::SequentialType::getElementType(), llvm::VectorType::getNumElements(), llvm::User::getOperand(), llvm::Constant::getOperand(), getShuffleMask(), and llvm::Value::getType(). Referenced by InstCombiner::visitExtractElementInst(). |
|
||||||||||||
|
FitsInFPType - Return a Constant* for the specified FP constant if it fits in the specified FP type without changing its value. Definition at line 7711 of file InstructionCombining.cpp. References llvm::APFloat::convert(), and llvm::ConstantFP::getValueAPF(). Referenced by LookThroughFPExtensions(). |
|
||||||||||||||||
|
Definition at line 1718 of file InstructionCombining.cpp. References llvm::Value::getName(), llvm::CmpInst::getOpcode(), llvm::BinaryOperator::getOpcode(), llvm::Instruction::getOpcode(), llvm::CastInst::getOpcode(), llvm::User::getOperand(), llvm::CmpInst::getPredicate(), llvm::Value::getType(), InstCombiner::InsertNewInstBefore(), and std::swap(). Referenced by FoldOpIntoSelect(). |
|
||||||||||||||||
|
|
getBitCastOperand - If the specified operand is a CastInst or a constant expression bitcast, return the operand value, otherwise return null. Definition at line 440 of file InstructionCombining.cpp. References llvm::ConstantExpr::getOpcode(), llvm::Constant::getOperand(), and llvm::User::getOperand(). Referenced by InstCombiner::visitGetElementPtrInst(). |
|
|
Definition at line 412 of file InstructionCombining.cpp. |
|
|
getICmpCode - Encode a icmp predicate into a three bit mask. These bits are carefully arranged to allow folding of expressions such as: (A < B) | (A > B) --> (A != B) Note that this is only valid if the first and second predicates have the same sign. Is illegal to do: (A u< B) | (A s> B) Three bits are used to represent the condition, as follows: 0 A > B 1 A == B 2 A < B <=> Value Definition 000 0 Always false 001 1 A > B 010 2 A == B 011 3 A >= B 100 4 A < B 101 5 A != B 110 6 A <= B 111 7 Always true Definition at line 3012 of file InstructionCombining.cpp. References llvm::CmpInst::getPredicate(). Referenced by FoldICmpLogical::apply(). |
|
||||||||||||||||||||
|
getICmpValue - This is the complement of getICmpCode, which turns an opcode and two operands into either a constant true or false, or a brand new ICmp instruction. The sign is passed in to determine which kind of predicate to use in new icmp instructions. Definition at line 3036 of file InstructionCombining.cpp. Referenced by FoldICmpLogical::apply(). |
|
|
getOpcode - If this is an Instruction or a ConstantExpr, return the opcode value. Otherwise return UserOp1. Definition at line 619 of file InstructionCombining.cpp. References llvm::ConstantExpr::getOpcode(), and llvm::Instruction::getOpcode(). Referenced by InstCombiner::commonIntCastTransforms(), llvm::ComputeMaskedBits(), llvm::ComputeNumSignBits(), EnforceKnownAlignment(), llvm::SelectInst::getOpcode(), llvm::Instruction::getOpcodeName(), llvm::Instruction::isArithmeticShift(), llvm::Instruction::isAssociative(), llvm::Instruction::isBinaryOp(), llvm::Instruction::isCast(), llvm::Instruction::isCommutative(), llvm::MachineInstr::isIdenticalTo(), llvm::Instruction::isLogicalShift(), llvm::Instruction::isShift(), llvm::Instruction::isTerminator(), llvm::Instruction::isTrapping(), SRAGlobal(), InstCombiner::visitAnd(), and InstCombiner::visitSExt(). |
|
|
Definition at line 430 of file InstructionCombining.cpp. References llvm::IntegerType::getBitWidth(). |
|
|
GetSelectFoldableConstant - For the same transformation as the previous function, return the identity constant that goes into the select. Definition at line 8014 of file InstructionCombining.cpp. References llvm::Instruction::getOpcode(), and llvm::Value::getType(). Referenced by InstCombiner::visitSelectInst(). |
|
|
GetSelectFoldableOperands - We want to turn code that looks like this: C = or A, B D = select cond, C, A into: C = select cond, B, 0 D = or A, C Assuming that the specified instruction is an operand to the select, return a bitmask indicating which operands of this instruction are foldable if they equal the other incoming value of the select. Definition at line 7994 of file InstructionCombining.cpp. References llvm::Instruction::getOpcode(). Referenced by InstCombiner::visitSelectInst(). |
|
|
Read and decode a shufflevector mask. It turns undef elements into values that are larger than the number of elements in the input. Definition at line 10829 of file InstructionCombining.cpp. References llvm::User::const_op_iterator, llvm::VectorType::getNumElements(), llvm::User::getOperand(), llvm::ShuffleVectorInst::getType(), llvm::User::op_begin(), and llvm::User::op_end(). Referenced by FindScalarElement(), InstCombiner::visitExtractElementInst(), and InstCombiner::visitShuffleVectorInst(). |
|
|
GetUnderlyingObject - Trace through a series of getelementptrs and bitcasts until we find the underlying object a pointer is referring to or something we don't understand. Note that the returned pointer may be offset from the input, because we ignore GEP indices. Definition at line 10186 of file InstructionCombining.cpp. References llvm::ConstantExpr::getOpcode(), llvm::User::getOperand(), and llvm::Constant::getOperand(). Referenced by InstCombiner::visitLoadInst(). |
|
||||||||||||||||||||
|
Definition at line 9664 of file InstructionCombining.cpp. References llvm::Type::getPrimitiveSizeInBits(), llvm::Value::getType(), and InstCombiner::InsertCastBefore(). Referenced by InstCombiner::visitGetElementPtrInst(). |
|
||||||||||||||||
|
InstCombineLoadCast - Fold 'load (cast P)' -> cast (load P)' when possible.
Definition at line 10066 of file InstructionCombining.cpp. References llvm::GetConstantStringInfo(), llvm::SequentialType::getElementType(), llvm::Value::getName(), llvm::ArrayType::getNumElements(), llvm::Constant::getOperand(), llvm::User::getOperand(), llvm::Type::getPrimitiveSizeInBits(), InstCombiner::getTargetData(), llvm::Value::getType(), llvm::TargetData::getTypeSizeInBits(), InstCombiner::InsertNewInstBefore(), llvm::Type::isInteger(), llvm::TargetData::isLittleEndian(), llvm::LoadInst::isVolatile(), and InstCombiner::ReplaceInstUsesWith(). Referenced by InstCombiner::visitLoadInst(). |
|
||||||||||||
|
InstCombineStoreToCast - Fold store V, (cast P) -> store (cast V), P when possible. Definition at line 10345 of file InstructionCombining.cpp. References llvm::SequentialType::getElementType(), llvm::Value::getName(), llvm::ArrayType::getNumElements(), llvm::User::getOperand(), InstCombiner::getTargetData(), llvm::Value::getType(), llvm::TargetData::getTypeSizeInBits(), InstCombiner::InsertNewInstBefore(), and llvm::Type::isInteger(). Referenced by InstCombiner::visitStoreInst(). |
|
||||||||||||||||||||
|
This function is a wrapper around CastInst::isEliminableCastPair. It simply extracts arguments and returns what that function returns.
Definition at line 452 of file InstructionCombining.cpp. References llvm::TargetData::getIntPtrType(), llvm::CastInst::getOpcode(), llvm::User::getOperand(), and llvm::Value::getType(). Referenced by InstCombiner::commonCastTransforms(), foldConstantCastPair(), and ValueRequiresCast(). |
|
|
Definition at line 2985 of file InstructionCombining.cpp. References llvm::ConstantInt::getValue(), and llvm::APInt::isPowerOf2(). Referenced by InstCombiner::visitICmpInstWithInstAndIntCst(). |
|
|
|