no need to override IsLegalToFold, the base implementation
authorChris Lattner <sabre@nondot.org>
Tue, 23 Feb 2010 19:33:11 +0000 (19:33 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 23 Feb 2010 19:33:11 +0000 (19:33 +0000)
disables load folding at -O0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96973 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelDAGToDAG.cpp

index b6e86bdce767ca24ab547b6d76efbf2acc4111d3..b337e61af122c314590730c606f3a5ee7e9361aa 100644 (file)
@@ -185,8 +185,6 @@ namespace {
 
     virtual bool IsProfitableToFold(SDValue N, SDNode *U, SDNode *Root) const;
 
-    virtual bool IsLegalToFold(SDValue N, SDNode *U, SDNode *Root) const;
-
 // Include the pieces autogenerated from the target description.
 #include "X86GenDAGISel.inc"
 
@@ -382,14 +380,6 @@ X86DAGToDAGISel::IsProfitableToFold(SDValue N, SDNode *U, SDNode *Root) const {
   return true;
 }
 
-
-bool X86DAGToDAGISel::IsLegalToFold(SDValue N, SDNode *U, SDNode *Root) const {
-  if (OptLevel == CodeGenOpt::None) return false;
-
-  // Proceed to 'generic' cycle finder code
-  return SelectionDAGISel::IsLegalToFold(N, U, Root);
-}
-
 /// MoveBelowTokenFactor - Replace TokenFactor operand with load's chain operand
 /// and move load below the TokenFactor. Replace store's chain operand with
 /// load's chain result.