Deleted Added
full compact
LazyValueInfo.h (208954) LazyValueInfo.h (212904)
1//===- LazyValueInfo.h - Value constraint analysis --------------*- 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//===----------------------------------------------------------------------===//
9//
10// This file defines the interface for lazy computation of value constraint
11// information.
12//
13//===----------------------------------------------------------------------===//
14
1//===- LazyValueInfo.h - Value constraint analysis --------------*- 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//===----------------------------------------------------------------------===//
9//
10// This file defines the interface for lazy computation of value constraint
11// information.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_ANALYSIS_LIVEVALUES_H
16#define LLVM_ANALYSIS_LIVEVALUES_H
15#ifndef LLVM_ANALYSIS_LAZYVALUEINFO_H
16#define LLVM_ANALYSIS_LAZYVALUEINFO_H
17
18#include "llvm/Pass.h"
19
20namespace llvm {
21 class Constant;
22 class TargetData;
23 class Value;
24
25/// LazyValueInfo - This pass computes, caches, and vends lazy value constraint
26/// information.
27class LazyValueInfo : public FunctionPass {
28 class TargetData *TD;
29 void *PImpl;
30 LazyValueInfo(const LazyValueInfo&); // DO NOT IMPLEMENT.
31 void operator=(const LazyValueInfo&); // DO NOT IMPLEMENT.
32public:
33 static char ID;
17
18#include "llvm/Pass.h"
19
20namespace llvm {
21 class Constant;
22 class TargetData;
23 class Value;
24
25/// LazyValueInfo - This pass computes, caches, and vends lazy value constraint
26/// information.
27class LazyValueInfo : public FunctionPass {
28 class TargetData *TD;
29 void *PImpl;
30 LazyValueInfo(const LazyValueInfo&); // DO NOT IMPLEMENT.
31 void operator=(const LazyValueInfo&); // DO NOT IMPLEMENT.
32public:
33 static char ID;
34 LazyValueInfo() : FunctionPass(&ID), PImpl(0) {}
34 LazyValueInfo() : FunctionPass(ID), PImpl(0) {}
35 ~LazyValueInfo() { assert(PImpl == 0 && "releaseMemory not called"); }
36
37 /// Tristate - This is used to return true/false/dunno results.
38 enum Tristate {
39 Unknown = -1, False = 0, True = 1
40 };
41
42

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

52 /// getConstant - Determine whether the specified value is known to be a
53 /// constant at the end of the specified block. Return null if not.
54 Constant *getConstant(Value *V, BasicBlock *BB);
55
56 /// getConstantOnEdge - Determine whether the specified value is known to be a
57 /// constant on the specified edge. Return null if not.
58 Constant *getConstantOnEdge(Value *V, BasicBlock *FromBB, BasicBlock *ToBB);
59
35 ~LazyValueInfo() { assert(PImpl == 0 && "releaseMemory not called"); }
36
37 /// Tristate - This is used to return true/false/dunno results.
38 enum Tristate {
39 Unknown = -1, False = 0, True = 1
40 };
41
42

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

52 /// getConstant - Determine whether the specified value is known to be a
53 /// constant at the end of the specified block. Return null if not.
54 Constant *getConstant(Value *V, BasicBlock *BB);
55
56 /// getConstantOnEdge - Determine whether the specified value is known to be a
57 /// constant on the specified edge. Return null if not.
58 Constant *getConstantOnEdge(Value *V, BasicBlock *FromBB, BasicBlock *ToBB);
59
60 /// threadEdge - Inform the analysis cache that we have threaded an edge from
61 /// PredBB to OldSucc to be from PredBB to NewSucc instead.
62 void threadEdge(BasicBlock *PredBB, BasicBlock *OldSucc, BasicBlock *NewSucc);
60
63
64 /// eraseBlock - Inform the analysis cache that we have erased a block.
65 void eraseBlock(BasicBlock *BB);
66
61 // Implementation boilerplate.
62
63 virtual void getAnalysisUsage(AnalysisUsage &AU) const {
64 AU.setPreservesAll();
65 }
66 virtual void releaseMemory();
67 virtual bool runOnFunction(Function &F);
68};
69
70} // end namespace llvm
71
72#endif
73
67 // Implementation boilerplate.
68
69 virtual void getAnalysisUsage(AnalysisUsage &AU) const {
70 AU.setPreservesAll();
71 }
72 virtual void releaseMemory();
73 virtual bool runOnFunction(Function &F);
74};
75
76} // end namespace llvm
77
78#endif
79