summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiachen Yang2015-06-13 23:06:23 +0900
committerJiachen Yang2015-06-13 23:06:23 +0900
commitc106a40e0e6f2fcc2abff925d937c3f4084d1c2f (patch)
tree56edb3ad368dc5591ebb1ace2b3d648905c5d621
downloadaur-c106a40e0e6f2fcc2abff925d937c3f4084d1c2f.tar.gz
init llvm-pypy-stm
-rw-r--r--.AURINFO63
-rw-r--r--.SRCINFO72
-rw-r--r--PKGBUILD280
-rw-r--r--addrspacecast-in-constant.diff13
-rw-r--r--llvm-Config-config.h9
-rw-r--r--llvm-Config-llvm-config.h9
-rw-r--r--no-introduce-bogus-cast-in-combine.diff35
-rw-r--r--no-memset-creation-with-addrspace.diff16
8 files changed, 497 insertions, 0 deletions
diff --git a/.AURINFO b/.AURINFO
new file mode 100644
index 00000000000..f48f036d2b5
--- /dev/null
+++ b/.AURINFO
@@ -0,0 +1,63 @@
+pkgbase = llvm-pypy-stm
+ pkgver = 201645
+ pkgrel = 2
+ url = http://llvm.org
+ arch = i686
+ arch = x86_64
+ license = custom:University of Illinois
+ makedepends = subversion
+ makedepends = libffi
+ makedepends = python2
+ makedepends = python-sphinx
+ makedepends = chrpath
+ source = llvm::svn+http://llvm.org/svn/llvm-project/llvm/trunk#revision=201645
+ source = clang::svn+http://llvm.org/svn/llvm-project/cfe/trunk#revision=201645
+ source = clang-tools-extra::svn+http://llvm.org/svn/llvm-project/clang-tools-extra/trunk#revision=201645
+ source = compiler-rt::svn+http://llvm.org/svn/llvm-project/compiler-rt/trunk#revision=201645
+ source = addrspacecast-in-constant.diff
+ source = no-introduce-bogus-cast-in-combine.diff
+ source = no-memset-creation-with-addrspace.diff
+ source = llvm-Config-config.h
+ source = llvm-Config-llvm-config.h
+ options = staticlibs
+ options = !strip
+
+pkgname = llvm-pypy-stm
+ pkgdesc = Low Level Virtual Machine, patched for pypy-stm
+ depends = llvm-libs-pypy-stm
+ depends = perl
+ provides = llvm
+ conflicts = llvm
+
+pkgname = llvm-libs-pypy-stm
+ pkgdesc = Low Level Virtual Machine (runtime library), patched for pypy-stm
+ depends = gcc-libs
+ depends = zlib
+ depends = libffi
+ depends = ncurses
+ provides = llvm-libs
+ conflicts = llvm-libs
+
+pkgname = clang-pypy-stm
+ pkgdesc = C language family frontend for LLVM, patched for pypy-stm
+ url = http://clang.llvm.org/
+ depends = llvm-pypy-stm
+ depends = gcc
+ provides = clang
+ conflicts = clang
+
+pkgname = clang-analyzer-pypy-stm
+ pkgdesc = A source code analysis framework, patched for pypy-stm
+ url = http://clang-analyzer.llvm.org/
+ depends = clang-pypy-stm
+ depends = python2
+ provides = clang-analyzer
+ conflicts = clang-analyzer
+
+pkgname = clang-tools-extra-pypy-stm
+ pkgdesc = Extra tools built using Clang's tooling APIs, patched for pypy-stm
+ url = http://clang.llvm.org/
+ depends = clang-pypy-stm
+ provides = clang-tools-extra
+ conflicts = clang-tools-extra
+
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..1717f28749b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,72 @@
+pkgbase = llvm-pypy-stm
+ pkgver = 201645
+ pkgrel = 2
+ url = http://llvm.org
+ arch = i686
+ arch = x86_64
+ license = custom:University of Illinois
+ makedepends = subversion
+ makedepends = libffi
+ makedepends = python2
+ makedepends = python-sphinx
+ makedepends = chrpath
+ options = staticlibs
+ options = !strip
+ source = llvm::svn+http://llvm.org/svn/llvm-project/llvm/trunk#revision=201645
+ source = clang::svn+http://llvm.org/svn/llvm-project/cfe/trunk#revision=201645
+ source = clang-tools-extra::svn+http://llvm.org/svn/llvm-project/clang-tools-extra/trunk#revision=201645
+ source = compiler-rt::svn+http://llvm.org/svn/llvm-project/compiler-rt/trunk#revision=201645
+ source = addrspacecast-in-constant.diff
+ source = no-introduce-bogus-cast-in-combine.diff
+ source = no-memset-creation-with-addrspace.diff
+ source = llvm-Config-config.h
+ source = llvm-Config-llvm-config.h
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = d5e624c8921802b2096f0b0279fb2ef3973dad0ca009d416ac15c839c8dea91f
+ sha256sums = 3113e118aa01968997639dd747b25ba9b5bcaa38415eae0cb9a8e63c703db44b
+ sha256sums = 16dd8e9cc3794189ebde5ee39a99e1a5014185f3ecb369e3ca1d2d22032a1576
+ sha256sums = 312574e655f9a87784ca416949c505c452b819fad3061f2cde8aced6540a19a3
+ sha256sums = 597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48
+
+pkgname = llvm-pypy-stm
+ pkgdesc = Low Level Virtual Machine, patched for pypy-stm
+ depends = llvm-libs-pypy-stm
+ depends = perl
+ provides = llvm
+ conflicts = llvm
+
+pkgname = llvm-libs-pypy-stm
+ pkgdesc = Low Level Virtual Machine (runtime library), patched for pypy-stm
+ depends = gcc-libs
+ depends = zlib
+ depends = libffi
+ depends = ncurses
+ provides = llvm-libs
+ conflicts = llvm-libs
+
+pkgname = clang-pypy-stm
+ pkgdesc = C language family frontend for LLVM, patched for pypy-stm
+ url = http://clang.llvm.org/
+ depends = llvm-pypy-stm
+ depends = gcc
+ provides = clang
+ conflicts = clang
+
+pkgname = clang-analyzer-pypy-stm
+ pkgdesc = A source code analysis framework, patched for pypy-stm
+ url = http://clang-analyzer.llvm.org/
+ depends = clang-pypy-stm
+ depends = python2
+ provides = clang-analyzer
+ conflicts = clang-analyzer
+
+pkgname = clang-tools-extra-pypy-stm
+ pkgdesc = Extra tools built using Clang's tooling APIs, patched for pypy-stm
+ url = http://clang.llvm.org/
+ depends = clang-pypy-stm
+ provides = clang-tools-extra
+ conflicts = clang-tools-extra
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..c0723f0858b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,280 @@
+# Maintainer: Jiachen Yang <farseerfc@gmail.com>
+# Contributor: Armin K. <krejzi at email dot com>
+# Contributor: Christian Babeux <christian.babeux@0x80.ca>
+# Contributor: Thomas Dziedzic < gostrc at gmail >
+# Contributor: Roberto Alsina <ralsina@kde.org>
+# Contributor: Tomas Lindquist Olsen <tomas@famolsen.dk>
+# Contributor: Anders Bergh <anders@archlinuxppc.org>
+# Contributor: Tomas Wilhelmsson <tomas.wilhelmsson@gmail.com>
+
+pkgbase=llvm-pypy-stm
+pkgname=('llvm-pypy-stm' 'llvm-libs-pypy-stm' 'clang-pypy-stm' 'clang-analyzer-pypy-stm' 'clang-tools-extra-pypy-stm')
+_pkgname='llvm'
+pkgver=201645
+pkgrel=2
+arch=('i686' 'x86_64')
+url="http://llvm.org"
+license=('custom:University of Illinois')
+makedepends=('subversion' 'libffi' 'python2' 'python-sphinx' 'chrpath')
+
+# this is always the latest svn so debug info can be useful
+options=('staticlibs' '!strip')
+
+source=("${_pkgname}::svn+http://llvm.org/svn/llvm-project/llvm/trunk#revision=201645"
+ "clang::svn+http://llvm.org/svn/llvm-project/cfe/trunk#revision=201645"
+ "clang-tools-extra::svn+http://llvm.org/svn/llvm-project/clang-tools-extra/trunk#revision=201645"
+ "compiler-rt::svn+http://llvm.org/svn/llvm-project/compiler-rt/trunk#revision=201645"
+ "addrspacecast-in-constant.diff"
+ "no-introduce-bogus-cast-in-combine.diff"
+ "no-memset-creation-with-addrspace.diff"
+ "llvm-Config-config.h"
+ "llvm-Config-llvm-config.h"
+ )
+sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'd5e624c8921802b2096f0b0279fb2ef3973dad0ca009d416ac15c839c8dea91f'
+ '3113e118aa01968997639dd747b25ba9b5bcaa38415eae0cb9a8e63c703db44b'
+ '16dd8e9cc3794189ebde5ee39a99e1a5014185f3ecb369e3ca1d2d22032a1576'
+ '312574e655f9a87784ca416949c505c452b819fad3061f2cde8aced6540a19a3'
+ '597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48'
+ )
+
+pkgver()
+{
+ cd "${srcdir}/${_pkgname}"
+ svnversion | tr -d [A-z]
+}
+
+prepare() {
+ cd "${srcdir}/${_pkgname}"
+
+ svn export "${srcdir}/clang" tools/clang
+ svn export "${srcdir}/clang-tools-extra" tools/clang/tools/extra
+ svn export "${srcdir}/compiler-rt" projects/compiler-rt
+
+ # Fix docs installation directory
+ sed -e 's:$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm:' \
+ -i Makefile.config.in
+
+ # Fix definition of LLVM_CMAKE_DIR in LLVMConfig.cmake
+ sed -e '/@LLVM_CONFIG_CMAKE_DIR@/s:$(PROJ_cmake):$(PROJ_prefix)/share/llvm/cmake:' \
+ -i cmake/modules/Makefile
+
+ # apply pypy-stm patchs
+ patch -p0 < ../addrspacecast-in-constant.diff
+ patch -p0 < ../no-introduce-bogus-cast-in-combine.diff
+ patch -p0 < ../no-memset-creation-with-addrspace.diff
+
+}
+
+build() {
+ cd "${srcdir}/${_pkgname}"
+
+ # Apply strip option to configure
+ _optimized_switch="enable"
+ [[ $(check_option strip) == n ]] && _optimized_switch="disable"
+
+ # Include location of libffi headers in CPPFLAGS
+ CPPFLAGS+=" $(pkg-config --cflags libffi)"
+
+ # Force the use of GCC instead of clang
+ CC=gcc CXX=g++ \
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --enable-shared \
+ --enable-libffi \
+ --enable-targets=all \
+ --disable-expensive-checks \
+ --disable-debug-runtime \
+ --disable-assertions \
+ --with-binutils-include=/usr/include \
+ --with-python=/usr/bin/python2 \
+ --$_optimized_switch-optimized
+
+ make REQUIRES_RTTI=1
+ make -C docs -f Makefile.sphinx man
+ make -C docs -f Makefile.sphinx html
+ make -C tools/clang/docs -f Makefile.sphinx html
+}
+
+package_llvm-pypy-stm() {
+ pkgdesc="Low Level Virtual Machine, patched for pypy-stm"
+ depends=("llvm-libs-pypy-stm" 'perl')
+ provides=('llvm')
+ conflicts=('llvm')
+
+ cd "${srcdir}/${_pkgname}"
+
+ # We move the clang directory out of the tree so it won't get installed and
+ # then we bring it back in for the clang package
+ mv tools/clang "${srcdir}/clang.src"
+
+ # -j1 is due to race conditions during the installation of the OCaml bindings
+ make -j1 DESTDIR="${pkgdir}" install
+ mv "${srcdir}/clang.src" tools/clang
+
+ # The runtime library goes into llvm-libs
+ rm -rf "${srcdir}"/*.so
+ mv "${pkgdir}"/usr/lib/libLLVM-*.so "${srcdir}/"
+
+ # Fix permissions of static libs
+ chmod -x "${pkgdir}"/usr/lib/*.a
+
+ # Get rid of example Hello transformation
+ rm -rf "${pkgdir}"/usr/lib/*LLVMHello.*
+
+ # Symlink LLVMgold.so into /usr/lib/bfd-plugins
+ # https://bugs.archlinux.org/task/28479
+ install -m755 -d "${pkgdir}/usr/lib/bfd-plugins"
+ ln -s ../LLVMgold.so "${pkgdir}/usr/lib/bfd-plugins/LLVMgold.so"
+
+ if [[ $CARCH == x86_64 ]]; then
+ # Needed for multilib (https://bugs.archlinux.org/task/29951)
+ # Header stubs are taken from Fedora
+ for _header in config llvm-config; do
+ mv "${pkgdir}/usr/include/llvm/Config/${_header}"{,-64}.h
+ cp "${srcdir}/llvm-Config-${_header}.h" \
+ "${pkgdir}/usr/include/llvm/Config/${_header}.h"
+ done
+ fi
+
+ # Install man pages
+ install -d "${pkgdir}/usr/share/man/man1"
+ cp docs/_build/man/*.1 "${pkgdir}/usr/share/man/man1/"
+
+ # Install html docs
+ cp -r docs/_build/html/* "${pkgdir}/usr/share/doc/$_pkgname/html/"
+ rm -r "${pkgdir}/usr/share/doc/${_pkgname}/html/_sources"
+
+ install -Dm644 LICENSE.TXT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+package_llvm-libs-pypy-stm() {
+ pkgdesc="Low Level Virtual Machine (runtime library), patched for pypy-stm"
+ depends=('gcc-libs' 'zlib' 'libffi' 'ncurses')
+ provides=('llvm-libs')
+ conflicts=('llvm-libs')
+
+ install -m755 -d "${pkgdir}"/usr/lib/
+
+ mv "${srcdir}"/libLLVM-*.so "${pkgdir}/usr/lib/"
+
+ for _shlib in "${pkgdir}"/usr/lib/*.so
+ do
+ test -L "${_shlib}" && ln -sf $(basename $(readlink ${_shlib})) ${_shlib}
+ done
+
+ install -Dm644 "${srcdir}/${_pkgname}/LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+package_clang-pypy-stm() {
+ pkgdesc="C language family frontend for LLVM, patched for pypy-stm"
+ url="http://clang.llvm.org/"
+ depends=("llvm-pypy-stm" 'gcc')
+ provides=('clang')
+ conflicts=('clang')
+
+ sed -e 's:$(PROJ_prefix)/share/doc/llvm:$(PROJ_prefix)/share/doc/clang:' \
+ -i "${srcdir}/${_pkgname}/Makefile.config"
+
+ cd "${srcdir}/${_pkgname}/tools/clang"
+
+ # We move the extra tools directory out of the tree so it won't get
+ # installed and then we bring it back in for the clang-tools-extra package
+ mv tools/extra "${srcdir}/"
+
+ make DESTDIR="${pkgdir}" install
+ mv "${srcdir}/extra" tools/
+
+ # Fix permissions of static libs
+ chmod -x "${pkgdir}"/usr/lib/*.a
+
+ # Revert the path change in case we want to do a repackage later
+ sed -e 's:$(PROJ_prefix)/share/doc/clang:$(PROJ_prefix)/share/doc/llvm:' \
+ -i "${srcdir}/${_pkgname}/Makefile.config"
+
+ # Install html docs
+ cp -r docs/_build/html/* "${pkgdir}/usr/share/doc/clang/html/"
+ rm -r "${pkgdir}/usr/share/doc/clang/html/_sources"
+
+ # Install Python bindings
+ install -m755 -d "${pkgdir}/usr/lib/python2.7/site-packages"
+ cp -r bindings/python/clang "${pkgdir}/usr/lib/python2.7/site-packages/"
+ python2 -m compileall "${pkgdir}/usr/lib/python2.7/site-packages/clang"
+ python2 -O -m compileall "${pkgdir}/usr/lib/python2.7/site-packages/clang"
+
+ # Install clang-format editor integration files (FS#38485)
+ # Destination paths are copied from clang-format/CMakeLists.txt
+ install -m755 -d "$pkgdir/usr/share/clang"
+ (
+ cd tools/clang-format
+ cp clang-format-diff.py \
+ clang-format-sublime.py \
+ clang-format.el \
+ clang-format.py \
+ "${pkgdir}/usr/share/clang/"
+
+ cp git-clang-format "${pkgdir}/usr/bin/"
+ sed -e 's|/usr/bin/python$|&2|' \
+ -i "${pkgdir}/usr/bin/git-clang-format" \
+ -i "${pkgdir}/usr/share/clang/clang-format-diff.py"
+ )
+
+ install -Dm644 LICENSE.TXT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+package_clang-analyzer-pypy-stm() {
+ pkgdesc="A source code analysis framework, patched for pypy-stm"
+ url="http://clang-analyzer.llvm.org/"
+ depends=("clang-pypy-stm" 'python2')
+ provides=('clang-analyzer')
+ conflicts=('clang-analyzer')
+
+ cd "${srcdir}/${_pkgname}/tools/clang"
+
+ install -m755 -d "${pkgdir}"/usr/{bin,lib/clang-analyzer}
+ for _tool in scan-{build,view}; do
+ cp -r tools/${_tool} "${pkgdir}/usr/lib/clang-analyzer/"
+ ln -s /usr/lib/clang-analyzer/${_tool}/${_tool} "${pkgdir}/usr/bin/"
+ done
+
+ # scan-build looks for clang within the same directory
+ ln -s /usr/bin/clang "${pkgdir}/usr/lib/clang-analyzer/scan-build/"
+
+ # Relocate man page
+ install -m755 -d "${pkgdir}/usr/share/man/man1"
+ mv "${pkgdir}/usr/lib/clang-analyzer/scan-build/scan-build.1" \
+ "${pkgdir}/usr/share/man/man1/"
+
+ # Use Python 2
+ sed -e 's|env python$|&2|' \
+ -e 's|/usr/bin/python$|&2|' \
+ -i "${pkgdir}/usr/lib/clang-analyzer/scan-view/scan-view" \
+ "${pkgdir}/usr/lib/clang-analyzer/scan-build/set-xcode-analyzer"
+
+ # Compile Python scripts
+ python2 -m compileall "${pkgdir}/usr/lib/clang-analyzer"
+ python2 -O -m compileall "${pkgdir}/usr/lib/clang-analyzer"
+
+ install -Dm644 LICENSE.TXT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+package_clang-tools-extra-pypy-stm() {
+ pkgdesc="Extra tools built using Clang's tooling APIs, patched for pypy-stm"
+ url="http://clang.llvm.org/"
+ depends=("clang-pypy-stm")
+ provides=('clang-tools-extra')
+ conflicts=('clang-tools-extra')
+
+ cd "${srcdir}/${_pkgname}/tools/clang/tools/extra"
+
+ make DESTDIR="${pkgdir}" install
+
+ # Fix permissions of static libs
+ chmod -x "${pkgdir}"/usr/lib/*.a
+
+ install -Dm644 LICENSE.TXT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/addrspacecast-in-constant.diff b/addrspacecast-in-constant.diff
new file mode 100644
index 00000000000..1a39e01fab9
--- /dev/null
+++ b/addrspacecast-in-constant.diff
@@ -0,0 +1,13 @@
+Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+===================================================================
+--- lib/CodeGen/AsmPrinter/AsmPrinter.cpp (revision 201645)
++++ lib/CodeGen/AsmPrinter/AsmPrinter.cpp (working copy)
+@@ -1617,6 +1617,8 @@
+ Ctx);
+ }
+
++ case Instruction::AddrSpaceCast:
++ // XXX??? I *think* it is correct at least in PyPy's case
+ case Instruction::Trunc:
+ // We emit the value and depend on the assembler to truncate the generated
+ // expression properly. This is important for differences between
diff --git a/llvm-Config-config.h b/llvm-Config-config.h
new file mode 100644
index 00000000000..c369b4551f7
--- /dev/null
+++ b/llvm-Config-config.h
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+#include "config-32.h"
+#elif __WORDSIZE == 64
+#include "config-64.h"
+#else
+#error "Unknown word size"
+#endif
diff --git a/llvm-Config-llvm-config.h b/llvm-Config-llvm-config.h
new file mode 100644
index 00000000000..2fa08c9be69
--- /dev/null
+++ b/llvm-Config-llvm-config.h
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+#include "llvm-config-32.h"
+#elif __WORDSIZE == 64
+#include "llvm-config-64.h"
+#else
+#error "Unknown word size"
+#endif
diff --git a/no-introduce-bogus-cast-in-combine.diff b/no-introduce-bogus-cast-in-combine.diff
new file mode 100644
index 00000000000..832ab0de7b9
--- /dev/null
+++ b/no-introduce-bogus-cast-in-combine.diff
@@ -0,0 +1,35 @@
+Index: lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+===================================================================
+--- lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp (revision 201645)
++++ lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp (working copy)
+@@ -299,6 +299,17 @@
+
+ Type *SrcPTy = SrcTy->getElementType();
+
++ // XXX note that we might end up with a bogus cast: if the original
++ // cast in 'load (cast P)' is between "foo addrspace1 **" and "foo
++ // addrspace2 **", then we cannot re-express the two operations as
++ // 'cast (load P)' because that would be casting a "foo addrspace1 *"
++ // to "foo addrspace2 *". While nothing is really wrong about that
++ // cast, llvm forbids it even in internally-generated operations.
++ if (SrcPTy->isPointerTy() && DestPTy->isPointerTy() &&
++ cast<PointerType>(DestPTy)->getAddressSpace() !=
++ cast<PointerType>(SrcPTy)->getAddressSpace())
++ return 0;
++
+ if (DestPTy->isIntegerTy() || DestPTy->isPointerTy() ||
+ DestPTy->isVectorTy()) {
+ // If the source is an array, the code below will not succeed. Check to
+@@ -510,6 +521,12 @@
+ IC.getDataLayout()->getTypeSizeInBits(DestPTy))
+ return 0;
+
++ // XXX this is similar to the issue in InstCombineLoadCast
++ if (SrcPTy->isPointerTy() && DestPTy->isPointerTy() &&
++ cast<PointerType>(DestPTy)->getAddressSpace() !=
++ cast<PointerType>(SrcPTy)->getAddressSpace())
++ return 0;
++
+ // Okay, we are casting from one integer or pointer type to another of
+ // the same size. Instead of casting the pointer before
+ // the store, cast the value to be stored.
diff --git a/no-memset-creation-with-addrspace.diff b/no-memset-creation-with-addrspace.diff
new file mode 100644
index 00000000000..c7442785f4e
--- /dev/null
+++ b/no-memset-creation-with-addrspace.diff
@@ -0,0 +1,16 @@
+Index: lib/Transforms/Scalar/MemCpyOptimizer.cpp
+===================================================================
+--- lib/Transforms/Scalar/MemCpyOptimizer.cpp (revision 201645)
++++ lib/Transforms/Scalar/MemCpyOptimizer.cpp (working copy)
+@@ -368,6 +368,11 @@
+ Value *StartPtr, Value *ByteVal) {
+ if (TD == 0) return 0;
+
++ // We have to check for address space < 256, since llvm.memset only supports
++ // user defined address spaces.
++ if (cast<PointerType>(StartPtr->getType())->getAddressSpace() >= 256)
++ return 0;
++
+ // Okay, so we now have a single store that can be splatable. Scan to find
+ // all subsequent stores of the same value to offset from the same pointer.
+ // Join these together into ranges, so we can decide whether contiguous blocks