llvm.org GIT mirror llvm / eb8eaa8
Sync-up SROA notes git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@170521 91177308-0d34-0410-b5e6-96231b3b80d8 Pawel Wodnicki 7 years ago
1 changed file(s) with 14 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all


SROA - We've re-written SROA to be significantly more powerful.

582 <!-- FIXME: Add more text here... -->

581 <p>SROA - We’ve re-written SROA to be significantly more powerful and generate
582 code which is much more friendly to the rest of the optimization pipeline.
583 Previously this pass had scaling problems that required it to only operate on
584 relatively small aggregates, and at times it would mistakenly replace a large
585 aggregate with a single very large integer in order to make it a scalar SSA
586 value. The result was a large number of i1024 and i2048 values representing any
587 small stack buffer. These in turn slowed down many subsequent optimization
588 paths.


The new SROA pass uses a different algorithm that allows it to only promote to

590 scalars the pieces of the aggregate actively in use. Because of this it doesn’t
591 require any thresholds. It also always deduces the scalar values from the uses
592 of the aggregate rather than the specific LLVM type of the aggregate. These
593 features combine to both optimize more code with the pass but to improve the
594 compile time of many functions dramatically.

  • Branch weight metadata is preseved through more of the optimizer.
  • 586
  • ...
  • 587598