History log of /external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6948897e478cbd66626159776a8017b3c18579b9 01-Jul-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master LLVM for rebase to r239765

Bug: 20140355: This rebase pulls the upstream fix for the spurious
warnings mentioned in the bug.

Change-Id: I7fd24253c50f4d48d900875dcf43ce3f1721a3da
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
ebe69fe11e48d322045d5949c83283927a0d790b 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r230699.

Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
37ed9c199ca639565f6ce88105f9e39e898d82d0 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master LLVM for rebase to r222494.

Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

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

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
8e3cb3ee0c6dd582f4ee78135cef2f33f6893395 24-Mar-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Allow types to be omitted in output patterns.

This syntax is now preferred:

def : Pat<(subc i32:$b, i32:$c), (SUBCCrr $b, $c)>;

There is no reason to repeat the types in the output pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
f0a804df493e28e75cfc4ca930c53199b8d1e985 23-Mar-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Allow direct value types in pattern definitions.

Just like register classes, value types can be used in two ways in
patterns:

(sext_inreg i32:$src, i16)

In a named leaf node like i32:$src, the value type simply provides the
type of the node directly. This simplifies type inference a lot compared
to the current practice of specifiying types indirectly with register
classes.

As an unnamed leaf node, like i16 above, the value type represents
itself as an MVT::Other immediate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
ec8d1a5b72b1cb2d230ba52b25a017231393b182 19-Mar-2013 Ulrich Weigand <ulrich.weigand@de.ibm.com> Extend TableGen instruction selection matcher to improve handling
of complex instruction operands (e.g. address modes).

Currently, if a Pat pattern creates an instruction that has a complex
operand (i.e. one that consists of multiple sub-operands at the MI
level), this operand must match a ComplexPattern DAG pattern with the
correct number of output operands.

This commit extends TableGen to alternatively allow match a complex
operands against multiple separate operands at the DAG level.

This allows using Pat patterns to match pre-increment nodes like
pre_store (which must have separate operands at the DAG level) onto
an instruction pattern that uses a multi-operand memory operand,
like the following example on PowerPC (will be committed as a
follow-on patch):

def STWU : DForm_1<37, (outs ptr_rc:$ea_res), (ins GPRC:$rS, memri:$dst),
"stwu $rS, $dst", LdStStoreUpd, []>,
RegConstraint<"$dst.reg = $ea_res">, NoEncode<"$ea_res">;

def : Pat<(pre_store GPRC:$rS, ptr_rc:$ptrreg, iaddroff:$ptroff),
(STWU GPRC:$rS, iaddroff:$ptroff, ptr_rc:$ptrreg)>;

Here, the pair of "ptroff" and "ptrreg" operands is matched onto the
complex operand "dst" of class "memri" in the "STWU" instruction.

Approved by Jakob Stoklund Olesen.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
4ffd89fa4d2788611187d1a534d2ed46adf1702c 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort the #include lines for utils/...

I've tried to find main moudle headers where possible, but the TableGen
stuff may warrant someone else looking at it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
61131ab15fd593a2e295d79fe2714e7bc21f2ec8 25-Oct-2012 Joerg Sonnenberger <joerg@bec.de> Remove exception handling usage from tblgen.

Most places can use PrintFatalError as the unwinding mechanism was not
used for anything other than printing the error. The single exception
was CodeGenDAGPatterns.cpp, where intermediate errors during type
resolution were ignored to simplify incremental platform development.
This use is replaced by an error flag in TreePattern and bailout earlier
in various places if it is set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
6cfc806a6b82b60a3e923b6b89f2b4da62cdb50b 10-Oct-2012 Sean Silva <silvas@purdue.edu> tblgen: Mechanically move dynamic_cast<> to dyn_cast<>.

Some of these dyn_cast<>'s would be better phrased as isa<> or cast<>.
That will happen in a future patch.

There are also two dyn_cast_or_null<>'s slipped in instead of
dyn_cast<>'s, since they were causing crashes with just dyn_cast<>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165646 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
6d3d7656539188b496089a3313ed4d13759adba3 06-Sep-2012 Tom Stellard <thomas.stellard@amd.com> Tablegen: Add OperandWithDefaultOps Operand type

This Operand type takes a default argument, and is initialized to
this value if it does not appear in a patter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
ca578e7ba6b1e4ce955134e3fb1d5014942e5248 26-Jun-2012 Tim Northover <Tim.Northover@arm.com> Teach TableGen to put chains on more instructions

When generating selection tables for Pat instances, TableGen relied on
an output Instruction's Pattern field being set to infer whether a
chain should be added.

This patch adds additional logic to check various flag fields so that
correct code can be generated even if Pattern is unset.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
ef18cd381cb8513a53baba2b0062159323b13056 26-Mar-2012 Chris Lattner <sabre@nondot.org> fix a failure path to print the right thing, part of PR12357



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
7c788888872233748da10a8177a9a1eb176c1bc8 01-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Move TableGen's parser and entry point into a library

This is the first step towards splitting LLVM and Clang's tblgen executables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
29f018cee616e4082e5005bc9adee4dc777e621c 30-Sep-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Switch to ArrayRef<CodeGenRegisterClass*>.

This makes it possible to allocate CodeGenRegisterClass instances
dynamically and reorder them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
05bce0beee87512e52428d4b80f5a8e79a949576 30-Jul-2011 David Greene <greened@obbligato.org> Unconstify Inits

Remove const qualifiers from Init references, per Chris' request.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
f37dd02f7743ebd2424480361f5a7db510495c4f 29-Jul-2011 David Greene <greened@obbligato.org> [AVX] Constify Inits

Make references to Inits const everywhere. This is the final step
before making them unique.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
d568b3f55294917d1cc701da14a8a7daeb6563e6 12-Jul-2011 Eric Christopher <echristo@apple.com> Revert r134921, 134917, 134908 and 134907. They're causing failures
in multiple buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
d4a9066c93da9a5aab47ca228d82e796fdec70c0 11-Jul-2011 David Greene <greened@obbligato.org> [AVX] Make Inits Foldable

Manage Inits in a FoldingSet. This provides several benefits:

- Memory for Inits is properly managed

- Duplicate Inits are folded into Flyweights, saving memory

- It enforces const-correctness, protecting against certain classes
of bugs

The above benefits allow Inits to be used in more contexts, which in
turn provides more dynamism to TableGen. This enhanced capability
will be used by the AVX code generator to a fold common patterns
together.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
bea6f615eefae279e53bbb63a31d2c3c67274c45 27-Jun-2011 Owen Anderson <resistor@mac.com> Add support for alternative register names, useful for instructions whose operands are logically equivalent to existing registers, but happen to be printed specially. For example, an instruciton that prints d0[0] instead of s0.
Patch by Jim Grosbach.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
abdbc84b4ed4276ed3def50f554e3ba156325717 18-Jun-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Store CodeGenRegisters as pointers so they won't be reallocated.

Reuse the CodeGenRegBank DenseMap in a few places that would build their
own or use linear search.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
ae1920b1efa72c1789d562df4746110d0c2e10bd 15-Jun-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Give CodeGenRegisterClass a real sorted member set.

Make the Elements vector private and expose an ArrayRef through
getOrder() instead. getOrder will eventually provide multiple
user-specified allocation orders.

Use the sorted member set for member and subclass tests. Clean up a lot
of ad hoc searches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
3a2d255ce612760748990b1b1ea131cc777bafea 19-May-2011 Cameron Zwarich <zwarich@apple.com> Fix PR9947 by placing OPFL_MemRefs on the node using memory operands rather than
the root if there is only one such node. This leaves only 2 verifier failures in
the entire test suite when running "make check".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
4a6d735105ffac5f58499ef5a5de8713b458b233 11-Mar-2011 Jim Grosbach <grosbach@apple.com> Teach TableGen to pre-calculate register enum values when creating the
CodeGenRegister entries. Use this information to more intelligently build
the literal register entires in the DAGISel matcher table. Specifically,
use a single-byte OPC_EmitRegister entry for registers with a value of
less than 256 and OPC_EmitRegister2 entry for registers with a larger value.

rdar://9066491



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
036609bd7d42ed1f57865969e059eb7d1eb6c392 23-Dec-2010 Chris Lattner <sabre@nondot.org> Flag -> Glue, the ongoing saga


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122513 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
8950bcaa5aec9364bf4e7947d195c32433850816 23-Dec-2010 Chris Lattner <sabre@nondot.org> continue renaming flag -> glue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
fbadcd0826c2e69ed21c2d535310ba958acb4359 21-Dec-2010 Jim Grosbach <grosbach@apple.com> Tidy up a bit. Trailing whitespace, hard tabs and 80-columns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122337 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
f1b4eafbfec976f939ec0ea3e8acf91cef5363e3 21-Dec-2010 Chris Lattner <sabre@nondot.org> rename MVT::Flag to MVT::Glue. "Flag" is a terrible name for
something that just glues two nodes together, even if it is
sometimes used for flags.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
c240bb0ede0541426254d0e0dc81d891beda4b22 01-Nov-2010 Chris Lattner <sabre@nondot.org> factor the operand list (and related fields/operations) out of
CodeGenInstruction into its own helper class. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
718045889e08443e243638b7cbc3a698eb8dd8b9 04-Sep-2010 Chris Lattner <sabre@nondot.org> zap dead code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
ae321ed287009072e94a41d9c912243c558c43cc 11-Aug-2010 Eric Christopher <echristo@apple.com> We already have this as OperandNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
73ea7bf4509663267317ec3911aac00ca35a2f2c 24-May-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Add the SubRegIndex TableGen class.

This is the beginning of purely symbolic subregister indices, but we need a bit
of jiggling before the explicit numeric indices can be completely removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
b4a52b04bda21262dd742bb7add82b4842311ed3 27-Mar-2010 Chris Lattner <sabre@nondot.org> fix a long standing fixme, which required fixing a bunch of other
issues to get here. We now trim the result type list of the
CompleteMatch or MorphNodeTo operation to be the same size as the
thing we're matching. this means that if you match (add GPR, GPR)
with an instruction that produces a normal result and a flag that
we now trim the result in tblgen instead of having to do it
dynamically. This exposed a bunch of inconsistencies in result
counting that happened to be getting lucky since the days of the
old isel.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
9414ae52911f1d62cabd5108e0381b9d17476157 27-Mar-2010 Chris Lattner <sabre@nondot.org> hoist some funky logic into CodeGenInstruction
from two places in CodeGenDAGPatterns.cpp, and
use it in DAGISelMatcherGen.cpp instead of using
an incorrect predicate that happened to get lucky
on our current targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
0be6fe71390c50b211beb70e6c50e5fae060f746 27-Mar-2010 Chris Lattner <sabre@nondot.org> continue pushing tblgen's support for nodes with multiple
results forward. We can now handle an instruction that
produces one implicit def and one result instead of one or
the other when not at the root of the pattern.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
084df627c82fdf4e1829723edf0a833b5bc31f89 24-Mar-2010 Chris Lattner <sabre@nondot.org> add plumbing for handling multiple result nodes
in some more places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
d7349194650386d97a1d779369cb46f20ba9f252 19-Mar-2010 Chris Lattner <sabre@nondot.org> major surgery on tblgen: generalize TreePatternNode
to maintain a list of types (one for each result of
the node) instead of a single type. There are liberal
hacks added to emulate the old behavior in various
situations, but they can start disolving now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
1e50631675df50a0701ef8b527ced63d0d535a81 19-Mar-2010 Chris Lattner <sabre@nondot.org> resolve fixme: we now infer the instruction-level 'isvariadic' bit
from the pattern if present, and we use it instead of the bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
e8cabf3c2eb835f9189a39c810654d9bd302f7ee 19-Mar-2010 Chris Lattner <sabre@nondot.org> add a new SDNPVariadic SDNP node flag, and use it in
dag isel gen instead of instruction properties. This
allows the oh-so-useful behavior of matching a variadic
non-root node.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
f30187a36324fb75042d9ffd20c3fb70aff7763d 19-Mar-2010 Chris Lattner <sabre@nondot.org> look up instructions by record, not by name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
928795387fdfac67e094275618a36bdeba51c45a 19-Mar-2010 Chris Lattner <sabre@nondot.org> expand tblgen's support for instructions with implicit defs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
2cacec55f947c716b058a39038889550d7e39b3c 15-Mar-2010 Chris Lattner <sabre@nondot.org> Completely rewrite tblgen's type inference mechanism,
changing the primary datastructure from being a
"std::vector<unsigned char>" to being a new TypeSet class
that actually has (gasp) invariants!

This changes more things than I remember, but one major
innovation here is that it enforces that named input
values agree in type with their output values.

This also eliminates code that transparently assumes (in
some cases) that SDNodeXForm input/output types are the
same, because this is wrong in many case.

This also eliminates a bug which caused a lot of ambiguous
patterns to go undetected, where a register class would
sometimes pick the first possible type, causing an
ambiguous pattern to get arbitrary results.

With all the recent target changes, this causes no
functionality change!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
6fd326b7ff3f114f3b1eda05e1142e52222c6b54 07-Mar-2010 Chris Lattner <sabre@nondot.org> more factoring.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
6b4ae7172529503bd28333f488857c0d4fdc3e39 04-Mar-2010 Chris Lattner <sabre@nondot.org> zap fixme.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
9752fb10a4ad9a8144740b092d2b4f513897835c 04-Mar-2010 Chris Lattner <sabre@nondot.org> now that complexpatterns are all emitted at the end of the match
sequence, just emit instruction predicates right before them. This
exposes yet more factoring opportunitites, shrinking the X86 table
to 79144 bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
57bf8a483edf97589c3e6085721e72fc187677a8 04-Mar-2010 Chris Lattner <sabre@nondot.org> change the new isel matcher to emit ComplexPattern matches
as the very last thing before node emission. This should
dramatically reduce the number of times we do 'MatchAddress'
on X86, speeding up compile time. This also improves comments
in the tables and shrinks the table a bit, now down to
80506 bytes for x86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
d1aca7c8b4ea45fbee18fc18a21ed963175dd7bc 04-Mar-2010 Chris Lattner <sabre@nondot.org> enhance comment output to specify what recorded slot
numbers a ComplexPat will match into.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
c6d7ad3c7d83e9af29bf3ba3bf3280e72a952f98 02-Mar-2010 Chris Lattner <sabre@nondot.org> Rewrite chain handling validation and input TokenFactor handling
stuff now that we don't care about emulating the old broken
behavior of the old isel. This eliminates the
'CheckChainCompatible' check (along with IsChainCompatible) which
did an incorrect and inefficient scan *up* the chain nodes which
happened as the pattern was being formed and does the validation
at the end in HandleMergeInputChains when it forms a structural
pattern. This scans "down" the graph, which means that it is
quickly bounded by nodes already selected. This also handles
token factors that get "trapped" in the dag.

Removing the CheckChainCompatible nodes also shrinks the
generated tables by about 6K for X86 (down to 83K).

There are two pieces remaining before I can nuke PreprocessRMW:
1. I xfailed a test because we're now producing worse code in a
case that has nothing to do with the change: it turns out that
our use of MorphNodeTo will leave dead nodes in the graph
which (depending on how the graph is walked) end up causing
bogus uses of chains and blocking matches. This is really
bad for other reasons, so I'll fix this in a follow-up patch.

2. CheckFoldableChainNode needs to be improved to handle the TF.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
67ea6a711179441ffbc5ac34d14978fc3f546b99 01-Mar-2010 Chris Lattner <sabre@nondot.org> resolve some fixmes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
01bcd947bfd1830a9d301236a404138c9c97cd7e 01-Mar-2010 Chris Lattner <sabre@nondot.org> resolve a fixme and simplify code by moving insertion of the
EmitMergeInputChainsMatcher node up into EmitResultCode. This
doesn't have much of an effect on the generated code, the X86
table is exactly the same size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
405f1252b9f3937b9c30edf683375cf261967c79 01-Mar-2010 Chris Lattner <sabre@nondot.org> resolve a fixme by having the .td file parser reject thigns like

(set GPR, somecomplexpattern)

if somecomplexpattern doesn't declare what it can match.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97513 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
60c0e37afcb62c934e8bd69891fe65f8141a4bb5 01-Mar-2010 Chris Lattner <sabre@nondot.org> Emit type checks late instead of early, this encourages
structural matching code to be factored and shared this
shrinks the X86 isel table from 86537 to 83890 bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97442 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
bd8965a7d9e0ed34bc3a357c2f710de5fbdda36f 01-Mar-2010 Chris Lattner <sabre@nondot.org> Emit a redundant check for immediates at root context, e.g. (imm 0).
This allows formation of OpcodeSwitch for top level patterns, in
particular on X86. This saves about 1K of data space in the x86
table and makes the dispatch much more efficient.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
fa342faef9d1c89de356ed83a6c6529ed3e87610 01-Mar-2010 Chris Lattner <sabre@nondot.org> eliminate the CheckMultiOpcodeMatcher code and have each
ComplexPattern at the root be generated multiple times, once
for each opcode they are part of. This encourages factoring
because the opcode checks get treated just like everything
else in the matcher.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
0cebe6181af8a2cf5e6cf9497cda4c47b426a0f8 01-Mar-2010 Chris Lattner <sabre@nondot.org> enhance RecordNode and RecordChild comments to indicate what
slot they're recording into, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
e9eeda878beb8d36507a69a2be2fe08fcc968fef 01-Mar-2010 Chris Lattner <sabre@nondot.org> Emit redundant opcode checks for andimm and orimm tests at root
so that we get grouping at the top level.

Add an optimization to reorder type check & record nodes
after opcode checks. We prefer to expose tree shape
matching which improves grouping and will enhance the next
optimization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
4d0c931ba7758a98864dc7e968a10df7fed7ab70 01-Mar-2010 Chris Lattner <sabre@nondot.org> inline the node transforms and node predicates into the generated
dispatcher method. This eliminates the dependence of the new isel's
generated code on the old isel's predicates, however some random
hand written isel code still uses them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
ff7fb60f2a7e2f3efd54df6480aadcb4adf5cab7 28-Feb-2010 Chris Lattner <sabre@nondot.org> enhance the EmitNode/MorphNodeTo operands to take a bit that
specifies whether there is an output flag or not. Use this
instead of redundantly encoding the chain/flag results in the
output vtlist.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
c78f2a39945339752a163949a2d7c27f28635d99 28-Feb-2010 Chris Lattner <sabre@nondot.org> enhance the new isel to use SelectNodeTo for most patterns,
even some the old isel didn't. There are several parts of
this that make me feel dirty, but it's no worse than the
old isel. I'll clean up the parts I can do without ripping
out the old one next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
6281cda6737bcda0e924318ddcce28392001691e 28-Feb-2010 Chris Lattner <sabre@nondot.org> enhance EmitNodeMatcher to keep track of the recorded slot numbers
it will populate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
e86097af5598e44727875f00e492d43c978239be 28-Feb-2010 Chris Lattner <sabre@nondot.org> add infrastructure to support forming selectnodeto. Not used yet
because I have to go on another detour first.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
a230f9623d864450d432bb76c397b0cb35a3437e 27-Feb-2010 Chris Lattner <sabre@nondot.org> change CheckOpcodeMatcher to hold the SDNodeInfo instead of
the opcode name. This gives the optimizer more semantic info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
b21ba71045420b4c0dc5f30e85b9b01c9165eb57 25-Feb-2010 Chris Lattner <sabre@nondot.org> rename fooMatcherNode to fooMatcher.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97096 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
2a1263b1e1d1bc1ef1f1cd834b6e3ca4b82daea7 25-Feb-2010 Chris Lattner <sabre@nondot.org> add a fixme for an experiment that defeated me for the time being.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
02f73585f7d018ea3ddcda88c8273ee4e5ea4de3 24-Feb-2010 Chris Lattner <sabre@nondot.org> The new isel was not properly handling patterns that covered
internal nodes with flag results. Record these with a new
OPC_MarkFlagResults opcode and use this to update the interior
nodes' flag results properly. This fixes CodeGen/X86/i256-add.ll
with the new isel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
20df2420f7997cdb69c21f6bff27559cb09f7be2 23-Feb-2010 Chris Lattner <sabre@nondot.org> Change ComplexPattern handling to push the node being matched as
well as the operands produced when the pattern is matched. This
allows CheckSame to work correctly when matching replicated
names involving ComplexPatterns. This fixes a bunch of MSP430
failures, we're down to 13 failures, two of which are
due to a sched bug.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
12a667c1e8fa57a13ae751164b6dd4412a62dc5d 22-Feb-2010 Chris Lattner <sabre@nondot.org> add a new CheckMultiOpcode opcode for checking that a node
has one of the list of acceptable opcodes for a complex
pattern. This fixes 4 regtest failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
1f2ed5fe7ed9327f79dc7128fc109e4d6c864907 22-Feb-2010 Chris Lattner <sabre@nondot.org> When matching patterns that have a complex pattern as their root, make
sure to only run the complex pattern on nodes where the target opts in.
This patch only handles targets with one opcode specified so far, but
fixes 16 failures, only 34 left.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
565a6f94804d12ff637b8c3cfc7752e1d265f3ee 22-Feb-2010 Chris Lattner <sabre@nondot.org> fix most of the failures in the x86 suite by handling multiple
result nodes correctly. Note that this includes a horrible hack
in DAGISelHeader which cannot be fixed reasonably without
eliminating (parallel) from input patterns. That, in turn,
can't be done until we support writing multiple result patterns
for the X86and_flag and related multiple-result nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
664012bb64c5430dbe5b194a8ccc5fe50cf49638 21-Feb-2010 Chris Lattner <sabre@nondot.org> Always emit register class id references as i32 like
DAGISelEmitter does. This fixes 11 arm failures (8
left).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96757 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
77f2e2724dc488bbf032e87f8f25f333730a0fb5 21-Feb-2010 Chris Lattner <sabre@nondot.org> implement the last known missing feature: updating uses of results
of the matched pattern to use the newly created node results. Onto
the "making it actually work" phase!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
8e946bea146c15333ce5f9f1b7a9efe5e75fd892 21-Feb-2010 Chris Lattner <sabre@nondot.org> Lots of improvements to the new dagisel emitter. This gets it to
the point where it is to the 95% feature complete mark, it just
needs result updating to be done (then testing, optimization
etc).

More specificallly, this adds support for chain and flag handling
on the result nodes, support for sdnodexforms, support for variadic
nodes, memrefs, pinned physreg inputs, and probably lots of other
stuff.

In the old DAGISelEmitter, this deletes the dead code related to
OperatorMap, cleans up a variety of dead stuff handling "implicit
remapping" from things like globaladdr -> targetglobaladdr (which
is no longer used because globaladdr always needs to be legalized),
and some minor formatting fixes.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
853b919d93c62498ba30e7a78ab393291517cd42 19-Feb-2010 Chris Lattner <sabre@nondot.org> I confused myself, temporaries will be recorded right along with other inputs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
c94fa4c759467b12abb63ec9d8597bc883e37281 19-Feb-2010 Chris Lattner <sabre@nondot.org> introduce a new ResultVal and start keeping track of temporary values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
845c04273461b2a10754a1455b02916a19ea72aa 18-Feb-2010 Chris Lattner <sabre@nondot.org> add support for referencing registers and immediates,
building the tree to represent them but not emitting
table entries for them yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96617 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
b49985a8499e18675db7e9baf920d6ef4e2b65cf 18-Feb-2010 Chris Lattner <sabre@nondot.org> start sketching out the structure of code for result emission generation.
Nothing real here yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
bd8227f5298f0ab7b96203a6d3875e5d26573376 18-Feb-2010 Chris Lattner <sabre@nondot.org> rename the child field to 'next'. This is not a parent/child
relationship, this is a linear list relationship.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
8ef9c7958ad7a23ad15d7ff59e1377aec10ca42a 18-Feb-2010 Chris Lattner <sabre@nondot.org> eliminate the MatcherNodeWithChild class, give the 'child'
field to MatcherNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
9a747f1305e76025df2323a03b805a284f2cde77 17-Feb-2010 Chris Lattner <sabre@nondot.org> Emulate the current isel's "IsChainCompatible" logic for now.
I'd like to eventually rip it out, but for now producing the
same selections as the old matcher is more important.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
8dc4f2bb609989c5c73990435d1b6d1aeb13297a 17-Feb-2010 Chris Lattner <sabre@nondot.org> properly record chain inputs to complex patterns,
resolving a fixme.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
785d16fe75a4ea0d465f2641f0a19033e0d9badc 17-Feb-2010 Chris Lattner <sabre@nondot.org> Prep work to handle input chains of matched patterns and checking for
'ischaincompatible' when a pattern has more than one input chain. Need
to do some commenting and cleanup now that I understand how this works.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
2f7ecdeb1dd3bc0092e91df9197ca71b1a260434 17-Feb-2010 Chris Lattner <sabre@nondot.org> record input chains.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
c642b84fb866c3a6f1e61d39d6eda89563267b53 17-Feb-2010 Chris Lattner <sabre@nondot.org> prefix captured value names with $ so they look like
variables. Use the fancy OpNo variable instead of i,
which has the right index including chains.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
c96087b3433582f1c2bdb4f0ad3dad7f0b350339 17-Feb-2010 Chris Lattner <sabre@nondot.org> improve comments on OPC_Record to say what we're recording a node.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
e609a513f3c072bba28412c681465332a2822d9a 17-Feb-2010 Chris Lattner <sabre@nondot.org> make the new isel generator plop out a CheckComplexPattern function
for evaluating complex patterns. Some cleanup has to happen before
this can be used though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
c2676b2909b18df10280b3692161ed43bc4503a3 17-Feb-2010 Chris Lattner <sabre@nondot.org> fix inverted condition.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
53a2f60062500a9be3fd73b401712568e2bb01f5 17-Feb-2010 Chris Lattner <sabre@nondot.org> complex patterns don't get 'record' nodes, they implicitly
record all their results.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
92d3ada814f33e3e1d10f0e5e3a15333b0cca849 16-Feb-2010 Chris Lattner <sabre@nondot.org> fix rdar://7653908, a crash on a case where we would fold a load
into a roundss intrinsic, producing a cyclic dag. The root cause
of this is badness handling ComplexPattern nodes in the old dagisel
that I noticed through inspection. Eliminate a copy of the of the
code that handled ComplexPatterns by making EmitChildMatchCode call
into EmitMatchCode.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
6bc1b51377d86c7f9ec422ab6962d3051dc92de2 16-Feb-2010 Chris Lattner <sabre@nondot.org> simplify this code. In the new world order there is no
need to scan the entire subtree of the pattern anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
21390d79843050ae8b3226860cadc16ff51d0dcf 16-Feb-2010 Chris Lattner <sabre@nondot.org> convert the new matcher to check intermediate nodes for a single
use and only call IsProfitableToFold/IsLegalToFold on the load
being folded, like the old dagiselemitter does. This
substantially simplifies the code and improves opportunities for
sharing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
e2de49d9a1f26a16963739eab94aeba894df16a7 16-Feb-2010 Chris Lattner <sabre@nondot.org> remove now dead code and fixme.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
e39650a805425ffdbd79692c7d1bad80f7332dae 16-Feb-2010 Chris Lattner <sabre@nondot.org> add support for the new isel matcher to generate
(isprofitable|islegal)tofold checks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp
da272d1a704bd564272e88cbdbcf14712e3abbdc 15-Feb-2010 Chris Lattner <sabre@nondot.org> Check in the first big step of rewriting DAGISelEmitter to
produce a table based matcher instead of gobs of C++ Code.

Though it's not done yet, the shrinkage seems promising,
the table for the X86 ISel is 75K and still has a lot of
optimization to come (compare to the ~1.5M of .o generated
the old way, much of which will go away).

The code is currently disabled by default (the #if 0 in
DAGISelEmitter.cpp). When enabled it generates a dead
SelectCode2 function in the DAGISel Header which will
eventually replace SelectCode.

There is still a lot of stuff left to do, which are
documented with a trail of FIXMEs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/utils/TableGen/DAGISelMatcherGen.cpp