History log of /external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
b86a0cdb674549d8493043331cecd9cbf53b80da 15-Jun-2013 Andrew Trick <atrick@apple.com> Machine Model: Add MicroOpBufferSize and resource BufferSize.

Replace the ill-defined MinLatency and ILPWindow properties with
with straightforward buffer sizes:
MCSchedMode::MicroOpBufferSize
MCProcResourceDesc::BufferSize

These can be used to more precisely model instruction execution if desired.

Disabled some misched tests temporarily. They'll be reenabled in a few commits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
3aa5394e5bbf267824e9d789ec8b1c27b85a8671 27-Apr-2013 Andrew Trick <atrick@apple.com> Generalize the MachineTraceMetrics public API.

Naturally, we should be able to pass in extra instructions, not just
extra blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
2ccdbc6675fd5bafb6da65dfca850b6e2587f9f3 03-Apr-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Allow MachineTraceMetrics to be used when the model has no resources.

It it still possible to extract information from itineraries, for
example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178582 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
8396e130427999c57422e52af3913eb8182847e5 02-Apr-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Count processor resources individually in MachineTraceMetrics.

The new instruction scheduling models provide information about the
number of cycles consumed on each processor resource. This makes it
possible to estimate ILP more accurately than simply counting
instructions / issue width.

The functions getResourceDepth() and getResourceLength() now identify
the limiting processor resource, and return a cycle count based on that.

This gives more precise resource information, particularly in traces
that use one resource a lot more than others.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
6ffcd5efe15156e2a71bd1a33f5f8e27de894ea3 08-Mar-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Rename isEarlierInSameTrace to isUsefulDominator.

In very rare cases caused by irreducible control flow, the dominating
block can have the same trace head without actually being part of the
trace.

As long as such a dominator still has valid instruction depths, it is OK
to use it for computing instruction depths.

Rename the function to avoid lying, and add a check that instruction
depths are computed for the dominator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
5ed625c3cff2511469e9b3c5131c29fd89ddd482 17-Jan-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Move MachineTraceMetrics.h into include/llvm/CodeGen.

Let targets use it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
ebba49395c189364c9ef77fb4c432856330ceca1 11-Oct-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Pass an explicit operand number to addLiveIns.

Not all instructions define a virtual register in their first operand.
Specifically, INLINEASM has a different format.

<rdar://problem/12472811>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
6be75ae196e0138048f685d4df7128d24245be5e 09-Oct-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Don't crash on extra evil irreducible control flow.

When the CFG contains a loop with multiple entry blocks, the traces
computed by MachineTraceMetrics don't always have the same nice
properties. Loop back-edges are normally excluded from traces, but
MachineLoopInfo doesn't recognize loops with multiple entry blocks, so
those back-edges may be included.

Avoid asserting when that happens by adding an isEarlierInSameTrace()
function that accurately determines if a dominating block is part of the
same trace AND is above the currrent block in the trace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
f43fe1d163b34e1de5d045773728c571b59d1cdd 04-Oct-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Switch MachineTraceMetrics to the new TargetSchedModel interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
a35bf506f41f4231dc649f3af5255e0b1087b2e3 11-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Give MachineTraceMetrics its own debug tag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
5413b68b1f59041a821287790dbc1ee2e272cf4e 11-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Add more trace query functions.

Trace::getResourceLength() computes the number of cycles required to
execute the trace when ignoring data dependencies. The number can be
compared to the critical path to estimate the trace ILP.

Trace::getPHIDepth() computes the data dependency depth of a PHI in a
trace successor that isn't necessarily part of the trace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
8828c4ccd44cb49d13360cf86fd0b963f211f03f 10-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Include loop-carried dependencies when computing instr heights.

When a trace ends with a back-edge, include PHIs in the loop header in
the height computations. This makes the critical path through a loop
more accurate by including the latencies of the last instructions in the
loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
e723007ee6911c77bedaa2e914961e86b0b4ce61 09-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Deal with irreducible control flow when building traces.

We filter out MachineLoop back-edges during the trace-building PO
traversals, but it is possible to have CFG cycles that aren't natural
loops, and MachineLoopInfo doesn't include such cycles.

Use a standard visited set to detect such CFG cycles, and completely
ignore them when picking traces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
7a8f311ece7108e44ded601237091c23ef7782eb 07-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Fix a couple of typos.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
84ef6ba44394f983d985b02e328cbb2dd779e4b0 07-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Add trace accessor methods, implement primitive if-conversion heuristic.

Compare the critical paths of the two traces through an if-conversion
candidate. If the difference is larger than the branch brediction
penalty, reject the if-conversion. If would never pay.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
79a20ce6f0d6c1041a5031aca41b50a1e58b1d4b 02-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Compute the critical path length through a trace.

Whenever both instruction depths and instruction heights are known in a
block, it is possible to compute the length of the critical path as
max(depth+height) over the instructions in the block.

The stored live-in lists make it possible to accurately compute the
length of a critical path that bypasses the current (small) block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161197 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
c7f44b8b8fca87cdd28ffe420c3b87141d88c099 02-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Compute instruction heights through a trace.

The height on an instruction is the minimum number of cycles from the
instruction is issued to the end of the trace. Heights are computed for
all instructions in and below the trace center block.

The method for computing heights is different from the depth
computation. As we visit instructions in the trace bottom-up, heights of
used instructions are pushed upwards. This way, we avoid scanning long
use lists, looking for uses in the current trace.

At each basic block boundary, a list of live-in registers and their
minimum heights is saved in the trace block info. These live-in lists
are used when restarting depth computations on a trace that
converges with an already computed trace. They will also be used to
accurately compute the critical path length.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
9dae457e2b9a9919c3f7d48b229035d2b956a2d4 01-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Add DataDep constructors. Explicitly check SSA form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
5f8e8bd656bb174b3e22c0e56ce3d1eb958ac2e2 31-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Compute instruction depths through the current trace.

Assuming infinite issue width, compute the earliest each instruction in
the trace can issue, when considering the latency of data dependencies.
The issue cycle is record as a 'depth' from the beginning of the trace.

This is half the computation required to find the length of the critical
path through the trace. Heights are next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
64e2973bf78970aedecbb5fda44e19f93f56dd9b 31-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Rename CT -> MTM. MachineTraceMetrics is abbreviated MTM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
2f6b62b09f07d63b7f3ee2de50735dd8c83c0f0f 31-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Avoid looking at stale data in verifyAnalysis().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
1c899cf47c13a107cf0f85ae69fcd36c92b37f14 31-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Allow traces to enter nested loops.

This lets traces include the final iteration of a nested loop above the
center block, and the first iteration of a nested loop below the center
block.

We still don't allow traces to contain backedges, and traces are
truncated where they would leave a loop, as seen from the center block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161003 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
8e54ab5c7618bf3813c337ad181a741f30eb36cc 30-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Assert that all trace candidate blocks have been visited by the PO.

When computing a trace, all the candidates for pred/succ must have been
visited. Filter out back-edges first, though. The PO traversal ignores
them.

Thanks to Andy for spotting this in review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
ef6c76c984f821ea866902a7f9e695b16e971468 30-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Hook into PassManager's analysis verification.

By overriding Pass::verifyAnalysis(), the pass contents will be verified
by the pass manager.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
3f63a589788995a724bc4587d022fe15ea8576ba 30-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Add MachineInstr::isTransient().

This is a cleaned up version of the isFree() function in
MachineTraceMetrics.cpp.

Transient instructions are very unlikely to produce any code in the
final output. Either because they get eliminated by RegisterCoalescing,
or because they are pseudo-instructions like labels and debug values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
a1b2bf79796d8c44b1321a69a7236b85c33ef7ca 30-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Add MachineTraceMetrics::verify().

This function verifies the consistency of cached data in the
MachineTraceMetrics analysis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
ee31ae12e8a7b843e97285b321cb1f485cd77248 30-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Verify that the CFG hasn't changed during invalidate().

The MachineTraceMetrics analysis must be invalidated before modifying
the CFG. This will catch some of the violations of that rule.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
08f6ef6a7807250d84446661b7a6ec4afa762099 28-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Add more debug output to MachineTraceMetrics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
0271a5fa29f73150fad891ca4c43a0a89a64b3bf 28-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Keep track of the head and tail of the trace through each block.

This makes it possible to quickly detect blocks that are outside the
trace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
0fc44869ffb5c180ec12f86f2fd02a35a1affb4a 26-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Use an otherwise unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp
9f63e104271eb91e545fa8cdb16fb9e10a8a9578 26-Jul-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Start scaffolding for a MachineTraceMetrics analysis pass.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/MachineTraceMetrics.cpp