| OLD | NEW |
| 1 //===- subzero/src/IceIntrinsics.cpp - Functions related to intrinsics ----===// | 1 //===- subzero/src/IceIntrinsics.cpp - Functions related to intrinsics ----===// |
| 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 implements the Intrinsics utilities for matching and | 10 // This file implements the Intrinsics utilities for matching and |
| 11 // then dispatching by name. | 11 // then dispatching by name. |
| 12 // | 12 // |
| 13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
| 14 | 14 |
| 15 #include "IceCfg.h" | 15 #include "IceCfg.h" |
| 16 #include "IceCfgNode.h" | 16 #include "IceCfgNode.h" |
| 17 #include "IceInst.h" | 17 #include "IceInst.h" |
| 18 #include "IceIntrinsics.h" | 18 #include "IceIntrinsics.h" |
| 19 #include "IceLiveness.h" | 19 #include "IceLiveness.h" |
| 20 #include "IceOperand.h" | 20 #include "IceOperand.h" |
| 21 | 21 |
| 22 #include <utility> | 22 #include <utility> |
| 23 | 23 |
| 24 namespace Ice { | 24 namespace Ice { |
| 25 | 25 |
| 26 static_assert(sizeof(Intrinsics::IntrinsicInfo) == 4, |
| 27 "Unexpected sizeof(IntrinsicInfo)"); |
| 28 |
| 26 namespace { | 29 namespace { |
| 27 | 30 |
| 28 void __attribute__((unused)) xIntrinsicInfoSizeCheck() { | |
| 29 STATIC_ASSERT(sizeof(Intrinsics::IntrinsicInfo) == 4); | |
| 30 } | |
| 31 | |
| 32 #define INTRIN(ID, SE, RT) { Intrinsics::ID, Intrinsics::SE, Intrinsics::RT } | 31 #define INTRIN(ID, SE, RT) { Intrinsics::ID, Intrinsics::SE, Intrinsics::RT } |
| 33 | 32 |
| 34 // Build list of intrinsics with their attributes and expected prototypes. | 33 // Build list of intrinsics with their attributes and expected prototypes. |
| 35 // List is sorted alphabetically. | 34 // List is sorted alphabetically. |
| 36 const struct IceIntrinsicsEntry_ { | 35 const struct IceIntrinsicsEntry_ { |
| 37 Intrinsics::FullIntrinsicInfo Info; | 36 Intrinsics::FullIntrinsicInfo Info; |
| 38 const char *IntrinsicName; | 37 const char *IntrinsicName; |
| 39 } IceIntrinsicsTable[] = { | 38 } IceIntrinsicsTable[] = { |
| 40 | 39 |
| 41 #define AtomicCmpxchgInit(Overload, NameSuffix) \ | 40 #define AtomicCmpxchgInit(Overload, NameSuffix) \ |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 return Intrinsics::IsValidCall; | 249 return Intrinsics::IsValidCall; |
| 251 } | 250 } |
| 252 | 251 |
| 253 Type Intrinsics::FullIntrinsicInfo::getArgType(SizeT Index) const { | 252 Type Intrinsics::FullIntrinsicInfo::getArgType(SizeT Index) const { |
| 254 assert(NumTypes > 1); | 253 assert(NumTypes > 1); |
| 255 assert(Index + 1 < NumTypes); | 254 assert(Index + 1 < NumTypes); |
| 256 return Signature[Index + 1]; | 255 return Signature[Index + 1]; |
| 257 } | 256 } |
| 258 | 257 |
| 259 } // end of namespace Ice | 258 } // end of namespace Ice |
| OLD | NEW |