summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/FastISel.h
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-07-09 16:37:18 +0000
committerBob Wilson <bob.wilson@apple.com>2010-07-09 16:37:18 +0000
commit02266e29f9250d74c5ec720aff23add3410ae920 (patch)
treeeab38ddb96c513afb1c30f74a30992a9ceaf3e50 /include/llvm/CodeGen/FastISel.h
parent9085fcab8276a8aaba33dc78bec2cdb0845351ba (diff)
downloadllvm-02266e29f9250d74c5ec720aff23add3410ae920.tar.gz
llvm-02266e29f9250d74c5ec720aff23add3410ae920.tar.bz2
llvm-02266e29f9250d74c5ec720aff23add3410ae920.tar.xz
--- Reverse-merging r107947 into '.':
U utils/TableGen/FastISelEmitter.cpp --- Reverse-merging r107943 into '.': U test/CodeGen/X86/fast-isel.ll U test/CodeGen/X86/fast-isel-loads.ll U include/llvm/Target/TargetLowering.h U include/llvm/Support/PassNameParser.h U include/llvm/CodeGen/FunctionLoweringInfo.h U include/llvm/CodeGen/CallingConvLower.h U include/llvm/CodeGen/FastISel.h U include/llvm/CodeGen/SelectionDAGISel.h U lib/CodeGen/LLVMTargetMachine.cpp U lib/CodeGen/CallingConvLower.cpp U lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp U lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp U lib/CodeGen/SelectionDAG/FastISel.cpp U lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp U lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp U lib/CodeGen/SelectionDAG/InstrEmitter.cpp U lib/CodeGen/SelectionDAG/TargetLowering.cpp U lib/Target/XCore/XCoreISelLowering.cpp U lib/Target/XCore/XCoreISelLowering.h U lib/Target/X86/X86ISelLowering.cpp U lib/Target/X86/X86FastISel.cpp U lib/Target/X86/X86ISelLowering.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107987 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/FastISel.h')
-rw-r--r--include/llvm/CodeGen/FastISel.h35
1 files changed, 13 insertions, 22 deletions
diff --git a/include/llvm/CodeGen/FastISel.h b/include/llvm/CodeGen/FastISel.h
index 7f3a7c7769..c5c457db0c 100644
--- a/include/llvm/CodeGen/FastISel.h
+++ b/include/llvm/CodeGen/FastISel.h
@@ -19,7 +19,6 @@
#include "llvm/ADT/SmallSet.h"
#endif
#include "llvm/CodeGen/ValueTypes.h"
-#include "llvm/CodeGen/MachineBasicBlock.h"
namespace llvm {
@@ -45,6 +44,7 @@ class TargetRegisterInfo;
/// lowering, but runs quickly.
class FastISel {
protected:
+ MachineBasicBlock *MBB;
DenseMap<const Value *, unsigned> LocalValueMap;
FunctionLoweringInfo &FuncInfo;
MachineRegisterInfo &MRI;
@@ -56,21 +56,23 @@ protected:
const TargetInstrInfo &TII;
const TargetLowering &TLI;
const TargetRegisterInfo &TRI;
- MachineInstr *LastLocalValue;
+ bool IsBottomUp;
public:
- /// getLastLocalValue - Return the position of the last instruction
- /// emitted for materializing constants for use in the current block.
- MachineInstr *getLastLocalValue() { return LastLocalValue; }
-
- /// setLastLocalValue - Update the position of the last instruction
- /// emitted for materializing constants for use in the current block.
- void setLastLocalValue(MachineInstr *I) { LastLocalValue = I; }
-
/// startNewBlock - Set the current block to which generated machine
/// instructions will be appended, and clear the local CSE map.
///
- void startNewBlock();
+ void startNewBlock(MachineBasicBlock *mbb) {
+ setCurrentBlock(mbb);
+ LocalValueMap.clear();
+ }
+
+ /// setCurrentBlock - Set the current block to which generated machine
+ /// instructions will be appended.
+ ///
+ void setCurrentBlock(MachineBasicBlock *mbb) {
+ MBB = mbb;
+ }
/// getCurDebugLoc() - Return current debug location information.
DebugLoc getCurDebugLoc() const { return DL; }
@@ -102,17 +104,6 @@ public:
/// index value.
std::pair<unsigned, bool> getRegForGEPIndex(const Value *V);
- /// recomputeInsertPt - Reset InsertPt to prepare for insterting instructions
- /// into the current block.
- void recomputeInsertPt();
-
- /// enterLocalValueArea - Prepare InsertPt to begin inserting instructions
- /// into the local value area and return the old insert position.
- MachineBasicBlock::iterator enterLocalValueArea();
-
- /// leaveLocalValueArea - Reset InsertPt to the given old insert position
- void leaveLocalValueArea(MachineBasicBlock::iterator OldInsertPt);
-
virtual ~FastISel();
protected: