[PATCH] D36233: [ThinLTO] Add FunctionAttrs to ThinLTO index
Charles Saternos via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 3 09:03:36 PDT 2017
ncharlie added inline comments.
================
Comment at: test/Bitcode/thinlto-function-summary-functionattrs.ll:4
+
+; CHECK: <GLOBALVAL_SUMMARY_BLOCK
+; ensure @f is marked readnone
----------------
tejohnson wrote:
> ncharlie wrote:
> > tejohnson wrote:
> > > Can you add a check for noalias as well?
> > Sure - is there some trick to force a function to be marked as noalias?
> >
> > I can't find any examples of noalias functions in any of the tests and this doesn't seem to work:
> > ```
> > define noalias i32* @i() {
> > %d = alloca i32;
> > ret i32* %d;
> > }
> > ```
> I see a few in the tests, here are some samples:
> test/Transforms/SimplifyCFG/2011-03-08-UnreachableUse.ll:define noalias i8* @func_29() nounwind {
> test/Transforms/GVN/malloc-load-removal.ll:define noalias i8* @test1() nounwind uwtable ssp {
> test/Transforms/NewGVN/malloc-load-removal.ll:define noalias i8* @test1() nounwind uwtable ssp {
> test/Transforms/LoopIdiom/basic.ll:define noalias i32* @test17(i32* nocapture readonly %a, i32 %c) {
> test/Transforms/DeadStoreElimination/simple.ll:define noalias i8* @test23() nounwind uwtable ssp {
> test/Transforms/FunctionAttrs/nonnull.ll:; CHECK: define noalias nonnull i8* @test4_helper
>
> In what way does it not work when you try it for your small example?
>
The functions (even with the noalias keyword) don't have the NoAlias flag set on them in my example or in the tests.
https://reviews.llvm.org/D36233
More information about the llvm-commits
mailing list