[PATCH] D81716: Extend InlineFeatureAnalysis to more extract generic code features

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 13 09:06:29 PDT 2020


jdoerfert added reviewers: uenoku, ggeorgakoudis, mtrofin.
jdoerfert added a subscriber: mtrofin.
jdoerfert added a comment.

@mtrofin We want to "rename" `InlineFeatureAnalysis` to a more generic name and extend it. This patch does the former, basically, and adds a printer pass. Extensions will follow soon. Is that generally OK with you?

@tarinduj I left some comments. We also need to replace the old `InlineFeaturesAnalsysis` with the `CodeFeature` one everywhere, assuming @mtrofin doesn't have any concerns. Generally we minimize duplication ;)



================
Comment at: llvm/include/llvm/Analysis/ML/CodeFeaturesAnalysis.h:1
+#ifndef LLVM_CODEFEATURESANALYSIS_H_
+#define LLVM_CODEFEATURESANALYSIS_H_
----------------
Please use the same file comment style we have elsewhere.


================
Comment at: llvm/lib/Analysis/ML/CodeFeaturesAnalysis.cpp:1
+#include "llvm/Analysis/ML/CodeFeaturesAnalysis.h"
+#include "llvm/IR/Instructions.h"
----------------
File comment missing too.


================
Comment at: llvm/lib/Analysis/ML/CodeFeaturesAnalysis.cpp:49
+  return PreservedAnalyses::all();
+}
----------------
We need a lit test for the printer.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81716/new/

https://reviews.llvm.org/D81716





More information about the llvm-commits mailing list