From 74715dd29986409c4735b195858a314686a11263 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 23 Feb 2010 19:33:11 +0000 Subject: [PATCH] no need to override IsLegalToFold, the base implementation disables load folding at -O0. llvm-svn: 96973 --- lib/Target/X86/X86ISelDAGToDAG.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index b6e86bdce76..b337e61af12 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -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.