svn commit: r223453 - in user/gabor/tre-integration:
contrib/compiler-rt/lib contrib/compiler-rt/lib/arm
contrib/llvm/include/llvm contrib/llvm/include/llvm/ADT
contrib/llvm/include/llvm/Analysis c...
Gabor Kovesdan
gabor at FreeBSD.org
Thu Jun 23 00:04:07 UTC 2011
Author: gabor
Date: Thu Jun 23 00:04:06 2011
New Revision: 223453
URL: http://svn.freebsd.org/changeset/base/223453
Log:
- Manually merge some new files. I don't actually understand how they got
lost but mergeinfo is already recorded so the branch should be in a
consistent state now.
Added:
user/gabor/tre-integration/contrib/compiler-rt/lib/abi.h (contents, props changed)
user/gabor/tre-integration/contrib/compiler-rt/lib/arm/divmodsi4.S (contents, props changed)
user/gabor/tre-integration/contrib/compiler-rt/lib/arm/divsi3.S (contents, props changed)
user/gabor/tre-integration/contrib/compiler-rt/lib/arm/softfloat-alias.list
user/gabor/tre-integration/contrib/compiler-rt/lib/arm/udivmodsi4.S (contents, props changed)
user/gabor/tre-integration/contrib/compiler-rt/lib/arm/udivsi3.S (contents, props changed)
user/gabor/tre-integration/contrib/compiler-rt/lib/arm/umodsi3.S (contents, props changed)
user/gabor/tre-integration/contrib/compiler-rt/lib/divmoddi4.c (contents, props changed)
user/gabor/tre-integration/contrib/compiler-rt/lib/divmodsi4.c (contents, props changed)
user/gabor/tre-integration/contrib/compiler-rt/lib/subdf3.c (contents, props changed)
user/gabor/tre-integration/contrib/compiler-rt/lib/subsf3.c (contents, props changed)
user/gabor/tre-integration/contrib/compiler-rt/lib/udivmodsi4.c (contents, props changed)
user/gabor/tre-integration/contrib/llvm/include/llvm/ADT/PackedVector.h (contents, props changed)
user/gabor/tre-integration/contrib/llvm/include/llvm/Analysis/BranchProbabilityInfo.h (contents, props changed)
user/gabor/tre-integration/contrib/llvm/include/llvm/DefaultPasses.h (contents, props changed)
user/gabor/tre-integration/contrib/llvm/include/llvm/MC/MCWin64EH.h (contents, props changed)
user/gabor/tre-integration/contrib/llvm/include/llvm/Support/BranchProbability.h (contents, props changed)
user/gabor/tre-integration/contrib/llvm/include/llvm/Support/PassManagerBuilder.h (contents, props changed)
user/gabor/tre-integration/contrib/llvm/include/llvm/Support/Win64EH.h (contents, props changed)
user/gabor/tre-integration/contrib/llvm/lib/Analysis/BranchProbabilityInfo.cpp (contents, props changed)
user/gabor/tre-integration/contrib/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp (contents, props changed)
user/gabor/tre-integration/contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp (contents, props changed)
user/gabor/tre-integration/contrib/llvm/lib/CodeGen/RegisterClassInfo.h (contents, props changed)
user/gabor/tre-integration/contrib/llvm/lib/ExecutionEngine/TargetSelect.cpp (contents, props changed)
user/gabor/tre-integration/contrib/llvm/lib/MC/MCWin64EH.cpp (contents, props changed)
user/gabor/tre-integration/contrib/llvm/lib/Support/BranchProbability.cpp (contents, props changed)
user/gabor/tre-integration/contrib/llvm/lib/Target/Mips/MipsEmitGPRestore.cpp (contents, props changed)
user/gabor/tre-integration/contrib/llvm/utils/TableGen/CodeGenRegisters.cpp (contents, props changed)
user/gabor/tre-integration/contrib/llvm/utils/TableGen/SetTheory.cpp (contents, props changed)
user/gabor/tre-integration/contrib/llvm/utils/TableGen/SetTheory.h (contents, props changed)
user/gabor/tre-integration/contrib/sendmail/cf/ostype/solaris11.m4
user/gabor/tre-integration/contrib/tre/lib/tre.h (contents, props changed)
user/gabor/tre-integration/crypto/openssh/audit-linux.c (contents, props changed)
user/gabor/tre-integration/crypto/openssh/bufec.c (contents, props changed)
user/gabor/tre-integration/crypto/openssh/kexecdh.c (contents, props changed)
user/gabor/tre-integration/crypto/openssh/kexecdhc.c (contents, props changed)
user/gabor/tre-integration/crypto/openssh/kexecdhs.c (contents, props changed)
user/gabor/tre-integration/crypto/openssh/openbsd-compat/charclass.h (contents, props changed)
user/gabor/tre-integration/crypto/openssh/openbsd-compat/timingsafe_bcmp.c (contents, props changed)
user/gabor/tre-integration/crypto/openssh/ssh-ecdsa.c (contents, props changed)
user/gabor/tre-integration/etc/periodic/security/460.chkportsum.rej
user/gabor/tre-integration/lib/libdwarf/dwarf_func.c (contents, props changed)
user/gabor/tre-integration/lib/libsbuf/Symbol.map
user/gabor/tre-integration/lib/libsbuf/Version.def
user/gabor/tre-integration/lib/libutil/kinfo_getallproc.3 (contents, props changed)
user/gabor/tre-integration/lib/libutil/kinfo_getallproc.c (contents, props changed)
user/gabor/tre-integration/lib/libutil/kinfo_getproc.3 (contents, props changed)
user/gabor/tre-integration/lib/libutil/kinfo_getproc.c (contents, props changed)
user/gabor/tre-integration/release/pc98/mkisoimages.sh (contents, props changed)
user/gabor/tre-integration/release/powerpc/generate-hfs.sh (contents, props changed)
user/gabor/tre-integration/release/powerpc/hfs-boot.bz2.uu
user/gabor/tre-integration/sbin/hastd/proto_tcp.c (contents, props changed)
user/gabor/tre-integration/share/man/man4/ath_ahb.4 (contents, props changed)
user/gabor/tre-integration/share/man/man4/ath_pci.4 (contents, props changed)
user/gabor/tre-integration/share/man/man4/geom_map.4 (contents, props changed)
user/gabor/tre-integration/share/man/man4/man4.i386/glxiic.4 (contents, props changed)
user/gabor/tre-integration/share/man/man4/umcs.4 (contents, props changed)
user/gabor/tre-integration/sys/amd64/conf/LINT
user/gabor/tre-integration/sys/amd64/conf/LINT-VIMAGE
user/gabor/tre-integration/sys/boot/forth/beastie.4th.8 (contents, props changed)
user/gabor/tre-integration/sys/boot/forth/brand.4th
user/gabor/tre-integration/sys/boot/forth/brand.4th.8 (contents, props changed)
user/gabor/tre-integration/sys/boot/forth/check-password.4th
user/gabor/tre-integration/sys/boot/forth/check-password.4th.8 (contents, props changed)
user/gabor/tre-integration/sys/boot/forth/color.4th
user/gabor/tre-integration/sys/boot/forth/color.4th.8 (contents, props changed)
user/gabor/tre-integration/sys/boot/forth/delay.4th
user/gabor/tre-integration/sys/boot/forth/delay.4th.8 (contents, props changed)
user/gabor/tre-integration/sys/boot/forth/menu-commands.4th
user/gabor/tre-integration/sys/boot/forth/menu.4th
user/gabor/tre-integration/sys/boot/forth/menu.4th.8 (contents, props changed)
user/gabor/tre-integration/sys/boot/forth/menu.rc
user/gabor/tre-integration/sys/boot/forth/shortcuts.4th
user/gabor/tre-integration/sys/boot/forth/version.4th
user/gabor/tre-integration/sys/boot/forth/version.4th.8 (contents, props changed)
user/gabor/tre-integration/sys/boot/ia64/common/icache.c (contents, props changed)
user/gabor/tre-integration/sys/compat/linux/linux_videodev2.h (contents, props changed)
user/gabor/tre-integration/sys/compat/linux/linux_videodev2_compat.h (contents, props changed)
user/gabor/tre-integration/sys/dev/ath/ath_hal/ah_eeprom_9287.c (contents, props changed)
user/gabor/tre-integration/sys/dev/ath/ath_hal/ah_eeprom_9287.h (contents, props changed)
user/gabor/tre-integration/sys/dev/ath/ath_hal/ar9002/ar9285an.h (contents, props changed)
user/gabor/tre-integration/sys/dev/ath/ath_hal/ar9002/ar9287.c (contents, props changed)
user/gabor/tre-integration/sys/dev/ath/ath_hal/ar9002/ar9287.h (contents, props changed)
user/gabor/tre-integration/sys/dev/ath/ath_hal/ar9002/ar9287.ini
user/gabor/tre-integration/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c (contents, props changed)
user/gabor/tre-integration/sys/dev/ath/ath_hal/ar9002/ar9287_cal.c (contents, props changed)
user/gabor/tre-integration/sys/dev/ath/ath_hal/ar9002/ar9287_cal.h (contents, props changed)
user/gabor/tre-integration/sys/dev/ath/ath_hal/ar9002/ar9287_olc.c (contents, props changed)
user/gabor/tre-integration/sys/dev/ath/ath_hal/ar9002/ar9287_olc.h (contents, props changed)
user/gabor/tre-integration/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c (contents, props changed)
user/gabor/tre-integration/sys/dev/ath/ath_hal/ar9002/ar9287_reset.h (contents, props changed)
user/gabor/tre-integration/sys/dev/ath/ath_hal/ar9002/ar9287an.h (contents, props changed)
user/gabor/tre-integration/sys/dev/ath/ath_hal/ar9002/ar9287phy.h (contents, props changed)
user/gabor/tre-integration/sys/dev/ath/if_athdfs.h (contents, props changed)
user/gabor/tre-integration/sys/dev/cxgbe/common/jhash.h (contents, props changed)
user/gabor/tre-integration/sys/dev/cxgbe/t4_l2t.c (contents, props changed)
user/gabor/tre-integration/sys/dev/cxgbe/t4_l2t.h (contents, props changed)
user/gabor/tre-integration/sys/dev/iicbus/ad7417.c (contents, props changed)
user/gabor/tre-integration/sys/dev/usb/serial/umcs.c (contents, props changed)
user/gabor/tre-integration/sys/dev/usb/serial/umcs.h (contents, props changed)
user/gabor/tre-integration/sys/i386/conf/LINT
user/gabor/tre-integration/sys/i386/conf/LINT-VIMAGE
user/gabor/tre-integration/sys/ia64/conf/LINT
user/gabor/tre-integration/sys/netinet/in_pcbgroup.c (contents, props changed)
user/gabor/tre-integration/sys/netinet6/in6_pcbgroup.c (contents, props changed)
user/gabor/tre-integration/sys/nfs/nfs_kdtrace.h (contents, props changed)
user/gabor/tre-integration/sys/pc98/conf/LINT
user/gabor/tre-integration/sys/powerpc/conf/LINT
user/gabor/tre-integration/sys/powerpc/include/rtas.h (contents, props changed)
user/gabor/tre-integration/sys/powerpc/ofw/ofwcall32.S (contents, props changed)
user/gabor/tre-integration/sys/powerpc/ofw/ofwcall64.S (contents, props changed)
user/gabor/tre-integration/sys/powerpc/ofw/ofwmagic.S (contents, props changed)
user/gabor/tre-integration/sys/powerpc/ofw/rtas.c (contents, props changed)
user/gabor/tre-integration/sys/powerpc/powermac/powermac_thermal.c (contents, props changed)
user/gabor/tre-integration/sys/powerpc/powermac/powermac_thermal.h (contents, props changed)
user/gabor/tre-integration/sys/powerpc/powermac/windtunnel.c (contents, props changed)
user/gabor/tre-integration/sys/sparc64/conf/LINT
user/gabor/tre-integration/sys/sys/_cpuset.h (contents, props changed)
user/gabor/tre-integration/sys/sys/_stdint.h (contents, props changed)
user/gabor/tre-integration/tools/build/options/WITHOUT_BINUTILS
user/gabor/tre-integration/tools/build/options/WITHOUT_GCC
user/gabor/tre-integration/tools/build/options/WITHOUT_GPIO
user/gabor/tre-integration/tools/build/options/WITHOUT_KERNEL_SYMBOLS
user/gabor/tre-integration/tools/build/options/WITH_CLANG
user/gabor/tre-integration/tools/build/options/WITH_FDT
user/gabor/tre-integration/tools/build/options/WITH_OFED
user/gabor/tre-integration/tools/regression/bin/sh/builtins/case5.0
user/gabor/tre-integration/tools/regression/bin/sh/builtins/case6.0
user/gabor/tre-integration/tools/regression/bin/sh/builtins/case7.0
user/gabor/tre-integration/tools/regression/bin/sh/builtins/cd3.0
user/gabor/tre-integration/tools/regression/bin/sh/builtins/cd4.0
user/gabor/tre-integration/tools/regression/bin/sh/builtins/cd5.0
user/gabor/tre-integration/tools/regression/bin/sh/builtins/cd6.0
user/gabor/tre-integration/tools/regression/bin/sh/builtins/cd7.0
user/gabor/tre-integration/tools/regression/bin/sh/builtins/dot4.0
user/gabor/tre-integration/tools/regression/bin/sh/builtins/set1.0
user/gabor/tre-integration/tools/regression/bin/sh/errors/bad-parm-exp6.2 (contents, props changed)
user/gabor/tre-integration/tools/regression/bin/sh/errors/bad-parm-exp6.2.stderr
user/gabor/tre-integration/tools/regression/bin/sh/execution/set-n1.0
user/gabor/tre-integration/tools/regression/bin/sh/execution/set-n2.0
user/gabor/tre-integration/tools/regression/bin/sh/execution/set-n3.0
user/gabor/tre-integration/tools/regression/bin/sh/execution/set-n4.0
user/gabor/tre-integration/tools/regression/bin/sh/execution/set-x1.0
user/gabor/tre-integration/tools/regression/bin/sh/execution/set-x2.0
user/gabor/tre-integration/tools/regression/bin/sh/execution/set-x3.0
user/gabor/tre-integration/tools/regression/bin/sh/expansion/heredoc1.0
user/gabor/tre-integration/tools/regression/bin/sh/expansion/heredoc2.0
user/gabor/tre-integration/tools/regression/bin/sh/expansion/ifs4.0
user/gabor/tre-integration/tools/regression/bin/sh/expansion/length7.0
user/gabor/tre-integration/tools/regression/bin/sh/expansion/length8.0
user/gabor/tre-integration/tools/regression/bin/sh/expansion/set-u3.0
user/gabor/tre-integration/tools/regression/bin/sh/expansion/trim8.0
user/gabor/tre-integration/tools/regression/bin/sh/parameters/env1.0
user/gabor/tre-integration/tools/regression/bin/sh/parameters/positional1.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/alias4.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/alias5.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/dollar-quote1.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/dollar-quote10.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/dollar-quote11.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/dollar-quote2.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/dollar-quote3.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/dollar-quote4.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/dollar-quote5.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/dollar-quote6.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/dollar-quote7.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/dollar-quote8.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/dollar-quote9.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/func2.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/func3.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/heredoc10.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/heredoc11.0
user/gabor/tre-integration/tools/regression/bin/sh/parser/heredoc9.0
user/gabor/tre-integration/tools/regression/usr.bin/printf/regress.l1.out
user/gabor/tre-integration/tools/regression/usr.bin/printf/regress.l2.out
user/gabor/tre-integration/usr.bin/fstat/functions.h (contents, props changed)
user/gabor/tre-integration/usr.bin/fstat/fuser.1 (contents, props changed)
user/gabor/tre-integration/usr.bin/fstat/fuser.c (contents, props changed)
user/gabor/tre-integration/usr.bin/fstat/main.c (contents, props changed)
user/gabor/tre-integration/usr.sbin/bsdinstall/bsdinstall.8 (contents, props changed)
user/gabor/tre-integration/usr.sbin/bsdinstall/scripts/netconfig_ipv4 (contents, props changed)
user/gabor/tre-integration/usr.sbin/bsdinstall/scripts/netconfig_ipv6 (contents, props changed)
Added: user/gabor/tre-integration/contrib/compiler-rt/lib/abi.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/compiler-rt/lib/abi.h Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,23 @@
+/* ===------ abi.h - configuration header for compiler-rt -----------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file is a configuration header for compiler-rt.
+ * This file is not part of the interface of this library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+
+#if __ARM_EABI__
+# define ARM_EABI_FNALIAS(aeabi_name, name) \
+ void __aeabi_##aeabi_name() __attribute__((alias("__" #name)));
+# define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
+#else
+# define ARM_EABI_FNALIAS(aeabi_name, name)
+# define COMPILER_RT_ABI
+#endif
Added: user/gabor/tre-integration/contrib/compiler-rt/lib/arm/divmodsi4.S
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/compiler-rt/lib/arm/divmodsi4.S Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,47 @@
+/*===-- divmodsi4.S - 32-bit signed integer divide and modulus ------------===//
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===//
+ *
+ * This file implements the __divmodsi4 (32-bit signed integer divide and
+ * modulus) function for the ARM architecture. A naive digit-by-digit
+ * computation is employed for simplicity.
+ *
+ *===----------------------------------------------------------------------===*/
+
+#include "../assembly.h"
+
+#define ESTABLISH_FRAME \
+ push {r4-r7, lr} ;\
+ add r7, sp, #12
+#define CLEAR_FRAME_AND_RETURN \
+ pop {r4-r7, pc}
+
+.syntax unified
+.align 3
+DEFINE_COMPILERRT_FUNCTION(__divmodsi4)
+ ESTABLISH_FRAME
+// Set aside the sign of the quotient and modulus, and the address for the
+// modulus.
+ eor r4, r0, r1
+ mov r5, r0
+ mov r6, r2
+// Take the absolute value of a and b via abs(x) = (x^(x >> 31)) - (x >> 31).
+ eor ip, r0, r0, asr #31
+ eor lr, r1, r1, asr #31
+ sub r0, ip, r0, asr #31
+ sub r1, lr, r1, asr #31
+// Unsigned divmod:
+ bl SYMBOL_NAME(__udivmodsi4)
+// Apply the sign of quotient and modulus
+ ldr r1, [r6]
+ eor r0, r0, r4, asr #31
+ eor r1, r1, r5, asr #31
+ sub r0, r0, r4, asr #31
+ sub r1, r1, r5, asr #31
+ str r1, [r6]
+ CLEAR_FRAME_AND_RETURN
Added: user/gabor/tre-integration/contrib/compiler-rt/lib/arm/divsi3.S
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/compiler-rt/lib/arm/divsi3.S Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,41 @@
+/*===-- divsi3.S - 32-bit signed integer divide ---------------------------===//
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===//
+ *
+ * This file implements the __divsi3 (32-bit signed integer divide) function
+ * for the ARM architecture as a wrapper around the unsigned routine.
+ *
+ *===----------------------------------------------------------------------===*/
+
+#include "../assembly.h"
+
+#define ESTABLISH_FRAME \
+ push {r4, r7, lr} ;\
+ add r7, sp, #4
+#define CLEAR_FRAME_AND_RETURN \
+ pop {r4, r7, pc}
+
+.syntax unified
+.align 3
+// Ok, APCS and AAPCS agree on 32 bit args, so it's safe to use the same routine.
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_idiv, __divsi3)
+DEFINE_COMPILERRT_FUNCTION(__divsi3)
+ ESTABLISH_FRAME
+// Set aside the sign of the quotient.
+ eor r4, r0, r1
+// Take absolute value of a and b via abs(x) = (x^(x >> 31)) - (x >> 31).
+ eor r2, r0, r0, asr #31
+ eor r3, r1, r1, asr #31
+ sub r0, r2, r0, asr #31
+ sub r1, r3, r1, asr #31
+// abs(a) / abs(b)
+ bl SYMBOL_NAME(__udivsi3)
+// Apply sign of quotient to result and return.
+ eor r0, r0, r4, asr #31
+ sub r0, r0, r4, asr #31
+ CLEAR_FRAME_AND_RETURN
Added: user/gabor/tre-integration/contrib/compiler-rt/lib/arm/softfloat-alias.list
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/compiler-rt/lib/arm/softfloat-alias.list Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,21 @@
+#
+# These are soft float functions which can be
+# aliased to the *vfp functions on arm processors
+# that support floating point instructions.
+#
+___adddf3vfp ___adddf3
+___addsf3vfp ___addsf3
+___divdf3vfp ___divdf3
+___divsf3vfp ___divsf3
+___extendsfdf2vfp ___extendsfdf2
+___fixdfsivfp ___fixdfsi
+___fixsfsivfp ___fixsfsi
+___floatsidfvfp ___floatsidf
+___floatsisfvfp ___floatsisf
+___muldf3vfp ___muldf3
+___mulsf3vfp ___mulsf3
+___subdf3vfp ___subdf3
+___subsf3vfp ___subsf3
+___truncdfsf2vfp ___truncdfsf2
+___floatunssidfvfp ___floatunsidf
+___floatunssisfvfp ___floatunsisf
Added: user/gabor/tre-integration/contrib/compiler-rt/lib/arm/udivmodsi4.S
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/compiler-rt/lib/arm/udivmodsi4.S Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,80 @@
+/*===-- udivmodsi4.S - 32-bit unsigned integer divide and modulus ---------===//
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===//
+ *
+ * This file implements the __udivmodsi4 (32-bit unsigned integer divide and
+ * modulus) function for the ARM architecture. A naive digit-by-digit
+ * computation is employed for simplicity.
+ *
+ *===----------------------------------------------------------------------===*/
+
+#include "../assembly.h"
+
+#define ESTABLISH_FRAME \
+ push {r4, r7, lr} ;\
+ add r7, sp, #4
+#define CLEAR_FRAME_AND_RETURN \
+ pop {r4, r7, pc}
+
+#define a r0
+#define b r1
+#define i r3
+#define r r4
+#define q ip
+#define one lr
+
+.syntax unified
+.align 3
+DEFINE_COMPILERRT_FUNCTION(__udivmodsi4)
+// We use a simple digit by digit algorithm; before we get into the actual
+// divide loop, we must calculate the left-shift amount necessary to align
+// the MSB of the divisor with that of the dividend (If this shift is
+// negative, then the result is zero, and we early out). We also conjure a
+// bit mask of 1 to use in constructing the quotient, and initialize the
+// quotient to zero.
+ ESTABLISH_FRAME
+ clz r4, a
+ tst b, b // detect divide-by-zero
+ clz r3, b
+ mov q, #0
+ beq LOCAL_LABEL(return) // return 0 if b is zero.
+ mov one, #1
+ subs i, r3, r4
+ blt LOCAL_LABEL(return) // return 0 if MSB(a) < MSB(b)
+
+LOCAL_LABEL(mainLoop):
+// This loop basically implements the following:
+//
+// do {
+// if (a >= b << i) {
+// a -= b << i;
+// q |= 1 << i;
+// if (a == 0) break;
+// }
+// } while (--i)
+//
+// Note that this does not perform the final iteration (i == 0); by doing it
+// this way, we can merge the two branches which is a substantial win for
+// such a tight loop on current ARM architectures.
+ subs r, a, b, lsl i
+ orrhs q, q,one, lsl i
+ movhs a, r
+ subsne i, i, #1
+ bhi LOCAL_LABEL(mainLoop)
+
+// Do the final test subtraction and update of quotient (i == 0), as it is
+// not performed in the main loop.
+ subs r, a, b
+ orrhs q, #1
+ movhs a, r
+
+LOCAL_LABEL(return):
+// Store the remainder, and move the quotient to r0, then return.
+ str a, [r2]
+ mov r0, q
+ CLEAR_FRAME_AND_RETURN
Added: user/gabor/tre-integration/contrib/compiler-rt/lib/arm/udivsi3.S
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/compiler-rt/lib/arm/udivsi3.S Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,80 @@
+/*===-- udivsi3.S - 32-bit unsigned integer divide ------------------------===//
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===//
+ *
+ * This file implements the __udivsi3 (32-bit unsigned integer divide)
+ * function for the ARM architecture. A naive digit-by-digit computation is
+ * employed for simplicity.
+ *
+ *===----------------------------------------------------------------------===*/
+
+#include "../assembly.h"
+
+#define ESTABLISH_FRAME \
+ push {r7, lr} ;\
+ mov r7, sp
+#define CLEAR_FRAME_AND_RETURN \
+ pop {r7, pc}
+
+#define a r0
+#define b r1
+#define r r2
+#define i r3
+#define q ip
+#define one lr
+
+.syntax unified
+.align 3
+// Ok, APCS and AAPCS agree on 32 bit args, so it's safe to use the same routine.
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_uidiv, __udivsi3)
+DEFINE_COMPILERRT_FUNCTION(__udivsi3)
+// We use a simple digit by digit algorithm; before we get into the actual
+// divide loop, we must calculate the left-shift amount necessary to align
+// the MSB of the divisor with that of the dividend (If this shift is
+// negative, then the result is zero, and we early out). We also conjure a
+// bit mask of 1 to use in constructing the quotient, and initialize the
+// quotient to zero.
+ ESTABLISH_FRAME
+ clz r2, a
+ tst b, b // detect divide-by-zero
+ clz r3, b
+ mov q, #0
+ beq LOCAL_LABEL(return) // return 0 if b is zero.
+ mov one, #1
+ subs i, r3, r2
+ blt LOCAL_LABEL(return) // return 0 if MSB(a) < MSB(b)
+
+LOCAL_LABEL(mainLoop):
+// This loop basically implements the following:
+//
+// do {
+// if (a >= b << i) {
+// a -= b << i;
+// q |= 1 << i;
+// if (a == 0) break;
+// }
+// } while (--i)
+//
+// Note that this does not perform the final iteration (i == 0); by doing it
+// this way, we can merge the two branches which is a substantial win for
+// such a tight loop on current ARM architectures.
+ subs r, a, b, lsl i
+ orrhs q, q,one, lsl i
+ movhs a, r
+ subsne i, i, #1
+ bhi LOCAL_LABEL(mainLoop)
+
+// Do the final test subtraction and update of quotient (i == 0), as it is
+// not performed in the main loop.
+ subs r, a, b
+ orrhs q, #1
+
+LOCAL_LABEL(return):
+// Move the quotient to r0 and return.
+ mov r0, q
+ CLEAR_FRAME_AND_RETURN
Added: user/gabor/tre-integration/contrib/compiler-rt/lib/arm/umodsi3.S
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/compiler-rt/lib/arm/umodsi3.S Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,58 @@
+/*===-- umodsi3.S - 32-bit unsigned integer modulus -----------------------===//
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===//
+ *
+ * This file implements the __umodsi3 (32-bit unsigned integer modulus)
+ * function for the ARM architecture. A naive digit-by-digit computation is
+ * employed for simplicity.
+ *
+ *===----------------------------------------------------------------------===*/
+
+#include "../assembly.h"
+
+#define a r0
+#define b r1
+#define r r2
+#define i r3
+
+.syntax unified
+.align 3
+DEFINE_COMPILERRT_FUNCTION(__umodsi3)
+// We use a simple digit by digit algorithm; before we get into the actual
+// divide loop, we must calculate the left-shift amount necessary to align
+// the MSB of the divisor with that of the dividend.
+ clz r2, a
+ tst b, b // detect b == 0
+ clz r3, b
+ bxeq lr // return a if b == 0
+ subs i, r3, r2
+ bxlt lr // return a if MSB(a) < MSB(b)
+
+LOCAL_LABEL(mainLoop):
+// This loop basically implements the following:
+//
+// do {
+// if (a >= b << i) {
+// a -= b << i;
+// if (a == 0) break;
+// }
+// } while (--i)
+//
+// Note that this does not perform the final iteration (i == 0); by doing it
+// this way, we can merge the two branches which is a substantial win for
+// such a tight loop on current ARM architectures.
+ subs r, a, b, lsl i
+ movhs a, r
+ subsne i, i, #1
+ bhi LOCAL_LABEL(mainLoop)
+
+// Do the final test subtraction and update of remainder (i == 0), as it is
+// not performed in the main loop.
+ subs r, a, b
+ movhs a, r
+ bx lr
Added: user/gabor/tre-integration/contrib/compiler-rt/lib/divmoddi4.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/compiler-rt/lib/divmoddi4.c Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,30 @@
+/*===-- divmoddi4.c - Implement __divmoddi4 --------------------------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file implements __divmoddi4 for the compiler_rt library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+#include "abi.h"
+
+#include "int_lib.h"
+
+extern COMPILER_RT_ABI di_int __divdi3(di_int a, di_int b);
+
+ARM_EABI_FNALIAS(ldivmod, divmoddi4);
+
+/* Returns: a / b, *rem = a % b */
+
+COMPILER_RT_ABI di_int
+__divmoddi4(di_int a, di_int b, di_int* rem)
+{
+ di_int d = __divdi3(a,b);
+ *rem = a - (d*b);
+ return d;
+}
Added: user/gabor/tre-integration/contrib/compiler-rt/lib/divmodsi4.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/compiler-rt/lib/divmodsi4.c Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,31 @@
+/*===-- divmodsi4.c - Implement __divmodsi4 --------------------------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file implements __divmodsi4 for the compiler_rt library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+#include "abi.h"
+
+#include "int_lib.h"
+
+extern COMPILER_RT_ABI si_int __divsi3(si_int a, si_int b);
+
+
+/* Returns: a / b, *rem = a % b */
+
+COMPILER_RT_ABI si_int
+__divmodsi4(si_int a, si_int b, si_int* rem)
+{
+ si_int d = __divsi3(a,b);
+ *rem = a - (d*b);
+ return d;
+}
+
+
Added: user/gabor/tre-integration/contrib/compiler-rt/lib/subdf3.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/compiler-rt/lib/subdf3.c Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,30 @@
+//===-- lib/adddf3.c - Double-precision subtraction ---------------*- C -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements double-precision soft-float subtraction with the
+// IEEE-754 default rounding (to nearest, ties to even).
+//
+//===----------------------------------------------------------------------===//
+#include "abi.h"
+
+#define DOUBLE_PRECISION
+#include "fp_lib.h"
+
+fp_t COMPILER_RT_ABI __adddf3(fp_t a, fp_t b);
+
+
+ARM_EABI_FNALIAS(dsub, subdf3);
+
+// Subtraction; flip the sign bit of b and add.
+COMPILER_RT_ABI fp_t
+__subdf3(fp_t a, fp_t b) {
+ return __adddf3(a, fromRep(toRep(b) ^ signBit));
+}
+
+/* FIXME: rsub for ARM EABI */
Added: user/gabor/tre-integration/contrib/compiler-rt/lib/subsf3.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/compiler-rt/lib/subsf3.c Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,29 @@
+//===-- lib/subsf3.c - Single-precision subtraction ---------------*- C -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements single-precision soft-float subtraction with the
+// IEEE-754 default rounding (to nearest, ties to even).
+//
+//===----------------------------------------------------------------------===//
+#include "abi.h"
+
+#define SINGLE_PRECISION
+#include "fp_lib.h"
+
+fp_t COMPILER_RT_ABI __addsf3(fp_t a, fp_t b);
+
+ARM_EABI_FNALIAS(fsub, subsf3);
+
+// Subtraction; flip the sign bit of b and add.
+COMPILER_RT_ABI fp_t
+__subsf3(fp_t a, fp_t b) {
+ return __addsf3(a, fromRep(toRep(b) ^ signBit));
+}
+
+/* FIXME: rsub for ARM EABI */
Added: user/gabor/tre-integration/contrib/compiler-rt/lib/udivmodsi4.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/compiler-rt/lib/udivmodsi4.c Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,31 @@
+/*===-- udivmodsi4.c - Implement __udivmodsi4 ------------------------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file implements __udivmodsi4 for the compiler_rt library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+#include "abi.h"
+
+#include "int_lib.h"
+
+extern su_int COMPILER_RT_ABI __udivsi3(su_int n, su_int d);
+
+
+/* Returns: a / b, *rem = a % b */
+
+COMPILER_RT_ABI su_int
+__udivmodsi4(su_int a, su_int b, su_int* rem)
+{
+ si_int d = __udivsi3(a,b);
+ *rem = a - (d*b);
+ return d;
+}
+
+
Added: user/gabor/tre-integration/contrib/llvm/include/llvm/ADT/PackedVector.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/llvm/include/llvm/ADT/PackedVector.h Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,158 @@
+//===- llvm/ADT/PackedVector.h - Packed values vector -----------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the PackedVector class.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_ADT_PACKEDVECTOR_H
+#define LLVM_ADT_PACKEDVECTOR_H
+
+#include "llvm/ADT/BitVector.h"
+#include <limits>
+
+namespace llvm {
+
+template <typename T, unsigned BitNum, bool isSigned>
+class PackedVectorBase;
+
+// This won't be necessary if we can specialize members without specializing
+// the parent template.
+template <typename T, unsigned BitNum>
+class PackedVectorBase<T, BitNum, false> {
+protected:
+ static T getValue(const llvm::BitVector &Bits, unsigned Idx) {
+ T val = T();
+ for (unsigned i = 0; i != BitNum; ++i)
+ val = T(val | ((Bits[(Idx << (BitNum-1)) + i] ? 1UL : 0UL) << i));
+ return val;
+ }
+
+ static void setValue(llvm::BitVector &Bits, unsigned Idx, T val) {
+ assert((val >> BitNum) == 0 && "value is too big");
+ for (unsigned i = 0; i != BitNum; ++i)
+ Bits[(Idx << (BitNum-1)) + i] = val & (T(1) << i);
+ }
+};
+
+template <typename T, unsigned BitNum>
+class PackedVectorBase<T, BitNum, true> {
+protected:
+ static T getValue(const llvm::BitVector &Bits, unsigned Idx) {
+ T val = T();
+ for (unsigned i = 0; i != BitNum-1; ++i)
+ val = T(val | ((Bits[(Idx << (BitNum-1)) + i] ? 1UL : 0UL) << i));
+ if (Bits[(Idx << (BitNum-1)) + BitNum-1])
+ val = ~val;
+ return val;
+ }
+
+ static void setValue(llvm::BitVector &Bits, unsigned Idx, T val) {
+ if (val < 0) {
+ val = ~val;
+ Bits.set((Idx << (BitNum-1)) + BitNum-1);
+ }
+ assert((val >> (BitNum-1)) == 0 && "value is too big");
+ for (unsigned i = 0; i != BitNum-1; ++i)
+ Bits[(Idx << (BitNum-1)) + i] = val & (T(1) << i);
+ }
+};
+
+/// \brief Store a vector of values using a specific number of bits for each
+/// value. Both signed and unsigned types can be used, e.g
+/// @code
+/// PackedVector<signed, 2> vec;
+/// @endcode
+/// will create a vector accepting values -2, -1, 0, 1. Any other value will hit
+/// an assertion.
+template <typename T, unsigned BitNum>
+class PackedVector : public PackedVectorBase<T, BitNum,
+ std::numeric_limits<T>::is_signed> {
+ llvm::BitVector Bits;
+ typedef PackedVectorBase<T, BitNum, std::numeric_limits<T>::is_signed> base;
+
+public:
+ class reference {
+ PackedVector &Vec;
+ const unsigned Idx;
+
+ reference(); // Undefined
+ public:
+ reference(PackedVector &vec, unsigned idx) : Vec(vec), Idx(idx) { }
+
+ reference &operator=(T val) {
+ Vec.setValue(Vec.Bits, Idx, val);
+ return *this;
+ }
+ operator T() {
+ return Vec.getValue(Vec.Bits, Idx);
+ }
+ };
+
+ PackedVector() { }
+ explicit PackedVector(unsigned size) : Bits(size << (BitNum-1)) { }
+
+ bool empty() const { return Bits.empty(); }
+
+ unsigned size() const { return Bits.size() >> (BitNum-1); }
+
+ void clear() { Bits.clear(); }
+
+ void resize(unsigned N) { Bits.resize(N << (BitNum-1)); }
+
+ void reserve(unsigned N) { Bits.reserve(N << (BitNum-1)); }
+
+ PackedVector &reset() {
+ Bits.reset();
+ return *this;
+ }
+
+ void push_back(T val) {
+ resize(size()+1);
+ (*this)[size()-1] = val;
+ }
+
+ reference operator[](unsigned Idx) {
+ return reference(*this, Idx);
+ }
+
+ T operator[](unsigned Idx) const {
+ return base::getValue(Bits, Idx);
+ }
+
+ bool operator==(const PackedVector &RHS) const {
+ return Bits == RHS.Bits;
+ }
+
+ bool operator!=(const PackedVector &RHS) const {
+ return Bits != RHS.Bits;
+ }
+
+ const PackedVector &operator=(const PackedVector &RHS) {
+ Bits = RHS.Bits;
+ return *this;
+ }
+
+ PackedVector &operator|=(const PackedVector &RHS) {
+ Bits |= RHS.Bits;
+ return *this;
+ }
+
+ void swap(PackedVector &RHS) {
+ Bits.swap(RHS.Bits);
+ }
+};
+
+// Leave BitNum=0 undefined.
+template <typename T>
+class PackedVector<T, 0>;
+
+} // end llvm namespace
+
+#endif
Added: user/gabor/tre-integration/contrib/llvm/include/llvm/Analysis/BranchProbabilityInfo.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/llvm/include/llvm/Analysis/BranchProbabilityInfo.h Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,78 @@
+//===--- BranchProbabilityInfo.h - Branch Probability Analysis --*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This pass is used to evaluate branch probabilties.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_ANALYSIS_BRANCHPROBABILITYINFO_H
+#define LLVM_ANALYSIS_BRANCHPROBABILITYINFO_H
+
+#include "llvm/InitializePasses.h"
+#include "llvm/Support/BranchProbability.h"
+#include "llvm/Analysis/LoopInfo.h"
+
+namespace llvm {
+
+class raw_ostream;
+
+class BranchProbabilityInfo : public FunctionPass {
+
+ // Default weight value. Used when we don't have information about the edge.
+ static const uint32_t DEFAULT_WEIGHT = 16;
+
+ typedef std::pair<BasicBlock *, BasicBlock *> Edge;
+
+ DenseMap<Edge, uint32_t> Weights;
+
+ // Get sum of the block successors' weights.
+ uint32_t getSumForBlock(BasicBlock *BB) const;
+
+public:
+ static char ID;
+
+ BranchProbabilityInfo() : FunctionPass(ID) {
+ initializeBranchProbabilityInfoPass(*PassRegistry::getPassRegistry());
+ }
+
+ void getAnalysisUsage(AnalysisUsage &AU) const {
+ AU.addRequired<LoopInfo>();
+ AU.setPreservesAll();
+ }
+
+ bool runOnFunction(Function &F);
+
+ // Returned value is between 1 and UINT32_MAX. Look at
+ // BranchProbabilityInfo.cpp for details.
+ uint32_t getEdgeWeight(BasicBlock *Src, BasicBlock *Dst) const;
+
+ // Look at BranchProbabilityInfo.cpp for details. Use it with caution!
+ void setEdgeWeight(BasicBlock *Src, BasicBlock *Dst, uint32_t Weight);
+
+ // A 'Hot' edge is an edge which probability is >= 80%.
+ bool isEdgeHot(BasicBlock *Src, BasicBlock *Dst) const;
+
+ // Return a hot successor for the block BB or null if there isn't one.
+ BasicBlock *getHotSucc(BasicBlock *BB) const;
+
+ // Return a probability as a fraction between 0 (0% probability) and
+ // 1 (100% probability), however the value is never equal to 0, and can be 1
+ // only iff SRC block has only one successor.
+ BranchProbability getEdgeProbability(BasicBlock *Src, BasicBlock *Dst) const;
+
+ // Print value between 0 (0% probability) and 1 (100% probability),
+ // however the value is never equal to 0, and can be 1 only iff SRC block
+ // has only one successor.
+ raw_ostream &printEdgeProbability(raw_ostream &OS, BasicBlock *Src,
+ BasicBlock *Dst) const;
+};
+
+}
+
+#endif
Added: user/gabor/tre-integration/contrib/llvm/include/llvm/DefaultPasses.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/llvm/include/llvm/DefaultPasses.h Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,167 @@
+//===- llvm/DefaultPasses.h - Default Pass Support code --------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+// This file defines the infrastructure for registering the standard pass list.
+// This defines sets of standard optimizations that plugins can modify and
+// front ends can use.
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEFAULT_PASS_SUPPORT_H
+#define LLVM_DEFAULT_PASS_SUPPORT_H
+
+namespace llvm {
+
+class PassManagerBase;
+
+/// Unique identifiers for the default standard passes. The addresses of
+/// these symbols are used to uniquely identify passes from the default list.
+namespace DefaultStandardPasses {
+extern unsigned char AggressiveDCEID;
+extern unsigned char ArgumentPromotionID;
+extern unsigned char BasicAliasAnalysisID;
+extern unsigned char CFGSimplificationID;
+extern unsigned char ConstantMergeID;
+extern unsigned char CorrelatedValuePropagationID;
+extern unsigned char DeadArgEliminationID;
+extern unsigned char DeadStoreEliminationID;
+extern unsigned char DeadTypeEliminationID;
+extern unsigned char EarlyCSEID;
+extern unsigned char FunctionAttrsID;
+extern unsigned char FunctionInliningID;
+extern unsigned char GVNID;
+extern unsigned char GlobalDCEID;
+extern unsigned char GlobalOptimizerID;
+extern unsigned char GlobalsModRefID;
+extern unsigned char IPSCCPID;
+extern unsigned char IndVarSimplifyID;
+extern unsigned char InlinerPlaceholderID;
+extern unsigned char InstructionCombiningID;
+extern unsigned char JumpThreadingID;
+extern unsigned char LICMID;
+extern unsigned char LoopDeletionID;
+extern unsigned char LoopIdiomID;
+extern unsigned char LoopRotateID;
+extern unsigned char LoopUnrollID;
+extern unsigned char LoopUnswitchID;
+extern unsigned char MemCpyOptID;
+extern unsigned char PruneEHID;
+extern unsigned char ReassociateID;
+extern unsigned char SCCPID;
+extern unsigned char ScalarReplAggregatesID;
+extern unsigned char SimplifyLibCallsID;
+extern unsigned char StripDeadPrototypesID;
+extern unsigned char TailCallEliminationID;
+extern unsigned char TypeBasedAliasAnalysisID;
+}
+
+/// StandardPass - The class responsible for maintaining the lists of standard
+class StandardPass {
+ friend class RegisterStandardPassLists;
+ public:
+ /// Predefined standard sets of passes
+ enum StandardSet {
+ AliasAnalysis,
+ Function,
+ Module,
+ LTO
+ };
+ /// Flags to specify whether a pass should be enabled. Passes registered
+ /// with the standard sets may specify a minimum optimization level and one
+ /// or more flags that must be set when constructing the set for the pass to
+ /// be used.
+ enum OptimizationFlags {
+ /// Optimize for size was requested.
+ OptimizeSize = 1<<0,
+ /// Allow passes which may make global module changes.
+ UnitAtATime = 1<<1,
+ /// UnrollLoops - Allow loop unrolling.
+ UnrollLoops = 1<<2,
+ /// Allow library calls to be simplified.
+ SimplifyLibCalls = 1<<3,
+ /// Whether the module may have code using exceptions.
+ HaveExceptions = 1<<4,
+ // Run an inliner pass as part of this set.
+ RunInliner = 1<<5
+ };
+ enum OptimizationFlagComponents {
+ /// The low bits are used to store the optimization level. When requesting
+ /// passes, this should store the requested optimisation level. When
+ /// setting passes, this should set the minimum optimization level at which
+ /// the pass will run.
+ OptimizationLevelMask=0xf,
+ /// The maximum optimisation level at which the pass is run.
+ MaxOptimizationLevelMask=0xf0,
+ // Flags that must be set
+ RequiredFlagMask=0xff00,
+ // Flags that may not be set.
+ DisallowedFlagMask=0xff0000,
+ MaxOptimizationLevelShift=4,
+ RequiredFlagShift=8,
+ DisallowedFlagShift=16
+ };
+ /// Returns the optimisation level from a set of flags.
+ static unsigned OptimizationLevel(unsigned flags) {
+ return flags & OptimizationLevelMask;
+ }
+ /// Returns the maximum optimization level for this set of flags
+ static unsigned MaxOptimizationLevel(unsigned flags) {
+ return (flags & MaxOptimizationLevelMask) >> 4;
+ }
+ /// Constructs a set of flags from the specified minimum and maximum
+ /// optimisation level
+ static unsigned OptimzationFlags(unsigned minLevel=0, unsigned maxLevel=0xf,
+ unsigned requiredFlags=0, unsigned disallowedFlags=0) {
+ return ((minLevel & OptimizationLevelMask) |
+ ((maxLevel<<MaxOptimizationLevelShift) & MaxOptimizationLevelMask)
+ | ((requiredFlags<<RequiredFlagShift) & RequiredFlagMask)
+ | ((disallowedFlags<<DisallowedFlagShift) & DisallowedFlagMask));
+ }
+ /// Returns the flags that must be set for this to match
+ static unsigned RequiredFlags(unsigned flags) {
+ return (flags & RequiredFlagMask) >> RequiredFlagShift;
+ }
+ /// Returns the flags that must not be set for this to match
+ static unsigned DisallowedFlags(unsigned flags) {
+ return (flags & DisallowedFlagMask) >> DisallowedFlagShift;
+ }
+ /// Register a standard pass in the specified set. If flags is non-zero,
+ /// then the pass will only be returned when the specified flags are set.
+ template<typename passName>
+ class RegisterStandardPass {
+ public:
+ RegisterStandardPass(StandardSet set, unsigned char *runBefore=0,
+ unsigned flags=0, unsigned char *ID=0) {
+ // Use the pass's ID if one is not specified
+ RegisterDefaultPass(PassInfo::NormalCtor_t(callDefaultCtor<passName>),
+ ID ? ID : (unsigned char*)&passName::ID, runBefore, set, flags);
+ }
+ };
+ /// Adds the passes from the specified set to the provided pass manager
+ static void AddPassesFromSet(PassManagerBase *PM,
+ StandardSet set,
+ unsigned flags=0,
+ bool VerifyEach=false,
+ Pass *inliner=0);
+ private:
+ /// Registers the default passes. This is set by RegisterStandardPassLists
+ /// and is called lazily.
+ static void (*RegisterDefaultPasses)(void);
+ /// Creates the verifier pass that is inserted when a VerifyEach is passed to
+ /// AddPassesFromSet()
+ static Pass* (*CreateVerifierPass)(void);
+ /// Registers the pass
+ static void RegisterDefaultPass(PassInfo::NormalCtor_t constructor,
+ unsigned char *newPass,
+ unsigned char *oldPass,
+ StandardSet set,
+ unsigned flags=0);
+};
+
+} // namespace llvm
+
+#endif
Added: user/gabor/tre-integration/contrib/llvm/include/llvm/MC/MCWin64EH.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/gabor/tre-integration/contrib/llvm/include/llvm/MC/MCWin64EH.h Thu Jun 23 00:04:06 2011 (r223453)
@@ -0,0 +1,93 @@
+//===- MCWin64EH.h - Machine Code Win64 EH support --------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains declarations to support the Win64 Exception Handling
+// scheme in MC.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_MC_MCWIN64EH_H
+#define LLVM_MC_MCWIN64EH_H
+
+#include "llvm/Support/Win64EH.h"
+#include <cassert>
+#include <vector>
+
+namespace llvm {
+ class StringRef;
+ class MCStreamer;
+ class MCSymbol;
+
+ class MCWin64EHInstruction {
+ public:
+ typedef Win64EH::UnwindOpcodes OpType;
+ private:
+ OpType Operation;
+ MCSymbol *Label;
+ unsigned Offset;
+ unsigned Register;
+ public:
+ MCWin64EHInstruction(OpType Op, MCSymbol *L, unsigned Reg)
+ : Operation(Op), Label(L), Offset(0), Register(Reg) {
+ assert(Op == Win64EH::UOP_PushNonVol);
+ }
+ MCWin64EHInstruction(MCSymbol *L, unsigned Size)
+ : Operation(Size>128 ? Win64EH::UOP_AllocLarge : Win64EH::UOP_AllocSmall),
+ Label(L), Offset(Size) { }
+ MCWin64EHInstruction(OpType Op, MCSymbol *L, unsigned Reg, unsigned Off)
+ : Operation(Op), Label(L), Offset(Off), Register(Reg) {
+ assert(Op == Win64EH::UOP_SetFPReg ||
+ Op == Win64EH::UOP_SaveNonVol ||
+ Op == Win64EH::UOP_SaveNonVolBig ||
+ Op == Win64EH::UOP_SaveXMM128 ||
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-user
mailing list