mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-16 05:01:56 +00:00
0722a1e5d5
We now only delete trivially dead instructions in the BB we copy (copyBB), but not in any other BB. Only for copyBB we know that there will _never_ be any future uses of instructions that have no use after copyBB has been generated. Other instructions in the AST that have been generated by IslNodeBuilder may look dead at the moment, but may possibly still be referenced by GlobalMaps. If we delete them now, later uses would break surprisingly. We do not have a test case that breaks due to us deleting too many instructions. This issue was found by inspection. llvm-svn: 248688