[LLVMdev] JustRef

Nick Lewycky nicholas at mxc.ca
Wed Jan 28 21:37:48 PST 2015


Xin Tong wrote:
> what does JustRef mean in LLVM ? i fgrep over the source code and did
> not see any comment on it.

I haven't seen that before either, but judging from AliasAnalysisCounter.cpp

   switch (R) {
   case NoModRef: NoMR++;     MRString = "NoModRef"; break;
   case Ref:      JustRef++;  MRString = "JustRef"; break;
   case Mod:      JustMod++;  MRString = "JustMod"; break;
   case ModRef:   MR++;       MRString = "ModRef"; break;
   }

it looks like the JustRef is Ref and JustMod is Mod, probably with the 
additional "Just" (as in "only") intended to clarify that Ref means Ref 
without Mod and that Mod without Ref.

Nick

>
> bash-4.1$ opt -S -basicaa -count-aa -gvn  def.ll -o def.opt.ll
> JustRef:  Ptr: [18446744073709551615B] i32* %p <->  call void @hold(i32
> %sub)
> May alias:      [18446744073709551615B] i32* %q, [18446744073709551615B]
> i32* %p
> Must alias:     [18446744073709551615B] i32* %p, [18446744073709551615B]
> i32* %p
> May alias:      [18446744073709551615B] i32* %p, [18446744073709551615B]
> i32* %q
> JustRef:  Ptr: [18446744073709551615B] i32* %q <->  call void @hold(i32
> %sub)
> Must alias:     [18446744073709551615B] i32* %q, [18446744073709551615B]
> i32* %q
>
> Thanks,
> Trent
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list