I have a few pass managers, but only one of them has been initialized with
addPassesToEmitCode, how do I find how many passes are added to a function
pass manager ?
Thank you,
Xin
On Fri, May 20, 2011 at 1:00 PM, <llvmdev-request at cs.uiuc.edu> wrote:
> Send LLVMdev mailing list submissions to
> llvmdev at cs.uiuc.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> or, via email, send a message with subject or body 'help' to
> llvmdev-request at cs.uiuc.edu
>
> You can reach the person managing the list at
> llvmdev-owner at cs.uiuc.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of LLVMdev digest..."
>
>
> Today's Topics:
>
> 1. Re: LLVM wiki to be removed 5/19 (Tanya Lattner)
> 2. MCSection and Win64 Exception Handling (Charles Davis)
> 3. Re: subregisters, def-kill (Jakob Stoklund Olesen)
> 4. Reserving registers that depend on spilled code (Borja Ferrer)
> 5. Re: x86 cross compiler for ppc fails to build (???)
> 6. Re: subregisters, def-kill (Jonas Paulsson)
> 7. Re: x86 cross compiler for ppc fails to build (Duncan Sands)
> 8. Re: x86 cross compiler for ppc fails to build (Kalle Raiskila)
> 9. Re: [PATCH] OpenCL half support (Anton Lokhmotov)
> 10. Compile a project into LLVM Bitcode (Julien Henry)
> 11. Re: Compile a project into LLVM Bitcode (Philip Ritchey)
> 12. Re: Compile a project into LLVM Bitcode (Julien Henry)
> 13. Re: Compile a project into LLVM Bitcode (John Criswell)
> 14. Re: subregisters, def-kill (Jakob Stoklund Olesen)
> 15. I want to know examples of recursive types on LLVM IR.
> (Jin Gu Kang)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 19 May 2011 14:10:49 -0700
> From: Tanya Lattner <lattner at apple.com>
> Subject: Re: [LLVMdev] LLVM wiki to be removed 5/19
> To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu>
> Message-ID: <4D7A407D-AEBD-4CA7-BE2F-762DB366DD08 at apple.com>
> Content-Type: text/plain; CHARSET=US-ASCII
>
> The time has come. The wiki will be removed.
>
> Thanks,
> Tanya
>
> On May 10, 2011, at 4:43 PM, Tanya Lattner wrote:
>
> > Just a reminder. You have a little over a week to move information
over.
> >
> > Thank you,
> > Tanya
> >
> > On Apr 19, 2011, at 10:35 AM, Tanya Lattner wrote:
> >
> >> LLVMers,
> >>
> >> The LLVM wiki will be removed on May 19th. It would be great if
people
> could move any important content to the LLVM docs before this happens.
> >>
> >> There are three main reasons for removing the wiki:
> >> 1) It is full of spam.
> >> 2) It is bad to have documentation in two very separate places.
> >> 3) The documentation over there is not getting reviewed.
> >>
> >> While I am sure this may be upsetting to some, we feel that all
> documentation should be treated consistently in the project, and the wiki
> runs counter to this. That said, we don't want to lose any of the
useful
> content that is still on the wiki, so we're going to keep it around for
this
> month to allow time to merge content from the wiki into the other
> documentation.
> >>
> >> Thanks,
> >> Tanya
> >> _______________________________________________
> >> LLVM Developers mailing list
> >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 19 May 2011 15:51:12 -0600
> From: Charles Davis <cdavis at mymail.mines.edu>
> Subject: [LLVMdev] MCSection and Win64 Exception Handling
> To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu>
> Message-ID: <4DD590D0.8030808 at mymail.mines.edu>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi,
>
> As you know if you've been watching llvm-commits, I've been working
on
> Win64 exception handling support in LLVM. Unfortunately, I've hit a bit
> of a snag.
>
> I recently learned that GAS implemented its own set of Win64 EH
> directives. I've made ours compatible with GAS, but one problem
remains.
>
> GAS's .seh_handlerdata directive is used to declare data that belongs
in
> the language-specific handler's data area. The way it works in GAS is
> that it creates a pseudo-section containing the data that is later
> written to the unwind info structure. For LLVM, I suspect I have to do
> something similar. Trouble is, MCSection doesn't really support any
> pseudo-sections. It only supports physical sections inside of an object
> file.
>
> Unless someone has a better idea for implementing .seh_handlerdata, I
> need to extend MCSection to support sections that don't really
> physically exist, and then add support for writing the pseudo section
> anywhere in the object file. Does anyone have a better idea?
>
> Chip
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 19 May 2011 15:39:40 -0700
> From: Jakob Stoklund Olesen <stoklund at 2pi.dk>
> Subject: Re: [LLVMdev] subregisters, def-kill
> To: Jonas Paulsson <jnspaulsson at hotmail.com>
> Cc: LLVMDEV <llvmdev at cs.uiuc.edu>
> Message-ID: <6C95FA0C-60E9-41CD-85E5-6DA0B11E7913 at 2pi.dk>
> Content-Type: text/plain; CHARSET=US-ASCII
>
>
> On May 19, 2011, at 7:47 AM, Jonas Paulsson wrote:
>
> > Hi,
> >
> > I am combining 16-bit registers to a 32 bit register in order to make
a
> wide store, as per below:
> >
> > 732 %reg16506:hi16<def,dead> = COPY %reg16445<kill>;
> > 740 %reg16506:lo16<def> = COPY %reg16468<kill>;
> > 748 %r3<def,dead> = store %reg16506<kill>, %r3,
> >
> > As you can see, LiveVariables has marked the high part dead, even
though
> the super-register is used at SlotIndex 748. Why is this? Should I add
> anything special to the basic BuildMI calls?
>
> That code is not in SSA form as LiveVariables requires, there can only be
> one def per virtual register. You need to use INSERT_SUBREG or REG_SEQUENCE
> to do this.
>
> /jakob
>
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 20 May 2011 01:24:21 +0200
> From: Borja Ferrer <borja.ferav at gmail.com>
> Subject: [LLVMdev] Reserving registers that depend on spilled code
> To: llvmdev at cs.uiuc.edu
> Message-ID: <BANLkTik+h2dnK8yap-o7sFw38-Xn4r_+Lg at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hello,
>
> I would like to reserve a register or make it available to the register
> allocator depending if the stack is used inside a function or not. By using
> the stack i mean the following: if all regs are spilled so that frame space
> has to be allocated, arguments passed through the stack and allocas. I know
> how to get the last two options when the register allocator is run since
> that info is already available, but how can you know if all regs are going
> to be spilled? I can only think that to get this information you need to
> run
> the allocator to see if there are frame indices inserted because it ran out
> of regs and then re run it again reserving this specific reg so there are
> no
> conflicts during prolog/epilog insertion.
>
> The reserved reg is the one used to access the frame indices and the stack,
> so if it's allocated in a function that makes use of the stack then
there's
> a going to be a conflict. Otherwise if it's always reserved, it's a
very
> precious waste because this arch has only 2 regs that are able to access
> memory so if one is always reserved you can imagine that things get very
> suboptimal regarding memory accesses.
>
> I've thought something like running the allocator once, and if frame
> indices
> get inserted meaning that all regs got spilled, re run it reserving this
> specific reg, otherwise the allocation was valid and the reg can be used
> freely inside the function.
>
> Thanks
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
>
http://lists.cs.uiuc.edu/pipermail/llvmdev/attachments/20110520/0b4e1ad2/attachment-0001.html
>
> ------------------------------
>
> Message: 5
> Date: Fri, 20 May 2011 09:39:13 +0800
> From: ??? <chenwj at iis.sinica.edu.tw>
> Subject: Re: [LLVMdev] x86 cross compiler for ppc fails to build
> To: Maarten Faddegon <m.faddegon at student.tudelft.nl>
> Cc: llvmdev at cs.uiuc.edu
> Message-ID: <20110520013913.GA62105 at cs.nctu.edu.tw>
> Content-Type: text/plain; charset=utf-8
>
> Hi, Maarten
>
> > Can I conclude from this that indeed llvm-gcc for powerpc-linux is
> broken?
> > Is anyone maintaining llvm-gcc for powerpc-linux or is it abandoned?
>
> IIRC, llvm-gcc can be built successfully on a Linux/PowerPC machine.
> Here was my configuration,
>
> $ ../llvm-gcc-4.2-2.8.source/configure --prefix=/path/to/install
> --program-prefix=llvm- --enable-llvm=/path/to/install
> --enable-languages=c,c++ --disable-bootstrap --disable-libmudflap
> --disable-multilib --disable-libgomp
> $ make install
>
> HTH. :-)
>
> Regards,
> chenwj
>
> --
> Wei-Ren Chen (???)
> Computer Systems Lab, Institute of Information Science,
> Academia Sinica, Taiwan (R.O.C.)
> Tel:886-2-2788-3799 #1667
>
>
>
> ------------------------------
>
> Message: 6
> Date: Fri, 20 May 2011 08:22:29 +0200
> From: Jonas Paulsson <jnspaulsson at hotmail.com>
> Subject: Re: [LLVMdev] subregisters, def-kill
> To: <stoklund at 2pi.dk>
> Cc: LLVMDEV <llvmdev at cs.uiuc.edu>
> Message-ID: <SNT106-W59BD69822C1DA4E51FD90DB1710 at phx.gbl>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> I see, thanks.
>
> I used to work with GCC, which has an SSA-property verification run after
> each pass. It is surprising to find that LLVM does not check this!
>
> Jonas
>
> > Subject: Re: [LLVMdev] subregisters, def-kill
> > From: stoklund at 2pi.dk
> > Date: Thu, 19 May 2011 15:39:40 -0700
> > CC: llvmdev at cs.uiuc.edu
> > To: jnspaulsson at hotmail.com
> >
> >
> > On May 19, 2011, at 7:47 AM, Jonas Paulsson wrote:
> >
> > > Hi,
> > >
> > > I am combining 16-bit registers to a 32 bit register in order to
make a
> wide store, as per below:
> > >
> > > 732 %reg16506:hi16<def,dead> = COPY %reg16445<kill>;
> > > 740 %reg16506:lo16<def> = COPY %reg16468<kill>;
> > > 748 %r3<def,dead> = store %reg16506<kill>, %r3,
> > >
> > > As you can see, LiveVariables has marked the high part dead, even
> though the super-register is used at SlotIndex 748. Why is this? Should I
> add anything special to the basic BuildMI calls?
> >
> > That code is not in SSA form as LiveVariables requires, there can only
be
> one def per virtual register. You need to use INSERT_SUBREG or REG_SEQUENCE
> to do this.
> >
> > /jakob
> >
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
>
http://lists.cs.uiuc.edu/pipermail/llvmdev/attachments/20110520/7bf6d405/attachment-0001.html
>
> ------------------------------
>
> Message: 7
> Date: Fri, 20 May 2011 09:03:37 +0200
> From: Duncan Sands <baldrick at free.fr>
> Subject: Re: [LLVMdev] x86 cross compiler for ppc fails to build
> To: llvmdev at cs.uiuc.edu
> Message-ID: <4DD61249.3070907 at free.fr>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> >> Can I conclude from this that indeed llvm-gcc for powerpc-linux is
> broken?
> >> Is anyone maintaining llvm-gcc for powerpc-linux or is it
abandoned?
>
> You could also try using dragonegg. The good thing is that you would only
> need to build vanilla gcc-4.5 as a cross-compiler. The bad thing is that
> dragonegg has no support for ppc: you would need to port a bunch of logic
> from llvm-gcc.
>
> Ciao, Duncan.
>
>
> ------------------------------
>
> Message: 8
> Date: Fri, 20 May 2011 10:40:09 +0300
> From: Kalle Raiskila <kalle.raiskila at nokia.com>
> Subject: Re: [LLVMdev] x86 cross compiler for ppc fails to build
> To: ext Maarten Faddegon <m.faddegon at student.tudelft.nl>
> Cc: llvmdev at cs.uiuc.edu
> Message-ID: <1305877209.1798.12.camel at
LLVMbuilder.research.nokia.com>
> Content-Type: text/plain; charset="UTF-8"
>
> On ons, 2011-05-18 at 16:04 +0200, ext Maarten Faddegon wrote:
> > I try to build a cross powerpc compiler, but llvm-gcc fails.
>
> > There are instructions like this one "lis 30,
ha16(completed.5554.b)"
> > which are not understood apparently?
>
> If I recall correctly, this was a bug when generating 32bit ppc assembly
> on linux. 64bit assembly might work better on linux.
>
>
> kalle
>
> --
> "Modern computing machines are very complex objects"
> -von Neumann introducing the NORC, 1954
>
>
>
> ------------------------------
>
> Message: 9
> Date: Fri, 20 May 2011 14:48:48 +0100
> From: "Anton Lokhmotov" <Anton.Lokhmotov at arm.com>
> Subject: Re: [LLVMdev] [PATCH] OpenCL half support
> To: "'Chris Lattner'" <clattner at apple.com>
> Cc: llvmdev at cs.uiuc.edu
> Message-ID: <000001cc16f4$a7424070$f5c6c150$@Lokhmotov at arm.com>
> Content-Type: text/plain; charset="windows-1252"
>
> Hi Chris,
>
> > Sorry for dropping this. Can you resend your current patch? Lets
just
> > start and iterate on the llvm patch first.
> Please find the LLVM patch attached.
>
> Many thanks,
> Anton.
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: llvm00001.patch
> Type: application/octet-stream
> Size: 11884 bytes
> Desc: not available
> Url :
>
http://lists.cs.uiuc.edu/pipermail/llvmdev/attachments/20110520/ea9b35fb/attachment-0001.obj
>
> ------------------------------
>
> Message: 10
> Date: Fri, 20 May 2011 16:41:30 +0200
> From: Julien Henry <Julien.Henry at imag.fr>
> Subject: [LLVMdev] Compile a project into LLVM Bitcode
> To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu>
> Message-ID: <4DD67D9A.5030809 at imag.fr>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi all,
>
> I'm trying to compile projects into LLVM Bitcode files instead of
> executable binaries, without needing to change the Makefile and the
> configure script.
>
> What is the simplest way of doing that ?
>
> Thanks
>
> Julien
>
>
> ------------------------------
>
> Message: 11
> Date: Fri, 20 May 2011 10:50:20 -0400
> From: Philip Ritchey <pritchey at microsemi-wl.com>
> Subject: Re: [LLVMdev] Compile a project into LLVM Bitcode
> To: Julien Henry <Julien.Henry at imag.fr>, LLVM Developers Mailing
List
> <llvmdev at cs.uiuc.edu>
> Message-ID:
> <D80FAF663650884686CE45C915341D8616D7932F at
EAGLE.arxandefense.com>
> Content-Type: text/plain; charset="us-ascii"
>
> You can use Clang to compile source to bitcode:
>
> clang -c hello.c -emit-llvm -o hello.bc
>
> Hope that helps,
> Philip
>
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at
cs.uiuc.edu] On
> Behalf Of Julien Henry
> Sent: Friday, May 20, 2011 10:42 AM
> To: LLVM Developers Mailing List
> Subject: [LLVMdev] Compile a project into LLVM Bitcode
>
> Hi all,
>
> I'm trying to compile projects into LLVM Bitcode files instead of
> executable binaries, without needing to change the Makefile and the
> configure script.
>
> What is the simplest way of doing that ?
>
> Thanks
>
> Julien
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
> ------------------------------
>
> Message: 12
> Date: Fri, 20 May 2011 17:25:47 +0200
> From: Julien Henry <Julien.Henry at imag.fr>
> Subject: Re: [LLVMdev] Compile a project into LLVM Bitcode
> To: Philip Ritchey <pritchey at microsemi-wl.com>
> Cc: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu>
> Message-ID: <4DD687FB.70509 at imag.fr>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>
> > You can use Clang to compile source to bitcode:
> >
> > clang -c hello.c -emit-llvm -o hello.bc
> >
>
> Yes.
> My problem is to automatically create .bc files with ./configure &&
> make. Ideally, when compiling a project like "grep", I'd like
to obtain
> a single .bc file containing all the project's functions, instead of
the
> grep binary executable.
>
> I already tried things like
> CC=clang CFLAGS=-emit-llvm ./configure
>
> But the ./configure fails (indeed, .bc files are not executable, so
> configure says the C compiler doesn't work)
>
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking build system type... i686-pc-linux-gnu
> checking host system type... i686-pc-linux-gnu
> checking for gawk... (cached) gawk
> checking for gcc... clang
> checking whether the C compiler works... no
> configure: error: in `/local/jhenry/examples/grep-2.8':
> configure: error: C compiler cannot create executables
> See `config.log' for more details
>
>
> ------------------------------
>
> Message: 13
> Date: Fri, 20 May 2011 10:39:29 -0500
> From: John Criswell <criswell at illinois.edu>
> Subject: Re: [LLVMdev] Compile a project into LLVM Bitcode
> To: Julien Henry <Julien.Henry at imag.fr>
> Cc: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu>
> Message-ID: <4DD68B31.1030505 at illinois.edu>
> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
>
> On 5/20/11 10:25 AM, Julien Henry wrote:
> >> You can use Clang to compile source to bitcode:
> >>
> >> clang -c hello.c -emit-llvm -o hello.bc
> >>
> > Yes.
> > My problem is to automatically create .bc files with
./configure&&
> > make. Ideally, when compiling a project like "grep", I'd
like to obtain
> > a single .bc file containing all the project's functions, instead
of the
> > grep binary executable.
>
> There are two approaches that you can take:
>
> 1) You can modify libLTO so that it saves into a file the entire bitcode
> that it analyzes. By default, it just creates the bitcode file in
> memory, optimizes it, and then generates native code. A small addition
> can get it to save its results right before it generates native code.
>
> 2) If you're doing whole-program analysis or transformation, you can
> build your analysis/transform directly into libLTO.
>
> -- John T.
> > I already tried things like
> > CC=clang CFLAGS=-emit-llvm ./configure
> >
> > But the ./configure fails (indeed, .bc files are not executable, so
> > configure says the C compiler doesn't work)
> >
> > checking for a BSD-compatible install... /usr/bin/install -c
> > checking whether build environment is sane... yes
> > checking for a thread-safe mkdir -p... /bin/mkdir -p
> > checking for gawk... gawk
> > checking whether make sets $(MAKE)... yes
> > checking build system type... i686-pc-linux-gnu
> > checking host system type... i686-pc-linux-gnu
> > checking for gawk... (cached) gawk
> > checking for gcc... clang
> > checking whether the C compiler works... no
> > configure: error: in `/local/jhenry/examples/grep-2.8':
> > configure: error: C compiler cannot create executables
> > See `config.log' for more details
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
> ------------------------------
>
> Message: 14
> Date: Fri, 20 May 2011 08:59:47 -0700
> From: Jakob Stoklund Olesen <stoklund at 2pi.dk>
> Subject: Re: [LLVMdev] subregisters, def-kill
> To: Jonas Paulsson <jnspaulsson at hotmail.com>
> Cc: LLVMDEV <llvmdev at cs.uiuc.edu>
> Message-ID: <88B0FA1A-3935-46EE-8F32-689E6CDA467D at 2pi.dk>
> Content-Type: text/plain; charset="us-ascii"
>
>
> On May 19, 2011, at 11:22 PM, Jonas Paulsson wrote:
>
> > I see, thanks.
> >
> > I used to work with GCC, which has an SSA-property verification run
after
> each pass. It is surprising to find that LLVM does not check this!
>
> It should. Here is how you can fix it:
>
> - Add a flag to MachineRegisterInfo: isSSA(). It should be true initially
> and cleared by the 2-addr and phi-elim passes.
>
> - Add code to MachineVerifier.cpp that checks for multiple virtual register
> defs when MRI->isSSA() is true.
>
> Then send your patches to llvm-commits!
>
> Thanks,
>
> /jakob
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
>
http://lists.cs.uiuc.edu/pipermail/llvmdev/attachments/20110520/755c26a2/attachment-0001.html
>
> ------------------------------
>
> Message: 15
> Date: Sat, 21 May 2011 01:53:56 +0900
> From: Jin Gu Kang <jaykang10 at imrc.kist.re.kr>
> Subject: [LLVMdev] I want to know examples of recursive types on LLVM
> IR.
> To: "llvmdev at cs.uiuc.edu" <llvmdev at cs.uiuc.edu>
> Message-ID:
> <3E94D039A2B82544B3E7D48F924B0B25E122329A5A at
base.imrc.kist.re.kr>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi all
>
> I want to know examples of recursive types on LLVM IR.
>
> I read a example of basic recursive type on LLVM Programmer's manual.
>
> %mylist = type { %mylist*, i32}
>
> Are there another examples of recursive types on LLVM IR?
>
> and I want to know what the definition of recursive type is on LLVM IR?
>
> Thank you,
> Jin-Gu Kang
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
>
http://lists.cs.uiuc.edu/pipermail/llvmdev/attachments/20110521/93f65121/attachment-0001.html
>
> ------------------------------
>
> _______________________________________________
> LLVMdev mailing list
> LLVMdev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> End of LLVMdev Digest, Vol 83, Issue 33
> ***************************************
>
--
Kind Regards
Xin Tong
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20110520/4c9d5ae2/attachment.html>