LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BasedUser Struct Reference

Collaboration diagram for BasedUser:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BasedUser (IVStrideUse &IVSU, ScalarEvolution *se)
void RewriteInstructionToUseNewBase (const SCEVHandle &NewBase, Instruction *InsertPt, SCEVExpander &Rewriter, Loop *L, Pass *P, SetVector< Instruction * > &DeadInsts)
ValueInsertCodeForBaseAtPosition (const SCEVHandle &NewBase, SCEVExpander &Rewriter, Instruction *IP, Loop *L)
void dump () const

Public Attributes

ScalarEvolutionSE
 SE - The current ScalarEvolution object.
SCEVHandle Base
InstructionInst
 Inst - The instruction using the induction variable.
ValueOperandValToReplace
SCEVHandle Imm
ValueEmittedBase
bool isUseOfPostIncrementedValue

Detailed Description

BasedUser - For a particular base value, keep information about how we've partitioned the expression so far.

Definition at line 512 of file LoopStrengthReduce.cpp.


Constructor & Destructor Documentation

BasedUser::BasedUser IVStrideUse IVSU,
ScalarEvolution se
[inline]
 

Definition at line 545 of file LoopStrengthReduce.cpp.


Member Function Documentation

void BasedUser::dump  )  const
 

Definition at line 566 of file LoopStrengthReduce.cpp.

Value * BasedUser::InsertCodeForBaseAtPosition const SCEVHandle NewBase,
SCEVExpander Rewriter,
Instruction IP,
Loop L
 

Definition at line 575 of file LoopStrengthReduce.cpp.

References Base, llvm::SCEVExpander::expandCodeFor(), llvm::ScalarEvolution::getAddExpr(), llvm::SCEVExpander::getInsertionPoint(), llvm::LoopInfo::getLoopFor(), llvm::SCEVExpander::getLoopInfo(), llvm::LoopBase< BlockT >::getLoopPreheader(), llvm::Instruction::getParent(), llvm::LoopBase< BlockT >::getParentLoop(), llvm::BasicBlock::getTerminator(), llvm::ScalarEvolution::getUnknown(), Imm, llvm::Loop, and SE.

Referenced by RewriteInstructionToUseNewBase().

void BasedUser::RewriteInstructionToUseNewBase const SCEVHandle NewBase,
Instruction InsertPt,
SCEVExpander Rewriter,
Loop L,
Pass P,
SetVector< Instruction * > &  DeadInsts
 

Definition at line 619 of file LoopStrengthReduce.cpp.

References llvm::SCEVExpander::clear(), llvm::LoopBase< BlockT >::contains(), DOUT, llvm::LoopBase< BlockT >::getHeader(), llvm::PHINode::getIncomingBlock(), llvm::PHINode::getIncomingValue(), llvm::PHINode::getNumIncomingValues(), llvm::TerminatorInst::getNumSuccessors(), llvm::Instruction::getParent(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), Imm, llvm::SetVector< T, Vector, Set >::insert(), InsertCodeForBaseAtPosition(), Inst, llvm::Loop, llvm::BasicBlock::moveBefore(), OperandValToReplace, llvm::User::replaceUsesOfWith(), llvm::PHINode::setIncomingValue(), and llvm::SplitCriticalEdge().


Member Data Documentation

SCEVHandle BasedUser::Base
 

Base - The Base value for the PHI node that needs to be inserted for this use. As the use is processed, information gets moved from this field to the Imm field (below). BasedUser values are sorted by this field.

Definition at line 520 of file LoopStrengthReduce.cpp.

Referenced by InsertCodeForBaseAtPosition().

Value* BasedUser::EmittedBase
 

EmittedBase - The actual value* to use for the base value of this operation. This is null if we should just use zero so far.

Definition at line 536 of file LoopStrengthReduce.cpp.

SCEVHandle BasedUser::Imm
 

Imm - The immediate value that should be added to the base immediately before Inst, because it will be folded into the imm field of the instruction.

Definition at line 532 of file LoopStrengthReduce.cpp.

Referenced by InsertCodeForBaseAtPosition(), and RewriteInstructionToUseNewBase().

Instruction* BasedUser::Inst
 

Inst - The instruction using the induction variable.

Definition at line 523 of file LoopStrengthReduce.cpp.

Referenced by RewriteInstructionToUseNewBase().

bool BasedUser::isUseOfPostIncrementedValue
 

Definition at line 543 of file LoopStrengthReduce.cpp.

Referenced by PartitionByIsUseOfPostIncrementedValue().

Value* BasedUser::OperandValToReplace
 

OperandValToReplace - The operand value of Inst to replace with the EmittedBase.

Definition at line 527 of file LoopStrengthReduce.cpp.

Referenced by RewriteInstructionToUseNewBase().

ScalarEvolution* BasedUser::SE
 

SE - The current ScalarEvolution object.

Definition at line 514 of file LoopStrengthReduce.cpp.

Referenced by InsertCodeForBaseAtPosition().


The documentation for this struct was generated from the following file:


This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.