Deleted Added
full compact
PHITransAddr.h (208954) PHITransAddr.h (234353)
1//===- PHITransAddr.h - PHI Translation for Addresses -----------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 6 unchanged lines hidden (view full) ---

15#define LLVM_ANALYSIS_PHITRANSADDR_H
16
17#include "llvm/Instruction.h"
18#include "llvm/ADT/SmallVector.h"
19
20namespace llvm {
21 class DominatorTree;
22 class TargetData;
1//===- PHITransAddr.h - PHI Translation for Addresses -----------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 6 unchanged lines hidden (view full) ---

15#define LLVM_ANALYSIS_PHITRANSADDR_H
16
17#include "llvm/Instruction.h"
18#include "llvm/ADT/SmallVector.h"
19
20namespace llvm {
21 class DominatorTree;
22 class TargetData;
23
23 class TargetLibraryInfo;
24
24/// PHITransAddr - An address value which tracks and handles phi translation.
25/// As we walk "up" the CFG through predecessors, we need to ensure that the
26/// address we're tracking is kept up to date. For example, if we're analyzing
27/// an address of "&A[i]" and walk through the definition of 'i' which is a PHI
28/// node, we *must* phi translate i to get "&A[j]" or else we will analyze an
29/// incorrect pointer in the predecessor block.
30///
31/// This is designed to be a relatively small object that lives on the stack and
32/// is copyable.
33///
34class PHITransAddr {
35 /// Addr - The actual address we're analyzing.
36 Value *Addr;
37
38 /// TD - The target data we are playing with if known, otherwise null.
39 const TargetData *TD;
25/// PHITransAddr - An address value which tracks and handles phi translation.
26/// As we walk "up" the CFG through predecessors, we need to ensure that the
27/// address we're tracking is kept up to date. For example, if we're analyzing
28/// an address of "&A[i]" and walk through the definition of 'i' which is a PHI
29/// node, we *must* phi translate i to get "&A[j]" or else we will analyze an
30/// incorrect pointer in the predecessor block.
31///
32/// This is designed to be a relatively small object that lives on the stack and
33/// is copyable.
34///
35class PHITransAddr {
36 /// Addr - The actual address we're analyzing.
37 Value *Addr;
38
39 /// TD - The target data we are playing with if known, otherwise null.
40 const TargetData *TD;
41
42 /// TLI - The target library info if known, otherwise null.
43 const TargetLibraryInfo *TLI;
40
41 /// InstInputs - The inputs for our symbolic address.
42 SmallVector<Instruction*, 4> InstInputs;
43public:
44
45 /// InstInputs - The inputs for our symbolic address.
46 SmallVector<Instruction*, 4> InstInputs;
47public:
44 PHITransAddr(Value *addr, const TargetData *td) : Addr(addr), TD(td) {
48 PHITransAddr(Value *addr, const TargetData *td) : Addr(addr), TD(td), TLI(0) {
45 // If the address is an instruction, the whole thing is considered an input.
46 if (Instruction *I = dyn_cast<Instruction>(Addr))
47 InstInputs.push_back(I);
48 }
49
50 Value *getAddr() const { return Addr; }
51
52 /// NeedsPHITranslationFromBlock - Return true if moving from the specified

--- 65 unchanged lines hidden ---
49 // If the address is an instruction, the whole thing is considered an input.
50 if (Instruction *I = dyn_cast<Instruction>(Addr))
51 InstInputs.push_back(I);
52 }
53
54 Value *getAddr() const { return Addr; }
55
56 /// NeedsPHITranslationFromBlock - Return true if moving from the specified

--- 65 unchanged lines hidden ---