OLD | NEW |
---|---|
1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==// | 1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- 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 6078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6089 template <typename TraitsType> | 6089 template <typename TraitsType> |
6090 void TargetX86Base<TraitsType>::lowerUnreachable( | 6090 void TargetX86Base<TraitsType>::lowerUnreachable( |
6091 const InstUnreachable * /*Instr*/) { | 6091 const InstUnreachable * /*Instr*/) { |
6092 _ud2(); | 6092 _ud2(); |
6093 // Add a fake use of esp to make sure esp adjustments after the unreachable | 6093 // Add a fake use of esp to make sure esp adjustments after the unreachable |
6094 // do not get dead-code eliminated. | 6094 // do not get dead-code eliminated. |
6095 keepEspLiveAtExit(); | 6095 keepEspLiveAtExit(); |
6096 } | 6096 } |
6097 | 6097 |
6098 template <typename TraitsType> | 6098 template <typename TraitsType> |
6099 void TargetX86Base<TraitsType>::lowerBreakpoint( | |
6100 const InstBreakpoint * /*Instr*/) { | |
6101 _int3(); | |
6102 // Add a fake use of esp to make sure esp adjustments after the breakpoint do | |
6103 // not get dead-code eliminated. | |
6104 keepEspLiveAtExit(); | |
Jim Stichnoth
2016/04/14 20:03:44
I don't think this should be necessary. Can it be
Eric Holk
2016/04/15 15:24:27
Done.
I cargo-culted it from lowerUnreachable, so
| |
6105 } | |
6106 | |
6107 template <typename TraitsType> | |
6099 void TargetX86Base<TraitsType>::lowerRMW(const InstX86FakeRMW *RMW) { | 6108 void TargetX86Base<TraitsType>::lowerRMW(const InstX86FakeRMW *RMW) { |
6100 // If the beacon variable's live range does not end in this instruction, then | 6109 // If the beacon variable's live range does not end in this instruction, then |
6101 // it must end in the modified Store instruction that follows. This means | 6110 // it must end in the modified Store instruction that follows. This means |
6102 // that the original Store instruction is still there, either because the | 6111 // that the original Store instruction is still there, either because the |
6103 // value being stored is used beyond the Store instruction, or because dead | 6112 // value being stored is used beyond the Store instruction, or because dead |
6104 // code elimination did not happen. In either case, we cancel RMW lowering | 6113 // code elimination did not happen. In either case, we cancel RMW lowering |
6105 // (and the caller deletes the RMW instruction). | 6114 // (and the caller deletes the RMW instruction). |
6106 if (!RMW->isLastUse(RMW->getBeacon())) | 6115 if (!RMW->isLastUse(RMW->getBeacon())) |
6107 return; | 6116 return; |
6108 Operand *Src = RMW->getData(); | 6117 Operand *Src = RMW->getData(); |
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7418 emitGlobal(*Var, SectionSuffix); | 7427 emitGlobal(*Var, SectionSuffix); |
7419 } | 7428 } |
7420 } | 7429 } |
7421 } break; | 7430 } break; |
7422 } | 7431 } |
7423 } | 7432 } |
7424 } // end of namespace X86NAMESPACE | 7433 } // end of namespace X86NAMESPACE |
7425 } // end of namespace Ice | 7434 } // end of namespace Ice |
7426 | 7435 |
7427 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H | 7436 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H |
OLD | NEW |