New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
constant propagator issues #1130
Comments
dnovillo
added a commit
to dnovillo/SPIRV-Tools
that referenced
this issue
Dec 22, 2017
This addresses review feedback for the CCP implementation (which fixes KhronosGroup#889). This adds more protection around the folding of instructions that would not be supported by the folder.
nhaehnle
pushed a commit
to nhaehnle/llpc
that referenced
this issue
Apr 7, 2020
Changelist: ce5941a ce5941a Fixes GPUOpen-Drivers#1357. Support null constants better in folding bdaf8d5 Opt: Add constant folding for FToI and IToF 9457cab Fixes GPUOpen-Drivers#1354. Do not merge integer division. 588f4fc Add more folding rules for vector shuffle. 90e1637 Remove Function::GetBlocks pushed by accident 2cb589c Remove uses DCEInst and call ADCE 0c13467 Consistently include latest spirv.h header file. 802cf05 Merge arithmetic with non-trivial constant operands 20b8cdb Make IR builder use the type manager for constants 9394272 linker: merge debug annotations from category c) bdd6617 linker: Allow modules to be partially linked 64298bf tools/linker: Allow setting --verify-ids on the command line b08b94e Update CHANGES 3497a94 Add loop unswitch pass. e354984 Unroller support for multiple induction variables 94af58a Clean up variables before sroa 3f19c20 Preserve analysies in the simplification pass 432dc40 Appveyor: remove VS2015 configuration to reduce build time 46a9ec9 Opt: Check for side-effects in DCEInst() 01760d2 Fixes GPUOpen-Drivers#1338. Handle OpConstantNull in branch/switch conditions 51ecc73 Reduce instruction create and deletion during inlining. c1b9366 Add Insert-extract elimination back into legalization passes. 309be42 Add folding for redundant add/sub/mul/div/mix operations fa3ac3c Revert "Preserve analysies in the simplification pass" ec3bbf0 Preserve analysies in the simplification pass 6c75050 Speed up Phi insertion. ac9ab0d Travis: require MacOS to build and test again 9d95a91 Fix folding insert feeding extract c3f34d8 Fixes GPUOpen-Drivers#1300. Adding checks for bad CCP transitions and unsettled values e543b19 Removed warnings from hex_float.h 04cd63e Make better use of simplification pass 1054413 Add constant folding rules for floating-point comparison 27d23a9 Remove constants from constant manager in KillInst 50f307f Simplify OpPhi instructions referencing unreachable continues 3756b38 Get CCP to use the constant floating point rules. efe286c SubgroupBallotKHR can enable SubgroupSize & SubgroupLocalInvocationId 5d442fa fix typo d2c0fce Invoke cmake via CMAKE_COMMAND variable f3a1047 Avoid using static unordered_map (GPUOpen-Drivers#1304) 32a8e04 Add folding of redundant OpSelect insns 0e9f2f9 Add id to name map 6669d81 Fold binary floating point operators. dd8400e Initial support for loop unrolling. 229ebc0 Fixes GPUOpen-Drivers#1295. Mark undef values as varying in ccp. 0869992 Cleanup. Use proper #include guard. NFC. 06b437d Avoid using the def-use manager during inlining. 70bf351 Fix spirv.h include to rely on include paths 1d7b142 Add folding of OpCompositeExtract and OpConstantComposite constant instructions. 8868591 Fix generation of Vim syntax file 4e4a254 Do not hardcode libdir and includedir in pkg config files 1a849ff Add header files missing from CMakeLists.txt 84ccd0b Loop invariant code motion initial implementation ca4457b SROA: Do replacement on structs with no partial references. 06cdb96 Make use of the instruction folder. a61e4c1 Disable check which fails Vulkan CTS 2f0c3aa Add Vulkan-specific validation rules for atomics 3013897 Build SPIRV-Tools as shared library b1c9c4e Enable Visual Studio 2013 again e7fafda Fix test inclusion when Effcee is absent c452bfd Update CHANGES 8710227 Registering a type now rebuilds it out of memory owned by the manager. 860b2ee ADCE: Fix combinator initialization 9e19fc0 VS2013: LoopDescriptor LoopContainerType can't contain unique_ptr 12e6860 Add barrier instructions validation pass 3ef4bb6 Avoid vector copies in range-for loops in opt/types.cpp 87f9cfa Disambiguate between const and nonconst ForEachSuccessorLabel bc1ec94 Add general folding infrastructure. 1c0056c Start v2018.1-dev c430a41 Finalize v2018.0 bcd4f23 Update CHANGES abe1132 Reordering performance passes ordering to produce better opts 50e85c8 Add LoopUtils class to gather some loop transformation support. 61d8c03 Add pass to reaplce invalid opcodes d37869c Added OpenCL ExtInst validation rules cd68f2b Add adjacency validation pass 905536c Fixed harmless uninit var warning ac537c7 Use SPIR-V headers from "unified1" directory 2735e08 Remove constexpr from Analysis operators 0aa0ac5 Opt: Add ScalarReplacement to RegisterSizePasses 44d88c8 Add memory semantics checks to validate atomics 38f297c Update CHANGES 1694923 Prevent unnecessary changes to the IR in dead branch elim c86cb76 Improved error message in val capabilities e661da7 Enhancements to block merging 6704233 Fix dereference of possibly nullptr f28b106 InsertExtractElim: Split out DeadInsertElim as separate pass 1b46f7e Fixes in CCP for GPUOpen-Drivers#1228 6018de8 Add LoopDescriptor as an IRContext analysis. 684997e DeadInsertElim: Detect and DCE dead Inserts 2e93e80 Initial implementation of if conversion b2eb840 Validator: restricted some atomic ops for shaders bdc7837 Added Vulkan-specifc checks to image validation c4835e1 Use id_map in Fold*ToConstant 6c409e3 Add generic folding function and use in CCP 3b780db Fixes infinite loop in ADCE cf3b2a5 Introduce an instruction builder helper class. 73940ab Simplifying code for adding instructions to worklist 34d4294 Create a pass to work around a driver bug related to OpUnreachable. 1861806 Adding testcase for GPUOpen-Drivers#1210 0b1372a CFG: force the creation of a predecessor entry for all basic block. 3604c0b spirv-dis: Add --color option to force color disassembly 5e70d20 Fixing missing early exit from break identification 80b743a Adding support for switch removal in ADCE 3a0eb44 Capturing value table by reference in local redundancy elim ae6daee Update CHANGES 5ffe862 Fixes missing increment in common uniform elim 6cc772c Skip SpecConstants in CCP. ba017f7 Update CHANGES c2aadb0 Add MatrixConstant 8cb0aec Remove redundant passes from legalization passes 6587d3f Adding early exit versions of several ForEach* methods 24f9947 Move initialization of the const mgr to the constructor. 86dec64 Start v2018.0-dev 902ed46 Finalize v2017.3 672494d Adding ostream operators for IR structures eb0c73d Maintain instruction to block mapping in phi insertion 5eafc00 InsertExtractElim: Optimize through VectorShuffle, Mix 1ebd860 Add generic folding function and use in CCP 3a054e1 Adding additional functionality to ADCE. d54a286 Fix validation rules for GLSL pack/unpack 2x32 1b6cfd3 Rewriting dead branch elimination. e5560d6 Fix constant propagation of induction variables. a82a0ea Fix method comment for BasicBlock::MegeBlockIdIfAny 44f27f9 Allow relaxing validation of pointers in logical addressing mode e8ad02f Add loop descriptors and some required dominator tree extensions. 6e9ea2e AnalyzeInstUse: Reuse the instruction lookup 3fbbd3c Remove CCP from size and performance recipes, pending bugfixes 7183ad5 Linker code cleanups ccb921d Allow getting the base pointer of an image load/store. 716718a Fix infinite simulation cycles in SSA propagator. 120ddff Ignore clang-format-diff.py from copyrights check ac9a828 dead branch elim: Track killed backedges c32e79e Add --print-all optimizer option 702852b Opt: Make DecorationManager::HaveTheSameDecorations symmetric a376b19 Validator checks out of bounds composite access 5b52626 Address review comments from KhronosGroup/SPIRV-Tools#985. 7834bee Update legalization passes e8f2890 Replace calls to `ToNop` by `KillInst`. 5f10078 Handle execution termination instructions when building edges. 135150a Do not insert Phi nodes in CCP propagator. 25d396b Add ExtInst validation pass (GLSL only for now) 226f263 Test: Fix linux/gcc defined-but-not-used warnings/errors b185a3d utils/generate_grammar_tables.py: use spaces for indentation 1acce99 Fix KhronosGroup/SPIRV-Tools#1130 a91aa53 Disallow Dim=SubpassData for OpImageSparseRead 59de610 Add asm, dis support for DebugInfo extended instruction set a27d673 CONTRIBUTING: If you fixed a bug, say so 4ba9dcc Implement SSA CCP (SSA Conditional Constant Propagation). 756b277 Store all enabled capabilities in the feature manger. 8e0051c Update CHANGES 1ab8ad6 Fixing bugs in type manager memory management 7505d24 Update the legalization passes. c9a881e Make a string parameter const ref 88409b7 Fix CHANGES: there is no OpImageSparseWrite 2e5672d Update CHANGES for recent changes 424f744 Opt: Fix implementation and comment of AreDecorationsTheSame Target should not be ignored when comparing decorations in RemoveDuplicates Opt: Remove unused code in RemoveDuplicateDecorations 79a0064 Allow pointers to pointers in logical addressing mode. b86eb68 Convert private variables to function scope. 8135dd6 More validation on primitive instructions 4dbcef6 validate & test of literal's upper bits f359635 Opt: Remove commented out duplicated type_id function 0d8ea48 Fix comment in primitives validation dbc3a66 Image Operand Sample allows sparse image opcodes 8c05012 Export a config file for pkg-config 0dbe184 Remove concept of FIRST_CONCRETE_* operand types 6169085 Improving the usability of the type manager. The type manager hashes types. This allows the lookup of type declaration ids from arbitrarily constructed types. Users should be cautious when dealing with non-unique types (structs and potentially pointers) to get the exact id if necessary. 7361034 Start v2017.3-dev 1ccfb58 Finalize v2017.2 0f80406 ADCE: Only mark true breaks and continues of live loops cdfbf26 Add primitive instruction validation pass af7d579 Refactor include of latest spir-v header versions 532b327 Add validation rules for atomic instructions 853a3d6 Fix uninitialized warning at -Os. 22faa2b ADCE: Empty Loop Elimination 07ce16d Set the parent for basic blocks during inlining. 2fc1221 Appveyor: stop testing on VS 2013 c520d43 Add validator checks for sparse image opcodes 12447d8 Support OpenCL 1.2 and 2.0 target environments 059fe08 AppVeyor: Put VS 2017 first 7ba59ac Force gtest to expose ::testing::Combine dbd8d0e Reenable OpCopyObject validation rules 867451f Add scalar replacement 78c025a MultiStore: Support OpVariable Initialization 70f88f5 Add external/SPIRV-Headers to .gitignore c6fdf68 SingleStore: Support OpVariable Initialization a05ad01 Add option to spirv-opt to skip the validator. 241dcac Add a new constant manager class. 5d602ab Add global redundancy elimination 851e1ad Kill names and decoration in inlining. 731d189 Add depth first iterator for trees 0c2396d Revert extraneous changes from commit 8ec62deb2. 8ba68fa Dominator Tree Analysis (GPUOpen-Drivers#3) 692a22c Sort flags in help message - NFC. b93c066 CMake: allow both SPIRV-Headers and spirv-headers 94e3e7b Add composite instruction validation pass 3b6c4f1 Do not zip and deploy for check formatting adb9396 Go back to root directory 235ef34 Travis CI: add clang-format check 1af6c4a Update .appveyor.yml bf18431 Fix some of the known issues in image validation fd3a220 DCEInst kill the same instruction twice. 726573a Change Release builds to Release with debug info on Linux e9ecc0c Remove cfg_ field from SSAPropagator class - NFC. 65046ec Change IRContext::KillInst to delete instructions. b35b52f Compute value number when the value table is constructed. b98254b Fixed typo that leaked to the binary 9996173 Add simplified instructions for pushing a reviewed PR. 22582fa Travis: mark MacOS builds as optional 2885c65 Re-format CONTRIBUTING.md - NFC. 0dd4ee2 Fix Dref type check in validator b8aeab8 Appveyor: use ninja instead of MSBuild 6904396 Opt: Remove unused lambda captures 1379535 Support outputting ANSI color escape sequences in library 188cd37 Erase decorations removed from internal collections 3c2e4c7 Fix validation of group ops in SPV_AMD_shader_ballot 8cfa0c4 Fix GPUOpen-Drivers#1034 - Give Edge::operator<() weak ordering semantics. e1ceff9 Validate OpTypeImage and OpTypeSampleImage 4c58086 Linker: Fix incorrect exit status. d78e11c Create CONTRIBUTING.md 8dd3d93 AggressiveDCE: Add merge and continue branches for live loop. 5f2589f Update README about the automatic master-tot relase 9f20799 Convert the CFG to an on-demand analysis - NFC. 8ffed97 Fix windows build. unsigned vs signed comparison in EXPECT_EQ. 7432784 Generic value propagation engine. 491b112 Fix windows build. 8322813 Re-format source tree - NFC. d8b2013 Derivative opcodes require Fragment exec model c170afd Relaxed OpImageWrite texel type check e1a6f8d Update CHANGES to mention fixes for 1007 and 1009 f84f266 Relaxed OpImageRead validation rules 0cae89e Notify the context of instructions that are being erased. 3e08a3f Add validation checks for Execution Model d9129f0 Test for pollution of the global namespace 0b1cb27 Remove derivative instructions from the list of combinators. b0a7037 Start v2017.2-dev 493c088 Finalize 2017.1 aec60b8 Add RegisterLegalizationPasses() into the interface 746bfd2 Adding new def -> use mapping container b02c9a5 Allow derived access chain without uses in access chain conversion ab892f7 Add derivatives validation pass c299927 Move SetContextMessageConsumer into libspirv namespace 28c4155 Create a local value numbering pass f407ae2 Validator pass for image instructions e28edd4 Optimize loads/stores on nested structs b142915 Fix move semantics in iterator make_range 250a235 Add new compression algorithm and models a771713 Adding an unique id to Instruction generated by IRContext 3214c3b Add dead function elimination to -O and -Os 4019bcf Fix hard-coded header path dbf9b37 Git should ignore external repos eb4653a Add the decoration manager to the IRContext. a92d69b Initial implementation of merge return pass. 0126ad9 Appveyor: skip building tags 919c990 Appveyor: Stop testing VS 2013/2015 Debug 98281ed Add analysis to compute mappings between instructions and basic blocks. a76d097 Fix decorations of inlined functions. 76555bd Tests: Add optional dependency on Effcee stateful matcher efe12ff Have all MemPasses preserve the def-use manager. 039c12f Travis: auto deploy build artifacts to GitHub Releases 651ba75 Appveyor: auto deploy build artifacts to GitHub Releases d2938e4 Re-format files in source, source/opt, source/util, source/val and tools. f32d11f Add the IRContext (part 2): Add def-use manager ac04b2f Opt: Fix HasLoads to not report decoration as load. d86c7ce Opt: Remove CommonUniformElimination from -O and -Os (for now) 1affe5a Describe public_spirv_tools_dev@khronos.org mailing list 2dddb81 Validate storage class of target pointer for OpStore 9d6cc26 Move class CFG from namespace opt to namespace ir. fef669f Add a new class opt::CFG to represent the CFG for the module. 476cae6 Add the IRContext (part 1) d861cef Add validation for OpBranchConditional 7299fb5 Lowered initial capacity of move-to-front sequence b1b4948 Fix copyright check when the build directory is in the source directory. 94bec26 ADCE: Dead if elimination 632e206 More re-factoring to simplify pass initialization. 716138e Add option to relax validation of store types. 6724c27 Compression: removed 'presumed index' feature f063f91 Use std::lower_bound for opcode lookup 1040a95 Re-factor Phi insertion code out of LocalMultiStoreElimPass 94dc66b Change the sections in the module to use the InstructionList class. 063dbea Turn all function static non-POD variables into global POD variables git-pf-change: stg@1521268
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please address request for changes in:
#1102 (review)
The text was updated successfully, but these errors were encountered: