[PATCH] D77891: [CallSite Removal][CodeGenPrepare] permit optimizations for CallBrInst
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 10 13:59:01 PDT 2020
nickdesaulniers added inline comments.
================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:1892
// lower it to normal LLVM code, do so now.
- if (isa<InlineAsm>(CI->getCalledValue())) {
- if (TLI->ExpandInlineAsm(CI)) {
- // Avoid invalidating the iterator.
- CurInstIterator = BB->begin();
- // Avoid processing instructions out of order, which could cause
- // reuse before a value is defined.
- SunkAddrs.clear();
- return true;
+ if (CallInst *CI = dyn_cast<CallInst>(CB))
+ if (isa<InlineAsm>(CI->getCalledValue())) {
----------------
nickdesaulniers wrote:
> craig.topper wrote:
> > Why is this CallInst?
> The call below to `TLI->ExpandInlineAsm(CI)` requires a `CallInst`.
>
> The added `dyn_cast<CallInst>` in the patch are what I want to remove. That will require fixing up similar interface issues in `FortifiedLibCallSimplifier` and `TargetLoweringInfo`.
>
> Should I shave those yaks in this one change, or submit this first separately, then rebase+revist this one? (Then I can drop my added `dyn_cast`).
s/or submit this/or submit those/
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77891/new/
https://reviews.llvm.org/D77891
More information about the llvm-commits
mailing list