[PATCH] D64184: [NewPM] Port MachineCopyPropagation to the new pass manager.
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 08:54:42 PDT 2019
probinson added a comment.
Minor drive-by stylistic points. Someone who knows what's going on with passes should look at this.
================
Comment at: llvm/include/llvm/CodeGen/MachineCopyPropagation.h:1
+//===- MachineCopyPropagation.h - Machine Copy Propagation Pass ---------===//
+//
----------------
This line needs the 'C++' tag, see any other .h file for an example.
================
Comment at: llvm/lib/CodeGen/CodeGen.cpp:62
initializeMachineDominatorTreePass(Registry);
+ initializeMachineCopyPropagationLegacyPassPass(Registry);
initializeMachineFunctionPrinterPassPass(Registry);
----------------
This wants to stay in alphabetical order.
================
Comment at: llvm/lib/CodeGen/MachineCopyPropagation.cpp:634
-bool MachineCopyPropagation::runOnMachineFunction(MachineFunction &MF) {
- if (skipFunction(MF.getFunction()))
- return false;
+MachineCopyPropagation copyPropagate(MachineFunction &MF) {
+ MachineCopyPropagation info{MF.getSubtarget().getRegisterInfo(),
----------------
Did you mean for this to be a static function?
================
Comment at: llvm/lib/Passes/PassRegistry.def:315
#undef LOOP_PASS_WITH_PARAMS
+#ifndef MACHINE_FUNCTION_PASS
+#define MACHINE_FUNCTION_PASS(NAME, CREATE_PASS)
----------------
Based on the style in this file, there wants to be a blank line before the '#ifndef'.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64184/new/
https://reviews.llvm.org/D64184
More information about the llvm-commits
mailing list