[PATCH] This patch introduces MemorySSA, a virtual SSA form for memory.Details on what it looks like are in MemorySSA.h

Daniel Berlin dberlin at dberlin.org
Fri Feb 27 16:00:50 PST 2015


>
>
> ================
> Comment at: lib/Transforms/Utils/MemorySSA.cpp:357
> @@ +356,3 @@
> +  unsigned ID = 0;
> +  for (auto I = F.begin(), E = F.end(); I != E; ++I)
> +    BBNumbers[I] = ID++;
> ----------------
> Range-based for?
>

BTW, at least the obvious construction of that  for( auto I : F) gives:
../lib/Transforms/Utils/MemorySSA.cpp:350:13: error: call to deleted
constructor of 'llvm::BasicBlock'
  for (auto I : F)
            ^ ~

../include/llvm/IR/BasicBlock.h:85:3: note: 'BasicBlock' has been
explicitly marked deleted here
  BasicBlock(const BasicBlock &) = delete;
  ^

Is there some way to iterate over basic block instructions using range
based for that we've added?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150227/991cc8dc/attachment.html>


More information about the llvm-commits mailing list