Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jul 2013 14:46:39 GMT
From:      Brooks Davis <brooks@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 231227 for review
Message-ID:  <201307171446.r6HEkdYl035352@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@231227?ac=10

Change 231227 by brooks@brooks_zenith on 2013/07/17 14:46:35

	Don't run the optimizer when generating LLVM-IR.  Instead,
	run it in llc when creating the actual object files.

Affected files ...

.. //depot/projects/ctsrd/tesla/src/share/mk/sys.mk#12 edit
.. //depot/projects/ctsrd/tesla/src/sys/conf/kern.pre.mk#6 edit

Differences ...

==== //depot/projects/ctsrd/tesla/src/share/mk/sys.mk#12 (text+ko) ====

@@ -32,7 +32,7 @@
 .if defined(%POSIX)
 .SUFFIXES:	.o .c .y .l .a .sh .f
 .else
-.SUFFIXES:	.out .a .dot .instrll .instro .oll .obc .ln .manifest .o .c .cc .cpp .cxx .C .m .F .f .e .r .tesla .y .l .S .asm .s .cl .p .h .sh
+.SUFFIXES:	.out .a .dot .instrll .instro .oll .ln .manifest .o .c .cc .cpp .cxx .C .m .F .f .e .r .tesla .y .l .S .asm .s .cl .p .h .sh
 .endif
 
 AR		?=	ar
@@ -126,6 +126,7 @@
 LINTLIBFLAGS	?=	-cghapbxu -C ${LIB}
 
 LLC		?=	llc
+LLCFLAGS	?=	${CFLAGS:M-O*:S/^-O$/-O1/:S/-O/-O=/}
 
 LLVM_LINK	?=	llvm-link
 
@@ -231,11 +232,8 @@
 	chmod a+x ${.TARGET}
 
 .c.oll:
-	${CC} ${CFLAGS} -emit-llvm -S ${.IMPSRC} -o ${.TARGET}
+	${CC} ${CFLAGS:N-O*} -emit-llvm -S ${.IMPSRC} -o ${.TARGET}
 
-.c.obc:
-	${CC} ${CFLAGS} -cc1 -emit-llvm -c ${.IMPSRC} -o ${.TARGET}
-
 .c.ln:
 	${LINT} ${LINTOBJFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} || \
 	    touch ${.TARGET}
@@ -258,9 +256,6 @@
 .cc .cpp .cxx .C:
 	${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
 
-.cc.obc .C.obc .cpp.obc .cxx.obc:
-	${CXX} ${CXXFLAGS} -cc1 -emit-llvm -c ${.IMPSRC} -o ${.TARGET}
-
 .cc.o .cpp.o .cxx.o .C.o:
 	${CXX} ${CXXFLAGS} -c ${.IMPSRC}
 

==== //depot/projects/ctsrd/tesla/src/sys/conf/kern.pre.mk#6 (text+ko) ====

@@ -97,7 +97,7 @@
 .endif
 WERROR?= -Werror
 
-LLCFLAGS=	-code-model=kernel
+LLCFLAGS+=	-code-model=kernel
 
 # XXX LOCORE means "don't declare C stuff" not "for locore.s".
 ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307171446.r6HEkdYl035352>