Chromium Code Reviews| Index: src/IceTargetLoweringX8632.cpp |
| diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp |
| index dd75168d5c2aad780defa36d9b5941c5590c84df..7b73a3b99e41b516f7dba6b29cfa165b7bbe4dd3 100644 |
| --- a/src/IceTargetLoweringX8632.cpp |
| +++ b/src/IceTargetLoweringX8632.cpp |
| @@ -4650,57 +4650,32 @@ void TargetX8632::makeRandomRegisterPermutation( |
| } |
| } |
| -template <> |
| -void ConstantInteger32::emitWithoutDollar(GlobalContext *Ctx) const { |
| +void TargetX8632::emit(const ConstantInteger32 *C) const { |
| if (!ALLOW_DUMP) |
| return; |
| Ostream &Str = Ctx->getStrEmit(); |
| - Str << (int32_t)getValue(); |
| + Str << getConstantPrefix() << C->getValue(); |
| } |
| -template <> void ConstantInteger32::emit(GlobalContext *Ctx) const { |
| - if (!ALLOW_DUMP) |
| - return; |
| - Ostream &Str = Ctx->getStrEmit(); |
| - Str << "$"; |
| - emitWithoutDollar(Ctx); |
| -} |
| - |
| -template <> void ConstantInteger64::emitWithoutDollar(GlobalContext *) const { |
| - llvm_unreachable("Not expecting to emitWithoutDollar 64-bit integers"); |
| -} |
| - |
| -template <> void ConstantInteger64::emit(GlobalContext *) const { |
| +void TargetX8632::emit(const ConstantInteger64 *) const { |
| llvm_unreachable("Not expecting to emit 64-bit integers"); |
|
Jim Stichnoth
2015/05/14 00:36:06
report_fatal_error?
jvoung (off chromium)
2015/05/14 16:14:48
Done.
Should this be conditioned on "if (!ALLOW_D
Jim Stichnoth
2015/05/14 16:22:05
I don't think so. The main purpose of ALLOW_DUMP
|
| } |
| -template <> void ConstantFloat::emitWithoutDollar(GlobalContext *) const { |
| - llvm_unreachable("Not expecting to emitWithoutDollar floats"); |
| -} |
| - |
| -template <> void ConstantFloat::emit(GlobalContext *Ctx) const { |
| +void TargetX8632::emit(const ConstantFloat *C) const { |
| if (!ALLOW_DUMP) |
| return; |
| Ostream &Str = Ctx->getStrEmit(); |
| - emitPoolLabel(Str); |
| -} |
| - |
| -template <> void ConstantDouble::emitWithoutDollar(GlobalContext *) const { |
| - llvm_unreachable("Not expecting to emitWithoutDollar doubles"); |
| + C->emitPoolLabel(Str); |
| } |
| -template <> void ConstantDouble::emit(GlobalContext *Ctx) const { |
| +void TargetX8632::emit(const ConstantDouble *C) const { |
| if (!ALLOW_DUMP) |
| return; |
| Ostream &Str = Ctx->getStrEmit(); |
| - emitPoolLabel(Str); |
| -} |
| - |
| -void ConstantUndef::emitWithoutDollar(GlobalContext *) const { |
| - llvm_unreachable("Not expecting to emitWithoutDollar undef"); |
| + C->emitPoolLabel(Str); |
| } |
| -void ConstantUndef::emit(GlobalContext *) const { |
| +void TargetX8632::emit(const ConstantUndef *) const { |
| llvm_unreachable("undef value encountered by emitter."); |
| } |