'optnone' should not disable DAG combiner.
[oota-llvm.git] / lib / CodeGen / SelectionDAG / DAGCombiner.cpp
index 355547964163ef757883fbe57002e9ca05a3323c..dbdde4e2dcf1f49759ba74ec676da5fc9f057a3d 100644 (file)
@@ -1183,11 +1183,6 @@ void DAGCombiner::Run(CombineLevel AtLevel) {
   LegalOperations = Level >= AfterLegalizeVectorOps;
   LegalTypes = Level >= AfterLegalizeTypes;
 
-  // Early exit if this basic block is in an optnone function.
-  if (DAG.getMachineFunction().getFunction()->hasFnAttribute(
-          Attribute::OptimizeNone))
-    return;
-
   // Add all the dag nodes to the worklist.
   for (SelectionDAG::allnodes_iterator I = DAG.allnodes_begin(),
        E = DAG.allnodes_end(); I != E; ++I)