[llvm-commits] CVS: llvm/include/llvm/Target/TargetMachine.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Dec 28 15:23:08 PST 2003
Changes in directory llvm/include/llvm/Target:
TargetMachine.h updated: 1.41 -> 1.42
---
Log message:
Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
implementation from the TargetMachine directly.
---
Diffs of the changes: (+12 -8)
Index: llvm/include/llvm/Target/TargetMachine.h
diff -u llvm/include/llvm/Target/TargetMachine.h:1.41 llvm/include/llvm/Target/TargetMachine.h:1.42
--- llvm/include/llvm/Target/TargetMachine.h:1.41 Fri Dec 19 19:21:37 2003
+++ llvm/include/llvm/Target/TargetMachine.h Sun Dec 28 15:22:35 2003
@@ -31,6 +31,7 @@
class FunctionPassManager;
class PassManager;
class Pass;
+class IntrinsicLowering;
//===----------------------------------------------------------------------===//
///
@@ -40,24 +41,27 @@
///
class TargetMachine {
const std::string Name;
- const TargetData DataLayout; // Calculates type size & alignment
+ const TargetData DataLayout; // Calculates type size & alignment
+ IntrinsicLowering *IL; // Specifies how to lower intrinsic calls
TargetMachine(const TargetMachine&); // DO NOT IMPLEMENT
void operator=(const TargetMachine&); // DO NOT IMPLEMENT
-protected:
- TargetMachine(const std::string &name, // Can only create subclasses...
+protected: // Can only create subclasses...
+ TargetMachine(const std::string &name, IntrinsicLowering *IL,
bool LittleEndian = false,
unsigned char PtrSize = 8, unsigned char PtrAl = 8,
unsigned char DoubleAl = 8, unsigned char FloatAl = 4,
unsigned char LongAl = 8, unsigned char IntAl = 4,
- unsigned char ShortAl = 2, unsigned char ByteAl = 1)
- : Name(name), DataLayout(name, LittleEndian,
- PtrSize, PtrAl, DoubleAl, FloatAl, LongAl,
- IntAl, ShortAl, ByteAl) {}
+ unsigned char ShortAl = 2, unsigned char ByteAl = 1);
public:
- virtual ~TargetMachine() {}
+ virtual ~TargetMachine();
const std::string &getName() const { return Name; }
+
+ // getIntrinsicLowering - This method returns a reference to an
+ // IntrinsicLowering instance which should be used by the code generator to
+ // lower unknown intrinsic functions to the equivalent LLVM expansion.
+ IntrinsicLowering &getIntrinsicLowering() const { return *IL; }
// Interfaces to the major aspects of target machine information:
// -- Instruction opcode and operand information
More information about the llvm-commits
mailing list