MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / getVal

Method getVal

tools/quick-fuzz.cpp:192–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190 }
191
192 Value *getVal(Type *Ty) {
193 int num_vals = Vals.size();
194 int idx = C.choose(1 + num_vals);
195 if (idx == num_vals) {
196 return randomInt(Ty);
197 } else {
198 auto *v = Vals[idx];
199 if (v->getType()->isPointerTy())
200 v = new LoadInst(getArgTy(v), v, "", false, BB);
201 return adapt(v, Ty);
202 }
203 }
204
205 // TODO generate vector instructions
206 Value *genInst() {

Callers 2

goMethod · 0.80
toSMTMethod · 0.80

Calls 2

chooseMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected