[𝘀𝗽𝗿] initial version

Created using spr 1.3.4
diff --git a/bolt/include/bolt/Core/BinaryFunction.h b/bolt/include/bolt/Core/BinaryFunction.h
index 24c7db2..2c8e239 100644
--- a/bolt/include/bolt/Core/BinaryFunction.h
+++ b/bolt/include/bolt/Core/BinaryFunction.h
@@ -242,6 +242,9 @@
   /// Original size of the function.
   uint64_t Size;
 
+  /// Original instruction count of the function, if disassembly succeeded.
+  uint64_t InputInstructionCount{0};
+
   /// Address of the function in output.
   uint64_t OutputAddress{0};
 
@@ -2173,6 +2176,9 @@
   /// Get the number of instructions within this function.
   uint64_t getInstructionCount() const;
 
+  /// Get the original number of instructions.
+  uint64_t getInputInstructionCount() const { return InputInstructionCount; }
+
   const CFIInstrMapType &getFDEProgram() const { return FrameInstructions; }
 
   void moveRememberRestorePair(BinaryBasicBlock *BB);
diff --git a/bolt/lib/Core/BinaryFunction.cpp b/bolt/lib/Core/BinaryFunction.cpp
index ea09371..1f5869c 100644
--- a/bolt/lib/Core/BinaryFunction.cpp
+++ b/bolt/lib/Core/BinaryFunction.cpp
@@ -1499,6 +1499,8 @@
 
   clearList(Relocations);
 
+  InputInstructionCount = Instructions.size();
+
   if (!IsSimple) {
     clearList(Instructions);
     return createNonFatalBOLTError("");