aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineFunction.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-07-31 18:16:33 +0000
committerDan Gohman <gohman@apple.com>2009-07-31 18:16:33 +0000
commitad2afc2a421a0e41603d5eee412d4d8c77e9bc1c (patch)
treef06c032e6c95e27a621685fb4a2a2f07469ca076 /include/llvm/CodeGen/MachineFunction.h
parent56594f98848ac6d1885662644b5652c04c0d0831 (diff)
Reapply r77654 with a fix: MachineFunctionPass's getAnalysisUsage
shouldn't do AU.setPreservesCFG(), because even though CodeGen passes don't modify the LLVM IR CFG, they may modify the MachineFunction CFG, and passes like MachineLoop are registered with isCFGOnly set to true. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77691 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFunction.h')
-rw-r--r--include/llvm/CodeGen/MachineFunction.h21
1 files changed, 3 insertions, 18 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index ea6a384d22..b306583a5a 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -67,7 +67,7 @@ struct MachineFunctionInfo {
};
class MachineFunction : private Annotation {
- const Function *Fn;
+ Function *Fn;
const TargetMachine &Target;
// RegInfo - Information about each register in use in the function.
@@ -115,12 +115,12 @@ class MachineFunction : private Annotation {
unsigned Alignment;
public:
- MachineFunction(const Function *Fn, const TargetMachine &TM);
+ MachineFunction(Function *Fn, const TargetMachine &TM);
~MachineFunction();
/// getFunction - Return the LLVM function that this machine code represents
///
- const Function *getFunction() const { return Fn; }
+ Function *getFunction() const { return Fn; }
/// getTarget - Return the target machine this machine code is compiled with
///
@@ -229,21 +229,6 @@ public:
///
void dump() const;
- /// construct - Allocate and initialize a MachineFunction for a given Function
- /// and Target
- ///
- static MachineFunction& construct(const Function *F, const TargetMachine &TM);
-
- /// destruct - Destroy the MachineFunction corresponding to a given Function
- ///
- static void destruct(const Function *F);
-
- /// get - Return a handle to a MachineFunction corresponding to the given
- /// Function. This should not be called before "construct()" for a given
- /// Function.
- ///
- static MachineFunction& get(const Function *F);
-
// Provide accessors for the MachineBasicBlock list...
typedef BasicBlockListType::iterator iterator;
typedef BasicBlockListType::const_iterator const_iterator;