diff options
author | Juergen Ributzka <juergen@apple.com> | 2014-01-24 20:18:00 +0000 |
---|---|---|
committer | Juergen Ributzka <juergen@apple.com> | 2014-01-24 20:18:00 +0000 |
commit | 4f3df4ad648b5e683a7ae37ab5ab03cecc5f1b3b (patch) | |
tree | 632ad16ca67d672c155239dda472aff945af4d99 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp | |
parent | 51a9838049dae8d6023a8cfa79cced3733cd17ab (diff) | |
download | bcm5719-llvm-4f3df4ad648b5e683a7ae37ab5ab03cecc5f1b3b.tar.gz bcm5719-llvm-4f3df4ad648b5e683a7ae37ab5ab03cecc5f1b3b.zip |
Add Constant Hoisting Pass
Retry commit r200022 with a fix for the build bot errors. Constant expressions
have (unlike instructions) module scope use lists and therefore may have users
in different functions. The fix is to simply ignore these out-of-function uses.
llvm-svn: 200034
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp index 79377f74247..6f980884bea 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp @@ -81,7 +81,10 @@ std::string SDNode::getOperationName(const SelectionDAG *G) const { case ISD::VALUETYPE: return "ValueType"; case ISD::Register: return "Register"; case ISD::RegisterMask: return "RegisterMask"; - case ISD::Constant: return "Constant"; + case ISD::Constant: + if (cast<ConstantSDNode>(this)->isOpaque()) + return "OpaqueConstant"; + return "Constant"; case ISD::ConstantFP: return "ConstantFP"; case ISD::GlobalAddress: return "GlobalAddress"; case ISD::GlobalTLSAddress: return "GlobalTLSAddress"; @@ -111,7 +114,10 @@ std::string SDNode::getOperationName(const SelectionDAG *G) const { } case ISD::BUILD_VECTOR: return "BUILD_VECTOR"; - case ISD::TargetConstant: return "TargetConstant"; + case ISD::TargetConstant: + if (cast<ConstantSDNode>(this)->isOpaque()) + return "OpaqueTargetConstant"; + return "TargetConstant"; case ISD::TargetConstantFP: return "TargetConstantFP"; case ISD::TargetGlobalAddress: return "TargetGlobalAddress"; case ISD::TargetGlobalTLSAddress: return "TargetGlobalTLSAddress"; |