From c3f30687b583fd4381065d8750287e3176ac75b5 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Wed, 19 Jul 2023 10:13:03 -0700 Subject: [PATCH] [Attributor][NFCI] Add a shortcut for constants --- llvm/lib/Transforms/IPO/AttributorAttributes.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp index 0bfcb8c..3a9a89d 100644 --- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp +++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp @@ -10420,6 +10420,11 @@ struct AACallEdgesCallSite : public AACallEdgesImpl { SmallVector Values; // Process any value that we might call. auto ProcessCalledOperand = [&](Value *V, Instruction *CtxI) { + if (isa(V)) { + VisitValue(*V, CtxI); + return; + } + bool UsedAssumedInformation = false; Values.clear(); if (!A.getAssumedSimplifiedValues(IRPosition::value(*V), *this, Values, -- 2.7.4