diff options
author | Dan Gohman <gohman@apple.com> | 2008-09-30 18:30:35 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-09-30 18:30:35 +0000 |
commit | 86aa16a69ad1e3ad0b484ec27b3c70e4f9ee5c90 (patch) | |
tree | d8d513f3d7ba5b5e6221015fbeb59f26cee1dbe1 /llvm/lib/Transforms/IPO/AddReadAttrs.cpp | |
parent | 985f69ab26a00b51c6d3e923029ff6c7ad25217a (diff) | |
download | bcm5719-llvm-86aa16a69ad1e3ad0b484ec27b3c70e4f9ee5c90.tar.gz bcm5719-llvm-86aa16a69ad1e3ad0b484ec27b3c70e4f9ee5c90.zip |
Optimize SelectionDAG's AssignTopologicalOrder even further.
Completely eliminate the TopOrder std::vector. Instead, sort
the AllNodes list in place. This also eliminates the need to
call AllNodes.size(), a linear-time operation, before
performing the sort.
Also, eliminate the Sources temporary std::vector, since it
essentially duplicates the sorted result as it is being
built.
This also changes the direction of the topological sort
from bottom-up to top-down. The AllNodes list starts out in
roughly top-down order, so this reduces the amount of
reordering needed. Top-down is also more convenient for
Legalize, and ISel needed only minor adjustments.
llvm-svn: 56867
Diffstat (limited to 'llvm/lib/Transforms/IPO/AddReadAttrs.cpp')
0 files changed, 0 insertions, 0 deletions