This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Autoincrement examples


> - Your code will take huge amounts of compile time for large functions,
>   since you process each register individually, and ref_find_ref_between
>   can cause a nested traversal of parts of a basic block - making the
>   total complexity something like O(3).
>   I think my scheme has O(1) in general (there could be pathologic cases

Oops, that should be O(N^3) / O(N^1) , respectively.
And on thecond thought, your code is more likely to be O(N^2), since
instructions tend to have a limited number of registers they reference,
so that the ref_find_ref_between calls can only be up to a constant multiple
of the number of insn.  They will probably be insignificant compared to
the effort of scanning every insn for as many times as there are pseudo
registers.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]