diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-08-08 07:27:28 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-08-08 07:27:28 +0000 |
commit | 381cb07544a2bc119e39969d7d508a6247773e1c (patch) | |
tree | de1eda32a99fd429f6039db6ef1192332120149b /lib/CodeGen/SelectionDAG/SimpleBBISel.h | |
parent | ffa45431c8b14008e5e2c0473c0de177ee0655ce (diff) |
Add skeleton of simple basic block instruction selector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SimpleBBISel.h')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SimpleBBISel.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SimpleBBISel.h b/lib/CodeGen/SelectionDAG/SimpleBBISel.h new file mode 100644 index 0000000000..f5a8be588f --- /dev/null +++ b/lib/CodeGen/SelectionDAG/SimpleBBISel.h @@ -0,0 +1,45 @@ +//===-- SimpleBBISel.cpp - Definition of the SimpleBBISel class -----------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the SimpleBBISel class which handles simple basic block +// instruction selection. If the given BasicBlock is considered "simple", i.e. +// all operations are supported by the target and their types are legal, it +// does instruction directly from LLVM BasicBlock to MachineInstr's. +// +//===----------------------------------------------------------------------===// + +#ifndef SELECTIONDAG_SIMPLEBBISEL_H +#define SELECTIONDAG_SIMPLEBBISEL_H + +#include "llvm/Support/Compiler.h" + +namespace llvm { + +class BasicBlock; +class MachineBasicBlock; +class MachineFunction; +class TargetLowering; + +class VISIBILITY_HIDDEN SimpleBBISel { + MachineFunction &MF; + TargetLowering &TLI; + + public: + explicit SimpleBBISel(MachineFunction &mf, TargetLowering &tli) + : MF(mf), TLI(tli) {}; + + /// SelectBasicBlock - Try to convert a LLVM basic block into a + /// MachineBasicBlock using simple instruction selection. Returns false if it + /// is not able to do so. + bool SelectBasicBlock(BasicBlock *BB, MachineBasicBlock *MBB); +}; + +} // end namespace llvm. + +#endif |