diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-09 07:14:22 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-09 07:14:22 +0000 |
commit | eac316468ad31a7bf286528ff9970c5794ba8539 (patch) | |
tree | f270708392612a47df3c09a023d1541097ae3147 /include | |
parent | ee4730ca7f8a92e54ddd4139b65b95c38c35e1b8 (diff) | |
download | external_llvm-eac316468ad31a7bf286528ff9970c5794ba8539.zip external_llvm-eac316468ad31a7bf286528ff9970c5794ba8539.tar.gz external_llvm-eac316468ad31a7bf286528ff9970c5794ba8539.tar.bz2 |
Turns out AnalyzeBranch can modify the mbb being analyzed. This is a nasty
suprise to some callers, e.g. register coalescer. For now, add an parameter
that tells AnalyzeBranch whether it's safe to modify the mbb. A better
solution is out there, but I don't have time to deal with it right now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64124 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetInstrInfo.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index 6f8eb1c..1ea4a96 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -195,9 +195,13 @@ public: /// Note that RemoveBranch and InsertBranch must be implemented to support /// cases where this method returns success. /// + /// If AllowModify is true, then this routine is allowed to modify the basic + /// block (e.g. delete instructions after the unconditional branch). + /// virtual bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, - SmallVectorImpl<MachineOperand> &Cond) const { + SmallVectorImpl<MachineOperand> &Cond, + bool AllowModify = false) const { return true; } |