[PATCH] D39925: [MC] Expose hasDefOfPhysReg(..) in the public MCInstrDesc interface.

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 14:51:30 PST 2017


hctim created this revision.

Exposes `hasDefOfPhysReg(..)` to the public interface of `MCInstrDesc`. This only has one callee currently in `MCInstrDesc::mayAffectControlFlow`.

I'd like this to be public in order to use it in https://reviews.llvm.org/D39820 instead of implementing an identical function.


https://reviews.llvm.org/D39925

Files:
  include/llvm/MC/MCInstrDesc.h


Index: include/llvm/MC/MCInstrDesc.h
===================================================================
--- include/llvm/MC/MCInstrDesc.h
+++ include/llvm/MC/MCInstrDesc.h
@@ -173,7 +173,7 @@
   const MCPhysReg *ImplicitDefs; // Registers implicitly defined by this instr
   const MCOperandInfo *OpInfo;   // 'NumOperands' entries about operands
   // Subtarget feature that this is deprecated on, if any
-  // -1 implies this is not deprecated by any single feature. It may still be 
+  // -1 implies this is not deprecated by any single feature. It may still be
   // deprecated due to a "complex" reason, below.
   int64_t DeprecatedFeature;
 
@@ -580,8 +580,6 @@
     return -1;
   }
 
-private:
-
   /// \brief Return true if this instruction defines the specified physical
   /// register, either explicitly or implicitly.
   bool hasDefOfPhysReg(const MCInst &MI, unsigned Reg,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39925.122538.patch
Type: text/x-patch
Size: 886 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171110/032975fb/attachment.bin>


More information about the llvm-commits mailing list