[PATCH] D77734: [AssumeBundles] Adapt RecursivelyDeleteTriviallyDeadInstructions and depending passes.
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 8 15:13:54 PDT 2020
jdoerfert added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:8080
+ RecursivelyDeleteTriviallyDeadInstructions(I, nullptr, nullptr, AC);
+ }
----------------
Are we sure the instruction could not have been deleted at this point? If not we need to check for null in the cast.
---
I think it is reasonable to assume all instructions are in the same function. We should query AC before the loop.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:880
- EraseTerminatorAndDCECond(TI);
+ EraseTerminatorAndDCECond(TI, nullptr, Options.AC);
return true;
----------------
Unsure if it helps but one could add comments to the nullptr here and elsewhere: `/* MSSAU */`
================
Comment at: llvm/test/Transforms/Attributor/ArgumentPromotion/byval-2.ll:37
+; USE_ASSUME-NEXT: store i64 2, i64* [[TMP4]], align 4
+; USE_ASSUME-NEXT: call void @llvm.assume(i1 true) [ "align"(i32* [[X]], i64 4), "align"(%struct.ss* [[S]], i64 8), "dereferenceable"(i32* [[X]], i64 4), "dereferenceable"(%struct.ss* [[S]], i64 12), "nonnull"(%struct.ss* [[S]]), "nonnull"(i32* [[X]]) ]
+; USE_ASSUME-NEXT: ret i32 0
----------------
Note: We really have to teach the Attributor to prune these. I'll get to it or make it a task for one of the GSoC students.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77734/new/
https://reviews.llvm.org/D77734
More information about the llvm-commits
mailing list