[optnone] Skip pass Float2Int on optnone functions.

Added test Float2Int/float2int-optnone.ll to verify that pass Float2Int
is not run on optnone functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233183 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrea Di Biagio
2015-03-25 12:22:37 +00:00
parent 47fd5639bc
commit 962dcdfdda
2 changed files with 20 additions and 0 deletions

View File

@@ -511,6 +511,9 @@ void Float2Int::cleanup() {
}
bool Float2Int::runOnFunction(Function &F) {
if (skipOptnoneFunction(F))
return false;
DEBUG(dbgs() << "F2I: Looking at function " << F.getName() << "\n");
// Clear out all state.
ECs = EquivalenceClasses<Instruction*>();