[llvm-dev] Get Num of Uses in only dominated blocks?
Daniel Berlin via llvm-dev
llvm-dev at lists.llvm.org
Thu Jan 19 22:28:03 PST 2017
LLVM is in SSA, which means that by definition, any uses are dominated by
So getNumUses does, in fact, give you the answer of "what is the number of
uses that are dominated by this definition".
Unless i'm missing what you are really after?
On Thu, Jan 19, 2017 at 9:29 PM, Tianyu Cheng via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi all,
> I am doing a project that requires counting the number of uses of a value
> only in all dominated blocks in a function. I checked the manual for
> class, but only get this
> unsigned <http://llvm.org/test-doxygen/api/classunsigned.html> getNumUses
> <http://llvm.org/test-doxygen/api/classllvm_1_1Value.html#a380559e99b47632a34f74de7c1d03cc0> ()
> This gives me all the uses of a value.
> Is there any simple way, like an API to do this?
> Or I have to manually write a method to traverse dominated basic blocks
> and count
> the number of uses?
> Tianyu Cheng
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev