Skip to content

[SystemZ, ArgExt verification] Cache results of isFullyInternal(). #130693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10237,6 +10237,11 @@ static void printFunctionArgExts(const Function *F, raw_fd_ostream &OS) {
void SystemZTargetLowering::
verifyNarrowIntegerArgs_Call(const SmallVectorImpl<ISD::OutputArg> &Outs,
const Function *F, SDValue Callee) const {
// Temporarily only do the check when explicitly requested, until it can be
// enabled by default.
if (!EnableIntArgExtCheck)
return;

bool IsInternal = false;
const Function *CalleeFn = nullptr;
if (auto *G = dyn_cast<GlobalAddressSDNode>(Callee))
Expand All @@ -10258,6 +10263,11 @@ verifyNarrowIntegerArgs_Call(const SmallVectorImpl<ISD::OutputArg> &Outs,
void SystemZTargetLowering::
verifyNarrowIntegerArgs_Ret(const SmallVectorImpl<ISD::OutputArg> &Outs,
const Function *F) const {
// Temporarily only do the check when explicitly requested, until it can be
// enabled by default.
if (!EnableIntArgExtCheck)
return;

if (!verifyNarrowIntegerArgs(Outs, isFullyInternal(F))) {
errs() << "ERROR: Missing extension attribute of returned "
<< "value from function:\n";
Expand All @@ -10274,11 +10284,6 @@ verifyNarrowIntegerArgs(const SmallVectorImpl<ISD::OutputArg> &Outs,
if (IsInternal || !Subtarget.isTargetELF())
return true;

// Temporarily only do the check when explicitly requested, until it can be
// enabled by default.
if (!EnableIntArgExtCheck)
return true;

if (EnableIntArgExtCheck.getNumOccurrences()) {
if (!EnableIntArgExtCheck)
return true;
Expand Down