diff options
author | Guy Blank <guy.blank@intel.com> | 2017-08-07 05:51:14 +0000 |
---|---|---|
committer | Guy Blank <guy.blank@intel.com> | 2017-08-07 05:51:14 +0000 |
commit | 5ca01695f7fa0625e9bdc7ddb295ca028f72fff7 (patch) | |
tree | 6747a12cb01fe98acea54f3912027798f2f2d0f5 /llvm/lib | |
parent | b53b075bb17ff2f22ea0478304f61106ff130884 (diff) | |
download | bcm5719-llvm-5ca01695f7fa0625e9bdc7ddb295ca028f72fff7.tar.gz bcm5719-llvm-5ca01695f7fa0625e9bdc7ddb295ca028f72fff7.zip |
[SelectionDAG] reset NewNodesMustHaveLegalTypes flag between basic blocks
The NewNodesMustHaveLegalTypes flag is set to false at the beginning of CodeGenAndEmitDAG, and set to true after legalizing types.
But before calling CodeGenAndEmitDAG we build the DAG for the basic block.
So for the first basic block NewNodesMustHaveLegalTypes would be 'false' during the SDAG building, and for all other basic blocks it would be 'true'.
This patch sets the flag to false before SDAG building each basic block.
Differential Revision:
https://reviews.llvm.org/D33435
llvm-svn: 310239
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index ceab4d73976..0ac92b5efa2 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -646,6 +646,9 @@ static void reportFastISelFailure(MachineFunction &MF, void SelectionDAGISel::SelectBasicBlock(BasicBlock::const_iterator Begin, BasicBlock::const_iterator End, bool &HadTailCall) { + // Allow creating illegal types during DAG building for the basic block. + CurDAG->NewNodesMustHaveLegalTypes = false; + // Lower the instructions. If a call is emitted as a tail call, cease emitting // nodes for this block. for (BasicBlock::const_iterator I = Begin; I != End && !SDB->HasTailCall; ++I) { |