Re: [PATCH 3/5] IR: remove never-generated instructions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 14, 2018 at 05:08:06AM +0000, Dibyendu Majumdar wrote:
> On 14 February 2018 at 01:08, Luc Van Oostenryck
> <luc.vanoostenryck@xxxxxxxxx> wrote:
> > Some of the IR instructions have been defined but are
> > never generated.
> >
> > -### Unused ops
> > -#### OP_VANEXT
> > -#### OP_VAARG
> > -#### OP_MALLOC
> > -#### OP_FREE
> > -#### OP_ALLOCA
> > -#### OP_GET_ELEMENT_PTR
> > -#### OP_INVOKE
> > -#### OP_UNWIND
> 
> Hi Luc, I would argue for not removing some of these instructions.
> 
> The VA instructions are definitely needed as today Sparse backend code
> generators cannot handle var args because no instructions are
> generated.
> Similarly alloca should perhaps be emitted to indicate stack
> allocations - this would make the stack usage explicit.

Yes, backends need support for that. Be assured that I'm acutely
aware of it. What is present here is just some definitions with
nothing behind.

It should also be noted that:
- something like OP_VANEXT is not really needed (depending on how
  OP_VAARG is specified),
- we don't need a new instruction for sparse-llvm to be able to
  generate LLVM's alloca (our handling of symbol together with
  OP_SYMADDR is enough)

So these defines I propose here to remove are totally useless. I can
leave the definition of OP_VAARG but I prefer to reintroduce it when :
- its semantic will be specified and documented
- I'll add the code that will really use it.

Best regards,
-- Luc
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux