================
@@ -1016,11 +1017,18 @@ struct DSEState {
// Treat byval, inalloca or dead on return arguments the same as Allocas,
// stores to them are dead at the end of the function.
- for (Argument &AI : F.args())
+ for (Argument &AI : F.args()) {
if (AI.hasPassPointeeByValueCopyAttr() ||
(AI.getType()->isPointerTy() &&
AI.getDeadOnReturnInfo().coversAllReachableMemory()))
InvisibleToCallerAfterRet.insert({&AI, true});
+ if (AI.getType()->isPointerTy() &&
+ !AI.getDeadOnReturnInfo().coversAllReachableMemory()) {
+ if (uint64_t DeadOnReturnBytes =
+ AI.getDeadOnReturnInfo().getNumberOfDeadBytes())
+ InvisibleToCallerAfterRetBounded.insert({&AI, DeadOnReturnBytes});
+ }
+ }
----------------
boomanaiden154 wrote:
Done. That definitely makes things a lot more readable.
https://github.com/llvm/llvm-project/pull/173694
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits