| OLD | NEW |
| 1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- C++ -*-===// | 1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This file declares the TargetLowering, LoweringContext, and | 10 // This file declares the TargetLowering, LoweringContext, and |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 | 391 |
| 392 protected: | 392 protected: |
| 393 void emitGlobal(const VariableDeclaration &Var, | 393 void emitGlobal(const VariableDeclaration &Var, |
| 394 const IceString &SectionSuffix); | 394 const IceString &SectionSuffix); |
| 395 | 395 |
| 396 // For now, we assume .long is the right directive for emitting 4 byte | 396 // For now, we assume .long is the right directive for emitting 4 byte |
| 397 // emit global relocations. However, LLVM MIPS usually uses .4byte instead. | 397 // emit global relocations. However, LLVM MIPS usually uses .4byte instead. |
| 398 // Perhaps there is some difference when the location is unaligned. | 398 // Perhaps there is some difference when the location is unaligned. |
| 399 static const char *getEmit32Directive() { return ".long"; } | 399 static const char *getEmit32Directive() { return ".long"; } |
| 400 | 400 |
| 401 explicit TargetDataLowering(GlobalContext *Ctx) : Ctx(Ctx) {} | 401 explicit TargetDataLowering(GlobalContext *MyCtx) : Ctx(MyCtx) {} |
| 402 GlobalContext *Ctx; | 402 GlobalContext *Ctx; |
| 403 }; | 403 }; |
| 404 | 404 |
| 405 // TargetHeaderLowering is used to "lower" the header of an output file. | 405 // TargetHeaderLowering is used to "lower" the header of an output file. |
| 406 // It writes out the target-specific header attributes. E.g., for ARM | 406 // It writes out the target-specific header attributes. E.g., for ARM |
| 407 // this writes out the build attributes (float ABI, etc.). | 407 // this writes out the build attributes (float ABI, etc.). |
| 408 class TargetHeaderLowering { | 408 class TargetHeaderLowering { |
| 409 TargetHeaderLowering() = delete; | 409 TargetHeaderLowering() = delete; |
| 410 TargetHeaderLowering(const TargetHeaderLowering &) = delete; | 410 TargetHeaderLowering(const TargetHeaderLowering &) = delete; |
| 411 TargetHeaderLowering &operator=(const TargetHeaderLowering &) = delete; | 411 TargetHeaderLowering &operator=(const TargetHeaderLowering &) = delete; |
| 412 | 412 |
| 413 public: | 413 public: |
| 414 static std::unique_ptr<TargetHeaderLowering> | 414 static std::unique_ptr<TargetHeaderLowering> |
| 415 createLowering(GlobalContext *Ctx); | 415 createLowering(GlobalContext *Ctx); |
| 416 virtual ~TargetHeaderLowering(); | 416 virtual ~TargetHeaderLowering(); |
| 417 | 417 |
| 418 virtual void lower() {} | 418 virtual void lower() {} |
| 419 | 419 |
| 420 protected: | 420 protected: |
| 421 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {} | 421 explicit TargetHeaderLowering(GlobalContext *MyCtx) : Ctx(MyCtx) {} |
| 422 GlobalContext *Ctx; | 422 GlobalContext *Ctx; |
| 423 }; | 423 }; |
| 424 | 424 |
| 425 } // end of namespace Ice | 425 } // end of namespace Ice |
| 426 | 426 |
| 427 #endif // SUBZERO_SRC_ICETARGETLOWERING_H | 427 #endif // SUBZERO_SRC_ICETARGETLOWERING_H |
| OLD | NEW |