[ThinLTO] Add FunctionAttrs to ThinLTO index
Adds function attributes to index: ReadNone, ReadOnly, NoRecurse, NoAlias. This attributes will be used for future ThinLTO optimizations that will propagate function attributes across modules. llvm-svn: 310061
This commit is contained in:
@@ -38,24 +38,24 @@
|
||||
; CHECK: <GLOBALVAL_SUMMARY_BLOCK
|
||||
; Function main contains call to func, as well as address reference to func:
|
||||
; op0=main op4=func op5=func
|
||||
; CHECK-DAG: <PERMODULE {{.*}} op0=11 op1=0 {{.*}} op3=1 op4=2 op5=2/>
|
||||
; CHECK-DAG: <PERMODULE {{.*}} op0=11 op1=0 {{.*}} op4=1 op5=2 op6=2/>
|
||||
; Function W contains a call to func3 as well as a reference to globalvar:
|
||||
; op0=W op4=globalvar op5=func3
|
||||
; CHECK-DAG: <PERMODULE {{.*}} op0=6 op1=5 {{.*}} op3=1 op4=1 op5=5/>
|
||||
; CHECK-DAG: <PERMODULE {{.*}} op0=6 op1=5 {{.*}} op4=1 op5=1 op6=5/>
|
||||
; Function X contains call to foo, as well as address reference to foo
|
||||
; which is in the same instruction as the call:
|
||||
; op0=X op4=foo op5=foo
|
||||
; CHECK-DAG: <PERMODULE {{.*}} op0=7 op1=1 {{.*}} op3=1 op4=4 op5=4/>
|
||||
; CHECK-DAG: <PERMODULE {{.*}} op0=7 op1=1 {{.*}} op4=1 op5=4 op6=4/>
|
||||
; Function Y contains call to func2, and ensures we don't incorrectly add
|
||||
; a reference to it when reached while earlier analyzing the phi using its
|
||||
; return value:
|
||||
; op0=Y op4=func2
|
||||
; CHECK-DAG: <PERMODULE {{.*}} op0=8 op1=8 {{.*}} op3=0 op4=3/>
|
||||
; CHECK-DAG: <PERMODULE {{.*}} op0=8 op1=8 {{.*}} op4=0 op5=3/>
|
||||
; Function Z contains call to func2, and ensures we don't incorrectly add
|
||||
; a reference to it when reached while analyzing subsequent use of its return
|
||||
; value:
|
||||
; op0=Z op4=func2
|
||||
; CHECK-DAG: <PERMODULE {{.*}} op0=9 op1=3 {{.*}} op3=0 op4=3/>
|
||||
; CHECK-DAG: <PERMODULE {{.*}} op0=9 op1=3 {{.*}} op4=0 op5=3/>
|
||||
; Variable bar initialization contains address reference to func:
|
||||
; op0=bar op2=func
|
||||
; CHECK-DAG: <PERMODULE_GLOBALVAR_INIT_REFS {{.*}} op0=0 op1=0 op2=2/>
|
||||
|
||||
Reference in New Issue
Block a user