aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/Passes.h5
-rw-r--r--include/llvm/CodeGen/TwoAddressInstructionPass.h51
2 files changed, 5 insertions, 51 deletions
diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h
index 8868de1..3aee4ce 100644
--- a/include/llvm/CodeGen/Passes.h
+++ b/include/llvm/CodeGen/Passes.h
@@ -28,6 +28,11 @@ class TargetMachine;
//
extern const PassInfo *PHIEliminationID;
+// TwoAddressInstruction pass - This pass reduces two-address
+// instructions to use two operands. This destroys SSA information but
+// it is desired by register allocators.
+extern const PassInfo *TwoAddressInstructionPassID;
+
/// Creates a register allocator as the user specified on the command
/// line.
FunctionPass *createRegisterAllocator();
diff --git a/include/llvm/CodeGen/TwoAddressInstructionPass.h b/include/llvm/CodeGen/TwoAddressInstructionPass.h
deleted file mode 100644
index b268154..0000000
--- a/include/llvm/CodeGen/TwoAddressInstructionPass.h
+++ /dev/null
@@ -1,51 +0,0 @@
-//===-- llvm/CodeGen/TwoAddressInstructionPass.h - Two-Address instruction pass -*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements the Two-Address instruction rewriter pass. In
-// some architectures instructions have a combined source/destination
-// operand. In those cases the instruction cannot have three operands
-// as the destination is implicit (for example ADD %EAX, %EBX on the
-// IA-32). After code generation this restrictions are not handled and
-// instructions may have three operands. This pass remedies this and
-// reduces all two-address instructions to two operands.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CODEGEN_TWOADDRESSINSTRUCTIONPASS_H
-#define LLVM_CODEGEN_TWOADDRESSINSTRUCTIONPASS_H
-
-#include "llvm/CodeGen/MachineFunctionPass.h"
-#include "llvm/CodeGen/MachineBasicBlock.h"
-#include <iostream>
-#include <map>
-
-namespace llvm {
-
- class LiveVariables;
- class MRegisterInfo;
-
- class TwoAddressInstructionPass : public MachineFunctionPass
- {
- private:
- MachineFunction* mf_;
- const TargetMachine* tm_;
- const MRegisterInfo* mri_;
- LiveVariables* lv_;
-
- public:
- virtual void getAnalysisUsage(AnalysisUsage &AU) const;
-
- private:
- /// runOnMachineFunction - pass entry point
- bool runOnMachineFunction(MachineFunction&);
- };
-
-} // End llvm namespace
-
-#endif