summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/R600KernelParameters.cpp
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-08-23 21:00:13 +0000
committerTom Stellard <[email protected]>2012-08-23 21:54:32 +0000
commit2ad8608cb3e6a8d2f375ad2295504167b082711f (patch)
tree6b84323bc2bd123483f556c749d5fa5b63f8242a /src/gallium/drivers/radeon/R600KernelParameters.cpp
parent228a6641ccddaf24a993f827af1e97379785985a (diff)
radeon/llvm: Fix some coding style issues
Diffstat (limited to 'src/gallium/drivers/radeon/R600KernelParameters.cpp')
-rw-r--r--src/gallium/drivers/radeon/R600KernelParameters.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeon/R600KernelParameters.cpp b/src/gallium/drivers/radeon/R600KernelParameters.cpp
index 87adbe400f3..ef0fc458480 100644
--- a/src/gallium/drivers/radeon/R600KernelParameters.cpp
+++ b/src/gallium/drivers/radeon/R600KernelParameters.cpp
@@ -97,12 +97,12 @@ bool R600KernelParameters::IsOpenCLKernel(const Function* Fun) {
Module *Mod = const_cast<Function*>(Fun)->getParent();
NamedMDNode * MD = Mod->getOrInsertNamedMetadata("opencl.kernels");
- if (!MD or !MD->getNumOperands()) {
+ if (!MD || !MD->getNumOperands()) {
return false;
}
for (int i = 0; i < int(MD->getNumOperands()); i++) {
- if (!MD->getOperand(i) or !MD->getOperand(i)->getOperand(0)) {
+ if (!MD->getOperand(i) || !MD->getOperand(i)->getOperand(0)) {
continue;
}
@@ -145,7 +145,7 @@ bool R600KernelParameters::IsIndirect(Value *Val, std::set<Value*> &Visited) {
}
if (isa<IntegerType>(Val->getType())) {
- assert(0 and "Internal error");
+ assert(0 && "Internal error");
return false;
}
@@ -187,7 +187,7 @@ void R600KernelParameters::AddParam(Argument *Arg) {
P.OffsetInDW = getListSize();
P.SizeInDW = CalculateArgumentSize(Arg);
- if (isa<PointerType>(Arg->getType()) and Arg->hasByValAttr()) {
+ if (isa<PointerType>(Arg->getType()) && Arg->hasByValAttr()) {
std::set<Value*> Visited;
P.IsIndirect = IsIndirect(P.Val, Visited);
}
@@ -198,7 +198,7 @@ void R600KernelParameters::AddParam(Argument *Arg) {
int R600KernelParameters::CalculateArgumentSize(Argument *Arg) {
Type* T = Arg->getType();
- if (Arg->hasByValAttr() and dyn_cast<PointerType>(T)) {
+ if (Arg->hasByValAttr() && dyn_cast<PointerType>(T)) {
T = dyn_cast<PointerType>(T)->getElementType();
}
@@ -254,7 +254,7 @@ void R600KernelParameters::Propagate(Value* V, const Twine& Name, bool IsIndirec
Addrspace = AMDGPUAS::PARAM_D_ADDRESS;
}
- if (GEP and GEP->getType()->getAddressSpace() != Addrspace) {
+ if (GEP && GEP->getType()->getAddressSpace() != Addrspace) {
Value *Op = GEP->getPointerOperand();
if (dyn_cast<PointerType>(Op->getType())->getAddressSpace() != Addrspace) {
@@ -330,7 +330,7 @@ Value* R600KernelParameters::ConstantRead(Function *Fun, Param &P) {
Type * ArgType = P.Val->getType();
PointerType * ArgPtrType = dyn_cast<PointerType>(P.Val->getType());
- if (ArgPtrType and Arg->hasByValAttr()) {
+ if (ArgPtrType && Arg->hasByValAttr()) {
Value* ParamAddrSpacePtr = ConstantPointerNull::get(
PointerType::get(Type::getInt32Ty(*Context),
Addrspace));
@@ -364,7 +364,7 @@ Value* R600KernelParameters::handleSpecial(Function* Fun, Param& P) {
assert(!Name.empty());
- if (Name == "image2d_t" or Name == "image3d_t") {
+ if (Name == "image2d_t" || Name == "image3d_t") {
int LastID = std::max(getLastSpecialID("image2d_t"),
getLastSpecialID("image3d_t"));