[Lldb-commits] [PATCH] D69210: [Disassembler] Simplify MCInst predicates

2019-10-24 Thread Vedant Kumar via Phabricator via lldb-commits
vsk added a comment. I don't think it should be necessary to read the class in its entirety to understand when `m_opcode` is safe to use. However, as I'm not sure how the disassembler is called in to, I don't think it's a good idea to refactor the whole thing right away. Let's start with this

[Lldb-commits] [PATCH] D69210: [Disassembler] Simplify MCInst predicates

2019-10-21 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. In D69210#1717042 , @vsk wrote: > In D69210#1716861 , @clayborg wrote: > > > In D69210#1715679 , @vsk wrote: > > > > > Hm, this patch is bugging

[Lldb-commits] [PATCH] D69210: [Disassembler] Simplify MCInst predicates

2019-10-21 Thread Vedant Kumar via Phabricator via lldb-commits
vsk marked an inline comment as done. vsk added a comment. In D69210#1716861 , @clayborg wrote: > In D69210#1715679 , @vsk wrote: > > > Hm, this patch is bugging me. > > > > It looks a bit like instructions are

[Lldb-commits] [PATCH] D69210: [Disassembler] Simplify MCInst predicates

2019-10-21 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. In D69210#1715679 , @vsk wrote: > Hm, this patch is bugging me. > > It looks a bit like instructions are still decoded multiple times in > different ways (e.g. in the `Decode` and > `CalculateMnemonicOperandsAndComment`

[Lldb-commits] [PATCH] D69210: [Disassembler] Simplify MCInst predicates

2019-10-19 Thread Vedant Kumar via Phabricator via lldb-commits
vsk added a comment. Hm, this patch is bugging me. It looks a bit like instructions are still decoded multiple times in different ways (e.g. in the `Decode` and `CalculateMnemonicOperandsAndComment` methods, which both modify `m_opcode`). Any ideas on whether/how to consolidate these?

[Lldb-commits] [PATCH] D69210: [Disassembler] Simplify MCInst predicates

2019-10-18 Thread Vedant Kumar via Phabricator via lldb-commits
vsk created this revision. vsk added reviewers: jasonmolenda, ab. DisassemblerLLVMC exposes a few MCInst predicates (e.g. `HasDelaySlot`). Group the logic for evaluating the existing predicates together, to prep for adding new ones. This is NFC-ish: with this change, the existing predicates will