MCPcopy Create free account
hub / github.com/Samsung/UTopia / isAssignable

Method isAssignable

lib/rootdefanalysis/RDTarget.cpp:373–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371RDRegister::RDRegister(llvm::Value &IR) : RDTarget(MemoryType_REG, IR) {}
372
373bool RDRegister::isAssignable() const {
374
375 assert(IR && "Unexpected Program State");
376 if (auto *CB = dyn_cast<CallBase>(IR)) {
377 auto *F = CB->getCalledFunction();
378 if (!F)
379 return false;
380 if (F->isDeclaration() && F->arg_size() == 0)
381 return false;
382 }
383
384 return true;
385}
386
387void RDRegister::dump() const { llvm::outs() << "[Register] " << *IR << "\n"; }
388

Callers 1

isRootDefinitionMethod · 0.80

Calls 1

getCalledFunctionMethod · 0.80

Tested by

no test coverage detected