llir-opt
0.0.1
Low-Level Post-Link Optimiser for OCaml and C
|
7 #include "core/inst_visitor.h"
47 return frame_.
Set(inst_, SymbolicValue::Undefined(GetOrigin()));
53 return frame_.
Set(inst_, SymbolicValue::Scalar(GetOrigin()));
59 return frame_.
Set(inst_, SymbolicValue::Integer(i, GetOrigin()));
65 return frame_.
Set(inst_, SymbolicValue::Float(i, GetOrigin()));
71 return frame_.
Set(inst_, SymbolicValue::LowerBoundedInteger(i, GetOrigin()));
75 bool SetMask(
const APInt &k,
const APInt &v)
77 return frame_.
Set(inst_, SymbolicValue::Mask(k, v, GetOrigin()));
89 return frame_.
Set(inst_, SymbolicValue::Pointer(ptr, GetOrigin()));
95 return frame_.
Set(inst_, SymbolicValue::Nullable(ptr, GetOrigin()));
101 return frame_.
Set(inst_, value);
105 bool VisitInst(
Inst &i)
override;
106 bool VisitBarrierInst(BarrierInst &i)
override;
107 bool VisitMemoryLoadInst(MemoryLoadInst &i)
override;
108 bool VisitMemoryStoreInst(MemoryStoreInst &i)
override;
109 bool VisitMemoryExchangeInst(MemoryExchangeInst &i)
override;
110 bool VisitMemoryCompareExchangeInst(MemoryCompareExchangeInst &i)
override;
111 bool VisitVaStartInst(VaStartInst &i)
override;
112 bool VisitArgInst(ArgInst &i)
override;
113 bool VisitMovInst(
MovInst &i)
override;
114 bool VisitBitCastInst(BitCastInst &i)
override;
115 bool VisitUndefInst(UndefInst &i)
override;
116 bool VisitFrameInst(FrameInst &i)
override;
117 bool VisitTruncInst(TruncInst &i)
override;
118 bool VisitZExtInst(ZExtInst &i)
override;
119 bool VisitSExtInst(SExtInst &i)
override;
121 bool VisitSllInst(SllInst &i)
override;
122 bool VisitSrlInst(SrlInst &i)
override;
123 bool VisitSraInst(SraInst &i)
override;
125 bool VisitAndInst(AndInst &i)
override;
126 bool VisitOrInst(OrInst &i)
override;
127 bool VisitXorInst(XorInst &i)
override;
129 bool VisitAddInst(AddInst &i)
override;
130 bool VisitSubInst(SubInst &i)
override;
131 bool VisitUDivInst(UDivInst &i)
override;
132 bool VisitSDivInst(SDivInst &i)
override;
133 bool VisitURemInst(URemInst &i)
override;
134 bool VisitMulInst(MulInst &i)
override;
136 bool VisitCmpInst(CmpInst &i)
override;
138 bool VisitSelectInst(SelectInst &i)
override;
139 bool VisitOUMulInst(OUMulInst &i)
override;
140 bool VisitOUAddInst(OUAddInst &i)
override;
142 bool VisitGetInst(GetInst &i)
override;
144 bool VisitX86_OutInst(X86_OutInst &i)
override;
145 bool VisitX86_LgdtInst(X86_LgdtInst &i)
override;
146 bool VisitX86_LidtInst(X86_LidtInst &i)
override;
147 bool VisitX86_LtrInst(X86_LtrInst &i)
override;
148 bool VisitX86_WrMsrInst(X86_WrMsrInst &i)
override;
149 bool VisitX86_RdTscInst(X86_RdTscInst &i)
override;
Definition: reference_graph.h:32
Definition: symbolic_context.h:28
Definition: symbolic_value.h:24
bool SetUndefined()
Helper to return a scalar.
Definition: symbolic_eval.h:45
bool SetScalar()
Helper to return a scalar.
Definition: symbolic_eval.h:51
Definition: symbolic_eval.h:19
std::pair< ID< SymbolicFrame >, Ref< Inst > > Origin
Instruction which originated the value.
Definition: symbolic_value.h:49
const SymbolicValue & Find(ConstRef< Inst > inst)
Find a value.
Definition: symbolic_eval.h:42
bool SetInteger(const APInt &i)
Helper to return an integer.
Definition: symbolic_eval.h:57
bool SetNullable(const SymbolicPointer::Ref &ptr)
Helper to forward a pointer (nullptr).
Definition: symbolic_eval.h:93
bool SetPointer(const SymbolicPointer::Ref &ptr)
Helper to forward a pointer (pointer).
Definition: symbolic_eval.h:87
const SymbolicValue & Find(ConstRef< Inst > inst)
Return the value an instruction was mapped to.
Definition: symbolic_frame.cpp:86
APInt Value
Values of the known bits.
Definition: symbolic_value.h:209
bool SetMask(const APInt &k, const APInt &v)
Forward to frameuator, return a pointer.
Definition: symbolic_eval.h:75
bool Set(Ref< Inst > i, const SymbolicValue &value)
Definition: symbolic_frame.cpp:68
Definition: inst_visitor.h:15
bool SetLowerBounded(const APInt &i)
Helper to return a lower bounded integer.
Definition: symbolic_eval.h:69
Definition: symbolic_frame.h:29
bool NOP(const SymbolicValue &value)
Helper to set a value.
Definition: symbolic_eval.h:99
bool SetValue(const SymbolicPointer::Ref &ptr)
Helper to forward a pointer (value).
Definition: symbolic_eval.h:81
bool SetFloat(const APFloat &i)
Helper to return a float.
Definition: symbolic_eval.h:63
SymbolicContext & GetContext()
Return the context.
Definition: symbolic_eval.h:39
Definition: symbolic_heap.h:21