mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Speculative fix for stack-tagging.ll failure.
Depending on the evaluation order of function call arguments, the current code may insert a use before def. llvm-svn: 366375
This commit is contained in:
parent
82eb9b8f9f
commit
08f8af9d52
@ -316,8 +316,8 @@ bool AArch64StackTagging::runOnFunction(Function &Fn) {
|
|||||||
untagAlloca(AI, Info.LifetimeEnd[0], Size);
|
untagAlloca(AI, Info.LifetimeEnd[0], Size);
|
||||||
} else {
|
} else {
|
||||||
uint64_t Size = Info.AI->getAllocationSizeInBits(*DL).getValue() / 8;
|
uint64_t Size = Info.AI->getAllocationSizeInBits(*DL).getValue() / 8;
|
||||||
tagAlloca(AI, TagPCall->getNextNode(),
|
Value *Ptr = IRB.CreatePointerCast(TagPCall, IRB.getInt8PtrTy());
|
||||||
IRB.CreatePointerCast(TagPCall, IRB.getInt8PtrTy()), Size);
|
tagAlloca(AI, &*IRB.GetInsertPoint(), Ptr, Size);
|
||||||
for (auto &RI : RetVec) {
|
for (auto &RI : RetVec) {
|
||||||
untagAlloca(AI, RI, Size);
|
untagAlloca(AI, RI, Size);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user