mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200034 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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";
|
||||
|
Reference in New Issue
Block a user