Removing CallSite left us with a bunch of explicit casts from
Instruction to CallBase. This moves the casts earlier so that
function arguments and data structure types are CallBase so
we don't have to cast when we use them.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Looks good (the few couple of suggestions of collapsing isa+cast /might/ be wrong if they're really intentionally trying to restrict to just just Call+Invoke, not CallBrInst? in which case collapsing them would be wrong, because it'd include CallBrInst - but I don't think that's the case)
llvm/lib/Transforms/IPO/SampleProfile.cpp | ||
---|---|---|
722–725 | Could maybe restructure this to: if (auto *CB = dyn_cast<CallBase>(&Inst)) if (CB->isIndirectCall() && findCalleeFunctionSamples(CB)) return 0; | |
1054–1055 | again, might be nice to "if (dyn_cast) + if(inlineCallInstruction)" |
clang-format not found in user's PATH; not linting file.