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

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 16:53:28 PDT 2017


davide added inline comments.


================
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'.
----------------
george.burgess.iv wrote:
> Nit: Would "These are the utilities/helpers [...]" be better here?
Yes, I suck at writing proper english.


================
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));
----------------
george.burgess.iv wrote:
> 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.
Indeed. I also dislike a lot templating explicitly when there's no need. Let me try that.


https://reviews.llvm.org/D34638





More information about the llvm-commits mailing list