[llvm-commits] [dragonegg] r115776 - /dragonegg/trunk/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Wed Oct 6 03:55:24 PDT 2010
Author: baldrick
Date: Wed Oct 6 05:55:24 2010
New Revision: 115776
URL: http://llvm.org/viewvc/llvm-project?rev=115776&view=rev
Log:
Port commit 106363 (grosbach) from llvm-gcc:
Now that the ARM back end handles issuing libcalls for atomics when needed,
the ifdefs here are no longer necessary.
Modified:
dragonegg/trunk/llvm-convert.cpp
Modified: dragonegg/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=115776&r1=115775&r2=115776&view=diff
==============================================================================
--- dragonegg/trunk/llvm-convert.cpp (original)
+++ dragonegg/trunk/llvm-convert.cpp Wed Oct 6 05:55:24 2010
@@ -3929,10 +3929,6 @@
//TODO }
case BUILT_IN_SYNCHRONIZE: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
// We assume like gcc appears to, that this only applies to cached memory.
Value* C[5];
C[0] = C[1] = C[2] = C[3] = ConstantInt::get(Type::getInt1Ty(Context), 1);
@@ -3955,33 +3951,18 @@
// Note that Intrinsic::getDeclaration expects the type list in reversed
// order, while CreateCall expects the parameter list in normal order.
case BUILT_IN_BOOL_COMPARE_AND_SWAP_1: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
Result = BuildCmpAndSwapAtomicBuiltin(stmt, unsigned_char_type_node, true);
return true;
}
case BUILT_IN_BOOL_COMPARE_AND_SWAP_2: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
Result = BuildCmpAndSwapAtomicBuiltin(stmt, short_unsigned_type_node, true);
return true;
}
case BUILT_IN_BOOL_COMPARE_AND_SWAP_4: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
Result = BuildCmpAndSwapAtomicBuiltin(stmt, unsigned_type_node, true);
return true;
}
case BUILT_IN_BOOL_COMPARE_AND_SWAP_8: {
-#if defined(TARGET_ARM)
- return false;
-#endif
#if defined(TARGET_POWERPC)
if (!TARGET_64BIT)
return false;
@@ -3992,9 +3973,6 @@
}
case BUILT_IN_VAL_COMPARE_AND_SWAP_8:
-#if defined(TARGET_ARM)
- return false;
-#endif
#if defined(TARGET_POWERPC)
if (!TARGET_64BIT)
return false;
@@ -4002,18 +3980,11 @@
case BUILT_IN_VAL_COMPARE_AND_SWAP_1:
case BUILT_IN_VAL_COMPARE_AND_SWAP_2:
case BUILT_IN_VAL_COMPARE_AND_SWAP_4: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
tree type = gimple_call_return_type(stmt);
Result = BuildCmpAndSwapAtomicBuiltin(stmt, type, false);
return true;
}
case BUILT_IN_FETCH_AND_ADD_8:
-#if defined(TARGET_ARM)
- return false;
-#endif
#if defined(TARGET_POWERPC)
if (!TARGET_64BIT)
return false;
@@ -4021,17 +3992,10 @@
case BUILT_IN_FETCH_AND_ADD_1:
case BUILT_IN_FETCH_AND_ADD_2:
case BUILT_IN_FETCH_AND_ADD_4: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
Result = BuildBinaryAtomicBuiltin(stmt, Intrinsic::atomic_load_add);
return true;
}
case BUILT_IN_FETCH_AND_SUB_8:
-#if defined(TARGET_ARM)
- return false;
-#endif
#if defined(TARGET_POWERPC)
if (!TARGET_64BIT)
return false;
@@ -4039,17 +4003,10 @@
case BUILT_IN_FETCH_AND_SUB_1:
case BUILT_IN_FETCH_AND_SUB_2:
case BUILT_IN_FETCH_AND_SUB_4: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
Result = BuildBinaryAtomicBuiltin(stmt, Intrinsic::atomic_load_sub);
return true;
}
case BUILT_IN_FETCH_AND_OR_8:
-#if defined(TARGET_ARM)
- return false;
-#endif
#if defined(TARGET_POWERPC)
if (!TARGET_64BIT)
return false;
@@ -4057,17 +4014,10 @@
case BUILT_IN_FETCH_AND_OR_1:
case BUILT_IN_FETCH_AND_OR_2:
case BUILT_IN_FETCH_AND_OR_4: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
Result = BuildBinaryAtomicBuiltin(stmt, Intrinsic::atomic_load_or);
return true;
}
case BUILT_IN_FETCH_AND_AND_8:
-#if defined(TARGET_ARM)
- return false;
-#endif
#if defined(TARGET_POWERPC)
if (!TARGET_64BIT)
return false;
@@ -4075,17 +4025,10 @@
case BUILT_IN_FETCH_AND_AND_1:
case BUILT_IN_FETCH_AND_AND_2:
case BUILT_IN_FETCH_AND_AND_4: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
Result = BuildBinaryAtomicBuiltin(stmt, Intrinsic::atomic_load_and);
return true;
}
case BUILT_IN_FETCH_AND_XOR_8:
-#if defined(TARGET_ARM)
- return false;
-#endif
#if defined(TARGET_POWERPC)
if (!TARGET_64BIT)
return false;
@@ -4093,17 +4036,10 @@
case BUILT_IN_FETCH_AND_XOR_1:
case BUILT_IN_FETCH_AND_XOR_2:
case BUILT_IN_FETCH_AND_XOR_4: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
Result = BuildBinaryAtomicBuiltin(stmt, Intrinsic::atomic_load_xor);
return true;
}
case BUILT_IN_FETCH_AND_NAND_8:
-#if defined(TARGET_ARM)
- return false;
-#endif
#if defined(TARGET_POWERPC)
if (!TARGET_64BIT)
return false;
@@ -4111,17 +4047,10 @@
case BUILT_IN_FETCH_AND_NAND_1:
case BUILT_IN_FETCH_AND_NAND_2:
case BUILT_IN_FETCH_AND_NAND_4: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
Result = BuildBinaryAtomicBuiltin(stmt, Intrinsic::atomic_load_nand);
return true;
}
case BUILT_IN_LOCK_TEST_AND_SET_8:
-#if defined(TARGET_ARM)
- return false;
-#endif
#if defined(TARGET_POWERPC)
if (!TARGET_64BIT)
return false;
@@ -4129,18 +4058,11 @@
case BUILT_IN_LOCK_TEST_AND_SET_1:
case BUILT_IN_LOCK_TEST_AND_SET_2:
case BUILT_IN_LOCK_TEST_AND_SET_4: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
Result = BuildBinaryAtomicBuiltin(stmt, Intrinsic::atomic_swap);
return true;
}
case BUILT_IN_ADD_AND_FETCH_8:
-#if defined(TARGET_ARM)
- return false;
-#endif
#if defined(TARGET_POWERPC)
if (!TARGET_64BIT)
return false;
@@ -4148,10 +4070,6 @@
case BUILT_IN_ADD_AND_FETCH_1:
case BUILT_IN_ADD_AND_FETCH_2:
case BUILT_IN_ADD_AND_FETCH_4: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
tree return_type = gimple_call_return_type(stmt);
const Type *ResultTy = ConvertType(return_type);
Value* C[2] = {
@@ -4193,9 +4111,6 @@
return true;
}
case BUILT_IN_SUB_AND_FETCH_8:
-#if defined(TARGET_ARM)
- return false;
-#endif
#if defined(TARGET_POWERPC)
if (!TARGET_64BIT)
return false;
@@ -4203,10 +4118,6 @@
case BUILT_IN_SUB_AND_FETCH_1:
case BUILT_IN_SUB_AND_FETCH_2:
case BUILT_IN_SUB_AND_FETCH_4: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
tree return_type = gimple_call_return_type(stmt);
const Type *ResultTy = ConvertType(return_type);
Value* C[2] = {
@@ -4248,9 +4159,6 @@
return true;
}
case BUILT_IN_OR_AND_FETCH_8:
-#if defined(TARGET_ARM)
- return false;
-#endif
#if defined(TARGET_POWERPC)
if (!TARGET_64BIT)
return false;
@@ -4258,10 +4166,6 @@
case BUILT_IN_OR_AND_FETCH_1:
case BUILT_IN_OR_AND_FETCH_2:
case BUILT_IN_OR_AND_FETCH_4: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
tree return_type = gimple_call_return_type(stmt);
const Type *ResultTy = ConvertType(return_type);
Value* C[2] = {
@@ -4303,9 +4207,6 @@
return true;
}
case BUILT_IN_AND_AND_FETCH_8:
-#if defined(TARGET_ARM)
- return false;
-#endif
#if defined(TARGET_POWERPC)
if (!TARGET_64BIT)
return false;
@@ -4313,10 +4214,6 @@
case BUILT_IN_AND_AND_FETCH_1:
case BUILT_IN_AND_AND_FETCH_2:
case BUILT_IN_AND_AND_FETCH_4: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
tree return_type = gimple_call_return_type(stmt);
const Type *ResultTy = ConvertType(return_type);
Value* C[2] = {
@@ -4358,9 +4255,6 @@
return true;
}
case BUILT_IN_XOR_AND_FETCH_8:
-#if defined(TARGET_ARM)
- return false;
-#endif
#if defined(TARGET_POWERPC)
if (!TARGET_64BIT)
return false;
@@ -4368,10 +4262,6 @@
case BUILT_IN_XOR_AND_FETCH_1:
case BUILT_IN_XOR_AND_FETCH_2:
case BUILT_IN_XOR_AND_FETCH_4: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
tree return_type = gimple_call_return_type(stmt);
const Type *ResultTy = ConvertType(return_type);
Value* C[2] = {
@@ -4413,9 +4303,6 @@
return true;
}
case BUILT_IN_NAND_AND_FETCH_8:
-#if defined(TARGET_ARM)
- return false;
-#endif
#if defined(TARGET_POWERPC)
if (!TARGET_64BIT)
return false;
@@ -4423,10 +4310,6 @@
case BUILT_IN_NAND_AND_FETCH_1:
case BUILT_IN_NAND_AND_FETCH_2:
case BUILT_IN_NAND_AND_FETCH_4: {
-#if defined(TARGET_ARM)
- if (TARGET_THUMB1 || !arm_arch6)
- return false;
-#endif
tree return_type = gimple_call_return_type(stmt);
const Type *ResultTy = ConvertType(return_type);
Value* C[2] = {
More information about the llvm-commits
mailing list