summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/EarlyIfConversion.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add more debug output to MachineTraceMetrics.Jakob Stoklund Olesen2012-07-271-1/+5
| | | | llvm-svn: 160905
* Start scaffolding for a MachineTraceMetrics analysis pass.Jakob Stoklund Olesen2012-07-261-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | This is still a work in progress. Out-of-order CPUs usually execute instructions from multiple basic blocks simultaneously, so it is necessary to look at longer traces when estimating the performance effects of code transformations. The MachineTraceMetrics analysis will pick a typical trace through a given basic block and provide performance metrics for the trace. Metrics will include: - Instruction count through the trace. - Issue count per functional unit. - Critical path length, and per-instruction 'slack'. These metrics can be used to determine the performance limiting factor when executing the trace, and how it will be affected by a code transformation. Initially, this will be used by the early if-conversion pass. llvm-svn: 160796
* Require and preserve LoopInfo for early if-conversion.Jakob Stoklund Olesen2012-07-101-0/+17
| | | | | | It will surely be needed by heuristics. llvm-svn: 160027
* Run early if-conversion in domtree post-order.Jakob Stoklund Olesen2012-07-101-49/+60
| | | | | | | | | | | This ordering allows nested if-conversion without using a work list, and it makes it possible to update the dominator tree on the fly as well. Any erased basic blocks will always be dominated by the current post-order position, so the domtree can be pruned without invalidating the iterator. llvm-svn: 160025
* Add some comments suggested in code review.Jakob Stoklund Olesen2012-07-061-0/+7
| | | | llvm-svn: 159800
* Fix some ascii art in a comment to not have trailing backslashes (inspirationMatt Beaumont-Gay2012-07-041-5/+5
| | | | | | | from IfConversion.cc), and fix some spelling and grammar in the surrounding prose. llvm-svn: 159699
* Add an experimental early if-conversion pass, off by default.Jakob Stoklund Olesen2012-07-041-0/+583
This pass performs if-conversion on SSA form machine code by speculatively executing both sides of the branch and using a cmov instruction to select the result. This can help lower the number of branch mispredictions on architectures like x86 that don't have predicable instructions. The current implementation is very aggressive, and causes regressions on mosts tests. It needs good heuristics that have yet to be implemented. llvm-svn: 159694
OpenPOWER on IntegriCloud