void GenWriter::emitAtomicInst(CallInst &I, CallSite &CS, ir::AtomicOps opcode) {
CallSite::arg_iterator AI = CS.arg_begin();
-#if GBE_DEBUG
CallSite::arg_iterator AE = CS.arg_end();
-#endif /* GBE_DEBUG */
GBE_ASSERT(AI != AE);
+
unsigned int llvmSpace = (*AI)->getType()->getPointerAddressSpace();
const ir::AddressSpace addrSpace = addressSpaceLLVMToGen(llvmSpace);
const ir::Register dst = this->getRegister(&I);
}
/* Throw errors */
-#define ERR(ERROR, ...) \
-do { \
- fprintf(stderr, "error in %s line %i\n", __FILE__, __LINE__); \
- fprintf(stderr, __VA_ARGS__); \
- fprintf(stderr, "\n"); \
- err = ERROR; \
- goto error; \
-} while (0)
+#ifdef NDEBUG
+ #define ERR(ERROR, ...) \
+ do { \
+ err = ERROR; \
+ goto error; \
+ } while (0)
+#else
+ #define ERR(ERROR, ...) \
+ do { \
+ fprintf(stderr, "error in %s line %i\n", __FILE__, __LINE__); \
+ fprintf(stderr, __VA_ARGS__); \
+ fprintf(stderr, "\n"); \
+ err = ERROR; \
+ goto error; \
+ } while (0)
+#endif
#define DO_ALLOC_ERR \
do { \