Commit Graph

10 Commits

Author SHA1 Message Date
River Riddle 1982afb145 Unify the 'constantFold' and 'fold' hooks on an operation into just 'fold'. This new unified fold hook will take constant attributes as operands, and may return an existing 'Value *' or a constant 'Attribute' when folding. This removes the awkward situation where a simple canonicalization like "sub(x,x)->0" had to be written as a canonicalization pattern as opposed to a fold.
--

PiperOrigin-RevId: 248582024
2019-05-20 13:44:24 -07:00
Chris Lattner 9ec6b5b749 Remove some extraneous const qualifiers on Type, and 0b1 -> 1 in tblgen files. (NFC)
--

PiperOrigin-RevId: 248332674
2019-05-20 13:42:56 -07:00
Lei Zhang 635bebaac9 Update "Table-driven Op Definition Specification" doc
This CL turns the previous "Op Definition" doc into a manual for table-driven
    op definition specification by fleshing out more details of existing mechanisms.

--

PiperOrigin-RevId: 248013274
2019-05-20 13:40:43 -07:00
Stella Laurenzo d468eaccfc Update custom rewrite example, which seems to have drifted a bit from the implementation.
PiperOrigin-RevId: 242968685
2019-04-11 10:53:01 -07:00
River Riddle d16213bf66 Update the QuickstartRewrites document to include information about the new 'matchAndRewrite' functionality in RewritePatterns.
PiperOrigin-RevId: 240987764
2019-03-29 17:55:05 -07:00
Chris Lattner 5246bceee0 Now that ConstOpPointer is gone, we can change the various methods generated by
tblgen be non-const.  This requires introducing some const_cast's at the
moment, but those (and lots more stuff) will disappear in subsequent patches.

This significantly simplifies those patches because the various tblgen op emitters
get adjusted.

PiperOrigin-RevId: 239954566
2019-03-29 17:33:45 -07:00
River Riddle 157e3cdb19 Add documentation for the new pass infrastructure.
PiperOrigin-RevId: 237153501
2019-03-29 17:04:03 -07:00
River Riddle 3e656599f1 Define a PassID class to use when defining a pass. This allows for the type used for the ID field to be self documenting. It also allows for the compiler to know the set alignment of the ID object, which is useful for storing pointer identifiers within llvm data structures.
PiperOrigin-RevId: 235107957
2019-03-29 16:37:12 -07:00
Jacques Pienaar 31f2b3ffa1 Address follow on comments for quickstart doc.
PiperOrigin-RevId: 232705423
2019-03-29 16:16:58 -07:00
Jacques Pienaar 1b1f293a5d MLIR graph rewrite using pattern quickstart doc.
Start quickstart guide of how to define ops + specify patterns for rewrite.

PiperOrigin-RevId: 232490287
2019-03-29 16:14:35 -07:00