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

Method getValue

ir/pointer.cpp:268–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268expr Pointer::getValue(const char *name, const FunctionExpr &local_fn,
269 const FunctionExpr &nonlocal_fn,
270 const expr &ret_type, bool src_name) const {
271 if (!p.isValid())
272 return {};
273
274 auto bid = getShortBid();
275 expr non_local;
276
277 if (auto val = nonlocal_fn.lookup(bid))
278 non_local = *val;
279 else {
280 non_local = expr::mkUF(src_name ? local_name(m.state, name).c_str() : name,
281 { bid }, ret_type);
282 }
283
284 if (auto local = local_fn(bid))
285 return expr::mkIf(isLocal(), *local, non_local);
286 return non_local;
287}
288
289expr Pointer::getBlockBaseAddress(bool simplify) const {
290 assert(Memory::observesAddresses());

Callers 6

checkMethod · 0.45
off_used_bitsFunction · 0.45
isNoOpFunction · 0.45
cmd_args_def.hFile · 0.45
visitMemSetInstMethod · 0.45
get_operandFunction · 0.45

Calls 3

local_nameFunction · 0.70
isValidMethod · 0.45
lookupMethod · 0.45

Tested by

no test coverage detected