From sabre at nondot.org Mon Dec 19 00:49:29 2011
From: sabre at nondot.org (Chris Lattner)
Date: Sun, 18 Dec 2011 22:49:29 -0800
Subject: [llvm-commits] [llvm] r146728 - in /llvm/trunk:
lib/Linker/LinkModules.cpp test/Linker/link-type-names.ll
In-Reply-To: <50C67D83-DA3B-4DD7-9B42-2CAB010FB1EB@apple.com>
References: <20111216083607.E1BA52A6C12D@llvm.org>
<50C67D83-DA3B-4DD7-9B42-2CAB010FB1EB@apple.com>
Message-ID:
Thanks for reverting it, I'll take a look.
-Chris
On Dec 17, 2011, at 2:25 PM, Chad Rosier wrote:
> This has been reverted in r146838. It was also causing a few of our internal nightly testers to fail.
>
> Chad
>
>
> On Dec 16, 2011, at 4:53 PM, Eli Friedman wrote:
>
>> On Fri, Dec 16, 2011 at 12:36 AM, Chris Lattner wrote:
>>> Author: lattner
>>> Date: Fri Dec 16 02:36:07 2011
>>> New Revision: 146728
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=146728&view=rev
>>> Log:
>>> By popular demand, link up types by name if they are isomorphic and one is an
>>> autorenamed version of the other. This makes the IR easier to read, because
>>> we don't end up with random renamed versions of the types after LTO'ing a large app.
>>
>> This change appears to be causing failues:
>> http://lab.llvm.org:8011/builders/clang-x86_64-debian-fnt/builds/2527
>> .
>>
>> -Eli
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From sabre at nondot.org Mon Dec 19 01:08:22 2011
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 19 Dec 2011 07:08:22 -0000
Subject: [llvm-commits] [www] r146858 - /www/trunk/index.html
Message-ID: <20111219070822.439182A6C12C@llvm.org>
Author: lattner
Date: Mon Dec 19 01:08:21 2011
New Revision: 146858
URL: http://llvm.org/viewvc/llvm-project?rev=146858&view=rev
Log:
fix a wordo, PR11603
Modified:
www/trunk/index.html
Modified: www/trunk/index.html
URL: http://llvm.org/viewvc/llvm-project/www/trunk/index.html?rev=146858&r1=146857&r2=146858&view=diff
==============================================================================
--- www/trunk/index.html (original)
+++ www/trunk/index.html Mon Dec 19 01:08:21 2011
@@ -49,7 +49,7 @@
href="http://clang.llvm.org/diagnostics.html">error and warning messages
and to provide a platform for building great source level tools. The
Clang Static Analyzer is a
- tool automatically finds bugs in your code, and is a great example of the
+ tool that automatically finds bugs in your code, and is a great example of the
sort of tool that can be built using the Clang frontend as a library to
parse C/C++ code.
From eugeni.stepanov at gmail.com Mon Dec 19 02:15:27 2011
From: eugeni.stepanov at gmail.com (Evgeniy Stepanov)
Date: Mon, 19 Dec 2011 12:15:27 +0400
Subject: [llvm-commits] Update the comment for StructorOutputOrder
In-Reply-To: <4EDF688A.8040703@free.fr>
References:
<4EDF5ED1.6070702@free.fr>
<4EDF688A.8040703@free.fr>
Message-ID:
AFAIK, this is not commited yet.
On Wed, Dec 7, 2011 at 5:22 PM, Duncan Sands wrote:
> Hi Evgeniy,
>
>>>> This patch removes the mention of "default" value for
>>>> StructorOutputOrder, as it depends on the target ABI, and there is no
>>>> global default.
>>>
>>>
>>> the field is initialized to that value. ?That is the meaning of default
>>> in
>>> this context. ?So can you please either remove the initial value for the
>>> field, or revert this patch.
>>
>>
>> It's not, as far as I can see. Since r145781 is it initialized to
>> different values depending on the target arch.
>
>
> I see - it seems I'm out of date! ?In that case please get rid of the
> references to the default.
>
> Ciao, Duncan.
From asl at math.spbu.ru Mon Dec 19 02:54:37 2011
From: asl at math.spbu.ru (Anton Korobeynikov)
Date: Mon, 19 Dec 2011 11:54:37 +0300
Subject: [llvm-commits] Update the comment for StructorOutputOrder
In-Reply-To:
References:
<4EDF5ED1.6070702@free.fr>
<4EDF688A.8040703@free.fr>
Message-ID:
Evgeniy,
> AFAIK, this is not commited yet.
Don't worry about this patch, since the StructorPriority concept is
completely bogus. It's a property of the ctors / dtors section in
which order the stuff should be emitted there, not something "global".
I have a patch which already fixes this (and also has a nice effect of
making ctors priorities global, as they should). Recently I finished
the testing on ELF. As soon as it will pass on Windows & Darwin I will
commit it.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
From klimek at google.com Mon Dec 19 03:32:05 2011
From: klimek at google.com (Manuel Klimek)
Date: Mon, 19 Dec 2011 09:32:05 -0000
Subject: [llvm-commits] [llvm] r146863 -
/llvm/trunk/utils/json-bench/JSONBench.cpp
Message-ID: <20111219093205.4DBC92A6C12C@llvm.org>
Author: klimek
Date: Mon Dec 19 03:32:05 2011
New Revision: 146863
URL: http://llvm.org/viewvc/llvm-project?rev=146863&view=rev
Log:
Adds a flag to allow specifying the memory limitations of the JSON benchmark.
Modified:
llvm/trunk/utils/json-bench/JSONBench.cpp
Modified: llvm/trunk/utils/json-bench/JSONBench.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/json-bench/JSONBench.cpp?rev=146863&r1=146862&r2=146863&view=diff
==============================================================================
--- llvm/trunk/utils/json-bench/JSONBench.cpp (original)
+++ llvm/trunk/utils/json-bench/JSONBench.cpp Mon Dec 19 03:32:05 2011
@@ -23,6 +23,11 @@
"Run a quick verification useful for regression testing"),
llvm::cl::init(false));
+static llvm::cl::opt
+MemoryLimitMB("memory-limit", llvm::cl::desc(
+ "Do not use more megabytes of memory"),
+ llvm::cl::init(1000));
+
void benchmark(llvm::TimerGroup &Group, llvm::StringRef Name,
llvm::StringRef JSONText) {
llvm::Timer BaseLine((Name + ": Loop").str(), Group);
@@ -44,17 +49,19 @@
Parsing.stopTimer();
}
-std::string createJSONText(int N, int ValueSize) {
+std::string createJSONText(unsigned MemoryMB, unsigned ValueSize) {
std::string JSONText;
llvm::raw_string_ostream Stream(JSONText);
Stream << "[\n";
- for (int I = 0; I < N; ++I) {
+ unsigned MemoryBytes = MemoryMB * 1024 * 1024;
+ while (JSONText.size() < MemoryBytes) {
Stream << " {\n"
<< " \"key1\": \"" << std::string(ValueSize, '*') << "\",\n"
<< " \"key2\": \"" << std::string(ValueSize, '*') << "\",\n"
<< " \"key3\": \"" << std::string(ValueSize, '*') << "\"\n"
<< " }";
- if (I + 1 < N) Stream << ",";
+ Stream.flush();
+ if (JSONText.size() < MemoryBytes) Stream << ",";
Stream << "\n";
}
Stream << "]\n";
@@ -66,11 +73,11 @@
llvm::cl::ParseCommandLineOptions(argc, argv);
llvm::TimerGroup Group("JSON parser benchmark");
if (Verify) {
- benchmark(Group, "Fast", createJSONText(1000, 500));
+ benchmark(Group, "Fast", createJSONText(10, 500));
} else {
- benchmark(Group, "Small Values", createJSONText(1000000, 5));
- benchmark(Group, "Medium Values", createJSONText(1000000, 500));
- benchmark(Group, "Large Values", createJSONText(10000, 50000));
+ benchmark(Group, "Small Values", createJSONText(MemoryLimitMB, 5));
+ benchmark(Group, "Medium Values", createJSONText(MemoryLimitMB, 500));
+ benchmark(Group, "Large Values", createJSONText(MemoryLimitMB, 50000));
}
return 0;
}
From chandlerc at google.com Mon Dec 19 03:49:14 2011
From: chandlerc at google.com (Chandler Carruth)
Date: Mon, 19 Dec 2011 01:49:14 -0800
Subject: [llvm-commits] [llvm] r146863 -
/llvm/trunk/utils/json-bench/JSONBench.cpp
In-Reply-To: <20111219093205.4DBC92A6C12C@llvm.org>
References: <20111219093205.4DBC92A6C12C@llvm.org>
Message-ID:
On Mon, Dec 19, 2011 at 1:32 AM, Manuel Klimek wrote:
> + unsigned MemoryBytes = MemoryMB * 1024 * 1024;
It would seem prudent for this to be size_t or intptr_t or something
assured to be large enough... I can imagine wanting values over 4gb on
64bit systems.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111219/324f544a/attachment.html
From klimek at google.com Mon Dec 19 03:56:35 2011
From: klimek at google.com (Manuel Klimek)
Date: Mon, 19 Dec 2011 09:56:35 -0000
Subject: [llvm-commits] [llvm] r146864 -
/llvm/trunk/utils/json-bench/JSONBench.cpp
Message-ID: <20111219095635.559AE2A6C12C@llvm.org>
Author: klimek
Date: Mon Dec 19 03:56:35 2011
New Revision: 146864
URL: http://llvm.org/viewvc/llvm-project?rev=146864&view=rev
Log:
Allow for benchmarking more than 4GB of memory
Modified:
llvm/trunk/utils/json-bench/JSONBench.cpp
Modified: llvm/trunk/utils/json-bench/JSONBench.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/json-bench/JSONBench.cpp?rev=146864&r1=146863&r2=146864&view=diff
==============================================================================
--- llvm/trunk/utils/json-bench/JSONBench.cpp (original)
+++ llvm/trunk/utils/json-bench/JSONBench.cpp Mon Dec 19 03:56:35 2011
@@ -23,7 +23,7 @@
"Run a quick verification useful for regression testing"),
llvm::cl::init(false));
-static llvm::cl::opt
+static llvm::cl::opt
MemoryLimitMB("memory-limit", llvm::cl::desc(
"Do not use more megabytes of memory"),
llvm::cl::init(1000));
@@ -49,11 +49,11 @@
Parsing.stopTimer();
}
-std::string createJSONText(unsigned MemoryMB, unsigned ValueSize) {
+std::string createJSONText(size_t MemoryMB, unsigned ValueSize) {
std::string JSONText;
llvm::raw_string_ostream Stream(JSONText);
Stream << "[\n";
- unsigned MemoryBytes = MemoryMB * 1024 * 1024;
+ size_t MemoryBytes = MemoryMB * 1024 * 1024;
while (JSONText.size() < MemoryBytes) {
Stream << " {\n"
<< " \"key1\": \"" << std::string(ValueSize, '*') << "\",\n"
From klimek at google.com Mon Dec 19 04:00:45 2011
From: klimek at google.com (Manuel Klimek)
Date: Mon, 19 Dec 2011 11:00:45 +0100
Subject: [llvm-commits] [llvm] r146863 -
/llvm/trunk/utils/json-bench/JSONBench.cpp
In-Reply-To:
References: <20111219093205.4DBC92A6C12C@llvm.org>
Message-ID:
On Mon, Dec 19, 2011 at 10:49 AM, Chandler Carruth wrote:
> On Mon, Dec 19, 2011 at 1:32 AM, Manuel Klimek wrote:
>>
>> + ?unsigned MemoryBytes = MemoryMB * 1024 * 1024;
>
>
> It would seem prudent for this to be size_t or intptr_t or something assured
> to be large enough... I can imagine wanting values over 4gb on 64bit
> systems.
Done.
From stoklund at 2pi.dk Mon Dec 19 10:53:28 2011
From: stoklund at 2pi.dk (Jakob Stoklund Olesen)
Date: Mon, 19 Dec 2011 16:53:28 -0000
Subject: [llvm-commits] [llvm] r146872 - in /llvm/trunk/utils/TableGen:
CodeGenRegisters.cpp CodeGenRegisters.h
Message-ID: <20111219165328.825C41BE003@llvm.org>
Author: stoklund
Date: Mon Dec 19 10:53:28 2011
New Revision: 146872
URL: http://llvm.org/viewvc/llvm-project?rev=146872&view=rev
Log:
Synthesize register classes for TRI::getMatchingSuperRegClass().
Teach TableGen to create the missing register classes needed for
getMatchingSuperRegClass() to return maximal results. The function is
still not auto-generated, so it still returns inexact results.
This produces these new register classes:
ARM:
QQPR_with_dsub_0_in_DPR_8
QQQQPR_with_dsub_0_in_DPR_8
X86:
GR64_with_sub_32bit_in_GR32_NOAX
GR64_with_sub_32bit_in_GR32_NOAX_and_GR32_NOSP
GR64_with_sub_16bit_in_GR16_NOREX
GR64_with_sub_32bit_in_GR32_NOAX_and_GR32_NOREX
GR64_TC_and_GR64_with_sub_32bit_in_GR32_NOAX
GR64_with_sub_32bit_in_GR32_NOAX_and_GR32_NOREX_NOSP
GR64_TCW64_and_GR64_with_sub_32bit_in_GR32_NOAX
GR64_TC_and_GR64_with_sub_32bit_in_GR32_NOAX_and_GR32_NOREX
GR64_with_sub_32bit_in_GR32_TC
GR64_with_sub_32bit_in_GR32_ABCD_and_GR32_NOAX
GR64_with_sub_32bit_in_GR32_NOAX_and_GR32_TC
GR64_with_sub_32bit_in_GR32_AD
GR64_with_sub_32bit_in_GR32_AD_and_GR32_NOAX
The other targets in the tree are not weird enough to be affected.
Modified:
llvm/trunk/utils/TableGen/CodeGenRegisters.cpp
llvm/trunk/utils/TableGen/CodeGenRegisters.h
Modified: llvm/trunk/utils/TableGen/CodeGenRegisters.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenRegisters.cpp?rev=146872&r1=146871&r2=146872&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenRegisters.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenRegisters.cpp Mon Dec 19 10:53:28 2011
@@ -836,12 +836,69 @@
}
//
+// Synthesize missing sub-classes of RC for getMatchingSuperRegClass().
+//
+// Create sub-classes of RC such that getMatchingSuperRegClass(RC, SubIdx, X)
+// has a maximal result for any SubIdx and any X >= FirstSubRegRC.
+//
+
+void CodeGenRegBank::inferMatchingSuperRegClass(CodeGenRegisterClass *RC,
+ unsigned FirstSubRegRC) {
+ SmallVector, 16> SSPairs;
+
+ // Iterate in SubRegIndex numerical order to visit synthetic indices last.
+ for (unsigned sri = 0, sre = SubRegIndices.size(); sri != sre; ++sri) {
+ Record *SubIdx = SubRegIndices[sri];
+ // Skip indexes that aren't fully supported by RC's registers. This was
+ // computed by inferSubClassWithSubReg() above which should have been
+ // called first.
+ if (RC->getSubClassWithSubReg(SubIdx) != RC)
+ continue;
+
+ // Build list of (Super, Sub) pairs for this SubIdx.
+ SSPairs.clear();
+ for (CodeGenRegister::Set::const_iterator RI = RC->getMembers().begin(),
+ RE = RC->getMembers().end(); RI != RE; ++RI) {
+ const CodeGenRegister *Super = *RI;
+ const CodeGenRegister *Sub = Super->getSubRegs().find(SubIdx)->second;
+ assert(Sub && "Missing sub-register");
+ SSPairs.push_back(std::make_pair(Super, Sub));
+ }
+
+ // Iterate over sub-register class candidates. Ignore classes created by
+ // this loop. They will never be useful.
+ for (unsigned rci = FirstSubRegRC, rce = RegClasses.size(); rci != rce;
+ ++rci) {
+ CodeGenRegisterClass *SubRC = RegClasses[rci];
+ // Compute the subset of RC that maps into SubRC.
+ CodeGenRegister::Set SubSet;
+ for (unsigned i = 0, e = SSPairs.size(); i != e; ++i)
+ if (SubRC->contains(SSPairs[i].second))
+ SubSet.insert(SSPairs[i].first);
+ if (SubSet.empty())
+ continue;
+ // RC injects completely into SubRC.
+ if (SubSet.size() == SSPairs.size())
+ continue;
+ // Only a subset of RC maps into SubRC. Make sure it is represented by a
+ // class.
+ getOrCreateSubClass(RC, &SubSet, RC->getName() +
+ "_with_" + SubIdx->getName() +
+ "_in_" + SubRC->getName());
+ }
+ }
+}
+
+
+//
// Infer missing register classes.
//
void CodeGenRegBank::computeInferredRegisterClasses() {
// When this function is called, the register classes have not been sorted
// and assigned EnumValues yet. That means getSubClasses(),
// getSuperClasses(), and hasSubClass() functions are defunct.
+ unsigned FirstNewRC = RegClasses.size();
// Visit all register classes, including the ones being added by the loop.
for (unsigned rci = 0; rci != RegClasses.size(); ++rci) {
@@ -852,6 +909,22 @@
// Synthesize answers for getCommonSubClass().
inferCommonSubClass(RC);
+
+ // Synthesize answers for getMatchingSuperRegClass().
+ inferMatchingSuperRegClass(RC);
+
+ // New register classes are created while this loop is running, and we need
+ // to visit all of them. I particular, inferMatchingSuperRegClass needs
+ // to match old super-register classes with sub-register classes created
+ // after inferMatchingSuperRegClass was called. At this point,
+ // inferMatchingSuperRegClass has checked SuperRC = [0..rci] with SubRC =
+ // [0..FirstNewRC). We need to cover SubRC = [FirstNewRC..rci].
+ if (rci + 1 == FirstNewRC) {
+ unsigned NextNewRC = RegClasses.size();
+ for (unsigned rci2 = 0; rci2 != FirstNewRC; ++rci2)
+ inferMatchingSuperRegClass(RegClasses[rci2], FirstNewRC);
+ FirstNewRC = NextNewRC;
+ }
}
}
Modified: llvm/trunk/utils/TableGen/CodeGenRegisters.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenRegisters.h?rev=146872&r1=146871&r2=146872&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenRegisters.h (original)
+++ llvm/trunk/utils/TableGen/CodeGenRegisters.h Mon Dec 19 10:53:28 2011
@@ -246,6 +246,8 @@
void computeInferredRegisterClasses();
void inferCommonSubClass(CodeGenRegisterClass *RC);
void inferSubClassWithSubReg(CodeGenRegisterClass *RC);
+ void inferMatchingSuperRegClass(CodeGenRegisterClass *RC,
+ unsigned FirstSubRegRC = 0);
// Composite SubRegIndex instances.
// Map (SubRegIndex, SubRegIndex) -> SubRegIndex.
From stoklund at 2pi.dk Mon Dec 19 10:53:34 2011
From: stoklund at 2pi.dk (Jakob Stoklund Olesen)
Date: Mon, 19 Dec 2011 16:53:34 -0000
Subject: [llvm-commits] [llvm] r146873 - in /llvm/trunk:
include/llvm/Target/TargetRegisterInfo.h
lib/Target/ARM/ARMBaseRegisterInfo.cpp lib/Target/ARM/ARMBaseRegisterInfo.h
lib/Target/MSP430/MSP430RegisterInfo.h lib/Target/X86/X86RegisterInfo.cpp
utils/TableGen/CodeGenRegisters.cpp utils/TableGen/CodeGenRegisters.h
utils/TableGen/RegisterInfoEmitter.cpp
Message-ID: <20111219165334.C159D1BE003@llvm.org>
Author: stoklund
Date: Mon Dec 19 10:53:34 2011
New Revision: 146873
URL: http://llvm.org/viewvc/llvm-project?rev=146873&view=rev
Log:
Emit a getMatchingSuperRegClass() implementation for every target.
Use information computed while inferring new register classes to emit
accurate, table-driven implementations of getMatchingSuperRegClass().
Delete the old manual, error-prone implementations in the targets.
Modified:
llvm/trunk/include/llvm/Target/TargetRegisterInfo.h
llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp
llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h
llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.h
llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
llvm/trunk/utils/TableGen/CodeGenRegisters.cpp
llvm/trunk/utils/TableGen/CodeGenRegisters.h
llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp
Modified: llvm/trunk/include/llvm/Target/TargetRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetRegisterInfo.h?rev=146873&r1=146872&r2=146873&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetRegisterInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetRegisterInfo.h Mon Dec 19 10:53:34 2011
@@ -402,11 +402,11 @@
/// getMatchingSuperRegClass - Return a subclass of the specified register
/// class A so that each register in it has a sub-register of the
/// specified sub-register index which is in the specified register class B.
+ ///
+ /// TableGen will synthesize missing A sub-classes.
virtual const TargetRegisterClass *
getMatchingSuperRegClass(const TargetRegisterClass *A,
- const TargetRegisterClass *B, unsigned Idx) const {
- return 0;
- }
+ const TargetRegisterClass *B, unsigned Idx) const =0;
/// getSubClassWithSubReg - Returns the largest legal sub-class of RC that
/// supports the sub-register index Idx.
@@ -419,6 +419,7 @@
/// supported by the full GR32 register class in 64-bit mode, but only by the
/// GR32_ABCD regiister class in 32-bit mode.
///
+ /// TableGen will synthesize missing RC sub-classes.
virtual const TargetRegisterClass *
getSubClassWithSubReg(const TargetRegisterClass *RC, unsigned Idx) const =0;
Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=146873&r1=146872&r2=146873&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Mon Dec 19 10:53:34 2011
@@ -135,104 +135,6 @@
return false;
}
-const TargetRegisterClass *
-ARMBaseRegisterInfo::getMatchingSuperRegClass(const TargetRegisterClass *A,
- const TargetRegisterClass *B,
- unsigned SubIdx) const {
- switch (SubIdx) {
- default: return 0;
- case ARM::ssub_0:
- case ARM::ssub_1:
- case ARM::ssub_2:
- case ARM::ssub_3: {
- // S sub-registers.
- if (A->getSize() == 8) {
- if (B == &ARM::SPR_8RegClass)
- return &ARM::DPR_8RegClass;
- assert(B == &ARM::SPRRegClass && "Expecting SPR register class!");
- if (A == &ARM::DPR_8RegClass)
- return A;
- return &ARM::DPR_VFP2RegClass;
- }
-
- if (A->getSize() == 16) {
- if (B == &ARM::SPR_8RegClass)
- return &ARM::QPR_8RegClass;
- return &ARM::QPR_VFP2RegClass;
- }
-
- if (A->getSize() == 32) {
- if (B == &ARM::SPR_8RegClass)
- return 0; // Do not allow coalescing!
- return &ARM::QQPR_VFP2RegClass;
- }
-
- assert(A->getSize() == 64 && "Expecting a QQQQ register class!");
- return 0; // Do not allow coalescing!
- }
- case ARM::dsub_0:
- case ARM::dsub_1:
- case ARM::dsub_2:
- case ARM::dsub_3: {
- // D sub-registers.
- if (A->getSize() == 16) {
- if (B == &ARM::DPR_VFP2RegClass)
- return &ARM::QPR_VFP2RegClass;
- if (B == &ARM::DPR_8RegClass)
- return 0; // Do not allow coalescing!
- return A;
- }
-
- if (A->getSize() == 32) {
- if (B == &ARM::DPR_VFP2RegClass)
- return &ARM::QQPR_VFP2RegClass;
- if (B == &ARM::DPR_8RegClass)
- return 0; // Do not allow coalescing!
- return A;
- }
-
- assert(A->getSize() == 64 && "Expecting a QQQQ register class!");
- if (B != &ARM::DPRRegClass)
- return 0; // Do not allow coalescing!
- return A;
- }
- case ARM::dsub_4:
- case ARM::dsub_5:
- case ARM::dsub_6:
- case ARM::dsub_7: {
- // D sub-registers of QQQQ registers.
- if (A->getSize() == 64 && B == &ARM::DPRRegClass)
- return A;
- return 0; // Do not allow coalescing!
- }
-
- case ARM::qsub_0:
- case ARM::qsub_1: {
- // Q sub-registers.
- if (A->getSize() == 32) {
- if (B == &ARM::QPR_VFP2RegClass)
- return &ARM::QQPR_VFP2RegClass;
- if (B == &ARM::QPR_8RegClass)
- return 0; // Do not allow coalescing!
- return A;
- }
-
- assert(A->getSize() == 64 && "Expecting a QQQQ register class!");
- if (B == &ARM::QPRRegClass)
- return A;
- return 0; // Do not allow coalescing!
- }
- case ARM::qsub_2:
- case ARM::qsub_3: {
- // Q sub-registers of QQQQ registers.
- if (A->getSize() == 64 && B == &ARM::QPRRegClass)
- return A;
- return 0; // Do not allow coalescing!
- }
- }
- return 0;
-}
-
bool
ARMBaseRegisterInfo::canCombineSubRegIndices(const TargetRegisterClass *RC,
SmallVectorImpl &SubIndices,
Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h?rev=146873&r1=146872&r2=146873&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h (original)
+++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.h Mon Dec 19 10:53:34 2011
@@ -98,13 +98,6 @@
BitVector getReservedRegs(const MachineFunction &MF) const;
- /// getMatchingSuperRegClass - Return a subclass of the specified register
- /// class A so that each register in it has a sub-register of the
- /// specified sub-register index which is in the specified register class B.
- virtual const TargetRegisterClass *
- getMatchingSuperRegClass(const TargetRegisterClass *A,
- const TargetRegisterClass *B, unsigned Idx) const;
-
/// canCombineSubRegIndices - Given a register class and a list of
/// subregister indices, return true if it's possible to combine the
/// subregister indices into one that corresponds to a larger
Modified: llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.h?rev=146873&r1=146872&r2=146873&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.h (original)
+++ llvm/trunk/lib/Target/MSP430/MSP430RegisterInfo.h Mon Dec 19 10:53:34 2011
@@ -41,13 +41,6 @@
BitVector getReservedRegs(const MachineFunction &MF) const;
const TargetRegisterClass* getPointerRegClass(unsigned Kind = 0) const;
- const TargetRegisterClass *
- getMatchingSuperRegClass(const TargetRegisterClass *A,
- const TargetRegisterClass *B, unsigned Idx) const {
- // No sub-classes makes this really easy.
- return A;
- }
-
void eliminateCallFramePseudoInstr(MachineFunction &MF,
MachineBasicBlock &MBB,
MachineBasicBlock::iterator I) const;
Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=146873&r1=146872&r2=146873&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Mon Dec 19 10:53:34 2011
@@ -127,121 +127,13 @@
X86RegisterInfo::getMatchingSuperRegClass(const TargetRegisterClass *A,
const TargetRegisterClass *B,
unsigned SubIdx) const {
- switch (SubIdx) {
- default: return 0;
- case X86::sub_8bit:
- if (B == &X86::GR8RegClass) {
- if (A->getSize() == 2 || A->getSize() == 4 || A->getSize() == 8)
- return A;
- } else if (B == &X86::GR8_ABCD_LRegClass || B == &X86::GR8_ABCD_HRegClass) {
- if (A == &X86::GR64RegClass || A == &X86::GR64_ABCDRegClass ||
- A == &X86::GR64_NOREXRegClass ||
- A == &X86::GR64_NOSPRegClass ||
- A == &X86::GR64_NOREX_NOSPRegClass)
- return &X86::GR64_ABCDRegClass;
- else if (A == &X86::GR32RegClass || A == &X86::GR32_ABCDRegClass ||
- A == &X86::GR32_NOREXRegClass ||
- A == &X86::GR32_NOSPRegClass)
- return &X86::GR32_ABCDRegClass;
- else if (A == &X86::GR16RegClass || A == &X86::GR16_ABCDRegClass ||
- A == &X86::GR16_NOREXRegClass)
- return &X86::GR16_ABCDRegClass;
- } else if (B == &X86::GR8_NOREXRegClass) {
- if (A == &X86::GR64RegClass || A == &X86::GR64_NOREXRegClass ||
- A == &X86::GR64_NOSPRegClass || A == &X86::GR64_NOREX_NOSPRegClass)
- return &X86::GR64_NOREXRegClass;
- else if (A == &X86::GR64_ABCDRegClass)
- return &X86::GR64_ABCDRegClass;
- else if (A == &X86::GR32RegClass || A == &X86::GR32_NOREXRegClass ||
- A == &X86::GR32_NOSPRegClass)
- return &X86::GR32_NOREXRegClass;
- else if (A == &X86::GR32_ABCDRegClass)
- return &X86::GR32_ABCDRegClass;
- else if (A == &X86::GR16RegClass || A == &X86::GR16_NOREXRegClass)
- return &X86::GR16_NOREXRegClass;
- else if (A == &X86::GR16_ABCDRegClass)
- return &X86::GR16_ABCDRegClass;
- }
- break;
- case X86::sub_8bit_hi:
- if (B->hasSubClassEq(&X86::GR8_ABCD_HRegClass))
- switch (A->getSize()) {
- case 2: return getCommonSubClass(A, &X86::GR16_ABCDRegClass);
- case 4: return getCommonSubClass(A, &X86::GR32_ABCDRegClass);
- case 8: return getCommonSubClass(A, &X86::GR64_ABCDRegClass);
- default: return 0;
- }
- break;
- case X86::sub_16bit:
- if (B == &X86::GR16RegClass) {
- if (A->getSize() == 4 || A->getSize() == 8)
- return A;
- } else if (B == &X86::GR16_ABCDRegClass) {
- if (A == &X86::GR64RegClass || A == &X86::GR64_ABCDRegClass ||
- A == &X86::GR64_NOREXRegClass ||
- A == &X86::GR64_NOSPRegClass ||
- A == &X86::GR64_NOREX_NOSPRegClass)
- return &X86::GR64_ABCDRegClass;
- else if (A == &X86::GR32RegClass || A == &X86::GR32_ABCDRegClass ||
- A == &X86::GR32_NOREXRegClass || A == &X86::GR32_NOSPRegClass)
- return &X86::GR32_ABCDRegClass;
- } else if (B == &X86::GR16_NOREXRegClass) {
- if (A == &X86::GR64RegClass || A == &X86::GR64_NOREXRegClass ||
- A == &X86::GR64_NOSPRegClass || A == &X86::GR64_NOREX_NOSPRegClass)
- return &X86::GR64_NOREXRegClass;
- else if (A == &X86::GR64_ABCDRegClass)
- return &X86::GR64_ABCDRegClass;
- else if (A == &X86::GR32RegClass || A == &X86::GR32_NOREXRegClass ||
- A == &X86::GR32_NOSPRegClass)
- return &X86::GR32_NOREXRegClass;
- else if (A == &X86::GR32_ABCDRegClass)
- return &X86::GR64_ABCDRegClass;
- }
- break;
- case X86::sub_32bit:
- if (B == &X86::GR32RegClass) {
- if (A->getSize() == 8)
- return A;
- } else if (B == &X86::GR32_NOSPRegClass) {
- if (A == &X86::GR64RegClass || A == &X86::GR64_NOSPRegClass)
- return &X86::GR64_NOSPRegClass;
- if (A->getSize() == 8)
- return getCommonSubClass(A, &X86::GR64_NOSPRegClass);
- } else if (B == &X86::GR32_ABCDRegClass) {
- if (A == &X86::GR64RegClass || A == &X86::GR64_ABCDRegClass ||
- A == &X86::GR64_NOREXRegClass ||
- A == &X86::GR64_NOSPRegClass ||
- A == &X86::GR64_NOREX_NOSPRegClass)
- return &X86::GR64_ABCDRegClass;
- } else if (B == &X86::GR32_NOREXRegClass) {
- if (A == &X86::GR64RegClass || A == &X86::GR64_NOREXRegClass)
- return &X86::GR64_NOREXRegClass;
- else if (A == &X86::GR64_NOSPRegClass || A == &X86::GR64_NOREX_NOSPRegClass)
- return &X86::GR64_NOREX_NOSPRegClass;
- else if (A == &X86::GR64_ABCDRegClass)
- return &X86::GR64_ABCDRegClass;
- } else if (B == &X86::GR32_NOREX_NOSPRegClass) {
- if (A == &X86::GR64RegClass || A == &X86::GR64_NOREXRegClass ||
- A == &X86::GR64_NOSPRegClass || A == &X86::GR64_NOREX_NOSPRegClass)
- return &X86::GR64_NOREX_NOSPRegClass;
- else if (A == &X86::GR64_ABCDRegClass)
- return &X86::GR64_ABCDRegClass;
- }
- break;
- case X86::sub_ss:
- if (B == &X86::FR32RegClass)
- return A;
- break;
- case X86::sub_sd:
- if (B == &X86::FR64RegClass)
- return A;
- break;
- case X86::sub_xmm:
- if (B == &X86::VR128RegClass)
- return A;
- break;
+ // The sub_8bit sub-register index is more constrained in 32-bit mode.
+ if (!Is64Bit && SubIdx == X86::sub_8bit) {
+ A = X86GenRegisterInfo::getSubClassWithSubReg(A, X86::sub_8bit_hi);
+ if (!A)
+ return 0;
}
- return 0;
+ return X86GenRegisterInfo::getMatchingSuperRegClass(A, B, SubIdx);
}
const TargetRegisterClass*
Modified: llvm/trunk/utils/TableGen/CodeGenRegisters.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenRegisters.cpp?rev=146873&r1=146872&r2=146873&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenRegisters.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenRegisters.cpp Mon Dec 19 10:53:34 2011
@@ -504,6 +504,18 @@
RegClasses[rci]->inheritProperties(RegBank);
}
+void
+CodeGenRegisterClass::getSuperRegClasses(Record *SubIdx, BitVector &Out) const {
+ DenseMap >::const_iterator
+ FindI = SuperRegClasses.find(SubIdx);
+ if (FindI == SuperRegClasses.end())
+ return;
+ for (SmallPtrSet::const_iterator I =
+ FindI->second.begin(), E = FindI->second.end(); I != E; ++I)
+ Out.set((*I)->EnumValue);
+}
+
+
//===----------------------------------------------------------------------===//
// CodeGenRegBank
//===----------------------------------------------------------------------===//
@@ -879,8 +891,10 @@
if (SubSet.empty())
continue;
// RC injects completely into SubRC.
- if (SubSet.size() == SSPairs.size())
+ if (SubSet.size() == SSPairs.size()) {
+ SubRC->addSuperRegClass(SubIdx, RC);
continue;
+ }
// Only a subset of RC maps into SubRC. Make sure it is represented by a
// class.
getOrCreateSubClass(RC, &SubSet, RC->getName() +
Modified: llvm/trunk/utils/TableGen/CodeGenRegisters.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenRegisters.h?rev=146873&r1=146872&r2=146873&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenRegisters.h (original)
+++ llvm/trunk/utils/TableGen/CodeGenRegisters.h Mon Dec 19 10:53:34 2011
@@ -101,9 +101,16 @@
// super-class.
void inheritProperties(CodeGenRegBank&);
- // Map SubRegIndex -> sub-class
+ // Map SubRegIndex -> sub-class. This is the largest sub-class where all
+ // registers have a SubRegIndex sub-register.
DenseMap SubClassWithSubReg;
+ // Map SubRegIndex -> set of super-reg classes. This is all register
+ // classes SuperRC such that:
+ //
+ // R:SubRegIndex in this RC for all R in SuperRC.
+ //
+ DenseMap > SuperRegClasses;
public:
unsigned EnumValue;
std::string Namespace;
@@ -158,6 +165,15 @@
SubClassWithSubReg[SubIdx] = SubRC;
}
+ // getSuperRegClasses - Returns a bit vector of all register classes
+ // containing only SubIdx super-registers of this class.
+ void getSuperRegClasses(Record *SubIdx, BitVector &Out) const;
+
+ // addSuperRegClass - Add a class containing only SudIdx super-registers.
+ void addSuperRegClass(Record *SubIdx, CodeGenRegisterClass *SuperRC) {
+ SuperRegClasses[SubIdx].insert(SuperRC);
+ }
+
// getSubClasses - Returns a constant BitVector of subclasses indexed by
// EnumValue.
// The SubClasses vector includs an entry for this class.
Modified: llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp?rev=146873&r1=146872&r2=146873&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp Mon Dec 19 10:53:34 2011
@@ -426,6 +426,9 @@
<< " unsigned composeSubRegIndices(unsigned, unsigned) const;\n"
<< " const TargetRegisterClass *"
"getSubClassWithSubReg(const TargetRegisterClass*, unsigned) const;\n"
+ << " const TargetRegisterClass *getMatchingSuperRegClass("
+ "const TargetRegisterClass*, const TargetRegisterClass*, "
+ "unsigned) const;\n"
<< "};\n\n";
const std::vector &SubRegIndices = RegBank.getSubRegIndices();
@@ -815,6 +818,51 @@
}
OS << "}\n\n";
+ // Emit getMatchingSuperRegClass.
+ OS << "const TargetRegisterClass *" << ClassName
+ << "::getMatchingSuperRegClass(const TargetRegisterClass *A,"
+ " const TargetRegisterClass *B, unsigned Idx) const {\n";
+ if (SubRegIndices.empty()) {
+ OS << " llvm_unreachable(\"Target has no sub-registers\");\n";
+ } else {
+ // We need to find the largest sub-class of A such that every register has
+ // an Idx sub-register in B. Map (B, Idx) to a bit-vector of
+ // super-register classes that map into B. Then compute the largest common
+ // sub-class with A by taking advantage of the register class ordering,
+ // like getCommonSubClass().
+
+ // Bitvector table is NumRCs x NumSubIndexes x BVWords, where BVWords is
+ // the number of 32-bit words required to represent all register classes.
+ const unsigned BVWords = (RegisterClasses.size()+31)/32;
+ BitVector BV(RegisterClasses.size());
+
+ OS << " static const unsigned Table[" << RegisterClasses.size()
+ << "][" << SubRegIndices.size() << "][" << BVWords << "] = {\n";
+ for (unsigned rci = 0, rce = RegisterClasses.size(); rci != rce; ++rci) {
+ const CodeGenRegisterClass &RC = *RegisterClasses[rci];
+ OS << " {\t// " << RC.getName() << "\n";
+ for (unsigned sri = 0, sre = SubRegIndices.size(); sri != sre; ++sri) {
+ Record *Idx = SubRegIndices[sri];
+ BV.reset();
+ RC.getSuperRegClasses(Idx, BV);
+ OS << " { ";
+ printBitVectorAsHex(OS, BV, 32);
+ OS << "},\t// " << Idx->getName() << '\n';
+ }
+ OS << " },\n";
+ }
+ OS << " };\n assert(A && B && \"Missing regclass\");\n"
+ << " --Idx;\n"
+ << " assert(Idx < " << SubRegIndices.size() << " && \"Bad subreg\");\n"
+ << " const unsigned *TV = Table[B->getID()][Idx];\n"
+ << " const unsigned *SC = A->getSubClassMask();\n"
+ << " for (unsigned i = 0; i != " << BVWords << "; ++i)\n"
+ << " if (unsigned Common = TV[i] & SC[i])\n"
+ << " return getRegClass(32*i + CountTrailingZeros_32(Common));\n"
+ << " return 0;\n";
+ }
+ OS << "}\n\n";
+
// Emit the constructor of the class...
OS << "extern const MCRegisterDesc " << TargetName << "RegDesc[];\n";
From stoklund at 2pi.dk Mon Dec 19 10:53:37 2011
From: stoklund at 2pi.dk (Jakob Stoklund Olesen)
Date: Mon, 19 Dec 2011 16:53:37 -0000
Subject: [llvm-commits] [llvm] r146874 -
/llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp
Message-ID: <20111219165337.B7FA91BE003@llvm.org>
Author: stoklund
Date: Mon Dec 19 10:53:37 2011
New Revision: 146874
URL: http://llvm.org/viewvc/llvm-project?rev=146874&view=rev
Log:
Handle sub-register operands in recomputeRegClass().
Now that getMatchingSuperRegClass() returns accurate results, it can be
used to compute constraints imposed by instructions using a sub-register
of a virtual register.
This means we can recompute the register class of any virtual register
by combining the constraints from all its uses.
Modified:
llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp
Modified: llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp?rev=146874&r1=146873&r2=146874&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineRegisterInfo.cpp Mon Dec 19 10:53:37 2011
@@ -76,12 +76,14 @@
// Accumulate constraints from all uses.
for (reg_nodbg_iterator I = reg_nodbg_begin(Reg), E = reg_nodbg_end(); I != E;
++I) {
- // TRI doesn't have accurate enough information to model this yet.
- if (I.getOperand().getSubReg())
- return false;
const TargetRegisterClass *OpRC =
I->getRegClassConstraint(I.getOperandNo(), TII, TRI);
- if (OpRC)
+ if (unsigned SubIdx = I.getOperand().getSubReg()) {
+ if (OpRC)
+ NewRC = TRI->getMatchingSuperRegClass(NewRC, OpRC, SubIdx);
+ else
+ NewRC = TRI->getSubClassWithSubReg(NewRC, SubIdx);
+ } else if (OpRC)
NewRC = TRI->getCommonSubClass(NewRC, OpRC);
if (!NewRC || NewRC == OldRC)
return false;
From stoklund at 2pi.dk Mon Dec 19 10:53:40 2011
From: stoklund at 2pi.dk (Jakob Stoklund Olesen)
Date: Mon, 19 Dec 2011 16:53:40 -0000
Subject: [llvm-commits] [llvm] r146875 - in /llvm/trunk:
docs/ReleaseNotes.html lib/Target/ARM/ARMRegisterInfo.td
Message-ID: <20111219165341.060B31BE003@llvm.org>
Author: stoklund
Date: Mon Dec 19 10:53:40 2011
New Revision: 146875
URL: http://llvm.org/viewvc/llvm-project?rev=146875&view=rev
Log:
Remove a register class that can just as well be synthesized.
Add the new TableGen register class synthesizer feature to the release
notes.
Modified:
llvm/trunk/docs/ReleaseNotes.html
llvm/trunk/lib/Target/ARM/ARMRegisterInfo.td
Modified: llvm/trunk/docs/ReleaseNotes.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=146875&r1=146874&r2=146875&view=diff
==============================================================================
--- llvm/trunk/docs/ReleaseNotes.html (original)
+++ llvm/trunk/docs/ReleaseNotes.html Mon Dec 19 10:53:40 2011
@@ -337,7 +337,10 @@
make it run faster:
- - ....
+ - TableGen can now synthesize register classes that are only needed to
+ represent combinations of constraints from instructions and sub-registers.
+ The synthetic register classes inherit most of their properties form their
+ closest user-defined super-class.
Modified: llvm/trunk/lib/Target/ARM/ARMRegisterInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMRegisterInfo.td?rev=146875&r1=146874&r2=146875&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMRegisterInfo.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMRegisterInfo.td Mon Dec 19 10:53:40 2011
@@ -326,14 +326,6 @@
let AltOrderSelect = [{ return 1; }];
}
-// Subset of QQPR that have 32-bit SPR subregs.
-def QQPR_VFP2 : RegisterClass<"ARM", [v4i64], 256, (trunc QQPR, 4)> {
- let SubRegClasses = [(SPR ssub_0, ssub_1, ssub_2, ssub_3),
- (DPR_VFP2 dsub_0, dsub_1, dsub_2, dsub_3),
- (QPR_VFP2 qsub_0, qsub_1)];
-
-}
-
// Pseudo 512-bit vector register class to model 4 consecutive Q registers
// (8 consecutive D registers).
def QQQQPR : RegisterClass<"ARM", [v8i64], 256, (sequence "QQQQ%u", 0, 3)> {
From daniel at zuster.org Mon Dec 19 11:11:32 2011
From: daniel at zuster.org (Daniel Dunbar)
Date: Mon, 19 Dec 2011 17:11:32 -0000
Subject: [llvm-commits] [zorg] r146876 -
/zorg/trunk/lnt/lnt/server/db/testsuitedb.py
Message-ID: <20111219171132.E1F4D1BE003@llvm.org>
Author: ddunbar
Date: Mon Dec 19 11:11:32 2011
New Revision: 146876
URL: http://llvm.org/viewvc/llvm-project?rev=146876&view=rev
Log:
[lnt/v0.4] lnt.server.db: Eliminate an unnecessary index (and add a future
FIXME).
Modified:
zorg/trunk/lnt/lnt/server/db/testsuitedb.py
Modified: zorg/trunk/lnt/lnt/server/db/testsuitedb.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/testsuitedb.py?rev=146876&r1=146875&r2=146876&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/testsuitedb.py (original)
+++ zorg/trunk/lnt/lnt/server/db/testsuitedb.py Mon Dec 19 11:11:32 2011
@@ -136,7 +136,9 @@
__tablename__ = db_key_name + '_Sample'
id = Column("ID", Integer, primary_key=True)
- run_id = Column("RunID", Integer, ForeignKey(Run.id), index=True)
+ # We do not need an index on run_id, this is covered by the compound
+ # (Run(ID),Test(ID)) index we create below.
+ run_id = Column("RunID", Integer, ForeignKey(Run.id))
test_id = Column("TestID", Integer, ForeignKey(Test.id), index=True)
run = sqlalchemy.orm.relation(Run)
@@ -144,6 +146,11 @@
# Dynamically create fields for all of the test suite defined sample
# fields.
+ #
+ # FIXME: We might want to index some of these, but for a different
+ # reason than above. It is possible worth it to turn the compound
+ # index below into a covering index. We should evaluate this once
+ # the new UI is up.
class_dict = locals()
for item in test_suite.sample_fields:
if item.name in class_dict:
From daniel at zuster.org Mon Dec 19 11:11:38 2011
From: daniel at zuster.org (Daniel Dunbar)
Date: Mon, 19 Dec 2011 17:11:38 -0000
Subject: [llvm-commits] [zorg] r146877 -
/zorg/trunk/lnt/lnt/server/db/testsuitedb.py
Message-ID: <20111219171138.F3B111BE003@llvm.org>
Author: ddunbar
Date: Mon Dec 19 11:11:38 2011
New Revision: 146877
URL: http://llvm.org/viewvc/llvm-project?rev=146877&view=rev
Log:
[lnt/v0.4] lnt.server.db: Add a comment.
Modified:
zorg/trunk/lnt/lnt/server/db/testsuitedb.py
Modified: zorg/trunk/lnt/lnt/server/db/testsuitedb.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/testsuitedb.py?rev=146877&r1=146876&r2=146877&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/testsuitedb.py (original)
+++ zorg/trunk/lnt/lnt/server/db/testsuitedb.py Mon Dec 19 11:11:38 2011
@@ -11,6 +11,16 @@
import testsuite
class TestSuiteDB(object):
+ """
+ Wrapper object for an individual test suites database tables.
+
+ This wrapper is somewhat special in that it handles specializing the
+ metatable instances for the given test suite.
+
+ Clients are expected to only access the test suite database tables by going
+ through the model classes constructed by this wrapper object.
+ """
+
def __init__(self, v4db, test_suite):
self.v4db = v4db
self.test_suite = test_suite
From daniel at zuster.org Mon Dec 19 11:11:44 2011
From: daniel at zuster.org (Daniel Dunbar)
Date: Mon, 19 Dec 2011 17:11:44 -0000
Subject: [llvm-commits] [zorg] r146878 -
/zorg/trunk/lnt/lnt/server/db/testsuite.py
Message-ID: <20111219171144.B5CA11BE003@llvm.org>
Author: ddunbar
Date: Mon Dec 19 11:11:44 2011
New Revision: 146878
URL: http://llvm.org/viewvc/llvm-project?rev=146878&view=rev
Log:
[lnt/v0.4] lnt.server.db: Change test suite version string to be just the major
and minor LNT version.
Modified:
zorg/trunk/lnt/lnt/server/db/testsuite.py
Modified: zorg/trunk/lnt/lnt/server/db/testsuite.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/testsuite.py?rev=146878&r1=146877&r2=146878&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/testsuite.py (original)
+++ zorg/trunk/lnt/lnt/server/db/testsuite.py Mon Dec 19 11:11:44 2011
@@ -73,7 +73,8 @@
def __init__(self, name, db_key_name):
self.name = name
self.db_key_name = db_key_name
- self.version = lnt.__version__
+ self.version = "%d.%d" % (lnt.__versioninfo__[0],
+ lnt.__versioninfo__[1])
def __repr__(self):
return '%s%r' % (self.__class__.__name__, (self.name, self.db_key_name,
From daniel at zuster.org Mon Dec 19 11:11:50 2011
From: daniel at zuster.org (Daniel Dunbar)
Date: Mon, 19 Dec 2011 17:11:50 -0000
Subject: [llvm-commits] [zorg] r146879 - in /zorg/trunk/lnt/lnt:
lnttool/create.py server/config.py server/ui/templates/error.html
server/ui/views.py
Message-ID: <20111219171150.AC6C41BE003@llvm.org>
Author: ddunbar
Date: Mon Dec 19 11:11:50 2011
New Revision: 146879
URL: http://llvm.org/viewvc/llvm-project?rev=146879&view=rev
Log:
[lnt/v0.4] lnt.server.ui: Add a db_version to the config object and change the
viewer to not try and display any non-0.3 version databases, for now.
Added:
zorg/trunk/lnt/lnt/server/ui/templates/error.html
Modified:
zorg/trunk/lnt/lnt/lnttool/create.py
zorg/trunk/lnt/lnt/server/config.py
zorg/trunk/lnt/lnt/server/ui/views.py
Modified: zorg/trunk/lnt/lnt/lnttool/create.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/lnttool/create.py?rev=146879&r1=146878&r2=146879&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/lnttool/create.py (original)
+++ zorg/trunk/lnt/lnt/lnttool/create.py Mon Dec 19 11:11:50 2011
@@ -18,14 +18,14 @@
name = %(name)r
# Path to the LNT server. This is required for use in emails where we need to
-# provude an absolute URL to the server.
+# provide an absolute URL to the server.
zorgURL = %(hosturl)r
# Temporary directory, for use by the web app. This must be writable by the user
# the web app runs as.
tmp_dir = %(tmp_dir)r
-# Database directory, for easily rerooting the entire set of database. Database
+# Database directory, for easily rerooting the entire set of databases. Database
# paths are resolved relative to the config path + this path.
db_dir = %(db_dir)r
@@ -35,7 +35,8 @@
'default' : { 'path' : %(default_db)r,
'showGeneral' : 1,
'showNightlytest' : 1,
- 'showSimple' : 1 },
+ 'showSimple' : 1,
+ 'db_version' : %(default_db_version)r },
}
# The LNT email configuration.
@@ -116,6 +117,7 @@
default_db = opts.default_db
hostname = opts.hostname
hostsuffix = opts.hostsuffix
+ default_db_version = "0.3"
basepath = os.path.abspath(path)
if os.path.exists(basepath):
Modified: zorg/trunk/lnt/lnt/server/config.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/config.py?rev=146879&r1=146878&r2=146879&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/config.py (original)
+++ zorg/trunk/lnt/lnt/server/config.py Mon Dec 19 11:11:50 2011
@@ -48,14 +48,16 @@
bool(dict.get('showNightlytest')),
bool(dict.get('showGeneral')),
bool(dict.get('showSimple')),
+ str(dict.get('db_version', '0.3')),
email_config)
def __init__(self, path, showNightlytest, showGeneral, showSimple,
- email_config):
+ db_version, email_config):
self.path = path
self.showGeneral = showGeneral
self.showNightlytest = showNightlytest
self.showSimple = showSimple
+ self.db_version = db_version
self.email_config = email_config
class Config:
Added: zorg/trunk/lnt/lnt/server/ui/templates/error.html
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/ui/templates/error.html?rev=146879&view=auto
==============================================================================
--- zorg/trunk/lnt/lnt/server/ui/templates/error.html (added)
+++ zorg/trunk/lnt/lnt/server/ui/templates/error.html Mon Dec 19 11:11:50 2011
@@ -0,0 +1,8 @@
+{% extends "layout.html" %}
+{% set components = [("browse", db_url_for("browse"))] %}
+{% block title %}Error{% endblock %}
+{% block body %}
+
+{{ message }}
+
+{% endblock %}
Modified: zorg/trunk/lnt/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/ui/views.py?rev=146879&r1=146878&r2=146879&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/ui/views.py (original)
+++ zorg/trunk/lnt/lnt/server/ui/views.py Mon Dec 19 11:11:50 2011
@@ -62,6 +62,12 @@
if g.db_info is None:
abort(404)
+ # Currently the UI has absolutely no support for non-v0.3 databases.
+ if g.db_info.db_version != '0.3':
+ return render_template("error.html", message="""\
+UI support for database with version %r is not yet implemented.""" % (
+ g.db_info.db_version))
+
return f(**args)
frontend.add_url_rule(rule, f.__name__, wrap, **options)
From daniel at zuster.org Mon Dec 19 11:11:56 2011
From: daniel at zuster.org (Daniel Dunbar)
Date: Mon, 19 Dec 2011 17:11:56 -0000
Subject: [llvm-commits] [zorg] r146880 - in /zorg/trunk/lnt: lnt/__init__.py
lnt/lnttool/create.py lnt/server/db/testsuitedb.py
tests/server/db/ImportV4TestSuiteInstance.py tests/server/db/Inputs/
tests/server/db/Inputs/sample-a-small.plist
tests/server/db/Inputs/sample-b-small.plist
Message-ID: <20111219171156.E2F421BE003@llvm.org>
Author: ddunbar
Date: Mon Dec 19 11:11:56 2011
New Revision: 146880
URL: http://llvm.org/viewvc/llvm-project?rev=146880&view=rev
Log:
[lnt/v0.4] lnt create: Add a --use-v4 option, which will create an 0.4 style database (preconfigured with an NT compatible test suite) for the default database.
- Start sketching a V4 based import test.
- Also, bump version to 0.4.
Added:
zorg/trunk/lnt/tests/server/db/ImportV4TestSuiteInstance.py
zorg/trunk/lnt/tests/server/db/Inputs/
zorg/trunk/lnt/tests/server/db/Inputs/sample-a-small.plist
zorg/trunk/lnt/tests/server/db/Inputs/sample-b-small.plist
Modified:
zorg/trunk/lnt/lnt/__init__.py
zorg/trunk/lnt/lnt/lnttool/create.py
zorg/trunk/lnt/lnt/server/db/testsuitedb.py
Modified: zorg/trunk/lnt/lnt/__init__.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/__init__.py?rev=146880&r1=146879&r2=146880&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/__init__.py (original)
+++ zorg/trunk/lnt/lnt/__init__.py Mon Dec 19 11:11:56 2011
@@ -1,6 +1,6 @@
__author__ = 'Daniel Dunbar'
__email__ = 'daniel at zuster.org'
-__versioninfo__ = (0, 3, 1)
+__versioninfo__ = (0, 4, 0)
__version__ = '.'.join(map(str, __versioninfo__)) + 'dev'
__all__ = []
Modified: zorg/trunk/lnt/lnt/lnttool/create.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/lnttool/create.py?rev=146880&r1=146879&r2=146880&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/lnttool/create.py (original)
+++ zorg/trunk/lnt/lnt/lnttool/create.py Mon Dec 19 11:11:56 2011
@@ -79,6 +79,49 @@
import lnt.db.perfdb
+def _create_v4_nt_database(db_path):
+ from lnt.server.db import v4db, testsuite
+
+ # Create the initial database.
+ db = lnt.server.db.v4db.V4DB('sqlite:///' + db_path)
+ db.commit()
+
+ # Create an NT compatible test suite, automatically.
+ ts = testsuite.TestSuite("nt", "NT")
+
+ # Define the default sample types.
+ #
+ # FIXME: This should probably be done by V4DB.
+ real_sample_type = testsuite.SampleType("Real")
+ status_sample_type = testsuite.SampleType("Status")
+
+ # Promote the natural information produced by 'runtest nt' to fields.
+ ts.machine_fields.append(testsuite.MachineField("hardware", "hardware"))
+ ts.machine_fields.append(testsuite.MachineField("os", "os"))
+
+ # The only reliable order currently is the "run_order" field. We will want
+ # to revise this over time.
+ ts.order_fields.append(testsuite.OrderField("llvm_project_revision",
+ "run_order", 0))
+
+ # We are only interested in simple runs, so we expect exactly four fields
+ # per test.
+ ts.sample_fields.append(testsuite.SampleField(
+ "compile_time", real_sample_type, ".compile.time"))
+ ts.sample_fields.append(testsuite.SampleField(
+ "compile_status", status_sample_type, ".compile.status"))
+ ts.sample_fields.append(testsuite.SampleField(
+ "execution_time", real_sample_type, ".exec.time"))
+ ts.sample_fields.append(testsuite.SampleField(
+ "execution_status", status_sample_type, ".exec.status"))
+
+ db.add(ts)
+ db.commit()
+
+ # Finally, ensure the tables for the test suite we just defined are
+ # constructed.
+ ts_db = db.testsuite['nt']
+
def action_create(name, args):
"""create an LLVM nightly test installation"""
@@ -102,6 +145,9 @@
parser.add_option("", "--hostsuffix", dest="hostsuffix", default="perf",
help="suffix at which WSGI app lives [%default]",
metavar="NAME")
+ parser.add_option("", "--use-v4", dest="use_v4",
+ help="use the v0.4 database schema [%default]",
+ action="store_true", default=False)
(opts, args) = parser.parse_args(args)
if len(args) != 1:
@@ -118,6 +164,10 @@
hostname = opts.hostname
hostsuffix = opts.hostsuffix
default_db_version = "0.3"
+ if opts.use_v4:
+ default_db_version = "0.4"
+ else:
+ default_db_version = "0.3"
basepath = os.path.abspath(path)
if os.path.exists(basepath):
@@ -146,8 +196,11 @@
wsgi_file.close()
os.chmod(wsgi_path, 0755)
- db = lnt.db.perfdb.PerfDB('sqlite:///' + db_path)
- db.commit()
+ if opts.use_v4:
+ _create_v4_nt_database(db_path)
+ else:
+ db = lnt.db.perfdb.PerfDB('sqlite:///' + db_path)
+ db.commit()
print 'created LNT configuration in %r' % basepath
print ' configuration file: %s' % cfg_path
Modified: zorg/trunk/lnt/lnt/server/db/testsuitedb.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/testsuitedb.py?rev=146880&r1=146879&r2=146880&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/testsuitedb.py (original)
+++ zorg/trunk/lnt/lnt/server/db/testsuitedb.py Mon Dec 19 11:11:56 2011
@@ -193,7 +193,7 @@
self.Order = Order
# Create the compound index we cannot declare inline.
- sqlalchemy.schema.Index("ix_Sample_RunID_TestID",
+ sqlalchemy.schema.Index("ix_%s_Sample_RunID_TestID" % db_key_name,
Sample.run_id, Sample.test_id)
# Create the test suite database tables in case this is a new database.
Added: zorg/trunk/lnt/tests/server/db/ImportV4TestSuiteInstance.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/server/db/ImportV4TestSuiteInstance.py?rev=146880&view=auto
==============================================================================
--- zorg/trunk/lnt/tests/server/db/ImportV4TestSuiteInstance.py (added)
+++ zorg/trunk/lnt/tests/server/db/ImportV4TestSuiteInstance.py Mon Dec 19 11:11:56 2011
@@ -0,0 +1,44 @@
+# Check the import process into a v4 test suite DB.
+#
+# We first construct a temporary LNT instance.
+# RUN: rm -rf %t.install
+# RUN: lnt create --use-v4 %t.install
+
+# Import the first test set.
+# RUNX: lnt import %t.install %S/Inputs/sample-a-small.plist \
+# RUNX: --commit=1 --show-sample-count | \
+# RUNX: FileCheck -check-prefix=IMPORT-A-1 %s
+#
+# IMPORT-A-1: Added Machines: 1
+# IMPORT-A-1: Added Runs : 1
+# IMPORT-A-1: Added Tests : 8
+# IMPORT-A-1: Added Samples : 8
+
+# Import the second test set.
+# RUNX: lnt import %t.install %S/Inputs/sample-b-small.plist \
+# RUNX: --commit=1 --show-sample-count |\
+# RUNX: FileCheck -check-prefix=IMPORT-B %s
+#
+# IMPORT-B: Added Runs : 1
+# IMPORT-B: Added Samples : 8
+
+# Check that reimporting the first test set properly reports as a duplicate.
+# RUNX: lnt import %t.install %S/Inputs/sample-a-small.plist \
+# RUNX: --commit=1 --show-sample-count | \
+# RUNX: FileCheck -check-prefix=IMPORT-A-2 %s
+#
+# IMPORT-A-2: This submission is a duplicate of run 1
+
+# Run consistency checks on the final database, to validate the import.
+# RUN: python %s %t.install/data/lnt.db
+
+import datetime, sys
+
+from lnt.server.db import testsuite
+from lnt.server.db import v4db
+
+# Load the test database.
+db = v4db.V4DB("sqlite:///%s" % sys.argv[1], echo=True)
+
+# Load the imported test suite.
+ts = db.testsuite['nt']
Added: zorg/trunk/lnt/tests/server/db/Inputs/sample-a-small.plist
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/server/db/Inputs/sample-a-small.plist?rev=146880&view=auto
==============================================================================
--- zorg/trunk/lnt/tests/server/db/Inputs/sample-a-small.plist (added)
+++ zorg/trunk/lnt/tests/server/db/Inputs/sample-a-small.plist Mon Dec 19 11:11:56 2011
@@ -0,0 +1,81 @@
+
+
+
+
+ Machine
+
+ Info
+
+ gcc_version
+ i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646)
+ name
+ smoosh-01
+ os
+ Darwin 10.2.0
+ uname
+ Darwin smoosh-01 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386hardware: i386
+
+ Name
+ LNT SAMPLE MACHINE
+
+ Run
+
+ End Time
+ 2009-11-17 03:44:48
+ Info
+
+ tag
+ nts
+
+ Start Time
+ 2009-11-17 02:12:25
+
+ Tests
+
+
+ Data
+
+ 0
+
+ Info
+
+
+ Name
+ nightlytest.SingleSource/Benchmarks/BenchmarkGame/fannkuch.compile.status
+
+
+ Data
+
+ 0.019
+
+ Info
+
+
+ Name
+ nightlytest.SingleSource/Benchmarks/BenchmarkGame/fannkuch.compile.time
+
+
+ Data
+
+ 0
+
+ Info
+
+
+ Name
+ nightlytest.SingleSource/Benchmarks/BenchmarkGame/fannkuch.exec.status
+
+
+ Data
+
+ 0.3
+
+ Info
+
+
+ Name
+ nightlytest.SingleSource/Benchmarks/BenchmarkGame/fannkuch.exec.time
+
+
+
+
Added: zorg/trunk/lnt/tests/server/db/Inputs/sample-b-small.plist
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/server/db/Inputs/sample-b-small.plist?rev=146880&view=auto
==============================================================================
--- zorg/trunk/lnt/tests/server/db/Inputs/sample-b-small.plist (added)
+++ zorg/trunk/lnt/tests/server/db/Inputs/sample-b-small.plist Mon Dec 19 11:11:56 2011
@@ -0,0 +1,81 @@
+
+
+
+
+ Machine
+
+ Info
+
+ gcc_version
+ i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646)
+ name
+ smoosh-01
+ os
+ Darwin 10.2.0
+ uname
+ Darwin smoosh-01 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386hardware: i386
+
+ Name
+ LNT SAMPLE MACHINE
+
+ Run
+
+ End Time
+ 2009-11-19 03:00:12
+ Info
+
+ tag
+ nts
+
+ Start Time
+ 2009-11-19 01:27:49
+
+ Tests
+
+
+ Data
+
+ 0
+
+ Info
+
+
+ Name
+ nightlytest.SingleSource/Benchmarks/BenchmarkGame/fannkuch.compile.status
+
+
+ Data
+
+ 0.022
+
+ Info
+
+
+ Name
+ nightlytest.SingleSource/Benchmarks/BenchmarkGame/fannkuch.compile.time
+
+
+ Data
+
+ 0
+
+ Info
+
+
+ Name
+ nightlytest.SingleSource/Benchmarks/BenchmarkGame/fannkuch.exec.status
+
+
+ Data
+
+ 0.32
+
+ Info
+
+
+ Name
+ nightlytest.SingleSource/Benchmarks/BenchmarkGame/fannkuch.exec.time
+
+
+
+
From hfinkel at anl.gov Mon Dec 19 11:42:09 2011
From: hfinkel at anl.gov (Hal Finkel)
Date: Mon, 19 Dec 2011 11:42:09 -0600
Subject: [llvm-commits] [PATCH] Allow SelectionDAGBuilder to reorder loads
past stores
Message-ID: <1324316529.31367.96.camel@sapling>
The current SelectionDAGBuilder does not allow loads to be reordered
past stores, and does not allow stores to be reordered. This is a side
effect of the way the critical chain is constructed: there is a queue of
pending loads that is flushed (in parallel) to the root of the chain
upon encountering any store (and that store is also appended to the root
of the chain). Among other things, loop unrolling is far less effective
than it otherwise could be.
The attached patch allows SelectionDAGBuilder to use the available alias
analysis to reorder independent loads and stores. It changes the queue
of pending loads into a more general queue of pending memory operations,
and flushes, in parallel, all potentially-conflicting loads and stores
as necessary.
This can result in a significant performance boost. On my x86_64
machine, the average percentage decrease in execution time is ~8% (to
calculate my performance numbers from the test suite, I've included only
the 174 tests with a base execution time of at least 0.1s; the times of
the shorter tests seem noisy on my machine). Of these, 131 showed a
performance increase and 36 showed a performance decrease.
The top-5 winners were:
MultiSource/Benchmarks/MiBench/consumer-typeset/consumer-typeset - 92%
performance increase ( = runtime decrease)
MultiSource/Benchmarks/llubenchmark/llu - 47% performance increase
MultiSource/Applications/minisat/minisat - 47% performance increase
MultiSource/Benchmarks/sim/sim - 40% performance increase
MultiSource/Benchmarks/Prolangs-C++/life/life - 35.7% performance
increase
The top-5 losers were:
MultiSource/Benchmarks/MiBench/consumer-lame/consumer-lame - 88%
performance decrease
MultiSource/Benchmarks/VersaBench/beamformer/beamformer - 49%
performance decrease
MultiSource/Benchmarks/MallocBench/espresso/espresso 47% performance
decrease
MultiSource/Benchmarks/MiBench/automotive-bitcount/automotive-bitcount -
21% performance decrease
MultiSource/Benchmarks/MiBench/network-patricia/network-patricia - 20%
performance decrease
The patch adds a few new options:
max-parallel-chains - replaces the old MaxParallelChains constant)
max-load-store-reorder - the maximum size of the reorder buffer -
previously it was unlimited, but contained only stores
no-reordering-past-stores - invokes the previous behavior
Some of the regression tests had to be updated because the order of some
stores changed. For most of these, I just updated the test to reflect
the new instruction sequence. The following tests I've marked as XFAIL
because they would require larger changes (and I'd like someone with
more experience than me to make sure that they really are okay and make
any necessary adjustments):
CodeGen/X86/2008-02-22-LocalRegAllocBug.ll
CodeGen/X86/2010-09-17-SideEffectsInChain.ll
CodeGen/X86/lea-recursion.ll
Also, there is one test-suite runtime failure on x86_64:
MultiSource/Benchmarks/Ptrdist/ft/ft
And several test-suite runtime failures on i686:
MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4
SingleSource/Benchmarks/Misc-C++/Large/ray
SingleSource/Benchmarks/Misc-C++/stepanov_container
SingleSource/Benchmarks/Shootout-C++/lists
SingleSource/Benchmarks/Shootout-C++/lists1
SingleSource/Benchmarks/Shootout-C++/sieve
Please review (and help with the test-suite failures).
Thank you in advance,
Hal
--
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm_lsro-20111219.diff
Type: text/x-patch
Size: 24543 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111219/657329d9/attachment.bin
From dpatel at apple.com Mon Dec 19 12:06:02 2011
From: dpatel at apple.com (Devang Patel)
Date: Mon, 19 Dec 2011 10:06:02 -0800
Subject: [llvm-commits] [PATCH] Extend named metadata support in the
LLVM C API
In-Reply-To:
References:
Message-ID:
Andrew,
On Dec 10, 2011, at 11:29 PM, Andrew Wilkins wrote:
> The only reason I can see this change being contentious is due to the removal of LLVMGetNamedMetadataOperands and the change in signature of LLVMGetNamedMetadataNumOperands. I'm not too sure why there was no named metadata type in the C API, and I don't know what the policy of API backwards compatibility is. I hope someone will enlighten me.
We want to preserve backward compatibility in C API as much as possible. So we don't want to remove LLVMGetNamedMetadataOperands or change signature of LLVMGetNamedMetadataNumOperands.
-
Devang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111219/009ba131/attachment.html
From resistor at mac.com Mon Dec 19 12:08:46 2011
From: resistor at mac.com (Owen Anderson)
Date: Mon, 19 Dec 2011 10:08:46 -0800
Subject: [llvm-commits] [PATCH] Allow SelectionDAGBuilder to reorder
loads past stores
In-Reply-To: <1324316529.31367.96.camel@sapling>
References: <1324316529.31367.96.camel@sapling>
Message-ID:
Hal,
How does this compare to the -combiner-alias-analysis and -combiner-global-alias-analysis already in SelectionDAG? I gave the former a try about a year ago, and found that it at least didn't cause things to fail.
--Owen
On Dec 19, 2011, at 9:42 AM, Hal Finkel wrote:
> The current SelectionDAGBuilder does not allow loads to be reordered
> past stores, and does not allow stores to be reordered. This is a side
> effect of the way the critical chain is constructed: there is a queue of
> pending loads that is flushed (in parallel) to the root of the chain
> upon encountering any store (and that store is also appended to the root
> of the chain). Among other things, loop unrolling is far less effective
> than it otherwise could be.
>
> The attached patch allows SelectionDAGBuilder to use the available alias
> analysis to reorder independent loads and stores. It changes the queue
> of pending loads into a more general queue of pending memory operations,
> and flushes, in parallel, all potentially-conflicting loads and stores
> as necessary.
>
> This can result in a significant performance boost. On my x86_64
> machine, the average percentage decrease in execution time is ~8% (to
> calculate my performance numbers from the test suite, I've included only
> the 174 tests with a base execution time of at least 0.1s; the times of
> the shorter tests seem noisy on my machine). Of these, 131 showed a
> performance increase and 36 showed a performance decrease.
>
> The top-5 winners were:
> MultiSource/Benchmarks/MiBench/consumer-typeset/consumer-typeset - 92%
> performance increase ( = runtime decrease)
> MultiSource/Benchmarks/llubenchmark/llu - 47% performance increase
> MultiSource/Applications/minisat/minisat - 47% performance increase
> MultiSource/Benchmarks/sim/sim - 40% performance increase
> MultiSource/Benchmarks/Prolangs-C++/life/life - 35.7% performance
> increase
> The top-5 losers were:
> MultiSource/Benchmarks/MiBench/consumer-lame/consumer-lame - 88%
> performance decrease
> MultiSource/Benchmarks/VersaBench/beamformer/beamformer - 49%
> performance decrease
> MultiSource/Benchmarks/MallocBench/espresso/espresso 47% performance
> decrease
> MultiSource/Benchmarks/MiBench/automotive-bitcount/automotive-bitcount -
> 21% performance decrease
> MultiSource/Benchmarks/MiBench/network-patricia/network-patricia - 20%
> performance decrease
>
> The patch adds a few new options:
> max-parallel-chains - replaces the old MaxParallelChains constant)
> max-load-store-reorder - the maximum size of the reorder buffer -
> previously it was unlimited, but contained only stores
> no-reordering-past-stores - invokes the previous behavior
>
> Some of the regression tests had to be updated because the order of some
> stores changed. For most of these, I just updated the test to reflect
> the new instruction sequence. The following tests I've marked as XFAIL
> because they would require larger changes (and I'd like someone with
> more experience than me to make sure that they really are okay and make
> any necessary adjustments):
> CodeGen/X86/2008-02-22-LocalRegAllocBug.ll
> CodeGen/X86/2010-09-17-SideEffectsInChain.ll
> CodeGen/X86/lea-recursion.ll
>
> Also, there is one test-suite runtime failure on x86_64:
> MultiSource/Benchmarks/Ptrdist/ft/ft
>
> And several test-suite runtime failures on i686:
> MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4
> SingleSource/Benchmarks/Misc-C++/Large/ray
> SingleSource/Benchmarks/Misc-C++/stepanov_container
> SingleSource/Benchmarks/Shootout-C++/lists
> SingleSource/Benchmarks/Shootout-C++/lists1
> SingleSource/Benchmarks/Shootout-C++/sieve
>
> Please review (and help with the test-suite failures).
>
> Thank you in advance,
> Hal
>
> --
> Hal Finkel
> Postdoctoral Appointee
> Leadership Computing Facility
> Argonne National Laboratory
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From grosbach at apple.com Mon Dec 19 12:11:17 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 19 Dec 2011 18:11:17 -0000
Subject: [llvm-commits] [llvm] r146882 -
/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
Message-ID: <20111219181117.EEBE01BE003@llvm.org>
Author: grosbach
Date: Mon Dec 19 12:11:17 2011
New Revision: 146882
URL: http://llvm.org/viewvc/llvm-project?rev=146882&view=rev
Log:
Tidy up.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td?rev=146882&r1=146881&r2=146882&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrNEON.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Mon Dec 19 12:11:17 2011
@@ -994,7 +994,7 @@
let Inst{7-6} = lane{1-0};
}
def VLD3LNd32_UPD : VLD3LNWB<0b1010, {?,0,0,0}, "32"> {
- let Inst{7} = lane{0};
+ let Inst{7} = lane{0};
}
def VLD3LNd8Pseudo_UPD : VLDQQLNWBPseudo;
@@ -1005,7 +1005,7 @@
let Inst{7-6} = lane{1-0};
}
def VLD3LNq32_UPD : VLD3LNWB<0b1010, {?,1,0,0}, "32"> {
- let Inst{7} = lane{0};
+ let Inst{7} = lane{0};
}
def VLD3LNq16Pseudo_UPD : VLDQQQQLNWBPseudo;
@@ -1020,7 +1020,7 @@
"\\{$Vd[$lane], $dst2[$lane], $dst3[$lane], $dst4[$lane]\\}, $Rn",
"$src1 = $Vd, $src2 = $dst2, $src3 = $dst3, $src4 = $dst4", []> {
let Rm = 0b1111;
- let Inst{4} = Rn{4};
+ let Inst{4} = Rn{4};
let DecoderMethod = "DecodeVLD4LN";
}
@@ -1031,7 +1031,7 @@
let Inst{7-6} = lane{1-0};
}
def VLD4LNd32 : VLD4LN<0b1011, {?,0,?,?}, "32"> {
- let Inst{7} = lane{0};
+ let Inst{7} = lane{0};
let Inst{5} = Rn{5};
}
@@ -1044,7 +1044,7 @@
let Inst{7-6} = lane{1-0};
}
def VLD4LNq32 : VLD4LN<0b1011, {?,1,?,?}, "32"> {
- let Inst{7} = lane{0};
+ let Inst{7} = lane{0};
let Inst{5} = Rn{5};
}
@@ -1072,7 +1072,7 @@
let Inst{7-6} = lane{1-0};
}
def VLD4LNd32_UPD : VLD4LNWB<0b1011, {?,0,?,?}, "32"> {
- let Inst{7} = lane{0};
+ let Inst{7} = lane{0};
let Inst{5} = Rn{5};
}
@@ -1084,7 +1084,7 @@
let Inst{7-6} = lane{1-0};
}
def VLD4LNq32_UPD : VLD4LNWB<0b1011, {?,1,?,?}, "32"> {
- let Inst{7} = lane{0};
+ let Inst{7} = lane{0};
let Inst{5} = Rn{5};
}
From grosbach at apple.com Mon Dec 19 12:31:43 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 19 Dec 2011 18:31:43 -0000
Subject: [llvm-commits] [llvm] r146884 - in /llvm/trunk:
lib/Target/ARM/ARMInstrNEON.td lib/Target/ARM/AsmParser/ARMAsmParser.cpp
lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
test/MC/ARM/neon-vld-encoding.s
Message-ID: <20111219183143.D08B21BE003@llvm.org>
Author: grosbach
Date: Mon Dec 19 12:31:43 2011
New Revision: 146884
URL: http://llvm.org/viewvc/llvm-project?rev=146884&view=rev
Log:
ARM NEON relax parse time diagnostics for alignment specifiers.
There's more variation that we need to handle. Error checking will need
to be on operand predicates.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
llvm/trunk/test/MC/ARM/neon-vld-encoding.s
Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td?rev=146884&r1=146883&r2=146884&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrNEON.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Mon Dec 19 12:31:43 2011
@@ -819,12 +819,11 @@
}
def VLD1LNd16 : VLD1LN<0b0100, {?,?,0,?}, "16", v4i16, extloadi16> {
let Inst{7-6} = lane{1-0};
- let Inst{4} = Rn{4};
+ let Inst{5-4} = Rn{5-4};
}
def VLD1LNd32 : VLD1LN32<0b1000, {?,0,?,?}, "32", v2i32, load> {
let Inst{7} = lane{0};
- let Inst{5} = Rn{4};
- let Inst{4} = Rn{4};
+ let Inst{5-4} = Rn{5-4};
}
def VLD1LNq8Pseudo : VLD1QLNPseudo;
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=146884&r1=146883&r2=146884&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Dec 19 12:31:43 2011
@@ -361,7 +361,7 @@
ARM_AM::ShiftOpc ShiftType; // Shift type for OffsetReg
unsigned ShiftImm; // shift for OffsetReg.
unsigned Alignment; // 0 = no alignment specified
- // n = alignment in bytes (8, 16, or 32)
+ // n = alignment in bytes (2, 4, 8, 16, or 32)
unsigned isNegative : 1; // Negated OffsetReg? (~'U' bit)
} Memory;
@@ -3954,7 +3954,10 @@
unsigned Align = 0;
switch (CE->getValue()) {
default:
- return Error(E, "alignment specifier must be 64, 128, or 256 bits");
+ return Error(E,
+ "alignment specifier must be 16, 32, 64, 128, or 256 bits");
+ case 16: Align = 2; break;
+ case 32: Align = 4; break;
case 64: Align = 8; break;
case 128: Align = 16; break;
case 256: Align = 32; break;
Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp?rev=146884&r1=146883&r2=146884&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp Mon Dec 19 12:31:43 2011
@@ -1372,11 +1372,11 @@
switch (Imm.getImm()) {
default: break;
- case 2:
- case 4:
case 8:
- case 16: Align = 0x00; break;
- case 32: Align = 0x03; break;
+ case 16:
+ case 32: // Default '0' value for invalid alignments of 8, 16, 32 bytes.
+ case 2: Align = 0x00; break;
+ case 4: Align = 0x03; break;
}
return RegNo | (Align << 4);
Modified: llvm/trunk/test/MC/ARM/neon-vld-encoding.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/neon-vld-encoding.s?rev=146884&r1=146883&r2=146884&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/neon-vld-encoding.s (original)
+++ llvm/trunk/test/MC/ARM/neon-vld-encoding.s Mon Dec 19 12:31:43 2011
@@ -211,24 +211,24 @@
@ CHECK: vld1.8 {d4[], d5[]}, [r1], r3 @ encoding: [0x23,0x4c,0xa1,0xf4]
vld1.8 {d16[3]}, [r0]
-@ vld1.16 {d16[2]}, [r0, :16]
-@ vld1.32 {d16[1]}, [r0, :32]
+ vld1.16 {d16[2]}, [r0, :16]
+ vld1.32 {d16[1]}, [r0, :32]
vld1.p8 d12[6], [r2]!
vld1.i8 d12[6], [r2], r2
vld1.u16 d12[3], [r2]!
vld1.16 d12[2], [r2], r2
@ CHECK: vld1.8 {d16[3]}, [r0] @ encoding: [0x6f,0x00,0xe0,0xf4]
-@ FIXME: vld1.16 {d16[2]}, [r0, :16] @ encoding: [0x9f,0x04,0xe0,0xf4]
-@ FIXME: vld1.32 {d16[1]}, [r0, :32] @ encoding: [0xbf,0x08,0xe0,0xf4]
+@ CHECK: vld1.16 {d16[2]}, [r0, :16] @ encoding: [0x9f,0x04,0xe0,0xf4]
+@ CHECK: vld1.32 {d16[1]}, [r0, :32] @ encoding: [0xbf,0x08,0xe0,0xf4]
@ CHECK: vld1.8 {d12[6]}, [r2]! @ encoding: [0xcd,0xc0,0xa2,0xf4]
@ CHECK: vld1.8 {d12[6]}, [r2], r2 @ encoding: [0xc2,0xc0,0xa2,0xf4]
@ CHECK: vld1.16 {d12[3]}, [r2]! @ encoding: [0xcd,0xc4,0xa2,0xf4]
@ CHECK: vld1.16 {d12[2]}, [r2], r2 @ encoding: [0x82,0xc4,0xa2,0xf4]
-@ vld2.8 {d16[1], d17[1]}, [r0, :16]
-@ vld2.16 {d16[1], d17[1]}, [r0, :32]
+ vld2.8 {d16[1], d17[1]}, [r0, :16]
+ vld2.16 {d16[1], d17[1]}, [r0, :32]
vld2.32 {d16[1], d17[1]}, [r0]
@ vld2.16 {d17[1], d19[1]}, [r0]
@ vld2.32 {d17[0], d19[0]}, [r0, :64]
@@ -236,8 +236,8 @@
vld2.8 {d2[4], d3[4]}, [r2]!
vld2.8 {d2[4], d3[4]}, [r2]
-@ FIXME: vld2.8 {d16[1], d17[1]}, [r0, :16] @ encoding: [0x3f,0x01,0xe0,0xf4]
-@ FIXME: vld2.16 {d16[1], d17[1]}, [r0, :32] @ encoding: [0x5f,0x05,0xe0,0xf4]
+@ CHECK: vld2.8 {d16[1], d17[1]}, [r0, :16] @ encoding: [0x3f,0x01,0xe0,0xf4]
+@ CHECK: vld2.16 {d16[1], d17[1]}, [r0, :32] @ encoding: [0x5f,0x05,0xe0,0xf4]
@ CHECK: vld2.32 {d16[1], d17[1]}, [r0] @ encoding: [0x8f,0x09,0xe0,0xf4]
@ FIXME: vld2.16 {d17[1], d19[1]}, [r0] @ encoding: [0x6f,0x15,0xe0,0xf4]
@ FIXME: vld2.32 {d17[0], d19[0]}, [r0, :64] @ encoding: [0x5f,0x19,0xe0,0xf4]
From evan.cheng at apple.com Mon Dec 19 12:52:49 2011
From: evan.cheng at apple.com (Evan Cheng)
Date: Mon, 19 Dec 2011 10:52:49 -0800
Subject: [llvm-commits] [PATCH] Allow SelectionDAGBuilder to reorder
loads past stores
In-Reply-To: <1324316529.31367.96.camel@sapling>
References: <1324316529.31367.96.camel@sapling>
Message-ID: <945273C4-D0AA-4CAF-B0ED-C6D96A52FE02@apple.com>
Hi Hal,
IMHO, this is the wrong way to fix this problem. The fundamental issue here is SelectionDAG is being used by the pre-RA scheduler so the conservative DAG building can have a significant impact on the schedule and the performance of generated code. Changing SelectionDAGBuilder to relax this is one way to go about this. But as you can tell, the current scheduler is not quite ready for this and you can see some large performance regressions.
We have long understood the current scheduling strategy is wrong. The plan for 2012 is to add a MachineInstr pre-RA scheduler and leave SelectionDAG for legalizer and dag combine. The new scheduler will probably use aliasing information to reorder loads / stores.
The problem with changing SelectionDAGBuilder is this can negatively impact optimizations done during dag combine and legalization. So as it is the patch should not be enabled by default. At best, it can be committed but turned off. Do you have a good understanding what caused the severe regressions you have identified?
Evan
On Dec 19, 2011, at 9:42 AM, Hal Finkel wrote:
> The current SelectionDAGBuilder does not allow loads to be reordered
> past stores, and does not allow stores to be reordered. This is a side
> effect of the way the critical chain is constructed: there is a queue of
> pending loads that is flushed (in parallel) to the root of the chain
> upon encountering any store (and that store is also appended to the root
> of the chain). Among other things, loop unrolling is far less effective
> than it otherwise could be.
>
> The attached patch allows SelectionDAGBuilder to use the available alias
> analysis to reorder independent loads and stores. It changes the queue
> of pending loads into a more general queue of pending memory operations,
> and flushes, in parallel, all potentially-conflicting loads and stores
> as necessary.
>
> This can result in a significant performance boost. On my x86_64
> machine, the average percentage decrease in execution time is ~8% (to
> calculate my performance numbers from the test suite, I've included only
> the 174 tests with a base execution time of at least 0.1s; the times of
> the shorter tests seem noisy on my machine). Of these, 131 showed a
> performance increase and 36 showed a performance decrease.
>
> The top-5 winners were:
> MultiSource/Benchmarks/MiBench/consumer-typeset/consumer-typeset - 92%
> performance increase ( = runtime decrease)
> MultiSource/Benchmarks/llubenchmark/llu - 47% performance increase
> MultiSource/Applications/minisat/minisat - 47% performance increase
> MultiSource/Benchmarks/sim/sim - 40% performance increase
> MultiSource/Benchmarks/Prolangs-C++/life/life - 35.7% performance
> increase
> The top-5 losers were:
> MultiSource/Benchmarks/MiBench/consumer-lame/consumer-lame - 88%
> performance decrease
> MultiSource/Benchmarks/VersaBench/beamformer/beamformer - 49%
> performance decrease
> MultiSource/Benchmarks/MallocBench/espresso/espresso 47% performance
> decrease
> MultiSource/Benchmarks/MiBench/automotive-bitcount/automotive-bitcount -
> 21% performance decrease
> MultiSource/Benchmarks/MiBench/network-patricia/network-patricia - 20%
> performance decrease
>
> The patch adds a few new options:
> max-parallel-chains - replaces the old MaxParallelChains constant)
> max-load-store-reorder - the maximum size of the reorder buffer -
> previously it was unlimited, but contained only stores
> no-reordering-past-stores - invokes the previous behavior
>
> Some of the regression tests had to be updated because the order of some
> stores changed. For most of these, I just updated the test to reflect
> the new instruction sequence. The following tests I've marked as XFAIL
> because they would require larger changes (and I'd like someone with
> more experience than me to make sure that they really are okay and make
> any necessary adjustments):
> CodeGen/X86/2008-02-22-LocalRegAllocBug.ll
> CodeGen/X86/2010-09-17-SideEffectsInChain.ll
> CodeGen/X86/lea-recursion.ll
>
> Also, there is one test-suite runtime failure on x86_64:
> MultiSource/Benchmarks/Ptrdist/ft/ft
>
> And several test-suite runtime failures on i686:
> MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4
> SingleSource/Benchmarks/Misc-C++/Large/ray
> SingleSource/Benchmarks/Misc-C++/stepanov_container
> SingleSource/Benchmarks/Shootout-C++/lists
> SingleSource/Benchmarks/Shootout-C++/lists1
> SingleSource/Benchmarks/Shootout-C++/sieve
>
> Please review (and help with the test-suite failures).
>
> Thank you in advance,
> Hal
>
> --
> Hal Finkel
> Postdoctoral Appointee
> Leadership Computing Facility
> Argonne National Laboratory
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From grosbach at apple.com Mon Dec 19 12:57:38 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 19 Dec 2011 18:57:38 -0000
Subject: [llvm-commits] [llvm] r146885 - in /llvm/trunk:
lib/Target/ARM/ARMInstrNEON.td test/MC/ARM/neon-minmax-encoding.s
test/MC/ARM/neont2-minmax-encoding.s
Message-ID: <20111219185738.57C591BE003@llvm.org>
Author: grosbach
Date: Mon Dec 19 12:57:38 2011
New Revision: 146885
URL: http://llvm.org/viewvc/llvm-project?rev=146885&view=rev
Log:
ARM NEON implied destination aliases for VMAX/VMIN.
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
llvm/trunk/test/MC/ARM/neon-minmax-encoding.s
llvm/trunk/test/MC/ARM/neont2-minmax-encoding.s
Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td?rev=146885&r1=146884&r2=146885&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrNEON.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Mon Dec 19 12:57:38 2011
@@ -5877,6 +5877,68 @@
def : NEONInstAlias<"vqdmulh${p}.s32 $Vdn, $Vm",
(VQDMULHv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+// Two-operand variants for VMAX.
+def : NEONInstAlias<"vmax${p}.s8 $Vdn, $Vm",
+ (VMAXsv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmax${p}.s16 $Vdn, $Vm",
+ (VMAXsv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmax${p}.s32 $Vdn, $Vm",
+ (VMAXsv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmax${p}.u8 $Vdn, $Vm",
+ (VMAXuv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmax${p}.u16 $Vdn, $Vm",
+ (VMAXuv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmax${p}.u32 $Vdn, $Vm",
+ (VMAXuv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmax${p}.f32 $Vdn, $Vm",
+ (VMAXfd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+
+def : NEONInstAlias<"vmax${p}.s8 $Vdn, $Vm",
+ (VMAXsv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmax${p}.s16 $Vdn, $Vm",
+ (VMAXsv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmax${p}.s32 $Vdn, $Vm",
+ (VMAXsv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmax${p}.u8 $Vdn, $Vm",
+ (VMAXuv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmax${p}.u16 $Vdn, $Vm",
+ (VMAXuv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmax${p}.u32 $Vdn, $Vm",
+ (VMAXuv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmax${p}.f32 $Vdn, $Vm",
+ (VMAXfq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+
+// Two-operand variants for VMIN.
+def : NEONInstAlias<"vmin${p}.s8 $Vdn, $Vm",
+ (VMINsv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmin${p}.s16 $Vdn, $Vm",
+ (VMINsv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmin${p}.s32 $Vdn, $Vm",
+ (VMINsv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmin${p}.u8 $Vdn, $Vm",
+ (VMINuv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmin${p}.u16 $Vdn, $Vm",
+ (VMINuv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmin${p}.u32 $Vdn, $Vm",
+ (VMINuv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmin${p}.f32 $Vdn, $Vm",
+ (VMINfd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+
+def : NEONInstAlias<"vmin${p}.s8 $Vdn, $Vm",
+ (VMINsv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmin${p}.s16 $Vdn, $Vm",
+ (VMINsv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmin${p}.s32 $Vdn, $Vm",
+ (VMINsv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmin${p}.u8 $Vdn, $Vm",
+ (VMINuv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmin${p}.u16 $Vdn, $Vm",
+ (VMINuv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmin${p}.u32 $Vdn, $Vm",
+ (VMINuv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vmin${p}.f32 $Vdn, $Vm",
+ (VMINfq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+
// 'gas' compatibility aliases for quad-word instructions. Strictly speaking,
// these should restrict to just the Q register variants, but the register
// classes are enough to match correctly regardless, so we keep it simple
Modified: llvm/trunk/test/MC/ARM/neon-minmax-encoding.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/neon-minmax-encoding.s?rev=146885&r1=146884&r2=146885&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/neon-minmax-encoding.s (original)
+++ llvm/trunk/test/MC/ARM/neon-minmax-encoding.s Mon Dec 19 12:57:38 2011
@@ -1,58 +1,124 @@
@ RUN: llvm-mc -mcpu=cortex-a8 -triple arm-unknown-unknown -show-encoding < %s | FileCheck %s
-@ CHECK: vmin.s8 d16, d16, d17 @ encoding: [0xb1,0x06,0x40,0xf2]
- vmin.s8 d16, d16, d17
-@ CHECK: vmin.s16 d16, d16, d17 @ encoding: [0xb1,0x06,0x50,0xf2]
- vmin.s16 d16, d16, d17
-@ CHECK: vmin.s32 d16, d16, d17 @ encoding: [0xb1,0x06,0x60,0xf2]
- vmin.s32 d16, d16, d17
-@ CHECK: vmin.u8 d16, d16, d17 @ encoding: [0xb1,0x06,0x40,0xf3]
- vmin.u8 d16, d16, d17
-@ CHECK: vmin.u16 d16, d16, d17 @ encoding: [0xb1,0x06,0x50,0xf3]
- vmin.u16 d16, d16, d17
-@ CHECK: vmin.u32 d16, d16, d17 @ encoding: [0xb1,0x06,0x60,0xf3]
- vmin.u32 d16, d16, d17
-@ CHECK: vmin.f32 d16, d16, d17 @ encoding: [0xa1,0x0f,0x60,0xf2]
- vmin.f32 d16, d16, d17
-@ CHECK: vmin.s8 q8, q8, q9 @ encoding: [0xf2,0x06,0x40,0xf2]
- vmin.s8 q8, q8, q9
-@ CHECK: vmin.s16 q8, q8, q9 @ encoding: [0xf2,0x06,0x50,0xf2]
- vmin.s16 q8, q8, q9
-@ CHECK: vmin.s32 q8, q8, q9 @ encoding: [0xf2,0x06,0x60,0xf2]
- vmin.s32 q8, q8, q9
-@ CHECK: vmin.u8 q8, q8, q9 @ encoding: [0xf2,0x06,0x40,0xf3]
- vmin.u8 q8, q8, q9
-@ CHECK: vmin.u16 q8, q8, q9 @ encoding: [0xf2,0x06,0x50,0xf3]
- vmin.u16 q8, q8, q9
-@ CHECK: vmin.u32 q8, q8, q9 @ encoding: [0xf2,0x06,0x60,0xf3]
- vmin.u32 q8, q8, q9
-@ CHECK: vmin.f32 q8, q8, q9 @ encoding: [0xe2,0x0f,0x60,0xf2]
- vmin.f32 q8, q8, q9
-@ CHECK: vmax.s8 d16, d16, d17 @ encoding: [0xa1,0x06,0x40,0xf2]
- vmax.s8 d16, d16, d17
-@ CHECK: vmax.s16 d16, d16, d17 @ encoding: [0xa1,0x06,0x50,0xf2]
- vmax.s16 d16, d16, d17
-@ CHECK: vmax.s32 d16, d16, d17 @ encoding: [0xa1,0x06,0x60,0xf2]
- vmax.s32 d16, d16, d17
-@ CHECK: vmax.u8 d16, d16, d17 @ encoding: [0xa1,0x06,0x40,0xf3]
- vmax.u8 d16, d16, d17
-@ CHECK: vmax.u16 d16, d16, d17 @ encoding: [0xa1,0x06,0x50,0xf3]
- vmax.u16 d16, d16, d17
-@ CHECK: vmax.u32 d16, d16, d17 @ encoding: [0xa1,0x06,0x60,0xf3]
- vmax.u32 d16, d16, d17
-@ CHECK: vmax.f32 d16, d16, d17 @ encoding: [0xa1,0x0f,0x40,0xf2]
- vmax.f32 d16, d16, d17
-@ CHECK: vmax.s8 q8, q8, q9 @ encoding: [0xe2,0x06,0x40,0xf2]
- vmax.s8 q8, q8, q9
-@ CHECK: vmax.s16 q8, q8, q9 @ encoding: [0xe2,0x06,0x50,0xf2]
- vmax.s16 q8, q8, q9
+ vmax.s8 d1, d2, d3
+ vmax.s16 d4, d5, d6
+ vmax.s32 d7, d8, d9
+ vmax.u8 d10, d11, d12
+ vmax.u16 d13, d14, d15
+ vmax.u32 d16, d17, d18
+ vmax.f32 d19, d20, d21
+
+ vmax.s8 d2, d3
+ vmax.s16 d5, d6
+ vmax.s32 d8, d9
+ vmax.u8 d11, d12
+ vmax.u16 d14, d15
+ vmax.u32 d17, d18
+ vmax.f32 d20, d21
+
+ vmax.s8 q1, q2, q3
+ vmax.s16 q4, q5, q6
+ vmax.s32 q7, q8, q9
+ vmax.u8 q10, q11, q12
+ vmax.u16 q13, q14, q15
+ vmax.u32 q6, q7, q8
+ vmax.f32 q9, q5, q1
+
+ vmax.s8 q2, q3
+ vmax.s16 q5, q6
+ vmax.s32 q8, q9
+ vmax.u8 q11, q2
+ vmax.u16 q4, q5
+ vmax.u32 q7, q8
+ vmax.f32 q2, q1
+
+@ CHECK: vmax.s8 d1, d2, d3 @ encoding: [0x03,0x16,0x02,0xf2]
+@ CHECK: vmax.s16 d4, d5, d6 @ encoding: [0x06,0x46,0x15,0xf2]
+@ CHECK: vmax.s32 d7, d8, d9 @ encoding: [0x09,0x76,0x28,0xf2]
+@ CHECK: vmax.u8 d10, d11, d12 @ encoding: [0x0c,0xa6,0x0b,0xf3]
+@ CHECK: vmax.u16 d13, d14, d15 @ encoding: [0x0f,0xd6,0x1e,0xf3]
+@ CHECK: vmax.u32 d16, d17, d18 @ encoding: [0xa2,0x06,0x61,0xf3]
+@ CHECK: vmax.f32 d19, d20, d21 @ encoding: [0xa5,0x3f,0x44,0xf2]
+@ CHECK: vmax.s8 d2, d2, d3 @ encoding: [0x03,0x26,0x02,0xf2]
+@ CHECK: vmax.s16 d5, d5, d6 @ encoding: [0x06,0x56,0x15,0xf2]
+@ CHECK: vmax.s32 d8, d8, d9 @ encoding: [0x09,0x86,0x28,0xf2]
+@ CHECK: vmax.u8 d11, d11, d12 @ encoding: [0x0c,0xb6,0x0b,0xf3]
+@ CHECK: vmax.u16 d14, d14, d15 @ encoding: [0x0f,0xe6,0x1e,0xf3]
+@ CHECK: vmax.u32 d17, d17, d18 @ encoding: [0xa2,0x16,0x61,0xf3]
+@ CHECK: vmax.f32 d20, d20, d21 @ encoding: [0xa5,0x4f,0x44,0xf2]
+@ CHECK: vmax.s8 q1, q2, q3 @ encoding: [0x46,0x26,0x04,0xf2]
+@ CHECK: vmax.s16 q4, q5, q6 @ encoding: [0x4c,0x86,0x1a,0xf2]
+@ CHECK: vmax.s32 q7, q8, q9 @ encoding: [0xe2,0xe6,0x20,0xf2]
+@ CHECK: vmax.u8 q10, q11, q12 @ encoding: [0xe8,0x46,0x46,0xf3]
+@ CHECK: vmax.u16 q13, q14, q15 @ encoding: [0xee,0xa6,0x5c,0xf3]
+@ CHECK: vmax.u32 q6, q7, q8 @ encoding: [0x60,0xc6,0x2e,0xf3]
+@ CHECK: vmax.f32 q9, q5, q1 @ encoding: [0x42,0x2f,0x4a,0xf2]
+@ CHECK: vmax.s8 q2, q2, q3 @ encoding: [0x46,0x46,0x04,0xf2]
+@ CHECK: vmax.s16 q5, q5, q6 @ encoding: [0x4c,0xa6,0x1a,0xf2]
@ CHECK: vmax.s32 q8, q8, q9 @ encoding: [0xe2,0x06,0x60,0xf2]
- vmax.s32 q8, q8, q9
-@ CHECK: vmax.u8 q8, q8, q9 @ encoding: [0xe2,0x06,0x40,0xf3]
- vmax.u8 q8, q8, q9
-@ CHECK: vmax.u16 q8, q8, q9 @ encoding: [0xe2,0x06,0x50,0xf3]
- vmax.u16 q8, q8, q9
-@ CHECK: vmax.u32 q8, q8, q9 @ encoding: [0xe2,0x06,0x60,0xf3]
- vmax.u32 q8, q8, q9
-@ CHECK: vmax.f32 q8, q8, q9 @ encoding: [0xe2,0x0f,0x40,0xf2]
- vmax.f32 q8, q8, q9
+@ CHECK: vmax.u8 q11, q11, q2 @ encoding: [0xc4,0x66,0x46,0xf3]
+@ CHECK: vmax.u16 q4, q4, q5 @ encoding: [0x4a,0x86,0x18,0xf3]
+@ CHECK: vmax.u32 q7, q7, q8 @ encoding: [0x60,0xe6,0x2e,0xf3]
+@ CHECK: vmax.f32 q2, q2, q1 @ encoding: [0x42,0x4f,0x04,0xf2]
+
+
+ vmin.s8 d1, d2, d3
+ vmin.s16 d4, d5, d6
+ vmin.s32 d7, d8, d9
+ vmin.u8 d10, d11, d12
+ vmin.u16 d13, d14, d15
+ vmin.u32 d16, d17, d18
+ vmin.f32 d19, d20, d21
+
+ vmin.s8 d2, d3
+ vmin.s16 d5, d6
+ vmin.s32 d8, d9
+ vmin.u8 d11, d12
+ vmin.u16 d14, d15
+ vmin.u32 d17, d18
+ vmin.f32 d20, d21
+
+ vmin.s8 q1, q2, q3
+ vmin.s16 q4, q5, q6
+ vmin.s32 q7, q8, q9
+ vmin.u8 q10, q11, q12
+ vmin.u16 q13, q14, q15
+ vmin.u32 q6, q7, q8
+ vmin.f32 q9, q5, q1
+
+ vmin.s8 q2, q3
+ vmin.s16 q5, q6
+ vmin.s32 q8, q9
+ vmin.u8 q11, q2
+ vmin.u16 q4, q5
+ vmin.u32 q7, q8
+ vmin.f32 q2, q1
+
+@ CHECK: vmin.s8 d1, d2, d3 @ encoding: [0x13,0x16,0x02,0xf2]
+@ CHECK: vmin.s16 d4, d5, d6 @ encoding: [0x16,0x46,0x15,0xf2]
+@ CHECK: vmin.s32 d7, d8, d9 @ encoding: [0x19,0x76,0x28,0xf2]
+@ CHECK: vmin.u8 d10, d11, d12 @ encoding: [0x1c,0xa6,0x0b,0xf3]
+@ CHECK: vmin.u16 d13, d14, d15 @ encoding: [0x1f,0xd6,0x1e,0xf3]
+@ CHECK: vmin.u32 d16, d17, d18 @ encoding: [0xb2,0x06,0x61,0xf3]
+@ CHECK: vmin.f32 d19, d20, d21 @ encoding: [0xa5,0x3f,0x64,0xf2]
+@ CHECK: vmin.s8 d2, d2, d3 @ encoding: [0x13,0x26,0x02,0xf2]
+@ CHECK: vmin.s16 d5, d5, d6 @ encoding: [0x16,0x56,0x15,0xf2]
+@ CHECK: vmin.s32 d8, d8, d9 @ encoding: [0x19,0x86,0x28,0xf2]
+@ CHECK: vmin.u8 d11, d11, d12 @ encoding: [0x1c,0xb6,0x0b,0xf3]
+@ CHECK: vmin.u16 d14, d14, d15 @ encoding: [0x1f,0xe6,0x1e,0xf3]
+@ CHECK: vmin.u32 d17, d17, d18 @ encoding: [0xb2,0x16,0x61,0xf3]
+@ CHECK: vmin.f32 d20, d20, d21 @ encoding: [0xa5,0x4f,0x64,0xf2]
+@ CHECK: vmin.s8 q1, q2, q3 @ encoding: [0x56,0x26,0x04,0xf2]
+@ CHECK: vmin.s16 q4, q5, q6 @ encoding: [0x5c,0x86,0x1a,0xf2]
+@ CHECK: vmin.s32 q7, q8, q9 @ encoding: [0xf2,0xe6,0x20,0xf2]
+@ CHECK: vmin.u8 q10, q11, q12 @ encoding: [0xf8,0x46,0x46,0xf3]
+@ CHECK: vmin.u16 q13, q14, q15 @ encoding: [0xfe,0xa6,0x5c,0xf3]
+@ CHECK: vmin.u32 q6, q7, q8 @ encoding: [0x70,0xc6,0x2e,0xf3]
+@ CHECK: vmin.f32 q9, q5, q1 @ encoding: [0x42,0x2f,0x6a,0xf2]
+@ CHECK: vmin.s8 q2, q2, q3 @ encoding: [0x56,0x46,0x04,0xf2]
+@ CHECK: vmin.s16 q5, q5, q6 @ encoding: [0x5c,0xa6,0x1a,0xf2]
+@ CHECK: vmin.s32 q8, q8, q9 @ encoding: [0xf2,0x06,0x60,0xf2]
+@ CHECK: vmin.u8 q11, q11, q2 @ encoding: [0xd4,0x66,0x46,0xf3]
+@ CHECK: vmin.u16 q4, q4, q5 @ encoding: [0x5a,0x86,0x18,0xf3]
+@ CHECK: vmin.u32 q7, q7, q8 @ encoding: [0x70,0xe6,0x2e,0xf3]
+@ CHECK: vmin.f32 q2, q2, q1 @ encoding: [0x42,0x4f,0x24,0xf2]
Modified: llvm/trunk/test/MC/ARM/neont2-minmax-encoding.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/neont2-minmax-encoding.s?rev=146885&r1=146884&r2=146885&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/neont2-minmax-encoding.s (original)
+++ llvm/trunk/test/MC/ARM/neont2-minmax-encoding.s Mon Dec 19 12:57:38 2011
@@ -2,59 +2,125 @@
.code 16
-@ CHECK: vmin.s8 d16, d16, d17 @ encoding: [0x40,0xef,0xb1,0x06]
- vmin.s8 d16, d16, d17
-@ CHECK: vmin.s16 d16, d16, d17 @ encoding: [0x50,0xef,0xb1,0x06]
- vmin.s16 d16, d16, d17
-@ CHECK: vmin.s32 d16, d16, d17 @ encoding: [0x60,0xef,0xb1,0x06]
- vmin.s32 d16, d16, d17
-@ CHECK: vmin.u8 d16, d16, d17 @ encoding: [0x40,0xff,0xb1,0x06]
- vmin.u8 d16, d16, d17
-@ CHECK: vmin.u16 d16, d16, d17 @ encoding: [0x50,0xff,0xb1,0x06]
- vmin.u16 d16, d16, d17
-@ CHECK: vmin.u32 d16, d16, d17 @ encoding: [0x60,0xff,0xb1,0x06]
- vmin.u32 d16, d16, d17
-@ CHECK: vmin.f32 d16, d16, d17 @ encoding: [0x60,0xef,0xa1,0x0f]
- vmin.f32 d16, d16, d17
-@ CHECK: vmin.s8 q8, q8, q9 @ encoding: [0x40,0xef,0xf2,0x06]
- vmin.s8 q8, q8, q9
-@ CHECK: vmin.s16 q8, q8, q9 @ encoding: [0x50,0xef,0xf2,0x06]
- vmin.s16 q8, q8, q9
-@ CHECK: vmin.s32 q8, q8, q9 @ encoding: [0x60,0xef,0xf2,0x06]
- vmin.s32 q8, q8, q9
-@ CHECK: vmin.u8 q8, q8, q9 @ encoding: [0x40,0xff,0xf2,0x06]
- vmin.u8 q8, q8, q9
-@ CHECK: vmin.u16 q8, q8, q9 @ encoding: [0x50,0xff,0xf2,0x06]
- vmin.u16 q8, q8, q9
-@ CHECK: vmin.u32 q8, q8, q9 @ encoding: [0x60,0xff,0xf2,0x06]
- vmin.u32 q8, q8, q9
-@ CHECK: vmin.f32 q8, q8, q9 @ encoding: [0x60,0xef,0xe2,0x0f]
- vmin.f32 q8, q8, q9
-@ CHECK: vmax.s8 d16, d16, d17 @ encoding: [0x40,0xef,0xa1,0x06]
- vmax.s8 d16, d16, d17
-@ CHECK: vmax.s16 d16, d16, d17 @ encoding: [0x50,0xef,0xa1,0x06]
- vmax.s16 d16, d16, d17
-@ CHECK: vmax.s32 d16, d16, d17 @ encoding: [0x60,0xef,0xa1,0x06]
- vmax.s32 d16, d16, d17
-@ CHECK: vmax.u8 d16, d16, d17 @ encoding: [0x40,0xff,0xa1,0x06]
- vmax.u8 d16, d16, d17
-@ CHECK: vmax.u16 d16, d16, d17 @ encoding: [0x50,0xff,0xa1,0x06]
- vmax.u16 d16, d16, d17
-@ CHECK: vmax.u32 d16, d16, d17 @ encoding: [0x60,0xff,0xa1,0x06]
- vmax.u32 d16, d16, d17
-@ CHECK: vmax.f32 d16, d16, d17 @ encoding: [0x40,0xef,0xa1,0x0f]
- vmax.f32 d16, d16, d17
-@ CHECK: vmax.s8 q8, q8, q9 @ encoding: [0x40,0xef,0xe2,0x06]
- vmax.s8 q8, q8, q9
-@ CHECK: vmax.s16 q8, q8, q9 @ encoding: [0x50,0xef,0xe2,0x06]
- vmax.s16 q8, q8, q9
+ vmax.s8 d1, d2, d3
+ vmax.s16 d4, d5, d6
+ vmax.s32 d7, d8, d9
+ vmax.u8 d10, d11, d12
+ vmax.u16 d13, d14, d15
+ vmax.u32 d16, d17, d18
+ vmax.f32 d19, d20, d21
+
+ vmax.s8 d2, d3
+ vmax.s16 d5, d6
+ vmax.s32 d8, d9
+ vmax.u8 d11, d12
+ vmax.u16 d14, d15
+ vmax.u32 d17, d18
+ vmax.f32 d20, d21
+
+ vmax.s8 q1, q2, q3
+ vmax.s16 q4, q5, q6
+ vmax.s32 q7, q8, q9
+ vmax.u8 q10, q11, q12
+ vmax.u16 q13, q14, q15
+ vmax.u32 q6, q7, q8
+ vmax.f32 q9, q5, q1
+
+ vmax.s8 q2, q3
+ vmax.s16 q5, q6
+ vmax.s32 q8, q9
+ vmax.u8 q11, q2
+ vmax.u16 q4, q5
+ vmax.u32 q7, q8
+ vmax.f32 q2, q1
+
+@ CHECK: vmax.s8 d1, d2, d3 @ encoding: [0x02,0xef,0x03,0x16]
+@ CHECK: vmax.s16 d4, d5, d6 @ encoding: [0x15,0xef,0x06,0x46]
+@ CHECK: vmax.s32 d7, d8, d9 @ encoding: [0x28,0xef,0x09,0x76]
+@ CHECK: vmax.u8 d10, d11, d12 @ encoding: [0x0b,0xff,0x0c,0xa6]
+@ CHECK: vmax.u16 d13, d14, d15 @ encoding: [0x1e,0xff,0x0f,0xd6]
+@ CHECK: vmax.u32 d16, d17, d18 @ encoding: [0x61,0xff,0xa2,0x06]
+@ CHECK: vmax.f32 d19, d20, d21 @ encoding: [0x44,0xef,0xa5,0x3f]
+@ CHECK: vmax.s8 d2, d2, d3 @ encoding: [0x02,0xef,0x03,0x26]
+@ CHECK: vmax.s16 d5, d5, d6 @ encoding: [0x15,0xef,0x06,0x56]
+@ CHECK: vmax.s32 d8, d8, d9 @ encoding: [0x28,0xef,0x09,0x86]
+@ CHECK: vmax.u8 d11, d11, d12 @ encoding: [0x0b,0xff,0x0c,0xb6]
+@ CHECK: vmax.u16 d14, d14, d15 @ encoding: [0x1e,0xff,0x0f,0xe6]
+@ CHECK: vmax.u32 d17, d17, d18 @ encoding: [0x61,0xff,0xa2,0x16]
+@ CHECK: vmax.f32 d20, d20, d21 @ encoding: [0x44,0xef,0xa5,0x4f]
+@ CHECK: vmax.s8 q1, q2, q3 @ encoding: [0x04,0xef,0x46,0x26]
+@ CHECK: vmax.s16 q4, q5, q6 @ encoding: [0x1a,0xef,0x4c,0x86]
+@ CHECK: vmax.s32 q7, q8, q9 @ encoding: [0x20,0xef,0xe2,0xe6]
+@ CHECK: vmax.u8 q10, q11, q12 @ encoding: [0x46,0xff,0xe8,0x46]
+@ CHECK: vmax.u16 q13, q14, q15 @ encoding: [0x5c,0xff,0xee,0xa6]
+@ CHECK: vmax.u32 q6, q7, q8 @ encoding: [0x2e,0xff,0x60,0xc6]
+@ CHECK: vmax.f32 q9, q5, q1 @ encoding: [0x4a,0xef,0x42,0x2f]
+@ CHECK: vmax.s8 q2, q2, q3 @ encoding: [0x04,0xef,0x46,0x46]
+@ CHECK: vmax.s16 q5, q5, q6 @ encoding: [0x1a,0xef,0x4c,0xa6]
@ CHECK: vmax.s32 q8, q8, q9 @ encoding: [0x60,0xef,0xe2,0x06]
- vmax.s32 q8, q8, q9
-@ CHECK: vmax.u8 q8, q8, q9 @ encoding: [0x40,0xff,0xe2,0x06]
- vmax.u8 q8, q8, q9
-@ CHECK: vmax.u16 q8, q8, q9 @ encoding: [0x50,0xff,0xe2,0x06]
- vmax.u16 q8, q8, q9
-@ CHECK: vmax.u32 q8, q8, q9 @ encoding: [0x60,0xff,0xe2,0x06]
- vmax.u32 q8, q8, q9
-@ CHECK: vmax.f32 q8, q8, q9 @ encoding: [0x40,0xef,0xe2,0x0f]
- vmax.f32 q8, q8, q9
+@ CHECK: vmax.u8 q11, q11, q2 @ encoding: [0x46,0xff,0xc4,0x66]
+@ CHECK: vmax.u16 q4, q4, q5 @ encoding: [0x18,0xff,0x4a,0x86]
+@ CHECK: vmax.u32 q7, q7, q8 @ encoding: [0x2e,0xff,0x60,0xe6]
+@ CHECK: vmax.f32 q2, q2, q1 @ encoding: [0x04,0xef,0x42,0x4f]
+
+
+ vmin.s8 d1, d2, d3
+ vmin.s16 d4, d5, d6
+ vmin.s32 d7, d8, d9
+ vmin.u8 d10, d11, d12
+ vmin.u16 d13, d14, d15
+ vmin.u32 d16, d17, d18
+ vmin.f32 d19, d20, d21
+
+ vmin.s8 d2, d3
+ vmin.s16 d5, d6
+ vmin.s32 d8, d9
+ vmin.u8 d11, d12
+ vmin.u16 d14, d15
+ vmin.u32 d17, d18
+ vmin.f32 d20, d21
+
+ vmin.s8 q1, q2, q3
+ vmin.s16 q4, q5, q6
+ vmin.s32 q7, q8, q9
+ vmin.u8 q10, q11, q12
+ vmin.u16 q13, q14, q15
+ vmin.u32 q6, q7, q8
+ vmin.f32 q9, q5, q1
+
+ vmin.s8 q2, q3
+ vmin.s16 q5, q6
+ vmin.s32 q8, q9
+ vmin.u8 q11, q2
+ vmin.u16 q4, q5
+ vmin.u32 q7, q8
+ vmin.f32 q2, q1
+
+@ CHECK: vmin.s8 d1, d2, d3 @ encoding: [0x02,0xef,0x13,0x16]
+@ CHECK: vmin.s16 d4, d5, d6 @ encoding: [0x15,0xef,0x16,0x46]
+@ CHECK: vmin.s32 d7, d8, d9 @ encoding: [0x28,0xef,0x19,0x76]
+@ CHECK: vmin.u8 d10, d11, d12 @ encoding: [0x0b,0xff,0x1c,0xa6]
+@ CHECK: vmin.u16 d13, d14, d15 @ encoding: [0x1e,0xff,0x1f,0xd6]
+@ CHECK: vmin.u32 d16, d17, d18 @ encoding: [0x61,0xff,0xb2,0x06]
+@ CHECK: vmin.f32 d19, d20, d21 @ encoding: [0x64,0xef,0xa5,0x3f]
+@ CHECK: vmin.s8 d2, d2, d3 @ encoding: [0x02,0xef,0x13,0x26]
+@ CHECK: vmin.s16 d5, d5, d6 @ encoding: [0x15,0xef,0x16,0x56]
+@ CHECK: vmin.s32 d8, d8, d9 @ encoding: [0x28,0xef,0x19,0x86]
+@ CHECK: vmin.u8 d11, d11, d12 @ encoding: [0x0b,0xff,0x1c,0xb6]
+@ CHECK: vmin.u16 d14, d14, d15 @ encoding: [0x1e,0xff,0x1f,0xe6]
+@ CHECK: vmin.u32 d17, d17, d18 @ encoding: [0x61,0xff,0xb2,0x16]
+@ CHECK: vmin.f32 d20, d20, d21 @ encoding: [0x64,0xef,0xa5,0x4f]
+@ CHECK: vmin.s8 q1, q2, q3 @ encoding: [0x04,0xef,0x56,0x26]
+@ CHECK: vmin.s16 q4, q5, q6 @ encoding: [0x1a,0xef,0x5c,0x86]
+@ CHECK: vmin.s32 q7, q8, q9 @ encoding: [0x20,0xef,0xf2,0xe6]
+@ CHECK: vmin.u8 q10, q11, q12 @ encoding: [0x46,0xff,0xf8,0x46]
+@ CHECK: vmin.u16 q13, q14, q15 @ encoding: [0x5c,0xff,0xfe,0xa6]
+@ CHECK: vmin.u32 q6, q7, q8 @ encoding: [0x2e,0xff,0x70,0xc6]
+@ CHECK: vmin.f32 q9, q5, q1 @ encoding: [0x6a,0xef,0x42,0x2f]
+@ CHECK: vmin.s8 q2, q2, q3 @ encoding: [0x04,0xef,0x56,0x46]
+@ CHECK: vmin.s16 q5, q5, q6 @ encoding: [0x1a,0xef,0x5c,0xa6]
+@ CHECK: vmin.s32 q8, q8, q9 @ encoding: [0x60,0xef,0xf2,0x06]
+@ CHECK: vmin.u8 q11, q11, q2 @ encoding: [0x46,0xff,0xd4,0x66]
+@ CHECK: vmin.u16 q4, q4, q5 @ encoding: [0x18,0xff,0x5a,0x86]
+@ CHECK: vmin.u32 q7, q7, q8 @ encoding: [0x2e,0xff,0x70,0xe6]
+@ CHECK: vmin.f32 q2, q2, q1 @ encoding: [0x24,0xef,0x42,0x4f]
From grosbach at apple.com Mon Dec 19 13:02:41 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 19 Dec 2011 19:02:41 -0000
Subject: [llvm-commits] [llvm] r146887 - in /llvm/trunk/lib/Target/ARM:
ARMInstrVFP.td AsmParser/ARMAsmParser.cpp
Message-ID: <20111219190241.AE2461BE003@llvm.org>
Author: grosbach
Date: Mon Dec 19 13:02:41 2011
New Revision: 146887
URL: http://llvm.org/viewvc/llvm-project?rev=146887&view=rev
Log:
ARM VFP pre-UAL mnemonic aliases for fcpy[sd] and fdiv[sd].
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrVFP.td
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMInstrVFP.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrVFP.td?rev=146887&r1=146886&r2=146887&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrVFP.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrVFP.td Mon Dec 19 13:02:41 2011
@@ -1194,6 +1194,10 @@
def : VFP2MnemonicAlias<"fstd", "vstr">;
def : VFP2MnemonicAlias<"fmacd", "vmla.f64">;
def : VFP2MnemonicAlias<"fmacs", "vmla.f32">;
+def : VFP2MnemonicAlias<"fcpys", "vmov.f32">;
+def : VFP2MnemonicAlias<"fcpyd", "vmov.f64">;
+def : VFP2MnemonicAlias<"fdivs", "vdiv.f32">;
+def : VFP2MnemonicAlias<"fdivd", "vdiv.f64">;
def : VFP2InstAlias<"fmstat${p}", (FMSTAT pred:$p)>;
def : VFP2InstAlias<"fadds${p} $Sd, $Sn, $Sm",
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=146887&r1=146886&r2=146887&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Dec 19 13:02:41 2011
@@ -4395,7 +4395,7 @@
Mnemonic == "vnmls" || Mnemonic == "vqabs" || Mnemonic == "vrecps" ||
Mnemonic == "vrsqrts" || Mnemonic == "srs" || Mnemonic == "flds" ||
Mnemonic == "fmrs" || Mnemonic == "fsqrts" || Mnemonic == "fsubs" ||
- Mnemonic == "fsts" ||
+ Mnemonic == "fsts" || Mnemonic == "fcpys" || Mnemonic == "fdivs" ||
(Mnemonic == "movs" && isThumb()))) {
Mnemonic = Mnemonic.slice(0, Mnemonic.size() - 1);
CarrySetting = true;
From hfinkel at anl.gov Mon Dec 19 13:15:18 2011
From: hfinkel at anl.gov (Hal Finkel)
Date: Mon, 19 Dec 2011 13:15:18 -0600
Subject: [llvm-commits] [PATCH] Allow SelectionDAGBuilder to reorder
loads past stores
In-Reply-To:
References: <1324316529.31367.96.camel@sapling>
Message-ID: <1324322118.31367.147.camel@sapling>
On Mon, 2011-12-19 at 10:08 -0800, Owen Anderson wrote:
> Hal,
>
> How does this compare to the -combiner-alias-analysis and -combiner-global-alias-analysis already in SelectionDAG? I gave the former a try about a year ago, and found that it at least didn't cause things to fail.
>
Doing this in SelectionDAGBuilder is a better approach because it uses
the aliasing analysis when the IR instructions are still available. This
is important because the aliasing analysis is more powerful with the
original instructions compared to using reconstructed locations (which
is what the DAG combiner needs to do). For one thing, by the time the
combiner sees the loads and stores they may have offsets, and there is
no good way to use ptr+offset pairs with the aliasing analysis. My patch
also can deal correctly with intrinsics and calls, etc. because it uses
the original instructions in combination with the mod/ref interface from
the aliasing analysis.
As a practical manner, my patch does a much better job than the
-combiner-alias-analysis/-combiner-global-alias-analysis pair. I tried
these at first, but because it cannot deal correctly with the ptr+offset
pairs, etc., the conservative approximations that it needs to make
severely constrain what it can do. With a set of benchmarks I've
constructed with a bunch of unrolled loops, the DAG combiner with those
flags was essentially not able to do anything. My patch, however,
handles these quite well. This seems to be true of a number of
applications in the test suite as well.
I think that putting in the effort to make this work correctly will be
worthwhile (I suspect that the test-suite failures are backend bugs, but
I can't be certain).
-Hal
> --Owen
>
>
> On Dec 19, 2011, at 9:42 AM, Hal Finkel wrote:
>
> > The current SelectionDAGBuilder does not allow loads to be reordered
> > past stores, and does not allow stores to be reordered. This is a side
> > effect of the way the critical chain is constructed: there is a queue of
> > pending loads that is flushed (in parallel) to the root of the chain
> > upon encountering any store (and that store is also appended to the root
> > of the chain). Among other things, loop unrolling is far less effective
> > than it otherwise could be.
> >
> > The attached patch allows SelectionDAGBuilder to use the available alias
> > analysis to reorder independent loads and stores. It changes the queue
> > of pending loads into a more general queue of pending memory operations,
> > and flushes, in parallel, all potentially-conflicting loads and stores
> > as necessary.
> >
> > This can result in a significant performance boost. On my x86_64
> > machine, the average percentage decrease in execution time is ~8% (to
> > calculate my performance numbers from the test suite, I've included only
> > the 174 tests with a base execution time of at least 0.1s; the times of
> > the shorter tests seem noisy on my machine). Of these, 131 showed a
> > performance increase and 36 showed a performance decrease.
> >
> > The top-5 winners were:
> > MultiSource/Benchmarks/MiBench/consumer-typeset/consumer-typeset - 92%
> > performance increase ( = runtime decrease)
> > MultiSource/Benchmarks/llubenchmark/llu - 47% performance increase
> > MultiSource/Applications/minisat/minisat - 47% performance increase
> > MultiSource/Benchmarks/sim/sim - 40% performance increase
> > MultiSource/Benchmarks/Prolangs-C++/life/life - 35.7% performance
> > increase
> > The top-5 losers were:
> > MultiSource/Benchmarks/MiBench/consumer-lame/consumer-lame - 88%
> > performance decrease
> > MultiSource/Benchmarks/VersaBench/beamformer/beamformer - 49%
> > performance decrease
> > MultiSource/Benchmarks/MallocBench/espresso/espresso 47% performance
> > decrease
> > MultiSource/Benchmarks/MiBench/automotive-bitcount/automotive-bitcount -
> > 21% performance decrease
> > MultiSource/Benchmarks/MiBench/network-patricia/network-patricia - 20%
> > performance decrease
> >
> > The patch adds a few new options:
> > max-parallel-chains - replaces the old MaxParallelChains constant)
> > max-load-store-reorder - the maximum size of the reorder buffer -
> > previously it was unlimited, but contained only stores
> > no-reordering-past-stores - invokes the previous behavior
> >
> > Some of the regression tests had to be updated because the order of some
> > stores changed. For most of these, I just updated the test to reflect
> > the new instruction sequence. The following tests I've marked as XFAIL
> > because they would require larger changes (and I'd like someone with
> > more experience than me to make sure that they really are okay and make
> > any necessary adjustments):
> > CodeGen/X86/2008-02-22-LocalRegAllocBug.ll
> > CodeGen/X86/2010-09-17-SideEffectsInChain.ll
> > CodeGen/X86/lea-recursion.ll
> >
> > Also, there is one test-suite runtime failure on x86_64:
> > MultiSource/Benchmarks/Ptrdist/ft/ft
> >
> > And several test-suite runtime failures on i686:
> > MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4
> > SingleSource/Benchmarks/Misc-C++/Large/ray
> > SingleSource/Benchmarks/Misc-C++/stepanov_container
> > SingleSource/Benchmarks/Shootout-C++/lists
> > SingleSource/Benchmarks/Shootout-C++/lists1
> > SingleSource/Benchmarks/Shootout-C++/sieve
> >
> > Please review (and help with the test-suite failures).
> >
> > Thank you in advance,
> > Hal
> >
> > --
> > Hal Finkel
> > Postdoctoral Appointee
> > Leadership Computing Facility
> > Argonne National Laboratory
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
--
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory
From ahatanaka at mips.com Mon Dec 19 13:28:37 2011
From: ahatanaka at mips.com (Akira Hatanaka)
Date: Mon, 19 Dec 2011 19:28:37 -0000
Subject: [llvm-commits] [llvm] r146888 - in /llvm/trunk:
lib/Target/Mips/MipsISelDAGToDAG.cpp test/CodeGen/Mips/tls.ll
Message-ID: <20111219192837.AD35E1BE003@llvm.org>
Author: ahatanak
Date: Mon Dec 19 13:28:37 2011
New Revision: 146888
URL: http://llvm.org/viewvc/llvm-project?rev=146888&view=rev
Log:
Remove the restriction on the first operand of the add node in SelectAddr.
This change reduces the number of instructions generated.
For example,
(load (add (sub $n0, $n1), (MipsLo got(s))))
results in the following sequence of instructions:
1. sub $n2, $n0, $n1
2. lw got(s)($n2)
Previously, three instructions were needed.
1. sub $n2, $n0, $n1
2. addiu $n3, $n2, got(s)
3. lw 0($n3)
Modified:
llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp
llvm/trunk/test/CodeGen/Mips/tls.ll
Modified: llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp?rev=146888&r1=146887&r2=146888&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp Mon Dec 19 13:28:37 2011
@@ -160,9 +160,7 @@
// Generate:
// lui $2, %hi($CPI1_0)
// lwc1 $f0, %lo($CPI1_0)($2)
- if ((Addr.getOperand(0).getOpcode() == MipsISD::Hi ||
- Addr.getOperand(0).getOpcode() == ISD::LOAD) &&
- Addr.getOperand(1).getOpcode() == MipsISD::Lo) {
+ if (Addr.getOperand(1).getOpcode() == MipsISD::Lo) {
SDValue LoVal = Addr.getOperand(1);
if (isa(LoVal.getOperand(0)) ||
isa(LoVal.getOperand(0))) {
Modified: llvm/trunk/test/CodeGen/Mips/tls.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/tls.ll?rev=146888&r1=146887&r2=146888&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/tls.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/tls.ll Mon Dec 19 13:28:37 2011
@@ -55,7 +55,7 @@
; PIC: jalr $25
; PIC: lui $[[R0:[0-9]+]], %dtprel_hi(f3.i)
; PIC: addu $[[R1:[0-9]+]], $[[R0]], $2
-; PIC: addiu ${{[0-9]+}}, $[[R1]], %dtprel_lo(f3.i)
+; PIC: lw ${{[0-9]+}}, %dtprel_lo(f3.i)($[[R1]])
%0 = load i32* @f3.i, align 4
%inc = add nsw i32 %0, 1
From ahatanaka at mips.com Mon Dec 19 13:32:20 2011
From: ahatanaka at mips.com (Akira Hatanaka)
Date: Mon, 19 Dec 2011 19:32:20 -0000
Subject: [llvm-commits] [llvm] r146889 -
/llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td
Message-ID: <20111219193220.8EDCE1BE003@llvm.org>
Author: ahatanak
Date: Mon Dec 19 13:32:20 2011
New Revision: 146889
URL: http://llvm.org/viewvc/llvm-project?rev=146889&view=rev
Log:
Remove unused predicate.
Modified:
llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td
Modified: llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td?rev=146889&r1=146888&r2=146889&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td (original)
+++ llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td Mon Dec 19 13:32:20 2011
@@ -28,9 +28,6 @@
return getImm(N, (unsigned)N->getZExtValue() - 32);
}]>;
-// shamt field must fit in 5 bits.
-def immZExt5_64 : ImmLeaf;
-
// imm32_63 predicate - True if imm is in range [32, 63].
def imm32_63 : ImmLeaf= 32 && (int32_t)Imm < 64;}],
From grosbach at apple.com Mon Dec 19 13:43:51 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 19 Dec 2011 19:43:51 -0000
Subject: [llvm-commits] [llvm] r146892 - in /llvm/trunk/lib/Target/ARM:
ARMInstrVFP.td AsmParser/ARMAsmParser.cpp
Message-ID: <20111219194351.1EF041BE003@llvm.org>
Author: grosbach
Date: Mon Dec 19 13:43:50 2011
New Revision: 146892
URL: http://llvm.org/viewvc/llvm-project?rev=146892&view=rev
Log:
ARM VFP pre-UAL mnemonic aliases for fmul[sd].
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrVFP.td
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMInstrVFP.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrVFP.td?rev=146892&r1=146891&r2=146892&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrVFP.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrVFP.td Mon Dec 19 13:43:50 2011
@@ -1175,6 +1175,7 @@
def : VFP2MnemonicAlias<"fmrds", "vmov">;
def : VFP2MnemonicAlias<"fmrrd", "vmov">;
def : VFP2MnemonicAlias<"fmdrr", "vmov">;
+def : VFP2MnemonicAlias<"fmuls", "vmul.f32">;
def : VFP2MnemonicAlias<"fmuld", "vmul.f64">;
def : VFP2MnemonicAlias<"fnegs", "vneg.f32">;
def : VFP2MnemonicAlias<"fnegd", "vneg.f64">;
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=146892&r1=146891&r2=146892&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Dec 19 13:43:50 2011
@@ -4352,7 +4352,8 @@
Mnemonic == "vcge" || Mnemonic == "vclt" || Mnemonic == "vacgt" ||
Mnemonic == "vcgt" || Mnemonic == "vcle" || Mnemonic == "smlal" ||
Mnemonic == "umaal" || Mnemonic == "umlal" || Mnemonic == "vabal" ||
- Mnemonic == "vmlal" || Mnemonic == "vpadal" || Mnemonic == "vqdmlal")
+ Mnemonic == "vmlal" || Mnemonic == "vpadal" || Mnemonic == "vqdmlal" ||
+ Mnemonic == "fmuls")
return Mnemonic;
// First, split out any predication code. Ignore mnemonics we know aren't
@@ -4396,6 +4397,7 @@
Mnemonic == "vrsqrts" || Mnemonic == "srs" || Mnemonic == "flds" ||
Mnemonic == "fmrs" || Mnemonic == "fsqrts" || Mnemonic == "fsubs" ||
Mnemonic == "fsts" || Mnemonic == "fcpys" || Mnemonic == "fdivs" ||
+ Mnemonic == "fmuls" ||
(Mnemonic == "movs" && isThumb()))) {
Mnemonic = Mnemonic.slice(0, Mnemonic.size() - 1);
CarrySetting = true;
From ahatanaka at mips.com Mon Dec 19 13:44:10 2011
From: ahatanaka at mips.com (Akira Hatanaka)
Date: Mon, 19 Dec 2011 19:44:10 -0000
Subject: [llvm-commits] [llvm] r146893 - in /llvm/trunk:
lib/Target/Mips/Mips64InstrInfo.td test/CodeGen/Mips/mips64ext.ll
test/CodeGen/Mips/mips64shift.ll
Message-ID: <20111219194410.493551BE003@llvm.org>
Author: ahatanak
Date: Mon Dec 19 13:44:09 2011
New Revision: 146893
URL: http://llvm.org/viewvc/llvm-project?rev=146893&view=rev
Log:
Remove definitions of double word shift plus 32 instructions. Assembler or
direct-object emitter should emit the appropriate shift instruction depending
on the shift amount.
Modified:
llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td
llvm/trunk/test/CodeGen/Mips/mips64ext.ll
llvm/trunk/test/CodeGen/Mips/mips64shift.ll
Modified: llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td?rev=146893&r1=146892&r2=146893&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td (original)
+++ llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td Mon Dec 19 13:44:09 2011
@@ -28,10 +28,8 @@
return getImm(N, (unsigned)N->getZExtValue() - 32);
}]>;
-// imm32_63 predicate - True if imm is in range [32, 63].
-def imm32_63 : ImmLeaf= 32 && (int32_t)Imm < 64;}],
- Subtract32>;
+// shamt must fit in 6 bits.
+def immZExt6 : ImmLeaf;
// Is a 32-bit int.
def immSExt32 : ImmLeaf(Imm);}]>;
@@ -53,12 +51,7 @@
// 64-bit shift instructions.
class shift_rotate_imm64 func, bits<5> isRotate, string instr_asm,
SDNode OpNode>:
- shift_rotate_imm;
-
-class shift_rotate_imm64_32 func, bits<5> isRotate, string instr_asm,
- SDNode OpNode>:
- shift_rotate_imm;
// Jump and Link (Call)
@@ -141,9 +134,6 @@
def DSLL : shift_rotate_imm64<0x38, 0x00, "dsll", shl>;
def DSRL : shift_rotate_imm64<0x3a, 0x00, "dsrl", srl>;
def DSRA : shift_rotate_imm64<0x3b, 0x00, "dsra", sra>;
-def DSLL32 : shift_rotate_imm64_32<0x3c, 0x00, "dsll32", shl>;
-def DSRL32 : shift_rotate_imm64_32<0x3e, 0x00, "dsrl32", srl>;
-def DSRA32 : shift_rotate_imm64_32<0x3f, 0x00, "dsra32", sra>;
def DSLLV : shift_rotate_reg<0x24, 0x00, "dsllv", shl, CPU64Regs>;
def DSRLV : shift_rotate_reg<0x26, 0x00, "dsrlv", srl, CPU64Regs>;
def DSRAV : shift_rotate_reg<0x27, 0x00, "dsrav", sra, CPU64Regs>;
@@ -151,7 +141,6 @@
// Rotate Instructions
let Predicates = [HasMips64r2] in {
def DROTR : shift_rotate_imm64<0x3a, 0x01, "drotr", rotr>;
- def DROTR32 : shift_rotate_imm64_32<0x3e, 0x01, "drotr32", rotr>;
def DROTRV : shift_rotate_reg<0x16, 0x01, "drotrv", rotr, CPU64Regs>;
}
@@ -222,7 +211,7 @@
def DINS : InsBase<7, "dins", CPU64Regs>;
def DSLL64_32 : FR<0x3c, 0x00, (outs CPU64Regs:$rd), (ins CPURegs:$rt),
- "dsll32\t$rd, $rt, 0", [], IIAlu>;
+ "dsll\t$rd, $rt, 32", [], IIAlu>;
def SLL64_32 : FR<0x0, 0x00, (outs CPU64Regs:$rd), (ins CPURegs:$rt),
"sll\t$rd, $rt, 0", [], IIAlu>;
@@ -249,13 +238,12 @@
// extended loads
let Predicates = [NotN64] in {
- def : Pat<(extloadi32_a addr:$a), (DSRL32 (DSLL32 (LW64 addr:$a), 0), 0)>;
- def : Pat<(zextloadi32_u addr:$a), (DSRL32 (DSLL32 (ULW64 addr:$a), 0), 0)>;
+ def : Pat<(extloadi32_a addr:$a), (DSRL (DSLL (LW64 addr:$a), 32), 32)>;
+ def : Pat<(zextloadi32_u addr:$a), (DSRL (DSLL (ULW64 addr:$a), 32), 32)>;
}
let Predicates = [IsN64] in {
- def : Pat<(extloadi32_a addr:$a), (DSRL32 (DSLL32 (LW64_P8 addr:$a), 0), 0)>;
- def : Pat<(zextloadi32_u addr:$a),
- (DSRL32 (DSLL32 (ULW64_P8 addr:$a), 0), 0)>;
+ def : Pat<(extloadi32_a addr:$a), (DSRL (DSLL (LW64_P8 addr:$a), 32), 32)>;
+ def : Pat<(zextloadi32_u addr:$a), (DSRL (DSLL (ULW64_P8 addr:$a), 32), 32)>;
}
// hi/lo relocs
@@ -308,4 +296,4 @@
// 32-to-64-bit extension
def : Pat<(i64 (anyext CPURegs:$src)), (SLL64_32 CPURegs:$src)>;
-def : Pat<(i64 (zext CPURegs:$src)), (DSRL32 (DSLL64_32 CPURegs:$src), 0)>;
+def : Pat<(i64 (zext CPURegs:$src)), (DSRL (DSLL64_32 CPURegs:$src), 32)>;
Modified: llvm/trunk/test/CodeGen/Mips/mips64ext.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/mips64ext.ll?rev=146893&r1=146892&r2=146893&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/mips64ext.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/mips64ext.ll Mon Dec 19 13:44:09 2011
@@ -3,8 +3,8 @@
define i64 @zext64_32(i32 %a) nounwind readnone {
entry:
; CHECK: addiu $[[R0:[0-9]+]], ${{[0-9]+}}, 2
-; CHECK: dsll32 $[[R1:[0-9]+]], $[[R0]], 0
-; CHECK: dsrl32 ${{[0-9]+}}, $[[R1]], 0
+; CHECK: dsll $[[R1:[0-9]+]], $[[R0]], 32
+; CHECK: dsrl ${{[0-9]+}}, $[[R1]], 32
%add = add i32 %a, 2
%conv = zext i32 %add to i64
ret i64 %conv
Modified: llvm/trunk/test/CodeGen/Mips/mips64shift.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/mips64shift.ll?rev=146893&r1=146892&r2=146893&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/mips64shift.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/mips64shift.ll Mon Dec 19 13:44:09 2011
@@ -44,21 +44,21 @@
define i64 @f6(i64 %a0) nounwind readnone {
entry:
-; CHECK: dsll32 ${{[0-9]+}}, ${{[0-9]+}}, 8
+; CHECK: dsll ${{[0-9]+}}, ${{[0-9]+}}, 40
%shl = shl i64 %a0, 40
ret i64 %shl
}
define i64 @f7(i64 %a0) nounwind readnone {
entry:
-; CHECK: dsra32 ${{[0-9]+}}, ${{[0-9]+}}, 8
+; CHECK: dsra ${{[0-9]+}}, ${{[0-9]+}}, 40
%shr = ashr i64 %a0, 40
ret i64 %shr
}
define i64 @f8(i64 %a0) nounwind readnone {
entry:
-; CHECK: dsrl32 ${{[0-9]+}}, ${{[0-9]+}}, 8
+; CHECK: dsrl ${{[0-9]+}}, ${{[0-9]+}}, 40
%shr = lshr i64 %a0, 40
ret i64 %shr
}
@@ -94,7 +94,7 @@
define i64 @f12(i64 %a0) nounwind readnone {
entry:
-; CHECK: drotr32 ${{[0-9]+}}, ${{[0-9]+}}, 22
+; CHECK: drotr ${{[0-9]+}}, ${{[0-9]+}}, 54
%shl = shl i64 %a0, 10
%shr = lshr i64 %a0, 54
%or = or i64 %shl, %shr
From grosbach at apple.com Mon Dec 19 13:51:04 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 19 Dec 2011 19:51:04 -0000
Subject: [llvm-commits] [llvm] r146895 - in /llvm/trunk:
lib/Target/ARM/ARMInstrNEON.td test/MC/ARM/neon-pairwise-encoding.s
Message-ID: <20111219195104.9BF341BE003@llvm.org>
Author: grosbach
Date: Mon Dec 19 13:51:03 2011
New Revision: 146895
URL: http://llvm.org/viewvc/llvm-project?rev=146895&view=rev
Log:
ARM NEON two-operand aliases for VPADD.
rdar://10602276
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
llvm/trunk/test/MC/ARM/neon-pairwise-encoding.s
Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td?rev=146895&r1=146894&r2=146895&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrNEON.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Mon Dec 19 13:51:03 2011
@@ -5939,6 +5939,16 @@
def : NEONInstAlias<"vmin${p}.f32 $Vdn, $Vm",
(VMINfq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
+// Two-operand variants for VPADD.
+def : NEONInstAlias<"vpadd${p}.i8 $Vdn, $Vm",
+ (VPADDi8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vpadd${p}.i16 $Vdn, $Vm",
+ (VPADDi16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vpadd${p}.i32 $Vdn, $Vm",
+ (VPADDi32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+def : NEONInstAlias<"vpadd${p}.f32 $Vdn, $Vm",
+ (VPADDf DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+
// 'gas' compatibility aliases for quad-word instructions. Strictly speaking,
// these should restrict to just the Q register variants, but the register
// classes are enough to match correctly regardless, so we keep it simple
Modified: llvm/trunk/test/MC/ARM/neon-pairwise-encoding.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/neon-pairwise-encoding.s?rev=146895&r1=146894&r2=146895&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/neon-pairwise-encoding.s (original)
+++ llvm/trunk/test/MC/ARM/neon-pairwise-encoding.s Mon Dec 19 13:51:03 2011
@@ -8,6 +8,16 @@
vpadd.i32 d16, d17, d16
@ CHECK: vpadd.f32 d16, d16, d17 @ encoding: [0xa1,0x0d,0x40,0xf3]
vpadd.f32 d16, d16, d17
+
+@ CHECK: vpadd.i8 d17, d17, d16 @ encoding: [0xb0,0x1b,0x41,0xf2]
+ vpadd.i8 d17, d16
+@ CHECK: vpadd.i16 d17, d17, d16 @ encoding: [0xb0,0x1b,0x51,0xf2]
+ vpadd.i16 d17, d16
+@ CHECK: vpadd.i32 d17, d17, d16 @ encoding: [0xb0,0x1b,0x61,0xf2]
+ vpadd.i32 d17, d16
+@ CHECK: vpadd.f32 d16, d16, d17 @ encoding: [0xa1,0x0d,0x40,0xf3]
+ vpadd.f32 d16, d17
+
@ CHECK: vpaddl.s8 d16, d16 @ encoding: [0x20,0x02,0xf0,0xf3]
vpaddl.s8 d16, d16
@ CHECK: vpaddl.s16 d16, d16 @ encoding: [0x20,0x02,0xf4,0xf3]
From ahatanaka at mips.com Mon Dec 19 13:52:25 2011
From: ahatanaka at mips.com (Akira Hatanaka)
Date: Mon, 19 Dec 2011 19:52:25 -0000
Subject: [llvm-commits] [llvm] r146896 - in /llvm/trunk/lib/Target/Mips:
InstPrinter/MipsInstPrinter.cpp MCTargetDesc/MipsMCTargetDesc.cpp
MipsAsmPrinter.cpp MipsCodeEmitter.cpp MipsDelaySlotFiller.cpp
MipsISelDAGToDAG.cpp MipsISelLowering.cpp MipsInstrInfo.cpp
MipsInstrInfo.td MipsMCInstLower.cpp
Message-ID: <20111219195225.957B01BE003@llvm.org>
Author: ahatanak
Date: Mon Dec 19 13:52:25 2011
New Revision: 146896
URL: http://llvm.org/viewvc/llvm-project?rev=146896&view=rev
Log:
Tidy up. Simplify logic. No functional change intended.
Modified:
llvm/trunk/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp
llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
llvm/trunk/lib/Target/Mips/MipsCodeEmitter.cpp
llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp
llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp
llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp
llvm/trunk/lib/Target/Mips/MipsInstrInfo.td
llvm/trunk/lib/Target/Mips/MipsMCInstLower.cpp
Modified: llvm/trunk/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp?rev=146896&r1=146895&r2=146896&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp Mon Dec 19 13:52:25 2011
@@ -92,26 +92,26 @@
MCSymbolRefExpr::VariantKind Kind = SRE->getKind();
switch (Kind) {
- default: assert(0 && "Invalid kind!");
- case MCSymbolRefExpr::VK_None: break;
- case MCSymbolRefExpr::VK_Mips_GPREL: OS << "%gp_rel("; break;
- case MCSymbolRefExpr::VK_Mips_GOT_CALL: OS << "%call16("; break;
- case MCSymbolRefExpr::VK_Mips_GOT16: OS << "%got("; break;
- case MCSymbolRefExpr::VK_Mips_GOT: OS << "%got("; break;
- case MCSymbolRefExpr::VK_Mips_ABS_HI: OS << "%hi("; break;
- case MCSymbolRefExpr::VK_Mips_ABS_LO: OS << "%lo("; break;
- case MCSymbolRefExpr::VK_Mips_TLSGD: OS << "%tlsgd("; break;
- case MCSymbolRefExpr::VK_Mips_TLSLDM: OS << "%tlsldm("; break;
- case MCSymbolRefExpr::VK_Mips_DTPREL_HI:OS << "%dtprel_hi("; break;
- case MCSymbolRefExpr::VK_Mips_DTPREL_LO:OS << "%dtprel_lo("; break;
- case MCSymbolRefExpr::VK_Mips_GOTTPREL: OS << "%gottprel("; break;
- case MCSymbolRefExpr::VK_Mips_TPREL_HI: OS << "%tprel_hi("; break;
- case MCSymbolRefExpr::VK_Mips_TPREL_LO: OS << "%tprel_lo("; break;
- case MCSymbolRefExpr::VK_Mips_GPOFF_HI: OS << "%hi(%neg(%gp_rel("; break;
- case MCSymbolRefExpr::VK_Mips_GPOFF_LO: OS << "%lo(%neg(%gp_rel("; break;
- case MCSymbolRefExpr::VK_Mips_GOT_DISP: OS << "%got_disp("; break;
- case MCSymbolRefExpr::VK_Mips_GOT_PAGE: OS << "%got_page("; break;
- case MCSymbolRefExpr::VK_Mips_GOT_OFST: OS << "%got_ofst("; break;
+ default: assert(0 && "Invalid kind!");
+ case MCSymbolRefExpr::VK_None: break;
+ case MCSymbolRefExpr::VK_Mips_GPREL: OS << "%gp_rel("; break;
+ case MCSymbolRefExpr::VK_Mips_GOT_CALL: OS << "%call16("; break;
+ case MCSymbolRefExpr::VK_Mips_GOT16: OS << "%got("; break;
+ case MCSymbolRefExpr::VK_Mips_GOT: OS << "%got("; break;
+ case MCSymbolRefExpr::VK_Mips_ABS_HI: OS << "%hi("; break;
+ case MCSymbolRefExpr::VK_Mips_ABS_LO: OS << "%lo("; break;
+ case MCSymbolRefExpr::VK_Mips_TLSGD: OS << "%tlsgd("; break;
+ case MCSymbolRefExpr::VK_Mips_TLSLDM: OS << "%tlsldm("; break;
+ case MCSymbolRefExpr::VK_Mips_DTPREL_HI: OS << "%dtprel_hi("; break;
+ case MCSymbolRefExpr::VK_Mips_DTPREL_LO: OS << "%dtprel_lo("; break;
+ case MCSymbolRefExpr::VK_Mips_GOTTPREL: OS << "%gottprel("; break;
+ case MCSymbolRefExpr::VK_Mips_TPREL_HI: OS << "%tprel_hi("; break;
+ case MCSymbolRefExpr::VK_Mips_TPREL_LO: OS << "%tprel_lo("; break;
+ case MCSymbolRefExpr::VK_Mips_GPOFF_HI: OS << "%hi(%neg(%gp_rel("; break;
+ case MCSymbolRefExpr::VK_Mips_GPOFF_LO: OS << "%lo(%neg(%gp_rel("; break;
+ case MCSymbolRefExpr::VK_Mips_GOT_DISP: OS << "%got_disp("; break;
+ case MCSymbolRefExpr::VK_Mips_GOT_PAGE: OS << "%got_page("; break;
+ case MCSymbolRefExpr::VK_Mips_GOT_OFST: OS << "%got_ofst("; break;
}
OS << SRE->getSymbol();
Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp?rev=146896&r1=146895&r2=146896&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp Mon Dec 19 13:52:25 2011
@@ -142,7 +142,8 @@
TargetRegistry::RegisterMCAsmBackend(TheMips64elTarget, createMipsAsmBackend);
TargetRegistry::RegisterMCCodeEmitter(TheMipsTarget, createMipsMCCodeEmitter);
- TargetRegistry::RegisterMCCodeEmitter(TheMipselTarget, createMipsMCCodeEmitter);
+ TargetRegistry::RegisterMCCodeEmitter(TheMipselTarget,
+ createMipsMCCodeEmitter);
// Register the MC subtarget info.
TargetRegistry::RegisterMCSubtargetInfo(TheMipsTarget,
Modified: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp?rev=146896&r1=146895&r2=146896&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp Mon Dec 19 13:52:25 2011
@@ -459,7 +459,8 @@
// Tell the assembler which ABI we are using
if (OutStreamer.hasRawTextSupport())
- OutStreamer.EmitRawText("\t.section .mdebug." + Twine(getCurrentABIString()));
+ OutStreamer.EmitRawText("\t.section .mdebug." +
+ Twine(getCurrentABIString()));
// TODO: handle O64 ABI
if (OutStreamer.hasRawTextSupport()) {
Modified: llvm/trunk/lib/Target/Mips/MipsCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsCodeEmitter.cpp?rev=146896&r1=146895&r2=146896&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsCodeEmitter.cpp Mon Dec 19 13:52:25 2011
@@ -107,7 +107,8 @@
unsigned getJumpTargetOpValue(const MachineInstr &MI, unsigned OpNo) const;
- unsigned getBranchTargetOpValue(const MachineInstr &MI, unsigned OpNo) const;
+ unsigned getBranchTargetOpValue(const MachineInstr &MI,
+ unsigned OpNo) const;
unsigned getMemEncoding(const MachineInstr &MI, unsigned OpNo) const;
unsigned getSizeExtEncoding(const MachineInstr &MI, unsigned OpNo) const;
unsigned getSizeInsEncoding(const MachineInstr &MI, unsigned OpNo) const;
@@ -119,7 +120,7 @@
int emitUSH(const MachineInstr &MI);
void emitGlobalAddressUnaligned(const GlobalValue *GV, unsigned Reloc,
- int Offset) const;
+ int Offset) const;
};
}
Modified: llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp?rev=146896&r1=146895&r2=146896&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsDelaySlotFiller.cpp Mon Dec 19 13:52:25 2011
@@ -105,8 +105,7 @@
if (EnableDelaySlotFiller && findDelayInstr(MBB, I, D)) {
MBB.splice(llvm::next(I), &MBB, D);
++UsefulSlots;
- }
- else
+ } else
BuildMI(MBB, llvm::next(I), I->getDebugLoc(), TII->get(Mips::NOP));
// Record the filler instruction that filled the delay slot.
@@ -167,8 +166,7 @@
}
bool Filler::delayHasHazard(MachineBasicBlock::iterator candidate,
- bool &sawLoad,
- bool &sawStore,
+ bool &sawLoad, bool &sawStore,
SmallSet &RegDefs,
SmallSet &RegUses) {
if (candidate->isImplicitDef() || candidate->isKill())
Modified: llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp?rev=146896&r1=146895&r2=146896&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp Mon Dec 19 13:52:25 2011
@@ -294,7 +294,7 @@
ConstantFPSDNode *CN = dyn_cast(Node);
if (Node->getValueType(0) == MVT::f64 && CN->isExactlyValue(+0.0)) {
SDValue Zero = CurDAG->getCopyFromReg(CurDAG->getEntryNode(), dl,
- Mips::ZERO, MVT::i32);
+ Mips::ZERO, MVT::i32);
return CurDAG->getMachineNode(Mips::BuildPairF64, dl, MVT::f64, Zero,
Zero);
}
@@ -315,10 +315,12 @@
DestReg = Mips::V1_64;
}
- SDNode *Rdhwr = CurDAG->getMachineNode(RdhwrOpc, Node->getDebugLoc(),
- Node->getValueType(0), CurDAG->getRegister(SrcReg, PtrVT));
+ SDNode *Rdhwr =
+ CurDAG->getMachineNode(RdhwrOpc, Node->getDebugLoc(),
+ Node->getValueType(0),
+ CurDAG->getRegister(SrcReg, PtrVT));
SDValue Chain = CurDAG->getCopyToReg(CurDAG->getEntryNode(), dl, DestReg,
- SDValue(Rdhwr, 0));
+ SDValue(Rdhwr, 0));
SDValue ResNode = CurDAG->getCopyFromReg(Chain, dl, DestReg, PtrVT);
ReplaceUses(SDValue(Node, 0), ResNode);
return ResNode.getNode();
Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=146896&r1=146895&r2=146896&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Mon Dec 19 13:52:25 2011
@@ -297,8 +297,7 @@
// create MipsMAdd(u) node
MultOpc = MultOpc == ISD::UMUL_LOHI ? MipsISD::MAddu : MipsISD::MAdd;
- SDValue MAdd = CurDAG->getNode(MultOpc, dl,
- MVT::Glue,
+ SDValue MAdd = CurDAG->getNode(MultOpc, dl, MVT::Glue,
MultNode->getOperand(0),// Factor 0
MultNode->getOperand(1),// Factor 1
ADDCNode->getOperand(1),// Lo0
@@ -371,8 +370,7 @@
// create MipsSub(u) node
MultOpc = MultOpc == ISD::UMUL_LOHI ? MipsISD::MSubu : MipsISD::MSub;
- SDValue MSub = CurDAG->getNode(MultOpc, dl,
- MVT::Glue,
+ SDValue MSub = CurDAG->getNode(MultOpc, dl, MVT::Glue,
MultNode->getOperand(0),// Factor 0
MultNode->getOperand(1),// Factor 1
SUBCNode->getOperand(0),// Lo0
@@ -490,11 +488,10 @@
if (CC >= Mips::FCOND_F && CC <= Mips::FCOND_NGT)
return false;
- if (CC >= Mips::FCOND_T && CC <= Mips::FCOND_GT)
- return true;
+ assert((CC >= Mips::FCOND_T && CC <= Mips::FCOND_GT) &&
+ "Illegal Condition Code");
- assert(false && "Illegal Condition Code");
- return false;
+ return true;
}
// Creates and returns an FPCmp node from a setcc node.
@@ -584,8 +581,7 @@
return SDValue();
return DAG.getNode(MipsISD::Ext, N->getDebugLoc(), ValTy,
- ShiftRight.getOperand(0),
- DAG.getConstant(Pos, MVT::i32),
+ ShiftRight.getOperand(0), DAG.getConstant(Pos, MVT::i32),
DAG.getConstant(SMSize, MVT::i32));
}
@@ -638,11 +634,9 @@
if ((Shamt != SMPos0) || (SMPos0 + SMSize0 > ValTy.getSizeInBits()))
return SDValue();
- return DAG.getNode(MipsISD::Ins, N->getDebugLoc(), ValTy,
- Shl.getOperand(0),
+ return DAG.getNode(MipsISD::Ins, N->getDebugLoc(), ValTy, Shl.getOperand(0),
DAG.getConstant(SMPos0, MVT::i32),
- DAG.getConstant(SMSize0, MVT::i32),
- And0.getOperand(0));
+ DAG.getConstant(SMSize0, MVT::i32), And0.getOperand(0));
}
SDValue MipsTargetLowering::PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI)
@@ -713,10 +707,10 @@
if (CC >= Mips::FCOND_F && CC <= Mips::FCOND_NGT)
return Mips::BRANCH_T;
- if (CC >= Mips::FCOND_T && CC <= Mips::FCOND_GT)
- return Mips::BRANCH_F;
+ assert((CC >= Mips::FCOND_T && CC <= Mips::FCOND_GT) &&
+ "Invalid CondCode.");
- return Mips::BRANCH_INVALID;
+ return Mips::BRANCH_F;
}
/*
@@ -1049,8 +1043,7 @@
// Transfer the remainder of BB and its successor edges to exitMBB.
exitMBB->splice(exitMBB->begin(), BB,
- llvm::next(MachineBasicBlock::iterator(MI)),
- BB->end());
+ llvm::next(MachineBasicBlock::iterator(MI)), BB->end());
exitMBB->transferSuccessorsAndUpdatePHIs(BB);
BB->addSuccessor(loopMBB);
@@ -1082,7 +1075,6 @@
BuildMI(BB, dl, TII->get(Mips::NOR), Mask2).addReg(Mips::ZERO).addReg(Mask);
BuildMI(BB, dl, TII->get(Mips::SLLV), Incr2).addReg(ShiftAmt).addReg(Incr);
-
// atomic.load.binop
// loopMBB:
// ll oldval,0(alignedaddr)
@@ -1201,8 +1193,7 @@
// Transfer the remainder of BB and its successor edges to exitMBB.
exitMBB->splice(exitMBB->begin(), BB,
- llvm::next(MachineBasicBlock::iterator(MI)),
- BB->end());
+ llvm::next(MachineBasicBlock::iterator(MI)), BB->end());
exitMBB->transferSuccessorsAndUpdatePHIs(BB);
// thisMBB:
@@ -1290,8 +1281,7 @@
// Transfer the remainder of BB and its successor edges to exitMBB.
exitMBB->splice(exitMBB->begin(), BB,
- llvm::next(MachineBasicBlock::iterator(MI)),
- BB->end());
+ llvm::next(MachineBasicBlock::iterator(MI)), BB->end());
exitMBB->transferSuccessorsAndUpdatePHIs(BB);
BB->addSuccessor(loop1MBB);
@@ -1493,9 +1483,8 @@
(HasGotOfst ? MipsII::MO_GOT : MipsII::MO_GOT16);
SDValue GA = DAG.getTargetGlobalAddress(GV, dl, ValTy, 0, GotFlag);
GA = DAG.getNode(MipsISD::Wrapper, dl, ValTy, GA);
- SDValue ResNode = DAG.getLoad(ValTy, dl,
- DAG.getEntryNode(), GA, MachinePointerInfo(),
- false, false, false, 0);
+ SDValue ResNode = DAG.getLoad(ValTy, dl, DAG.getEntryNode(), GA,
+ MachinePointerInfo(), false, false, false, 0);
// On functions and global targets not internal linked only
// a load from got/GP is necessary for PIC to work.
if (!HasGotOfst)
@@ -1515,10 +1504,8 @@
if (getTargetMachine().getRelocationModel() != Reloc::PIC_ && !IsN64) {
// %hi/%lo relocation
- SDValue BAHi = DAG.getBlockAddress(BA, MVT::i32, true,
- MipsII::MO_ABS_HI);
- SDValue BALo = DAG.getBlockAddress(BA, MVT::i32, true,
- MipsII::MO_ABS_LO);
+ SDValue BAHi = DAG.getBlockAddress(BA, MVT::i32, true, MipsII::MO_ABS_HI);
+ SDValue BALo = DAG.getBlockAddress(BA, MVT::i32, true, MipsII::MO_ABS_LO);
SDValue Hi = DAG.getNode(MipsISD::Hi, dl, MVT::i32, BAHi);
SDValue Lo = DAG.getNode(MipsISD::Lo, dl, MVT::i32, BALo);
return DAG.getNode(ISD::ADD, dl, MVT::i32, Hi, Lo);
@@ -1530,8 +1517,7 @@
SDValue BAGOTOffset = DAG.getBlockAddress(BA, ValTy, true, GOTFlag);
BAGOTOffset = DAG.getNode(MipsISD::Wrapper, dl, ValTy, BAGOTOffset);
SDValue BALOOffset = DAG.getBlockAddress(BA, ValTy, true, OFSTFlag);
- SDValue Load = DAG.getLoad(ValTy, dl,
- DAG.getEntryNode(), BAGOTOffset,
+ SDValue Load = DAG.getLoad(ValTy, dl, DAG.getEntryNode(), BAGOTOffset,
MachinePointerInfo(), false, false, false, 0);
SDValue Lo = DAG.getNode(MipsISD::Lo, dl, ValTy, BALOOffset);
return DAG.getNode(ISD::ADD, dl, ValTy, Load, Lo);
@@ -1672,9 +1658,9 @@
SDValue CP = DAG.getTargetConstantPool(C, ValTy, N->getAlignment(),
N->getOffset(), GOTFlag);
CP = DAG.getNode(MipsISD::Wrapper, dl, ValTy, CP);
- SDValue Load = DAG.getLoad(ValTy, dl, DAG.getEntryNode(),
- CP, MachinePointerInfo::getConstantPool(),
- false, false, false, 0);
+ SDValue Load = DAG.getLoad(ValTy, dl, DAG.getEntryNode(), CP,
+ MachinePointerInfo::getConstantPool(), false,
+ false, false, 0);
SDValue CPLo = DAG.getTargetConstantPool(C, ValTy, N->getAlignment(),
N->getOffset(), OFSTFlag);
SDValue Lo = DAG.getNode(MipsISD::Lo, dl, ValTy, CPLo);
@@ -1696,8 +1682,7 @@
// memory location argument.
const Value *SV = cast(Op.getOperand(2))->getValue();
return DAG.getStore(Op.getOperand(0), dl, FI, Op.getOperand(1),
- MachinePointerInfo(SV),
- false, false, 0);
+ MachinePointerInfo(SV), false, false, 0);
}
// Called if the size of integer registers is large enough to hold the whole
@@ -1750,16 +1735,16 @@
return DAG.getNode(MipsISD::BuildPairF64, dl, MVT::f64, Word0, Word1);
}
-SDValue MipsTargetLowering::LowerFCOPYSIGN(SDValue Op, SelectionDAG &DAG)
- const {
+SDValue
+MipsTargetLowering::LowerFCOPYSIGN(SDValue Op, SelectionDAG &DAG) const {
EVT Ty = Op.getValueType();
assert(Ty == MVT::f32 || Ty == MVT::f64);
if (Ty == MVT::f32 || HasMips64)
return LowerFCOPYSIGNLargeIntReg(Op, DAG);
- else
- return LowerFCOPYSIGNSmallIntReg(Op, DAG, Subtarget->isLittle());
+
+ return LowerFCOPYSIGNSmallIntReg(Op, DAG, Subtarget->isLittle());
}
SDValue MipsTargetLowering::
@@ -1778,8 +1763,8 @@
}
// TODO: set SType according to the desired memory barrier behavior.
-SDValue MipsTargetLowering::LowerMEMBARRIER(SDValue Op,
- SelectionDAG& DAG) const {
+SDValue
+MipsTargetLowering::LowerMEMBARRIER(SDValue Op, SelectionDAG& DAG) const {
unsigned SType = 0;
DebugLoc dl = Op.getDebugLoc();
return DAG.getNode(MipsISD::Sync, dl, MVT::Other, Op.getOperand(0),
@@ -2007,9 +1992,8 @@
SDValue LoadPtr = DAG.getNode(ISD::ADD, dl, MVT::i32, Arg,
DAG.getConstant(Offset, MVT::i32));
SDValue LoadVal = DAG.getLoad(MVT::i32, dl, Chain, LoadPtr,
- MachinePointerInfo(),
- false, false, false, std::min(ByValAlign,
- (unsigned )4));
+ MachinePointerInfo(), false, false, false,
+ std::min(ByValAlign, (unsigned )4));
MemOpChains.push_back(LoadVal.getValue(1));
unsigned DstReg = O32IntRegs[LocMemOffset / 4];
RegsToPass.push_back(std::make_pair(DstReg, LoadVal));
@@ -2190,7 +2174,7 @@
// Analyze operands of the call, assigning locations to each operand.
SmallVector ArgLocs;
CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(),
- getTargetMachine(), ArgLocs, *DAG.getContext());
+ getTargetMachine(), ArgLocs, *DAG.getContext());
if (IsO32)
CCInfo.AnalyzeCallOperands(Outs, CC_MipsO32);
@@ -2323,8 +2307,7 @@
// emit ISD::STORE whichs stores the
// parameter value to a stack Location
MemOpChains.push_back(DAG.getStore(Chain, dl, Arg, PtrOff,
- MachinePointerInfo(),
- false, false, 0));
+ MachinePointerInfo(), false, false, 0));
}
// Extend range of indices of frame objects for outgoing arguments that were
@@ -2376,8 +2359,8 @@
OpFlag = MipsII::MO_NO_FLAG;
else // O32 & PIC
OpFlag = MipsII::MO_GOT_CALL;
- Callee = DAG.getTargetExternalSymbol(S->getSymbol(),
- getPointerTy(), OpFlag);
+ Callee = DAG.getTargetExternalSymbol(S->getSymbol(), getPointerTy(),
+ OpFlag);
GlobalOrExternal = true;
}
@@ -2552,8 +2535,7 @@
MipsTargetLowering::LowerFormalArguments(SDValue Chain,
CallingConv::ID CallConv,
bool isVarArg,
- const SmallVectorImpl
- &Ins,
+ const SmallVectorImpl &Ins,
DebugLoc dl, SelectionDAG &DAG,
SmallVectorImpl &InVals)
const {
@@ -2569,7 +2551,7 @@
// Assign locations to all of the incoming arguments.
SmallVector ArgLocs;
CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(),
- getTargetMachine(), ArgLocs, *DAG.getContext());
+ getTargetMachine(), ArgLocs, *DAG.getContext());
if (IsO32)
CCInfo.AnalyzeFormalArguments(Ins, CC_MipsO32);
@@ -2719,8 +2701,7 @@
LastFI = MFI->CreateFixedObject(RegSize, StackOffset, true);
SDValue PtrOff = DAG.getFrameIndex(LastFI, getPointerTy());
OutChains.push_back(DAG.getStore(Chain, dl, ArgValue, PtrOff,
- MachinePointerInfo(),
- false, false, 0));
+ MachinePointerInfo(), false, false, 0));
}
}
@@ -2774,8 +2755,7 @@
CCValAssign &VA = RVLocs[i];
assert(VA.isRegLoc() && "Can only return in registers!");
- Chain = DAG.getCopyToReg(Chain, dl, VA.getLocReg(),
- OutVals[i], Flag);
+ Chain = DAG.getCopyToReg(Chain, dl, VA.getLocReg(), OutVals[i], Flag);
// guarantee that all emitted copies are
// stuck together, avoiding something bad
Modified: llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp?rev=146896&r1=146895&r2=146896&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp Mon Dec 19 13:52:25 2011
@@ -246,21 +246,21 @@
unsigned Mips::GetOppositeBranchOpc(unsigned Opc)
{
switch (Opc) {
- default: llvm_unreachable("Illegal opcode!");
- case Mips::BEQ : return Mips::BNE;
- case Mips::BNE : return Mips::BEQ;
- case Mips::BGTZ : return Mips::BLEZ;
- case Mips::BGEZ : return Mips::BLTZ;
- case Mips::BLTZ : return Mips::BGEZ;
- case Mips::BLEZ : return Mips::BGTZ;
- case Mips::BEQ64 : return Mips::BNE64;
- case Mips::BNE64 : return Mips::BEQ64;
- case Mips::BGTZ64 : return Mips::BLEZ64;
- case Mips::BGEZ64 : return Mips::BLTZ64;
- case Mips::BLTZ64 : return Mips::BGEZ64;
- case Mips::BLEZ64 : return Mips::BGTZ64;
- case Mips::BC1T : return Mips::BC1F;
- case Mips::BC1F : return Mips::BC1T;
+ default: llvm_unreachable("Illegal opcode!");
+ case Mips::BEQ: return Mips::BNE;
+ case Mips::BNE: return Mips::BEQ;
+ case Mips::BGTZ: return Mips::BLEZ;
+ case Mips::BGEZ: return Mips::BLTZ;
+ case Mips::BLTZ: return Mips::BGEZ;
+ case Mips::BLEZ: return Mips::BGTZ;
+ case Mips::BEQ64: return Mips::BNE64;
+ case Mips::BNE64: return Mips::BEQ64;
+ case Mips::BGTZ64: return Mips::BLEZ64;
+ case Mips::BGEZ64: return Mips::BLTZ64;
+ case Mips::BLTZ64: return Mips::BGEZ64;
+ case Mips::BLEZ64: return Mips::BGTZ64;
+ case Mips::BC1T: return Mips::BC1F;
+ case Mips::BC1F: return Mips::BC1T;
}
}
Modified: llvm/trunk/lib/Target/Mips/MipsInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrInfo.td?rev=146896&r1=146895&r2=146896&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsInstrInfo.td (original)
+++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.td Mon Dec 19 13:52:25 2011
@@ -229,24 +229,26 @@
//===----------------------------------------------------------------------===//
// Pattern fragment for load/store
//===----------------------------------------------------------------------===//
-class UnalignedLoad : PatFrag<(ops node:$ptr), (Node node:$ptr), [{
+class UnalignedLoad :
+ PatFrag<(ops node:$ptr), (Node node:$ptr), [{
LoadSDNode *LD = cast(N);
return LD->getMemoryVT().getSizeInBits()/8 > LD->getAlignment();
}]>;
-class AlignedLoad : PatFrag<(ops node:$ptr), (Node node:$ptr), [{
+class AlignedLoad :
+ PatFrag<(ops node:$ptr), (Node node:$ptr), [{
LoadSDNode *LD = cast(N);
return LD->getMemoryVT().getSizeInBits()/8 <= LD->getAlignment();
}]>;
-class UnalignedStore : PatFrag<(ops node:$val, node:$ptr),
- (Node node:$val, node:$ptr), [{
+class UnalignedStore :
+ PatFrag<(ops node:$val, node:$ptr), (Node node:$val, node:$ptr), [{
StoreSDNode *SD = cast(N);
return SD->getMemoryVT().getSizeInBits()/8 > SD->getAlignment();
}]>;
-class AlignedStore : PatFrag<(ops node:$val, node:$ptr),
- (Node node:$val, node:$ptr), [{
+class AlignedStore :
+ PatFrag<(ops node:$val, node:$ptr), (Node node:$val, node:$ptr), [{
StoreSDNode *SD = cast(N);
return SD->getMemoryVT().getSizeInBits()/8 <= SD->getAlignment();
}]>;
Modified: llvm/trunk/lib/Target/Mips/MipsMCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsMCInstLower.cpp?rev=146896&r1=146895&r2=146896&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsMCInstLower.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsMCInstLower.cpp Mon Dec 19 13:52:25 2011
@@ -37,26 +37,26 @@
const MCSymbol *Symbol;
switch(MO.getTargetFlags()) {
- default: assert(0 && "Invalid target flag!");
- case MipsII::MO_NO_FLAG: Kind = MCSymbolRefExpr::VK_None; break;
- case MipsII::MO_GPREL: Kind = MCSymbolRefExpr::VK_Mips_GPREL; break;
- case MipsII::MO_GOT_CALL: Kind = MCSymbolRefExpr::VK_Mips_GOT_CALL; break;
- case MipsII::MO_GOT16: Kind = MCSymbolRefExpr::VK_Mips_GOT16; break;
- case MipsII::MO_GOT: Kind = MCSymbolRefExpr::VK_Mips_GOT; break;
- case MipsII::MO_ABS_HI: Kind = MCSymbolRefExpr::VK_Mips_ABS_HI; break;
- case MipsII::MO_ABS_LO: Kind = MCSymbolRefExpr::VK_Mips_ABS_LO; break;
- case MipsII::MO_TLSGD: Kind = MCSymbolRefExpr::VK_Mips_TLSGD; break;
- case MipsII::MO_TLSLDM: Kind = MCSymbolRefExpr::VK_Mips_TLSLDM; break;
- case MipsII::MO_DTPREL_HI:Kind = MCSymbolRefExpr::VK_Mips_DTPREL_HI; break;
- case MipsII::MO_DTPREL_LO:Kind = MCSymbolRefExpr::VK_Mips_DTPREL_LO; break;
- case MipsII::MO_GOTTPREL: Kind = MCSymbolRefExpr::VK_Mips_GOTTPREL; break;
- case MipsII::MO_TPREL_HI: Kind = MCSymbolRefExpr::VK_Mips_TPREL_HI; break;
- case MipsII::MO_TPREL_LO: Kind = MCSymbolRefExpr::VK_Mips_TPREL_LO; break;
- case MipsII::MO_GPOFF_HI: Kind = MCSymbolRefExpr::VK_Mips_GPOFF_HI; break;
- case MipsII::MO_GPOFF_LO: Kind = MCSymbolRefExpr::VK_Mips_GPOFF_LO; break;
- case MipsII::MO_GOT_DISP: Kind = MCSymbolRefExpr::VK_Mips_GOT_DISP; break;
- case MipsII::MO_GOT_PAGE: Kind = MCSymbolRefExpr::VK_Mips_GOT_PAGE; break;
- case MipsII::MO_GOT_OFST: Kind = MCSymbolRefExpr::VK_Mips_GOT_OFST; break;
+ default: assert(0 && "Invalid target flag!");
+ case MipsII::MO_NO_FLAG: Kind = MCSymbolRefExpr::VK_None; break;
+ case MipsII::MO_GPREL: Kind = MCSymbolRefExpr::VK_Mips_GPREL; break;
+ case MipsII::MO_GOT_CALL: Kind = MCSymbolRefExpr::VK_Mips_GOT_CALL; break;
+ case MipsII::MO_GOT16: Kind = MCSymbolRefExpr::VK_Mips_GOT16; break;
+ case MipsII::MO_GOT: Kind = MCSymbolRefExpr::VK_Mips_GOT; break;
+ case MipsII::MO_ABS_HI: Kind = MCSymbolRefExpr::VK_Mips_ABS_HI; break;
+ case MipsII::MO_ABS_LO: Kind = MCSymbolRefExpr::VK_Mips_ABS_LO; break;
+ case MipsII::MO_TLSGD: Kind = MCSymbolRefExpr::VK_Mips_TLSGD; break;
+ case MipsII::MO_TLSLDM: Kind = MCSymbolRefExpr::VK_Mips_TLSLDM; break;
+ case MipsII::MO_DTPREL_HI: Kind = MCSymbolRefExpr::VK_Mips_DTPREL_HI; break;
+ case MipsII::MO_DTPREL_LO: Kind = MCSymbolRefExpr::VK_Mips_DTPREL_LO; break;
+ case MipsII::MO_GOTTPREL: Kind = MCSymbolRefExpr::VK_Mips_GOTTPREL; break;
+ case MipsII::MO_TPREL_HI: Kind = MCSymbolRefExpr::VK_Mips_TPREL_HI; break;
+ case MipsII::MO_TPREL_LO: Kind = MCSymbolRefExpr::VK_Mips_TPREL_LO; break;
+ case MipsII::MO_GPOFF_HI: Kind = MCSymbolRefExpr::VK_Mips_GPOFF_HI; break;
+ case MipsII::MO_GPOFF_LO: Kind = MCSymbolRefExpr::VK_Mips_GPOFF_LO; break;
+ case MipsII::MO_GOT_DISP: Kind = MCSymbolRefExpr::VK_Mips_GOT_DISP; break;
+ case MipsII::MO_GOT_PAGE: Kind = MCSymbolRefExpr::VK_Mips_GOT_PAGE; break;
+ case MipsII::MO_GOT_OFST: Kind = MCSymbolRefExpr::VK_Mips_GOT_OFST; break;
}
switch (MOTy) {
From evan.cheng at apple.com Mon Dec 19 14:07:58 2011
From: evan.cheng at apple.com (Evan Cheng)
Date: Mon, 19 Dec 2011 12:07:58 -0800
Subject: [llvm-commits] PATCH: Enable direct selection of bsf and bsr
instructions for cttz and ctlz with zero-undef behavior
In-Reply-To:
References:
<6C5EBBA2-AC05-4F55-871D-D7657848266B@apple.com>
Message-ID: <68E0DAB7-2B39-4B4C-816A-4408DCFBAF42@apple.com>
On Dec 17, 2011, at 2:29 AM, Chandler Carruth wrote:
> On Thu, Dec 15, 2011 at 7:52 AM, Stephen Canon wrote:
> Just for the record, this is in no way unique to AMD. Agner Fog's tables list BSF/BSR as 10 ?ops/16 cycles on Atom as well. BSF is a hazard to be avoided on an unknown x86 processor.
>
> I really wasn't trying to draw generalizations. I've read the same tables. =/ I'm not sure what your concerned about here, this patch is orthogonal to any work on avoiding these instructions on architectures where they just decode to silly microcode.
>
> I'd still really appreciate some review on the actual patch. It's pretty simple.
The patch looks fine to me.
Evan
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111219/2725ce35/attachment.html
From eli.friedman at gmail.com Mon Dec 19 14:06:03 2011
From: eli.friedman at gmail.com (Eli Friedman)
Date: Mon, 19 Dec 2011 20:06:03 -0000
Subject: [llvm-commits] [llvm] r146897 - in /llvm/trunk:
include/llvm/Target/TargetInstrInfo.h lib/CodeGen/TargetInstrInfoImpl.cpp
Message-ID: <20111219200603.66CA21BE003@llvm.org>
Author: efriedma
Date: Mon Dec 19 14:06:03 2011
New Revision: 146897
URL: http://llvm.org/viewvc/llvm-project?rev=146897&view=rev
Log:
Attempt to fix PR11607 by shuffling around which class defines which methods.
Modified:
llvm/trunk/include/llvm/Target/TargetInstrInfo.h
llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp
Modified: llvm/trunk/include/llvm/Target/TargetInstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetInstrInfo.h?rev=146897&r1=146896&r2=146897&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetInstrInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetInstrInfo.h Mon Dec 19 14:06:03 2011
@@ -646,7 +646,7 @@
virtual int getOperandLatency(const InstrItineraryData *ItinData,
SDNode *DefNode, unsigned DefIdx,
- SDNode *UseNode, unsigned UseIdx) const;
+ SDNode *UseNode, unsigned UseIdx) const = 0;
/// getOutputLatency - Compute and return the output dependency latency of a
/// a given pair of defs which both target the same register. This is usually
@@ -665,7 +665,7 @@
unsigned *PredCost = 0) const;
virtual int getInstrLatency(const InstrItineraryData *ItinData,
- SDNode *Node) const;
+ SDNode *Node) const = 0;
/// isHighLatencyDef - Return true if this opcode has high latency to its
/// result.
@@ -839,6 +839,11 @@
virtual bool isSchedulingBoundary(const MachineInstr *MI,
const MachineBasicBlock *MBB,
const MachineFunction &MF) const;
+ virtual int getOperandLatency(const InstrItineraryData *ItinData,
+ SDNode *DefNode, unsigned DefIdx,
+ SDNode *UseNode, unsigned UseIdx) const;
+ virtual int getInstrLatency(const InstrItineraryData *ItinData,
+ SDNode *Node) const;
bool usePreRAHazardRecognizer() const;
Modified: llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp?rev=146897&r1=146896&r2=146897&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetInstrInfoImpl.cpp Mon Dec 19 14:06:03 2011
@@ -513,9 +513,9 @@
}
int
-TargetInstrInfo::getOperandLatency(const InstrItineraryData *ItinData,
- SDNode *DefNode, unsigned DefIdx,
- SDNode *UseNode, unsigned UseIdx) const {
+TargetInstrInfoImpl::getOperandLatency(const InstrItineraryData *ItinData,
+ SDNode *DefNode, unsigned DefIdx,
+ SDNode *UseNode, unsigned UseIdx) const {
if (!ItinData || ItinData->isEmpty())
return -1;
@@ -529,8 +529,8 @@
return ItinData->getOperandLatency(DefClass, DefIdx, UseClass, UseIdx);
}
-int TargetInstrInfo::getInstrLatency(const InstrItineraryData *ItinData,
- SDNode *N) const {
+int TargetInstrInfoImpl::getInstrLatency(const InstrItineraryData *ItinData,
+ SDNode *N) const {
if (!ItinData || ItinData->isEmpty())
return 1;
From daniel.malea at intel.com Mon Dec 19 14:16:04 2011
From: daniel.malea at intel.com (Malea, Daniel)
Date: Mon, 19 Dec 2011 13:16:04 -0700
Subject: [llvm-commits] [PATCH] Add basic ELF Dyld loader (on behalf of
Andy Kaylor)
In-Reply-To: <4EECD207.6020507@gmail.com>
References: <2C2ECF4B05BCF3489866AB805260FEC50630AE0806@rrsmsx509.amr.corp.intel.com>
<4EE8F09A.2060302@gmail.com>
<5A9BD224CEA58D4CB62235967D650C161733538E@orsmsx509.amr.corp.intel.com>
<4EECD207.6020507@gmail.com>
Message-ID: <2C2ECF4B05BCF3489866AB805260FEC5065068774E@rrsmsx509.amr.corp.intel.com>
Hi all,
Thanks everyone for your input; here's an updated patch with passing tests! In addition to running the existing ExecutionEngine tests against MCJIT, we added a few new test cases. To run them against the MCJIT implementation, invoke lit with the "--param jit_impl=mcjit" option, which then causes lli to be invoked with "-use-mcjit".
Compared to the last iteration of the patch, here?s exactly what has changed:
- Removed "default:" case in switch statement as per Rafael?s suggestion
- Moved RuntimeDyldMachO::isKnownFormat() into isCompatibleFormat() of the same class
- Added 6 new test cases in test/ExecutionEngine
- Added ?XFAIL: mcjit? to tests we expect not to pass
- Updated lit.cfg and existing ExecutionEngine tests to handle the jit_impl parameter
- Updated lli to use the default memory manager (to enable MCJIT to even run)
- Removed Objective-C specific name handling behavior from the MCJIT memory manager
Regarding the last point, I'm not really confident that just removing the objective-c specific behavior is correct, but it seems like language specific things should probably not go in something called "MCJITMemoryManager". Perhaps Jim Grosbach can comment as he is on the commit logs for the code being touched. Maybe we should rename the existing implementation to something like ObjCMCJITMemoryManager?
Regarding the tests, the code isn't quite robust enough to enable all the existing ExecutionEngine tests to pass due to known issues with external function calls and globals; but nonetheless the following existing tests do pass, at least on (Ubuntu) Linux ia64:
(existing tests)
test/ExecutionEngine/2003-01-04-PhiTest.ll
test/ExecutionEngine/2003-01-09-SARTest.ll
test/ExecutionEngine/2003-01-10-FUCOM.ll
test/ExecutionEngine/2003-01-15-AlignmentTest.ll
test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll
test/ExecutionEngine/2003-06-04-bip2-bug.ll
test/ExecutionEngine/2003-06-05-PHIBug.ll
test/ExecutionEngine/2003-08-15-AllocaAssertion.ll
test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll
test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
test/ExecutionEngine/2005-12-02-TailCallBug.ll
test/ExecutionEngine/simplesttest.ll
test/ExecutionEngine/simpletest.ll
test/ExecutionEngine/test-arith.ll
test/ExecutionEngine/test-branch.ll
test/ExecutionEngine/test-cast.ll
test/ExecutionEngine/test-constantexpr.ll
test/ExecutionEngine/test-loadstore.ll
test/ExecutionEngine/test-logical.ll
test/ExecutionEngine/test-loop.ll
test/ExecutionEngine/test-phi.ll
test/ExecutionEngine/test-ret.ll
test/ExecutionEngine/test-setcond-fp.ll
test/ExecutionEngine/test-setcond-int.ll
test/ExecutionEngine/test-shift.ll
test/ExecutionEngine/test-setcond-fp.ll
(new tests)
test/ExecutionEngine/test-call-no-external-funcs.ll
test/ExecutionEngine/test-local.ll
test/ExecutionEngine/test-return.ll
Thanks,
Dan
-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Rafael ?vila de Esp?ndola
Sent: Saturday, December 17, 2011 12:32 PM
To: Kaylor, Andrew
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] [PATCH] Add basic ELF Dyld loader (on behalf of Andy Kaylor)
On 14/12/11 04:28 PM, Kaylor, Andrew wrote:
> Hi Rafael,
>
> I'll remove the 'default' (per Eric's preference).
>
> This will run a basic program. I believe this version can even call
> functions JITted in the same module. We have a couple of
> lit+lli-based tests, which I believe will be submitted soon.
Cool, can you send an updated patch? If you can include at least one basic test in the patch, that would be perfect.
> Thanks, Andy
>
Thanks,
Rafael
_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-basic-runtimedyld-elf-loader_v3.patch
Type: application/octet-stream
Size: 40291 bytes
Desc: 0001-basic-runtimedyld-elf-loader_v3.patch
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111219/9e418630/attachment.obj
From hfinkel at anl.gov Mon Dec 19 14:19:11 2011
From: hfinkel at anl.gov (Hal Finkel)
Date: Mon, 19 Dec 2011 14:19:11 -0600
Subject: [llvm-commits] [PATCH] Allow SelectionDAGBuilder to reorder
loads past stores
In-Reply-To: <945273C4-D0AA-4CAF-B0ED-C6D96A52FE02@apple.com>
References: <1324316529.31367.96.camel@sapling>
<945273C4-D0AA-4CAF-B0ED-C6D96A52FE02@apple.com>
Message-ID: <1324325951.31367.178.camel@sapling>
On Mon, 2011-12-19 at 10:52 -0800, Evan Cheng wrote:
> Hi Hal,
>
> IMHO, this is the wrong way to fix this problem. The fundamental issue here is SelectionDAG is being used by the pre-RA scheduler so the conservative DAG building can have a significant impact on the schedule and the performance of generated code. Changing SelectionDAGBuilder to relax this is one way to go about this. But as you can tell, the current scheduler is not quite ready for this and you can see some large performance regressions.
>
Fair enough, however, I fear that whether they get the load/store
independence information from the DAG or from their own aliasing
analysis, the results will be equally good (or bad) as with the current
patch. Either way, it is the scheduling heuristics that will need
improving.
As far as I can tell, most applications exhibit a performance gain from
this patch. So *if* the regressions are caused by deficiencies in
scheduling heuristics (as opposed to problems with DAGCombine or
Legalize), it might be worthwhile eating the performance regressions for
now, and using them as use cases to improve the scheduling heuristics
(once any incorrect code generation is fixed). In the mean time, most
users should be happier ;)
> We have long understood the current scheduling strategy is wrong. The plan for 2012 is to add a MachineInstr pre-RA scheduler and leave SelectionDAG for legalizer and dag combine. The new scheduler will probably use aliasing information to reorder loads / stores.
>
The key point here is making sure that the scheduler has enough
information to make full use of the aliasing analysis. This is not
currently the case. The easiest way of doing this would be to make sure
that the scheduler has access to the original IR instructions.
Alternatively, the aliasing analysis could be enhanced to deal with ptr
+offset pairs, etc.
> The problem with changing SelectionDAGBuilder is this can negatively impact optimizations done during dag combine and legalization. So as it is the patch should not be enabled by default. At best, it can be committed but turned off. Do you have a good understanding what caused the severe regressions you have identified?
I have not yet looked into all of the regressions in detail. From what I
have seen, the ILP scheduler, once it is revealed that the loads/stores
are independent, tends to schedule many loads together in a big block,
then a block of computation, then a block of stores. This is (highly)
suboptimal compared to the original sequence in some cases.
I would be fine with submitting the patch such that it is turned off by
default. Especially while there are test-suite failures, I think that it
would need to be this way.
Thanks again,
Hal
>
> Evan
>
> On Dec 19, 2011, at 9:42 AM, Hal Finkel wrote:
>
> > The current SelectionDAGBuilder does not allow loads to be reordered
> > past stores, and does not allow stores to be reordered. This is a side
> > effect of the way the critical chain is constructed: there is a queue of
> > pending loads that is flushed (in parallel) to the root of the chain
> > upon encountering any store (and that store is also appended to the root
> > of the chain). Among other things, loop unrolling is far less effective
> > than it otherwise could be.
> >
> > The attached patch allows SelectionDAGBuilder to use the available alias
> > analysis to reorder independent loads and stores. It changes the queue
> > of pending loads into a more general queue of pending memory operations,
> > and flushes, in parallel, all potentially-conflicting loads and stores
> > as necessary.
> >
> > This can result in a significant performance boost. On my x86_64
> > machine, the average percentage decrease in execution time is ~8% (to
> > calculate my performance numbers from the test suite, I've included only
> > the 174 tests with a base execution time of at least 0.1s; the times of
> > the shorter tests seem noisy on my machine). Of these, 131 showed a
> > performance increase and 36 showed a performance decrease.
> >
> > The top-5 winners were:
> > MultiSource/Benchmarks/MiBench/consumer-typeset/consumer-typeset - 92%
> > performance increase ( = runtime decrease)
> > MultiSource/Benchmarks/llubenchmark/llu - 47% performance increase
> > MultiSource/Applications/minisat/minisat - 47% performance increase
> > MultiSource/Benchmarks/sim/sim - 40% performance increase
> > MultiSource/Benchmarks/Prolangs-C++/life/life - 35.7% performance
> > increase
> > The top-5 losers were:
> > MultiSource/Benchmarks/MiBench/consumer-lame/consumer-lame - 88%
> > performance decrease
> > MultiSource/Benchmarks/VersaBench/beamformer/beamformer - 49%
> > performance decrease
> > MultiSource/Benchmarks/MallocBench/espresso/espresso 47% performance
> > decrease
> > MultiSource/Benchmarks/MiBench/automotive-bitcount/automotive-bitcount -
> > 21% performance decrease
> > MultiSource/Benchmarks/MiBench/network-patricia/network-patricia - 20%
> > performance decrease
> >
> > The patch adds a few new options:
> > max-parallel-chains - replaces the old MaxParallelChains constant)
> > max-load-store-reorder - the maximum size of the reorder buffer -
> > previously it was unlimited, but contained only stores
> > no-reordering-past-stores - invokes the previous behavior
> >
> > Some of the regression tests had to be updated because the order of some
> > stores changed. For most of these, I just updated the test to reflect
> > the new instruction sequence. The following tests I've marked as XFAIL
> > because they would require larger changes (and I'd like someone with
> > more experience than me to make sure that they really are okay and make
> > any necessary adjustments):
> > CodeGen/X86/2008-02-22-LocalRegAllocBug.ll
> > CodeGen/X86/2010-09-17-SideEffectsInChain.ll
> > CodeGen/X86/lea-recursion.ll
> >
> > Also, there is one test-suite runtime failure on x86_64:
> > MultiSource/Benchmarks/Ptrdist/ft/ft
> >
> > And several test-suite runtime failures on i686:
> > MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4
> > SingleSource/Benchmarks/Misc-C++/Large/ray
> > SingleSource/Benchmarks/Misc-C++/stepanov_container
> > SingleSource/Benchmarks/Shootout-C++/lists
> > SingleSource/Benchmarks/Shootout-C++/lists1
> > SingleSource/Benchmarks/Shootout-C++/sieve
> >
> > Please review (and help with the test-suite failures).
> >
> > Thank you in advance,
> > Hal
> >
> > --
> > Hal Finkel
> > Postdoctoral Appointee
> > Leadership Computing Facility
> > Argonne National Laboratory
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
--
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory
From ahatanaka at mips.com Mon Dec 19 14:21:18 2011
From: ahatanaka at mips.com (Akira Hatanaka)
Date: Mon, 19 Dec 2011 20:21:18 -0000
Subject: [llvm-commits] [llvm] r146900 - in /llvm/trunk:
lib/Target/Mips/Mips64InstrInfo.td lib/Target/Mips/MipsInstrInfo.td
test/CodeGen/Mips/fcopysign.ll test/CodeGen/Mips/mips64imm.ll
Message-ID: <20111219202118.DFFD41BE003@llvm.org>
Author: ahatanak
Date: Mon Dec 19 14:21:18 2011
New Revision: 146900
URL: http://llvm.org/viewvc/llvm-project?rev=146900&view=rev
Log:
Add patterns for matching immediates whose lower 16-bit is cleared. These
patterns emit a single LUi instruction instead of a pair of LUi and ORi.
Modified:
llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td
llvm/trunk/lib/Target/Mips/MipsInstrInfo.td
llvm/trunk/test/CodeGen/Mips/fcopysign.ll
llvm/trunk/test/CodeGen/Mips/mips64imm.ll
Modified: llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td?rev=146900&r1=146899&r2=146900&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td (original)
+++ llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td Mon Dec 19 14:21:18 2011
@@ -225,6 +225,8 @@
(DADDiu ZERO_64, imm:$in)>;
def : Pat<(i64 immZExt16:$in),
(ORi64 ZERO_64, imm:$in)>;
+def : Pat<(i64 immLUiOpnd:$in),
+ (LUi64 (HI16 imm:$in))>;
// 32-bit immediates
def : Pat<(i64 immSExt32:$imm),
Modified: llvm/trunk/lib/Target/Mips/MipsInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrInfo.td?rev=146900&r1=146899&r2=146900&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsInstrInfo.td (original)
+++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.td Mon Dec 19 14:21:18 2011
@@ -219,6 +219,12 @@
return (uint64_t)N->getZExtValue() == (unsigned short)N->getZExtValue();
}], LO16>;
+// Immediate can be loaded with LUi (32-bit int with lower 16-bit cleared).
+def immLUiOpnd : PatLeaf<(imm), [{
+ int64_t Val = N->getSExtValue();
+ return isInt<32>(Val) && !(Val & 0xffff);
+}]>;
+
// shamt field must fit in 5 bits.
def immZExt5 : ImmLeaf;
@@ -933,6 +939,8 @@
(ADDiu ZERO, imm:$in)>;
def : Pat<(i32 immZExt16:$in),
(ORi ZERO, imm:$in)>;
+def : Pat<(i32 immLUiOpnd:$in),
+ (LUi (HI16 imm:$in))>;
// Arbitrary immediates
def : Pat<(i32 imm:$imm),
Modified: llvm/trunk/test/CodeGen/Mips/fcopysign.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/fcopysign.ll?rev=146900&r1=146899&r2=146900&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/fcopysign.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/fcopysign.ll Mon Dec 19 14:21:18 2011
@@ -5,9 +5,8 @@
define double @func0(double %d0, double %d1) nounwind readnone {
entry:
; MIPS32-EL: func0:
-; MIPS32-EL: lui $[[T1:[0-9]+]], 32768
-; MIPS32-EL: ori $[[MSK1:[0-9]+]], $[[T1]], 0
; MIPS32-EL: mfc1 $[[HI0:[0-9]+]], $f15
+; MIPS32-EL: lui $[[MSK1:[0-9]+]], 32768
; MIPS32-EL: and $[[AND1:[0-9]+]], $[[HI0]], $[[MSK1]]
; MIPS32-EL: lui $[[T0:[0-9]+]], 32767
; MIPS32-EL: ori $[[MSK0:[0-9]+]], $[[T0]], 65535
@@ -18,9 +17,8 @@
; MIPS32-EL: mtc1 $[[LO0]], $f0
; MIPS32-EL: mtc1 $[[OR]], $f1
;
-; MIPS32-EB: lui $[[T1:[0-9]+]], 32768
-; MIPS32-EB: ori $[[MSK1:[0-9]+]], $[[T1]], 0
; MIPS32-EB: mfc1 $[[HI1:[0-9]+]], $f14
+; MIPS32-EB: lui $[[MSK1:[0-9]+]], 32768
; MIPS32-EB: and $[[AND1:[0-9]+]], $[[HI1]], $[[MSK1]]
; MIPS32-EB: lui $[[T0:[0-9]+]], 32767
; MIPS32-EB: ori $[[MSK0:[0-9]+]], $[[T0]], 65535
@@ -46,9 +44,8 @@
define float @func1(float %f0, float %f1) nounwind readnone {
entry:
; MIPS32-EL: func1:
-; MIPS32-EL: lui $[[T1:[0-9]+]], 32768
-; MIPS32-EL: ori $[[MSK1:[0-9]+]], $[[T1]], 0
; MIPS32-EL: mfc1 $[[ARG1:[0-9]+]], $f14
+; MIPS32-EL: lui $[[MSK1:[0-9]+]], 32768
; MIPS32-EL: and $[[T3:[0-9]+]], $[[ARG1]], $[[MSK1]]
; MIPS32-EL: lui $[[T0:[0-9]+]], 32767
; MIPS32-EL: ori $[[MSK0:[0-9]+]], $[[T0]], 65535
Modified: llvm/trunk/test/CodeGen/Mips/mips64imm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/mips64imm.ll?rev=146900&r1=146899&r2=146900&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/mips64imm.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/mips64imm.ll Mon Dec 19 14:21:18 2011
@@ -1,5 +1,13 @@
; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s
+define i32 @foo1() nounwind readnone {
+entry:
+; CHECK: foo1
+; CHECK: lui ${{[0-9]+}}, 4660
+; CHECK-NOT: ori
+ ret i32 305397760
+}
+
define i64 @foo3() nounwind readnone {
entry:
; CHECK: foo3
From ahatanaka at mips.com Mon Dec 19 14:24:28 2011
From: ahatanaka at mips.com (Akira Hatanaka)
Date: Mon, 19 Dec 2011 20:24:28 -0000
Subject: [llvm-commits] [llvm] r146901 - /llvm/trunk/test/CodeGen/Mips/imm.ll
Message-ID: <20111219202428.4AED31BE003@llvm.org>
Author: ahatanak
Date: Mon Dec 19 14:24:28 2011
New Revision: 146901
URL: http://llvm.org/viewvc/llvm-project?rev=146901&view=rev
Log:
Add a test case for r146900.
Added:
llvm/trunk/test/CodeGen/Mips/imm.ll
Added: llvm/trunk/test/CodeGen/Mips/imm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/imm.ll?rev=146901&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/imm.ll (added)
+++ llvm/trunk/test/CodeGen/Mips/imm.ll Mon Dec 19 14:24:28 2011
@@ -0,0 +1,38 @@
+; RUN: llc -march=mipsel < %s | FileCheck %s
+
+define i32 @foo0() nounwind readnone {
+entry:
+; CHECK: foo0
+; CHECK: lui $[[R0:[0-9]+]], 4660
+; CHECK: ori ${{[0-9]+}}, $[[R0]], 22136
+ ret i32 305419896
+}
+
+define i32 @foo1() nounwind readnone {
+entry:
+; CHECK: foo1
+; CHECK: lui ${{[0-9]+}}, 4660
+; CHECK-NOT: ori
+ ret i32 305397760
+}
+
+define i32 @foo2() nounwind readnone {
+entry:
+; CHECK: foo2
+; CHECK: addiu ${{[0-9]+}}, $zero, 4660
+ ret i32 4660
+}
+
+define i32 @foo17() nounwind readnone {
+entry:
+; CHECK: foo17
+; CHECK: addiu ${{[0-9]+}}, $zero, -32204
+ ret i32 -32204
+}
+
+define i32 @foo18() nounwind readnone {
+entry:
+; CHECK: foo18
+; CHECK: ori ${{[0-9]+}}, $zero, 33332
+ ret i32 33332
+}
From eli.friedman at gmail.com Mon Dec 19 15:53:12 2011
From: eli.friedman at gmail.com (Eli Friedman)
Date: Mon, 19 Dec 2011 21:53:12 -0000
Subject: [llvm-commits] [llvm] r146913 -
/llvm/trunk/include/llvm/Target/TargetInstrInfo.h
Message-ID: <20111219215312.527841BE003@llvm.org>
Author: efriedma
Date: Mon Dec 19 15:53:12 2011
New Revision: 146913
URL: http://llvm.org/viewvc/llvm-project?rev=146913&view=rev
Log:
Add "using" to silence warnings.
Modified:
llvm/trunk/include/llvm/Target/TargetInstrInfo.h
Modified: llvm/trunk/include/llvm/Target/TargetInstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetInstrInfo.h?rev=146913&r1=146912&r2=146913&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetInstrInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetInstrInfo.h Mon Dec 19 15:53:12 2011
@@ -839,9 +839,11 @@
virtual bool isSchedulingBoundary(const MachineInstr *MI,
const MachineBasicBlock *MBB,
const MachineFunction &MF) const;
+ using TargetInstrInfo::getOperandLatency;
virtual int getOperandLatency(const InstrItineraryData *ItinData,
SDNode *DefNode, unsigned DefIdx,
SDNode *UseNode, unsigned UseIdx) const;
+ using TargetInstrInfo::getInstrLatency;
virtual int getInstrLatency(const InstrItineraryData *ItinData,
SDNode *Node) const;
From evan.cheng at apple.com Mon Dec 19 16:01:30 2011
From: evan.cheng at apple.com (Evan Cheng)
Date: Mon, 19 Dec 2011 22:01:30 -0000
Subject: [llvm-commits] [llvm] r146914 - in /llvm/trunk:
include/llvm/Target/TargetInstrInfo.h lib/CodeGen/IfConversion.cpp
Message-ID: <20111219220130.D6DF81BE003@llvm.org>
Author: evancheng
Date: Mon Dec 19 16:01:30 2011
New Revision: 146914
URL: http://llvm.org/viewvc/llvm-project?rev=146914&view=rev
Log:
Add a if-conversion optimization that allows 'true' side of a diamond to be
unpredicated. That is, turn
subeq r0, r1, #1
addne r0, r1, #1
into
sub r0, r1, #1
addne r0, r1, #1
For targets where conditional instructions are always executed, this may be
beneficial. It may remove pseudo anti-dependency in out-of-order execution
CPUs. e.g.
op r1, ...
str r1, [r10] ; end-of-life of r1 as div result
cmp r0, #65
movne r1, #44 ; raw dependency on previous r1
moveq r1, #12
If movne is unpredicated, then
op r1, ...
str r1, [r10]
cmp r0, #65
mov r1, #44 ; r1 written unconditionally
moveq r1, #12
Both mov and moveq are no longer depdendent on the first instruction. This gives
the out-of-order execution engine more freedom to reorder them.
This has passed entire LLVM test suite. But it has not been enabled for any ARM
variant pending more performance evaluation.
rdar://8951196
Modified:
llvm/trunk/include/llvm/Target/TargetInstrInfo.h
llvm/trunk/lib/CodeGen/IfConversion.cpp
Modified: llvm/trunk/include/llvm/Target/TargetInstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetInstrInfo.h?rev=146914&r1=146913&r2=146914&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetInstrInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetInstrInfo.h Mon Dec 19 16:01:30 2011
@@ -353,6 +353,22 @@
return false;
}
+ /// isProfitableToUnpredicate - Return true if it's profitable to unpredicate
+ /// one side of a 'diamond', i.e. two sides of if-else predicated on mutually
+ /// exclusive predicates.
+ /// e.g.
+ /// subeq r0, r1, #1
+ /// addne r0, r1, #1
+ /// =>
+ /// sub r0, r1, #1
+ /// addne r0, r1, #1
+ ///
+ /// This may be profitable is conditional instructions are always executed.
+ virtual bool isProfitableToUnpredicate(MachineBasicBlock &TMBB,
+ MachineBasicBlock &FMBB) const {
+ return false;
+ }
+
/// copyPhysReg - Emit instructions to copy a pair of physical registers.
virtual void copyPhysReg(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MI, DebugLoc DL,
Modified: llvm/trunk/lib/CodeGen/IfConversion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/IfConversion.cpp?rev=146914&r1=146913&r2=146914&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/IfConversion.cpp (original)
+++ llvm/trunk/lib/CodeGen/IfConversion.cpp Mon Dec 19 16:01:30 2011
@@ -62,6 +62,7 @@
STATISTIC(NumDiamonds, "Number of diamond if-conversions performed");
STATISTIC(NumIfConvBBs, "Number of if-converted blocks");
STATISTIC(NumDupBBs, "Number of duplicated blocks");
+STATISTIC(NumUnpred, "Number of true blocks of diamonds unpredicated");
namespace {
class IfConverter : public MachineFunctionPass {
@@ -195,7 +196,8 @@
void PredicateBlock(BBInfo &BBI,
MachineBasicBlock::iterator E,
SmallVectorImpl &Cond,
- SmallSet &Redefs);
+ SmallSet &Redefs,
+ SmallSet *LaterRedefs = 0);
void CopyAndPredicateBlock(BBInfo &ToBBI, BBInfo &FromBBI,
SmallVectorImpl &Cond,
SmallSet &Redefs,
@@ -1280,7 +1282,7 @@
BBI.BB->splice(BBI.BB->end(), BBI1->BB, BBI1->BB->begin(), DI1);
BBI2->BB->erase(BBI2->BB->begin(), DI2);
- // Predicate the 'true' block after removing its branch.
+ // Remove branch from 'true' block and remove duplicated instructions.
BBI1->NonPredSize -= TII->RemoveBranch(*BBI1->BB);
DI1 = BBI1->BB->end();
for (unsigned i = 0; i != NumDups2; ) {
@@ -1293,9 +1295,8 @@
++i;
}
BBI1->BB->erase(DI1, BBI1->BB->end());
- PredicateBlock(*BBI1, BBI1->BB->end(), *Cond1, Redefs);
- // Predicate the 'false' block.
+ // Remove 'false' block branch and find the last instruction to predicate.
BBI2->NonPredSize -= TII->RemoveBranch(*BBI2->BB);
DI2 = BBI2->BB->end();
while (NumDups2 != 0) {
@@ -1307,6 +1308,55 @@
if (!DI2->isDebugValue())
--NumDups2;
}
+
+ // Remember which registers would later be defined by the false block.
+ // This allows us not to predicate instructions in the true block that would
+ // later be re-defined. That is, rather than
+ // subeq r0, r1, #1
+ // addne r0, r1, #1
+ // generate:
+ // sub r0, r1, #1
+ // addne r0, r1, #1
+ SmallSet RedefsByFalse;
+ SmallSet ExtUses;
+ if (TII->isProfitableToUnpredicate(*BBI1->BB, *BBI2->BB)) {
+ for (MachineBasicBlock::iterator FI = BBI2->BB->begin(); FI != DI2; ++FI) {
+ if (FI->isDebugValue())
+ continue;
+ SmallVector Defs;
+ for (unsigned i = 0, e = FI->getNumOperands(); i != e; ++i) {
+ const MachineOperand &MO = FI->getOperand(i);
+ if (!MO.isReg())
+ continue;
+ unsigned Reg = MO.getReg();
+ if (!Reg)
+ continue;
+ if (MO.isDef()) {
+ Defs.push_back(Reg);
+ } else if (!RedefsByFalse.count(Reg)) {
+ // These are defined before ctrl flow reach the 'false' instructions.
+ // They cannot be modified by the 'true' instructions.
+ ExtUses.insert(Reg);
+ for (const unsigned *SR = TRI->getSubRegisters(Reg); *SR; ++SR)
+ ExtUses.insert(*SR);
+ }
+ }
+
+ for (unsigned i = 0, e = Defs.size(); i != e; ++i) {
+ unsigned Reg = Defs[i];
+ if (!ExtUses.count(Reg)) {
+ RedefsByFalse.insert(Reg);
+ for (const unsigned *SR = TRI->getSubRegisters(Reg); *SR; ++SR)
+ RedefsByFalse.insert(*SR);
+ }
+ }
+ }
+ }
+
+ // Predicate the 'true' block.
+ PredicateBlock(*BBI1, BBI1->BB->end(), *Cond1, Redefs, &RedefsByFalse);
+
+ // Predicate the 'false' block.
PredicateBlock(*BBI2, DI2, *Cond2, Redefs);
// Merge the true block into the entry of the diamond.
@@ -1355,15 +1405,49 @@
return true;
}
+static bool MaySpeculate(const MachineInstr *MI,
+ SmallSet &LaterRedefs,
+ const TargetInstrInfo *TII) {
+ bool SawStore = true;
+ if (!MI->isSafeToMove(TII, 0, SawStore))
+ return false;
+
+ for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
+ const MachineOperand &MO = MI->getOperand(i);
+ if (!MO.isReg())
+ continue;
+ unsigned Reg = MO.getReg();
+ if (!Reg)
+ continue;
+ if (MO.isDef() && !LaterRedefs.count(Reg))
+ return false;
+ }
+
+ return true;
+}
+
/// PredicateBlock - Predicate instructions from the start of the block to the
/// specified end with the specified condition.
void IfConverter::PredicateBlock(BBInfo &BBI,
MachineBasicBlock::iterator E,
SmallVectorImpl &Cond,
- SmallSet &Redefs) {
+ SmallSet &Redefs,
+ SmallSet *LaterRedefs) {
+ bool AnyUnpred = false;
+ bool MaySpec = LaterRedefs != 0;
for (MachineBasicBlock::iterator I = BBI.BB->begin(); I != E; ++I) {
if (I->isDebugValue() || TII->isPredicated(I))
continue;
+ // It may be possible not to predicate an instruction if it's the 'true'
+ // side of a diamond and the 'false' side may re-define the instruction's
+ // defs.
+ if (MaySpec && MaySpeculate(I, *LaterRedefs, TII)) {
+ AnyUnpred = true;
+ continue;
+ }
+ // If any instruction is predicated, then every instruction after it must
+ // be predicated.
+ MaySpec = false;
if (!TII->PredicateInstruction(I, Cond)) {
#ifndef NDEBUG
dbgs() << "Unable to predicate " << *I << "!\n";
@@ -1382,6 +1466,8 @@
BBI.NonPredSize = 0;
++NumIfConvBBs;
+ if (AnyUnpred)
+ ++NumUnpred;
}
/// CopyAndPredicateBlock - Copy and predicate instructions from source BB to
From evan.cheng at apple.com Mon Dec 19 17:02:42 2011
From: evan.cheng at apple.com (Evan Cheng)
Date: Mon, 19 Dec 2011 15:02:42 -0800
Subject: [llvm-commits] [PATCH] Allow SelectionDAGBuilder to reorder
loads past stores
In-Reply-To: <1324325951.31367.178.camel@sapling>
References: <1324316529.31367.96.camel@sapling>
<945273C4-D0AA-4CAF-B0ED-C6D96A52FE02@apple.com>
<1324325951.31367.178.camel@sapling>
Message-ID:
On Dec 19, 2011, at 12:19 PM, Hal Finkel wrote:
> On Mon, 2011-12-19 at 10:52 -0800, Evan Cheng wrote:
>> Hi Hal,
>>
>> IMHO, this is the wrong way to fix this problem. The fundamental issue here is SelectionDAG is being used by the pre-RA scheduler so the conservative DAG building can have a significant impact on the schedule and the performance of generated code. Changing SelectionDAGBuilder to relax this is one way to go about this. But as you can tell, the current scheduler is not quite ready for this and you can see some large performance regressions.
>>
>
> Fair enough, however, I fear that whether they get the load/store
> independence information from the DAG or from their own aliasing
> analysis, the results will be equally good (or bad) as with the current
> patch. Either way, it is the scheduling heuristics that will need
> improving.
Right. One of the argument for doing scheduling on MachineInstr's and later in the codegen pipeline is so it can make better decisions. For example, currently the pre-RA scheduler does a decent job of estimating register pressure. However, instructions are moved (LICM, sink), deleted (coalescing, CSE) so by definition the scheduler is working with half accurate information.
>
> As far as I can tell, most applications exhibit a performance gain from
> this patch. So *if* the regressions are caused by deficiencies in
> scheduling heuristics (as opposed to problems with DAGCombine or
> Legalize), it might be worthwhile eating the performance regressions for
> now, and using them as use cases to improve the scheduling heuristics
> (once any incorrect code generation is fixed). In the mean time, most
> users should be happier ;)
Unfortunately, we can't allow changes that cause massive regressions. For example, 88% regressions to LAME encoding. Even if that means a lot of other benchmarks are benefiting from the change. These regressions have to be studied, understood, and fixed before the change can be enabled.
>
>> We have long understood the current scheduling strategy is wrong. The plan for 2012 is to add a MachineInstr pre-RA scheduler and leave SelectionDAG for legalizer and dag combine. The new scheduler will probably use aliasing information to reorder loads / stores.
>>
>
> The key point here is making sure that the scheduler has enough
> information to make full use of the aliasing analysis. This is not
> currently the case. The easiest way of doing this would be to make sure
> that the scheduler has access to the original IR instructions.
> Alternatively, the aliasing analysis could be enhanced to deal with ptr
> +offset pairs, etc.
>
>> The problem with changing SelectionDAGBuilder is this can negatively impact optimizations done during dag combine and legalization. So as it is the patch should not be enabled by default. At best, it can be committed but turned off. Do you have a good understanding what caused the severe regressions you have identified?
>
> I have not yet looked into all of the regressions in detail. From what I
> have seen, the ILP scheduler, once it is revealed that the loads/stores
> are independent, tends to schedule many loads together in a big block,
> then a block of computation, then a block of stores. This is (highly)
> suboptimal compared to the original sequence in some cases.
Right and this should be fixed.
>
> I would be fine with submitting the patch such that it is turned off by
> default. Especially while there are test-suite failures, I think that it
> would need to be this way.
That's a reasonable compromise. Someone will have review the patch carefully first though.
BTW, what's the compile time impact?
Evan
>
> Thanks again,
> Hal
>
>>
>> Evan
>>
>> On Dec 19, 2011, at 9:42 AM, Hal Finkel wrote:
>>
>>> The current SelectionDAGBuilder does not allow loads to be reordered
>>> past stores, and does not allow stores to be reordered. This is a side
>>> effect of the way the critical chain is constructed: there is a queue of
>>> pending loads that is flushed (in parallel) to the root of the chain
>>> upon encountering any store (and that store is also appended to the root
>>> of the chain). Among other things, loop unrolling is far less effective
>>> than it otherwise could be.
>>>
>>> The attached patch allows SelectionDAGBuilder to use the available alias
>>> analysis to reorder independent loads and stores. It changes the queue
>>> of pending loads into a more general queue of pending memory operations,
>>> and flushes, in parallel, all potentially-conflicting loads and stores
>>> as necessary.
>>>
>>> This can result in a significant performance boost. On my x86_64
>>> machine, the average percentage decrease in execution time is ~8% (to
>>> calculate my performance numbers from the test suite, I've included only
>>> the 174 tests with a base execution time of at least 0.1s; the times of
>>> the shorter tests seem noisy on my machine). Of these, 131 showed a
>>> performance increase and 36 showed a performance decrease.
>>>
>>> The top-5 winners were:
>>> MultiSource/Benchmarks/MiBench/consumer-typeset/consumer-typeset - 92%
>>> performance increase ( = runtime decrease)
>>> MultiSource/Benchmarks/llubenchmark/llu - 47% performance increase
>>> MultiSource/Applications/minisat/minisat - 47% performance increase
>>> MultiSource/Benchmarks/sim/sim - 40% performance increase
>>> MultiSource/Benchmarks/Prolangs-C++/life/life - 35.7% performance
>>> increase
>>> The top-5 losers were:
>>> MultiSource/Benchmarks/MiBench/consumer-lame/consumer-lame - 88%
>>> performance decrease
>>> MultiSource/Benchmarks/VersaBench/beamformer/beamformer - 49%
>>> performance decrease
>>> MultiSource/Benchmarks/MallocBench/espresso/espresso 47% performance
>>> decrease
>>> MultiSource/Benchmarks/MiBench/automotive-bitcount/automotive-bitcount -
>>> 21% performance decrease
>>> MultiSource/Benchmarks/MiBench/network-patricia/network-patricia - 20%
>>> performance decrease
>>>
>>> The patch adds a few new options:
>>> max-parallel-chains - replaces the old MaxParallelChains constant)
>>> max-load-store-reorder - the maximum size of the reorder buffer -
>>> previously it was unlimited, but contained only stores
>>> no-reordering-past-stores - invokes the previous behavior
>>>
>>> Some of the regression tests had to be updated because the order of some
>>> stores changed. For most of these, I just updated the test to reflect
>>> the new instruction sequence. The following tests I've marked as XFAIL
>>> because they would require larger changes (and I'd like someone with
>>> more experience than me to make sure that they really are okay and make
>>> any necessary adjustments):
>>> CodeGen/X86/2008-02-22-LocalRegAllocBug.ll
>>> CodeGen/X86/2010-09-17-SideEffectsInChain.ll
>>> CodeGen/X86/lea-recursion.ll
>>>
>>> Also, there is one test-suite runtime failure on x86_64:
>>> MultiSource/Benchmarks/Ptrdist/ft/ft
>>>
>>> And several test-suite runtime failures on i686:
>>> MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4
>>> SingleSource/Benchmarks/Misc-C++/Large/ray
>>> SingleSource/Benchmarks/Misc-C++/stepanov_container
>>> SingleSource/Benchmarks/Shootout-C++/lists
>>> SingleSource/Benchmarks/Shootout-C++/lists1
>>> SingleSource/Benchmarks/Shootout-C++/sieve
>>>
>>> Please review (and help with the test-suite failures).
>>>
>>> Thank you in advance,
>>> Hal
>>>
>>> --
>>> Hal Finkel
>>> Postdoctoral Appointee
>>> Leadership Computing Facility
>>> Argonne National Laboratory
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
> --
> Hal Finkel
> Postdoctoral Appointee
> Leadership Computing Facility
> Argonne National Laboratory
>
From grosbach at apple.com Mon Dec 19 17:06:25 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 19 Dec 2011 23:06:25 -0000
Subject: [llvm-commits] [llvm] r146921 - in /llvm/trunk:
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h
lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
test/MC/ARM/arm-memory-instructions.s
Message-ID: <20111219230625.25DFC1BE003@llvm.org>
Author: grosbach
Date: Mon Dec 19 17:06:24 2011
New Revision: 146921
URL: http://llvm.org/viewvc/llvm-project?rev=146921&view=rev
Log:
ARM assembly parsing and encoding support for LDRD(label).
rdar://9932658
Modified:
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h
llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
llvm/trunk/test/MC/ARM/arm-memory-instructions.s
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=146921&r1=146920&r2=146921&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Dec 19 17:06:24 2011
@@ -880,6 +880,11 @@
return Val > -4096 && Val < 4096;
}
bool isAddrMode3() const {
+ // If we have an immediate that's not a constant, treat it as a label
+ // reference needing a fixup. If it is a constant, it's something else
+ // and we reject it.
+ if (Kind == k_Immediate && !isa(getImm()))
+ return true;
if (!isMemory() || Memory.Alignment != 0) return false;
// No shifts are legal for AM3.
if (Memory.ShiftType != ARM_AM::no_shift) return false;
@@ -992,6 +997,11 @@
return Val >= 0 && Val <= 1020 && (Val % 4) == 0;
}
bool isMemImm8s4Offset() const {
+ // If we have an immediate that's not a constant, treat it as a label
+ // reference needing a fixup. If it is a constant, it's something else
+ // and we reject it.
+ if (Kind == k_Immediate && !isa(getImm()))
+ return true;
if (!isMemory() || Memory.OffsetRegNum != 0 || Memory.Alignment != 0)
return false;
// Immediate offset a multiple of 4 in range [-1020, 1020].
@@ -1488,6 +1498,16 @@
void addAddrMode3Operands(MCInst &Inst, unsigned N) const {
assert(N == 3 && "Invalid number of operands!");
+ // If we have an immediate that's not a constant, treat it as a label
+ // reference needing a fixup. If it is a constant, it's something else
+ // and we reject it.
+ if (isImm()) {
+ Inst.addOperand(MCOperand::CreateExpr(getImm()));
+ Inst.addOperand(MCOperand::CreateReg(0));
+ Inst.addOperand(MCOperand::CreateImm(0));
+ return;
+ }
+
int32_t Val = Memory.OffsetImm ? Memory.OffsetImm->getValue() : 0;
if (!Memory.OffsetRegNum) {
ARM_AM::AddrOpc AddSub = Val < 0 ? ARM_AM::sub : ARM_AM::add;
@@ -1551,6 +1571,15 @@
void addMemImm8s4OffsetOperands(MCInst &Inst, unsigned N) const {
assert(N == 2 && "Invalid number of operands!");
+ // If we have an immediate that's not a constant, treat it as a label
+ // reference needing a fixup. If it is a constant, it's something else
+ // and we reject it.
+ if (isImm()) {
+ Inst.addOperand(MCOperand::CreateExpr(getImm()));
+ Inst.addOperand(MCOperand::CreateImm(0));
+ return;
+ }
+
int64_t Val = Memory.OffsetImm ? Memory.OffsetImm->getValue() : 0;
Inst.addOperand(MCOperand::CreateReg(Memory.BaseRegNum));
Inst.addOperand(MCOperand::CreateImm(Val));
Modified: llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp?rev=146921&r1=146920&r2=146921&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp Mon Dec 19 17:06:24 2011
@@ -436,6 +436,12 @@
void ARMInstPrinter::printAddrMode3Operand(const MCInst *MI, unsigned Op,
raw_ostream &O) {
+ const MCOperand &MO1 = MI->getOperand(Op);
+ if (!MO1.isReg()) { // For label symbolic references.
+ printOperand(MI, Op, O);
+ return;
+ }
+
const MCOperand &MO3 = MI->getOperand(Op+2);
unsigned IdxMode = ARM_AM::getAM3IdxMode(MO3.getImm());
@@ -885,6 +891,11 @@
const MCOperand &MO1 = MI->getOperand(OpNum);
const MCOperand &MO2 = MI->getOperand(OpNum+1);
+ if (!MO1.isReg()) { // For label symbolic references.
+ printOperand(MI, OpNum, O);
+ return;
+ }
+
O << "[" << getRegisterName(MO1.getReg());
int32_t OffImm = (int32_t)MO2.getImm() / 4;
Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp?rev=146921&r1=146920&r2=146921&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Mon Dec 19 17:06:24 2011
@@ -63,6 +63,7 @@
{ "fixup_arm_ldst_pcrel_12", 0, 32, MCFixupKindInfo::FKF_IsPCRel },
{ "fixup_t2_ldst_pcrel_12", 0, 32, MCFixupKindInfo::FKF_IsPCRel |
MCFixupKindInfo::FKF_IsAlignedDownTo32Bits},
+{ "fixup_arm_pcrel_10_unscaled", 0, 32, MCFixupKindInfo::FKF_IsPCRel },
{ "fixup_arm_pcrel_10", 0, 32, MCFixupKindInfo::FKF_IsPCRel },
{ "fixup_t2_pcrel_10", 0, 32, MCFixupKindInfo::FKF_IsPCRel |
MCFixupKindInfo::FKF_IsAlignedDownTo32Bits},
@@ -399,6 +400,17 @@
case ARM::fixup_arm_thumb_bcc:
// Offset by 4 and don't encode the lower bit, which is always 0.
return ((Value - 4) >> 1) & 0xff;
+ case ARM::fixup_arm_pcrel_10_unscaled: {
+ Value = Value - 8; // ARM fixups offset by an additional word and don't
+ // need to adjust for the half-word ordering.
+ bool isAdd = true;
+ if ((int64_t)Value < 0) {
+ Value = -Value;
+ isAdd = false;
+ }
+ assert ((Value < 256) && "Out of range pc-relative fixup value!");
+ return Value | (isAdd << 23);
+ }
case ARM::fixup_arm_pcrel_10:
Value = Value - 4; // ARM fixups offset by an additional word and don't
// need to adjust for the half-word ordering.
@@ -416,8 +428,8 @@
assert ((Value < 256) && "Out of range pc-relative fixup value!");
Value |= isAdd << 23;
- // Same addressing mode as fixup_arm_pcrel_10,
- // but with 16-bit halfwords swapped.
+ // Same addressing mode as fixup_arm_pcrel_10, but with 16-bit halfwords
+ // swapped.
if (Kind == ARM::fixup_t2_pcrel_10) {
uint32_t swapped = (Value & 0xFFFF0000) >> 16;
swapped |= (Value & 0x0000FFFF) << 16;
@@ -504,6 +516,7 @@
case ARM::fixup_arm_thumb_cb:
return 2;
+ case ARM::fixup_arm_pcrel_10_unscaled:
case ARM::fixup_arm_ldst_pcrel_12:
case ARM::fixup_arm_pcrel_10:
case ARM::fixup_arm_adr_pcrel_12:
Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h?rev=146921&r1=146920&r2=146921&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h (original)
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h Mon Dec 19 17:06:24 2011
@@ -23,6 +23,9 @@
// the 16-bit halfwords reordered.
fixup_t2_ldst_pcrel_12,
+ // fixup_arm_pcrel_10_unscaled - 10-bit PC relative relocation for symbol
+ // addresses used in LDRD/LDRH/LDRB/etc. instructions. All bits are encoded.
+ fixup_arm_pcrel_10_unscaled,
// fixup_arm_pcrel_10 - 10-bit PC relative relocation for symbol addresses
// used in VFP instructions where the lower 2 bits are not encoded
// (so it's encoded as an 8-bit immediate).
Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp?rev=146921&r1=146920&r2=146921&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp Mon Dec 19 17:06:24 2011
@@ -791,7 +791,7 @@
assert(MO.isExpr() && "Unexpected machine operand type!");
const MCExpr *Expr = MO.getExpr();
- MCFixupKind Kind = MCFixupKind(ARM::fixup_arm_pcrel_10);
+ MCFixupKind Kind = MCFixupKind(ARM::fixup_t2_pcrel_10);
Fixups.push_back(MCFixup::Create(0, Expr, Kind));
++MCNumCPRelocations;
@@ -993,6 +993,19 @@
const MCOperand &MO = MI.getOperand(OpIdx);
const MCOperand &MO1 = MI.getOperand(OpIdx+1);
const MCOperand &MO2 = MI.getOperand(OpIdx+2);
+
+ // If The first operand isn't a register, we have a label reference.
+ if (!MO.isReg()) {
+ unsigned Rn = getARMRegisterNumbering(ARM::PC); // Rn is PC.
+
+ assert(MO.isExpr() && "Unexpected machine operand type!");
+ const MCExpr *Expr = MO.getExpr();
+ MCFixupKind Kind = MCFixupKind(ARM::fixup_arm_pcrel_10_unscaled);
+ Fixups.push_back(MCFixup::Create(0, Expr, Kind));
+
+ ++MCNumCPRelocations;
+ return (Rn << 9) | (1 << 13);
+ }
unsigned Rn = getARMRegisterNumbering(MO.getReg());
unsigned Imm = MO2.getImm();
bool isAdd = ARM_AM::getAM3Op(Imm) == ARM_AM::add;
Modified: llvm/trunk/test/MC/ARM/arm-memory-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/arm-memory-instructions.s?rev=146921&r1=146920&r2=146921&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/arm-memory-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/arm-memory-instructions.s Mon Dec 19 17:06:24 2011
@@ -130,8 +130,13 @@
@------------------------------------------------------------------------------
-@ FIXME: LDRD (label)
+@ LDRD (label)
@------------------------------------------------------------------------------
+ ldrd r2, r3, Lbaz
+Lbaz: .quad 0
+
+@ CHECK: ldrd r2, r3, Lbaz @ encoding: [0xd0'A',0x20'A',0x4f'A',0xe1'A']
+
@------------------------------------------------------------------------------
@ LDRD (register)
From evan.cheng at apple.com Mon Dec 19 17:26:44 2011
From: evan.cheng at apple.com (Evan Cheng)
Date: Mon, 19 Dec 2011 23:26:44 -0000
Subject: [llvm-commits] [llvm] r146923 - in /llvm/trunk/test/CodeGen/ARM:
ifcvt1.ll ifcvt3.ll
Message-ID: <20111219232644.556B11BE003@llvm.org>
Author: evancheng
Date: Mon Dec 19 17:26:44 2011
New Revision: 146923
URL: http://llvm.org/viewvc/llvm-project?rev=146923&view=rev
Log:
Move tests to FileCheck.
Modified:
llvm/trunk/test/CodeGen/ARM/ifcvt1.ll
llvm/trunk/test/CodeGen/ARM/ifcvt3.ll
Modified: llvm/trunk/test/CodeGen/ARM/ifcvt1.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/ifcvt1.ll?rev=146923&r1=146922&r2=146923&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/ifcvt1.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/ifcvt1.ll Mon Dec 19 17:26:44 2011
@@ -1,15 +1,17 @@
-; RUN: llc < %s -march=arm -mattr=+v4t
-; RUN: llc < %s -march=arm -mattr=+v4t | grep bx | count 1
+; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s
define i32 @t1(i32 %a, i32 %b) {
+; CHECK: t1:
%tmp2 = icmp eq i32 %a, 0
br i1 %tmp2, label %cond_false, label %cond_true
cond_true:
+; CHECK: subeq r0, r1, #1
%tmp5 = add i32 %b, 1
ret i32 %tmp5
cond_false:
+; CHECK: addne r0, r1, #1
%tmp7 = add i32 %b, -1
ret i32 %tmp7
}
Modified: llvm/trunk/test/CodeGen/ARM/ifcvt3.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/ifcvt3.ll?rev=146923&r1=146922&r2=146923&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/ifcvt3.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/ifcvt3.ll Mon Dec 19 17:26:44 2011
@@ -1,14 +1,19 @@
-; RUN: llc < %s -march=arm -mattr=+v4t
+; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s
; RUN: llc < %s -march=arm -mattr=+v4t | grep cmpne | count 1
; RUN: llc < %s -march=arm -mattr=+v4t | grep bx | count 2
define i32 @t1(i32 %a, i32 %b, i32 %c, i32 %d) {
+; CHECK: t1:
+; CHECK: cmp r2, #1
+; CHECK: cmpne r2, #7
switch i32 %c, label %cond_next [
i32 1, label %cond_true
i32 7, label %cond_true
]
cond_true:
+; CHECK: addne r0
+; CHECK: bxne
%tmp12 = add i32 %a, 1
%tmp1518 = add i32 %tmp12, %b
ret i32 %tmp1518
From grosbach at apple.com Mon Dec 19 17:51:07 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Mon, 19 Dec 2011 23:51:07 -0000
Subject: [llvm-commits] [llvm] r146925 - in /llvm/trunk/lib/Target/ARM:
ARMInstrNEON.td AsmParser/ARMAsmParser.cpp
Message-ID: <20111219235107.8B3101BE003@llvm.org>
Author: grosbach
Date: Mon Dec 19 17:51:07 2011
New Revision: 146925
URL: http://llvm.org/viewvc/llvm-project?rev=146925&view=rev
Log:
ARM NEON assembly aliases for VMOV<-->VMVN for i32 immediates.
e.g., "vmov.i32 d4, #-118" can be assembled as "vmvn.i32 d4, #117"
rdar://10603913
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMInstrNEON.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrNEON.td?rev=146925&r1=146924&r2=146925&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrNEON.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrNEON.td Mon Dec 19 17:51:07 2011
@@ -39,6 +39,11 @@
let PrintMethod = "printNEONModImmOperand";
let ParserMatchClass = nImmVMOVI32AsmOperand;
}
+def nImmVMOVI32NegAsmOperand : AsmOperandClass { let Name = "NEONi32vmovNeg"; }
+def nImmVMOVI32Neg : Operand {
+ let PrintMethod = "printNEONModImmOperand";
+ let ParserMatchClass = nImmVMOVI32NegAsmOperand;
+}
def nImmVMOVF32 : Operand {
let PrintMethod = "printFPImmOperand";
let ParserMatchClass = FPImmOperand;
@@ -5949,6 +5954,16 @@
def : NEONInstAlias<"vpadd${p}.f32 $Vdn, $Vm",
(VPADDf DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
+// "vmov Rd, #-imm" can be handled via "vmvn".
+def : NEONInstAlias<"vmov${p}.i32 $Vd, $imm",
+ (VMVNv2i32 DPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>;
+def : NEONInstAlias<"vmov${p}.i32 $Vd, $imm",
+ (VMVNv4i32 QPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>;
+def : NEONInstAlias<"vmvn${p}.i32 $Vd, $imm",
+ (VMOVv2i32 DPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>;
+def : NEONInstAlias<"vmvn${p}.i32 $Vd, $imm",
+ (VMOVv4i32 QPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>;
+
// 'gas' compatibility aliases for quad-word instructions. Strictly speaking,
// these should restrict to just the Q register variants, but the register
// classes are enough to match correctly regardless, so we keep it simple
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=146925&r1=146924&r2=146925&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Dec 19 17:51:07 2011
@@ -1222,6 +1222,22 @@
(Value >= 0x01ff && Value <= 0xffff && (Value & 0xff) == 0xff) ||
(Value >= 0x01ffff && Value <= 0xffffff && (Value & 0xffff) == 0xffff);
}
+ bool isNEONi32vmovNeg() const {
+ if (Kind != k_Immediate)
+ return false;
+ const MCConstantExpr *CE = dyn_cast(getImm());
+ // Must be a constant.
+ if (!CE) return false;
+ int64_t Value = ~CE->getValue();
+ // i32 value with set bits only in one byte X000, 0X00, 00X0, or 000X,
+ // for VMOV/VMVN only, 00Xf or 0Xff are also accepted.
+ return (Value >= 0 && Value < 256) ||
+ (Value >= 0x0100 && Value <= 0xff00) ||
+ (Value >= 0x010000 && Value <= 0xff0000) ||
+ (Value >= 0x01000000 && Value <= 0xff000000) ||
+ (Value >= 0x01ff && Value <= 0xffff && (Value & 0xff) == 0xff) ||
+ (Value >= 0x01ffff && Value <= 0xffffff && (Value & 0xffff) == 0xffff);
+ }
bool isNEONi64splat() const {
if (Kind != k_Immediate)
@@ -1825,6 +1841,20 @@
Inst.addOperand(MCOperand::CreateImm(Value));
}
+ void addNEONi32vmovNegOperands(MCInst &Inst, unsigned N) const {
+ assert(N == 1 && "Invalid number of operands!");
+ // The immediate encodes the type of constant as well as the value.
+ const MCConstantExpr *CE = dyn_cast(getImm());
+ unsigned Value = ~CE->getValue();
+ if (Value >= 256 && Value <= 0xffff)
+ Value = (Value >> 8) | ((Value & 0xff) ? 0xc00 : 0x200);
+ else if (Value > 0xffff && Value <= 0xffffff)
+ Value = (Value >> 16) | ((Value & 0xff) ? 0xd00 : 0x400);
+ else if (Value > 0xffffff)
+ Value = (Value >> 24) | 0x600;
+ Inst.addOperand(MCOperand::CreateImm(Value));
+ }
+
void addNEONi64splatOperands(MCInst &Inst, unsigned N) const {
assert(N == 1 && "Invalid number of operands!");
// The immediate encodes the type of constant as well as the value.
From gohman at apple.com Mon Dec 19 18:02:34 2011
From: gohman at apple.com (Dan Gohman)
Date: Tue, 20 Dec 2011 00:02:34 -0000
Subject: [llvm-commits] [llvm] r146927 - in /llvm/trunk:
include/llvm/CodeGen/ValueTypes.h include/llvm/CodeGen/ValueTypes.td
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/TargetData.cpp
lib/VMCore/ValueTypes.cpp utils/TableGen/CodeGenTarget.cpp
utils/TableGen/IntrinsicEmitter.cpp
Message-ID: <20111220000234.333E51BE003@llvm.org>
Author: djg
Date: Mon Dec 19 18:02:33 2011
New Revision: 146927
URL: http://llvm.org/viewvc/llvm-project?rev=146927&view=rev
Log:
Add basic generic CodeGen support for half.
Modified:
llvm/trunk/include/llvm/CodeGen/ValueTypes.h
llvm/trunk/include/llvm/CodeGen/ValueTypes.td
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/trunk/lib/Target/TargetData.cpp
llvm/trunk/lib/VMCore/ValueTypes.cpp
llvm/trunk/utils/TableGen/CodeGenTarget.cpp
llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp
Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.h?rev=146927&r1=146926&r2=146927&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Mon Dec 19 18:02:33 2011
@@ -45,49 +45,50 @@
FIRST_INTEGER_VALUETYPE = i1,
LAST_INTEGER_VALUETYPE = i128,
- f32 = 7, // This is a 32 bit floating point value
- f64 = 8, // This is a 64 bit floating point value
- f80 = 9, // This is a 80 bit floating point value
- f128 = 10, // This is a 128 bit floating point value
- ppcf128 = 11, // This is a PPC 128-bit floating point value
-
- v2i8 = 12, // 2 x i8
- v4i8 = 13, // 4 x i8
- v8i8 = 14, // 8 x i8
- v16i8 = 15, // 16 x i8
- v32i8 = 16, // 32 x i8
- v2i16 = 17, // 2 x i16
- v4i16 = 18, // 4 x i16
- v8i16 = 19, // 8 x i16
- v16i16 = 20, // 16 x i16
- v2i32 = 21, // 2 x i32
- v4i32 = 22, // 4 x i32
- v8i32 = 23, // 8 x i32
- v1i64 = 24, // 1 x i64
- v2i64 = 25, // 2 x i64
- v4i64 = 26, // 4 x i64
- v8i64 = 27, // 8 x i64
-
- v2f32 = 28, // 2 x f32
- v4f32 = 29, // 4 x f32
- v8f32 = 30, // 8 x f32
- v2f64 = 31, // 2 x f64
- v4f64 = 32, // 4 x f64
+ f16 = 7, // This is a 16 bit floating point value
+ f32 = 8, // This is a 32 bit floating point value
+ f64 = 9, // This is a 64 bit floating point value
+ f80 = 10, // This is a 80 bit floating point value
+ f128 = 11, // This is a 128 bit floating point value
+ ppcf128 = 12, // This is a PPC 128-bit floating point value
+
+ v2i8 = 13, // 2 x i8
+ v4i8 = 14, // 4 x i8
+ v8i8 = 15, // 8 x i8
+ v16i8 = 16, // 16 x i8
+ v32i8 = 17, // 32 x i8
+ v2i16 = 18, // 2 x i16
+ v4i16 = 19, // 4 x i16
+ v8i16 = 20, // 8 x i16
+ v16i16 = 21, // 16 x i16
+ v2i32 = 22, // 2 x i32
+ v4i32 = 23, // 4 x i32
+ v8i32 = 24, // 8 x i32
+ v1i64 = 25, // 1 x i64
+ v2i64 = 26, // 2 x i64
+ v4i64 = 27, // 4 x i64
+ v8i64 = 28, // 8 x i64
+
+ v2f32 = 29, // 2 x f32
+ v4f32 = 30, // 4 x f32
+ v8f32 = 31, // 8 x f32
+ v2f64 = 32, // 2 x f64
+ v4f64 = 33, // 4 x f64
FIRST_VECTOR_VALUETYPE = v2i8,
LAST_VECTOR_VALUETYPE = v4f64,
- x86mmx = 33, // This is an X86 MMX value
+ x86mmx = 34, // This is an X86 MMX value
- Glue = 34, // This glues nodes together during pre-RA sched
+ Glue = 35, // This glues nodes together during pre-RA sched
- isVoid = 35, // This has no value
+ isVoid = 36, // This has no value
- Untyped = 36, // This value takes a register, but has
+ Untyped = 37, // This value takes a register, but has
// unspecified type. The register class
// will be determined by the opcode.
- LAST_VALUETYPE = 37, // This always remains at the end of the list.
+ LAST_VALUETYPE = 38, // This always remains at the end of the list.
// This is the current maximum for LAST_VALUETYPE.
// MVT::MAX_ALLOWED_VALUETYPE is used for asserts and to size bit vectors
@@ -143,7 +144,7 @@
/// isFloatingPoint - Return true if this is a FP, or a vector FP type.
bool isFloatingPoint() const {
- return ((SimpleTy >= MVT::f32 && SimpleTy <= MVT::ppcf128) ||
+ return ((SimpleTy >= MVT::f16 && SimpleTy <= MVT::ppcf128) ||
(SimpleTy >= MVT::v2f32 && SimpleTy <= MVT::v4f64));
}
@@ -252,6 +253,7 @@
case i1 : return 1;
case i8 : return 8;
case i16 :
+ case f16:
case v2i8: return 16;
case f32 :
case i32 :
@@ -301,6 +303,8 @@
switch (BitWidth) {
default:
assert(false && "Bad bit width!");
+ case 16:
+ return MVT::f16;
case 32:
return MVT::f32;
case 64:
Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.td?rev=146927&r1=146926&r2=146927&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ValueTypes.td (original)
+++ llvm/trunk/include/llvm/CodeGen/ValueTypes.td Mon Dec 19 18:02:33 2011
@@ -26,39 +26,40 @@
def i32 : ValueType<32 , 4>; // 32-bit integer value
def i64 : ValueType<64 , 5>; // 64-bit integer value
def i128 : ValueType<128, 6>; // 128-bit integer value
-def f32 : ValueType<32 , 7>; // 32-bit floating point value
-def f64 : ValueType<64 , 8>; // 64-bit floating point value
-def f80 : ValueType<80 , 9>; // 80-bit floating point value
-def f128 : ValueType<128, 10>; // 128-bit floating point value
-def ppcf128: ValueType<128, 11>; // PPC 128-bit floating point value
-
-def v2i8 : ValueType<16 , 12>; // 2 x i8 vector value
-def v4i8 : ValueType<32 , 13>; // 4 x i8 vector value
-def v8i8 : ValueType<64 , 14>; // 8 x i8 vector value
-def v16i8 : ValueType<128, 15>; // 16 x i8 vector value
-def v32i8 : ValueType<256, 16>; // 32 x i8 vector value
-def v2i16 : ValueType<32 , 17>; // 2 x i16 vector value
-def v4i16 : ValueType<64 , 18>; // 4 x i16 vector value
-def v8i16 : ValueType<128, 19>; // 8 x i16 vector value
-def v16i16 : ValueType<256, 20>; // 16 x i16 vector value
-def v2i32 : ValueType<64 , 21>; // 2 x i32 vector value
-def v4i32 : ValueType<128, 22>; // 4 x i32 vector value
-def v8i32 : ValueType<256, 23>; // 8 x i32 vector value
-def v1i64 : ValueType<64 , 24>; // 1 x i64 vector value
-def v2i64 : ValueType<128, 25>; // 2 x i64 vector value
-def v4i64 : ValueType<256, 26>; // 4 x i64 vector value
-def v8i64 : ValueType<512, 27>; // 8 x i64 vector value
-
-def v2f32 : ValueType<64 , 28>; // 2 x f32 vector value
-def v4f32 : ValueType<128, 29>; // 4 x f32 vector value
-def v8f32 : ValueType<256, 30>; // 8 x f32 vector value
-def v2f64 : ValueType<128, 31>; // 2 x f64 vector value
-def v4f64 : ValueType<256, 32>; // 4 x f64 vector value
-
-def x86mmx : ValueType<64 , 33>; // X86 MMX value
-def FlagVT : ValueType<0 , 34>; // Pre-RA sched glue
-def isVoid : ValueType<0 , 35>; // Produces no value
-def untyped: ValueType<8 , 36>; // Produces an untyped value
+def f16 : ValueType<16 , 7>; // 32-bit floating point value
+def f32 : ValueType<32 , 8>; // 32-bit floating point value
+def f64 : ValueType<64 , 9>; // 64-bit floating point value
+def f80 : ValueType<80 , 10>; // 80-bit floating point value
+def f128 : ValueType<128, 11>; // 128-bit floating point value
+def ppcf128: ValueType<128, 12>; // PPC 128-bit floating point value
+
+def v2i8 : ValueType<16 , 13>; // 2 x i8 vector value
+def v4i8 : ValueType<32 , 14>; // 4 x i8 vector value
+def v8i8 : ValueType<64 , 15>; // 8 x i8 vector value
+def v16i8 : ValueType<128, 16>; // 16 x i8 vector value
+def v32i8 : ValueType<256, 17>; // 32 x i8 vector value
+def v2i16 : ValueType<32 , 18>; // 2 x i16 vector value
+def v4i16 : ValueType<64 , 19>; // 4 x i16 vector value
+def v8i16 : ValueType<128, 20>; // 8 x i16 vector value
+def v16i16 : ValueType<256, 21>; // 16 x i16 vector value
+def v2i32 : ValueType<64 , 22>; // 2 x i32 vector value
+def v4i32 : ValueType<128, 23>; // 4 x i32 vector value
+def v8i32 : ValueType<256, 24>; // 8 x i32 vector value
+def v1i64 : ValueType<64 , 25>; // 1 x i64 vector value
+def v2i64 : ValueType<128, 26>; // 2 x i64 vector value
+def v4i64 : ValueType<256, 27>; // 4 x i64 vector value
+def v8i64 : ValueType<512, 28>; // 8 x i64 vector value
+
+def v2f32 : ValueType<64 , 29>; // 2 x f32 vector value
+def v4f32 : ValueType<128, 30>; // 4 x f32 vector value
+def v8f32 : ValueType<256, 31>; // 8 x f32 vector value
+def v2f64 : ValueType<128, 32>; // 2 x f64 vector value
+def v4f64 : ValueType<256, 33>; // 4 x f64 vector value
+
+def x86mmx : ValueType<64 , 34>; // X86 MMX value
+def FlagVT : ValueType<0 , 35>; // Pre-RA sched glue
+def isVoid : ValueType<0 , 36>; // Produces no value
+def untyped: ValueType<8 , 37>; // Produces an untyped value
def MetadataVT: ValueType<0, 250>; // Metadata
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=146927&r1=146926&r2=146927&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon Dec 19 18:02:33 2011
@@ -1694,16 +1694,14 @@
static void EmitGlobalConstantFP(const ConstantFP *CFP, unsigned AddrSpace,
AsmPrinter &AP) {
- // FP Constants are printed as integer constants to avoid losing
- // precision.
- if (CFP->getType()->isDoubleTy()) {
+ if (CFP->getType()->isHalfTy()) {
if (AP.isVerbose()) {
- double Val = CFP->getValueAPF().convertToDouble();
- AP.OutStreamer.GetCommentOS() << "double " << Val << '\n';
+ SmallString<10> Str;
+ CFP->getValueAPF().toString(Str);
+ AP.OutStreamer.GetCommentOS() << "half " << Str << '\n';
}
-
uint64_t Val = CFP->getValueAPF().bitcastToAPInt().getZExtValue();
- AP.OutStreamer.EmitIntValue(Val, 8, AddrSpace);
+ AP.OutStreamer.EmitIntValue(Val, 2, AddrSpace);
return;
}
@@ -1717,6 +1715,19 @@
return;
}
+ // FP Constants are printed as integer constants to avoid losing
+ // precision.
+ if (CFP->getType()->isDoubleTy()) {
+ if (AP.isVerbose()) {
+ double Val = CFP->getValueAPF().convertToDouble();
+ AP.OutStreamer.GetCommentOS() << "double " << Val << '\n';
+ }
+
+ uint64_t Val = CFP->getValueAPF().bitcastToAPInt().getZExtValue();
+ AP.OutStreamer.EmitIntValue(Val, 8, AddrSpace);
+ return;
+ }
+
if (CFP->getType()->isX86_FP80Ty()) {
// all long double variants are printed as hex
// API needed to prevent premature destruction
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=146927&r1=146926&r2=146927&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Mon Dec 19 18:02:33 2011
@@ -572,21 +572,22 @@
// ConstantFP nodes default to expand. Targets can either change this to
// Legal, in which case all fp constants are legal, or use isFPImmLegal()
// to optimize expansions for certain constants.
+ setOperationAction(ISD::ConstantFP, MVT::f16, Expand);
setOperationAction(ISD::ConstantFP, MVT::f32, Expand);
setOperationAction(ISD::ConstantFP, MVT::f64, Expand);
setOperationAction(ISD::ConstantFP, MVT::f80, Expand);
// These library functions default to expand.
- setOperationAction(ISD::FLOG , MVT::f64, Expand);
- setOperationAction(ISD::FLOG2, MVT::f64, Expand);
- setOperationAction(ISD::FLOG10, MVT::f64, Expand);
- setOperationAction(ISD::FEXP , MVT::f64, Expand);
- setOperationAction(ISD::FEXP2, MVT::f64, Expand);
- setOperationAction(ISD::FFLOOR, MVT::f64, Expand);
- setOperationAction(ISD::FNEARBYINT, MVT::f64, Expand);
- setOperationAction(ISD::FCEIL, MVT::f64, Expand);
- setOperationAction(ISD::FRINT, MVT::f64, Expand);
- setOperationAction(ISD::FTRUNC, MVT::f64, Expand);
+ setOperationAction(ISD::FLOG , MVT::f16, Expand);
+ setOperationAction(ISD::FLOG2, MVT::f16, Expand);
+ setOperationAction(ISD::FLOG10, MVT::f16, Expand);
+ setOperationAction(ISD::FEXP , MVT::f16, Expand);
+ setOperationAction(ISD::FEXP2, MVT::f16, Expand);
+ setOperationAction(ISD::FFLOOR, MVT::f16, Expand);
+ setOperationAction(ISD::FNEARBYINT, MVT::f16, Expand);
+ setOperationAction(ISD::FCEIL, MVT::f16, Expand);
+ setOperationAction(ISD::FRINT, MVT::f16, Expand);
+ setOperationAction(ISD::FTRUNC, MVT::f16, Expand);
setOperationAction(ISD::FLOG , MVT::f32, Expand);
setOperationAction(ISD::FLOG2, MVT::f32, Expand);
setOperationAction(ISD::FLOG10, MVT::f32, Expand);
@@ -597,6 +598,16 @@
setOperationAction(ISD::FCEIL, MVT::f32, Expand);
setOperationAction(ISD::FRINT, MVT::f32, Expand);
setOperationAction(ISD::FTRUNC, MVT::f32, Expand);
+ setOperationAction(ISD::FLOG , MVT::f64, Expand);
+ setOperationAction(ISD::FLOG2, MVT::f64, Expand);
+ setOperationAction(ISD::FLOG10, MVT::f64, Expand);
+ setOperationAction(ISD::FEXP , MVT::f64, Expand);
+ setOperationAction(ISD::FEXP2, MVT::f64, Expand);
+ setOperationAction(ISD::FFLOOR, MVT::f64, Expand);
+ setOperationAction(ISD::FNEARBYINT, MVT::f64, Expand);
+ setOperationAction(ISD::FCEIL, MVT::f64, Expand);
+ setOperationAction(ISD::FRINT, MVT::f64, Expand);
+ setOperationAction(ISD::FTRUNC, MVT::f64, Expand);
// Default ISD::TRAP to expand (which turns it into abort).
setOperationAction(ISD::TRAP, MVT::Other, Expand);
Modified: llvm/trunk/lib/Target/TargetData.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetData.cpp?rev=146927&r1=146926&r2=146927&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetData.cpp (original)
+++ llvm/trunk/lib/Target/TargetData.cpp Mon Dec 19 18:02:33 2011
@@ -147,6 +147,7 @@
setAlignment(INTEGER_ALIGN, 2, 2, 16); // i16
setAlignment(INTEGER_ALIGN, 4, 4, 32); // i32
setAlignment(INTEGER_ALIGN, 4, 8, 64); // i64
+ setAlignment(FLOAT_ALIGN, 2, 2, 16); // half
setAlignment(FLOAT_ALIGN, 4, 4, 32); // float
setAlignment(FLOAT_ALIGN, 8, 8, 64); // double
setAlignment(VECTOR_ALIGN, 8, 8, 64); // v2i32, v1i64, ...
@@ -477,6 +478,8 @@
return cast(Ty)->getBitWidth();
case Type::VoidTyID:
return 8;
+ case Type::HalfTyID:
+ return 16;
case Type::FloatTyID:
return 32;
case Type::DoubleTyID:
@@ -534,6 +537,7 @@
case Type::VoidTyID:
AlignType = INTEGER_ALIGN;
break;
+ case Type::HalfTyID:
case Type::FloatTyID:
case Type::DoubleTyID:
// PPC_FP128TyID and FP128TyID have different data contents, but the
Modified: llvm/trunk/lib/VMCore/ValueTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ValueTypes.cpp?rev=146927&r1=146926&r2=146927&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/ValueTypes.cpp (original)
+++ llvm/trunk/lib/VMCore/ValueTypes.cpp Mon Dec 19 18:02:33 2011
@@ -108,6 +108,7 @@
case MVT::i32: return "i32";
case MVT::i64: return "i64";
case MVT::i128: return "i128";
+ case MVT::f16: return "f16";
case MVT::f32: return "f32";
case MVT::f64: return "f64";
case MVT::f80: return "f80";
@@ -158,6 +159,7 @@
case MVT::i32: return Type::getInt32Ty(Context);
case MVT::i64: return Type::getInt64Ty(Context);
case MVT::i128: return IntegerType::get(Context, 128);
+ case MVT::f16: return Type::getHalfTy(Context);
case MVT::f32: return Type::getFloatTy(Context);
case MVT::f64: return Type::getDoubleTy(Context);
case MVT::f80: return Type::getX86_FP80Ty(Context);
@@ -202,6 +204,7 @@
return MVT::isVoid;
case Type::IntegerTyID:
return getIntegerVT(Ty->getContext(), cast(Ty)->getBitWidth());
+ case Type::HalfTyID: return MVT(MVT::f16);
case Type::FloatTyID: return MVT(MVT::f32);
case Type::DoubleTyID: return MVT(MVT::f64);
case Type::X86_FP80TyID: return MVT(MVT::f80);
Modified: llvm/trunk/utils/TableGen/CodeGenTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenTarget.cpp?rev=146927&r1=146926&r2=146927&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenTarget.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenTarget.cpp Mon Dec 19 18:02:33 2011
@@ -58,6 +58,7 @@
case MVT::iAny: return "MVT::iAny";
case MVT::fAny: return "MVT::fAny";
case MVT::vAny: return "MVT::vAny";
+ case MVT::f16: return "MVT::f16";
case MVT::f32: return "MVT::f32";
case MVT::f64: return "MVT::f64";
case MVT::f80: return "MVT::f80";
Modified: llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp?rev=146927&r1=146926&r2=146927&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp Mon Dec 19 18:02:33 2011
@@ -181,6 +181,8 @@
} else if (VT == MVT::Other) {
// MVT::OtherVT is used to mean the empty struct type here.
OS << "StructType::get(Context)";
+ } else if (VT == MVT::f16) {
+ OS << "Type::getHalfTy(Context)";
} else if (VT == MVT::f32) {
OS << "Type::getFloatTy(Context)";
} else if (VT == MVT::f64) {
From sabre at nondot.org Mon Dec 19 18:03:41 2011
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 20 Dec 2011 00:03:41 -0000
Subject: [llvm-commits] [llvm] r146928 -
/llvm/trunk/include/llvm/ADT/SetVector.h
Message-ID: <20111220000341.C9A4E1BE003@llvm.org>
Author: lattner
Date: Mon Dec 19 18:03:41 2011
New Revision: 146928
URL: http://llvm.org/viewvc/llvm-project?rev=146928&view=rev
Log:
add a method to improve compatibility with SmallVector.
Modified:
llvm/trunk/include/llvm/ADT/SetVector.h
Modified: llvm/trunk/include/llvm/ADT/SetVector.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SetVector.h?rev=146928&r1=146927&r2=146928&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SetVector.h (original)
+++ llvm/trunk/include/llvm/ADT/SetVector.h Mon Dec 19 18:03:41 2011
@@ -144,6 +144,12 @@
set_.erase(back());
vector_.pop_back();
}
+
+ T pop_back_val() {
+ T Ret = back();
+ pop_back();
+ return Ret;
+ }
bool operator==(const SetVector &that) const {
return vector_ == that.vector_;
From sabre at nondot.org Mon Dec 19 18:03:52 2011
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 20 Dec 2011 00:03:52 -0000
Subject: [llvm-commits] [llvm] r146929 - in /llvm/trunk:
lib/Linker/LinkModules.cpp test/Linker/multiple-merged-structs.ll
Message-ID: <20111220000352.6A6A91BE003@llvm.org>
Author: lattner
Date: Mon Dec 19 18:03:52 2011
New Revision: 146929
URL: http://llvm.org/viewvc/llvm-project?rev=146929&view=rev
Log:
fix PR11464 by preventing the linker from mapping two different struct types from the source module onto the same opaque destination type. An opaque type can only be resolved to one thing or another after all.
Added:
llvm/trunk/test/Linker/multiple-merged-structs.ll
Modified:
llvm/trunk/lib/Linker/LinkModules.cpp
Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=146929&r1=146928&r2=146929&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Mon Dec 19 18:03:52 2011
@@ -38,9 +38,14 @@
/// case we need to roll back.
SmallVector SpeculativeTypes;
- /// DefinitionsToResolve - This is a list of non-opaque structs in the source
- /// module that are mapped to an opaque struct in the destination module.
- SmallVector DefinitionsToResolve;
+ /// SrcDefinitionsToResolve - This is a list of non-opaque structs in the
+ /// source module that are mapped to an opaque struct in the destination
+ /// module.
+ SmallVector SrcDefinitionsToResolve;
+
+ /// DstResolvedOpaqueTypes - This is the set of opaque types in the
+ /// destination modules who are getting a body from the source module.
+ SmallPtrSet DstResolvedOpaqueTypes;
public:
/// addTypeMapping - Indicate that the specified type in the destination
@@ -118,11 +123,17 @@
return true;
}
- // Mapping a non-opaque source type to an opaque dest. Keep the dest, but
- // fill it in later. This doesn't need to be speculative.
+ // Mapping a non-opaque source type to an opaque dest. If this is the first
+ // type that we're mapping onto this destination type then we succeed. Keep
+ // the dest, but fill it in later. This doesn't need to be speculative. If
+ // this is the second (different) type that we're trying to map onto the
+ // same opaque type then we fail.
if (cast(DstTy)->isOpaque()) {
+ // We can only map one source type onto the opaque destination type.
+ if (!DstResolvedOpaqueTypes.insert(cast(DstTy)))
+ return false;
+ SrcDefinitionsToResolve.push_back(SSTy);
Entry = DstTy;
- DefinitionsToResolve.push_back(SSTy);
return true;
}
}
@@ -174,9 +185,9 @@
SmallString<16> TmpName;
// Note that processing entries in this loop (calling 'get') can add new
- // entries to the DefinitionsToResolve vector.
- while (!DefinitionsToResolve.empty()) {
- StructType *SrcSTy = DefinitionsToResolve.pop_back_val();
+ // entries to the SrcDefinitionsToResolve vector.
+ while (!SrcDefinitionsToResolve.empty()) {
+ StructType *SrcSTy = SrcDefinitionsToResolve.pop_back_val();
StructType *DstSTy = cast(MappedTypes[SrcSTy]);
// TypeMap is a many-to-one mapping, if there were multiple types that
@@ -204,6 +215,8 @@
TmpName.clear();
}
}
+
+ DstResolvedOpaqueTypes.clear();
}
@@ -213,7 +226,7 @@
Type *Result = getImpl(Ty);
// If this caused a reference to any struct type, resolve it before returning.
- if (!DefinitionsToResolve.empty())
+ if (!SrcDefinitionsToResolve.empty())
linkDefinedTypeBodies();
return Result;
}
@@ -304,8 +317,10 @@
// Otherwise we create a new type and resolve its body later. This will be
// resolved by the top level of get().
- DefinitionsToResolve.push_back(STy);
- return *Entry = StructType::create(STy->getContext());
+ SrcDefinitionsToResolve.push_back(STy);
+ StructType *DTy = StructType::create(STy->getContext());
+ DstResolvedOpaqueTypes.insert(DTy);
+ return *Entry = DTy;
}
Added: llvm/trunk/test/Linker/multiple-merged-structs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/multiple-merged-structs.ll?rev=146929&view=auto
==============================================================================
--- llvm/trunk/test/Linker/multiple-merged-structs.ll (added)
+++ llvm/trunk/test/Linker/multiple-merged-structs.ll Mon Dec 19 18:03:52 2011
@@ -0,0 +1,19 @@
+; RUN: echo {%bug_type = type opaque \
+; RUN: declare i32 @bug_a(%bug_type*) \
+; RUN: declare i32 @bug_b(%bug_type*) } > %t.ll
+; RUN: llvm-link %t.ll %s
+; PR11464
+
+%bug_type = type { %bug_type* }
+%bar = type { i32 }
+
+define i32 @bug_a(%bug_type* %fp) nounwind uwtable {
+entry:
+ %d_stream = getelementptr inbounds %bug_type* %fp, i64 0, i32 0
+ ret i32 0
+}
+
+define i32 @bug_b(%bar* %a) nounwind uwtable {
+entry:
+ ret i32 0
+}
From sabre at nondot.org Mon Dec 19 18:12:26 2011
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 20 Dec 2011 00:12:26 -0000
Subject: [llvm-commits] [llvm] r146932 - in /llvm/trunk:
lib/Linker/LinkModules.cpp test/Linker/link-type-names.ll
Message-ID: <20111220001226.AD7211BE003@llvm.org>
Author: lattner
Date: Mon Dec 19 18:12:26 2011
New Revision: 146932
URL: http://llvm.org/viewvc/llvm-project?rev=146932&view=rev
Log:
Now that PR11464 is fixed, reapply the patch to fix PR11464,
merging types by name when we can. We still don't guarantee type name linkage
but we do it when obviously the right thing to do. This makes LTO type names
easier to read, for example.
Added:
llvm/trunk/test/Linker/link-type-names.ll
- copied, changed from r146742, llvm/trunk/test/Linker/link-type-names.ll
Modified:
llvm/trunk/lib/Linker/LinkModules.cpp
Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=146932&r1=146931&r2=146932&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Mon Dec 19 18:12:26 2011
@@ -558,6 +558,31 @@
TypeMap.addTypeMapping(DGV->getType(), I->getType());
}
+ // Incorporate types by name, scanning all the types in the source module.
+ // At this point, the destination module may have a type "%foo = { i32 }" for
+ // example. When the source module got loaded into the same LLVMContext, if
+ // it had the same type, it would have been renamed to "%foo.42 = { i32 }".
+ // Though it isn't required for correctness, attempt to link these up to clean
+ // up the IR.
+ std::vector SrcStructTypes;
+ SrcM->findUsedStructTypes(SrcStructTypes);
+
+ for (unsigned i = 0, e = SrcStructTypes.size(); i != e; ++i) {
+ StructType *ST = SrcStructTypes[i];
+ if (!ST->hasName()) continue;
+
+ // Check to see if there is a dot in the name followed by a digit.
+ size_t DotPos = ST->getName().rfind('.');
+ if (DotPos == 0 || DotPos == StringRef::npos ||
+ ST->getName().back() == '.' || !isdigit(ST->getName()[DotPos+1]))
+ continue;
+
+ // Check to see if the destination module has a struct with the prefix name.
+ if (StructType *DST = DstM->getTypeByName(ST->getName().substr(0, DotPos)))
+ TypeMap.addTypeMapping(DST, ST);
+ }
+
+
// Don't bother incorporating aliases, they aren't generally typed well.
// Now that we have discovered all of the type equivalences, get a body for
Copied: llvm/trunk/test/Linker/link-type-names.ll (from r146742, llvm/trunk/test/Linker/link-type-names.ll)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/link-type-names.ll?p2=llvm/trunk/test/Linker/link-type-names.ll&p1=llvm/trunk/test/Linker/link-type-names.ll&r1=146742&r2=146932&rev=146932&view=diff
==============================================================================
--- llvm/trunk/test/Linker/link-type-names.ll (original)
+++ llvm/trunk/test/Linker/link-type-names.ll Mon Dec 19 18:12:26 2011
@@ -1,5 +1,6 @@
; RUN: echo "%X = type { i32 } @G2 = global %X { i32 4 }" > %t.ll
; RUN: llvm-link %s %t.ll -S | FileCheck %s
+; PR11464
%X = type { i32 }
@G = global %X { i32 4 }
From grosbach at apple.com Mon Dec 19 18:59:38 2011
From: grosbach at apple.com (Jim Grosbach)
Date: Tue, 20 Dec 2011 00:59:38 -0000
Subject: [llvm-commits] [llvm] r146937 - in /llvm/trunk:
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
test/MC/ARM/basic-arm-instructions.s
Message-ID: <20111220005938.D97D71BE003@llvm.org>
Author: grosbach
Date: Mon Dec 19 18:59:38 2011
New Revision: 146937
URL: http://llvm.org/viewvc/llvm-project?rev=146937&view=rev
Log:
ARM assembly shifts by zero should be plain 'mov' instructions.
"mov r1, r2, lsl #0" should assemble as "mov r1, r2" even though it's
not strictly legal UAL syntax. It's a common extension and the friendly
thing to do.
rdar://10604663
Modified:
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
llvm/trunk/test/MC/ARM/basic-arm-instructions.s
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=146937&r1=146936&r2=146937&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Mon Dec 19 18:59:38 2011
@@ -5945,6 +5945,23 @@
}
break;
}
+ case ARM::MOVsi: {
+ ARM_AM::ShiftOpc SOpc = ARM_AM::getSORegShOp(Inst.getOperand(2).getImm());
+ if (SOpc == ARM_AM::rrx) return false;
+ if (ARM_AM::getSORegOffset(Inst.getOperand(2).getImm()) == 0) {
+ // Shifting by zero is accepted as a vanilla 'MOVr'
+ MCInst TmpInst;
+ TmpInst.setOpcode(ARM::MOVr);
+ TmpInst.addOperand(Inst.getOperand(0));
+ TmpInst.addOperand(Inst.getOperand(1));
+ TmpInst.addOperand(Inst.getOperand(3));
+ TmpInst.addOperand(Inst.getOperand(4));
+ TmpInst.addOperand(Inst.getOperand(5));
+ Inst = TmpInst;
+ return true;
+ }
+ return false;
+ }
case ARM::t2IT: {
// The mask bits for all but the first condition are represented as
// the low bit of the condition code value implies 't'. We currently
Modified: llvm/trunk/test/MC/ARM/basic-arm-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/basic-arm-instructions.s?rev=146937&r1=146936&r2=146937&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/basic-arm-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/basic-arm-instructions.s Mon Dec 19 18:59:38 2011
@@ -904,11 +904,28 @@
movs r2, r3
moveq r2, r3
movseq r2, r3
+ mov r12, r8, lsl #(2 - 2)
+ lsl r2, r3, #(2 - 2)
+ mov r12, r8, lsr #(2 - 2)
+ lsr r2, r3, #(2 - 2)
+ mov r12, r8, asr #(2 - 2)
+ asr r2, r3, #(2 - 2)
+ mov r12, r8, ror #(2 - 2)
+ ror r2, r3, #(2 - 2)
@ CHECK: mov r2, r3 @ encoding: [0x03,0x20,0xa0,0xe1]
@ CHECK: movs r2, r3 @ encoding: [0x03,0x20,0xb0,0xe1]
@ CHECK: moveq r2, r3 @ encoding: [0x03,0x20,0xa0,0x01]
@ CHECK: movseq r2, r3 @ encoding: [0x03,0x20,0xb0,0x01]
+@ CHECK: mov r12, r8 @ encoding: [0x08,0xc0,0xa0,0xe1]
+@ CHECK: mov r2, r3 @ encoding: [0x03,0x20,0xa0,0xe1]
+@ CHECK: mov r12, r8 @ encoding: [0x08,0xc0,0xa0,0xe1]
+@ CHECK: mov r2, r3 @ encoding: [0x03,0x20,0xa0,0xe1]
+@ CHECK: mov r12, r8 @ encoding: [0x08,0xc0,0xa0,0xe1]
+@ CHECK: mov r2, r3 @ encoding: [0x03,0x20,0xa0,0xe1]
+@ CHECK: mov r12, r8 @ encoding: [0x08,0xc0,0xa0,0xe1]
+@ CHECK: mov r2, r3 @ encoding: [0x03,0x20,0xa0,0xe1]
+
@------------------------------------------------------------------------------
@ MOVT
From clattner at apple.com Mon Dec 19 19:06:13 2011
From: clattner at apple.com (Chris Lattner)
Date: Mon, 19 Dec 2011 17:06:13 -0800
Subject: [llvm-commits] [llvm] r146735 - in /llvm/trunk: CMakeLists.txt
include/llvm/Support/JSONParser.h lib/Support/CMakeLists.txt
lib/Support/JSONParser.cpp test/CMakeLists.txt
test/Other/json-bench-test.ll unittests/CMakeLists.txt
unittests/Support/JSONParserTest.cpp utils/Makefile utils/json-bench/
utils/json-bench/CMakeLists.txt utils/json-bench/JSONBench.cpp
utils/json-bench/Makefile
In-Reply-To: <20111216130910.CC5402A6C12C@llvm.org>
References: <20111216130910.CC5402A6C12C@llvm.org>
Message-ID: <9B2859C2-B1AA-4B29-B4B8-C25095F414CA@apple.com>
On Dec 16, 2011, at 5:09 AM, Manuel Klimek wrote:
> Author: klimek
> Date: Fri Dec 16 07:09:10 2011
> New Revision: 146735
>
> URL: http://llvm.org/viewvc/llvm-project?rev=146735&view=rev
> Log:
> Adds a JSON parser and a benchmark (json-bench) to catch performance regressions.
Thanks for adding this. I have some serious concerns about the structure of the implementation of this though, as long as several picky microscopic things:
> +++ llvm/trunk/include/llvm/Support/JSONParser.h Fri Dec 16 07:09:10 2011
> @@ -0,0 +1,444 @@
> +//===--- JsonParser.h - Simple JSON parser ----------------------*- C++ -*-===//
Please match the comment line to the filename, including capitalization.
> +
> +#ifndef LLVM_CLANG_TOOLING_JSON_PARSER_H
> +#define LLVM_CLANG_TOOLING_JSON_PARSER_H
Please fix.
> +
> +#include "llvm/ADT/StringRef.h"
> +#include "llvm/Support/Allocator.h"
> +#include "llvm/Support/ErrorHandling.h"
> +
> +#include
This doesn't need here, it gets it transitively through StringRef.h.
>
> +/// \brief A parser for JSON text.
> +///
> +/// Use an object of JSONParser to iterate over the values of a JSON text.
> +/// All objects are parsed during the iteration, so you can only iterate once
> +/// over the JSON text, but the cost of partial iteration is minimized.
> +/// Create a new JSONParser if you want to iterate multiple times.
> +class JSONParser {
> +public:
> + /// \brief Create a JSONParser for the given input.
> + ///
> + /// Parsing is started via parseRoot(). Access to the object returned from
> + /// parseRoot() will parse the input lazily.
> + JSONParser(StringRef Input);
...
> + bool failed() const;
...
> + std::string getErrorMessage() const;
Please switch this to use llvm::SourceMgr to produce caret diagnostics on errors. It is really unfortunate to have another poor parser with a weird error API interface.
>
> +private:
> + /// \brief These methods manage the implementation details of parsing new JSON
> + /// atoms.
> + /// @{
> + JSONString *parseString();
> + JSONValue *parseValue();
> + JSONKeyValuePair *parseKeyValuePair();
> + /// @}
The structure of the parser is exposing all the parsing implementation details to the clients of the header. Why not have the builder be a simple C function and make the JSONParser class be completely private to the .cpp file? This would be a lot cleaner, and it would be even better to detangle "skip()" out of the various classes.
>
> +/// \brief Implementation of JSON containers (arrays and objects).
> +///
> +/// JSONContainers drive the lazy parsing of JSON arrays and objects via
> +/// forward iterators. Call 'skip' to validate parsing of all elements of the
> +/// container and to position the parse stream behind the container.
> +template + JSONAtom::Kind ContainerKind>
> +class JSONContainer : public JSONValue {
It is somewhat cute what you're doing here, but it doesn't seem worthwhile to make this a template. This can just be a class with the template arguments becoming constructor arguments. Yes, you lose the compile-time specialization for the various cases, but it probably won't matter and this lets you move all the implementation guts out of line to the .cpp file.
>
> +#endif // LLVM_CLANG_TOOLING_JSON_PARSER_H
Please update.
> +++ llvm/trunk/lib/Support/JSONParser.cpp Fri Dec 16 07:09:10 2011
> @@ -0,0 +1,221 @@
> +//===--- JsonParser.cpp - Simple JSON parser ------------------------------===//
Capitalization again.
> +#include "llvm/Support/JSONParser.h"
> +
> +#include "llvm/ADT/Twine.h"
> +#include "llvm/Support/Casting.h"
> +
> +namespace llvm {
Please use "using namespace llvm;" here, per the coding standards.
>
> +// Forbidding inlining improves performance by roughly 20%.
> +// FIXME: Remove once llvm optimizes this to the faster version without hints.
This is a pretty terrible hack. Please file a PR about this.
> +// Checks if there is a whitespace character at the current position.
> +bool JSONParser::isWhitespace() {
> + return Position != Input.end() && (*Position == ' ' || *Position == '\t' ||
> + *Position == '\n' || *Position == '\r');
> +}
You apparently care a lot about performance here. If you want to make this fast, you should follow the lead of the clang lexer and rely on the source buffer being nul terminated (which SourceMgr provides). This makes checks like this a lot faster by eliminating a ton of redundant "end" checks.
>
> +bool JSONAtom::skip() const {
> + switch (MyKind) {
> + case JK_Array: return cast(this)->skip();
> + case JK_Object: return cast(this)->skip();
> + case JK_String: return cast(this)->skip();
> + case JK_KeyValuePair: return cast(this)->skip();
This should be in the parsing logic, not each of the value classes.
-Chris
From clattner at apple.com Mon Dec 19 19:07:42 2011
From: clattner at apple.com (Chris Lattner)
Date: Mon, 19 Dec 2011 17:07:42 -0800
Subject: [llvm-commits] [llvm] r146927 - in /llvm/trunk:
include/llvm/CodeGen/ValueTypes.h include/llvm/CodeGen/ValueTypes.td
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/TargetData.cpp
lib/VMCore/ValueTypes.cpp utils/TableGen/CodeGenTarget.cpp
utils/TableGen/IntrinsicEmitter.cpp
In-Reply-To: <20111220000234.333E51BE003@llvm.org>
References: <20111220000234.333E51BE003@llvm.org>
Message-ID: <10835BBF-A0D5-4462-9471-8246FAEE27EB@apple.com>
Is this worth anything in release notes?
-Chris
On Dec 19, 2011, at 4:02 PM, Dan Gohman wrote:
> Author: djg
> Date: Mon Dec 19 18:02:33 2011
> New Revision: 146927
>
> URL: http://llvm.org/viewvc/llvm-project?rev=146927&view=rev
> Log:
> Add basic generic CodeGen support for half.
From clattner at apple.com Mon Dec 19 19:11:43 2011
From: clattner at apple.com (Chris Lattner)
Date: Mon, 19 Dec 2011 17:11:43 -0800
Subject: [llvm-commits] Removing redundant default cases
In-Reply-To:
References:
Message-ID: <6AD9E2BB-DB69-45E5-BA56-F50805DC2BA0@apple.com>
Hi David,
Can you repost the patch? The general idea of the patch seems sound.
-Chris
On Dec 14, 2011, at 12:05 PM, David Blaikie wrote:
> Bump - any interest? (this may be a bit outdated, I can resurrect &
> update it if desired)
>
> On Fri, Sep 23, 2011 at 7:22 PM, David Blaikie wrote:
>> A similar patch for one I've just sent out for clang - removing any default
>> cases in a switch that already has all the enum values specified (only for
>> switches over enums).
>>
>> I don't know whether this stylistic/coding convention is consistent between
>> llvm and clang, so thought I'd ask first. Ideally once we get a good warning
>> for this in clang we could turn it on by default.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From gohman at apple.com Mon Dec 19 19:10:57 2011
From: gohman at apple.com (Dan Gohman)
Date: Tue, 20 Dec 2011 01:10:57 -0000
Subject: [llvm-commits] [llvm] r146939 - /llvm/trunk/docs/ReleaseNotes.html
Message-ID: <20111220011057.48D491BE003@llvm.org>
Author: djg
Date: Mon Dec 19 19:10:56 2011
New Revision: 146939
URL: http://llvm.org/viewvc/llvm-project?rev=146939&view=rev
Log:
Add a line to ReleaseNotes for half float.
Modified:
llvm/trunk/docs/ReleaseNotes.html
Modified: llvm/trunk/docs/ReleaseNotes.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=146939&r1=146938&r2=146939&view=diff
==============================================================================
--- llvm/trunk/docs/ReleaseNotes.html (original)
+++ llvm/trunk/docs/ReleaseNotes.html Mon Dec 19 19:10:56 2011
@@ -284,6 +284,7 @@
expose new optimization opportunities:
+ - IR support for half float
- ....
From sabre at nondot.org Mon Dec 19 19:11:38 2011
From: sabre at nondot.org (Chris Lattner)
Date: Tue, 20 Dec 2011 01:11:38 -0000
Subject: [llvm-commits] [llvm] r146940 -
/llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h
Message-ID: <20111220011138.3BE851BE003@llvm.org>
Author: lattner
Date: Mon Dec 19 19:11:37 2011
New Revision: 146940
URL: http://llvm.org/viewvc/llvm-project?rev=146940&view=rev
Log:
fix typo
Modified:
llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h
Modified: llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h?rev=146940&r1=146939&r2=146940&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h Mon Dec 19 19:11:37 2011
@@ -513,7 +513,7 @@
/// instruction is a bundle this function will remove all the bundled
/// instructions as well. It is up to the caller to keep a list of the
/// bundled instructions and re-insert them if desired. This function is
- /// *not recommended* for manipulating instructions with bundled. Use
+ /// *not recommended* for manipulating instructions with bundles. Use
/// splice instead.
MachineInstr *remove(MachineInstr *I);
void clear() {
From daniel at zuster.org Mon Dec 19 19:14:11 2011
From: daniel at zuster.org (Daniel Dunbar)
Date: Tue, 20 Dec 2011 01:14:11 -0000
Subject: [llvm-commits] [zorg] r146941 - in /zorg/trunk/lnt/lnt:
db/perfdb.py lnttool/import_data.py server/db/v4db.py util/ImportData.py
Message-ID: <20111220011411.5F6AB1BE003@llvm.org>
Author: ddunbar
Date: Mon Dec 19 19:14:11 2011
New Revision: 146941
URL: http://llvm.org/viewvc/llvm-project?rev=146941&view=rev
Log:
[lnt/v0.4] ImportData: Sink importDataFromDict to be a DB method, and start instantiating the correct database (although this will crash and burn quickly).
- Also, allow V4DB to take non-urlified paths (assumed as sqlite), for ease of transition.
Modified:
zorg/trunk/lnt/lnt/db/perfdb.py
zorg/trunk/lnt/lnt/lnttool/import_data.py
zorg/trunk/lnt/lnt/server/db/v4db.py
zorg/trunk/lnt/lnt/util/ImportData.py
Modified: zorg/trunk/lnt/lnt/db/perfdb.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/db/perfdb.py?rev=146941&r1=146940&r2=146941&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/db/perfdb.py (original)
+++ zorg/trunk/lnt/lnt/db/perfdb.py Mon Dec 19 19:14:11 2011
@@ -341,6 +341,9 @@
self.session.rollback()
self.modified_machine = self.modified_test = self.modified_run = False
+ def importDataFromDict(self, data):
+ return importDataFromDict(self, data)
+
def importDataFromDict(db, data):
# FIXME: Validate data
machineData = data['Machine']
Modified: zorg/trunk/lnt/lnt/lnttool/import_data.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/lnttool/import_data.py?rev=146941&r1=146940&r2=146941&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/lnttool/import_data.py (original)
+++ zorg/trunk/lnt/lnt/lnttool/import_data.py Mon Dec 19 19:14:11 2011
@@ -3,7 +3,8 @@
import lnt.db.perfdb
from lnt import formats
import lnt.server.config
-from lnt.util import ImportData
+import lnt.server.db.v4db
+import lnt.util.ImportData
def action_import(name, args):
"""import test data into a database"""
@@ -52,10 +53,18 @@
if db_entry is None:
parser.error("invalid database name")
+ # Load the appropriate version of the database.
+ if db_entry.db_version == '0.3':
+ db = lnt.db.perfdb.PerfDB(db_entry.path, echo=opts.show_sql)
+ elif db_entry.db_version == '0.4':
+ db = lnt.server.db.v4db.V4DB(db_entry.path, echo=opts.show_sql)
+ else:
+ raise NotImplementedError,"unable to import to version %r database" % (
+ db_entry.db_version,)
+
# Load the database.
- db = lnt.db.perfdb.PerfDB(db_entry.path, echo=opts.show_sql)
for file in args:
- result = ImportData.import_and_report(
+ result = lnt.util.ImportData.import_and_report(
config, opts.database, db, file,
opts.format, opts.commit, opts.show_sample_count,
opts.noEmail)
@@ -63,5 +72,6 @@
if opts.show_raw_result:
pprint.pprint(result)
else:
- ImportData.print_report_result(result, sys.stdout, opts.verbose)
+ lnt.util.ImportData.print_report_result(result, sys.stdout,
+ opts.verbose)
Modified: zorg/trunk/lnt/lnt/server/db/v4db.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/v4db.py?rev=146941&r1=146940&r2=146941&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/v4db.py (original)
+++ zorg/trunk/lnt/lnt/server/db/v4db.py Mon Dec 19 19:14:11 2011
@@ -22,8 +22,12 @@
return testsuitedb.TestSuiteDB(self.v4db, ts)
def __init__(self, path, echo=False):
- assert (path.startswith('mysql://') or
- path.startswith('sqlite://')), "invalid database path"
+ # If the path includes no database type, assume sqlite.
+ #
+ # FIXME: I would like to phase this out and force clients to propagate
+ # paths, but it isn't a big deal.
+ if not path.startswith('mysql://') and not path.startswith('sqlite://'):
+ path = 'sqlite:///' + path
self.path = path
self.engine = sqlalchemy.create_engine(path, echo=echo)
Modified: zorg/trunk/lnt/lnt/util/ImportData.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/util/ImportData.py?rev=146941&r1=146940&r2=146941&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/util/ImportData.py (original)
+++ zorg/trunk/lnt/lnt/util/ImportData.py Mon Dec 19 19:14:11 2011
@@ -60,7 +60,7 @@
importStartTime = time.time()
try:
- success,run = lnt.db.perfdb.importDataFromDict(db, data)
+ success,run = db.importDataFromDict(data)
except KeyboardInterrupt:
raise
except:
From daniel at zuster.org Mon Dec 19 19:14:14 2011
From: daniel at zuster.org (Daniel Dunbar)
Date: Tue, 20 Dec 2011 01:14:14 -0000
Subject: [llvm-commits] [zorg] r146942 -
/zorg/trunk/lnt/lnt/server/db/v4db.py
Message-ID: <20111220011414.7B6A01BE003@llvm.org>
Author: ddunbar
Date: Mon Dec 19 19:14:14 2011
New Revision: 146942
URL: http://llvm.org/viewvc/llvm-project?rev=146942&view=rev
Log:
[lnt/v0.4] lnt.server.db.v4db: Add more dict like methods to V4DB.testsuite, and implement some of the basic queries used by the common import code.
Modified:
zorg/trunk/lnt/lnt/server/db/v4db.py
Modified: zorg/trunk/lnt/lnt/server/db/v4db.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/v4db.py?rev=146942&r1=146941&r2=146942&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/v4db.py (original)
+++ zorg/trunk/lnt/lnt/server/db/v4db.py Mon Dec 19 19:14:14 2011
@@ -11,6 +11,10 @@
def __init__(self, v4db):
self.v4db = v4db
+ def __iter__(self):
+ for name, in self.v4db.query(testsuite.TestSuite.name):
+ yield name
+
def __getitem__(self, name):
# Get the test suite object.
ts = self.v4db.query(testsuite.TestSuite).\
@@ -21,6 +25,17 @@
# Instantiate the per-test suite wrapper object for this test suite.
return testsuitedb.TestSuiteDB(self.v4db, ts)
+ def keys(self):
+ return iter(self)
+
+ def values(self):
+ for name in self:
+ yield self[name]
+
+ def items(self):
+ for name in self:
+ yield name,self[name]
+
def __init__(self, path, echo=False):
# If the path includes no database type, assume sqlite.
#
@@ -49,5 +64,23 @@
# by the TestSuites table.
# The magic starts by returning a object which will allow us to use
- # array access to get the per-test suite database wrapper.
+ # dictionary like access to get the per-test suite database wrapper.
return V4DB.TestSuiteAccessor(self)
+
+ # FIXME: The getNum...() methods below should be phased out once we can
+ # eliminate the v0.3 style databases.
+ def getNumMachines(self):
+ return sum([ts.query(ts.Machine).count()
+ for ts in self.testsuite.values()])
+ def getNumRuns(self):
+ return sum([ts.query(ts.Run).count()
+ for ts in self.testsuite.values()])
+ def getNumSamples(self):
+ return sum([ts.query(ts.Sample).count()
+ for ts in self.testsuite.values()])
+ def getNumTests(self):
+ return sum([ts.query(ts.Test).count()
+ for ts in self.testsuite.values()])
+
+ def importDataFromDict(self, data):
+ raise NotImplementedError
From daniel at zuster.org Mon Dec 19 19:14:17 2011
From: daniel at zuster.org (Daniel Dunbar)
Date: Tue, 20 Dec 2011 01:14:17 -0000
Subject: [llvm-commits] [zorg] r146943 -
/zorg/trunk/lnt/lnt/server/db/v4db.py
Message-ID: <20111220011417.628C01BE003@llvm.org>
Author: ddunbar
Date: Mon Dec 19 19:14:17 2011
New Revision: 146943
URL: http://llvm.org/viewvc/llvm-project?rev=146943&view=rev
Log:
[lnt/v0.4] lnt.server.db.v4db: Implement TestSuiteDB object caching.
Modified:
zorg/trunk/lnt/lnt/server/db/v4db.py
Modified: zorg/trunk/lnt/lnt/server/db/v4db.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/v4db.py?rev=146943&r1=146942&r2=146943&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/v4db.py (original)
+++ zorg/trunk/lnt/lnt/server/db/v4db.py Mon Dec 19 19:14:17 2011
@@ -10,12 +10,19 @@
class TestSuiteAccessor(object):
def __init__(self, v4db):
self.v4db = v4db
+ self._cache = {}
def __iter__(self):
for name, in self.v4db.query(testsuite.TestSuite.name):
yield name
def __getitem__(self, name):
+ # Check the test suite cache, to avoid gratuitous reinstantiation.
+ #
+ # FIXME: Invalidation?
+ if name in self._cache:
+ return self._cache[name]
+
# Get the test suite object.
ts = self.v4db.query(testsuite.TestSuite).\
filter(testsuite.TestSuite.name == name).first()
@@ -23,7 +30,8 @@
raise IndexError,name
# Instantiate the per-test suite wrapper object for this test suite.
- return testsuitedb.TestSuiteDB(self.v4db, ts)
+ self._cache[name] = ts = testsuitedb.TestSuiteDB(self.v4db, ts)
+ return ts
def keys(self):
return iter(self)
@@ -47,6 +55,9 @@
self.path = path
self.engine = sqlalchemy.create_engine(path, echo=echo)
+ # Proxy object for implementing dict-like .testsuite property.
+ self._testsuite_proxy = None
+
# Create the common tables in case this is a new database.
testsuite.Base.metadata.create_all(self.engine)
@@ -65,7 +76,9 @@
# The magic starts by returning a object which will allow us to use
# dictionary like access to get the per-test suite database wrapper.
- return V4DB.TestSuiteAccessor(self)
+ if self._testsuite_proxy is None:
+ self._testsuite_proxy = V4DB.TestSuiteAccessor(self)
+ return self._testsuite_proxy
# FIXME: The getNum...() methods below should be phased out once we can
# eliminate the v0.3 style databases.
From daniel at zuster.org Mon Dec 19 19:14:20 2011
From: daniel at zuster.org (Daniel Dunbar)
Date: Tue, 20 Dec 2011 01:14:20 -0000
Subject: [llvm-commits] [zorg] r146944 -
/zorg/trunk/lnt/lnt/server/db/testsuitedb.py
Message-ID: <20111220011420.9128C1BE003@llvm.org>
Author: ddunbar
Date: Mon Dec 19 19:14:20 2011
New Revision: 146944
URL: http://llvm.org/viewvc/llvm-project?rev=146944&view=rev
Log:
[lnt/v0.4]: Add a unique index for TestSuiteDB.Machine tables.
- Also, eliminate the TestSuiteDB.Machine.number column, which was silly.
Modified:
zorg/trunk/lnt/lnt/server/db/testsuitedb.py
Modified: zorg/trunk/lnt/lnt/server/db/testsuitedb.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/testsuitedb.py?rev=146944&r1=146943&r2=146944&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/testsuitedb.py (original)
+++ zorg/trunk/lnt/lnt/server/db/testsuitedb.py Mon Dec 19 19:14:20 2011
@@ -34,7 +34,6 @@
id = Column("ID", Integer, primary_key=True)
name = Column("Name", String(256), index=True)
- number = Column("Number", Integer)
# The parameters blob is used to store any additional information
# reported by the run but not promoted into the machine record. Such
@@ -51,13 +50,12 @@
class_dict[item.name] = Column(item.name, String(256))
- def __init__(self, name, number):
+ def __init__(self, name):
self.name = name
- self.number = number
def __repr__(self):
return '%s_%s%r' % (db_key_name, self.__class__.__name__,
- (self.name, self.number))
+ (self.name,))
class Order(self.base):
__tablename__ = db_key_name + '_Order'
@@ -196,6 +194,14 @@
sqlalchemy.schema.Index("ix_%s_Sample_RunID_TestID" % db_key_name,
Sample.run_id, Sample.test_id)
+
+ # Create the index we use to ensure machine uniqueness.
+ args = [Machine.name, Machine.parameters]
+ for item in self.test_suite.machine_fields:
+ args.append(getattr(Machine, item.name))
+ sqlalchemy.schema.Index("ix_%s_Machine_Unique" % db_key_name,
+ *args, unique = True)
+
# Create the test suite database tables in case this is a new database.
self.base.metadata.create_all(self.v4db.engine)
From daniel at zuster.org Mon Dec 19 19:14:23 2011
From: daniel at zuster.org (Daniel Dunbar)
Date: Tue, 20 Dec 2011 01:14:23 -0000
Subject: [llvm-commits] [zorg] r146945 - in /zorg/trunk/lnt/lnt/server/db:
testsuite.py testsuitedb.py
Message-ID: <20111220011423.C5D061BE003@llvm.org>
Author: ddunbar
Date: Mon Dec 19 19:14:23 2011
New Revision: 146945
URL: http://llvm.org/viewvc/llvm-project?rev=146945&view=rev
Log:
[lnt/v0.4] lnt.server.db.testsuitedb: When binding test suites, store the constructed column instance with the field for ease of use when querying.
Modified:
zorg/trunk/lnt/lnt/server/db/testsuite.py
zorg/trunk/lnt/lnt/server/db/testsuitedb.py
Modified: zorg/trunk/lnt/lnt/server/db/testsuite.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/testsuite.py?rev=146945&r1=146944&r2=146945&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/testsuite.py (original)
+++ zorg/trunk/lnt/lnt/server/db/testsuite.py Mon Dec 19 19:14:23 2011
@@ -97,6 +97,10 @@
self.name = name
self.info_key = info_key
+ # Column instance for fields which have been bound (non-DB
+ # parameter). This is provided for convenience in querying.
+ self.column = None
+
def __repr__(self):
return '%s%r' % (self.__class__.__name__, (self.name, self.info_key))
@@ -124,6 +128,10 @@
self.info_key = info_key
self.ordinal = ordinal
+ # Column instance for fields which have been bound (non-DB
+ # parameter). This is provided for convenience in querying.
+ self.column = None
+
def __repr__(self):
return '%s%r' % (self.__class__.__name__, (self.name, self.info_key,
self.ordinal))
@@ -145,6 +153,10 @@
self.name = name
self.info_key = info_key
+ # Column instance for fields which have been bound (non-DB
+ # parameter). This is provided for convenience in querying.
+ self.column = None
+
def __repr__(self):
return '%s%r' % (self.__class__.__name__, (self.name, self.info_key))
@@ -171,6 +183,10 @@
self.type = type
self.info_key = info_key
+ # Column instance for fields which have been bound (non-DB
+ # parameter). This is provided for convenience in querying.
+ self.column = None
+
def __repr__(self):
return '%s%r' % (self.__class__.__name__, (self.name, self.type,
self.info_key))
Modified: zorg/trunk/lnt/lnt/server/db/testsuitedb.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/testsuitedb.py?rev=146945&r1=146944&r2=146945&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/testsuitedb.py (original)
+++ zorg/trunk/lnt/lnt/server/db/testsuitedb.py Mon Dec 19 19:14:23 2011
@@ -48,7 +48,8 @@
raise ValueError,"test suite defines reserved key %r" % (
name,)
- class_dict[item.name] = Column(item.name, String(256))
+ class_dict[item.name] = item.column = Column(
+ item.name, String(256))
def __init__(self, name):
self.name = name
@@ -73,7 +74,8 @@
raise ValueError,"test suite defines reserved key %r" % (
name,)
- class_dict[item.name] = Column(item.name, String(256))
+ class_dict[item.name] = item.column = Column(
+ item.name, String(256))
def __init__(self):
pass
@@ -113,7 +115,8 @@
raise ValueError,"test suite defines reserved key %r" % (
name,)
- class_dict[item.name] = Column(item.name, String(256))
+ class_dict[item.name] = item.column = Column(
+ item.name, String(256))
def __init__(self, machine, order, start_time, end_time):
self.machine = machine
@@ -166,16 +169,17 @@
name,)
if item.type.name == 'Real':
- class_dict[item.name] = Column(item.name, Float)
+ item.column = Column(item.name, Float)
elif item.type.name == 'Status':
- class_dict[item.name] = Column(item.name, Integer,
- ForeignKey(
+ item.column = Column(item.name, Integer, ForeignKey(
testsuite.StatusKind.id))
else:
raise ValueError,(
"test suite defines unknown sample type %r" (
item.type.name,))
+ class_dict[item.name] = item.column
+
def __init__(self, run, test):
self.run = run
self.test = test
From daniel at zuster.org Mon Dec 19 19:14:32 2011
From: daniel at zuster.org (Daniel Dunbar)
Date: Tue, 20 Dec 2011 01:14:32 -0000
Subject: [llvm-commits] [zorg] r146947 - in /zorg/trunk/lnt:
lnt/server/db/testsuitedb.py lnt/server/db/v4db.py
lnt/util/NTEmailReport.py tests/server/db/Inputs/sample-a-small.plist
tests/server/db/Inputs/sample-b-small.plist
Message-ID: <20111220011432.7BE561BE004@llvm.org>
Author: ddunbar
Date: Mon Dec 19 19:14:32 2011
New Revision: 146947
URL: http://llvm.org/viewvc/llvm-project?rev=146947&view=rev
Log:
[lnt/v0.4] lnt.server.db.testsuitedb: Add import functionality for Orders and Runs.
Modified:
zorg/trunk/lnt/lnt/server/db/testsuitedb.py
zorg/trunk/lnt/lnt/server/db/v4db.py
zorg/trunk/lnt/lnt/util/NTEmailReport.py
zorg/trunk/lnt/tests/server/db/Inputs/sample-a-small.plist
zorg/trunk/lnt/tests/server/db/Inputs/sample-b-small.plist
Modified: zorg/trunk/lnt/lnt/server/db/testsuitedb.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/testsuitedb.py?rev=146947&r1=146946&r2=146947&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/testsuitedb.py (original)
+++ zorg/trunk/lnt/lnt/server/db/testsuitedb.py Mon Dec 19 19:14:32 2011
@@ -5,6 +5,7 @@
suite metadata, so we only create the classes at runtime.
"""
+import datetime
import json
import sqlalchemy
@@ -200,11 +201,10 @@
sqlalchemy.schema.Index("ix_%s_Sample_RunID_TestID" % db_key_name,
Sample.run_id, Sample.test_id)
-
# Create the index we use to ensure machine uniqueness.
args = [Machine.name, Machine.parameters]
for item in self.test_suite.machine_fields:
- args.append(getattr(Machine, item.name))
+ args.append(item.column)
sqlalchemy.schema.Index("ix_%s_Machine_Unique" % db_key_name,
*args, unique = True)
@@ -215,13 +215,17 @@
self.add = self.v4db.add
self.commit = self.v4db.commit
self.query = self.v4db.query
+ self.rollback = self.v4db.rollback
def _getOrCreateMachine(self, machine_data):
"""
- _getOrCreateMachine(data) -> Machine
+ _getOrCreateMachine(data) -> Machine, bool
Add or create (and insert) a Machine record from the given machine data
(as recorded by the test interchange format).
+
+ The boolean result indicates whether the returned record was constructed
+ or not.
"""
# Convert the machine data into a machine record. We construct the query
@@ -256,21 +260,139 @@
# Execute the query to see if we already have this machine.
try:
- return query.one()
+ return query.one(),False
except sqlalchemy.orm.exc.NoResultFound:
# If not, add the machine.
self.add(machine)
- return machine
+ return machine,True
+
+ def _getOrCreateOrder(self, run_parameters):
+ """
+ _getOrCreateOrder(data) -> Order, bool
+
+ Add or create (and insert) an Order record based on the given run
+ parameters (as recorded by the test interchange format).
+
+ The run parameters that define the order will be removed from the
+ provided ddata argument.
+
+ The boolean result indicates whether the returned record was constructed
+ or not.
+ """
+
+ query = self.query(self.Order)
+ order = self.Order()
+
+ # First, extract all of the specified order fields.
+ for item in self.test_suite.order_fields:
+ if item.info_key in run_parameters:
+ value = run_parameters.pop(item.info_key)
+ else:
+ # We require that all of the order fields be present.
+ raise ValueError,"""\
+supplied run is missing required run parameter: %r""" % (
+ item.info_key)
+
+ # FIXME: Avoid setattr.
+ query = query.filter(item.column == value)
+ setattr(order, item.name, value)
+
+ # Execute the query to see if we already have this order.
+ try:
+ return query.one(),False
+ except sqlalchemy.orm.exc.NoResultFound:
+ # If not, add the run.
+ self.add(order)
+
+ return order,True
+
+ def _getOrCreateRun(self, run_data, machine):
+ """
+ _getOrCreateRun(data) -> Run, bool
+
+ Add a new Run record from the given data (as recorded by the test
+ interchange format).
+
+ The boolean result indicates whether the returned record was constructed
+ or not.
+ """
+
+ # Extra the run parameters that define the order.
+ run_parameters = run_data['Info'].copy()
+
+ # The tag has already been used to dispatch to the appropriate database.
+ run_parameters.pop('tag')
+
+ # Find the order record.
+ order,inserted = self._getOrCreateOrder(run_parameters)
+ start_time = datetime.datetime.strptime(run_data['Start Time'],
+ "%Y-%m-%d %H:%M:%S")
+ end_time = datetime.datetime.strptime(run_data['End Time'],
+ "%Y-%m-%d %H:%M:%S")
+
+ # Convert the rundata into a run record. As with Machines, we construct
+ # the query to look for any existingrun at the same time as we build up
+ # the record to possibly add.
+ #
+ # FIXME: This feels inelegant, can't SA help us out here?
+ query = self.query(self.Run).\
+ filter(self.Run.machine_id == machine.id).\
+ filter(self.Run.order_id == order.id).\
+ filter(self.Run.start_time == start_time).\
+ filter(self.Run.end_time == end_time)
+ run = self.Run(machine, order, start_time, end_time)
+
+ # First, extract all of the specified run fields.
+ for item in self.test_suite.run_fields:
+ if item.info_key in run_parameters:
+ value = run_parameters.pop(item.info_key)
+ else:
+ # For now, insert empty values for any missing fields. We don't
+ # want to insert NULLs, so we should probably allow the test
+ # suite to define defaults.
+ value = ''
+
+ # FIXME: Avoid setattr.
+ query = query.filter(item.column == value)
+ setattr(run, item.name, value)
+
+ # Any remaining parameters are saved as a JSON encoded array.
+ run.parameters = json.dumps(sorted(run_parameters.items()))
+ query = query.filter(self.Run.parameters == run.parameters)
+
+ # Execute the query to see if we already have this run.
+ try:
+ return query.one(),False
+ except sqlalchemy.orm.exc.NoResultFound:
+ # If not, add the run.
+ self.add(run)
+
+ return run,True
def importDataFromDict(self, data):
+ """
+ importDataFromDict(data) -> Run, bool
+
+ Import a new run from the provided test interchange data, and return the
+ constructed Run record.
+
+ The boolean result indicates whether the returned record was constructed
+ or not (i.e., whether the data was a duplicate submission).
+ """
+
# Construct the machine entry.
- machine = self._getOrCreateMachine(data['Machine'])
+ machine,inserted = self._getOrCreateMachine(data['Machine'])
- self.commit()
+ # Construct the run entry.
+ run,inserted = self._getOrCreateRun(data['Run'], machine)
- import sys
- print >>sys.stderr,"added machine %r" % machine.id
+ # If we didn't construct a new run, this is a duplicate
+ # submission. Return the prior Run.
+ if not inserted:
+ return False, run
- print self.test_suite.machine_fields
+ # FIXME: Insert tests and samples.
raise NotImplementedError
+
+ return True, run
Modified: zorg/trunk/lnt/lnt/server/db/v4db.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/v4db.py?rev=146947&r1=146946&r2=146947&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/v4db.py (original)
+++ zorg/trunk/lnt/lnt/server/db/v4db.py Mon Dec 19 19:14:32 2011
@@ -72,6 +72,7 @@
self.add = self.session.add
self.commit = self.session.commit
self.query = self.session.query
+ self.rollback = self.session.rollback
@property
def testsuite(self):
Modified: zorg/trunk/lnt/lnt/util/NTEmailReport.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/util/NTEmailReport.py?rev=146947&r1=146946&r2=146947&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/util/NTEmailReport.py (original)
+++ zorg/trunk/lnt/lnt/util/NTEmailReport.py Mon Dec 19 19:14:32 2011
@@ -18,6 +18,7 @@
from lnt.server.ui import util
from lnt.db import perfdb
from lnt.util.NTUtil import *
+import lnt.server.db.v4db
from lnt.db.perfdb import Run, Sample
@@ -464,6 +465,10 @@
def getReport(result, db, run, baseurl, was_added, will_commit):
report = StringIO.StringIO()
+ # We haven't implemented V4DB support yet in reports.
+ if isinstance(db, lnt.server.db.v4db.V4DB):
+ return "NotYetImplemented", "NotYetImplemented", "NotYetImplemented"
+
# Use a simple report unless the tag indicates this is an old style nightly
# test run.
if 'tag' in run.info and run.info['tag'].value != 'nightlytest':
Modified: zorg/trunk/lnt/tests/server/db/Inputs/sample-a-small.plist
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/server/db/Inputs/sample-a-small.plist?rev=146947&r1=146946&r2=146947&view=diff
==============================================================================
--- zorg/trunk/lnt/tests/server/db/Inputs/sample-a-small.plist (original)
+++ zorg/trunk/lnt/tests/server/db/Inputs/sample-a-small.plist Mon Dec 19 19:14:32 2011
@@ -26,6 +26,8 @@
tag
nts
+ run_order
+ 1
Start Time
2009-11-17 02:12:25
Modified: zorg/trunk/lnt/tests/server/db/Inputs/sample-b-small.plist
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/server/db/Inputs/sample-b-small.plist?rev=146947&r1=146946&r2=146947&view=diff
==============================================================================
--- zorg/trunk/lnt/tests/server/db/Inputs/sample-b-small.plist (original)
+++ zorg/trunk/lnt/tests/server/db/Inputs/sample-b-small.plist Mon Dec 19 19:14:32 2011
@@ -26,6 +26,8 @@
tag
nts
+ run_order
+ 2
Start Time
2009-11-19 01:27:49
From daniel at zuster.org Mon Dec 19 19:14:27 2011
From: daniel at zuster.org (Daniel Dunbar)
Date: Tue, 20 Dec 2011 01:14:27 -0000
Subject: [llvm-commits] [zorg] r146946 - in /zorg/trunk/lnt/lnt/server/db:
testsuitedb.py v4db.py
Message-ID: <20111220011427.23B7D1BE003@llvm.org>
Author: ddunbar
Date: Mon Dec 19 19:14:26 2011
New Revision: 146946
URL: http://llvm.org/viewvc/llvm-project?rev=146946&view=rev
Log:
[lnt/v0.4] lnt.server.db.testsuitedb: Start implementing import functionality (just machine records, currently).
Modified:
zorg/trunk/lnt/lnt/server/db/testsuitedb.py
zorg/trunk/lnt/lnt/server/db/v4db.py
Modified: zorg/trunk/lnt/lnt/server/db/testsuitedb.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/testsuitedb.py?rev=146946&r1=146945&r2=146946&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/testsuitedb.py (original)
+++ zorg/trunk/lnt/lnt/server/db/testsuitedb.py Mon Dec 19 19:14:26 2011
@@ -5,6 +5,8 @@
suite metadata, so we only create the classes at runtime.
"""
+import json
+
import sqlalchemy
from sqlalchemy import *
@@ -213,3 +215,62 @@
self.add = self.v4db.add
self.commit = self.v4db.commit
self.query = self.v4db.query
+
+ def _getOrCreateMachine(self, machine_data):
+ """
+ _getOrCreateMachine(data) -> Machine
+
+ Add or create (and insert) a Machine record from the given machine data
+ (as recorded by the test interchange format).
+ """
+
+ # Convert the machine data into a machine record. We construct the query
+ # to look for any existing machine at the same time as we build up the
+ # record to possibly add.
+ #
+ # FIXME: This feels inelegant, can't SA help us out here?
+ query = self.query(self.Machine).\
+ filter(self.Machine.name == machine_data['Name'])
+ machine = self.Machine(machine_data['Name'])
+ machine_parameters = machine_data['Info'].copy()
+
+ # First, extract all of the specified machine fields.
+ for item in self.test_suite.machine_fields:
+ if item.info_key in machine_parameters:
+ value = machine_parameters.pop(item.info_key)
+ else:
+ # For now, insert empty values for any missing fields. We don't
+ # want to insert NULLs, so we should probably allow the test
+ # suite to define defaults.
+ value = ''
+
+ # FIXME: Avoid setattr.
+ query = query.filter(item.column == value)
+ setattr(machine, item.name, value)
+
+ # Convert any remaining machine_parameters into a JSON encoded blob. We
+ # encode this as an array to avoid a potential ambiguity on the key
+ # ordering.
+ machine.parameters = json.dumps(sorted(machine_parameters.items()))
+ query = query.filter(self.Machine.parameters == machine.parameters)
+
+ # Execute the query to see if we already have this machine.
+ try:
+ return query.one()
+ except sqlalchemy.orm.exc.NoResultFound:
+ # If not, add the machine.
+ self.add(machine)
+
+ return machine
+
+ def importDataFromDict(self, data):
+ # Construct the machine entry.
+ machine = self._getOrCreateMachine(data['Machine'])
+
+ self.commit()
+
+ import sys
+ print >>sys.stderr,"added machine %r" % machine.id
+
+ print self.test_suite.machine_fields
+ raise NotImplementedError
Modified: zorg/trunk/lnt/lnt/server/db/v4db.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/db/v4db.py?rev=146946&r1=146945&r2=146946&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/db/v4db.py (original)
+++ zorg/trunk/lnt/lnt/server/db/v4db.py Mon Dec 19 19:14:26 2011
@@ -33,6 +33,11 @@
self._cache[name] = ts = testsuitedb.TestSuiteDB(self.v4db, ts)
return ts
+ def get(self, name, default = None):
+ if name in self:
+ return self[name]
+ return default
+
def keys(self):
return iter(self)
@@ -96,4 +101,14 @@
for ts in self.testsuite.values()])
def importDataFromDict(self, data):
- raise NotImplementedError
+ # Select the database to import into.
+ #
+ # FIXME: Promote this to a top-level field in the data.
+ tag = data['Run']['Info'].get('tag')
+ db_name = { 'nts' : 'nt' }.get(tag)
+ if db_name is None:
+ raise ValueError,"unknown database target from tag %r" % (
+ tag,)
+
+ db = self.testsuite.get(db_name)
+ return db.importDataFromDict(data)
From eli.friedman at gmail.com Mon Dec 19 19:29:40 2011
From: eli.friedman at gmail.com (Eli Friedman)
Date: Mon, 19 Dec 2011 17:29:40 -0800
Subject: [llvm-commits] [llvm] r146849 - in /llvm/trunk: CMakeLists.txt
Makefile.config.in autoconf/configure.ac
In-Reply-To: <20111218185016.E0E7B2A6C12C@llvm.org>
References: <20111218185016.E0E7B2A6C12C@llvm.org>
Message-ID:
On Sun, Dec 18, 2011 at 10:50 AM, Dylan Noblesmith
wrote:
> Author: nobled
> Date: Sun Dec 18 12:50:16 2011
> New Revision: 146849
>
> URL: http://llvm.org/viewvc/llvm-project?rev=146849&view=rev
> Log:
> capitalize project name, reference bugzilla
>
> And fix the double-[]. It was including the [] as part of
> the project name somehow, resulting in PACKAGE_TARNAME "-llvm-"
> and a strange docdir default:
>
> ./configure --help | grep docdir
> ?--docdir=DIR ? ? ? ? ? documentation root [DATAROOTDIR/doc/-llvm-]
>
>
> Modified:
> ? ?llvm/trunk/CMakeLists.txt
> ? ?llvm/trunk/Makefile.config.in
> ? ?llvm/trunk/autoconf/configure.ac
It looks like you never committed a regenerated version of configure?
-Eli
> Modified: llvm/trunk/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=146849&r1=146848&r2=146849&view=diff
> ==============================================================================
> --- llvm/trunk/CMakeLists.txt (original)
> +++ llvm/trunk/CMakeLists.txt Sun Dec 18 12:50:16 2011
> @@ -23,9 +23,9 @@
> ? add_version_info_from_vcs(PACKAGE_VERSION)
> ?endif()
>
> -set(PACKAGE_NAME llvm)
> +set(PACKAGE_NAME LLVM)
> ?set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
> -set(PACKAGE_BUGREPORT "llvmbugs at cs.uiuc.edu")
> +set(PACKAGE_BUGREPORT "http://llvm.org/bugs/")
>
> ?# Sanity check our source directory to make sure that we are not trying to
> ?# generate an in-tree build (unless on MSVC_IDE, where it is ok), and to make
>
> Modified: llvm/trunk/Makefile.config.in
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=146849&r1=146848&r2=146849&view=diff
> ==============================================================================
> --- llvm/trunk/Makefile.config.in (original)
> +++ llvm/trunk/Makefile.config.in Sun Dec 18 12:50:16 2011
> @@ -13,7 +13,7 @@
> ?#===------------------------------------------------------------------------===#
>
> ?# Define LLVM specific info and directories based on the autoconf variables
> -LLVMPackageName ? := @PACKAGE_NAME@
> +LLVMPackageName ? := @PACKAGE_TARNAME@
> ?LLVMVersion ? ? ? := @PACKAGE_VERSION@
> ?LLVM_CONFIGTIME ? := @LLVM_CONFIGTIME@
>
> @@ -48,7 +48,7 @@
>
> ?CLANG_SRC_ROOT ?:= @CLANG_SRC_ROOT@
>
> -ifeq ($(PROJECT_NAME),llvm)
> +ifeq ($(PROJECT_NAME),$(LLVMPackageName))
> ?LLVM_SRC_ROOT ? := $(call realpath, @abs_top_srcdir@)
> ?LLVM_OBJ_ROOT ? := $(call realpath, @abs_top_builddir@)
> ?PROJ_SRC_ROOT ? := $(LLVM_SRC_ROOT)
>
> Modified: llvm/trunk/autoconf/configure.ac
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=146849&r1=146848&r2=146849&view=diff
> ==============================================================================
> --- llvm/trunk/autoconf/configure.ac (original)
> +++ llvm/trunk/autoconf/configure.ac Sun Dec 18 12:50:16 2011
> @@ -30,8 +30,8 @@
> ?dnl===
> ?dnl===-----------------------------------------------------------------------===
> ?dnl Initialize autoconf and define the package name, version number and
> -dnl email address for reporting bugs.
> -AC_INIT([[llvm]],[[3.1svn]],[llvmbugs at cs.uiuc.edu])
> +dnl address for reporting bugs.
> +AC_INIT([LLVM],[3.1svn],[http://llvm.org/bugs/])
>
> ?dnl Provide a copyright substitution and ensure the copyright notice is included
> ?dnl in the output of --version option of the generated configure script.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From bob.wilson at apple.com Mon Dec 19 19:29:27 2011
From: bob.wilson at apple.com (Bob Wilson)
Date: Tue, 20 Dec 2011 01:29:27 -0000
Subject: [llvm-commits] [llvm] r146949 - in /llvm/trunk:
lib/Target/ARM/ARMInstrInfo.td test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll
Message-ID: <20111220012927.C9EC81BE003@llvm.org>
Author: bwilson
Date: Mon Dec 19 19:29:27 2011
New Revision: 146949
URL: http://llvm.org/viewvc/llvm-project?rev=146949&view=rev
Log:
Mark ARM eh_sjlj_dispatchsetup as clobbering all registers. Radar 10567930.
We used to rely on the *eh_sjlj_setjmp instructions to mark that a function
with setjmp/longjmp exception handling clobbers all the registers. But with
the recent reorganization of ARM EH, those eh_sjlj_setjmp instructions are
expanded away earlier, before PEI can see them to determine what registers to
save and restore. Mark the dispatchsetup instruction in the same way, since
that instruction cannot be expanded early. This also more accurately reflects
when the registers are clobbered.
Added:
llvm/trunk/test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll
Modified:
llvm/trunk/lib/Target/ARM/ARMInstrInfo.td
Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=146949&r1=146948&r2=146949&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Mon Dec 19 19:29:27 2011
@@ -4741,8 +4741,11 @@
// This pseudo is used for ARM, Thumb1 and Thumb2. Any differences are
// handled when the pseudo is expanded (which happens before any passes
// that need the instruction size).
-let isBarrier = 1 in
-def eh_sjlj_dispatchsetup : PseudoInst<(outs), (ins), NoItinerary, []>;
+let Defs =
+ [ R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, LR, CPSR,
+ QQQQ0, QQQQ1, QQQQ2, QQQQ3 ], isBarrier = 1 in {
+ def eh_sjlj_dispatchsetup : PseudoInst<(outs), (ins), NoItinerary, []>;
+}
//===----------------------------------------------------------------------===//
// Non-Instruction Patterns
Added: llvm/trunk/test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll?rev=146949&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll (added)
+++ llvm/trunk/test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll Mon Dec 19 19:29:27 2011
@@ -0,0 +1,55 @@
+; RUN: llc < %s -O0 -mtriple=thumbv7-apple-ios | FileCheck %s
+
+; Radar 10567930: Make sure that all the caller-saved registers are saved and
+; restored in a function with setjmp/longjmp EH. In particular, r6 was not
+; being saved here.
+; CHECK: push {r4, r5, r6, r7, lr}
+
+%0 = type opaque
+%struct.NSConstantString = type { i32*, i32, i8*, i32 }
+
+define i32 @asdf(i32 %a, i32 %b, i8** %c, i8* %d) {
+bb:
+ %tmp = alloca i32, align 4
+ %tmp1 = alloca i32, align 4
+ %tmp2 = alloca i8*, align 4
+ %tmp3 = alloca i1
+ %myException = alloca %0*, align 4
+ %tmp4 = alloca i8*
+ %tmp5 = alloca i32
+ %exception = alloca %0*, align 4
+ store i32 %a, i32* %tmp, align 4
+ store i32 %b, i32* %tmp1, align 4
+ store i8* %d, i8** %tmp2, align 4
+ store i1 false, i1* %tmp3
+ %tmp7 = load i8** %c
+ %tmp10 = invoke %0* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %0* (i8*, i8*, %0*)*)(i8* %tmp7, i8* %d, %0* null)
+ to label %bb11 unwind label %bb15
+
+bb11: ; preds = %bb
+ store %0* %tmp10, %0** %myException, align 4
+ %tmp12 = load %0** %myException, align 4
+ %tmp13 = bitcast %0* %tmp12 to i8*
+ invoke void @objc_exception_throw(i8* %tmp13) noreturn
+ to label %bb14 unwind label %bb15
+
+bb14: ; preds = %bb11
+ unreachable
+
+bb15: ; preds = %bb11, %bb
+ %tmp16 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*)
+ catch i8* null
+ %tmp17 = extractvalue { i8*, i32 } %tmp16, 0
+ store i8* %tmp17, i8** %tmp4
+ %tmp18 = extractvalue { i8*, i32 } %tmp16, 1
+ store i32 %tmp18, i32* %tmp5
+ store i1 true, i1* %tmp3
+ br label %bb56
+
+bb56:
+ unreachable
+}
+
+declare i8* @objc_msgSend(i8*, i8*, ...) nonlazybind
+declare i32 @__objc_personality_v0(...)
+declare void @objc_exception_throw(i8*)
From atrick at apple.com Mon Dec 19 19:42:24 2011
From: atrick at apple.com (Andrew Trick)
Date: Tue, 20 Dec 2011 01:42:24 -0000
Subject: [llvm-commits] [llvm] r146950 -
/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
Message-ID: <20111220014224.7D2BD1BE003@llvm.org>
Author: atrick
Date: Mon Dec 19 19:42:24 2011
New Revision: 146950
URL: http://llvm.org/viewvc/llvm-project?rev=146950&view=rev
Log:
LSR: Fix another corner case in expansion of postinc users.
Fixes PR11571: Instruction does not dominate all uses
Modified:
llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=146950&r1=146949&r2=146950&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Mon Dec 19 19:42:24 2011
@@ -1019,6 +1019,16 @@
BasicBlock *SaveInsertBB = Builder.GetInsertBlock();
BasicBlock::iterator SaveInsertPt = Builder.GetInsertPoint();
+ // Another AddRec may need to be recursively expanded below. For example, if
+ // this AddRec is quadratic, the StepV may itself be an AddRec in this
+ // loop. Remove this loop from the PostIncLoops set before expanding such
+ // AddRecs. Otherwise, we cannot find a valid position for the step
+ // (i.e. StepV can never dominate its loop header). Ideally, we could do
+ // SavedIncLoops.swap(PostIncLoops), but we generally have a single element,
+ // so it's not worth implementing SmallPtrSet::swap.
+ PostIncLoopSet SavedPostIncLoops = PostIncLoops;
+ PostIncLoops.clear();
+
// Expand code for the start value.
Value *StartV = expandCodeFor(Normalized->getStart(), ExpandTy,
L->getHeader()->begin());
@@ -1073,6 +1083,10 @@
if (SaveInsertBB)
restoreInsertPoint(SaveInsertBB, SaveInsertPt);
+ // After expanding subexpressions, restore the PostIncLoops set so the caller
+ // can ensure that IVIncrement dominates the current uses.
+ PostIncLoops = SavedPostIncLoops;
+
// Remember this PHI, even in post-inc mode.
InsertedValues.insert(PN);
From atrick at apple.com Mon Dec 19 19:43:21 2011
From: atrick at apple.com (Andrew Trick)
Date: Tue, 20 Dec 2011 01:43:21 -0000
Subject: [llvm-commits] [llvm] r146951 -
/llvm/trunk/test/Transforms/LoopStrengthReduce/2011-12-19-PostincQuadratic.ll
Message-ID: <20111220014321.083FB1BE003@llvm.org>
Author: atrick
Date: Mon Dec 19 19:43:20 2011
New Revision: 146951
URL: http://llvm.org/viewvc/llvm-project?rev=146951&view=rev
Log:
Unit test for r146950: LSR postinc expansion, PR11571.
Added:
llvm/trunk/test/Transforms/LoopStrengthReduce/2011-12-19-PostincQuadratic.ll
Added: llvm/trunk/test/Transforms/LoopStrengthReduce/2011-12-19-PostincQuadratic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopStrengthReduce/2011-12-19-PostincQuadratic.ll?rev=146951&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/LoopStrengthReduce/2011-12-19-PostincQuadratic.ll (added)
+++ llvm/trunk/test/Transforms/LoopStrengthReduce/2011-12-19-PostincQuadratic.ll Mon Dec 19 19:43:20 2011
@@ -0,0 +1,39 @@
+; RUN: opt -loop-reduce -S < %s | FileCheck %s
+;
+; PR11571: handle a postinc user outside of for.body7 that requires
+; recursive expansion of a quadratic recurrence within for.body7. LSR
+; needs to forget that for.body7 is a postinc loop during expansion.
+
+target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128"
+target triple = "i386-unknown-freebsd10.0"
+
+ at b = external global [121 x i32]
+
+; CHECK: @vb
+; Outer recurrence:
+; CHECK: %lsr.iv1 = phi [121 x i32]*
+; Inner recurrence:
+; CHECK: %lsr.iv = phi i32
+; Outer step (relative to inner recurrence):
+; CHECK: %scevgep = getelementptr i1* %{{.*}}, i32 %lsr.iv
+; Outer use:
+; CHECK: %lsr.iv3 = phi [121 x i32]* [ %lsr.iv1, %for.body43.preheader ]
+define void @vb() nounwind {
+for.cond.preheader:
+ br label %for.body7
+
+for.body7:
+ %indvars.iv77 = phi i32 [ %indvars.iv.next78, %for.body7 ], [ 1, %for.cond.preheader ]
+ %bf.072 = phi i32 [ %t1, %for.body7 ], [ 0, %for.cond.preheader ]
+ %t1 = add i32 %bf.072, %indvars.iv77
+ %indvars.iv.next78 = add i32 %indvars.iv77, 1
+ br i1 undef, label %for.body43, label %for.body7
+
+for.body43:
+ %bf.459 = phi i32 [ %inc44, %for.body43 ], [ %t1, %for.body7 ]
+ %inc44 = add nsw i32 %bf.459, 1
+ %arrayidx45 = getelementptr inbounds [121 x i32]* @b, i32 0, i32 %bf.459
+ %t2 = load i32* %arrayidx45, align 4
+ br label %for.body43
+}
+
From dblaikie at gmail.com Mon Dec 19 20:16:52 2011
From: dblaikie at gmail.com (David Blaikie)
Date: Mon, 19 Dec 2011 18:16:52 -0800
Subject: [llvm-commits] Removing redundant default cases
In-Reply-To: <6AD9E2BB-DB69-45E5-BA56-F50805DC2BA0@apple.com>
References:
<6AD9E2BB-DB69-45E5-BA56-F50805DC2BA0@apple.com>
Message-ID:
[reattached the patch (sorry I didn't attach it in the bump - didn't
want to fill people's mailboxes with duplicates, but I realize the
original mail might've been so old as to have dropped out of people's
caches) - right this second I don't have a moment to update it so this
may or may not apply cleanly to ToT - I'll update again when I have a
moment to do that and possibly to reapply my clang hack to see if any
new violations have been introduced]
- David
On Mon, Dec 19, 2011 at 5:11 PM, Chris Lattner wrote:
> Hi David,
>
> Can you repost the patch? ?The general idea of the patch seems sound.
>
> -Chris
>
> On Dec 14, 2011, at 12:05 PM, David Blaikie wrote:
>
>> Bump - any interest? (this may be a bit outdated, I can resurrect &
>> update it if desired)
>>
>> On Fri, Sep 23, 2011 at 7:22 PM, David Blaikie wrote:
>>> A similar patch for one I've just sent out for clang - removing any default
>>> cases in a switch that already has all the enum values specified (only for
>>> switches over enums).
>>>
>>> I don't know whether this stylistic/coding convention is consistent between
>>> llvm and clang, so thought I'd ask first. Ideally once we get a good warning
>>> for this in clang we could turn it on by default.
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm_excess_default_fixes.diff
Type: text/x-diff
Size: 34055 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20111219/e8b2e833/attachment-0001.bin
From dblaikie at gmail.com Mon Dec 19 20:50:01 2011
From: dblaikie at gmail.com (David Blaikie)
Date: Tue, 20 Dec 2011 02:50:01 -0000
Subject: [llvm-commits] [llvm] r146960 - in /llvm/trunk: include/llvm/
include/llvm/ADT/ include/llvm/Analysis/ include/llvm/CodeGen/
include/llvm/MC/ include/llvm/Object/ include/llvm/TableGen/
include/llvm/Target/ include/llvm/Transforms/Utils/ lib/Analysis/
lib/CodeGen/ lib/CodeGen/AsmPrinter/ lib/CodeGen/SelectionDAG/
lib/DebugInfo/ lib/ExecutionEngine/MCJIT/ lib/MC/ lib/Object/ lib/Support/
lib/TableGen/ lib/Target/ lib/Target/ARM/ lib/Target/ARM/MCTargetDesc/
lib/Target/CellSPU/ lib/Target/CellSPU/MCTargetDesc/ lib/Target...
Message-ID: <20111220025004.A10151BE003@llvm.org>
Author: dblaikie
Date: Mon Dec 19 20:50:00 2011
New Revision: 146960
URL: http://llvm.org/viewvc/llvm-project?rev=146960&view=rev
Log:
Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
Added:
llvm/trunk/lib/CodeGen/JITCodeEmitter.cpp
llvm/trunk/lib/CodeGen/MachineCodeEmitter.cpp
llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.cpp
llvm/trunk/lib/Support/IntrusiveRefCntPtr.cpp
llvm/trunk/lib/TableGen/TableGenAction.cpp
llvm/trunk/lib/Target/ARM/ARMMachineFunctionInfo.cpp
llvm/trunk/lib/Target/CellSPU/SPUMachineFunction.cpp
llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.cpp
llvm/trunk/lib/Target/MSP430/MSP430MachineFunctionInfo.cpp
llvm/trunk/lib/Target/Mips/MipsMachineFunction.cpp
llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.cpp
llvm/trunk/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp
llvm/trunk/lib/Target/Sparc/SparcMachineFunctionInfo.cpp
llvm/trunk/lib/Target/TargetJITInfo.cpp
llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.cpp
llvm/trunk/lib/Target/XCore/XCoreMachineFunctionInfo.cpp
llvm/trunk/utils/TableGen/X86ModRMFilters.cpp
Modified:
llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h
llvm/trunk/include/llvm/Analysis/DebugInfo.h
llvm/trunk/include/llvm/Analysis/DominanceFrontier.h
llvm/trunk/include/llvm/Argument.h
llvm/trunk/include/llvm/CodeGen/JITCodeEmitter.h
llvm/trunk/include/llvm/CodeGen/LexicalScopes.h
llvm/trunk/include/llvm/CodeGen/MachineBranchProbabilityInfo.h
llvm/trunk/include/llvm/CodeGen/MachineCodeEmitter.h
llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h
llvm/trunk/include/llvm/CodeGen/MachinePassRegistry.h
llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h
llvm/trunk/include/llvm/Constant.h
llvm/trunk/include/llvm/Constants.h
llvm/trunk/include/llvm/MC/MCAsmInfoCOFF.h
llvm/trunk/include/llvm/MC/MCAsmInfoDarwin.h
llvm/trunk/include/llvm/MC/MCAssembler.h
llvm/trunk/include/llvm/Metadata.h
llvm/trunk/include/llvm/Object/Archive.h
llvm/trunk/include/llvm/Object/ObjectFile.h
llvm/trunk/include/llvm/TableGen/Record.h
llvm/trunk/include/llvm/TableGen/TableGenAction.h
llvm/trunk/include/llvm/TableGen/TableGenBackend.h
llvm/trunk/include/llvm/Target/TargetJITInfo.h
llvm/trunk/include/llvm/Target/TargetLibraryInfo.h
llvm/trunk/include/llvm/Target/TargetRegisterInfo.h
llvm/trunk/include/llvm/Transforms/Utils/SimplifyIndVar.h
llvm/trunk/lib/Analysis/DebugInfo.cpp
llvm/trunk/lib/Analysis/DominanceFrontier.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h
llvm/trunk/lib/CodeGen/LexicalScopes.cpp
llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp
llvm/trunk/lib/CodeGen/LiveRangeEdit.h
llvm/trunk/lib/CodeGen/MachineBranchProbabilityInfo.cpp
llvm/trunk/lib/CodeGen/MachineFunction.cpp
llvm/trunk/lib/CodeGen/MachinePassRegistry.cpp
llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/trunk/lib/CodeGen/Spiller.cpp
llvm/trunk/lib/CodeGen/Spiller.h
llvm/trunk/lib/DebugInfo/DWARFContext.cpp
llvm/trunk/lib/DebugInfo/DWARFContext.h
llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h
llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp
llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
llvm/trunk/lib/MC/MCAssembler.cpp
llvm/trunk/lib/Object/Archive.cpp
llvm/trunk/lib/Object/ObjectFile.cpp
llvm/trunk/lib/TableGen/Record.cpp
llvm/trunk/lib/TableGen/TableGenBackend.cpp
llvm/trunk/lib/Target/ARM/ARMMachineFunctionInfo.h
llvm/trunk/lib/Target/ARM/ARMRegisterInfo.cpp
llvm/trunk/lib/Target/ARM/ARMRegisterInfo.h
llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp
llvm/trunk/lib/Target/ARM/ARMTargetMachine.h
llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h
llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.cpp
llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.h
llvm/trunk/lib/Target/CellSPU/SPUMachineFunction.h
llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.h
llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.cpp
llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.h
llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h
llvm/trunk/lib/Target/MSP430/MSP430MachineFunctionInfo.h
llvm/trunk/lib/Target/MSP430/MSP430Subtarget.cpp
llvm/trunk/lib/Target/MSP430/MSP430Subtarget.h
llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp
llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h
llvm/trunk/lib/Target/Mips/MipsMachineFunction.h
llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp
llvm/trunk/lib/Target/Mips/MipsSubtarget.h
llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp
llvm/trunk/lib/Target/Mips/MipsTargetMachine.h
llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.cpp
llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.h
llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h
llvm/trunk/lib/Target/PTX/PTXSubtarget.cpp
llvm/trunk/lib/Target/PTX/PTXSubtarget.h
llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp
llvm/trunk/lib/Target/PTX/PTXTargetMachine.h
llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h
llvm/trunk/lib/Target/PowerPC/PPCMachineFunctionInfo.h
llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h
llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h
llvm/trunk/lib/Target/Sparc/SparcMachineFunctionInfo.h
llvm/trunk/lib/Target/Sparc/SparcSubtarget.cpp
llvm/trunk/lib/Target/Sparc/SparcSubtarget.h
llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp
llvm/trunk/lib/Target/Sparc/SparcTargetMachine.h
llvm/trunk/lib/Target/TargetLibraryInfo.cpp
llvm/trunk/lib/Target/TargetRegisterInfo.cpp
llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp
llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.h
llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h
llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.h
llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
llvm/trunk/lib/Target/X86/X86TargetMachine.h
llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp
llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.h
llvm/trunk/lib/Target/XCore/XCoreMachineFunctionInfo.h
llvm/trunk/lib/Target/XCore/XCoreSubtarget.cpp
llvm/trunk/lib/Target/XCore/XCoreSubtarget.h
llvm/trunk/lib/Transforms/Utils/SimplifyIndVar.cpp
llvm/trunk/lib/VMCore/Constants.cpp
llvm/trunk/lib/VMCore/ConstantsContext.h
llvm/trunk/lib/VMCore/Function.cpp
llvm/trunk/lib/VMCore/LLVMContextImpl.cpp
llvm/trunk/lib/VMCore/Metadata.cpp
llvm/trunk/lib/VMCore/PassManager.cpp
llvm/trunk/tools/bugpoint/CrashDebugger.cpp
llvm/trunk/tools/bugpoint/ToolRunner.cpp
llvm/trunk/tools/bugpoint/ToolRunner.h
llvm/trunk/tools/llvm-diff/DiffConsumer.cpp
llvm/trunk/tools/llvm-diff/DiffConsumer.h
llvm/trunk/tools/llvm-diff/DifferenceEngine.cpp
llvm/trunk/tools/llvm-diff/DifferenceEngine.h
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
llvm/trunk/tools/llvm-objdump/llvm-objdump.h
llvm/trunk/unittests/Support/IRBuilderTest.cpp
llvm/trunk/unittests/Transforms/Utils/Cloning.cpp
llvm/trunk/utils/TableGen/DAGISelMatcher.cpp
llvm/trunk/utils/TableGen/DAGISelMatcher.h
llvm/trunk/utils/TableGen/SetTheory.cpp
llvm/trunk/utils/TableGen/SetTheory.h
llvm/trunk/utils/TableGen/TGValueTypes.cpp
llvm/trunk/utils/TableGen/TableGen.cpp
llvm/trunk/utils/TableGen/X86ModRMFilters.h
Modified: llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h (original)
+++ llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h Mon Dec 19 20:50:00 2011
@@ -65,6 +65,7 @@
//===----------------------------------------------------------------------===//
class RefCountedBaseVPTR {
mutable unsigned ref_cnt;
+ virtual void anchor();
protected:
RefCountedBaseVPTR() : ref_cnt(0) {}
Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Mon Dec 19 20:50:00 2011
@@ -153,6 +153,7 @@
/// DIScope - A base class for various scopes.
class DIScope : public DIDescriptor {
+ virtual void anchor();
public:
explicit DIScope(const MDNode *N = 0) : DIDescriptor (N) {}
virtual ~DIScope() {}
@@ -163,6 +164,7 @@
/// DICompileUnit - A wrapper for a compile unit.
class DICompileUnit : public DIScope {
+ virtual void anchor();
public:
explicit DICompileUnit(const MDNode *N = 0) : DIScope(N) {}
@@ -202,6 +204,7 @@
/// DIFile - This is a wrapper for a file.
class DIFile : public DIScope {
+ virtual void anchor();
public:
explicit DIFile(const MDNode *N = 0) : DIScope(N) {
if (DbgNode && !isFile())
@@ -230,7 +233,7 @@
/// FIXME: Types should be factored much better so that CV qualifiers and
/// others do not require a huge and empty descriptor full of zeros.
class DIType : public DIScope {
- public:
+ virtual void anchor();
protected:
// This ctor is used when the Tag has already been validated by a derived
// ctor.
@@ -240,7 +243,6 @@
/// Verify - Verify that a type descriptor is well formed.
bool Verify() const;
- public:
explicit DIType(const MDNode *N);
explicit DIType() {}
virtual ~DIType() {}
@@ -320,6 +322,7 @@
/// DIBasicType - A basic type, like 'int' or 'float'.
class DIBasicType : public DIType {
+ virtual void anchor();
public:
explicit DIBasicType(const MDNode *N = 0) : DIType(N) {}
@@ -338,6 +341,7 @@
/// DIDerivedType - A simple derived type, like a const qualified type,
/// a typedef, a pointer or reference, etc.
class DIDerivedType : public DIType {
+ virtual void anchor();
protected:
explicit DIDerivedType(const MDNode *N, bool, bool)
: DIType(N, true, true) {}
@@ -391,6 +395,7 @@
/// other types, like a function or struct.
/// FIXME: Why is this a DIDerivedType??
class DICompositeType : public DIDerivedType {
+ virtual void anchor();
public:
explicit DICompositeType(const MDNode *N = 0)
: DIDerivedType(N, true, true) {
@@ -454,6 +459,7 @@
/// DISubprogram - This is a wrapper for a subprogram (e.g. a function).
class DISubprogram : public DIScope {
+ virtual void anchor();
public:
explicit DISubprogram(const MDNode *N = 0) : DIScope(N) {}
@@ -687,6 +693,7 @@
/// DILexicalBlock - This is a wrapper for a lexical block.
class DILexicalBlock : public DIScope {
+ virtual void anchor();
public:
explicit DILexicalBlock(const MDNode *N = 0) : DIScope(N) {}
DIScope getContext() const { return getFieldAs(1); }
@@ -705,6 +712,7 @@
/// DILexicalBlockFile - This is a wrapper for a lexical block with
/// a filename change.
class DILexicalBlockFile : public DIScope {
+ virtual void anchor();
public:
explicit DILexicalBlockFile(const MDNode *N = 0) : DIScope(N) {}
DIScope getContext() const { return getScope().getContext(); }
@@ -724,6 +732,7 @@
/// DINameSpace - A wrapper for a C++ style name space.
class DINameSpace : public DIScope {
+ virtual void anchor();
public:
explicit DINameSpace(const MDNode *N = 0) : DIScope(N) {}
DIScope getContext() const { return getFieldAs(1); }
Modified: llvm/trunk/include/llvm/Analysis/DominanceFrontier.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DominanceFrontier.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/DominanceFrontier.h (original)
+++ llvm/trunk/include/llvm/Analysis/DominanceFrontier.h Mon Dec 19 20:50:00 2011
@@ -154,6 +154,7 @@
/// used to compute a forward dominator frontiers.
///
class DominanceFrontier : public DominanceFrontierBase {
+ virtual void anchor();
public:
static char ID; // Pass ID, replacement for typeid
DominanceFrontier() :
Modified: llvm/trunk/include/llvm/Argument.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Argument.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Argument.h (original)
+++ llvm/trunk/include/llvm/Argument.h Mon Dec 19 20:50:00 2011
@@ -30,6 +30,7 @@
/// the function was called with.
/// @brief LLVM Argument representation
class Argument : public Value, public ilist_node {
+ virtual void anchor();
Function *Parent;
friend class SymbolTableListTraits;
Modified: llvm/trunk/include/llvm/CodeGen/JITCodeEmitter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/JITCodeEmitter.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/JITCodeEmitter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/JITCodeEmitter.h Mon Dec 19 20:50:00 2011
@@ -51,6 +51,7 @@
/// occurred, more memory is allocated, and we reemit the code into it.
///
class JITCodeEmitter : public MachineCodeEmitter {
+ virtual void anchor();
public:
virtual ~JITCodeEmitter() {}
Modified: llvm/trunk/include/llvm/CodeGen/LexicalScopes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LexicalScopes.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LexicalScopes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LexicalScopes.h Mon Dec 19 20:50:00 2011
@@ -153,6 +153,7 @@
/// LexicalScope - This class is used to track scope information.
///
class LexicalScope {
+ virtual void anchor();
public:
LexicalScope(LexicalScope *P, const MDNode *D, const MDNode *I, bool A)
Modified: llvm/trunk/include/llvm/CodeGen/MachineBranchProbabilityInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineBranchProbabilityInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineBranchProbabilityInfo.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineBranchProbabilityInfo.h Mon Dec 19 20:50:00 2011
@@ -25,6 +25,7 @@
class MachineBasicBlock;
class MachineBranchProbabilityInfo : public ImmutablePass {
+ virtual void anchor();
// Default weight value. Used when we don't have information about the edge.
// TODO: DEFAULT_WEIGHT makes sense during static predication, when none of
Modified: llvm/trunk/include/llvm/CodeGen/MachineCodeEmitter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineCodeEmitter.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineCodeEmitter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineCodeEmitter.h Mon Dec 19 20:50:00 2011
@@ -20,6 +20,8 @@
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/DebugLoc.h"
+#include
+
namespace llvm {
class MachineBasicBlock;
@@ -49,6 +51,7 @@
/// occurred, more memory is allocated, and we reemit the code into it.
///
class MachineCodeEmitter {
+ virtual void anchor();
protected:
/// BufferBegin/BufferEnd - Pointers to the start and end of the memory
/// allocated for this code buffer.
Modified: llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h Mon Dec 19 20:50:00 2011
@@ -34,6 +34,7 @@
/// Abstract base class for all machine specific constantpool value subclasses.
///
class MachineConstantPoolValue {
+ virtual void anchor();
Type *Ty;
public:
Modified: llvm/trunk/include/llvm/CodeGen/MachinePassRegistry.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachinePassRegistry.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachinePassRegistry.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachinePassRegistry.h Mon Dec 19 20:50:00 2011
@@ -33,6 +33,7 @@
///
//===----------------------------------------------------------------------===//
class MachinePassRegistryListener {
+ virtual void anchor();
public:
MachinePassRegistryListener() {}
virtual ~MachinePassRegistryListener() {}
Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Mon Dec 19 20:50:00 2011
@@ -427,6 +427,7 @@
/// implementation to decide.
///
class SchedulingPriorityQueue {
+ virtual void anchor();
unsigned CurCycle;
bool HasReadyFilter;
public:
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Mon Dec 19 20:50:00 2011
@@ -181,6 +181,7 @@
/// ISelUpdater - helper class to handle updates of the
/// instruction selection graph.
class ISelUpdater : public SelectionDAG::DAGUpdateListener {
+ virtual void anchor();
SelectionDAG::allnodes_iterator &ISelPosition;
public:
explicit ISelUpdater(SelectionDAG::allnodes_iterator &isp)
Modified: llvm/trunk/include/llvm/Constant.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constant.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Constant.h (original)
+++ llvm/trunk/include/llvm/Constant.h Mon Dec 19 20:50:00 2011
@@ -41,6 +41,7 @@
class Constant : public User {
void operator=(const Constant &); // Do not implement
Constant(const Constant &); // Do not implement
+ virtual void anchor();
protected:
Constant(Type *ty, ValueTy vty, Use *Ops, unsigned NumOps)
Modified: llvm/trunk/include/llvm/Constants.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Constants.h (original)
+++ llvm/trunk/include/llvm/Constants.h Mon Dec 19 20:50:00 2011
@@ -45,6 +45,7 @@
/// represents both boolean and integral constants.
/// @brief Class for constant integers.
class ConstantInt : public Constant {
+ virtual void anchor();
void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
ConstantInt(const ConstantInt &); // DO NOT IMPLEMENT
ConstantInt(IntegerType *Ty, const APInt& V);
@@ -229,6 +230,7 @@
///
class ConstantFP : public Constant {
APFloat Val;
+ virtual void anchor();
void *operator new(size_t, unsigned);// DO NOT IMPLEMENT
ConstantFP(const ConstantFP &); // DO NOT IMPLEMENT
friend class LLVMContextImpl;
Modified: llvm/trunk/include/llvm/MC/MCAsmInfoCOFF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmInfoCOFF.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCAsmInfoCOFF.h (original)
+++ llvm/trunk/include/llvm/MC/MCAsmInfoCOFF.h Mon Dec 19 20:50:00 2011
@@ -14,17 +14,19 @@
namespace llvm {
class MCAsmInfoCOFF : public MCAsmInfo {
+ virtual void anchor();
protected:
explicit MCAsmInfoCOFF();
-
};
class MCAsmInfoMicrosoft : public MCAsmInfoCOFF {
+ virtual void anchor();
protected:
explicit MCAsmInfoMicrosoft();
};
class MCAsmInfoGNUCOFF : public MCAsmInfoCOFF {
+ virtual void anchor();
protected:
explicit MCAsmInfoGNUCOFF();
};
Modified: llvm/trunk/include/llvm/MC/MCAsmInfoDarwin.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmInfoDarwin.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCAsmInfoDarwin.h (original)
+++ llvm/trunk/include/llvm/MC/MCAsmInfoDarwin.h Mon Dec 19 20:50:00 2011
@@ -18,7 +18,9 @@
#include "llvm/MC/MCAsmInfo.h"
namespace llvm {
- struct MCAsmInfoDarwin : public MCAsmInfo {
+ class MCAsmInfoDarwin : public MCAsmInfo {
+ virtual void anchor();
+ public:
explicit MCAsmInfoDarwin();
};
}
Modified: llvm/trunk/include/llvm/MC/MCAssembler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAssembler.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCAssembler.h (original)
+++ llvm/trunk/include/llvm/MC/MCAssembler.h Mon Dec 19 20:50:00 2011
@@ -106,6 +106,7 @@
};
class MCDataFragment : public MCFragment {
+ virtual void anchor();
SmallString<32> Contents;
/// Fixups - The list of fixups in this fragment.
@@ -160,6 +161,8 @@
// object with just the MCInst and a code size, then we should just change
// MCDataFragment to have an optional MCInst at its end.
class MCInstFragment : public MCFragment {
+ virtual void anchor();
+
/// Inst - The instruction this is a fragment for.
MCInst Inst;
@@ -215,6 +218,8 @@
};
class MCAlignFragment : public MCFragment {
+ virtual void anchor();
+
/// Alignment - The alignment to ensure, in bytes.
unsigned Alignment;
@@ -263,6 +268,8 @@
};
class MCFillFragment : public MCFragment {
+ virtual void anchor();
+
/// Value - Value to use for filling bytes.
int64_t Value;
@@ -300,6 +307,8 @@
};
class MCOrgFragment : public MCFragment {
+ virtual void anchor();
+
/// Offset - The offset this fragment should start at.
const MCExpr *Offset;
@@ -327,6 +336,8 @@
};
class MCLEBFragment : public MCFragment {
+ virtual void anchor();
+
/// Value - The value this fragment should contain.
const MCExpr *Value;
@@ -358,6 +369,8 @@
};
class MCDwarfLineAddrFragment : public MCFragment {
+ virtual void anchor();
+
/// LineDelta - the value of the difference between the two line numbers
/// between two .loc dwarf directives.
int64_t LineDelta;
@@ -393,6 +406,8 @@
};
class MCDwarfCallFrameFragment : public MCFragment {
+ virtual void anchor();
+
/// AddrDelta - The expression for the difference of the two symbols that
/// make up the address delta between two .cfi_* dwarf directives.
const MCExpr *AddrDelta;
Modified: llvm/trunk/include/llvm/Metadata.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Metadata.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Metadata.h (original)
+++ llvm/trunk/include/llvm/Metadata.h Mon Dec 19 20:50:00 2011
@@ -36,6 +36,7 @@
/// These are used to efficiently contain a byte sequence for metadata.
/// MDString is always unnamed.
class MDString : public Value {
+ virtual void anchor();
MDString(const MDString &); // DO NOT IMPLEMENT
StringRef Str;
Modified: llvm/trunk/include/llvm/Object/Archive.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/Archive.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/Archive.h (original)
+++ llvm/trunk/include/llvm/Object/Archive.h Mon Dec 19 20:50:00 2011
@@ -22,6 +22,7 @@
namespace object {
class Archive : public Binary {
+ virtual void anchor();
public:
class Child {
const Archive *Parent;
Modified: llvm/trunk/include/llvm/Object/ObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ObjectFile.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ObjectFile.h (original)
+++ llvm/trunk/include/llvm/Object/ObjectFile.h Mon Dec 19 20:50:00 2011
@@ -232,7 +232,7 @@
/// Concrete instances of this object are created by createObjectFile, which
/// figure out which type to create.
class ObjectFile : public Binary {
-private:
+ virtual void anchor();
ObjectFile(); // = delete
ObjectFile(const ObjectFile &other); // = delete
Modified: llvm/trunk/include/llvm/TableGen/Record.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/TableGen/Record.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/TableGen/Record.h (original)
+++ llvm/trunk/include/llvm/TableGen/Record.h Mon Dec 19 20:50:00 2011
@@ -68,6 +68,7 @@
class RecTy {
ListRecTy *ListTy;
+ virtual void anchor();
public:
RecTy() : ListTy(0) {}
virtual ~RecTy() {}
@@ -489,6 +490,7 @@
class Init {
Init(const Init &); // Do not define.
Init &operator=(const Init &); // Do not define.
+ virtual void anchor();
protected:
Init(void) {}
@@ -617,6 +619,7 @@
UnsetInit() : Init() {}
UnsetInit(const UnsetInit &); // Do not define.
UnsetInit &operator=(const UnsetInit &Other); // Do not define.
+ virtual void anchor();
public:
static UnsetInit *get();
@@ -638,6 +641,7 @@
explicit BitInit(bool V) : Value(V) {}
BitInit(const BitInit &Other); // Do not define.
BitInit &operator=(BitInit &Other); // Do not define.
+ virtual void anchor();
public:
static BitInit *get(bool V);
@@ -750,6 +754,7 @@
StringInit(const StringInit &Other); // Do not define.
StringInit &operator=(const StringInit &Other); // Do not define.
+ virtual void anchor();
public:
static StringInit *get(const std::string &V);
@@ -792,6 +797,7 @@
CodeInit(const CodeInit &Other); // Do not define.
CodeInit &operator=(const CodeInit &Other); // Do not define.
+ virtual void anchor();
public:
static CodeInit *get(const std::string &V);
Modified: llvm/trunk/include/llvm/TableGen/TableGenAction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/TableGen/TableGenAction.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/TableGen/TableGenAction.h (original)
+++ llvm/trunk/include/llvm/TableGen/TableGenAction.h Mon Dec 19 20:50:00 2011
@@ -21,6 +21,7 @@
class RecordKeeper;
class TableGenAction {
+ virtual void anchor();
public:
virtual ~TableGenAction() {}
Modified: llvm/trunk/include/llvm/TableGen/TableGenBackend.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/TableGen/TableGenBackend.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/TableGen/TableGenBackend.h (original)
+++ llvm/trunk/include/llvm/TableGen/TableGenBackend.h Mon Dec 19 20:50:00 2011
@@ -24,6 +24,7 @@
class RecordKeeper;
struct TableGenBackend {
+ virtual void anchor();
virtual ~TableGenBackend() {}
// run - All TableGen backends should implement the run method, which should
Modified: llvm/trunk/include/llvm/Target/TargetJITInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetJITInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetJITInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetJITInfo.h Mon Dec 19 20:50:00 2011
@@ -30,6 +30,7 @@
/// TargetJITInfo - Target specific information required by the Just-In-Time
/// code generator.
class TargetJITInfo {
+ virtual void anchor();
public:
virtual ~TargetJITInfo() {}
Modified: llvm/trunk/include/llvm/Target/TargetLibraryInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLibraryInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetLibraryInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetLibraryInfo.h Mon Dec 19 20:50:00 2011
@@ -208,6 +208,7 @@
/// library functions are available for the current target, and allows a
/// frontend to disable optimizations through -fno-builtin etc.
class TargetLibraryInfo : public ImmutablePass {
+ virtual void anchor();
unsigned char AvailableArray[(LibFunc::NumLibFuncs+3)/4];
llvm::DenseMap CustomNames;
static const char* StandardNames[LibFunc::NumLibFuncs];
Modified: llvm/trunk/include/llvm/Target/TargetRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetRegisterInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetRegisterInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetRegisterInfo.h Mon Dec 19 20:50:00 2011
@@ -38,6 +38,7 @@
typedef const EVT* vt_iterator;
typedef const TargetRegisterClass* const * sc_iterator;
private:
+ virtual void anchor();
const MCRegisterClass *MC;
const vt_iterator VTs;
const unsigned *SubClassMask;
Modified: llvm/trunk/include/llvm/Transforms/Utils/SimplifyIndVar.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/SimplifyIndVar.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/SimplifyIndVar.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/SimplifyIndVar.h Mon Dec 19 20:50:00 2011
@@ -33,6 +33,7 @@
/// Interface for visiting interesting IV users that are recognized but not
/// simplified by this utility.
class IVVisitor {
+ virtual void anchor();
public:
virtual ~IVVisitor() {}
virtual void visitCast(CastInst *Cast) = 0;
Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/DebugInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/DebugInfo.cpp Mon Dec 19 20:50:00 2011
@@ -638,6 +638,32 @@
}
//===----------------------------------------------------------------------===//
+// DIDescriptor: vtable anchors for all descriptors.
+//===----------------------------------------------------------------------===//
+
+void DIScope::anchor() { }
+
+void DICompileUnit::anchor() { }
+
+void DIFile::anchor() { }
+
+void DIType::anchor() { }
+
+void DIBasicType::anchor() { }
+
+void DIDerivedType::anchor() { }
+
+void DICompositeType::anchor() { }
+
+void DISubprogram::anchor() { }
+
+void DILexicalBlock::anchor() { }
+
+void DINameSpace::anchor() { }
+
+void DILexicalBlockFile::anchor() { }
+
+//===----------------------------------------------------------------------===//
// DIDescriptor: dump routines for all descriptors.
//===----------------------------------------------------------------------===//
Modified: llvm/trunk/lib/Analysis/DominanceFrontier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DominanceFrontier.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/DominanceFrontier.cpp (original)
+++ llvm/trunk/lib/Analysis/DominanceFrontier.cpp Mon Dec 19 20:50:00 2011
@@ -35,6 +35,8 @@
};
}
+void DominanceFrontier::anchor() { }
+
const DominanceFrontier::DomSetType &
DominanceFrontier::calculate(const DominatorTree &DT,
const DomTreeNode *Node) {
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp Mon Dec 19 20:50:00 2011
@@ -174,6 +174,7 @@
}
#endif
+void DIEValue::anchor() { }
#ifndef NDEBUG
void DIEValue::dump() {
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DIE.h Mon Dec 19 20:50:00 2011
@@ -195,6 +195,7 @@
/// DIEValue - A debug information entry value.
///
class DIEValue {
+ virtual void anchor();
public:
enum {
isInteger,
Added: llvm/trunk/lib/CodeGen/JITCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/JITCodeEmitter.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/CodeGen/JITCodeEmitter.cpp (added)
+++ llvm/trunk/lib/CodeGen/JITCodeEmitter.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,14 @@
+//===-- llvm/CodeGen/JITCodeEmitter.cpp - Code emission --------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/CodeGen/JITCodeEmitter.h"
+
+using namespace llvm;
+
+void JITCodeEmitter::anchor() { }
Modified: llvm/trunk/lib/CodeGen/LexicalScopes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LexicalScopes.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LexicalScopes.cpp (original)
+++ llvm/trunk/lib/CodeGen/LexicalScopes.cpp Mon Dec 19 20:50:00 2011
@@ -311,6 +311,8 @@
return Result;
}
+void LexicalScope::anchor() { }
+
/// dump - Print data structures.
void LexicalScope::dump() const {
#ifndef NDEBUG
Modified: llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveRangeEdit.cpp Mon Dec 19 20:50:00 2011
@@ -29,6 +29,8 @@
STATISTIC(NumDCEFoldedLoads, "Number of single use loads folded after DCE");
STATISTIC(NumFracRanges, "Number of live ranges fractured by DCE");
+void LiveRangeEdit::Delegate::anchor() { }
+
LiveInterval &LiveRangeEdit::createFrom(unsigned OldReg,
LiveIntervals &LIS,
VirtRegMap &VRM) {
Modified: llvm/trunk/lib/CodeGen/LiveRangeEdit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveRangeEdit.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveRangeEdit.h (original)
+++ llvm/trunk/lib/CodeGen/LiveRangeEdit.h Mon Dec 19 20:50:00 2011
@@ -33,7 +33,9 @@
class LiveRangeEdit {
public:
/// Callback methods for LiveRangeEdit owners.
- struct Delegate {
+ class Delegate {
+ virtual void anchor();
+ public:
/// Called immediately before erasing a dead machine instruction.
virtual void LRE_WillEraseInstruction(MachineInstr *MI) {}
Modified: llvm/trunk/lib/CodeGen/MachineBranchProbabilityInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBranchProbabilityInfo.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineBranchProbabilityInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineBranchProbabilityInfo.cpp Mon Dec 19 20:50:00 2011
@@ -26,6 +26,8 @@
char MachineBranchProbabilityInfo::ID = 0;
+void MachineBranchProbabilityInfo::anchor() { }
+
uint32_t MachineBranchProbabilityInfo::
getSumForBlock(MachineBasicBlock *MBB, uint32_t &Scale) const {
// First we compute the sum with 64-bits of precision, ensuring that cannot
Added: llvm/trunk/lib/CodeGen/MachineCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCodeEmitter.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineCodeEmitter.cpp (added)
+++ llvm/trunk/lib/CodeGen/MachineCodeEmitter.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,14 @@
+//===-- llvm/CodeGen/MachineCodeEmitter.cpp - Code emission -----*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/CodeGen/MachineCodeEmitter.h"
+
+using namespace llvm;
+
+void MachineCodeEmitter::anchor() { }
Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Mon Dec 19 20:50:00 2011
@@ -619,6 +619,8 @@
// MachineConstantPool implementation
//===----------------------------------------------------------------------===//
+void MachineConstantPoolValue::anchor() { }
+
Type *MachineConstantPoolEntry::getType() const {
if (isMachineConstantPoolEntry())
return Val.MachineCPVal->getType();
Modified: llvm/trunk/lib/CodeGen/MachinePassRegistry.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachinePassRegistry.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachinePassRegistry.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachinePassRegistry.cpp Mon Dec 19 20:50:00 2011
@@ -16,6 +16,7 @@
using namespace llvm;
+void MachinePassRegistryListener::anchor() { }
/// Add - Adds a function pass to the registration list.
///
Modified: llvm/trunk/lib/CodeGen/ScheduleDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAG.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAG.cpp Mon Dec 19 20:50:00 2011
@@ -31,6 +31,8 @@
cl::desc("Stress test instruction scheduling"));
#endif
+void SchedulingPriorityQueue::anchor() { }
+
ScheduleDAG::ScheduleDAG(MachineFunction &mf)
: TM(mf.getTarget()),
TII(TM.getInstrInfo()),
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Dec 19 20:50:00 2011
@@ -262,6 +262,8 @@
// SelectionDAGISel code
//===----------------------------------------------------------------------===//
+void SelectionDAGISel::ISelUpdater::anchor() { }
+
SelectionDAGISel::SelectionDAGISel(const TargetMachine &tm,
CodeGenOpt::Level OL) :
MachineFunctionPass(ID), TM(tm), TLI(*tm.getTargetLowering()),
Modified: llvm/trunk/lib/CodeGen/Spiller.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/Spiller.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/Spiller.cpp (original)
+++ llvm/trunk/lib/CodeGen/Spiller.cpp Mon Dec 19 20:50:00 2011
@@ -185,6 +185,8 @@
} // end anonymous namespace
+void Spiller::anchor() { }
+
llvm::Spiller* llvm::createSpiller(MachineFunctionPass &pass,
MachineFunction &mf,
VirtRegMap &vrm) {
Modified: llvm/trunk/lib/CodeGen/Spiller.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/Spiller.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/Spiller.h (original)
+++ llvm/trunk/lib/CodeGen/Spiller.h Mon Dec 19 20:50:00 2011
@@ -22,6 +22,7 @@
/// Implementations are utility classes which insert spill or remat code on
/// demand.
class Spiller {
+ virtual void anchor();
public:
virtual ~Spiller() = 0;
Modified: llvm/trunk/lib/DebugInfo/DWARFContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFContext.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARFContext.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARFContext.cpp Mon Dec 19 20:50:00 2011
@@ -165,3 +165,5 @@
return DILineInfo(fileName.c_str(), row.Line, row.Column);
}
+
+void DWARFContextInMemory::anchor() { }
Modified: llvm/trunk/lib/DebugInfo/DWARFContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFContext.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARFContext.h (original)
+++ llvm/trunk/lib/DebugInfo/DWARFContext.h Mon Dec 19 20:50:00 2011
@@ -86,6 +86,7 @@
/// DWARFContext. It assumes all content is available in memory and stores
/// pointers to it.
class DWARFContextInMemory : public DWARFContext {
+ virtual void anchor();
StringRef InfoSection;
StringRef AbbrevSection;
StringRef ARangeSection;
Added: llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.cpp (added)
+++ llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,14 @@
+//==-- MCJITMemoryManager.cpp - Definition for the Memory Manager -*-C++ -*-==//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "MCJITMemoryManager.h"
+
+using namespace llvm;
+
+void MCJITMemoryManager::anchor() { }
Modified: llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h (original)
+++ llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h Mon Dec 19 20:50:00 2011
@@ -21,6 +21,7 @@
// and the RuntimeDyld interface that maps objects, by name, onto their
// matching LLVM IR counterparts in the module(s) being compiled.
class MCJITMemoryManager : public RTDyldMemoryManager {
+ virtual void anchor();
JITMemoryManager *JMM;
// FIXME: Multiple modules.
Modified: llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp Mon Dec 19 20:50:00 2011
@@ -16,6 +16,8 @@
#include "llvm/ADT/SmallVector.h"
using namespace llvm;
+void MCAsmInfoCOFF::anchor() { }
+
MCAsmInfoCOFF::MCAsmInfoCOFF() {
GlobalPrefix = "_";
COMMDirectiveAlignmentIsInBytes = false;
@@ -39,10 +41,14 @@
SupportsDataRegions = false;
}
+void MCAsmInfoMicrosoft::anchor() { }
+
MCAsmInfoMicrosoft::MCAsmInfoMicrosoft() {
AllowQuotesInName = true;
}
+void MCAsmInfoGNUCOFF::anchor() { }
+
MCAsmInfoGNUCOFF::MCAsmInfoGNUCOFF() {
}
Modified: llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp Mon Dec 19 20:50:00 2011
@@ -18,6 +18,8 @@
#include "llvm/MC/MCStreamer.h"
using namespace llvm;
+void MCAsmInfoDarwin::anchor() { }
+
MCAsmInfoDarwin::MCAsmInfoDarwin() {
// Common settings for all Darwin targets.
// Syntax:
Modified: llvm/trunk/lib/MC/MCAssembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAssembler.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAssembler.cpp (original)
+++ llvm/trunk/lib/MC/MCAssembler.cpp Mon Dec 19 20:50:00 2011
@@ -972,3 +972,13 @@
}
OS << "]>\n";
}
+
+// anchors for MC*Fragment vtables
+void MCDataFragment::anchor() { }
+void MCInstFragment::anchor() { }
+void MCAlignFragment::anchor() { }
+void MCFillFragment::anchor() { }
+void MCOrgFragment::anchor() { }
+void MCLEBFragment::anchor() { }
+void MCDwarfLineAddrFragment::anchor() { }
+void MCDwarfCallFrameFragment::anchor() { }
Modified: llvm/trunk/lib/Object/Archive.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/Archive.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Object/Archive.cpp (original)
+++ llvm/trunk/lib/Object/Archive.cpp Mon Dec 19 20:50:00 2011
@@ -74,6 +74,8 @@
return false;
}
+void Archive::anchor() { }
+
Archive::Child Archive::Child::getNext() const {
size_t SpaceToSkip = sizeof(ArchiveMemberHeader) +
ToHeader(Data.data())->getSize();
Modified: llvm/trunk/lib/Object/ObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/ObjectFile.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Object/ObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/ObjectFile.cpp Mon Dec 19 20:50:00 2011
@@ -21,6 +21,8 @@
using namespace llvm;
using namespace object;
+void ObjectFile::anchor() { }
+
ObjectFile::ObjectFile(unsigned int Type, MemoryBuffer *source, error_code &ec)
: Binary(Type, source) {
}
Added: llvm/trunk/lib/Support/IntrusiveRefCntPtr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/IntrusiveRefCntPtr.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/Support/IntrusiveRefCntPtr.cpp (added)
+++ llvm/trunk/lib/Support/IntrusiveRefCntPtr.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,14 @@
+//== IntrusiveRefCntPtr.cpp - Smart Refcounting Pointer ----------*- C++ -*-==//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/ADT/IntrusiveRefCntPtr.h"
+
+using namespace llvm;
+
+void RefCountedBaseVPTR::anchor() { }
Modified: llvm/trunk/lib/TableGen/Record.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/Record.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/Record.cpp (original)
+++ llvm/trunk/lib/TableGen/Record.cpp Mon Dec 19 20:50:00 2011
@@ -81,6 +81,7 @@
CodeRecTy CodeRecTy::Shared;
DagRecTy DagRecTy::Shared;
+void RecTy::anchor() { }
void RecTy::dump() const { print(errs()); }
ListRecTy *RecTy::getListTy() {
@@ -444,13 +445,18 @@
// Initializer implementations
//===----------------------------------------------------------------------===//
+void Init::anchor() { }
void Init::dump() const { return print(errs()); }
+void UnsetInit::anchor() { }
+
UnsetInit *UnsetInit::get() {
static UnsetInit TheInit;
return &TheInit;
}
+void BitInit::anchor() { }
+
BitInit *BitInit::get(bool V) {
static BitInit True(true);
static BitInit False(false);
@@ -565,6 +571,8 @@
return BitsInit::get(NewBits);
}
+void StringInit::anchor() { }
+
StringInit *StringInit::get(const std::string &V) {
typedef StringMap Pool;
static Pool ThePool;
@@ -574,6 +582,8 @@
return I;
}
+void CodeInit::anchor() { }
+
CodeInit *CodeInit::get(const std::string &V) {
typedef StringMap Pool;
static Pool ThePool;
Added: llvm/trunk/lib/TableGen/TableGenAction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/TableGenAction.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/TableGen/TableGenAction.cpp (added)
+++ llvm/trunk/lib/TableGen/TableGenAction.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,15 @@
+//===- TableGenAction.cpp - defines TableGenAction --------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/TableGen/TableGenAction.h"
+
+using namespace llvm;
+
+void TableGenAction::anchor() { }
+
Modified: llvm/trunk/lib/TableGen/TableGenBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/TableGenBackend.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/TableGenBackend.cpp (original)
+++ llvm/trunk/lib/TableGen/TableGenBackend.cpp Mon Dec 19 20:50:00 2011
@@ -15,6 +15,8 @@
#include "llvm/TableGen/Record.h"
using namespace llvm;
+void TableGenBackend::anchor() { }
+
void TableGenBackend::EmitSourceFileHeader(const std::string &Desc,
raw_ostream &OS) const {
OS << "//===- TableGen'erated file -------------------------------------*-"
Added: llvm/trunk/lib/Target/ARM/ARMMachineFunctionInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMMachineFunctionInfo.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMMachineFunctionInfo.cpp (added)
+++ llvm/trunk/lib/Target/ARM/ARMMachineFunctionInfo.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,14 @@
+//====- ARMMachineFuctionInfo.cpp - ARM machine function info ---*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "ARMMachineFunctionInfo.h"
+
+using namespace llvm;
+
+void ARMFunctionInfo::anchor() { }
Modified: llvm/trunk/lib/Target/ARM/ARMMachineFunctionInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMMachineFunctionInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMMachineFunctionInfo.h (original)
+++ llvm/trunk/lib/Target/ARM/ARMMachineFunctionInfo.h Mon Dec 19 20:50:00 2011
@@ -25,6 +25,7 @@
/// ARMFunctionInfo - This class is derived from MachineFunctionInfo and
/// contains private ARM-specific information for each MachineFunction.
class ARMFunctionInfo : public MachineFunctionInfo {
+ virtual void anchor();
/// isThumb - True if this function is compiled under Thumb mode.
/// Used to initialized Align, so must precede it.
Modified: llvm/trunk/lib/Target/ARM/ARMRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMRegisterInfo.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMRegisterInfo.cpp Mon Dec 19 20:50:00 2011
@@ -16,6 +16,8 @@
#include "ARMRegisterInfo.h"
using namespace llvm;
+void ARMRegisterInfo::anchor() { }
+
ARMRegisterInfo::ARMRegisterInfo(const ARMBaseInstrInfo &tii,
const ARMSubtarget &sti)
: ARMBaseRegisterInfo(tii, sti) {
Modified: llvm/trunk/lib/Target/ARM/ARMRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMRegisterInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMRegisterInfo.h (original)
+++ llvm/trunk/lib/Target/ARM/ARMRegisterInfo.h Mon Dec 19 20:50:00 2011
@@ -24,6 +24,7 @@
class Type;
struct ARMRegisterInfo : public ARMBaseRegisterInfo {
+ virtual void anchor();
public:
ARMRegisterInfo(const ARMBaseInstrInfo &tii, const ARMSubtarget &STI);
};
Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp Mon Dec 19 20:50:00 2011
@@ -34,6 +34,7 @@
RegisterTargetMachine Y(TheThumbTarget);
}
+
/// TargetMachine ctor - Create an ARM architecture model.
///
ARMBaseTargetMachine::ARMBaseTargetMachine(const Target &T, StringRef TT,
@@ -50,6 +51,8 @@
this->Options.FloatABIType = FloatABI::Soft;
}
+void ARMTargetMachine::anchor() { }
+
ARMTargetMachine::ARMTargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS,
const TargetOptions &Options,
@@ -74,6 +77,8 @@
"support ARM mode execution!");
}
+void ThumbTargetMachine::anchor() { }
+
ThumbTargetMachine::ThumbTargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS,
const TargetOptions &Options,
Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMTargetMachine.h (original)
+++ llvm/trunk/lib/Target/ARM/ARMTargetMachine.h Mon Dec 19 20:50:00 2011
@@ -63,6 +63,7 @@
/// ARMTargetMachine - ARM target machine.
///
class ARMTargetMachine : public ARMBaseTargetMachine {
+ virtual void anchor();
ARMInstrInfo InstrInfo;
const TargetData DataLayout; // Calculates type size & alignment
ARMELFWriterInfo ELFWriterInfo;
@@ -103,6 +104,7 @@
/// Thumb-1 and Thumb-2.
///
class ThumbTargetMachine : public ARMBaseTargetMachine {
+ virtual void anchor();
// Either Thumb1InstrInfo or Thumb2InstrInfo.
OwningPtr InstrInfo;
const TargetData DataLayout; // Calculates type size & alignment
Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp Mon Dec 19 20:50:00 2011
@@ -48,6 +48,8 @@
0,0
};
+void ARMMCAsmInfoDarwin::anchor() { }
+
ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin() {
AsmTransCBE = arm_asm_table;
Data64bitsDirective = 0;
@@ -61,6 +63,8 @@
ExceptionsType = ExceptionHandling::SjLj;
}
+void ARMELFMCAsmInfo::anchor() { }
+
ARMELFMCAsmInfo::ARMELFMCAsmInfo() {
// ".comm align is in bytes but .align is pow-2."
AlignmentIsInBytes = false;
Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h (original)
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h Mon Dec 19 20:50:00 2011
@@ -18,11 +18,15 @@
namespace llvm {
- struct ARMMCAsmInfoDarwin : public MCAsmInfoDarwin {
+ class ARMMCAsmInfoDarwin : public MCAsmInfoDarwin {
+ virtual void anchor();
+ public:
explicit ARMMCAsmInfoDarwin();
};
- struct ARMELFMCAsmInfo : public MCAsmInfo {
+ class ARMELFMCAsmInfo : public MCAsmInfo {
+ virtual void anchor();
+ public:
explicit ARMELFMCAsmInfo();
};
Modified: llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.cpp Mon Dec 19 20:50:00 2011
@@ -14,6 +14,8 @@
#include "SPUMCAsmInfo.h"
using namespace llvm;
+void SPULinuxMCAsmInfo::anchor() { }
+
SPULinuxMCAsmInfo::SPULinuxMCAsmInfo(const Target &T, StringRef TT) {
IsLittleEndian = false;
Modified: llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.h (original)
+++ llvm/trunk/lib/Target/CellSPU/MCTargetDesc/SPUMCAsmInfo.h Mon Dec 19 20:50:00 2011
@@ -20,7 +20,9 @@
namespace llvm {
class Target;
- struct SPULinuxMCAsmInfo : public MCAsmInfo {
+ class SPULinuxMCAsmInfo : public MCAsmInfo {
+ virtual void anchor();
+ public:
explicit SPULinuxMCAsmInfo(const Target &T, StringRef TT);
};
} // namespace llvm
Added: llvm/trunk/lib/Target/CellSPU/SPUMachineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUMachineFunction.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUMachineFunction.cpp (added)
+++ llvm/trunk/lib/Target/CellSPU/SPUMachineFunction.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,14 @@
+//==-- SPUMachineFunctionInfo.cpp - Private data used for CellSPU -*- C++ -*-=//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "SPUMachineFunction.h"
+
+using namespace llvm;
+
+void SPUFunctionInfo::anchor() { }
Modified: llvm/trunk/lib/Target/CellSPU/SPUMachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUMachineFunction.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUMachineFunction.h (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUMachineFunction.h Mon Dec 19 20:50:00 2011
@@ -21,7 +21,8 @@
/// SPUFunctionInfo - Cell SPU target-specific information for each
/// MachineFunction
class SPUFunctionInfo : public MachineFunctionInfo {
-private:
+ virtual void anchor();
+
/// UsesLR - Indicates whether LR is used in the current function.
///
bool UsesLR;
Added: llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.cpp (added)
+++ llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,14 @@
+//===-- MBlazeMachineFunctionInfo.cpp - Private data --------------*- C++ -*-=//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "MBlazeMachineFunction.h"
+
+using namespace llvm;
+
+void MBlazeFunctionInfo::anchor() { }
Modified: llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.h (original)
+++ llvm/trunk/lib/Target/MBlaze/MBlazeMachineFunction.h Mon Dec 19 20:50:00 2011
@@ -25,8 +25,8 @@
/// MBlazeFunctionInfo - This class is derived from MachineFunction private
/// MBlaze target-specific information for each MachineFunction.
class MBlazeFunctionInfo : public MachineFunctionInfo {
+ virtual void anchor();
-private:
/// Holds for each function where on the stack the Frame Pointer must be
/// saved. This is used on Prologue and Epilogue to emit FP save/restore
int FPStackOffset;
Modified: llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.cpp Mon Dec 19 20:50:00 2011
@@ -14,6 +14,8 @@
#include "MBlazeMCAsmInfo.h"
using namespace llvm;
+void MBlazeMCAsmInfo::anchor() { }
+
MBlazeMCAsmInfo::MBlazeMCAsmInfo() {
IsLittleEndian = false;
StackGrowsUp = false;
Modified: llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.h (original)
+++ llvm/trunk/lib/Target/MBlaze/MCTargetDesc/MBlazeMCAsmInfo.h Mon Dec 19 20:50:00 2011
@@ -21,6 +21,7 @@
class Target;
class MBlazeMCAsmInfo : public MCAsmInfo {
+ virtual void anchor();
public:
explicit MBlazeMCAsmInfo();
};
Modified: llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp Mon Dec 19 20:50:00 2011
@@ -14,6 +14,8 @@
#include "MSP430MCAsmInfo.h"
using namespace llvm;
+void MSP430MCAsmInfo::anchor() { }
+
MSP430MCAsmInfo::MSP430MCAsmInfo(const Target &T, StringRef TT) {
PointerSize = 2;
Modified: llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h (original)
+++ llvm/trunk/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h Mon Dec 19 20:50:00 2011
@@ -20,7 +20,9 @@
namespace llvm {
class Target;
- struct MSP430MCAsmInfo : public MCAsmInfo {
+ class MSP430MCAsmInfo : public MCAsmInfo {
+ virtual void anchor();
+ public:
explicit MSP430MCAsmInfo(const Target &T, StringRef TT);
};
Added: llvm/trunk/lib/Target/MSP430/MSP430MachineFunctionInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430MachineFunctionInfo.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/Target/MSP430/MSP430MachineFunctionInfo.cpp (added)
+++ llvm/trunk/lib/Target/MSP430/MSP430MachineFunctionInfo.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,14 @@
+//==- MSP430MachineFuctionInfo.cpp - MSP430 machine function info -*- C++ -*-=//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "MSP430MachineFunctionInfo.h"
+
+using namespace llvm;
+
+void MSP430MachineFunctionInfo::anchor() { }
Modified: llvm/trunk/lib/Target/MSP430/MSP430MachineFunctionInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430MachineFunctionInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MSP430/MSP430MachineFunctionInfo.h (original)
+++ llvm/trunk/lib/Target/MSP430/MSP430MachineFunctionInfo.h Mon Dec 19 20:50:00 2011
@@ -21,6 +21,8 @@
/// MSP430MachineFunctionInfo - This class is derived from MachineFunction and
/// contains private MSP430 target-specific information for each MachineFunction.
class MSP430MachineFunctionInfo : public MachineFunctionInfo {
+ virtual void anchor();
+
/// CalleeSavedFrameSize - Size of the callee-saved register portion of the
/// stack frame in bytes.
unsigned CalleeSavedFrameSize;
Modified: llvm/trunk/lib/Target/MSP430/MSP430Subtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430Subtarget.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MSP430/MSP430Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/MSP430/MSP430Subtarget.cpp Mon Dec 19 20:50:00 2011
@@ -21,6 +21,8 @@
using namespace llvm;
+void MSP430Subtarget::anchor() { }
+
MSP430Subtarget::MSP430Subtarget(const std::string &TT,
const std::string &CPU,
const std::string &FS) :
Modified: llvm/trunk/lib/Target/MSP430/MSP430Subtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430Subtarget.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MSP430/MSP430Subtarget.h (original)
+++ llvm/trunk/lib/Target/MSP430/MSP430Subtarget.h Mon Dec 19 20:50:00 2011
@@ -25,6 +25,7 @@
class StringRef;
class MSP430Subtarget : public MSP430GenSubtargetInfo {
+ virtual void anchor();
bool ExtendedInsts;
public:
/// This constructor initializes the data members to match that
Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp Mon Dec 19 20:50:00 2011
@@ -16,6 +16,8 @@
using namespace llvm;
+void MipsMCAsmInfo::anchor() { }
+
MipsMCAsmInfo::MipsMCAsmInfo(const Target &T, StringRef TT) {
Triple TheTriple(TT);
if ((TheTriple.getArch() == Triple::mips) ||
Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h (original)
+++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h Mon Dec 19 20:50:00 2011
@@ -21,6 +21,7 @@
class Target;
class MipsMCAsmInfo : public MCAsmInfo {
+ virtual void anchor();
public:
explicit MipsMCAsmInfo(const Target &T, StringRef TT);
};
Added: llvm/trunk/lib/Target/Mips/MipsMachineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsMachineFunction.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsMachineFunction.cpp (added)
+++ llvm/trunk/lib/Target/Mips/MipsMachineFunction.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,14 @@
+//===-- MipsMachineFunctionInfo.cpp - Private data used for Mips --*- C++ -*-=//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "MipsMachineFunction.h"
+
+using namespace llvm;
+
+void MipsFunctionInfo::anchor() { }
Modified: llvm/trunk/lib/Target/Mips/MipsMachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsMachineFunction.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsMachineFunction.h (original)
+++ llvm/trunk/lib/Target/Mips/MipsMachineFunction.h Mon Dec 19 20:50:00 2011
@@ -25,8 +25,8 @@
/// MipsFunctionInfo - This class is derived from MachineFunction private
/// Mips target-specific information for each MachineFunction.
class MipsFunctionInfo : public MachineFunctionInfo {
+ virtual void anchor();
-private:
MachineFunction& MF;
/// SRetReturnReg - Some subtargets require that sret lowering includes
/// returning the value of the returned struct in a register. This field
Modified: llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp Mon Dec 19 20:50:00 2011
@@ -21,6 +21,8 @@
using namespace llvm;
+void MipsSubtarget::anchor() { }
+
MipsSubtarget::MipsSubtarget(const std::string &TT, const std::string &CPU,
const std::string &FS, bool little) :
MipsGenSubtargetInfo(TT, CPU, FS),
Modified: llvm/trunk/lib/Target/Mips/MipsSubtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsSubtarget.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsSubtarget.h (original)
+++ llvm/trunk/lib/Target/Mips/MipsSubtarget.h Mon Dec 19 20:50:00 2011
@@ -25,6 +25,7 @@
class StringRef;
class MipsSubtarget : public MipsGenSubtargetInfo {
+ virtual void anchor();
public:
// NOTE: O64 will not be supported.
Modified: llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp Mon Dec 19 20:50:00 2011
@@ -52,6 +52,8 @@
TLInfo(*this), TSInfo(*this), JITInfo() {
}
+void MipsebTargetMachine::anchor() { }
+
MipsebTargetMachine::
MipsebTargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS, const TargetOptions &Options,
@@ -59,6 +61,8 @@
CodeGenOpt::Level OL)
: MipsTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, false) {}
+void MipselTargetMachine::anchor() { }
+
MipselTargetMachine::
MipselTargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS, const TargetOptions &Options,
@@ -66,6 +70,8 @@
CodeGenOpt::Level OL)
: MipsTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, true) {}
+void Mips64ebTargetMachine::anchor() { }
+
Mips64ebTargetMachine::
Mips64ebTargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS, const TargetOptions &Options,
@@ -73,6 +79,8 @@
CodeGenOpt::Level OL)
: MipsTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, false) {}
+void Mips64elTargetMachine::anchor() { }
+
Mips64elTargetMachine::
Mips64elTargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS, const TargetOptions &Options,
Modified: llvm/trunk/lib/Target/Mips/MipsTargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetMachine.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsTargetMachine.h (original)
+++ llvm/trunk/lib/Target/Mips/MipsTargetMachine.h Mon Dec 19 20:50:00 2011
@@ -80,6 +80,7 @@
/// MipsebTargetMachine - Mips32 big endian target machine.
///
class MipsebTargetMachine : public MipsTargetMachine {
+ virtual void anchor();
public:
MipsebTargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS, const TargetOptions &Options,
@@ -90,6 +91,7 @@
/// MipselTargetMachine - Mips32 little endian target machine.
///
class MipselTargetMachine : public MipsTargetMachine {
+ virtual void anchor();
public:
MipselTargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS, const TargetOptions &Options,
@@ -100,6 +102,7 @@
/// Mips64ebTargetMachine - Mips64 big endian target machine.
///
class Mips64ebTargetMachine : public MipsTargetMachine {
+ virtual void anchor();
public:
Mips64ebTargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS,
@@ -111,6 +114,7 @@
/// Mips64elTargetMachine - Mips64 little endian target machine.
///
class Mips64elTargetMachine : public MipsTargetMachine {
+ virtual void anchor();
public:
Mips64elTargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS,
Modified: llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.cpp Mon Dec 19 20:50:00 2011
@@ -16,6 +16,8 @@
using namespace llvm;
+void PTXMCAsmInfo::anchor() { }
+
PTXMCAsmInfo::PTXMCAsmInfo(const Target &T, const StringRef &TT) {
Triple TheTriple(TT);
if (TheTriple.getArch() == Triple::ptx64)
Modified: llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.h (original)
+++ llvm/trunk/lib/Target/PTX/MCTargetDesc/PTXMCAsmInfo.h Mon Dec 19 20:50:00 2011
@@ -20,7 +20,9 @@
class Target;
class StringRef;
- struct PTXMCAsmInfo : public MCAsmInfo {
+ class PTXMCAsmInfo : public MCAsmInfo {
+ virtual void anchor();
+ public:
explicit PTXMCAsmInfo(const Target &T, const StringRef &TT);
};
} // namespace llvm
Added: llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.cpp (added)
+++ llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,14 @@
+//===- PTXMachineFuctionInfo.cpp - PTX machine function info -----*- C++ -*-==//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "PTXMachineFunctionInfo.h"
+
+using namespace llvm;
+
+void PTXMachineFunctionInfo::anchor() { }
Modified: llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h (original)
+++ llvm/trunk/lib/Target/PTX/PTXMachineFunctionInfo.h Mon Dec 19 20:50:00 2011
@@ -30,7 +30,7 @@
/// contains private PTX target-specific information for each MachineFunction.
///
class PTXMachineFunctionInfo : public MachineFunctionInfo {
-private:
+ virtual void anchor();
bool IsKernel;
DenseSet RegArgs;
DenseSet RegRets;
Modified: llvm/trunk/lib/Target/PTX/PTXSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXSubtarget.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/PTX/PTXSubtarget.cpp Mon Dec 19 20:50:00 2011
@@ -22,6 +22,8 @@
using namespace llvm;
+void PTXSubtarget::anchor() { }
+
PTXSubtarget::PTXSubtarget(const std::string &TT, const std::string &CPU,
const std::string &FS, bool is64Bit)
: PTXGenSubtargetInfo(TT, CPU, FS),
Modified: llvm/trunk/lib/Target/PTX/PTXSubtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXSubtarget.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXSubtarget.h (original)
+++ llvm/trunk/lib/Target/PTX/PTXSubtarget.h Mon Dec 19 20:50:00 2011
@@ -23,6 +23,7 @@
class StringRef;
class PTXSubtarget : public PTXGenSubtargetInfo {
+ virtual void anchor();
public:
/**
Modified: llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/PTX/PTXTargetMachine.cpp Mon Dec 19 20:50:00 2011
@@ -85,6 +85,8 @@
TLInfo(*this) {
}
+void PTX32TargetMachine::anchor() { }
+
PTX32TargetMachine::PTX32TargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS,
const TargetOptions &Options,
@@ -93,6 +95,8 @@
: PTXTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, false) {
}
+void PTX64TargetMachine::anchor() { }
+
PTX64TargetMachine::PTX64TargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS,
const TargetOptions &Options,
Modified: llvm/trunk/lib/Target/PTX/PTXTargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXTargetMachine.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXTargetMachine.h (original)
+++ llvm/trunk/lib/Target/PTX/PTXTargetMachine.h Mon Dec 19 20:50:00 2011
@@ -91,6 +91,7 @@
class PTX32TargetMachine : public PTXTargetMachine {
+ virtual void anchor();
public:
PTX32TargetMachine(const Target &T, StringRef TT,
@@ -100,6 +101,7 @@
}; // class PTX32TargetMachine
class PTX64TargetMachine : public PTXTargetMachine {
+ virtual void anchor();
public:
PTX64TargetMachine(const Target &T, StringRef TT,
Modified: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp Mon Dec 19 20:50:00 2011
@@ -14,6 +14,8 @@
#include "PPCMCAsmInfo.h"
using namespace llvm;
+void PPCMCAsmInfoDarwin::anchor() { }
+
PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) {
if (is64Bit)
PointerSize = 8;
@@ -30,6 +32,8 @@
SupportsDebugInformation= true; // Debug information.
}
+void PPCLinuxMCAsmInfo::anchor() { }
+
PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) {
if (is64Bit)
PointerSize = 8;
Modified: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h (original)
+++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h Mon Dec 19 20:50:00 2011
@@ -18,11 +18,15 @@
namespace llvm {
- struct PPCMCAsmInfoDarwin : public MCAsmInfoDarwin {
+ class PPCMCAsmInfoDarwin : public MCAsmInfoDarwin {
+ virtual void anchor();
+ public:
explicit PPCMCAsmInfoDarwin(bool is64Bit);
};
- struct PPCLinuxMCAsmInfo : public MCAsmInfo {
+ class PPCLinuxMCAsmInfo : public MCAsmInfo {
+ virtual void anchor();
+ public:
explicit PPCLinuxMCAsmInfo(bool is64Bit);
};
Added: llvm/trunk/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp (added)
+++ llvm/trunk/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,15 @@
+//=-- PPCMachineFunctionInfo.cpp - Private data used for PowerPC --*- C++ -*-=//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "PPCMachineFunctionInfo.h"
+
+using namespace llvm;
+
+void PPCFunctionInfo::anchor() { }
+
Modified: llvm/trunk/lib/Target/PowerPC/PPCMachineFunctionInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCMachineFunctionInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCMachineFunctionInfo.h (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCMachineFunctionInfo.h Mon Dec 19 20:50:00 2011
@@ -21,7 +21,8 @@
/// PPCFunctionInfo - This class is derived from MachineFunction private
/// PowerPC target-specific information for each MachineFunction.
class PPCFunctionInfo : public MachineFunctionInfo {
-private:
+ virtual void anchor();
+
/// FramePointerSaveIndex - Frame index of where the old frame pointer is
/// stored. Also used as an anchor for instructions that need to be altered
/// when using frame pointers (dyna_add, dyna_sub.)
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Mon Dec 19 20:50:00 2011
@@ -44,6 +44,8 @@
/// groups, which typically degrades performance.
bool PPCTargetMachine::getEnableTailMergeDefault() const { return false; }
+void PPC32TargetMachine::anchor() { }
+
PPC32TargetMachine::PPC32TargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS,
const TargetOptions &Options,
@@ -52,6 +54,7 @@
: PPCTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, false) {
}
+void PPC64TargetMachine::anchor() { }
PPC64TargetMachine::PPC64TargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS,
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h Mon Dec 19 20:50:00 2011
@@ -77,6 +77,7 @@
/// PPC32TargetMachine - PowerPC 32-bit target machine.
///
class PPC32TargetMachine : public PPCTargetMachine {
+ virtual void anchor();
public:
PPC32TargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS, const TargetOptions &Options,
@@ -87,6 +88,7 @@
/// PPC64TargetMachine - PowerPC 64-bit target machine.
///
class PPC64TargetMachine : public PPCTargetMachine {
+ virtual void anchor();
public:
PPC64TargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS, const TargetOptions &Options,
Modified: llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp Mon Dec 19 20:50:00 2011
@@ -16,6 +16,8 @@
using namespace llvm;
+void SparcELFMCAsmInfo::anchor() { }
+
SparcELFMCAsmInfo::SparcELFMCAsmInfo(const Target &T, StringRef TT) {
IsLittleEndian = false;
Triple TheTriple(TT);
Modified: llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h (original)
+++ llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h Mon Dec 19 20:50:00 2011
@@ -20,7 +20,9 @@
namespace llvm {
class Target;
- struct SparcELFMCAsmInfo : public MCAsmInfo {
+ class SparcELFMCAsmInfo : public MCAsmInfo {
+ virtual void anchor();
+ public:
explicit SparcELFMCAsmInfo(const Target &T, StringRef TT);
};
Added: llvm/trunk/lib/Target/Sparc/SparcMachineFunctionInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcMachineFunctionInfo.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcMachineFunctionInfo.cpp (added)
+++ llvm/trunk/lib/Target/Sparc/SparcMachineFunctionInfo.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,14 @@
+//==- SparcMachineFunctionInfo.cpp - Sparc Machine Function Info -*- C++ -*-==//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "SparcMachineFunctionInfo.h"
+
+using namespace llvm;
+
+void SparcMachineFunctionInfo::anchor() { }
Modified: llvm/trunk/lib/Target/Sparc/SparcMachineFunctionInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcMachineFunctionInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcMachineFunctionInfo.h (original)
+++ llvm/trunk/lib/Target/Sparc/SparcMachineFunctionInfo.h Mon Dec 19 20:50:00 2011
@@ -18,6 +18,7 @@
namespace llvm {
class SparcMachineFunctionInfo : public MachineFunctionInfo {
+ virtual void anchor();
private:
unsigned GlobalBaseReg;
Modified: llvm/trunk/lib/Target/Sparc/SparcSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcSubtarget.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/SparcSubtarget.cpp Mon Dec 19 20:50:00 2011
@@ -21,6 +21,8 @@
using namespace llvm;
+void SparcSubtarget::anchor() { }
+
SparcSubtarget::SparcSubtarget(const std::string &TT, const std::string &CPU,
const std::string &FS, bool is64Bit) :
SparcGenSubtargetInfo(TT, CPU, FS),
Modified: llvm/trunk/lib/Target/Sparc/SparcSubtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcSubtarget.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcSubtarget.h (original)
+++ llvm/trunk/lib/Target/Sparc/SparcSubtarget.h Mon Dec 19 20:50:00 2011
@@ -24,6 +24,7 @@
class StringRef;
class SparcSubtarget : public SparcGenSubtargetInfo {
+ virtual void anchor();
bool IsV9;
bool V8DeprecatedInsts;
bool IsVIS;
Modified: llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp Mon Dec 19 20:50:00 2011
@@ -51,6 +51,8 @@
return true;
}
+void SparcV8TargetMachine::anchor() { }
+
SparcV8TargetMachine::SparcV8TargetMachine(const Target &T,
StringRef TT, StringRef CPU,
StringRef FS,
@@ -61,6 +63,8 @@
: SparcTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, false) {
}
+void SparcV9TargetMachine::anchor() { }
+
SparcV9TargetMachine::SparcV9TargetMachine(const Target &T,
StringRef TT, StringRef CPU,
StringRef FS,
Modified: llvm/trunk/lib/Target/Sparc/SparcTargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcTargetMachine.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcTargetMachine.h (original)
+++ llvm/trunk/lib/Target/Sparc/SparcTargetMachine.h Mon Dec 19 20:50:00 2011
@@ -62,6 +62,7 @@
/// SparcV8TargetMachine - Sparc 32-bit target machine
///
class SparcV8TargetMachine : public SparcTargetMachine {
+ virtual void anchor();
public:
SparcV8TargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS,
@@ -73,6 +74,7 @@
/// SparcV9TargetMachine - Sparc 64-bit target machine
///
class SparcV9TargetMachine : public SparcTargetMachine {
+ virtual void anchor();
public:
SparcV9TargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS,
Added: llvm/trunk/lib/Target/TargetJITInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetJITInfo.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/Target/TargetJITInfo.cpp (added)
+++ llvm/trunk/lib/Target/TargetJITInfo.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,14 @@
+//===- Target/TargetJITInfo.h - Target Information for JIT ------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/Target/TargetJITInfo.h"
+
+using namespace llvm;
+
+void TargetJITInfo::anchor() { }
Modified: llvm/trunk/lib/Target/TargetLibraryInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetLibraryInfo.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetLibraryInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetLibraryInfo.cpp Mon Dec 19 20:50:00 2011
@@ -20,6 +20,8 @@
"Target Library Information", false, true)
char TargetLibraryInfo::ID = 0;
+void TargetLibraryInfo::anchor() { }
+
const char* TargetLibraryInfo::StandardNames[LibFunc::NumLibFuncs] =
{
"acos",
Modified: llvm/trunk/lib/Target/TargetRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetRegisterInfo.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetRegisterInfo.cpp Mon Dec 19 20:50:00 2011
@@ -18,6 +18,8 @@
using namespace llvm;
+void TargetRegisterClass::anchor() { }
+
TargetRegisterInfo::TargetRegisterInfo(const TargetRegisterInfoDesc *ID,
regclass_iterator RCB, regclass_iterator RCE,
const char *const *subregindexnames)
Modified: llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp (original)
+++ llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp Mon Dec 19 20:50:00 2011
@@ -79,6 +79,12 @@
return instInfoX86;
}
+void X86_16Disassembler::anchor() { }
+
+void X86_32Disassembler::anchor() { }
+
+void X86_64Disassembler::anchor() { }
+
/// regionReader - a callback function that wraps the readByte method from
/// MemoryObject.
///
Modified: llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.h (original)
+++ llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.h Mon Dec 19 20:50:00 2011
@@ -128,6 +128,7 @@
/// X86_16Disassembler - 16-bit X86 disassembler.
class X86_16Disassembler : public X86GenericDisassembler {
+ virtual void anchor();
public:
X86_16Disassembler(const MCSubtargetInfo &STI) :
X86GenericDisassembler(STI, MODE_16BIT) {
@@ -136,6 +137,7 @@
/// X86_16Disassembler - 32-bit X86 disassembler.
class X86_32Disassembler : public X86GenericDisassembler {
+ virtual void anchor();
public:
X86_32Disassembler(const MCSubtargetInfo &STI) :
X86GenericDisassembler(STI, MODE_32BIT) {
@@ -144,6 +146,7 @@
/// X86_16Disassembler - 64-bit X86 disassembler.
class X86_64Disassembler : public X86GenericDisassembler {
+ virtual void anchor();
public:
X86_64Disassembler(const MCSubtargetInfo &STI) :
X86GenericDisassembler(STI, MODE_64BIT) {
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp Mon Dec 19 20:50:00 2011
@@ -48,6 +48,8 @@
"{cc}", "cc",
0,0};
+void X86MCAsmInfoDarwin::anchor() { }
+
X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(const Triple &T) {
bool is64Bit = T.getArch() == Triple::x86_64;
if (is64Bit)
@@ -80,6 +82,8 @@
: X86MCAsmInfoDarwin(Triple) {
}
+void X86ELFMCAsmInfo::anchor() { }
+
X86ELFMCAsmInfo::X86ELFMCAsmInfo(const Triple &T) {
if (T.getArch() == Triple::x86_64)
PointerSize = 8;
@@ -125,6 +129,8 @@
0, SectionKind::getMetadata());
}
+void X86MCAsmInfoMicrosoft::anchor() { }
+
X86MCAsmInfoMicrosoft::X86MCAsmInfoMicrosoft(const Triple &Triple) {
if (Triple.getArch() == Triple::x86_64) {
GlobalPrefix = "";
@@ -137,6 +143,8 @@
TextAlignFillValue = 0x90;
}
+void X86MCAsmInfoGNUCOFF::anchor() { }
+
X86MCAsmInfoGNUCOFF::X86MCAsmInfoGNUCOFF(const Triple &Triple) {
if (Triple.getArch() == Triple::x86_64) {
GlobalPrefix = "";
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h Mon Dec 19 20:50:00 2011
@@ -21,7 +21,9 @@
namespace llvm {
class Triple;
- struct X86MCAsmInfoDarwin : public MCAsmInfoDarwin {
+ class X86MCAsmInfoDarwin : public MCAsmInfoDarwin {
+ virtual void anchor();
+ public:
explicit X86MCAsmInfoDarwin(const Triple &Triple);
};
@@ -33,16 +35,22 @@
MCStreamer &Streamer) const;
};
- struct X86ELFMCAsmInfo : public MCAsmInfo {
+ class X86ELFMCAsmInfo : public MCAsmInfo {
+ virtual void anchor();
+ public:
explicit X86ELFMCAsmInfo(const Triple &Triple);
virtual const MCSection *getNonexecutableStackSection(MCContext &Ctx) const;
};
- struct X86MCAsmInfoMicrosoft : public MCAsmInfoMicrosoft {
+ class X86MCAsmInfoMicrosoft : public MCAsmInfoMicrosoft {
+ virtual void anchor();
+ public:
explicit X86MCAsmInfoMicrosoft(const Triple &Triple);
};
- struct X86MCAsmInfoGNUCOFF : public MCAsmInfoGNUCOFF {
+ class X86MCAsmInfoGNUCOFF : public MCAsmInfoGNUCOFF {
+ virtual void anchor();
+ public:
explicit X86MCAsmInfoGNUCOFF(const Triple &Triple);
};
} // namespace llvm
Added: llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.cpp (added)
+++ llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,14 @@
+//====- X86MachineFuctionInfo.cpp - X86 machine function info ---*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "X86MachineFunctionInfo.h"
+
+using namespace llvm;
+
+void X86MachineFunctionInfo::anchor() { }
Modified: llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.h (original)
+++ llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.h Mon Dec 19 20:50:00 2011
@@ -21,6 +21,8 @@
/// X86MachineFunctionInfo - This class is derived from MachineFunction and
/// contains private X86 target-specific information for each MachineFunction.
class X86MachineFunctionInfo : public MachineFunctionInfo {
+ virtual void anchor();
+
/// ForceFramePointer - True if the function is required to use of frame
/// pointer for reasons other than it containing dynamic allocation or
/// that FP eliminatation is turned off. For example, Cygwin main function
Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Mon Dec 19 20:50:00 2011
@@ -28,6 +28,7 @@
RegisterTargetMachine Y(TheX86_64Target);
}
+void X86_32TargetMachine::anchor() { }
X86_32TargetMachine::X86_32TargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS,
@@ -50,6 +51,7 @@
JITInfo(*this) {
}
+void X86_64TargetMachine::anchor() { }
X86_64TargetMachine::X86_64TargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS,
Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetMachine.h (original)
+++ llvm/trunk/lib/Target/X86/X86TargetMachine.h Mon Dec 19 20:50:00 2011
@@ -78,6 +78,7 @@
/// X86_32TargetMachine - X86 32-bit target machine.
///
class X86_32TargetMachine : public X86TargetMachine {
+ virtual void anchor();
const TargetData DataLayout; // Calculates type size & alignment
X86InstrInfo InstrInfo;
X86SelectionDAGInfo TSInfo;
@@ -106,6 +107,7 @@
/// X86_64TargetMachine - X86 64-bit target machine.
///
class X86_64TargetMachine : public X86TargetMachine {
+ virtual void anchor();
const TargetData DataLayout; // Calculates type size & alignment
X86InstrInfo InstrInfo;
X86SelectionDAGInfo TSInfo;
Modified: llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp Mon Dec 19 20:50:00 2011
@@ -10,6 +10,8 @@
#include "XCoreMCAsmInfo.h"
using namespace llvm;
+void XCoreMCAsmInfo::anchor() { }
+
XCoreMCAsmInfo::XCoreMCAsmInfo(const Target &T, StringRef TT) {
SupportsDebugInformation = true;
Data16bitsDirective = "\t.short\t";
Modified: llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.h (original)
+++ llvm/trunk/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.h Mon Dec 19 20:50:00 2011
@@ -21,6 +21,7 @@
class Target;
class XCoreMCAsmInfo : public MCAsmInfo {
+ virtual void anchor();
public:
explicit XCoreMCAsmInfo(const Target &T, StringRef TT);
};
Added: llvm/trunk/lib/Target/XCore/XCoreMachineFunctionInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreMachineFunctionInfo.cpp?rev=146960&view=auto
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreMachineFunctionInfo.cpp (added)
+++ llvm/trunk/lib/Target/XCore/XCoreMachineFunctionInfo.cpp Mon Dec 19 20:50:00 2011
@@ -0,0 +1,14 @@
+//===- XCoreMachineFuctionInfo.cpp - XCore machine function info -*- C++ -*-==//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "XCoreMachineFunctionInfo.h"
+
+using namespace llvm;
+
+void XCoreFunctionInfo::anchor() { }
Modified: llvm/trunk/lib/Target/XCore/XCoreMachineFunctionInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreMachineFunctionInfo.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreMachineFunctionInfo.h (original)
+++ llvm/trunk/lib/Target/XCore/XCoreMachineFunctionInfo.h Mon Dec 19 20:50:00 2011
@@ -26,7 +26,7 @@
/// XCoreFunctionInfo - This class is derived from MachineFunction private
/// XCore target-specific information for each MachineFunction.
class XCoreFunctionInfo : public MachineFunctionInfo {
-private:
+ virtual void anchor();
bool UsesLR;
int LRSpillSlot;
int FPSpillSlot;
Modified: llvm/trunk/lib/Target/XCore/XCoreSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreSubtarget.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/XCore/XCoreSubtarget.cpp Mon Dec 19 20:50:00 2011
@@ -21,6 +21,8 @@
using namespace llvm;
+void XCoreSubtarget::anchor() { }
+
XCoreSubtarget::XCoreSubtarget(const std::string &TT,
const std::string &CPU, const std::string &FS)
: XCoreGenSubtargetInfo(TT, CPU, FS)
Modified: llvm/trunk/lib/Target/XCore/XCoreSubtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreSubtarget.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreSubtarget.h (original)
+++ llvm/trunk/lib/Target/XCore/XCoreSubtarget.h Mon Dec 19 20:50:00 2011
@@ -25,6 +25,7 @@
class StringRef;
class XCoreSubtarget : public XCoreGenSubtargetInfo {
+ virtual void anchor();
public:
/// This constructor initializes the data members to match that
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyIndVar.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyIndVar.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyIndVar.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyIndVar.cpp Mon Dec 19 20:50:00 2011
@@ -375,6 +375,8 @@
namespace llvm {
+void IVVisitor::anchor() { }
+
/// simplifyUsersOfIV - Simplify instructions that use this induction variable
/// by using ScalarEvolution to analyze the IV's recurrence.
bool simplifyUsersOfIV(PHINode *CurrIV, ScalarEvolution *SE, LPPassManager *LPM,
Modified: llvm/trunk/lib/VMCore/Constants.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Constants.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Constants.cpp (original)
+++ llvm/trunk/lib/VMCore/Constants.cpp Mon Dec 19 20:50:00 2011
@@ -40,6 +40,8 @@
// Constant Class
//===----------------------------------------------------------------------===//
+void Constant::anchor() { }
+
bool Constant::isNegativeZeroValue() const {
// Floating point values have an explicit -0.0 value.
if (const ConstantFP *CFP = dyn_cast(this))
@@ -363,6 +365,8 @@
// ConstantInt
//===----------------------------------------------------------------------===//
+void ConstantInt::anchor() { }
+
ConstantInt::ConstantInt(IntegerType *Ty, const APInt& V)
: Constant(Ty, ConstantIntVal, 0, 0), Val(V) {
assert(V.getBitWidth() == Ty->getBitWidth() && "Invalid constant for type");
@@ -486,6 +490,8 @@
return &APFloat::PPCDoubleDouble;
}
+void ConstantFP::anchor() { }
+
/// get() - This returns a constant fp for the specified value in the
/// specified type. This should only be used for simple constant values like
/// 2.0/1.0 etc, that are known-valid both as double and as the target format.
Modified: llvm/trunk/lib/VMCore/ConstantsContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantsContext.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/ConstantsContext.h (original)
+++ llvm/trunk/lib/VMCore/ConstantsContext.h Mon Dec 19 20:50:00 2011
@@ -30,6 +30,7 @@
/// UnaryConstantExpr - This class is private to Constants.cpp, and is used
/// behind the scenes to implement unary constant exprs.
class UnaryConstantExpr : public ConstantExpr {
+ virtual void anchor();
void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
public:
// allocate space for exactly one operand
@@ -46,6 +47,7 @@
/// BinaryConstantExpr - This class is private to Constants.cpp, and is used
/// behind the scenes to implement binary constant exprs.
class BinaryConstantExpr : public ConstantExpr {
+ virtual void anchor();
void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
public:
// allocate space for exactly two operands
@@ -66,6 +68,7 @@
/// SelectConstantExpr - This class is private to Constants.cpp, and is used
/// behind the scenes to implement select constant exprs.
class SelectConstantExpr : public ConstantExpr {
+ virtual void anchor();
void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
public:
// allocate space for exactly three operands
@@ -86,6 +89,7 @@
/// Constants.cpp, and is used behind the scenes to implement
/// extractelement constant exprs.
class ExtractElementConstantExpr : public ConstantExpr {
+ virtual void anchor();
void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
public:
// allocate space for exactly two operands
@@ -106,6 +110,7 @@
/// Constants.cpp, and is used behind the scenes to implement
/// insertelement constant exprs.
class InsertElementConstantExpr : public ConstantExpr {
+ virtual void anchor();
void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
public:
// allocate space for exactly three operands
@@ -127,6 +132,7 @@
/// Constants.cpp, and is used behind the scenes to implement
/// shufflevector constant exprs.
class ShuffleVectorConstantExpr : public ConstantExpr {
+ virtual void anchor();
void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
public:
// allocate space for exactly three operands
@@ -151,6 +157,7 @@
/// Constants.cpp, and is used behind the scenes to implement
/// extractvalue constant exprs.
class ExtractValueConstantExpr : public ConstantExpr {
+ virtual void anchor();
void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
public:
// allocate space for exactly one operand
@@ -176,6 +183,7 @@
/// Constants.cpp, and is used behind the scenes to implement
/// insertvalue constant exprs.
class InsertValueConstantExpr : public ConstantExpr {
+ virtual void anchor();
void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
public:
// allocate space for exactly one operand
@@ -202,6 +210,7 @@
/// GetElementPtrConstantExpr - This class is private to Constants.cpp, and is
/// used behind the scenes to implement getelementpr constant exprs.
class GetElementPtrConstantExpr : public ConstantExpr {
+ virtual void anchor();
GetElementPtrConstantExpr(Constant *C, const std::vector &IdxList,
Type *DestTy);
public:
@@ -221,8 +230,10 @@
// CompareConstantExpr - This class is private to Constants.cpp, and is used
// behind the scenes to implement ICmp and FCmp constant expressions. This is
// needed in order to store the predicate value for these instructions.
-struct CompareConstantExpr : public ConstantExpr {
+class CompareConstantExpr : public ConstantExpr {
+ virtual void anchor();
void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
+public:
// allocate space for exactly two operands
void *operator new(size_t s) {
return User::operator new(s, 2);
Modified: llvm/trunk/lib/VMCore/Function.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Function.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Function.cpp (original)
+++ llvm/trunk/lib/VMCore/Function.cpp Mon Dec 19 20:50:00 2011
@@ -39,6 +39,8 @@
// Argument Implementation
//===----------------------------------------------------------------------===//
+void Argument::anchor() { }
+
Argument::Argument(Type *Ty, const Twine &Name, Function *Par)
: Value(Ty, Value::ArgumentVal) {
Parent = 0;
Modified: llvm/trunk/lib/VMCore/LLVMContextImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContextImpl.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/LLVMContextImpl.cpp (original)
+++ llvm/trunk/lib/VMCore/LLVMContextImpl.cpp Mon Dec 19 20:50:00 2011
@@ -93,3 +93,24 @@
// Destroy MDStrings.
DeleteContainerSeconds(MDStringCache);
}
+
+// ConstantsContext anchors
+void UnaryConstantExpr::anchor() { }
+
+void BinaryConstantExpr::anchor() { }
+
+void SelectConstantExpr::anchor() { }
+
+void ExtractElementConstantExpr::anchor() { }
+
+void InsertElementConstantExpr::anchor() { }
+
+void ShuffleVectorConstantExpr::anchor() { }
+
+void ExtractValueConstantExpr::anchor() { }
+
+void InsertValueConstantExpr::anchor() { }
+
+void GetElementPtrConstantExpr::anchor() { }
+
+void CompareConstantExpr::anchor() { }
Modified: llvm/trunk/lib/VMCore/Metadata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Metadata.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Metadata.cpp (original)
+++ llvm/trunk/lib/VMCore/Metadata.cpp Mon Dec 19 20:50:00 2011
@@ -29,6 +29,8 @@
// MDString implementation.
//
+void MDString::anchor() { }
+
MDString::MDString(LLVMContext &C, StringRef S)
: Value(Type::getMetadataTy(C), Value::MDStringVal), Str(S) {}
Modified: llvm/trunk/lib/VMCore/PassManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassManager.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/PassManager.cpp (original)
+++ llvm/trunk/lib/VMCore/PassManager.cpp Mon Dec 19 20:50:00 2011
@@ -223,6 +223,7 @@
class FunctionPassManagerImpl : public Pass,
public PMDataManager,
public PMTopLevelManager {
+ virtual void anchor();
private:
bool wasRun;
public:
@@ -291,6 +292,8 @@
}
};
+void FunctionPassManagerImpl::anchor() {}
+
char FunctionPassManagerImpl::ID = 0;
//===----------------------------------------------------------------------===//
@@ -384,6 +387,7 @@
class PassManagerImpl : public Pass,
public PMDataManager,
public PMTopLevelManager {
+ virtual void anchor();
public:
static char ID;
@@ -437,6 +441,8 @@
}
};
+void PassManagerImpl::anchor() {}
+
char PassManagerImpl::ID = 0;
} // End of llvm namespace
Modified: llvm/trunk/tools/bugpoint/CrashDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/CrashDebugger.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/CrashDebugger.cpp (original)
+++ llvm/trunk/tools/bugpoint/CrashDebugger.cpp Mon Dec 19 20:50:00 2011
@@ -169,7 +169,7 @@
return false;
}
-namespace llvm {
+namespace {
/// ReduceCrashingFunctions reducer - This works by removing functions and
/// seeing if the program still crashes. If it does, then keep the newer,
/// smaller program.
Modified: llvm/trunk/tools/bugpoint/ToolRunner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ToolRunner.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/ToolRunner.cpp (original)
+++ llvm/trunk/tools/bugpoint/ToolRunner.cpp Mon Dec 19 20:50:00 2011
@@ -234,6 +234,8 @@
Timeout, MemoryLimit, Error);
}
+void AbstractInterpreter::anchor() { }
+
// LLI create method - Try to find the LLI executable
AbstractInterpreter *AbstractInterpreter::createLLI(const char *Argv0,
std::string &Message,
Modified: llvm/trunk/tools/bugpoint/ToolRunner.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ToolRunner.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/ToolRunner.h (original)
+++ llvm/trunk/tools/bugpoint/ToolRunner.h Mon Dec 19 20:50:00 2011
@@ -86,6 +86,7 @@
/// complexity behind a simple interface.
///
class AbstractInterpreter {
+ virtual void anchor();
public:
static CBE *createCBE(const char *Argv0, std::string &Message,
const std::string &GCCBinary,
Modified: llvm/trunk/tools/llvm-diff/DiffConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-diff/DiffConsumer.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-diff/DiffConsumer.cpp (original)
+++ llvm/trunk/tools/llvm-diff/DiffConsumer.cpp Mon Dec 19 20:50:00 2011
@@ -44,6 +44,8 @@
}
+void Consumer::anchor() { }
+
void DiffConsumer::printValue(Value *V, bool isL) {
if (V->hasName()) {
out << (isa(V) ? '@' : '%') << V->getName();
Modified: llvm/trunk/tools/llvm-diff/DiffConsumer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-diff/DiffConsumer.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-diff/DiffConsumer.h (original)
+++ llvm/trunk/tools/llvm-diff/DiffConsumer.h Mon Dec 19 20:50:00 2011
@@ -29,6 +29,7 @@
/// The interface for consumers of difference data.
class Consumer {
+ virtual void anchor();
public:
/// Record that a local context has been entered. Left and
/// Right are IR "containers" of some sort which are being
Modified: llvm/trunk/tools/llvm-diff/DifferenceEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-diff/DifferenceEngine.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-diff/DifferenceEngine.cpp (original)
+++ llvm/trunk/tools/llvm-diff/DifferenceEngine.cpp Mon Dec 19 20:50:00 2011
@@ -628,6 +628,8 @@
}
+void DifferenceEngine::Oracle::anchor() { }
+
void DifferenceEngine::diff(Function *L, Function *R) {
Context C(*this, L, R);
Modified: llvm/trunk/tools/llvm-diff/DifferenceEngine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-diff/DifferenceEngine.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-diff/DifferenceEngine.h (original)
+++ llvm/trunk/tools/llvm-diff/DifferenceEngine.h Mon Dec 19 20:50:00 2011
@@ -50,7 +50,9 @@
/// An oracle for answering whether two values are equivalent as
/// operands.
- struct Oracle {
+ class Oracle {
+ virtual void anchor();
+ public:
virtual bool operator()(Value *L, Value *R) = 0;
protected:
Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Mon Dec 19 20:50:00 2011
@@ -126,6 +126,8 @@
return 0;
}
+void llvm::StringRefMemoryObject::anchor() { }
+
void llvm::DumpBytes(StringRef bytes) {
static const char hex_rep[] = "0123456789abcdef";
// FIXME: The real way to do this is to figure out the longest instruction
Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.h (original)
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.h Mon Dec 19 20:50:00 2011
@@ -25,7 +25,7 @@
void DisassembleInputMachO(StringRef Filename);
class StringRefMemoryObject : public MemoryObject {
-private:
+ virtual void anchor();
StringRef Bytes;
public:
StringRefMemoryObject(StringRef bytes) : Bytes(bytes) {}
Modified: llvm/trunk/unittests/Support/IRBuilderTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/IRBuilderTest.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/IRBuilderTest.cpp (original)
+++ llvm/trunk/unittests/Support/IRBuilderTest.cpp Mon Dec 19 20:50:00 2011
@@ -19,6 +19,7 @@
using namespace llvm;
+namespace {
class IRBuilderTest : public testing::Test {
protected:
virtual void SetUp() {
@@ -37,6 +38,7 @@
OwningPtr M;
BasicBlock *BB;
};
+}
TEST_F(IRBuilderTest, Lifetime) {
IRBuilder<> Builder(BB);
Modified: llvm/trunk/unittests/Transforms/Utils/Cloning.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Transforms/Utils/Cloning.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/unittests/Transforms/Utils/Cloning.cpp (original)
+++ llvm/trunk/unittests/Transforms/Utils/Cloning.cpp Mon Dec 19 20:50:00 2011
@@ -17,6 +17,7 @@
using namespace llvm;
+namespace {
class CloneInstruction : public ::testing::Test {
protected:
virtual void SetUp() {
@@ -47,6 +48,7 @@
LLVMContext context;
Value *V;
};
+}
TEST_F(CloneInstruction, OverflowBits) {
V = new Argument(Type::getInt32Ty(context));
Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelMatcher.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelMatcher.cpp Mon Dec 19 20:50:00 2011
@@ -15,6 +15,8 @@
#include "llvm/ADT/StringExtras.h"
using namespace llvm;
+void Matcher::anchor() { }
+
void Matcher::dump() const {
print(errs(), 0);
}
@@ -324,6 +326,10 @@
}
+void EmitNodeMatcher::anchor() { }
+
+void MorphNodeToMatcher::anchor() { }
+
unsigned MarkGlueResultsMatcher::getHashImpl() const {
return HashUnsigneds(GlueResultNodes.begin(), GlueResultNodes.end());
}
Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original)
+++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Mon Dec 19 20:50:00 2011
@@ -41,6 +41,7 @@
// The next matcher node that is executed after this one. Null if this is the
// last stage of a match.
OwningPtr Next;
+ virtual void anchor();
public:
enum KindTy {
// Matcher state manipulation.
@@ -1011,6 +1012,7 @@
/// EmitNodeMatcher - This signals a successful match and generates a node.
class EmitNodeMatcher : public EmitNodeMatcherCommon {
+ virtual void anchor();
unsigned FirstResultSlot;
public:
EmitNodeMatcher(const std::string &opcodeName,
@@ -1033,6 +1035,7 @@
};
class MorphNodeToMatcher : public EmitNodeMatcherCommon {
+ virtual void anchor();
const PatternToMatch &Pattern;
public:
MorphNodeToMatcher(const std::string &opcodeName,
Modified: llvm/trunk/utils/TableGen/SetTheory.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/SetTheory.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/SetTheory.cpp (original)
+++ llvm/trunk/utils/TableGen/SetTheory.cpp Mon Dec 19 20:50:00 2011
@@ -198,6 +198,10 @@
};
} // end anonymous namespace
+void SetTheory::Operator::anchor() { }
+
+void SetTheory::Expander::anchor() { }
+
SetTheory::SetTheory() {
addOperator("add", new AddOp);
addOperator("sub", new SubOp);
Modified: llvm/trunk/utils/TableGen/SetTheory.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/SetTheory.h?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/SetTheory.h (original)
+++ llvm/trunk/utils/TableGen/SetTheory.h Mon Dec 19 20:50:00 2011
@@ -65,7 +65,9 @@
typedef SmallSetVector RecSet;
/// Operator - A callback representing a DAG operator.
- struct Operator {
+ class Operator {
+ virtual void anchor();
+ public:
virtual ~Operator() {}
/// apply - Apply this operator to Expr's arguments and insert the result
@@ -76,7 +78,9 @@
/// Expander - A callback function that can transform a Record representing a
/// set into a fully expanded list of elements. Expanders provide a way for
/// users to define named sets that can be used in DAG expressions.
- struct Expander {
+ class Expander {
+ virtual void anchor();
+ public:
virtual ~Expander() {}
virtual void expand(SetTheory&, Record*, RecSet &Elts) =0;
Modified: llvm/trunk/utils/TableGen/TGValueTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/TGValueTypes.cpp?rev=146960&r1=146959&r2=146960&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/TGValueTypes.cpp (original)
+++ llvm/trunk/utils/TableGen/TGValueTypes.cpp Mon Dec 19 20:50:00 2011
@@ -18,6 +18,9 @@
#include