diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-06-15 18:57:15 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-06-15 18:57:15 +0000 |
commit | 6fb124bee95d07f5d5aed42c92182a813fd31cbd (patch) | |
tree | ca14417ae3f771b325fd3dc3777847075fa05aae /lib/CodeGen/IfConversion.cpp | |
parent | 288694f430bc227d12b74f84f7e26e64d3b7f56b (diff) | |
download | external_llvm-6fb124bee95d07f5d5aed42c92182a813fd31cbd.zip external_llvm-6fb124bee95d07f5d5aed42c92182a813fd31cbd.tar.gz external_llvm-6fb124bee95d07f5d5aed42c92182a813fd31cbd.tar.bz2 |
IfConversion's AnalyzeBlocks method always returns false; clean it up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106027 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/IfConversion.cpp')
-rw-r--r-- | lib/CodeGen/IfConversion.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/CodeGen/IfConversion.cpp b/lib/CodeGen/IfConversion.cpp index 3c9071b..51ec096 100644 --- a/lib/CodeGen/IfConversion.cpp +++ b/lib/CodeGen/IfConversion.cpp @@ -167,8 +167,7 @@ namespace { std::vector<IfcvtToken*> &Tokens); bool FeasibilityAnalysis(BBInfo &BBI, SmallVectorImpl<MachineOperand> &Cond, bool isTriangle = false, bool RevBranch = false); - bool AnalyzeBlocks(MachineFunction &MF, - std::vector<IfcvtToken*> &Tokens); + void AnalyzeBlocks(MachineFunction &MF, std::vector<IfcvtToken*> &Tokens); void InvalidatePreds(MachineBasicBlock *BB); void RemoveExtraEdges(BBInfo &BBI); bool IfConvertSimple(BBInfo &BBI, IfcvtKind Kind); @@ -253,7 +252,8 @@ bool IfConverter::runOnMachineFunction(MachineFunction &MF) { while (IfCvtLimit == -1 || (int)NumIfCvts < IfCvtLimit) { // Do an initial analysis for each basic block and find all the potential // candidates to perform if-conversion. - bool Change = AnalyzeBlocks(MF, Tokens); + bool Change = false; + AnalyzeBlocks(MF, Tokens); while (!Tokens.empty()) { IfcvtToken *Token = Tokens.back(); Tokens.pop_back(); @@ -802,11 +802,9 @@ IfConverter::BBInfo &IfConverter::AnalyzeBlock(MachineBasicBlock *BB, } /// AnalyzeBlocks - Analyze all blocks and find entries for all if-conversion -/// candidates. It returns true if any CFG restructuring is done to expose more -/// if-conversion opportunities. -bool IfConverter::AnalyzeBlocks(MachineFunction &MF, +/// candidates. +void IfConverter::AnalyzeBlocks(MachineFunction &MF, std::vector<IfcvtToken*> &Tokens) { - bool Change = false; std::set<MachineBasicBlock*> Visited; for (unsigned i = 0, e = Roots.size(); i != e; ++i) { for (idf_ext_iterator<MachineBasicBlock*> I=idf_ext_begin(Roots[i],Visited), @@ -818,8 +816,6 @@ bool IfConverter::AnalyzeBlocks(MachineFunction &MF, // Sort to favor more complex ifcvt scheme. std::stable_sort(Tokens.begin(), Tokens.end(), IfcvtTokenCmp); - - return Change; } /// canFallThroughTo - Returns true either if ToBB is the next block after BB or |