LLVM API Documentation
#include "llvm/Transforms/Utils/AddrModeMatcher.h"#include "llvm/DerivedTypes.h"#include "llvm/GlobalValue.h"#include "llvm/Instruction.h"#include "llvm/Assembly/Writer.h"#include "llvm/Target/TargetData.h"#include "llvm/Support/GetElementPtrTypeIterator.h"#include "llvm/Support/PatternMatch.h"#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Functions | |
| static bool | MightBeFoldableInst (Instruction *I) |
| static bool | IsOperandAMemoryOperand (CallInst *CI, InlineAsm *IA, Value *OpVal, const TargetLowering &TLI) |
| static bool | FindAllMemoryUses (Instruction *I, SmallVectorImpl< std::pair< Instruction *, unsigned > > &MemoryUses, SmallPtrSet< Instruction *, 16 > &ConsideredInsts, const TargetLowering &TLI) |
| static bool FindAllMemoryUses | ( | Instruction * | I, | |
| SmallVectorImpl< std::pair< Instruction *, unsigned > > & | MemoryUses, | |||
| SmallPtrSet< Instruction *, 16 > & | ConsideredInsts, | |||
| const TargetLowering & | TLI | |||
| ) | [static] |
FindAllMemoryUses - Recursively walk all the uses of I until we find a memory use. If we find an obviously non-foldable instruction, return true. Add the ultimately found memory instructions to MemoryUses.
Definition at line 421 of file AddrModeMatcher.cpp.
References llvm::dyn_cast(), E, llvm::SmallPtrSet< PtrType, SmallSize >::insert(), IsOperandAMemoryOperand(), LI, MightBeFoldableInst(), llvm::Value::use_begin(), and llvm::Value::use_end().
| static bool IsOperandAMemoryOperand | ( | CallInst * | CI, | |
| InlineAsm * | IA, | |||
| Value * | OpVal, | |||
| const TargetLowering & | TLI | |||
| ) | [static] |
IsOperandAMemoryOperand - Check to see if all uses of OpVal by the specified inline asm call are due to memory operands. If so, return true, otherwise return false.
Definition at line 379 of file AddrModeMatcher.cpp.
References llvm::TargetLowering::C_Memory, llvm::TargetLowering::AsmOperandInfo::CallOperandVal, llvm::TargetLowering::ComputeConstraintToUse(), Constraints, llvm::TargetLowering::AsmOperandInfo::ConstraintType, llvm::User::getOperand(), llvm::InlineAsm::isClobber, llvm::InlineAsm::ConstraintInfo::isIndirect, llvm::InlineAsm::isInput, llvm::InlineAsm::isOutput, llvm::InlineAsm::ParseConstraints(), and llvm::InlineAsm::ConstraintInfo::Type.
Referenced by FindAllMemoryUses().
| static bool MightBeFoldableInst | ( | Instruction * | I | ) | [static] |
MightBeFoldableInst - This is a little filter, which returns true if an addressing computation involving I might be folded into a load/store accessing it. This doesn't need to be perfect, but needs to accept at least the set of instructions that MatchOperationAddr can.
Definition at line 121 of file AddrModeMatcher.cpp.
References BitCast, llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), and PtrToInt.
Referenced by FindAllMemoryUses().