summaryrefslogtreecommitdiffstats
path: root/mlir/lib/IR/Block.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* NFC: Rename the 'for' operation in the AffineOps dialect to 'affine.for'. ↵River Riddle2019-03-291-1/+1
| | | | | | The is the second step to adding a namespace to the AffineOps dialect. PiperOrigin-RevId: 232717775
* Remove findInstPositionInBlock from the Block api.River Riddle2019-03-291-13/+0
| | | | PiperOrigin-RevId: 232704766
* Remove InstWalker and move all instruction walking to the api facilities on ↵River Riddle2019-03-291-48/+37
| | | | | | Function/Block/Instruction. PiperOrigin-RevId: 232388113
* Remove remaining references to OperationInst in all directories except for ↵River Riddle2019-03-291-6/+3
| | | | | | lib/Transforms. PiperOrigin-RevId: 232322771
* Replace the walkOps/visitOperationInst variants from the InstWalkers with ↵River Riddle2019-03-291-19/+15
| | | | | | the Instruction variants. PiperOrigin-RevId: 232322030
* Update dma-generate pass to (1) work on blocks of instructions (instead of justUday Bondhugula2019-03-291-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loops), (2) take into account fast memory space capacity and lower 'dmaDepth' to fit, (3) add location information for debug info / errors - change dma-generate pass to work on blocks of instructions (start/end iterators) instead of 'for' loops; complete TODOs - allows DMA generation for straightline blocks of operation instructions interspersed b/w loops - take into account fast memory capacity: check whether memory footprint fits in fastMemoryCapacity parameter, and recurse/lower the depth at which DMA generation is performed until it does fit in the provided memory - add location information to MemRefRegion; any insufficient fast memory capacity errors or debug info w.r.t dma generation shows location information - allow DMA generation pass to be instantiated with a fast memory capacity option (besides command line flag) - change getMemRefRegion to return unique_ptr's - change getMemRefFootprintBytes to work on a 'Block' instead of 'ForInst' - other helper methods; add postDomInstFilter option for replaceAllMemRefUsesWith; drop forInst->walkOps, add Block::walkOps methods Eg. output $ mlir-opt -dma-generate -dma-fast-mem-capacity=1 /tmp/single.mlir /tmp/single.mlir:9:13: error: Total size of all DMA buffers' for this block exceeds fast memory capacity for %i3 = (d0) -> (d0)(%i1) to (d0) -> (d0 + 32)(%i1) { ^ $ mlir-opt -debug-only=dma-generate -dma-generate -dma-fast-mem-capacity=400 /tmp/single.mlir /tmp/single.mlir:9:13: note: 8 KiB of DMA buffers in fast memory space for this block for %i3 = (d0) -> (d0)(%i1) to (d0) -> (d0 + 32)(%i1) { PiperOrigin-RevId: 232297044
* Fold the functionality of OperationInst into Instruction. OperationInst ↵River Riddle2019-03-291-0/+13
| | | | | | still exists as a forward declaration and will be removed incrementally in a set of followup cleanup patches. PiperOrigin-RevId: 232198540
* Fix Block::getNumSuccessors()Uday Bondhugula2019-03-291-1/+6
| | | | | | | | - getTerminator() on a block can return nullptr; moreover, blocks that are improperly constructed/transformed by utilities/passes may not have terminators even for the top-level blocks PiperOrigin-RevId: 232025963
* Allow operations to hold a blocklist and add support for parsing/printing a ↵River Riddle2019-03-291-3/+2
| | | | | | block list for verbose printing. PiperOrigin-RevId: 230951462
* Add order bit to instructions to lazily track dominance queries. This ↵River Riddle2019-03-291-6/+41
| | | | | | | | improves the performance of dominance queries, which are used quite often within the compiler(especially within the verifier). This reduced the execution time of a few internal tests from ~2 minutes to ~4 seconds. PiperOrigin-RevId: 230819723
* Add cloning functionality to Block and Function, this also adds support for ↵River Riddle2019-03-291-0/+59
| | | | | | remapping successor block operands of terminator operations. We define a new BlockAndValueMapping class to simplify mapping between cloned values. PiperOrigin-RevId: 230768759
* Add a Block::dropAllReferences to drop all references from held instructions ↵River Riddle2019-03-291-0/+8
| | | | | | and call it when clearing the block. This fixes a bug where ForInst/IfInst instructions may still have references to values while being destroyed. PiperOrigin-RevId: 229207798
* Add a few utilities for terminator management:River Riddle2019-03-291-0/+15
| | | | | | | | | * Get a specific successor operand. * Iterator support for non successor operands. * Fix bug when removing the last operand from the operand list of an Instruction. * Get the argument number for a BlockArgument. PiperOrigin-RevId: 228660898
* Introduce PostDominanceInfo, fix properlyDominates() for InstructionsUday Bondhugula2019-03-291-3/+2
| | | | | | | | | | | | | | | - introduce PostDominanceInfo in the right/complete way and use that for post dominance check in store-load forwarding - replace all uses of Analysis/Utils::dominates/properlyDominates with DominanceInfo::dominates/properlyDominates - drop all redundant copies of dominance methods in Analysis/Utils/ - in pipeline-data-transfer, replace dominates call with a much less expensive check; similarly, substitute dominates() in checkMemRefAccessDependence with a simpler check suitable for that context - fix a bug in properlyDominates - improve doc for 'for' instruction 'body' PiperOrigin-RevId: 227320507
* Greatly simplify the ConvertToCFG pass, converting it from a module pass to aChris Lattner2019-03-291-20/+21
| | | | | | | | | | | | | | function pass, and eliminating the need to copy over code and do interprocedural updates. While here, also improve it to make fewer empty blocks, and rename it to "LowerIfAndFor" since that is what it does. This is a net reduction of ~170 lines of code. As drive-bys, change the splitBlock method to *not* insert an unconditional branch, since that behavior is annoying for all clients. Also improve the AsmPrinter to not crash when a block is referenced that isn't linked into a function. PiperOrigin-RevId: 227308856
* Standardize naming of statements -> instructions, revisting the code base to beChris Lattner2019-03-291-14/+14
| | | | | | | | | consistent and moving the using declarations over. Hopefully this is the last truly massive patch in this refactoring. This is step 21/n towards merging instructions and statements, NFC. PiperOrigin-RevId: 227178245
* Rename BasicBlock and StmtBlock to Block, and make a pass cleaning it up. I ↵Chris Lattner2019-03-291-0/+232
did not make an effort to rename all of the 'bb' names in the codebase, since they are still correct and any specific missed once can be fixed up on demand. The last major renaming is Statement -> Instruction, which is why Statement and Stmt still appears in various places. This is step 19/n towards merging instructions and statements, NFC. PiperOrigin-RevId: 227163082
OpenPOWER on IntegriCloud