mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 06:25:18 +00:00
Clear HandleMap and ReplaceMap after instruction selection. Or it may cause
non-deterministic behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28454 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -161,6 +161,8 @@ void ARMDAGToDAGISel::InstructionSelectBasicBlock(SelectionDAG &DAG) {
|
|||||||
|
|
||||||
DAG.setRoot(SelectRoot(DAG.getRoot()));
|
DAG.setRoot(SelectRoot(DAG.getRoot()));
|
||||||
CodeGenMap.clear();
|
CodeGenMap.clear();
|
||||||
|
HandleMap.clear();
|
||||||
|
ReplaceMap.clear();
|
||||||
DAG.RemoveDeadNodes();
|
DAG.RemoveDeadNodes();
|
||||||
|
|
||||||
ScheduleAndEmitDAG(DAG);
|
ScheduleAndEmitDAG(DAG);
|
||||||
|
@@ -155,6 +155,8 @@ void AlphaDAGToDAGISel::InstructionSelectBasicBlock(SelectionDAG &DAG) {
|
|||||||
// Select target instructions for the DAG.
|
// Select target instructions for the DAG.
|
||||||
DAG.setRoot(SelectRoot(DAG.getRoot()));
|
DAG.setRoot(SelectRoot(DAG.getRoot()));
|
||||||
CodeGenMap.clear();
|
CodeGenMap.clear();
|
||||||
|
HandleMap.clear();
|
||||||
|
ReplaceMap.clear();
|
||||||
DAG.RemoveDeadNodes();
|
DAG.RemoveDeadNodes();
|
||||||
|
|
||||||
// Emit machine code to BB.
|
// Emit machine code to BB.
|
||||||
|
@@ -148,6 +148,8 @@ void IA64DAGToDAGISel::InstructionSelectBasicBlock(SelectionDAG &DAG) {
|
|||||||
// Select target instructions for the DAG.
|
// Select target instructions for the DAG.
|
||||||
DAG.setRoot(SelectRoot(DAG.getRoot()));
|
DAG.setRoot(SelectRoot(DAG.getRoot()));
|
||||||
CodeGenMap.clear();
|
CodeGenMap.clear();
|
||||||
|
HandleMap.clear();
|
||||||
|
ReplaceMap.clear();
|
||||||
DAG.RemoveDeadNodes();
|
DAG.RemoveDeadNodes();
|
||||||
|
|
||||||
// Emit machine code to BB.
|
// Emit machine code to BB.
|
||||||
|
@@ -206,6 +206,8 @@ void PPCDAGToDAGISel::InstructionSelectBasicBlock(SelectionDAG &DAG) {
|
|||||||
// Select target instructions for the DAG.
|
// Select target instructions for the DAG.
|
||||||
DAG.setRoot(SelectRoot(DAG.getRoot()));
|
DAG.setRoot(SelectRoot(DAG.getRoot()));
|
||||||
CodeGenMap.clear();
|
CodeGenMap.clear();
|
||||||
|
HandleMap.clear();
|
||||||
|
ReplaceMap.clear();
|
||||||
DAG.RemoveDeadNodes();
|
DAG.RemoveDeadNodes();
|
||||||
|
|
||||||
// Emit machine code to BB.
|
// Emit machine code to BB.
|
||||||
|
@@ -996,6 +996,8 @@ void SparcDAGToDAGISel::InstructionSelectBasicBlock(SelectionDAG &DAG) {
|
|||||||
// Select target instructions for the DAG.
|
// Select target instructions for the DAG.
|
||||||
DAG.setRoot(SelectRoot(DAG.getRoot()));
|
DAG.setRoot(SelectRoot(DAG.getRoot()));
|
||||||
CodeGenMap.clear();
|
CodeGenMap.clear();
|
||||||
|
HandleMap.clear();
|
||||||
|
ReplaceMap.clear();
|
||||||
DAG.RemoveDeadNodes();
|
DAG.RemoveDeadNodes();
|
||||||
|
|
||||||
// Emit machine code to BB.
|
// Emit machine code to BB.
|
||||||
|
@@ -186,6 +186,8 @@ void X86DAGToDAGISel::InstructionSelectBasicBlock(SelectionDAG &DAG) {
|
|||||||
DEBUG(std::cerr << "===== Instruction selection ends:\n");
|
DEBUG(std::cerr << "===== Instruction selection ends:\n");
|
||||||
#endif
|
#endif
|
||||||
CodeGenMap.clear();
|
CodeGenMap.clear();
|
||||||
|
HandleMap.clear();
|
||||||
|
ReplaceMap.clear();
|
||||||
DAG.RemoveDeadNodes();
|
DAG.RemoveDeadNodes();
|
||||||
|
|
||||||
// Emit machine code to BB.
|
// Emit machine code to BB.
|
||||||
|
Reference in New Issue
Block a user