diff --git a/lib/furnace/ssa/basic_block.rb b/lib/furnace/ssa/basic_block.rb
index <HASH>..<HASH> 100644
--- a/lib/furnace/ssa/basic_block.rb
+++ b/lib/furnace/ssa/basic_block.rb
@@ -52,7 +52,8 @@ module Furnace
       end
 
       @instructions.insert idx, instruction
-      @function.instrument { |i| i.add instruction }
+
+      instrument { |i| i.add instruction }
     end
 
     def replace(instruction, replace_with)
@@ -62,7 +63,8 @@ module Furnace
 
     def remove(instruction)
       @instructions.delete instruction
-      @function.instrument { |i| i.remove instruction }
+
+      instrument { |i| i.remove instruction }
     end
 
     def terminator
@@ -120,5 +122,11 @@ module Furnace
       p.keyword 'label'
       p.name    name
     end
+
+    protected
+
+    def instrument(&block)
+      @function.instrument(&block) if @function
+    end
   end
 end
Don't instrument removed basic blocks.