[llvm-dev] Get Num of Uses in only dominated blocks?

Tianyu Cheng via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 19 21:29:38 PST 2017


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
llvm::User
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>
()
const
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?

Thanks,
Tianyu Cheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170119/698381e1/attachment.html>


More information about the llvm-dev mailing list