================ @@ -678,6 +690,37 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { return !A.checkForAllCallLikeInstructions(DoesNotRetrieve, *this, UsedAssumedInformation); } + + // Returns true if FlatScratchInit is needed, i.e., no-flat-scratch-init is + // not to be set. + bool needFlatScratchInit(Attributor &A) { + assert(isAssumed(FLAT_SCRATCH_INIT)); // only called if the bit is still set + + // This is called on each callee; false means callee shouldn't have + // no-flat-scratch-init. + auto CheckForNoFlatScratchInit = [&](Instruction &I) { + const auto &CB = cast<CallBase>(I); ---------------- arsenm wrote:
I would hope FroAllCallLikeInstructions would have a CallBase typed argument to begin with https://github.com/llvm/llvm-project/pull/94647 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits