svn commit: r283769 - in projects/clang-trunk/contrib/llvm: lib/Transforms/IPO patches
Dimitry Andric
dim at FreeBSD.org
Sat May 30 15:36:26 UTC 2015
Author: dim
Date: Sat May 30 15:36:23 2015
New Revision: 283769
URL: https://svnweb.freebsd.org/changeset/base/283769
Log:
Drop llvm/clang patches which are no longer necessary.
Added:
projects/clang-trunk/contrib/llvm/patches/patch-01-clang-vendor-suffix.diff
- copied unchanged from r283744, projects/clang-trunk/contrib/llvm/patches/patch-02-clang-vendor-suffix.diff
projects/clang-trunk/contrib/llvm/patches/patch-02-add-CC-aliases.diff
- copied unchanged from r283744, projects/clang-trunk/contrib/llvm/patches/patch-03-add-CC-aliases.diff
projects/clang-trunk/contrib/llvm/patches/patch-03-enable-armv6-clrex.diff
- copied unchanged from r283744, projects/clang-trunk/contrib/llvm/patches/patch-05-enable-armv6-clrex.diff
projects/clang-trunk/contrib/llvm/patches/patch-04-clang-add-mips-triples.diff
- copied unchanged from r283744, projects/clang-trunk/contrib/llvm/patches/patch-06-clang-add-mips-triples.diff
Deleted:
projects/clang-trunk/contrib/llvm/patches/patch-01-freebsd-kprintf.diff
projects/clang-trunk/contrib/llvm/patches/patch-02-clang-vendor-suffix.diff
projects/clang-trunk/contrib/llvm/patches/patch-03-add-CC-aliases.diff
projects/clang-trunk/contrib/llvm/patches/patch-04-add-llvm-gvn-option.diff
projects/clang-trunk/contrib/llvm/patches/patch-05-enable-armv6-clrex.diff
projects/clang-trunk/contrib/llvm/patches/patch-06-clang-add-mips-triples.diff
projects/clang-trunk/contrib/llvm/patches/patch-07-llvm-r227752-boot2-shrink.diff
projects/clang-trunk/contrib/llvm/patches/patch-08-llvm-r230348-arm-fix-bad-ha.diff
projects/clang-trunk/contrib/llvm/patches/patch-09-clang-r227115-constantarraytype.diff
Modified:
projects/clang-trunk/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
projects/clang-trunk/contrib/llvm/patches/README.TXT
Modified: projects/clang-trunk/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
==============================================================================
--- projects/clang-trunk/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp Sat May 30 15:13:18 2015 (r283768)
+++ projects/clang-trunk/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp Sat May 30 15:36:23 2015 (r283769)
@@ -89,10 +89,6 @@ static cl::opt<bool> EnableLoopDistribut
"enable-loop-distribute", cl::init(false), cl::Hidden,
cl::desc("Enable the new, experimental LoopDistribution Pass"));
-static cl::opt<bool> EnableGVN("enable-gvn",
- cl::init(true), cl::Hidden,
- cl::desc("Run the global value numbering pass"));
-
PassManagerBuilder::PassManagerBuilder() {
OptLevel = 2;
SizeLevel = 0;
@@ -265,8 +261,7 @@ void PassManagerBuilder::populateModuleP
if (OptLevel > 1) {
if (EnableMLSM)
MPM.add(createMergedLoadStoreMotionPass()); // Merge ld/st in diamonds
- if (EnableGVN)
- MPM.add(createGVNPass(DisableGVNLoadPRE)); // Remove redundancies
+ MPM.add(createGVNPass(DisableGVNLoadPRE)); // Remove redundancies
}
MPM.add(createMemCpyOptPass()); // Remove memcpy / form memset
MPM.add(createSCCPPass()); // Constant prop with SCCP
Modified: projects/clang-trunk/contrib/llvm/patches/README.TXT
==============================================================================
--- projects/clang-trunk/contrib/llvm/patches/README.TXT Sat May 30 15:13:18 2015 (r283768)
+++ projects/clang-trunk/contrib/llvm/patches/README.TXT Sat May 30 15:36:23 2015 (r283769)
@@ -1,11 +1,11 @@
This is a set of individual patches, which contain all the customizations to
llvm/clang currently in the FreeBSD base system. These can be applied in
-alphabetical order to a pristine llvm/clang 3.6.1 source tree, for example by
+alphabetical order to a pristine llvm/clang 3.7.0 source tree, for example by
doing:
-svn co https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_361/final llvm-3.6.1
-svn co https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_361/final llvm-3.6.1/tools/clang
-cd llvm-3.6.1
+svn co https://llvm.org/svn/llvm-project/llvm/trunk llvm-3.7.0
+svn co https://llvm.org/svn/llvm-project/cfe/trunk llvm-3.7.0/tools/clang
+cd llvm-3.7.0
for p in /usr/src/contrib/llvm/patches/patch-*.diff; do
patch -p0 -f -F0 -E -i $p -s || break
done
Copied: projects/clang-trunk/contrib/llvm/patches/patch-01-clang-vendor-suffix.diff (from r283744, projects/clang-trunk/contrib/llvm/patches/patch-02-clang-vendor-suffix.diff)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang-trunk/contrib/llvm/patches/patch-01-clang-vendor-suffix.diff Sat May 30 15:36:23 2015 (r283769, copy of r283744, projects/clang-trunk/contrib/llvm/patches/patch-02-clang-vendor-suffix.diff)
@@ -0,0 +1,22 @@
+This patch adds a FreeBSD-specific suffix to clang's version string. This is
+usually of the form "(yyyyddmm)", representing the date when the compiler was
+last updated.
+
+Introduced here: http://svnweb.freebsd.org/changeset/base/209107
+
+Index: tools/clang/lib/Basic/Version.cpp
+===================================================================
+--- tools/clang/lib/Basic/Version.cpp
++++ tools/clang/lib/Basic/Version.cpp
+@@ -128,8 +128,10 @@ std::string getClangToolFullVersion(StringRef Tool
+ OS << ToolName << " version " CLANG_VERSION_STRING " "
+ << getClangFullRepositoryVersion();
+
++#ifdef CLANG_VENDOR_SUFFIX
++ OS << CLANG_VENDOR_SUFFIX;
++#elif defined(CLANG_VENDOR)
+ // If vendor supplied, include the base LLVM version as well.
+-#ifdef CLANG_VENDOR
+ OS << " (based on " << BACKEND_PACKAGE_STRING << ")";
+ #endif
+
Copied: projects/clang-trunk/contrib/llvm/patches/patch-02-add-CC-aliases.diff (from r283744, projects/clang-trunk/contrib/llvm/patches/patch-03-add-CC-aliases.diff)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang-trunk/contrib/llvm/patches/patch-02-add-CC-aliases.diff Sat May 30 15:36:23 2015 (r283769, copy of r283744, projects/clang-trunk/contrib/llvm/patches/patch-03-add-CC-aliases.diff)
@@ -0,0 +1,23 @@
+This patch adds "CC" and "clang-CC" to the list of program name aliases which
+invoke the C++ compiler.
+
+Introduced here: http://svnweb.freebsd.org/changeset/base/257109
+
+Index: tools/clang/tools/driver/driver.cpp
+===================================================================
+--- tools/clang/tools/driver/driver.cpp
++++ tools/clang/tools/driver/driver.cpp
+@@ -213,11 +213,13 @@ static const DriverSuffix *FindDriverSuffix(String
+ {"clang", nullptr},
+ {"clang++", "--driver-mode=g++"},
+ {"clang-c++", "--driver-mode=g++"},
++ {"clang-CC", "--driver-mode=g++"},
+ {"clang-cc", nullptr},
+ {"clang-cpp", "--driver-mode=cpp"},
+ {"clang-g++", "--driver-mode=g++"},
+ {"clang-gcc", nullptr},
+ {"clang-cl", "--driver-mode=cl"},
++ {"CC", "--driver-mode=g++"},
+ {"cc", nullptr},
+ {"cpp", "--driver-mode=cpp"},
+ {"cl", "--driver-mode=cl"},
Copied: projects/clang-trunk/contrib/llvm/patches/patch-03-enable-armv6-clrex.diff (from r283744, projects/clang-trunk/contrib/llvm/patches/patch-05-enable-armv6-clrex.diff)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang-trunk/contrib/llvm/patches/patch-03-enable-armv6-clrex.diff Sat May 30 15:36:23 2015 (r283769, copy of r283744, projects/clang-trunk/contrib/llvm/patches/patch-05-enable-armv6-clrex.diff)
@@ -0,0 +1,20 @@
+For now, enable the clrex instruction for armv6, until upstream
+implements this properly.
+
+Submitted by: rdivacky
+
+Introduced here: http://svnweb.freebsd.org/changeset/base/275362
+
+Index: lib/Target/ARM/ARMInstrInfo.td
+===================================================================
+--- lib/Target/ARM/ARMInstrInfo.td
++++ lib/Target/ARM/ARMInstrInfo.td
+@@ -4640,7 +4640,7 @@ def STLEXD : AIstlex<0b01, (outs GPR:$Rd),
+
+ def CLREX : AXI<(outs), (ins), MiscFrm, NoItinerary, "clrex",
+ [(int_arm_clrex)]>,
+- Requires<[IsARM, HasV7]> {
++ Requires<[IsARM, HasV6]> {
+ let Inst{31-0} = 0b11110101011111111111000000011111;
+ }
+
Copied: projects/clang-trunk/contrib/llvm/patches/patch-04-clang-add-mips-triples.diff (from r283744, projects/clang-trunk/contrib/llvm/patches/patch-06-clang-add-mips-triples.diff)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang-trunk/contrib/llvm/patches/patch-04-clang-add-mips-triples.diff Sat May 30 15:36:23 2015 (r283769, copy of r283744, projects/clang-trunk/contrib/llvm/patches/patch-06-clang-add-mips-triples.diff)
@@ -0,0 +1,33 @@
+Allow clang to be built for mips/mips64 backend types by adding our mips
+triple ids
+
+This only allows testing and does not change the defaults for mips/mips64.
+They still build/use gcc by default.
+
+Differential Revision: https://reviews.freebsd.org/D1190
+Reviewed by: dim
+
+Introduced here: http://svnweb.freebsd.org/changeset/base/277423
+
+Index: tools/clang/lib/Driver/Tools.cpp
+===================================================================
+--- tools/clang/lib/Driver/Tools.cpp
++++ tools/clang/lib/Driver/Tools.cpp
+@@ -6652,6 +6652,17 @@ void freebsd::Link::ConstructJob(Compilation &C, c
+ CmdArgs.push_back("elf32ppc_fbsd");
+ }
+
++ if (Arg *A = Args.getLastArg(options::OPT_G)) {
++ if (ToolChain.getArch() == llvm::Triple::mips ||
++ ToolChain.getArch() == llvm::Triple::mipsel ||
++ ToolChain.getArch() == llvm::Triple::mips64 ||
++ ToolChain.getArch() == llvm::Triple::mips64el) {
++ StringRef v = A->getValue();
++ CmdArgs.push_back(Args.MakeArgString("-G" + v));
++ A->claim();
++ }
++ }
++
+ if (Output.isFilename()) {
+ CmdArgs.push_back("-o");
+ CmdArgs.push_back(Output.getFilename());
More information about the svn-src-projects
mailing list