summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Analysis/Dominance.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [mlir] NFC: Remove Value::operator* and Value::operator-> now that Value is ↵River Riddle2020-01-111-2/+2
| | | | | | | | | | properly value-typed. Summary: These were temporary methods used to simplify the transition. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D72548
* NFC: Replace ValuePtr with Value and remove it now that Value is value-typed.River Riddle2019-12-231-1/+1
| | | | | | ValuePtr was a temporary typedef during the transition to a value-typed Value. PiperOrigin-RevId: 286945714
* Resubmit: ReImplement the Value classes as value-typed objects wrapping an ↵River Riddle2019-12-231-1/+1
| | | | | | | | internal pointer storage. This will enable future commits to reimplement the internal implementation of OpResult without needing to change all of the existing users. This is part of a chain of commits optimizing the size of operation results. PiperOrigin-RevId: 286930047
* Automated rollback of commit f603a50109107b447b835dac11f0eb541288393eMLIR Team2019-12-231-1/+1
| | | | PiperOrigin-RevId: 286924059
* ReImplement the Value classes as value-typed objects wrapping an internal ↵River Riddle2019-12-231-1/+1
| | | | | | | | pointer storage. This will enable future commits to reimplement the internal implementation of OpResult without needing to change all of the existing users. This is part of a chain of commits optimizing the size of operation results. PiperOrigin-RevId: 286919966
* Adjust License.txt file to use the LLVM licenseMehdi Amini2019-12-231-13/+4
| | | | PiperOrigin-RevId: 286906740
* NFC: Introduce new ValuePtr/ValueRef typedefs to simplify the transition to ↵River Riddle2019-12-221-1/+1
| | | | | | | | | | Value being value-typed. This is an initial step to refactoring the representation of OpResult as proposed in: https://groups.google.com/a/tensorflow.org/g/mlir/c/XXzzKhqqF_0/m/v6bKb08WCgAJ This change will make it much simpler to incrementally transition all of the existing code to use value-typed semantics. PiperOrigin-RevId: 286844725
* Replace some remnant uses of "inst" with "op".Sean Silva2019-11-061-6/+5
| | | | PiperOrigin-RevId: 278961676
* Add a pair of hooks to DominanceInfo.Eric Schweitz2019-10-011-0/+11
| | | | | | | | | This exposes hooks for accessing internal dominance nodes, and updating the internal DFS numbers. Closes tensorflow/mlir#151 COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/151 from schweitzpgi:dominance_hooks 69d14214a423b816cbd59feffcacdd02f3b5f921 PiperOrigin-RevId: 272287352
* Fix nested dominance relationship between parent results and child operations.River Riddle2019-09-181-1/+7
| | | | | | This modifies DominanceInfo::properlyDominates(Value *value, Operation *op) to return false if the value is defined by a parent operation of 'op'. This prevents using values defined by the parent operation from within any child regions. PiperOrigin-RevId: 269934920
* Change from llvm::make_unique to std::make_uniqueJacques Pienaar2019-08-171-1/+1
| | | | | | | | Switch to C++14 standard method as llvm::make_unique has been removed ( https://reviews.llvm.org/D66259). Also mark some targets as c++14 to ease next integrates. PiperOrigin-RevId: 263953918
* NFC: Standardize the terminology used for parent ops/regions/etc.River Riddle2019-08-091-1/+1
| | | | | | There are currently several different terms used to refer to a parent IR unit in 'get' methods: getParent/getEnclosing/getContaining. This cl standardizes all of these methods to use 'getParent*'. PiperOrigin-RevId: 262680287
* Replace the implementation of Function and Module with FuncOp and ModuleOp.River Riddle2019-07-031-33/+16
| | | | | | This is an important step in allowing for the top-level of the IR to be extensible. FuncOp and ModuleOp contain all of the necessary functionality, while using the existing operation infrastructure. As an interim step, many of the usages of Function and Module, including the name, will remain the same. In the future, many of these will be relaxed to allow for many different types of top-level operations to co-exist. PiperOrigin-RevId: 256427100
* Generalize the CFG graph printing for Functions to work on Regions instead.River Riddle2019-07-011-0/+6
| | | | PiperOrigin-RevId: 256029944
* NFC: Refactor Function to be value typed.River Riddle2019-07-011-5/+4
| | | | | | Move the data members out of Function and into a new impl storage class 'FunctionStorage'. This allows for Function to become value typed, which will greatly simplify the transition of Function to FuncOp(given that FuncOp is also value typed). PiperOrigin-RevId: 255983022
* Add a general Operation::verify that verifies an operation instance and the ↵River Riddle2019-06-111-1/+5
| | | | | | dominance of operations in any nested regions. PiperOrigin-RevId: 252529850
* Support constructing DominanceInfo with an Operation. This computes the ↵River Riddle2019-06-091-1/+19
| | | | | | dominance information for any nested regions within the operation. PiperOrigin-RevId: 251896520
* Replace usages of Instruction with Operation in the /Analysis directory.River Riddle2019-03-291-10/+10
| | | | PiperOrigin-RevId: 240569775
* Replace usages of Instruction with Operation in the /IR directory.River Riddle2019-03-291-2/+2
| | | | | | This is step 2/N to renaming Instruction to Operation. PiperOrigin-RevId: 240459216
* Rename the Instruction class to Operation. This just renames the class, ↵River Riddle2019-03-291-1/+1
| | | | | | | | usages of Instruction will still refer to a typedef in the interim. This is step 1/N to renaming Instruction to Operation. PiperOrigin-RevId: 240431520
* Remove const from Value, Instruction, Argument, and the various methods on theChris Lattner2019-03-291-6/+4
| | | | | | *Op classes. This is a net reduction by almost 400LOC. PiperOrigin-RevId: 239972443
* Remove const from mlir::Block.Chris Lattner2019-03-291-2/+1
| | | | | | This also eliminates some incorrect reinterpret_cast logic working around it, and numerous const-incorrect issues (like block argument iteration). PiperOrigin-RevId: 239712029
* Remove some statements that required >C++11, add includes and qualify names. ↵Jacques Pienaar2019-03-291-2/+2
| | | | | | NFC. PiperOrigin-RevId: 239197784
* Rename BlockList into RegionAlex Zinenko2019-03-291-16/+16
| | | | | | NFC. This is step 1/n to specifying regions as parts of any operation. PiperOrigin-RevId: 238472370
* Rewrite the dominance info classes to allow for operating on arbitrary ↵River Riddle2019-03-291-54/+72
| | | | | | control flow within operation regions. The CSE pass is also updated to properly handle nested dominance. PiperOrigin-RevId: 235742627
* Fold the functionality of OperationInst into Instruction. OperationInst ↵River Riddle2019-03-291-1/+1
| | | | | | still exists as a forward declaration and will be removed incrementally in a set of followup cleanup patches. PiperOrigin-RevId: 232198540
* Change the ForInst induction variable to be a block argument of the body ↵River Riddle2019-03-291-8/+3
| | | | | | instead of the ForInst itself. This is a necessary step in converting ForInst into an operation. PiperOrigin-RevId: 231064139
* Add order bit to instructions to lazily track dominance queries. This ↵River Riddle2019-03-291-50/+6
| | | | | | | | 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
* Fix outdated commentsUday Bondhugula2019-03-291-1/+1
| | | | PiperOrigin-RevId: 229300301
* Introduce PostDominanceInfo, fix properlyDominates() for InstructionsUday Bondhugula2019-03-291-5/+63
| | | | | | | | | | | | | | | - 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
* Fix dominates() for block's.Uday Bondhugula2019-03-291-12/+15
| | | | | | | | | - dominates() for blocks was assuming that there was only a single block at the top level whenever there was a hierarchy of blocks (as in the case of 'for'/'if' instructions). - fix the comments as well PiperOrigin-RevId: 227319738
* Merge the verifier logic for all functions into a unified framework, thisChris Lattner2019-03-291-22/+69
| | | | | | | | | | requires enhancing DominanceInfo to handle the structure of an ML function, which is required anyway. Along the way, this also fixes a const correctness problem with Instruction::getBlock(). This is step 24/n towards merging instructions and statements. PiperOrigin-RevId: 227228900
* Standardize naming of statements -> instructions, revisting the code base to beChris Lattner2019-03-291-1/+1
| | | | | | | | | 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-5/+5
| | | | | | | | | | | 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
* Eliminate the using decls for MLFunction and CFGFunction standardizing onChris Lattner2019-03-291-1/+1
| | | | | | | | Function. This is step 18/n towards merging instructions and statements, NFC. PiperOrigin-RevId: 227139399
* Rename BBArgument -> BlockArgument, Op::getOperation -> Op::getInst(),Chris Lattner2019-03-291-1/+1
| | | | | | | | StmtResult -> InstResult, StmtOperand -> InstOperand, and remove the old names. This is step 17/n towards merging instructions and statements, NFC. PiperOrigin-RevId: 227121537
* Merge SSAValue, CFGValue, and MLValue together into a single Value class, whichChris Lattner2019-03-291-1/+1
| | | | | | | | | is the new base of the SSA value hierarchy. This CL also standardizes all the nomenclature and comments to use 'Value' where appropriate. This also eliminates a large number of cast<MLValue>(x)'s, which is very soothing. This is step 11/n towards merging instructions and statements, NFC. PiperOrigin-RevId: 227064624
* Eliminate the Instruction, BasicBlock, CFGFunction, MLFunction, and ↵Chris Lattner2019-03-291-1/+2
| | | | | | | | | | | | ExtFunction classes, using the Statement/StmtBlock hierarchy and Function instead. This *only* changes the internal data structures, it does not affect the user visible syntax or structure of MLIR code. Function gets new "isCFG()" sorts of predicates as a transitional measure. This patch is gross in a number of ways, largely in an effort to reduce the amount of mechanical churn in one go. It introduces a bunch of using decls to keep the old names alive for now, and a bunch of stuff needs to be renamed. This is step 10/n towards merging instructions and statements, NFC. PiperOrigin-RevId: 227044402
* Merge OperationInst functionality into Instruction.River Riddle2019-03-291-6/+4
| | | | | | We do some limited renaming here but define an alias for OperationInst so that a follow up cl can solely perform the large scale renaming. PiperOrigin-RevId: 221726963
* Replace TerminatorInst with builtin terminator operations.River Riddle2019-03-291-4/+4
| | | | | Note: Terminators will be merged into the operations list in a follow up patch. PiperOrigin-RevId: 221670037
* Introduce [post]dominator tree and related infrastructure, use it in CFG funcChris Lattner2019-03-291-0/+81
verifier. We get most of this infrastructure directly from LLVM, we just need to adapt it to our CFG abstraction. This has a few unrelated changes engangled in it: - getFunction() in various classes was const incorrect, fix it. - This moves Verifier.cpp to the analysis library, since Verifier depends on dominance and these are both really analyses. - IndexedAccessorIterator::reference was defined wrong, leading to really exciting template errors that were fun to diagnose. - This flips the boolean sense of the foldOperation() function in constant folding pass in response to previous patch feedback. PiperOrigin-RevId: 214046593
OpenPOWER on IntegriCloud