[llvm-dev] EnableFastISel
Yaniv via llvm-dev
llvm-dev at lists.llvm.org
Mon Oct 30 18:54:27 PDT 2017
Thanks.
The following are the output of
long test(long a, long b, long c)
{
return a + b + c;
}
where target triple is "sparc". The first is the output when
EnableFastISel is set. The second is an output when EnableFastISel
is cleard. As you can see it affects the output code.
.text
.file "test2.c"
.globl test ! -- Begin function test
.p2align 2
.type test, at function
test: ! @test
! BB#0: ! %entry
add %sp, -120, %sp
mov %o2, %o3
mov %o1, %o4
mov %o0, %o5
st %o0, [%sp+116]
st %o1, [%sp+112]
st %o2, [%sp+108]
ld [%sp+116], %o0
ld [%sp+112], %o1
add %o0, %o1, %o0
ld [%sp+108], %o1
add %o0, %o1, %o0
st %o3, [%sp+104] ! 4-byte Folded Spill
st %o4, [%sp+100] ! 4-byte Folded Spill
st %o5, [%sp+96] ! 4-byte Folded Spill
retl
add %sp, 120, %sp
.Lfunc_end0:
.size test, .Lfunc_end0-test
! -- End function
.ident "clang version 5.0.0 (tags/RELEASE_500/final)"
.section ".note.GNU-stack"
.text
.file "test2.c"
.globl test ! -- Begin function test
.p2align 2
.type test, at function
test: ! @test
! BB#0: ! %entry
add %sp, -104, %sp
st %o0, [%sp+100]
st %o1, [%sp+96]
st %o2, [%sp+92]
ld [%sp+100], %o0
ld [%sp+96], %o1
add %o0, %o1, %o0
ld [%sp+92], %o1
add %o0, %o1, %o0
retl
add %sp, 104, %sp
.Lfunc_end0:
.size test, .Lfunc_end0-test
! -- End function
.ident "clang version 5.0.0 (tags/RELEASE_500/final)"
.section ".note.GNU-stack"
On Mon, 2017-10-30 at 16:16 -0700, Friedman, Eli wrote:
> On 10/30/2017 2:50 PM, Yaniv via llvm-dev wrote:
> > Not the right mailing list?
>
> This is the right mailing list; sometimes people just lose track of
> an
> email.
>
> Looking briefly at your question, yes, I agree it's a bug, but
> probably
> not one which has much impact, given the code it controls.
>
> -Eli
>
> >
> > On Tue, 2017-10-24 at 00:55 +0300, Yaniv wrote:
> > > Hi,
> > >
> > > In SelectionDAGISel::SelectAllBasicBlocks
> > >
> > > if (TM.Options.EnableFastISel)
> > > FastIS = TLI->createFastISel(*FuncInfo, LibInfo);
> > >
> > > followed by
> > >
> > > if (!FastIS) {
> > > LowerArguments(Fn);
> > > } else {
> > >
> > > The above implies that implementing FastIS is optional.
> > >
> > >
> > > In contrast to that, testing whether FastIS is actually been used
> > > is
> > > done by testing if TM.Options.EnableFastISel is set.
> > >
> > > For example in SelectionDAGISel::LowerArguments
> > >
> > > SDB->setValue(&Arg, Res);
> > > if (!TM.Options.EnableFastISel && Res.getOpcode() ==
> > > ISD::BUILD_PA
> > > IR) {
> > > if (LoadSDNode *LNode =
> > > dyn_cast<LoadSDNode>(Res.getOperand(0).getNode()))
> > > if (FrameIndexSDNode *FI =
> > > dyn_cast<FrameIndexSDNode>(LNode-
> > > > getBasePtr().getNode()))
> > >
> > > FuncInfo->setArgumentFrameIndex(&Arg, FI->getIndex());
> > > }
> > >
> > >
> > > Is it in BUG or am I missing something?
> > >
> > > Thanks,
> > > Yaniv
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > llvm-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
More information about the llvm-dev
mailing list