Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
Public Member Functions |List of all members
llvm::PHITransAddr Class Reference

PHITransAddr - An address value which tracks and handles phi translation.More...

#include "llvm/Analysis/PHITransAddr.h"

Public Member Functions

 PHITransAddr (Value *Addr,constDataLayout &DL,AssumptionCache *AC)
 
ValuegetAddr ()const
 
bool needsPHITranslationFromBlock (BasicBlock *BB)const
 needsPHITranslationFromBlock - Return true if moving from the specifiedBasicBlock to its predecessors requires PHI translation.
 
bool isPotentiallyPHITranslatable ()const
 isPotentiallyPHITranslatable - If this needs PHI translation, return true if we have some hope of doing it.
 
ValuetranslateValue (BasicBlock *CurBB,BasicBlock *PredBB,constDominatorTree *DT,bool MustDominate)
 translateValue - PHI translate the current address up the CFG from CurBB to Pred, updating our state to reflect any needed changes.
 
ValuetranslateWithInsertion (BasicBlock *CurBB,BasicBlock *PredBB,constDominatorTree &DT,SmallVectorImpl<Instruction * > &NewInsts)
 translateWithInsertion - PHI translate this value into the specified predecessor block, inserting a computation of the value if it is unavailable.
 
void dump ()const
 
bool verify ()const
 verify -Check internal consistency of this data structure.
 

Detailed Description

PHITransAddr - An address value which tracks and handles phi translation.

As we walk "up" the CFG through predecessors, we need to ensure that the address we're tracking is kept up to date. For example, if we're analyzing an address of "&A[i]" and walk through the definition of 'i' which is a PHI node, wemust phi translate i to get "&A[j]" or else we will analyze an incorrect pointer in the predecessor block.

This is designed to be a relatively small object that lives on the stack and is copyable.

Definition at line35 of filePHITransAddr.h.

Constructor & Destructor Documentation

◆ PHITransAddr()

llvm::PHITransAddr::PHITransAddr(ValueAddr,
constDataLayoutDL,
AssumptionCacheAC 
)
inline

Definition at line52 of filePHITransAddr.h.

ReferencesAddr, andDL.

Member Function Documentation

◆ dump()

LLVM_DUMP_METHOD void PHITransAddr::dump() const

Definition at line41 of filePHITransAddr.cpp.

Referencesllvm::dbgs().

◆ getAddr()

Value * llvm::PHITransAddr::getAddr() const
inline

Definition at line58 of filePHITransAddr.h.

ReferencesAddr.

Referenced bymemoryIsNotModifiedBetween().

◆ isPotentiallyPHITranslatable()

bool PHITransAddr::isPotentiallyPHITranslatable() const

isPotentiallyPHITranslatable - If this needs PHI translation, return true if we have some hope of doing it.

This should be used as a filter to avoid calling PHITranslateValue in hopeless situations.

Definition at line104 of filePHITransAddr.cpp.

ReferencescanPHITrans().

Referenced bymemoryIsNotModifiedBetween().

◆ needsPHITranslationFromBlock()

bool llvm::PHITransAddr::needsPHITranslationFromBlock(BasicBlockBB) const
inline

needsPHITranslationFromBlock - Return true if moving from the specifiedBasicBlock to its predecessors requires PHI translation.

Definition at line62 of filePHITransAddr.h.

Referencesllvm::any_of().

Referenced bymemoryIsNotModifiedBetween().

◆ translateValue()

Value * PHITransAddr::translateValue(BasicBlockCurBB,
BasicBlockPredBB,
constDominatorTreeDT,
bool MustDominate 
)

translateValue - PHI translate the current address up the CFG from CurBB to Pred, updating our state to reflect any needed changes.

PHITranslateValue - PHI translate the current address up the CFG from CurBB to Pred, updating our state to reflect any needed changes.

If 'MustDominate' is true, the translated value must dominate PredBB.

Definition at line299 of filePHITransAddr.cpp.

Referencesassert(),llvm::DominatorTree::dominates(),llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(),llvm::DominatorTree::isReachableFromEntry(), andverify().

Referenced bymemoryIsNotModifiedBetween().

◆ translateWithInsertion()

Value * PHITransAddr::translateWithInsertion(BasicBlockCurBB,
BasicBlockPredBB,
constDominatorTreeDT,
SmallVectorImpl<Instruction * > & NewInsts 
)

translateWithInsertion - PHI translate this value into the specified predecessor block, inserting a computation of the value if it is unavailable.

PHITranslateWithInsertion - PHI translate this value into the specified predecessor block, inserting a computation of the value if it is unavailable.

All newly created instructions are added to the NewInsts list. This returns null on failure.

Definition at line327 of filePHITransAddr.cpp.

Referencesllvm::SmallVectorImpl< T >::pop_back_val(), andllvm::SmallVectorBase< Size_T >::size().

◆ verify()

bool PHITransAddr::verify() const

verify -Check internal consistency of this data structure.

If the structure is valid, it returns true. If invalid, it prints errors and returns false.

Definition at line82 of filePHITransAddr.cpp.

Referencesllvm::SmallVectorBase< Size_T >::empty(),llvm::errs(),llvm_unreachable, andverifySubExpr().

Referenced bytranslateValue().


The documentation for this class was generated from the following files:

Generated on Sun Jul 20 2025 19:35:01 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp