summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2016-05-05 23:19:08 +0000
committerJustin Bogner <mail@justinbogner.com>2016-05-05 23:19:08 +0000
commitb012699741a39d473292758b6211963f8b2eea4b (patch)
tree098fdce2c5d309cf14b05eeffefba3f31b096e13 /llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp
parent465886ece19f3c66e751193ef67024afdaadb24b (diff)
downloadbcm5719-llvm-b012699741a39d473292758b6211963f8b2eea4b.tar.gz
bcm5719-llvm-b012699741a39d473292758b6211963f8b2eea4b.zip
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
Diffstat (limited to 'llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp')
-rw-r--r--llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp12
1 files changed, 6 insertions, 6 deletions
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)
OpenPOWER on IntegriCloud