diff --git a/src/parsers/end.c b/src/parsers/end.c
index 6355334c3df9a3baed50c7b7c693ab14b447dc53..e8e1896fda2f728e9dc3208b326b4e9539276836 100644
--- a/src/parsers/end.c
+++ b/src/parsers/end.c
@@ -31,6 +31,29 @@ static bool end_ctrvm(HRVMProg *prog, void *env) {
 static bool end_llvm(HLLVMParserCompileContext *ctxt, 
                      HParser *p,
                      LLVMValueRef *res) {
+  /* Allocator */
+  HAllocator *mm__ = NULL;
+  /* Names */
+  char *end_entry_name = NULL;
+  int end_entry_name_len = 0;
+  char *end_success_name = NULL;
+  int end_success_name_len = 0;
+  char *end_end_name = NULL;
+  int end_end_name_len = 0;
+  char *end_index_name = NULL;
+  int end_index_name_len = 0;
+  char *end_index_ptr_name = NULL;
+  int end_index_ptr_name_len = 0;
+  char *end_length_name = NULL;
+  int end_length_name_len = 0;
+  char *end_length_ptr_name = NULL;
+  int end_length_ptr_name_len = 0;
+  char *end_icmp_name = NULL;
+  int end_icmp_name_len = 0;
+  char *end_result_ptr_name = NULL;
+  int end_result_ptr_name_len = 0;
+  char *end_rv_name = NULL;
+  int end_rv_name_len = 0;
   /* Basic blocks for parsing end */
   LLVMBasicBlockRef entry, success, end;
   /* Indices for GEP */
@@ -50,11 +73,22 @@ static bool end_llvm(HLLVMParserCompileContext *ctxt,
   if (!p) return false;
   if (!ctxt) return false;
 
+  /* Unpack allocator */
+  mm__ = ctxt->mm__;
+
   /* Set up some basic blocks */
-  /* TODO distinct names for different HParsers? */
-  entry = LLVMAppendBasicBlock(ctxt->func, "end_entry");
-  success = LLVMAppendBasicBlock(ctxt->func, "end_success");
-  end = LLVMAppendBasicBlock(ctxt->func, "end_end");
+  end_entry_name_len = snprintf(NULL, 0, "end_entry_%p", p);
+  end_entry_name = h_new(char, end_entry_name_len + 1);
+  snprintf(end_entry_name, end_entry_name_len + 1, "end_entry_%p", p);
+  entry = LLVMAppendBasicBlock(ctxt->func, end_entry_name);
+  end_success_name_len = snprintf(NULL, 0, "end_success_%p", p);
+  end_success_name = h_new(char, end_success_name_len + 1);
+  snprintf(end_success_name, end_success_name_len + 1, "end_success_%p", p);
+  success = LLVMAppendBasicBlock(ctxt->func, end_success_name);
+  end_end_name_len = snprintf(NULL, 0, "end_end_%p", p);
+  end_end_name = h_new(char, end_end_name_len + 1);
+  snprintf(end_end_name, end_end_name_len + 1, "end_end_%p", p);
+  end = LLVMAppendBasicBlock(ctxt->func, end_end_name);
 
   /* Basic block: entry */
   LLVMBuildBr(ctxt->builder, entry);
@@ -71,34 +105,56 @@ static bool end_llvm(HLLVMParserCompileContext *ctxt,
   /* The index field (see HInputStream in internal.h */
   gep_indices[1] = LLVMConstInt(LLVMInt32Type(), 2, 0);
   /* GEP */
+  end_index_ptr_name_len = snprintf(NULL, 0, "end_index_ptr_%p", p);
+  end_index_ptr_name = h_new(char, end_index_ptr_name_len + 1);
+  snprintf(end_index_ptr_name, end_index_ptr_name_len + 1,
+           "end_index_ptr_%p", p);
   LLVMValueRef index_ptr = LLVMBuildGEP(ctxt->builder,
-      ctxt->stream, gep_indices, 2, "index_ptr");
+      ctxt->stream, gep_indices, 2, end_index_ptr_name);
 
   /* The length field (see HInputStream in internal.h */
   gep_indices[1] = LLVMConstInt(LLVMInt32Type(), 3, 0);
   /* GEP */
+  end_length_ptr_name_len = snprintf(NULL, 0, "end_length_ptr_%p", p);
+  end_length_ptr_name = h_new(char, end_length_ptr_name_len + 1);
+  snprintf(end_length_ptr_name, end_length_ptr_name_len + 1,
+           "end_length_ptr_%p", p);
   LLVMValueRef length_ptr = LLVMBuildGEP(ctxt->builder,
-      ctxt->stream, gep_indices, 2, "length_ptr");
+      ctxt->stream, gep_indices, 2, end_length_ptr_name);
 
   /* Now load them */
+  end_index_name_len = snprintf(NULL, 0, "end_index_%p", p);
+  end_index_name = h_new(char, end_index_name_len + 1);
+  snprintf(end_index_name, end_index_name_len + 1, "end_index_%p", p);
   LLVMValueRef index = LLVMBuildLoad(ctxt->builder,
-      index_ptr, "index");
+      index_ptr, end_index_name);
+  end_length_name_len = snprintf(NULL, 0, "end_length_%p", p);
+  end_length_name = h_new(char, end_length_name_len + 1);
+  snprintf(end_length_name, end_length_name_len + 1, "end_length_%p", p);
   LLVMValueRef length = LLVMBuildLoad(ctxt->builder,
-      length_ptr, "length");
+      length_ptr, end_length_name);
 
   /* Compare */
-  LLVMValueRef icmp = LLVMBuildICmp(ctxt->builder, LLVMIntEQ, index, length, "index == length");
+  end_icmp_name_len = snprintf(NULL, 0, "end_icmp_%p", p);
+  end_icmp_name = h_new(char, end_icmp_name_len + 1);
+  snprintf(end_icmp_name, end_icmp_name_len + 1, "end_icmp_%p", p);
+  LLVMValueRef icmp =
+    LLVMBuildICmp(ctxt->builder, LLVMIntEQ, index, length, end_icmp_name);
   /* Branch on comparison */
   LLVMBuildCondBr(ctxt->builder, icmp, success, end);
 
   /* Basic block: success */
   LLVMPositionBuilderAtEnd(ctxt->builder, success);
   /* Set up a call to h_arena_malloc() to get an HParseResult */
+  end_result_ptr_name_len = snprintf(NULL, 0, "end_result_ptr_%p", p);
+  end_result_ptr_name = h_new(char, end_result_ptr_name_len + 1);
+  snprintf(end_result_ptr_name, end_result_ptr_name_len + 1,
+           "end_result_ptr_%p", p);
   make_result_args[0] = ctxt->arena;
   make_result_args[1] = LLVMConstNull(ctxt->llvm_parsedtokenptr);
   result_ptr = LLVMBuildCall(ctxt->builder,
       LLVMGetNamedFunction(ctxt->mod, "make_result"),
-      make_result_args, 2, "result_ptr");
+      make_result_args, 2, end_result_ptr_name);
 
   /* Branch to end */
   LLVMBuildBr(ctxt->builder, end);
@@ -106,15 +162,71 @@ static bool end_llvm(HLLVMParserCompileContext *ctxt,
   /* Basic block: end */
   LLVMPositionBuilderAtEnd(ctxt->builder, end);
   /* Set up a phi depending on whether we have a token or not */
-  rv = LLVMBuildPhi(ctxt->builder, ctxt->llvm_parseresultptr, "rv");
+  end_rv_name_len = snprintf(NULL, 0, "end_rv_%p", p);
+  end_rv_name = h_new(char, end_rv_name_len + 1);
+  snprintf(end_rv_name, end_rv_name_len + 1, "end_rv_%p", p);
+  rv = LLVMBuildPhi(ctxt->builder, ctxt->llvm_parseresultptr, end_rv_name);
   rv_phi_incoming_blocks[0] = success;
   rv_phi_incoming_values[0] = result_ptr;
   rv_phi_incoming_blocks[1] = entry;
   rv_phi_incoming_values[1] = LLVMConstNull(ctxt->llvm_parseresultptr);
   LLVMAddIncoming(rv, rv_phi_incoming_values, rv_phi_incoming_blocks, 2);
+
   /* Pass it back out to the caller */
   *res = rv;
 
+  /* Free names */
+
+  if (end_entry_name) {
+    h_free(end_entry_name);
+    end_entry_name = NULL;
+  }
+
+  if (end_success_name) {
+    h_free(end_entry_name);
+    end_entry_name = NULL;
+  }
+
+  if (end_end_name) {
+    h_free(end_entry_name);
+    end_entry_name = NULL;
+  }
+
+  if (end_index_name) {
+    h_free(end_index_name);
+    end_index_name = NULL;
+  }
+
+  if (end_index_ptr_name) {
+    h_free(end_index_ptr_name);
+    end_index_ptr_name = NULL;
+  }
+
+  if (end_length_name) {
+    h_free(end_length_name);
+    end_length_name = NULL;
+  }
+
+  if (end_length_ptr_name) {
+    h_free(end_length_ptr_name);
+    end_length_ptr_name = NULL;
+  }
+
+  if (end_icmp_name) {
+    h_free(end_icmp_name);
+    end_icmp_name = NULL;
+  }
+
+  if (end_result_ptr_name) {
+    h_free(end_result_ptr_name);
+    end_result_ptr_name = NULL;
+  }
+
+  if (end_rv_name) {
+    h_free(end_rv_name);
+    end_rv_name = NULL;
+  }
+
   return true;
 }
 
diff --git a/src/parsers/epsilon.c b/src/parsers/epsilon.c
index b9021d6c46848def867edd8dd23c9055239c8352..26d97cc5965ffb36bbb8bcc682862c1258195749 100644
--- a/src/parsers/epsilon.c
+++ b/src/parsers/epsilon.c
@@ -24,6 +24,13 @@ static bool epsilon_ctrvm(HRVMProg *prog, void* env) {
 static bool epsilon_llvm(HLLVMParserCompileContext *ctxt,
                          HParser *p,
                          LLVMValueRef *res) {
+  /* Allocator */
+  HAllocator *mm__ = NULL;
+  /* Names */
+  char *eps_bb_name = NULL;
+  int eps_bb_name_len = 0;
+  char *eps_result_ptr_name = NULL;
+  int eps_result_ptr_name_len = 0;
   /* Epsilon basic block */
   LLVMBasicBlockRef epsilon_bb;
   /* Args for make_result() */
@@ -35,7 +42,14 @@ static bool epsilon_llvm(HLLVMParserCompileContext *ctxt,
   if (!p) return false;
   if (!ctxt) return false;
 
-  epsilon_bb = LLVMAppendBasicBlock(ctxt->func, "epsilon");
+  /* Unpack allocator */
+  mm__ = ctxt->mm__;
+
+  /* Set up the basic block */
+  eps_bb_name_len = snprintf(NULL, 0, "epsilon_%p", p);
+  eps_bb_name = h_new(char, eps_bb_name_len + 1);
+  snprintf(eps_bb_name, eps_bb_name_len + 1, "epsilon_%p", p);
+  epsilon_bb = LLVMAppendBasicBlock(ctxt->func, eps_bb_name);
 
   /* Basic block: epsilon */
   LLVMBuildBr(ctxt->builder, epsilon_bb);
@@ -45,14 +59,29 @@ static bool epsilon_llvm(HLLVMParserCompileContext *ctxt,
    * For epsilon we make a null-token parse result like with end, but we
    * do it unconditionally.
    */
+  eps_result_ptr_name_len = snprintf(NULL, 0, "epsilon_result_ptr_%p", p);
+  eps_result_ptr_name = h_new(char, eps_result_ptr_name_len + 1);
+  snprintf(eps_result_ptr_name, eps_result_ptr_name_len + 1,
+           "epsilon_result_ptr_%p", p);
   make_result_args[0] = ctxt->arena;
   make_result_args[1] = LLVMConstNull(ctxt->llvm_parsedtokenptr);
   result_ptr = LLVMBuildCall(ctxt->builder,
     LLVMGetNamedFunction(ctxt->mod, "make_result"),
-    make_result_args, 2, "result_ptr");
+    make_result_args, 2, eps_result_ptr_name);
+
   /* Pass it back out */
   *res = result_ptr;
 
+  if (eps_bb_name) {
+    h_free(eps_bb_name);
+    eps_bb_name = NULL;
+  }
+
+  if (eps_result_ptr_name) {
+    h_free(eps_result_ptr_name);
+    eps_result_ptr_name = NULL;
+  }
+
   return true;
 }
 
diff --git a/src/parsers/nothing.c b/src/parsers/nothing.c
index f5e427b1cfd8bf3cba9f63d0e247b276609c869b..fa5faf557d28335053f9b2bc7c5053ab134d5bd7 100644
--- a/src/parsers/nothing.c
+++ b/src/parsers/nothing.c
@@ -30,6 +30,11 @@ static bool nothing_ctrvm(HRVMProg *prog, void* env) {
 static bool nothing_llvm(HLLVMParserCompileContext *ctxt,
                          HParser *p,
                          LLVMValueRef *res) {
+  /* Allocator */
+  HAllocator *mm__;
+  /* Names */
+  char *nothing_entry_bb_name = NULL;
+  int nothing_entry_bb_name_len = 0;
   /* Nothing entry bb */
   LLVMBasicBlockRef entry;
   /* Nothing result */
@@ -39,14 +44,27 @@ static bool nothing_llvm(HLLVMParserCompileContext *ctxt,
   if (!p) return false;
   if (!ctxt) return false;
 
+  /* Unpack allocator */
+  mm__ = ctxt->mm__;
+
   /* This one just always returns NULL */
-  entry = LLVMAppendBasicBlock(ctxt->func, "nothing_entry");
+  nothing_entry_bb_name_len = snprintf(NULL, 0, "nothing_entry_%p", p);
+  nothing_entry_bb_name = h_new(char, nothing_entry_bb_name_len + 1);
+  snprintf(nothing_entry_bb_name, nothing_entry_bb_name_len + 1,
+           "nothing_entry_%p", p);
+  entry = LLVMAppendBasicBlock(ctxt->func, nothing_entry_bb_name);
   LLVMBuildBr(ctxt->builder, entry);
   LLVMPositionBuilderAtEnd(ctxt->builder, entry);
   rv = LLVMConstNull(ctxt->llvm_parseresultptr);
+
   /* Pass it back out */
   *res = rv;
 
+  if (nothing_entry_bb_name) {
+    h_free(nothing_entry_bb_name);
+    nothing_entry_bb_name = NULL;
+  }
+
   return true;
 }