Chromium Code Reviews| 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 /// \file | 10 /// \file |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 // UnimplementedLoweringError is similar in style to UnimplementedError. Given | 48 // UnimplementedLoweringError is similar in style to UnimplementedError. Given |
| 49 // a TargetLowering object pointer and an Inst pointer, it adds appropriate | 49 // a TargetLowering object pointer and an Inst pointer, it adds appropriate |
| 50 // FakeDef and FakeUse instructions to try maintain liveness consistency. | 50 // FakeDef and FakeUse instructions to try maintain liveness consistency. |
| 51 #define UnimplementedLoweringError(Target, Instr) \ | 51 #define UnimplementedLoweringError(Target, Instr) \ |
| 52 do { \ | 52 do { \ |
| 53 if ((Target)->Ctx->getFlags().getSkipUnimplemented()) { \ | 53 if ((Target)->Ctx->getFlags().getSkipUnimplemented()) { \ |
| 54 (Target)->addFakeDefUses(Instr); \ | 54 (Target)->addFakeDefUses(Instr); \ |
| 55 } else { \ | 55 } else { \ |
| 56 /* Use llvm_unreachable instead of report_fatal_error, which gives \ | 56 /* Use llvm_unreachable instead of report_fatal_error, which gives \ |
| 57 better stack traces. */ \ | 57 better stack traces. */ \ |
| 58 llvm_unreachable("Not yet implemented"); \ | 58 llvm_unreachable( \ |
| 59 ("Not yet implemented: " + Instr->getInstName()).c_str()); \ | |
|
Jim Stichnoth
2016/01/27 22:31:51
The extra level of parentheses is odd, i.e.
llvm
| |
| 59 abort(); \ | 60 abort(); \ |
| 60 } \ | 61 } \ |
| 61 } while (0) | 62 } while (0) |
| 62 | 63 |
| 63 /// LoweringContext makes it easy to iterate through non-deleted instructions in | 64 /// LoweringContext makes it easy to iterate through non-deleted instructions in |
| 64 /// a node, and insert new (lowered) instructions at the current point. Along | 65 /// a node, and insert new (lowered) instructions at the current point. Along |
| 65 /// with the instruction list container and associated iterators, it holds the | 66 /// with the instruction list container and associated iterators, it holds the |
| 66 /// current node, which is needed when inserting new instructions in order to | 67 /// current node, which is needed when inserting new instructions in order to |
| 67 /// track whether variables are used as single-block or multi-block. | 68 /// track whether variables are used as single-block or multi-block. |
| 68 class LoweringContext { | 69 class LoweringContext { |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 560 virtual void lower() {} | 561 virtual void lower() {} |
| 561 | 562 |
| 562 protected: | 563 protected: |
| 563 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {} | 564 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {} |
| 564 GlobalContext *Ctx; | 565 GlobalContext *Ctx; |
| 565 }; | 566 }; |
| 566 | 567 |
| 567 } // end of namespace Ice | 568 } // end of namespace Ice |
| 568 | 569 |
| 569 #endif // SUBZERO_SRC_ICETARGETLOWERING_H | 570 #endif // SUBZERO_SRC_ICETARGETLOWERING_H |
| OLD | NEW |