[LLVMdev] MachineRegisterInfo use_iterator/reg_iterator?

Yang, Cheng-Chih Cheng-Chih.Yang at amd.com
Thu Sep 25 09:14:14 PDT 2014


Hi folks,

I would like to find out the machine instructions that use some given registers in the reverse order, and I came across these iterators (use_iterator/reg_iterator). However, there are two things I noticed:

1) These iterators seem to traverse the machine function a bit differently from what I get from the machine function dump. In other words, the use_iterator list is not constructed in the same order as the machine function? Maybe from the order that DAG is constructed?

2) Is there a way to go backward with these two iterators? For example, from use_end() to use_begin() with some decrement operator?

I was wondering if 1) and 2) are true or just there's something I missed.

Thanks!
Cheng-Chih
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140925/ded4eed5/attachment.html>


More information about the llvm-dev mailing list