Adjust various reaching-def move/reference semantics

Nothing that important, just changing things to what is hypothetically
more efficient in general.
This commit is contained in:
Jon Siwek 2021-02-01 22:00:56 -08:00
parent 1f7580db65
commit 36f27a0d01
6 changed files with 27 additions and 29 deletions

View file

@ -39,7 +39,7 @@ public:
ReachingDefs();
// Create a new object, using the RDs from another object.
ReachingDefs(RDPtr& rd);
ReachingDefs(RDPtr rd);
~ReachingDefs();
@ -208,9 +208,9 @@ public:
RDPtr& FindRDs(const Obj* o) const;
// Associates the given RDs with the given AST node.
void SetRDs(const Obj* o, RDPtr& rd)
void SetRDs(const Obj* o, RDPtr rd)
{
auto new_rd = make_intrusive<ReachingDefs>(rd);
auto new_rd = make_intrusive<ReachingDefs>(std::move(rd));
(*a_i)[o] = new_rd;
}