[polly] r309992 - [VirtualInstruction] Handle MetadataAsValue as constant.

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 15:00:01 PDT 2017


Author: meinersbur
Date: Thu Aug  3 15:00:01 2017
New Revision: 309992

URL: http://llvm.org/viewvc/llvm-project?rev=309992&view=rev
Log:
[VirtualInstruction] Handle MetadataAsValue as constant.

The complication of bspatch.cc of the AOSP buildbot currently fails
presumably because the occurance of a MetadataAsValue in an operand.
This kind of value can occur as operands of intrinsics, the typical
example being the debug intrinsics.

Polly currently ignores the debug intrinsics and it is not yet clear
which other intrinic might occur. For such cases, and to unbreak the
AOSP buildbot, treat a MetadataAsValue as a constant because it can be
referenced without modification in generated code.

Modified:
    polly/trunk/lib/Support/VirtualInstruction.cpp

Modified: polly/trunk/lib/Support/VirtualInstruction.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/VirtualInstruction.cpp?rev=309992&r1=309991&r2=309992&view=diff
==============================================================================
--- polly/trunk/lib/Support/VirtualInstruction.cpp (original)
+++ polly/trunk/lib/Support/VirtualInstruction.cpp Thu Aug  3 15:00:01 2017
@@ -38,7 +38,7 @@ VirtualUse VirtualUse::create(Scop *S, S
   if (isa<BasicBlock>(Val))
     return VirtualUse(UserStmt, Val, Block, nullptr, nullptr);
 
-  if (isa<llvm::Constant>(Val))
+  if (isa<llvm::Constant>(Val) || isa<MetadataAsValue>(Val))
     return VirtualUse(UserStmt, Val, Constant, nullptr, nullptr);
 
   // Is the value synthesizable? If the user has been pruned




More information about the llvm-commits mailing list