mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 11:06:33 +00:00
OMPIRBuilder: Do not try to expand uses of ConstantData
This commit is contained in:
parent
f5f3638e52
commit
62484208ba
@ -7032,6 +7032,9 @@ static Expected<Function *> createOutlinedFunction(
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isa<ConstantData>(Input))
|
||||
continue;
|
||||
|
||||
ReplaceValue(Input, InputCopy, Func);
|
||||
}
|
||||
|
||||
|
@ -56,6 +56,9 @@ bool convertUsersOfConstantsToInstructions(ArrayRef<Constant *> Consts,
|
||||
// Find all expandable direct users of Consts.
|
||||
SmallVector<Constant *> Stack;
|
||||
for (Constant *C : Consts) {
|
||||
assert(!isa<ConstantData>(C) &&
|
||||
"should not be expanding trivial constant users");
|
||||
|
||||
if (IncludeSelf) {
|
||||
assert(isExpandableUser(C) && "One of the constants is not expandable");
|
||||
Stack.push_back(C);
|
||||
|
Loading…
x
Reference in New Issue
Block a user