~ryan-rmarcus/pocl/pocl

« back to all changes in this revision

Viewing changes to lib/llvmopencl/CanonicalizeBarriers.cc

  • Committer: Carlos Sánchez de La Lama
  • Date: 2011-12-12 04:35:55 UTC
  • mto: This revision was merged to the branch mainline in revision 109.
  • Revision ID: carlos.delalama@urjc.es-20111212043555-ct245z61erk23htj
Using intrinsic (sort of) for barriers, working & tests updates.
New class ParallelRegion & Barrier (still unused).

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
static bool
142
142
is_barrier(Instruction *i)
143
143
{
144
 
  if (CallInst *c = dyn_cast<CallInst>(i)) {
145
 
    if (Function *f = c->getCalledFunction()) {
146
 
      if (f == barrier)
147
 
        return true;
148
 
    }
 
144
  if (CallInst *C = dyn_cast<CallInst>(i)) {
 
145
    return C->getCalledFunction()->getName() == BARRIER_FUNCTION_NAME;
149
146
  }
150
147
 
151
148
  return false;