Jeff Jia
2013-Apr-10 19:54 UTC
[LLVMdev] Does DragonEgg support parameters like -fno-builtin in clang?
Hi chenwj, Thanks! I have tried it, but the generated byte code still uses `llvm.memset`. I guess the flag `-fno-builtin` is not used by DragonEgg, or I missed some other configuration parameters. On Tue, Apr 9, 2013 at 7:45 PM, 陳韋任 (Wei-Ren Chen) <chenwj at iis.sinica.edu.tw> wrote:> On Tue, Apr 09, 2013 at 04:39:14PM -0700, Jeff Jia wrote: > > Hi, > > > > I have been using clang for quite a while, and I can use `clang > -fno-builtin > > hello.c` to prevent the generation of llvm built-in functions, such as > > llvm.memset. Recently, I switched to gcc with DragonEgg, since the > program to > > be built is originally designed to be compiled with gcc. I searched on > the web, > > but did not find any information about how to set DragonEgg parameters. > Could > > anyone please give me some help? Thanks in advance! > > Dragonegg is a GCC plugin, I think you can just pass "-fno-builtin" > [1] to gcc. Doesn't it work? > > [1] > > http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Option-Summary.html#Option-Summary > > Regards, > chenwj > > -- > Wei-Ren Chen (陳韋任) > Computer Systems Lab, Institute of Information Science, > Academia Sinica, Taiwan (R.O.C.) > Tel:886-2-2788-3799 #1667 > Homepage: http://people.cs.nctu.edu.tw/~chenwj >-- Jeff Jia -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130410/6c9ae019/attachment.html>
Jeff Jia
2013-Apr-10 22:06 UTC
[LLVMdev] Does DragonEgg support parameters like -fno-builtin in clang?
Hi, I have figured out a way to achieve similar effects. gcc -S -c -O0 -fplugin=$(DRAGONEGG_SO) -fplugin-arg-dragonegg-emit-ir hello.c -o hello.bc opt -O3 -disable-simplify-libcalls hello.bc -o hello.bc On Wed, Apr 10, 2013 at 12:54 PM, Jeff Jia <fjia at cs.ucsd.edu> wrote:> Hi chenwj, > > Thanks! I have tried it, but the generated byte code still uses > `llvm.memset`. I guess the flag `-fno-builtin` is not used by DragonEgg, or > I missed some other > configuration parameters. > > > On Tue, Apr 9, 2013 at 7:45 PM, 陳韋任 (Wei-Ren Chen) < > chenwj at iis.sinica.edu.tw> wrote: > >> On Tue, Apr 09, 2013 at 04:39:14PM -0700, Jeff Jia wrote: >> > Hi, >> > >> > I have been using clang for quite a while, and I can use `clang >> -fno-builtin >> > hello.c` to prevent the generation of llvm built-in functions, such as >> > llvm.memset. Recently, I switched to gcc with DragonEgg, since the >> program to >> > be built is originally designed to be compiled with gcc. I searched on >> the web, >> > but did not find any information about how to set DragonEgg parameters. >> Could >> > anyone please give me some help? Thanks in advance! >> >> Dragonegg is a GCC plugin, I think you can just pass "-fno-builtin" >> [1] to gcc. Doesn't it work? >> >> [1] >> >> http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Option-Summary.html#Option-Summary >> >> Regards, >> chenwj >> >> -- >> Wei-Ren Chen (陳韋任) >> Computer Systems Lab, Institute of Information Science, >> Academia Sinica, Taiwan (R.O.C.) >> Tel:886-2-2788-3799 #1667 >> Homepage: http://people.cs.nctu.edu.tw/~chenwj >> > > > > -- > Jeff Jia > >-- Jeff Jia -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130410/9bac6a31/attachment.html>
陳韋任 (Wei-Ren Chen)
2013-Apr-11 02:17 UTC
[LLVMdev] Does DragonEgg support parameters like -fno-builtin in clang?
On Wed, Apr 10, 2013 at 03:06:38PM -0700, Jeff Jia wrote:> Hi, > > I have figured out a way to achieve similar effects. > > gcc -S -c -O0 -fplugin=$(DRAGONEGG_SO) -fplugin-arg-dragonegg-emit-ir > hello.c -o hello.bc > opt -O3 -disable-simplify-libcalls hello.bc -o hello.bcI guess "-fno-built-in" does not prevent dragonegg emitting "llvm" builtin. Nice try. :) Cheers, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj
Maybe Matching Threads
- [LLVMdev] Does DragonEgg support parameters like -fno-builtin in clang?
- How to prevent clang/llvm from generating floating-point instructions?
- [LLVMdev] Does DragonEgg support parameters like -fno-builtin in clang?
- [LLVMdev] Does DragonEgg support parameters like -fno-builtin in clang?
- [LLVMdev] Pass llvm options to DragonEgg