[PATCH] D34638: [CFLAA] Change FunctionHandle to be common to Steensgaard's and Andersens'

George Burgess IV via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 14:22:29 PDT 2017


george.burgess.iv accepted this revision.
george.burgess.iv added a comment.
This revision is now accepted and ready to land.

LGTM with two nits. Thanks!



================
Comment at: include/llvm/Analysis/CFLAliasAnalysisUtils.h:10
+// \file
+// This is the utilities/helpers used by the CFL Alias Analyses available in
+// tree, i.e. Steensgaard's and Andersens'.
----------------
Nit: Would "These are the utilities/helpers [...]" be better here?


================
Comment at: lib/Analysis/CFLAndersAliasAnalysis.cpp:792
   Cache[&Fn] = std::move(FunInfo);
-  Handles.push_front(FunctionHandle(const_cast<Function *>(&Fn), this));
+  Handles.push_front(
+      FunctionHandle<CFLAndersAAResult>(const_cast<Function *>(&Fn), this));
----------------
Nit: While we're in the area, can this and the other `push_front` we're touching use `emplace_front(const_cast<Function *>(&Fn), this)` instead? That would let us skip moving this, which seems to involve nontrivial operations.


https://reviews.llvm.org/D34638





More information about the llvm-commits mailing list