#define LLVM_CODEGEN_MACHINEFUNCTION_H
#include "llvm/ADT/ilist.h"
-#include "llvm/CodeGen/DebugLoc.h"
+#include "llvm/Support/DebugLoc.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/Support/Annotation.h"
#include "llvm/Support/Allocator.h"
const Function *Fn;
const TargetMachine &Target;
- // HasBuiltinSetjmp - true if the function uses builtin_setjmp. Used to
- // adjust callee-saved register tracking.
- bool HasBuiltinSetjmp;
-
// RegInfo - Information about each register in use in the function.
MachineRegisterInfo *RegInfo;
// Tracks debug locations.
DebugLocTracker DebugLocInfo;
+ // The alignment of the function.
+ unsigned Alignment;
+
public:
MachineFunction(const Function *Fn, const TargetMachine &TM);
~MachineFunction();
///
const TargetMachine &getTarget() const { return Target; }
- /// doesHaveBuiltinSetjmp - Return whether this function uses builtin_setjmp
- ///
- bool doesHaveBuiltinSetjmp() const { return HasBuiltinSetjmp; }
-
- /// setHasBuiltinSetjmp - Mark whether this function uses builtin_setjmp
- ///
- void setHasBuiltinSetjmp (bool flag) { HasBuiltinSetjmp = flag; }
-
/// getRegInfo - Return information about the registers currently in use.
///
MachineRegisterInfo &getRegInfo() { return *RegInfo; }
MachineConstantPool *getConstantPool() { return ConstantPool; }
const MachineConstantPool *getConstantPool() const { return ConstantPool; }
+ /// getAlignment - Return the alignment (log2, not bytes) of the function.
+ ///
+ unsigned getAlignment() const { return Alignment; }
+
+ /// setAlignment - Set the alignment (log2, not bytes) of the function.
+ ///
+ void setAlignment(unsigned A) { Alignment = A; }
+
/// MachineFunctionInfo - Keep track of various per-function pieces of
/// information for backends that would like to do so.
///
/// setDefaultDebugLoc - Get the default debug location for the machine
/// function.
void setDefaultDebugLoc(DebugLoc DL) { DefaultDebugLoc = DL; }
+
+ /// getDebugLocInfo - Get the debug info location tracker.
+ DebugLocTracker &getDebugLocInfo() { return DebugLocInfo; }
};
//===--------------------------------------------------------------------===//