[llvm-commits] [llvm] r160297 - /llvm/trunk/lib/Target/AMDGPU/R600KernelParameters.cpp
Tom Stellard
thomas.stellard at amd.com
Mon Jul 16 11:19:38 PDT 2012
Author: tstellar
Date: Mon Jul 16 13:19:38 2012
New Revision: 160297
URL: http://llvm.org/viewvc/llvm-project?rev=160297&view=rev
Log:
Revert "Target/AMDGPU/R600KernelParameters.cpp: Don't use "and", "or" as conditional operator..."
This reverts commit 29f28bc14ad5a907f5dc849f004fafeec0aab33a.
Modified:
llvm/trunk/lib/Target/AMDGPU/R600KernelParameters.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/R600KernelParameters.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/R600KernelParameters.cpp?rev=160297&r1=160296&r2=160297&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/R600KernelParameters.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/R600KernelParameters.cpp Mon Jul 16 13:19:38 2012
@@ -97,12 +97,12 @@
Module *Mod = const_cast<Function*>(Fun)->getParent();
NamedMDNode * MD = Mod->getOrInsertNamedMetadata("opencl.kernels");
- if (!MD || !MD->getNumOperands()) {
+ if (!MD or !MD->getNumOperands()) {
return false;
}
for (int i = 0; i < int(MD->getNumOperands()); i++) {
- if (!MD->getOperand(i) || !MD->getOperand(i)->getOperand(0)) {
+ if (!MD->getOperand(i) or !MD->getOperand(i)->getOperand(0)) {
continue;
}
@@ -145,7 +145,7 @@
}
if (isa<IntegerType>(Val->getType())) {
- assert(0 && "Internal error");
+ assert(0 and "Internal error");
return false;
}
@@ -187,7 +187,7 @@
P.OffsetInDW = getListSize();
P.SizeInDW = CalculateArgumentSize(Arg);
- if (isa<PointerType>(Arg->getType()) && Arg->hasByValAttr()) {
+ if (isa<PointerType>(Arg->getType()) and Arg->hasByValAttr()) {
std::set<Value*> Visited;
P.IsIndirect = IsIndirect(P.Val, Visited);
}
@@ -198,7 +198,7 @@
int R600KernelParameters::CalculateArgumentSize(Argument *Arg) {
Type* T = Arg->getType();
- if (Arg->hasByValAttr() && dyn_cast<PointerType>(T)) {
+ if (Arg->hasByValAttr() and dyn_cast<PointerType>(T)) {
T = dyn_cast<PointerType>(T)->getElementType();
}
@@ -254,7 +254,7 @@
Addrspace = AMDILAS::PARAM_D_ADDRESS;
}
- if (GEP && GEP->getType()->getAddressSpace() != Addrspace) {
+ if (GEP and GEP->getType()->getAddressSpace() != Addrspace) {
Value *Op = GEP->getPointerOperand();
if (dyn_cast<PointerType>(Op->getType())->getAddressSpace() != Addrspace) {
@@ -330,7 +330,7 @@
Type * ArgType = P.Val->getType();
PointerType * ArgPtrType = dyn_cast<PointerType>(P.Val->getType());
- if (ArgPtrType && Arg->hasByValAttr()) {
+ if (ArgPtrType and Arg->hasByValAttr()) {
Value* ParamAddrSpacePtr = ConstantPointerNull::get(
PointerType::get(Type::getInt32Ty(*Context),
Addrspace));
@@ -364,7 +364,7 @@
assert(!Name.empty());
- if (Name == "image2d_t" || Name == "image3d_t") {
+ if (Name == "image2d_t" or Name == "image3d_t") {
int LastID = std::max(getLastSpecialID("image2d_t"),
getLastSpecialID("image3d_t"));
More information about the llvm-commits
mailing list