Author: djg Date: Tue Sep 25 10:10:49 2007 New Revision: 42297 URL: http://llvm.org/viewvc/llvm-project?rev=42297&view=rev Log: Move the setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand) and the check to see if the assembler supports .loc from X86TargetLowering into the superclass TargetLowering.
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=42297&r1=42296&r2=42297&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Tue Sep 25 10:10:49 2007 @@ -20,6 +20,7 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/MathExtras.h" +#include "llvm/Target/TargetAsmInfo.h" using namespace llvm; /// InitLibcallNames - Set default libcall names. @@ -169,6 +170,10 @@ InitLibcallNames(LibcallRoutineNames); InitCmpLibcallCCs(CmpLibcallCCs); + + // Tell Legalize whether the assembler supports DEBUG_LOC. + if (!TM.getTargetAsmInfo()->hasDotLocAndDotFile()) + setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand); } TargetLowering::~TargetLowering() {} Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=42297&r1=42296&r2=42297&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Sep 25 10:10:49 2007 @@ -33,7 +33,6 @@ #include "llvm/CodeGen/SSARegMap.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/MathExtras.h" -#include "llvm/Target/TargetAsmInfo.h" #include "llvm/Target/TargetOptions.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ParameterAttributes.h" @@ -231,13 +230,8 @@ setOperationAction(ISD::MEMSET , MVT::Other, Custom); setOperationAction(ISD::MEMCPY , MVT::Other, Custom); - // Use the default ISD::LOCATION expansion, and tell Legalize it's - // ok to use DEBUG_LOC if we have an assembler that supports it. + // Use the default ISD::LOCATION expansion. setOperationAction(ISD::LOCATION, MVT::Other, Expand); - if (TM.getTargetAsmInfo()->hasDotLocAndDotFile()) - setOperationAction(ISD::DEBUG_LOC, MVT::Other, Legal); - else - setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand); // FIXME - use subtarget debug flags if (!Subtarget->isTargetDarwin() && !Subtarget->isTargetELF() && _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits