[globalisel][tablegen] Keep track of the insertion point while adding BuildMIAction...
authorDaniel Sanders <daniel_l_sanders@apple.com>
Tue, 31 Oct 2017 19:54:05 +0000 (19:54 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Tue, 31 Oct 2017 19:54:05 +0000 (19:54 +0000)
commite8a4f0d869af3387be153656818e28432880ecb8
treede3dddc8e50fd1c02ce5d2c364e2bf1a9b1a5ddb
parent8732bbec1ec96d78c9d79df3c24aae686a7b7a91
[globalisel][tablegen] Keep track of the insertion point while adding BuildMIAction's. NFC

Multi-instruction emission needs to ensure the the instructions are generated
a depth-first fashion. For example:
  (ADDWrr (SUBWrr a, b), c)
needs to emit the SUBWrr before the ADDWrr. However, our walk over
TreePatternNode's is highly context sensitive which makes it difficult to append
BuildMIActions in the order we want. To fix this, we now keep track of the
insertion point as we add actions. This will allow multi-insn emission to insert
BuildMI's in the correct place.

llvm-svn: 317029
llvm/utils/TableGen/GlobalISelEmitter.cpp