[PATCH] D31304: [MetaRenamer] Don't rename library functions.

bryant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 13:59:26 PDT 2017


bryant added a comment.

In https://reviews.llvm.org/D31304#709218, @davide wrote:

> You want to do this for all the external functions, maybe?


Not sure that I understand. Externs are preserved with this patch. In the test case that I've added, for instance,

  20:58:29 ~/3rd/llvm/test> opt -S -metarenamer Transforms/MetaRenamer/metarenamer.ll | tail -n 13
  declare noalias i8* @malloc(i32)   <================
  
  declare void @free(i8* nocapture)  <===============
  
  define void @zot() {
  bb:
    %tmp = call i8* @malloc(i32 23)
    call void @free(i8* %tmp)
    ret void
  }
  
  attributes #0 = { nounwind ssp uwtable }
  attributes #1 = { argmemonly nounwind }

Am I missing your meaning?


Repository:
  rL LLVM

https://reviews.llvm.org/D31304





More information about the llvm-commits mailing list