From b012699741a39d473292758b6211963f8b2eea4b Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 5 May 2016 23:19:08 +0000 Subject: SDAG: Rename Select->SelectImpl and repurpose Select as returning void This is a step towards removing the rampant undefined behaviour in SelectionDAG, which is a part of llvm.org/PR26808. We rename SelectionDAGISel::Select to SelectImpl and update targets to match, and then change Select to return void and consolidate the sketchy behaviour we're trying to get away from there. Next, we'll update backends to implement `void Select(...)` instead of SelectImpl and eventually drop the base Select implementation. llvm-svn: 268693 --- llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp') diff --git a/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp b/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp index 4d3ec538d9f..d9cff7e88b2 100644 --- a/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp +++ b/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp @@ -41,7 +41,7 @@ namespace { XCoreDAGToDAGISel(XCoreTargetMachine &TM, CodeGenOpt::Level OptLevel) : SelectionDAGISel(TM, OptLevel) {} - SDNode *Select(SDNode *N) override; + SDNode *SelectImpl(SDNode *N) override; SDNode *SelectBRIND(SDNode *N); /// getI32Imm - Return a target constant with the specified value, of type @@ -69,14 +69,14 @@ namespace { const char *getPassName() const override { return "XCore DAG->DAG Pattern Instruction Selection"; - } - + } + // Include the pieces autogenerated from the target description. #include "XCoreGenDAGISel.inc" }; } // end anonymous namespace -/// createXCoreISelDag - This pass converts a legalized DAG into a +/// createXCoreISelDag - This pass converts a legalized DAG into a /// XCore-specific DAG, ready for instruction scheduling. /// FunctionPass *llvm::createXCoreISelDag(XCoreTargetMachine &TM, @@ -129,7 +129,7 @@ SelectInlineAsmMemoryOperand(const SDValue &Op, unsigned ConstraintID, return false; } -SDNode *XCoreDAGToDAGISel::Select(SDNode *N) { +SDNode *XCoreDAGToDAGISel::SelectImpl(SDNode *N) { SDLoc dl(N); switch (N->getOpcode()) { default: break; @@ -204,7 +204,7 @@ SDNode *XCoreDAGToDAGISel::Select(SDNode *N) { /// Given a chain return a new chain where any appearance of Old is replaced /// by New. There must be at most one instruction between Old and Chain and -/// this instruction must be a TokenFactor. Returns an empty SDValue if +/// this instruction must be a TokenFactor. Returns an empty SDValue if /// these conditions don't hold. static SDValue replaceInChain(SelectionDAG *CurDAG, SDValue Chain, SDValue Old, SDValue New) -- cgit v1.2.3