[PATCH] D11861: [IR] Add token types

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 08:54:20 PDT 2015


rnk added a comment.

Can you expand on the use cases for tokens? It sounded like there were more than just this on Friday.

Fundamentally, this is breaking the invariant that values produced by instructions Can Be Phied. We need more than one use case to want to break that rule.


================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:1644-1645
@@ -1643,1 +1643,4 @@
   for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I != E; ++I) {
+    if (I->getType()->isTokenTy())
+      return true;
+
----------------
Shouldn't this have a test?

================
Comment at: test/Verifier/token1.ll:8
@@ +7,3 @@
+bb:
+  %phi = phi token [ %A, %bb ], [ %B, %entry]
+; CHECK: PHI nodes cannot have token type!
----------------
I think you can combine these tests into one token-invalid.ll file. You get one verifier failure per function, so if you keep them split up like this, it'll work.


http://reviews.llvm.org/D11861





More information about the llvm-commits mailing list