forked from OSchip/llvm-project
[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. llvm-svn: 309992
This commit is contained in:
parent
a52391f2db
commit
1046aa3148
|
@ -38,7 +38,7 @@ VirtualUse VirtualUse::create(Scop *S, ScopStmt *UserStmt, Loop *UserScope,
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue