[PATCH] D48225: [llvm-mca][X86] Teach how to identify register writes that implicitly clear the upper portion of a super-register.

Matt Davis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 15 11:02:27 PDT 2018


mattd added inline comments.


================
Comment at: lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp:307
+public:
+  X86MCInstrAnalysis(const MCInstrInfo *MCII) : MCInstrAnalysis(MCII) {}
+
----------------
andreadb wrote:
> mattd wrote:
> > Since you have a static routine for creating instances of this class: `createX86MCInstrAnalysis`, you can probably make this ctor private.  It can probably be marked `explicit`, to imply no converting.
> Unless I am missing something, the `createX86MCInstrAnalysis` static routine would not be able to see the constructor if we make it private.
You are correct, `createX86MCInstrAnalysis` would have to be a static method of `X86MCInstrAnalysis` to make private the create* routine.   I see that none of the other create* routines in here are presented that way, so it probably doesn't make much sense to change this one.  Please ignore my original comment.


https://reviews.llvm.org/D48225





More information about the llvm-commits mailing list