From sabre at nondot.org Mon Oct 27 01:05:26 2008
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 27 Oct 2008 06:05:26 -0000
Subject: [llvm-commits] [llvm] r58227 -
/llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
Message-ID: <200810270605.m9R65QD2022212@zion.cs.uiuc.edu>
Author: lattner
Date: Mon Oct 27 01:05:26 2008
New Revision: 58227
URL: http://llvm.org/viewvc/llvm-project?rev=58227&view=rev
Log:
Add a new LargeBlockInfo helper, which is just a wrapper around
a trivial dense map. Use this in RewriteSingleStoreAlloca to
avoid aggressively rescanning blocks over and over again. This
fixes PR2925, speeding up mem2reg on the testcase in that bug
from 4.56s to 0.02s in a debug build on my machine.
Modified:
llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
Modified: llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp?rev=58227&r1=58226&r2=58227&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Mon Oct 27 01:05:26 2008
@@ -106,6 +106,58 @@
Values.swap(RHS.Values);
}
};
+
+ /// LargeBlockInfo - This assigns and keeps a per-bb relative ordering of
+ /// load/store instructions in the block that directly load or store an alloca.
+ ///
+ /// This functionality is important because it avoids scanning large basic
+ /// blocks multiple times when promoting many allocas in the same block.
+ class VISIBILITY_HIDDEN LargeBlockInfo {
+ /// InstNumbers - For each instruction that we track, keep the index of the
+ /// instruction. The index starts out as the number of the instruction from
+ /// the start of the block.
+ DenseMap InstNumbers;
+ public:
+
+ /// isInterestingInstruction - This code only looks at accesses to allocas.
+ static bool isInterestingInstruction(const Instruction *I) {
+ return (isa(I) && isa(I->getOperand(0))) ||
+ (isa(I) && isa(I->getOperand(1)));
+ }
+
+ /// getInstructionIndex - Get or calculate the index of the specified
+ /// instruction.
+ unsigned getInstructionIndex(const Instruction *I) {
+ assert(isInterestingInstruction(I) &&
+ "Not a load/store to/from an alloca?");
+
+ // If we already have this instruction number, return it.
+ DenseMap::iterator It = InstNumbers.find(I);
+ if (It != InstNumbers.end()) return It->second;
+
+ // Scan the whole block to get the instruction. This accumulates
+ // information for every interesting instruction in the block, in order to
+ // avoid gratuitus rescans.
+ const BasicBlock *BB = I->getParent();
+ unsigned InstNo = 0;
+ for (BasicBlock::const_iterator BBI = BB->begin(), E = BB->end();
+ BBI != E; ++BBI)
+ if (isInterestingInstruction(BBI))
+ InstNumbers[BBI] = InstNo++;
+ It = InstNumbers.find(I);
+
+ assert(It != InstNumbers.end() && "Didn't insert instruction?");
+ return It->second;
+ }
+
+ void deleteValue(const Instruction *I) {
+ InstNumbers.erase(I);
+ }
+
+ void clear() {
+ InstNumbers.clear();
+ }
+ };
struct VISIBILITY_HIDDEN PromoteMem2Reg {
/// Allocas - The alloca instructions being promoted.
@@ -189,11 +241,14 @@
const SmallPtrSet &DefBlocks,
SmallPtrSet &LiveInBlocks);
- void RewriteSingleStoreAlloca(AllocaInst *AI, AllocaInfo &Info);
+ void RewriteSingleStoreAlloca(AllocaInst *AI, AllocaInfo &Info,
+ LargeBlockInfo &LBI);
- bool PromoteLocallyUsedAlloca(BasicBlock *BB, AllocaInst *AI);
+ bool PromoteLocallyUsedAlloca(BasicBlock *BB, AllocaInst *AI,
+ LargeBlockInfo &LBI);
void PromoteLocallyUsedAllocas(BasicBlock *BB,
- const std::vector &AIs);
+ const std::vector &AIs,
+ LargeBlockInfo &LBI);
void RenamePass(BasicBlock *BB, BasicBlock *Pred,
RenamePassData::ValVector &IncVals,
@@ -254,7 +309,6 @@
}
}
};
-
} // end of anonymous namespace
@@ -271,6 +325,7 @@
if (AST) PointerAllocaValues.resize(Allocas.size());
AllocaInfo Info;
+ LargeBlockInfo LBI;
for (unsigned AllocaNum = 0; AllocaNum != Allocas.size(); ++AllocaNum) {
AllocaInst *AI = Allocas[AllocaNum];
@@ -298,14 +353,17 @@
// If there is only a single store to this value, replace any loads of
// it that are directly dominated by the definition with the value stored.
if (Info.DefiningBlocks.size() == 1) {
- RewriteSingleStoreAlloca(AI, Info);
+ RewriteSingleStoreAlloca(AI, Info, LBI);
// Finally, after the scan, check to see if the store is all that is left.
if (Info.UsingBlocks.empty()) {
// Remove the (now dead) store and alloca.
Info.OnlyStore->eraseFromParent();
+ LBI.deleteValue(Info.OnlyStore);
+
if (AST) AST->deleteValue(AI);
AI->eraseFromParent();
+ LBI.deleteValue(AI);
// The alloca has been processed, move on.
RemoveFromAllocasList(AllocaNum);
@@ -342,7 +400,7 @@
AllocaLookup[Allocas[AllocaNum]] = AllocaNum;
// At this point, we're committed to promoting the alloca using IDF's, and
- // the standard SSA construction algorithm. Determine which blocks need phi
+ // the standard SSA construction algorithm. Determine which blocks need PHI
// nodes and see if we can optimize out some work by avoiding insertion of
// dead phi nodes.
DetermineInsertionPoint(AI, AllocaNum, Info);
@@ -358,19 +416,22 @@
// efficiently.
if (LocAllocas.size() == 1) {
// If we can do the quick promotion pass, do so now.
- if (PromoteLocallyUsedAlloca(I->first, LocAllocas[0]))
+ if (PromoteLocallyUsedAlloca(I->first, LocAllocas[0], LBI))
RetryList.push_back(LocAllocas[0]); // Failed, retry later.
} else {
// Locally promote anything possible. Note that if this is unable to
// promote a particular alloca, it puts the alloca onto the Allocas vector
// for global processing.
- PromoteLocallyUsedAllocas(I->first, LocAllocas);
+ PromoteLocallyUsedAllocas(I->first, LocAllocas, LBI);
}
}
if (Allocas.empty())
return; // All of the allocas must have been trivial!
+ LBI.clear();
+
+
// Set the incoming values for the basic block to be null values for all of
// the alloca's. We do this in case there is a load of a value that has not
// been stored yet. In this case, it will get this null value.
@@ -630,67 +691,63 @@
DFBlocks.clear();
}
}
-
/// RewriteSingleStoreAlloca - If there is only a single store to this value,
/// replace any loads of it that are directly dominated by the definition with
/// the value stored.
void PromoteMem2Reg::RewriteSingleStoreAlloca(AllocaInst *AI,
- AllocaInfo &Info) {
+ AllocaInfo &Info,
+ LargeBlockInfo &LBI) {
StoreInst *OnlyStore = Info.OnlyStore;
bool StoringGlobalVal = !isa(OnlyStore->getOperand(0));
+ BasicBlock *StoreBB = OnlyStore->getParent();
+ int StoreIndex = -1;
+
+ // Clear out UsingBlocks. We will reconstruct it here if needed.
+ Info.UsingBlocks.clear();
- // Be aware of loads before the store.
- SmallPtrSet ProcessedBlocks;
- for (unsigned i = 0, e = Info.UsingBlocks.size(); i != e; ++i) {
- BasicBlock *UseBlock = Info.UsingBlocks[i];
-
- // If we already processed this block, don't reprocess it.
- if (!ProcessedBlocks.insert(UseBlock)) {
- Info.UsingBlocks[i] = Info.UsingBlocks.back();
- Info.UsingBlocks.pop_back();
- --i; --e;
+ for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end(); UI != E; ) {
+ Instruction *UserInst = cast(*UI++);
+ if (!isa(UserInst)) {
+ assert(UserInst == OnlyStore && "Should only have load/stores");
continue;
}
+ LoadInst *LI = cast(UserInst);
- // If the store dominates the block and if we haven't processed it yet,
- // do so now. We can't handle the case where the store doesn't dominate a
- // block because there may be a path between the store and the use, but we
- // may need to insert phi nodes to handle dominance properly.
- if (!StoringGlobalVal && !dominates(OnlyStore->getParent(), UseBlock))
- continue;
-
- // If the use and store are in the same block, do a quick scan to
- // verify that there are no uses before the store.
- if (UseBlock == OnlyStore->getParent()) {
- BasicBlock::iterator I = UseBlock->begin();
- for (; &*I != OnlyStore; ++I) { // scan block for store.
- if (isa(I) && I->getOperand(0) == AI)
- break;
- }
- if (&*I != OnlyStore)
- continue; // Do not promote the uses of this in this block.
- }
-
- // Otherwise, if this is a different block or if all uses happen
- // after the store, do a simple linear scan to replace loads with
- // the stored value.
- for (BasicBlock::iterator I = UseBlock->begin(), E = UseBlock->end();
- I != E; ) {
- if (LoadInst *LI = dyn_cast(I++)) {
- if (LI->getOperand(0) == AI) {
- LI->replaceAllUsesWith(OnlyStore->getOperand(0));
- if (AST && isa(LI->getType()))
- AST->deleteValue(LI);
- LI->eraseFromParent();
+ // Okay, if we have a load from the alloca, we want to replace it with the
+ // only value stored to the alloca. We can do this if the value is
+ // dominated by the store. If not, we use the rest of the mem2reg machinery
+ // to insert the phi nodes as needed.
+ if (!StoringGlobalVal) { // Non-instructions are always dominated.
+ if (LI->getParent() == StoreBB) {
+ // If we have a use that is in the same block as the store, compare the
+ // indices of the two instructions to see which one came first. If the
+ // load came before the store, we can't handle it.
+ if (StoreIndex == -1)
+ StoreIndex = LBI.getInstructionIndex(OnlyStore);
+
+ if (unsigned(StoreIndex) > LBI.getInstructionIndex(LI)) {
+ // Can't handle this load, bail out.
+ Info.UsingBlocks.push_back(StoreBB);
+ continue;
}
+
+ } else if (LI->getParent() != StoreBB &&
+ !dominates(StoreBB, LI->getParent())) {
+ // If the load and store are in different blocks, use BB dominance to
+ // check their relationships. If the store doesn't dom the use, bail
+ // out.
+ Info.UsingBlocks.push_back(LI->getParent());
+ continue;
}
}
- // Finally, remove this block from the UsingBlock set.
- Info.UsingBlocks[i] = Info.UsingBlocks.back();
- Info.UsingBlocks.pop_back();
- --i; --e;
+ // Otherwise, we *can* safely rewrite this load.
+ LI->replaceAllUsesWith(OnlyStore->getOperand(0));
+ if (AST && isa(LI->getType()))
+ AST->deleteValue(LI);
+ LI->eraseFromParent();
+ LBI.deleteValue(LI);
}
}
@@ -709,7 +766,8 @@
///
/// ... so long as A is not used before undef is set.
///
-bool PromoteMem2Reg::PromoteLocallyUsedAlloca(BasicBlock *BB, AllocaInst *AI) {
+bool PromoteMem2Reg::PromoteLocallyUsedAlloca(BasicBlock *BB, AllocaInst *AI,
+ LargeBlockInfo &LBI) {
assert(!AI->use_empty() && "There are no uses of the alloca!");
// Handle degenerate cases quickly.
@@ -724,6 +782,7 @@
// Otherwise it must be a store which is never read.
assert(isa(U));
}
+ LBI.deleteValue(U);
BB->getInstList().erase(U);
} else {
// Uses of the uninitialized memory location shall get undef.
@@ -740,12 +799,14 @@
if (AST && isa(LI->getType()))
AST->deleteValue(LI);
BB->getInstList().erase(LI);
+ LBI.deleteValue(LI);
}
} else if (StoreInst *SI = dyn_cast(Inst)) {
if (SI->getOperand(1) == AI) {
// Store updates the "current value"...
CurVal = SI->getOperand(0);
BB->getInstList().erase(SI);
+ LBI.deleteValue(SI);
}
}
}
@@ -756,7 +817,8 @@
assert(AI->use_empty() && "Uses of alloca from more than one BB??");
if (AST) AST->deleteValue(AI);
AI->eraseFromParent();
-
+ LBI.deleteValue(AI);
+
++NumLocalPromoted;
return false;
}
@@ -767,7 +829,8 @@
/// basic blocks, as we don't want to rescan the entire basic block for each
/// alloca which is locally used in it (which might be a lot).
void PromoteMem2Reg::
-PromoteLocallyUsedAllocas(BasicBlock *BB, const std::vector &AIs) {
+PromoteLocallyUsedAllocas(BasicBlock *BB, const std::vector &AIs,
+ LargeBlockInfo &LBI) {
DenseMap CurValues;
for (unsigned i = 0, e = AIs.size(); i != e; ++i)
CurValues[AIs[i]] = 0; // Insert with null value
@@ -791,6 +854,7 @@
if (AST && isa(LI->getType()))
AST->deleteValue(LI);
BB->getInstList().erase(LI);
+ LBI.deleteValue(LI);
}
}
}
@@ -801,6 +865,7 @@
// Store updates the "current value"...
AIt->second = SI->getOperand(0);
SI->eraseFromParent();
+ LBI.deleteValue(SI);
}
}
}
@@ -813,6 +878,7 @@
assert(AI->use_empty() && "Uses of alloca from more than one BB??");
if (AST) AST->deleteValue(AI);
AI->eraseFromParent();
+ LBI.deleteValue(AI);
}
NumLocalPromoted += CurValues.size();
From evan.cheng at apple.com Mon Oct 27 01:10:33 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Sun, 26 Oct 2008 23:10:33 -0700
Subject: [llvm-commits] [llvm] r58225 -
/llvm/trunk/lib/CodeGen/BranchFolding.cpp
In-Reply-To: <19743F95-2168-4FD4-B261-1E4F8A42553C@apple.com>
References: <200810270210.m9R2ANT4030183@zion.cs.uiuc.edu>
<19743F95-2168-4FD4-B261-1E4F8A42553C@apple.com>
Message-ID:
Nevermind. I see your llvmdev email. Thanks.
Evan
On Oct 26, 2008, at 9:12 PM, Evan Cheng wrote:
> Which tests? Was there a PR for this?
>
> Thanks,
>
> Evan
>
> On Oct 26, 2008, at 7:10 PM, Dale Johannesen wrote:
>
>> Author: johannes
>> Date: Sun Oct 26 21:10:21 2008
>> New Revision: 58225
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=58225&view=rev
>> Log:
>> Increase default setting of tail-merge-threshold to
>> 150, based on llvm-test measurements.
>>
>>
>> Modified:
>> llvm/trunk/lib/CodeGen/BranchFolding.cpp
>>
>> Modified: llvm/trunk/lib/CodeGen/BranchFolding.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/BranchFolding.cpp?rev=58225&r1=58224&r2=58225&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- llvm/trunk/lib/CodeGen/BranchFolding.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/BranchFolding.cpp Sun Oct 26 21:10:21 2008
>> @@ -42,7 +42,7 @@
>> static cl::opt
>> TailMergeThreshold("tail-merge-threshold",
>> cl::desc("Max number of predecessors to consider tail
>> merging"),
>> - cl::init(100), cl::Hidden);
>> + cl::init(150), cl::Hidden);
>>
>> namespace {
>> struct VISIBILITY_HIDDEN BranchFolder : public MachineFunctionPass {
>>
>>
>> _______________________________________________
>> 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
From sabre at nondot.org Mon Oct 27 01:56:35 2008
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 27 Oct 2008 06:56:35 -0000
Subject: [llvm-commits] [llvm] r58228 -
/llvm/trunk/test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll
Message-ID: <200810270656.m9R6uZ9d023869@zion.cs.uiuc.edu>
Author: lattner
Date: Mon Oct 27 01:56:35 2008
New Revision: 58228
URL: http://llvm.org/viewvc/llvm-project?rev=58228&view=rev
Log:
no need to print output
Modified:
llvm/trunk/test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll
Modified: llvm/trunk/test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll?rev=58228&r1=58227&r2=58228&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll (original)
+++ llvm/trunk/test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll Mon Oct 27 01:56:35 2008
@@ -1,6 +1,6 @@
; Uninitialized values are not handled correctly.
;
-; RUN: llvm-as < %s | opt -mem2reg
+; RUN: llvm-as < %s | opt -mem2reg -disable-output
;
define i32 @test() {
From sabre at nondot.org Mon Oct 27 02:05:53 2008
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 27 Oct 2008 07:05:53 -0000
Subject: [llvm-commits] [llvm] r58229 -
/llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
Message-ID: <200810270705.m9R75r62024212@zion.cs.uiuc.edu>
Author: lattner
Date: Mon Oct 27 02:05:53 2008
New Revision: 58229
URL: http://llvm.org/viewvc/llvm-project?rev=58229&view=rev
Log:
Rewrite all the 'PromoteLocallyUsedAlloca[s]' logic. With the power of
LargeBlockInfo, we can now dramatically simplify their implementation
and speed them up at the same time. Now the code has time proportional
to the number of uses of the alloca, not the size of the block.
This also eliminates code that tried to batch up different allocas which
are used in the same blocks, and eliminates the 'retry list' logic which
was baroque and no unneccesary. In addition to being a speedup for crazy
cases, this is also a nice cleanup:
PromoteMemoryToRegister.cpp | 270 +++++++++++++++-----------------------------
1 file changed, 96 insertions(+), 174 deletions(-)
Modified:
llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
Modified: llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp?rev=58229&r1=58228&r2=58229&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Mon Oct 27 02:05:53 2008
@@ -163,7 +163,6 @@
/// Allocas - The alloca instructions being promoted.
///
std::vector Allocas;
- SmallVector &RetryList;
DominatorTree &DT;
DominanceFrontier &DF;
@@ -200,10 +199,9 @@
/// BBNumPreds - Lazily compute the number of predecessors a block has.
DenseMap BBNumPreds;
public:
- PromoteMem2Reg(const std::vector &A,
- SmallVector &Retry, DominatorTree &dt,
+ PromoteMem2Reg(const std::vector &A, DominatorTree &dt,
DominanceFrontier &df, AliasSetTracker *ast)
- : Allocas(A), RetryList(Retry), DT(dt), DF(df), AST(ast) {}
+ : Allocas(A), DT(dt), DF(df), AST(ast) {}
void run();
@@ -243,13 +241,10 @@
void RewriteSingleStoreAlloca(AllocaInst *AI, AllocaInfo &Info,
LargeBlockInfo &LBI);
-
- bool PromoteLocallyUsedAlloca(BasicBlock *BB, AllocaInst *AI,
+ void PromoteSingleBlockAlloca(AllocaInst *AI, AllocaInfo &Info,
LargeBlockInfo &LBI);
- void PromoteLocallyUsedAllocas(BasicBlock *BB,
- const std::vector &AIs,
- LargeBlockInfo &LBI);
+
void RenamePass(BasicBlock *BB, BasicBlock *Pred,
RenamePassData::ValVector &IncVals,
std::vector &Worklist);
@@ -315,13 +310,6 @@
void PromoteMem2Reg::run() {
Function &F = *DF.getRoot()->getParent();
- // LocallyUsedAllocas - Keep track of all of the alloca instructions which are
- // only used in a single basic block. These instructions can be efficiently
- // promoted by performing a single linear scan over that one block. Since
- // individual basic blocks are sometimes large, we group together all allocas
- // that are live in a single basic block by the basic block they are live in.
- std::map > LocallyUsedAllocas;
-
if (AST) PointerAllocaValues.resize(Allocas.size());
AllocaInfo Info;
@@ -376,11 +364,29 @@
// If the alloca is only read and written in one basic block, just perform a
// linear sweep over the block to eliminate it.
if (Info.OnlyUsedInOneBlock) {
- LocallyUsedAllocas[Info.OnlyBlock].push_back(AI);
+ PromoteSingleBlockAlloca(AI, Info, LBI);
- // Remove the alloca from the Allocas list, since it will be processed.
- RemoveFromAllocasList(AllocaNum);
- continue;
+ // Finally, after the scan, check to see if the stores are all that is
+ // left.
+ if (Info.UsingBlocks.empty()) {
+
+ // Remove the (now dead) stores and alloca.
+ while (!AI->use_empty()) {
+ StoreInst *SI = cast(AI->use_back());
+ SI->eraseFromParent();
+ LBI.deleteValue(SI);
+ }
+
+ if (AST) AST->deleteValue(AI);
+ AI->eraseFromParent();
+ LBI.deleteValue(AI);
+
+ // The alloca has been processed, move on.
+ RemoveFromAllocasList(AllocaNum);
+
+ ++NumLocalPromoted;
+ continue;
+ }
}
// If we haven't computed a numbering for the BB's in the function, do so
@@ -406,26 +412,6 @@
DetermineInsertionPoint(AI, AllocaNum, Info);
}
- // Process all allocas which are only used in a single basic block.
- for (std::map >::iterator I =
- LocallyUsedAllocas.begin(), E = LocallyUsedAllocas.end(); I != E; ++I){
- const std::vector &LocAllocas = I->second;
- assert(!LocAllocas.empty() && "empty alloca list??");
-
- // It's common for there to only be one alloca in the list. Handle it
- // efficiently.
- if (LocAllocas.size() == 1) {
- // If we can do the quick promotion pass, do so now.
- if (PromoteLocallyUsedAlloca(I->first, LocAllocas[0], LBI))
- RetryList.push_back(LocAllocas[0]); // Failed, retry later.
- } else {
- // Locally promote anything possible. Note that if this is unable to
- // promote a particular alloca, it puts the alloca onto the Allocas vector
- // for global processing.
- PromoteLocallyUsedAllocas(I->first, LocAllocas, LBI);
- }
- }
-
if (Allocas.empty())
return; // All of the allocas must have been trivial!
@@ -752,7 +738,16 @@
}
-/// PromoteLocallyUsedAlloca - Many allocas are only used within a single basic
+/// StoreIndexSearchPredicate - This is a helper predicate used to search by the
+/// first element of a pair.
+struct StoreIndexSearchPredicate {
+ bool operator()(const std::pair &LHS,
+ const std::pair &RHS) {
+ return LHS.first < RHS.first;
+ }
+};
+
+/// PromoteSingleBlockAlloca - Many allocas are only used within a single basic
/// block. If this is the case, avoid traversing the CFG and inserting a lot of
/// potentially useless PHI nodes by just performing a single linear pass over
/// the basic block using the Alloca.
@@ -766,126 +761,74 @@
///
/// ... so long as A is not used before undef is set.
///
-bool PromoteMem2Reg::PromoteLocallyUsedAlloca(BasicBlock *BB, AllocaInst *AI,
+void PromoteMem2Reg::PromoteSingleBlockAlloca(AllocaInst *AI, AllocaInfo &Info,
LargeBlockInfo &LBI) {
- assert(!AI->use_empty() && "There are no uses of the alloca!");
-
- // Handle degenerate cases quickly.
- if (AI->hasOneUse()) {
- Instruction *U = cast(AI->use_back());
- if (LoadInst *LI = dyn_cast(U)) {
- // Must be a load of uninitialized value.
- LI->replaceAllUsesWith(UndefValue::get(AI->getAllocatedType()));
- if (AST && isa(LI->getType()))
- AST->deleteValue(LI);
- } else {
- // Otherwise it must be a store which is never read.
- assert(isa(U));
- }
- LBI.deleteValue(U);
- BB->getInstList().erase(U);
- } else {
- // Uses of the uninitialized memory location shall get undef.
- Value *CurVal = 0;
-
- for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) {
- Instruction *Inst = I++;
- if (LoadInst *LI = dyn_cast(Inst)) {
- if (LI->getOperand(0) == AI) {
- if (!CurVal) return true; // Could not locally promote!
-
- // Loads just returns the "current value"...
- LI->replaceAllUsesWith(CurVal);
- if (AST && isa(LI->getType()))
- AST->deleteValue(LI);
- BB->getInstList().erase(LI);
- LBI.deleteValue(LI);
- }
- } else if (StoreInst *SI = dyn_cast(Inst)) {
- if (SI->getOperand(1) == AI) {
- // Store updates the "current value"...
- CurVal = SI->getOperand(0);
- BB->getInstList().erase(SI);
- LBI.deleteValue(SI);
- }
- }
- }
- }
-
- // After traversing the basic block, there should be no more uses of the
- // alloca: remove it now.
- assert(AI->use_empty() && "Uses of alloca from more than one BB??");
- if (AST) AST->deleteValue(AI);
- AI->eraseFromParent();
- LBI.deleteValue(AI);
-
- ++NumLocalPromoted;
- return false;
-}
-
-/// PromoteLocallyUsedAllocas - This method is just like
-/// PromoteLocallyUsedAlloca, except that it processes multiple alloca
-/// instructions in parallel. This is important in cases where we have large
-/// basic blocks, as we don't want to rescan the entire basic block for each
-/// alloca which is locally used in it (which might be a lot).
-void PromoteMem2Reg::
-PromoteLocallyUsedAllocas(BasicBlock *BB, const std::vector &AIs,
- LargeBlockInfo &LBI) {
- DenseMap CurValues;
- for (unsigned i = 0, e = AIs.size(); i != e; ++i)
- CurValues[AIs[i]] = 0; // Insert with null value
-
- for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) {
- Instruction *Inst = I++;
- if (LoadInst *LI = dyn_cast(Inst)) {
- // Is this a load of an alloca we are tracking?
- if (AllocaInst *AI = dyn_cast(LI->getOperand(0))) {
- DenseMap::iterator AIt = CurValues.find(AI);
- if (AIt != CurValues.end()) {
- // If loading an uninitialized value, allow the inter-block case to
- // handle it. Due to control flow, this might actually be ok.
- if (AIt->second == 0) { // Use of locally uninitialized value??
- RetryList.push_back(AI); // Retry elsewhere.
- CurValues.erase(AIt); // Stop tracking this here.
- if (CurValues.empty()) return;
- } else {
- // Loads just returns the "current value"...
- LI->replaceAllUsesWith(AIt->second);
- if (AST && isa(LI->getType()))
- AST->deleteValue(LI);
- BB->getInstList().erase(LI);
- LBI.deleteValue(LI);
- }
- }
- }
- } else if (StoreInst *SI = dyn_cast(Inst)) {
- if (AllocaInst *AI = dyn_cast(SI->getOperand(1))) {
- DenseMap::iterator AIt = CurValues.find(AI);
- if (AIt != CurValues.end()) {
- // Store updates the "current value"...
- AIt->second = SI->getOperand(0);
- SI->eraseFromParent();
- LBI.deleteValue(SI);
- }
+ // The trickiest case to handle is when we have large blocks. Because of this,
+ // this code is optimized assuming that large blocks happen. This does not
+ // significantly pessimize the small block case. This uses LargeBlockInfo to
+ // make it efficient to get the index of various operations in the block.
+
+ // Clear out UsingBlocks. We will reconstruct it here if needed.
+ Info.UsingBlocks.clear();
+
+ // Walk the use-def list of the alloca, getting the locations of all stores.
+ typedef SmallVector, 64> StoresByIndexTy;
+ StoresByIndexTy StoresByIndex;
+
+ for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end();
+ UI != E; ++UI)
+ if (StoreInst *SI = dyn_cast(*UI))
+ StoresByIndex.push_back(std::make_pair(LBI.getInstructionIndex(SI), SI));
+
+ // If there are no stores to the alloca, just replace any loads with undef.
+ if (StoresByIndex.empty()) {
+ for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end(); UI != E;)
+ if (LoadInst *LI = dyn_cast(*UI++)) {
+ LI->replaceAllUsesWith(UndefValue::get(LI->getType()));
+ if (AST && isa(LI->getType()))
+ AST->deleteValue(LI);
+ LBI.deleteValue(LI);
+ LI->eraseFromParent();
}
- }
+ return;
}
- // At the end of the block scan, all allocas in CurValues are dead.
- for (DenseMap::iterator I = CurValues.begin(),
- E = CurValues.end(); I != E; ++I) {
- AllocaInst *AI = I->first;
- assert(AI->use_empty() && "Uses of alloca from more than one BB??");
- if (AST) AST->deleteValue(AI);
- AI->eraseFromParent();
- LBI.deleteValue(AI);
+ // Sort the stores by their index, making it efficient to do a lookup with a
+ // binary search.
+ std::sort(StoresByIndex.begin(), StoresByIndex.end());
+
+ // Walk all of the loads from this alloca, replacing them with the nearest
+ // store above them, if any.
+ for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end(); UI != E;) {
+ LoadInst *LI = dyn_cast(*UI++);
+ if (!LI) continue;
+
+ unsigned LoadIdx = LBI.getInstructionIndex(LI);
+
+ // Find the nearest store that has a lower than this load.
+ StoresByIndexTy::iterator I =
+ std::lower_bound(StoresByIndex.begin(), StoresByIndex.end(),
+ std::pair(LoadIdx, 0),
+ StoreIndexSearchPredicate());
+
+ // If there is no store before this load, then we can't promote this load.
+ if (I == StoresByIndex.begin()) {
+ // Can't handle this load, bail out.
+ Info.UsingBlocks.push_back(LI->getParent());
+ continue;
+ }
+
+ // Otherwise, there was a store before this load, the load takes its value.
+ --I;
+ LI->replaceAllUsesWith(I->second->getOperand(0));
+ if (AST && isa(LI->getType()))
+ AST->deleteValue(LI);
+ LI->eraseFromParent();
+ LBI.deleteValue(LI);
}
-
- NumLocalPromoted += CurValues.size();
}
-
// QueuePhiNode - queues a phi-node to be added to a basic-block for a specific
// Alloca returns true if there wasn't already a phi-node for that variable
//
@@ -1044,26 +987,5 @@
// If there is nothing to do, bail out...
if (Allocas.empty()) return;
- SmallVector RetryList;
- PromoteMem2Reg(Allocas, RetryList, DT, DF, AST).run();
-
- // PromoteMem2Reg may not have been able to promote all of the allocas in one
- // pass, run it again if needed.
- std::vector NewAllocas;
- while (!RetryList.empty()) {
- // If we need to retry some allocas, this is due to there being no store
- // before a read in a local block. To counteract this, insert a store of
- // undef into the alloca right after the alloca itself.
- for (unsigned i = 0, e = RetryList.size(); i != e; ++i) {
- BasicBlock::iterator BBI = RetryList[i];
-
- new StoreInst(UndefValue::get(RetryList[i]->getAllocatedType()),
- RetryList[i], ++BBI);
- }
-
- NewAllocas.assign(RetryList.begin(), RetryList.end());
- RetryList.clear();
- PromoteMem2Reg(NewAllocas, RetryList, DT, DF, AST).run();
- NewAllocas.clear();
- }
+ PromoteMem2Reg(Allocas, DT, DF, AST).run();
}
From evan.cheng at apple.com Mon Oct 27 02:14:50 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Mon, 27 Oct 2008 07:14:50 -0000
Subject: [llvm-commits] [llvm] r58230 - in /llvm/trunk:
include/llvm/Target/TargetInstrInfo.h lib/CodeGen/PreAllocSplitting.cpp
lib/Target/X86/X86InstrInfo.cpp lib/Target/X86/X86InstrInfo.h
lib/Target/X86/X86RegisterInfo.h test/CodeGen/X86/pre-split7.ll
Message-ID: <200810270714.m9R7EpwT024528@zion.cs.uiuc.edu>
Author: evancheng
Date: Mon Oct 27 02:14:50 2008
New Revision: 58230
URL: http://llvm.org/viewvc/llvm-project?rev=58230&view=rev
Log:
For now, don't split live intervals around x87 stack register barriers. FpGET_ST0_80 must be right after a call instruction (and ADJCALLSTACKUP) so we need to find a way to prevent reload of x87 registers between them.
Added:
llvm/trunk/test/CodeGen/X86/pre-split7.ll
Modified:
llvm/trunk/include/llvm/Target/TargetInstrInfo.h
llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
llvm/trunk/lib/Target/X86/X86InstrInfo.h
llvm/trunk/lib/Target/X86/X86RegisterInfo.h
Modified: llvm/trunk/include/llvm/Target/TargetInstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetInstrInfo.h?rev=58230&r1=58229&r2=58230&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetInstrInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetInstrInfo.h Mon Oct 27 02:14:50 2008
@@ -407,6 +407,13 @@
return false;
}
+ /// IgnoreRegisterClassBarriers - Returns true if pre-register allocation
+ /// live interval splitting pass should ignore barriers of the specified
+ /// register class.
+ virtual bool IgnoreRegisterClassBarriers(const TargetRegisterClass *RC) const{
+ return true;
+ }
+
/// getPointerRegClass - Returns a TargetRegisterClass used for pointer
/// values.
virtual const TargetRegisterClass *getPointerRegClass() const {
@@ -425,7 +432,6 @@
/// GetFunctionSizeInBytes - Returns the size of the specified MachineFunction.
///
virtual unsigned GetFunctionSizeInBytes(const MachineFunction &MF) const = 0;
-
};
/// TargetInstrInfoImpl - This is the default implementation of
Modified: llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp?rev=58230&r1=58229&r2=58230&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp (original)
+++ llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp Mon Oct 27 02:14:50 2008
@@ -659,6 +659,8 @@
// by the current barrier.
SmallVector Intervals;
for (const TargetRegisterClass **RC = RCs; *RC; ++RC) {
+ if (TII->IgnoreRegisterClassBarriers(*RC))
+ continue;
std::vector &VRs = MRI->getRegClassVirtRegs(*RC);
for (unsigned i = 0, e = VRs.size(); i != e; ++i) {
unsigned Reg = VRs[i];
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=58230&r1=58229&r2=58230&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Mon Oct 27 02:14:50 2008
@@ -2411,6 +2411,14 @@
return false;
}
+bool X86InstrInfo::
+IgnoreRegisterClassBarriers(const TargetRegisterClass *RC) const {
+ // FIXME: Ignore bariers of x87 stack registers for now. We can't
+ // allow any loads of these registers before FpGet_ST0_80.
+ return RC == &X86::CCRRegClass || RC == &X86::RFP32RegClass ||
+ RC == &X86::RFP64RegClass || RC == &X86::RFP80RegClass;
+}
+
const TargetRegisterClass *X86InstrInfo::getPointerRegClass() const {
const X86Subtarget *Subtarget = &TM.getSubtarget();
if (Subtarget->is64Bit())
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.h?rev=58230&r1=58229&r2=58230&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.h (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.h Mon Oct 27 02:14:50 2008
@@ -405,6 +405,11 @@
virtual
bool ReverseBranchCondition(SmallVectorImpl &Cond) const;
+ /// IgnoreRegisterClassBarriers - Returns true if pre-register allocation
+ /// live interval splitting pass should ignore barriers of the specified
+ /// register class.
+ bool IgnoreRegisterClassBarriers(const TargetRegisterClass *RC) const;
+
const TargetRegisterClass *getPointerRegClass() const;
// getBaseOpcodeFor - This function returns the "base" X86 opcode for the
Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.h?rev=58230&r1=58229&r2=58230&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.h (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.h Mon Oct 27 02:14:50 2008
@@ -94,6 +94,10 @@
/// Code Generation virtual methods...
///
+
+ /// getCrossCopyRegClass - Returns a legal register class to copy a register
+ /// in the specified class to or from. Returns NULL if it is possible to copy
+ /// between a two registers of the specified class.
const TargetRegisterClass *
getCrossCopyRegClass(const TargetRegisterClass *RC) const;
Added: llvm/trunk/test/CodeGen/X86/pre-split7.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pre-split7.ll?rev=58230&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/pre-split7.ll (added)
+++ llvm/trunk/test/CodeGen/X86/pre-split7.ll Mon Oct 27 02:14:50 2008
@@ -0,0 +1,34 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -pre-alloc-split
+
+ at object_distance = external global double, align 8 ; [#uses=1]
+ at axis_slope_angle = external global double, align 8 ; [#uses=1]
+ at current_surfaces.b = external global i1 ; [#uses=1]
+
+declare double @sin(double) nounwind readonly
+
+declare double @asin(double) nounwind readonly
+
+declare double @tan(double) nounwind readonly
+
+define fastcc void @trace_line(i32 %line) nounwind {
+entry:
+ %.b3 = load i1* @current_surfaces.b ; [#uses=1]
+ br i1 %.b3, label %bb, label %return
+
+bb: ; preds = %bb, %entry
+ %0 = tail call double @asin(double 0.000000e+00) nounwind readonly ; [#uses=1]
+ %1 = add double 0.000000e+00, %0 ; [#uses=2]
+ %2 = tail call double @asin(double 0.000000e+00) nounwind readonly ; [#uses=1]
+ %3 = sub double %1, %2 ; [#uses=2]
+ store double %3, double* @axis_slope_angle, align 8
+ %4 = fdiv double %1, 2.000000e+00 ; [#uses=1]
+ %5 = tail call double @sin(double %4) nounwind readonly ; [#uses=1]
+ %6 = mul double 0.000000e+00, %5 ; [#uses=1]
+ %7 = tail call double @tan(double %3) nounwind readonly ; [#uses=0]
+ %8 = add double 0.000000e+00, %6 ; [#uses=1]
+ store double %8, double* @object_distance, align 8
+ br label %bb
+
+return: ; preds = %entry
+ ret void
+}
From nicholas at mxc.ca Mon Oct 27 02:28:44 2008
From: nicholas at mxc.ca (Nick Lewycky)
Date: Mon, 27 Oct 2008 07:28:44 -0000
Subject: [llvm-commits] [llvm] r58231 -
/llvm/trunk/lib/VMCore/Instruction.cpp
Message-ID: <200810270728.m9R7SihQ024938@zion.cs.uiuc.edu>
Author: nicholas
Date: Mon Oct 27 02:28:44 2008
New Revision: 58231
URL: http://llvm.org/viewvc/llvm-project?rev=58231&view=rev
Log:
Fix an obvious copy/pasto.
Modified:
llvm/trunk/lib/VMCore/Instruction.cpp
Modified: llvm/trunk/lib/VMCore/Instruction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instruction.cpp?rev=58231&r1=58230&r2=58231&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instruction.cpp (original)
+++ llvm/trunk/lib/VMCore/Instruction.cpp Mon Oct 27 02:28:44 2008
@@ -185,9 +185,9 @@
CI->getAttributes().getRawPointer() ==
cast(I)->getAttributes().getRawPointer();
if (const InvokeInst *CI = dyn_cast(this))
- return CI->getCallingConv() == cast(I)->getCallingConv() &&
+ return CI->getCallingConv() == cast(I)->getCallingConv() &&
CI->getAttributes().getRawPointer() ==
- cast(I)->getAttributes().getRawPointer();
+ cast(I)->getAttributes().getRawPointer();
if (const InsertValueInst *IVI = dyn_cast(this)) {
if (IVI->getNumIndices() != cast(I)->getNumIndices())
return false;
@@ -235,9 +235,9 @@
CI->getAttributes().getRawPointer() ==
cast(I)->getAttributes().getRawPointer();
if (const InvokeInst *CI = dyn_cast(this))
- return CI->getCallingConv() == cast(I)->getCallingConv() &&
+ return CI->getCallingConv() == cast(I)->getCallingConv() &&
CI->getAttributes().getRawPointer() ==
- cast(I)->getAttributes().getRawPointer();
+ cast(I)->getAttributes().getRawPointer();
if (const InsertValueInst *IVI = dyn_cast(this)) {
if (IVI->getNumIndices() != cast(I)->getNumIndices())
return false;
From baldrick at free.fr Mon Oct 27 03:42:46 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 27 Oct 2008 08:42:46 -0000
Subject: [llvm-commits] [llvm] r58232 - in /llvm/trunk:
lib/CodeGen/SelectionDAG/ test/CodeGen/Generic/ test/CodeGen/Mips/
test/CodeGen/X86/
Message-ID: <200810270842.m9R8gl1t004026@zion.cs.uiuc.edu>
Author: baldrick
Date: Mon Oct 27 03:42:46 2008
New Revision: 58232
URL: http://llvm.org/viewvc/llvm-project?rev=58232&view=rev
Log:
Turn on LegalizeTypes, the new type legalization
codegen infrastructure, by default. Please report
any breakage to the mailing lists.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/trunk/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll
llvm/trunk/test/CodeGen/Generic/APIntLoadStore.ll
llvm/trunk/test/CodeGen/Generic/APIntParam.ll
llvm/trunk/test/CodeGen/Generic/APIntSextParam.ll
llvm/trunk/test/CodeGen/Generic/APIntZextParam.ll
llvm/trunk/test/CodeGen/Mips/2008-06-05-Carry.ll
llvm/trunk/test/CodeGen/Mips/2008-07-03-SRet.ll
llvm/trunk/test/CodeGen/Mips/2008-07-05-ByVal.ll
llvm/trunk/test/CodeGen/Mips/2008-07-06-fadd64.ll
llvm/trunk/test/CodeGen/Mips/2008-07-07-FPExtend.ll
llvm/trunk/test/CodeGen/Mips/2008-07-07-Float2Int.ll
llvm/trunk/test/CodeGen/Mips/2008-07-07-IntDoubleConvertions.ll
llvm/trunk/test/CodeGen/Mips/2008-07-15-InternalConstant.ll
llvm/trunk/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll
llvm/trunk/test/CodeGen/Mips/2008-07-22-Cstpool.ll
llvm/trunk/test/CodeGen/Mips/2008-07-23-fpcmp.ll
llvm/trunk/test/CodeGen/Mips/2008-07-29-icmp.ll
llvm/trunk/test/CodeGen/Mips/2008-07-31-fcopysign.ll
llvm/trunk/test/CodeGen/Mips/2008-08-01-AsmInline.ll
llvm/trunk/test/CodeGen/Mips/2008-08-03-fabs64.ll
llvm/trunk/test/CodeGen/Mips/2008-08-04-Bitconvert.ll
llvm/trunk/test/CodeGen/Mips/2008-08-06-Alloca.ll
llvm/trunk/test/CodeGen/Mips/2008-08-07-FPRound.ll
llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll
llvm/trunk/test/CodeGen/X86/2008-10-24-FlippedCompare.ll
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Oct 27 03:42:46 2008
@@ -54,7 +54,7 @@
static cl::opt
EnableValueProp("enable-value-prop", cl::Hidden);
static cl::opt
-EnableLegalizeTypes("enable-legalize-types", cl::Hidden);
+DisableLegalizeTypes("disable-legalize-types", cl::Hidden);
static cl::opt
EnableFastISelVerbose("fast-isel-verbose", cl::Hidden,
cl::desc("Enable verbose messages in the \"fast\" "
@@ -572,7 +572,7 @@
// Second step, hack on the DAG until it only uses operations and types that
// the target supports.
- if (EnableLegalizeTypes) {// Enable this some day.
+ if (!DisableLegalizeTypes) {
if (ViewLegalizeTypesDAGs) CurDAG->viewGraph("legalize-types input for " +
BlockName);
Modified: llvm/trunk/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll (original)
+++ llvm/trunk/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -o -
+; RUN: llvm-as < %s | llc -o -
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"
target triple = "i686-pc-linux-gnu"
Modified: llvm/trunk/test/CodeGen/Generic/APIntLoadStore.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/APIntLoadStore.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Generic/APIntLoadStore.ll (original)
+++ llvm/trunk/test/CodeGen/Generic/APIntLoadStore.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types
+; RUN: llvm-as < %s | llc
@i1_l = external global i1 ; [#uses=1]
@i1_s = external global i1 ; [#uses=1]
@i2_l = external global i2 ; [#uses=1]
Modified: llvm/trunk/test/CodeGen/Generic/APIntParam.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/APIntParam.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Generic/APIntParam.ll (original)
+++ llvm/trunk/test/CodeGen/Generic/APIntParam.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types
+; RUN: llvm-as < %s | llc
@i1_s = external global i1 ; [#uses=1]
@i2_s = external global i2 ; [#uses=1]
@i3_s = external global i3 ; [#uses=1]
Modified: llvm/trunk/test/CodeGen/Generic/APIntSextParam.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/APIntSextParam.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Generic/APIntSextParam.ll (original)
+++ llvm/trunk/test/CodeGen/Generic/APIntSextParam.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types
+; RUN: llvm-as < %s | llc
@i1_s = external global i1 ; [#uses=1]
@i2_s = external global i2 ; [#uses=1]
@i3_s = external global i3 ; [#uses=1]
Modified: llvm/trunk/test/CodeGen/Generic/APIntZextParam.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/APIntZextParam.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Generic/APIntZextParam.ll (original)
+++ llvm/trunk/test/CodeGen/Generic/APIntZextParam.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types
+; RUN: llvm-as < %s | llc
@i1_s = external global i1 ; [#uses=1]
@i2_s = external global i2 ; [#uses=1]
@i3_s = external global i3 ; [#uses=1]
Modified: llvm/trunk/test/CodeGen/Mips/2008-06-05-Carry.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-06-05-Carry.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-06-05-Carry.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-06-05-Carry.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
+; RUN: llvm-as < %s | llc -march=mips -f -o %t
; RUN: grep subu %t | count 2
; RUN: grep addu %t | count 4
Modified: llvm/trunk/test/CodeGen/Mips/2008-07-03-SRet.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-03-SRet.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-07-03-SRet.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-07-03-SRet.ll Mon Oct 27 03:42:46 2008
@@ -1,5 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
-; RUN: grep {sw.*(\$4)} | count 3
+; RUN: llvm-as < %s | llc -march=mips | grep {sw.*(\$4)} | count 3
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "mipsallegrexel-psp-elf"
Modified: llvm/trunk/test/CodeGen/Mips/2008-07-05-ByVal.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-05-ByVal.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-07-05-ByVal.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-07-05-ByVal.ll Mon Oct 27 03:42:46 2008
@@ -1,5 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
-; RUN: grep {lw.*(\$4)} | count 2
+; RUN: llvm-as < %s | llc -march=mips | grep {lw.*(\$4)} | count 2
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:64:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "mipsallegrexel-psp-elf"
Modified: llvm/trunk/test/CodeGen/Mips/2008-07-06-fadd64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-06-fadd64.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-07-06-fadd64.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-07-06-fadd64.ll Mon Oct 27 03:42:46 2008
@@ -1,5 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
-; RUN: grep __adddf3
+; RUN: llvm-as < %s | llc -march=mips | grep __adddf3
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "mipsallegrexel-psp-elf"
Modified: llvm/trunk/test/CodeGen/Mips/2008-07-07-FPExtend.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-07-FPExtend.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-07-07-FPExtend.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-07-07-FPExtend.ll Mon Oct 27 03:42:46 2008
@@ -1,5 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
-; RUN: grep __extendsfdf2
+; RUN: llvm-as < %s | llc -march=mips | grep __extendsfdf2
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "mipsallegrexel-psp-elf"
Modified: llvm/trunk/test/CodeGen/Mips/2008-07-07-Float2Int.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-07-Float2Int.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-07-07-Float2Int.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-07-07-Float2Int.ll Mon Oct 27 03:42:46 2008
@@ -1,5 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
-; RUN: grep trunc.w.s | count 3
+; RUN: llvm-as < %s | llc -march=mips | grep trunc.w.s | count 3
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "mipsallegrexel-psp-elf"
Modified: llvm/trunk/test/CodeGen/Mips/2008-07-07-IntDoubleConvertions.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-07-IntDoubleConvertions.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-07-07-IntDoubleConvertions.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-07-07-IntDoubleConvertions.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
+; RUN: llvm-as < %s | llc -march=mips -f -o %t
; RUN: grep __floatsidf %t | count 1
; RUN: grep __floatunsidf %t | count 1
; RUN: grep __fixdfsi %t | count 1
Modified: llvm/trunk/test/CodeGen/Mips/2008-07-15-InternalConstant.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-15-InternalConstant.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-07-15-InternalConstant.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-07-15-InternalConstant.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
+; RUN: llvm-as < %s | llc -march=mips -f -o %t
; RUN: grep {rodata.str1.4,"aMS", at progbits} %t | count 1
; RUN: grep {r.data,} %t | count 1
; RUN: grep {\%hi} %t | count 2
Modified: llvm/trunk/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
+; RUN: llvm-as < %s | llc -march=mips -f -o %t
; RUN: grep seh %t | count 1
; RUN: grep seb %t | count 1
Modified: llvm/trunk/test/CodeGen/Mips/2008-07-22-Cstpool.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-22-Cstpool.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-07-22-Cstpool.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-07-22-Cstpool.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
+; RUN: llvm-as < %s | llc -march=mips -f -o %t
; RUN: grep {CPI\[01\]_\[01\]:} %t | count 2
; RUN: grep {rodata.cst4,"aM", at progbits} %t | count 1
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
Modified: llvm/trunk/test/CodeGen/Mips/2008-07-23-fpcmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-23-fpcmp.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-07-23-fpcmp.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-07-23-fpcmp.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
+; RUN: llvm-as < %s | llc -march=mips -f -o %t
; RUN: grep {c\\..*\\.s} %t | count 3
; RUN: grep {bc1\[tf\]} %t | count 3
Modified: llvm/trunk/test/CodeGen/Mips/2008-07-29-icmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-29-icmp.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-07-29-icmp.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-07-29-icmp.ll Mon Oct 27 03:42:46 2008
@@ -1,5 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
-; RUN: grep {b\[ne\]\[eq\]} | count 1
+; RUN: llvm-as < %s | llc -march=mips | grep {b\[ne\]\[eq\]} | count 1
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "mipsallegrexel-psp-elf"
Modified: llvm/trunk/test/CodeGen/Mips/2008-07-31-fcopysign.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-31-fcopysign.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-07-31-fcopysign.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-07-31-fcopysign.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
+; RUN: llvm-as < %s | llc -march=mips -f -o %t
; RUN: grep abs.s %t | count 1
; RUN: grep neg.s %t | count 1
Modified: llvm/trunk/test/CodeGen/Mips/2008-08-01-AsmInline.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-08-01-AsmInline.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-08-01-AsmInline.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-08-01-AsmInline.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
+; RUN: llvm-as < %s | llc -march=mips -f -o %t
; RUN: grep mfhi %t | count 1
; RUN: grep mflo %t | count 1
; RUN: grep multu %t | count 1
Modified: llvm/trunk/test/CodeGen/Mips/2008-08-03-fabs64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-08-03-fabs64.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-08-03-fabs64.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-08-03-fabs64.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
+; RUN: llvm-as < %s | llc -march=mips -f -o %t
; RUN: grep {lui.*32767} %t | count 1
; RUN: grep {ori.*65535} %t | count 1
Modified: llvm/trunk/test/CodeGen/Mips/2008-08-04-Bitconvert.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-08-04-Bitconvert.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-08-04-Bitconvert.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-08-04-Bitconvert.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
+; RUN: llvm-as < %s | llc -march=mips -f -o %t
; RUN: grep mtc1 %t | count 1
; RUN: grep mfc1 %t | count 1
Modified: llvm/trunk/test/CodeGen/Mips/2008-08-06-Alloca.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-08-06-Alloca.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-08-06-Alloca.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-08-06-Alloca.ll Mon Oct 27 03:42:46 2008
@@ -1,5 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
-; RUN: grep {subu.*sp} | count 2
+; RUN: llvm-as < %s | llc -march=mips | grep {subu.*sp} | count 2
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "mipsallegrexel-psp-elf"
Modified: llvm/trunk/test/CodeGen/Mips/2008-08-07-FPRound.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-08-07-FPRound.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/2008-08-07-FPRound.ll (original)
+++ llvm/trunk/test/CodeGen/Mips/2008-08-07-FPRound.ll Mon Oct 27 03:42:46 2008
@@ -1,5 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
-; RUN: grep __truncdfsf2 | count 1
+; RUN: llvm-as < %s | llc -march=mips | grep __truncdfsf2 | count 1
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
target triple = "mipsallegrexel-psp-elf"
Modified: llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -enable-legalize-types
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
; PR2762
define void @foo(<4 x i32>* %p, <4 x double>* %q) {
%n = load <4 x i32>* %p
Modified: llvm/trunk/test/CodeGen/X86/2008-10-24-FlippedCompare.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-10-24-FlippedCompare.ll?rev=58232&r1=58231&r2=58232&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2008-10-24-FlippedCompare.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2008-10-24-FlippedCompare.ll Mon Oct 27 03:42:46 2008
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-legalize-types -march=x86 -mattr=+sse2 -o - | not grep {ucomiss\[^,\]*esp}
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o - | not grep {ucomiss\[^,\]*esp}
define void @f(float %wt) {
entry:
From isanbard at gmail.com Mon Oct 27 04:06:50 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 27 Oct 2008 02:06:50 -0700
Subject: [llvm-commits] [llvm] r58232 - in /llvm/trunk:
lib/CodeGen/SelectionDAG/ test/CodeGen/Generic/
test/CodeGen/Mips/ test/CodeGen/X86/
In-Reply-To: <200810270842.m9R8gl1t004026@zion.cs.uiuc.edu>
References: <200810270842.m9R8gl1t004026@zion.cs.uiuc.edu>
Message-ID: <68EAAD50-D1F3-4F48-A60D-97FE8C01111E@gmail.com>
Hi Duncan,
Here's the failures I get:
Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/
CodeGen/ARM/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/
build/llvm.src/test/CodeGen/ARM/cse-libcalls.ll Failed with exit(1) at
line 1 while running: llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-
llvm/build/llvm.src/test/CodeGen/ARM/cse-libcalls.ll | llc -march=arm
| /usr/bin/grep {bl.*__ltdf} | count 1 count: expected 1 lines and got
2. child process exited abnormally Running /Volumes/Sandbox/Buildbot/
llvm/full-llvm/build/llvm.src/test/CodeGen/Alpha/dg.exp ... Running /
Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/
CBackend/dg.exp ... Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/
build/llvm.src/test/CodeGen/CPP/dg.exp ... Running /Volumes/Sandbox/
Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/CellSPU/dg.exp ...
Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/
CodeGen/Generic/GC/dg.exp ... Running /Volumes/Sandbox/Buildbot/llvm/
full-llvm/build/llvm.src/test/CodeGen/Generic/dg.exp ... Running /
Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/
IA64/dg.exp ... Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/
llvm.src/test/CodeGen/Mips/dg.exp ... Running /Volumes/Sandbox/
Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/PowerPC/dg.exp ...
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/
CodeGen/PowerPC/vec_spat.ll Failed with exit(1) at line 3 while
running: grep vspltw vec_spat.ll.tmp | count 2 count: expected 2 lines
and got 3. child process exited abnormally Running /Volumes/Sandbox/
Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/SPARC/dg.exp ...
Please investigate them. Thanks!
-bw
On Oct 27, 2008, at 1:42 AM, Duncan Sands wrote:
> Author: baldrick
> Date: Mon Oct 27 03:42:46 2008
> New Revision: 58232
>
> URL: http://llvm.org/viewvc/llvm-project?rev=58232&view=rev
> Log:
> Turn on LegalizeTypes, the new type legalization
> codegen infrastructure, by default. Please report
> any breakage to the mailing lists.
>
> Modified:
> llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
> llvm/trunk/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll
> llvm/trunk/test/CodeGen/Generic/APIntLoadStore.ll
> llvm/trunk/test/CodeGen/Generic/APIntParam.ll
> llvm/trunk/test/CodeGen/Generic/APIntSextParam.ll
> llvm/trunk/test/CodeGen/Generic/APIntZextParam.ll
> llvm/trunk/test/CodeGen/Mips/2008-06-05-Carry.ll
> llvm/trunk/test/CodeGen/Mips/2008-07-03-SRet.ll
> llvm/trunk/test/CodeGen/Mips/2008-07-05-ByVal.ll
> llvm/trunk/test/CodeGen/Mips/2008-07-06-fadd64.ll
> llvm/trunk/test/CodeGen/Mips/2008-07-07-FPExtend.ll
> llvm/trunk/test/CodeGen/Mips/2008-07-07-Float2Int.ll
> llvm/trunk/test/CodeGen/Mips/2008-07-07-IntDoubleConvertions.ll
> llvm/trunk/test/CodeGen/Mips/2008-07-15-InternalConstant.ll
> llvm/trunk/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll
> llvm/trunk/test/CodeGen/Mips/2008-07-22-Cstpool.ll
> llvm/trunk/test/CodeGen/Mips/2008-07-23-fpcmp.ll
> llvm/trunk/test/CodeGen/Mips/2008-07-29-icmp.ll
> llvm/trunk/test/CodeGen/Mips/2008-07-31-fcopysign.ll
> llvm/trunk/test/CodeGen/Mips/2008-08-01-AsmInline.ll
> llvm/trunk/test/CodeGen/Mips/2008-08-03-fabs64.ll
> llvm/trunk/test/CodeGen/Mips/2008-08-04-Bitconvert.ll
> llvm/trunk/test/CodeGen/Mips/2008-08-06-Alloca.ll
> llvm/trunk/test/CodeGen/Mips/2008-08-07-FPRound.ll
> llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll
> llvm/trunk/test/CodeGen/X86/2008-10-24-FlippedCompare.ll
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
> (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Oct
> 27 03:42:46 2008
> @@ -54,7 +54,7 @@
> static cl::opt
> EnableValueProp("enable-value-prop", cl::Hidden);
> static cl::opt
> -EnableLegalizeTypes("enable-legalize-types", cl::Hidden);
> +DisableLegalizeTypes("disable-legalize-types", cl::Hidden);
> static cl::opt
> EnableFastISelVerbose("fast-isel-verbose", cl::Hidden,
> cl::desc("Enable verbose messages in the \"fast\" "
> @@ -572,7 +572,7 @@
>
> // Second step, hack on the DAG until it only uses operations and
> types that
> // the target supports.
> - if (EnableLegalizeTypes) {// Enable this some day.
> + if (!DisableLegalizeTypes) {
> if (ViewLegalizeTypesDAGs) CurDAG->viewGraph("legalize-types
> input for " +
> BlockName);
>
>
> Modified: llvm/trunk/test/CodeGen/Generic/2007-11-21-
> UndeadIllegalNode.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll
> (original)
> +++ llvm/trunk/test/CodeGen/Generic/2007-11-21-UndeadIllegalNode.ll
> Mon Oct 27 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -o -
> +; RUN: llvm-as < %s | llc -o -
>
> 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"
> target triple = "i686-pc-linux-gnu"
>
> Modified: llvm/trunk/test/CodeGen/Generic/APIntLoadStore.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/APIntLoadStore.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Generic/APIntLoadStore.ll (original)
> +++ llvm/trunk/test/CodeGen/Generic/APIntLoadStore.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types
> +; RUN: llvm-as < %s | llc
> @i1_l = external global i1 ; [#uses=1]
> @i1_s = external global i1 ; [#uses=1]
> @i2_l = external global i2 ; [#uses=1]
>
> Modified: llvm/trunk/test/CodeGen/Generic/APIntParam.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/APIntParam.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Generic/APIntParam.ll (original)
> +++ llvm/trunk/test/CodeGen/Generic/APIntParam.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types
> +; RUN: llvm-as < %s | llc
> @i1_s = external global i1 ; [#uses=1]
> @i2_s = external global i2 ; [#uses=1]
> @i3_s = external global i3 ; [#uses=1]
>
> Modified: llvm/trunk/test/CodeGen/Generic/APIntSextParam.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/APIntSextParam.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Generic/APIntSextParam.ll (original)
> +++ llvm/trunk/test/CodeGen/Generic/APIntSextParam.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types
> +; RUN: llvm-as < %s | llc
> @i1_s = external global i1 ; [#uses=1]
> @i2_s = external global i2 ; [#uses=1]
> @i3_s = external global i3 ; [#uses=1]
>
> Modified: llvm/trunk/test/CodeGen/Generic/APIntZextParam.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/APIntZextParam.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Generic/APIntZextParam.ll (original)
> +++ llvm/trunk/test/CodeGen/Generic/APIntZextParam.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types
> +; RUN: llvm-as < %s | llc
> @i1_s = external global i1 ; [#uses=1]
> @i2_s = external global i2 ; [#uses=1]
> @i3_s = external global i3 ; [#uses=1]
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-06-05-Carry.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-06-05-Carry.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-06-05-Carry.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-06-05-Carry.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
> +; RUN: llvm-as < %s | llc -march=mips -f -o %t
> ; RUN: grep subu %t | count 2
> ; RUN: grep addu %t | count 4
>
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-07-03-SRet.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-03-SRet.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-07-03-SRet.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-07-03-SRet.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,5 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
> -; RUN: grep {sw.*(\$4)} | count 3
> +; RUN: llvm-as < %s | llc -march=mips | grep {sw.*(\$4)} | count 3
>
> target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-
> i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
> target triple = "mipsallegrexel-psp-elf"
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-07-05-ByVal.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-05-ByVal.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-07-05-ByVal.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-07-05-ByVal.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,5 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
> -; RUN: grep {lw.*(\$4)} | count 2
> +; RUN: llvm-as < %s | llc -march=mips | grep {lw.*(\$4)} | count 2
>
> 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:64:64-v64:64:64-v128:128:128-a0:0:64"
> target triple = "mipsallegrexel-psp-elf"
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-07-06-fadd64.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-06-fadd64.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-07-06-fadd64.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-07-06-fadd64.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,5 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
> -; RUN: grep __adddf3
> +; RUN: llvm-as < %s | llc -march=mips | grep __adddf3
>
> target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-
> i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
> target triple = "mipsallegrexel-psp-elf"
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-07-07-FPExtend.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-07-FPExtend.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-07-07-FPExtend.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-07-07-FPExtend.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,5 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
> -; RUN: grep __extendsfdf2
> +; RUN: llvm-as < %s | llc -march=mips | grep __extendsfdf2
>
> target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-
> i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
> target triple = "mipsallegrexel-psp-elf"
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-07-07-Float2Int.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-07-Float2Int.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-07-07-Float2Int.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-07-07-Float2Int.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,5 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
> -; RUN: grep trunc.w.s | count 3
> +; RUN: llvm-as < %s | llc -march=mips | grep trunc.w.s | count 3
>
> target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-
> i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
> target triple = "mipsallegrexel-psp-elf"
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-07-07-
> IntDoubleConvertions.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-07-IntDoubleConvertions.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-07-07-IntDoubleConvertions.ll
> (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-07-07-IntDoubleConvertions.ll
> Mon Oct 27 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
> +; RUN: llvm-as < %s | llc -march=mips -f -o %t
> ; RUN: grep __floatsidf %t | count 1
> ; RUN: grep __floatunsidf %t | count 1
> ; RUN: grep __fixdfsi %t | count 1
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-07-15-InternalConstant.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-15-InternalConstant.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-07-15-InternalConstant.ll
> (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-07-15-InternalConstant.ll Mon
> Oct 27 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
> +; RUN: llvm-as < %s | llc -march=mips -f -o %t
> ; RUN: grep {rodata.str1.4,"aMS", at progbits} %t | count 1
> ; RUN: grep {r.data,} %t | count 1
> ; RUN: grep {\%hi} %t | count 2
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-07-16-SignExtInReg.ll Mon Oct
> 27 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
> +; RUN: llvm-as < %s | llc -march=mips -f -o %t
> ; RUN: grep seh %t | count 1
> ; RUN: grep seb %t | count 1
>
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-07-22-Cstpool.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-22-Cstpool.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-07-22-Cstpool.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-07-22-Cstpool.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
> +; RUN: llvm-as < %s | llc -march=mips -f -o %t
> ; RUN: grep {CPI\[01\]_\[01\]:} %t | count 2
> ; RUN: grep {rodata.cst4,"aM", at progbits} %t | count 1
> target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-
> i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-07-23-fpcmp.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-23-fpcmp.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-07-23-fpcmp.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-07-23-fpcmp.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
> +; RUN: llvm-as < %s | llc -march=mips -f -o %t
> ; RUN: grep {c\\..*\\.s} %t | count 3
> ; RUN: grep {bc1\[tf\]} %t | count 3
>
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-07-29-icmp.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-29-icmp.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-07-29-icmp.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-07-29-icmp.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,5 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
> -; RUN: grep {b\[ne\]\[eq\]} | count 1
> +; RUN: llvm-as < %s | llc -march=mips | grep {b\[ne\]\[eq\]} |
> count 1
>
> target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-
> i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
> target triple = "mipsallegrexel-psp-elf"
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-07-31-fcopysign.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-07-31-fcopysign.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-07-31-fcopysign.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-07-31-fcopysign.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
> +; RUN: llvm-as < %s | llc -march=mips -f -o %t
> ; RUN: grep abs.s %t | count 1
> ; RUN: grep neg.s %t | count 1
>
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-08-01-AsmInline.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-08-01-AsmInline.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-08-01-AsmInline.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-08-01-AsmInline.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
> +; RUN: llvm-as < %s | llc -march=mips -f -o %t
> ; RUN: grep mfhi %t | count 1
> ; RUN: grep mflo %t | count 1
> ; RUN: grep multu %t | count 1
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-08-03-fabs64.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-08-03-fabs64.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-08-03-fabs64.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-08-03-fabs64.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
> +; RUN: llvm-as < %s | llc -march=mips -f -o %t
> ; RUN: grep {lui.*32767} %t | count 1
> ; RUN: grep {ori.*65535} %t | count 1
>
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-08-04-Bitconvert.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-08-04-Bitconvert.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-08-04-Bitconvert.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-08-04-Bitconvert.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips -f -o %t
> +; RUN: llvm-as < %s | llc -march=mips -f -o %t
> ; RUN: grep mtc1 %t | count 1
> ; RUN: grep mfc1 %t | count 1
>
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-08-06-Alloca.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-08-06-Alloca.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-08-06-Alloca.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-08-06-Alloca.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,5 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
> -; RUN: grep {subu.*sp} | count 2
> +; RUN: llvm-as < %s | llc -march=mips | grep {subu.*sp} | count 2
>
> target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-
> i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
> target triple = "mipsallegrexel-psp-elf"
>
> Modified: llvm/trunk/test/CodeGen/Mips/2008-08-07-FPRound.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-08-07-FPRound.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/Mips/2008-08-07-FPRound.ll (original)
> +++ llvm/trunk/test/CodeGen/Mips/2008-08-07-FPRound.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,5 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=mips | \
> -; RUN: grep __truncdfsf2 | count 1
> +; RUN: llvm-as < %s | llc -march=mips | grep __truncdfsf2 | count 1
>
> target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-
> i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
> target triple = "mipsallegrexel-psp-elf"
>
> Modified: llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll (original)
> +++ llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll Mon Oct 27
> 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -enable-legalize-
> types
> +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
> ; PR2762
> define void @foo(<4 x i32>* %p, <4 x double>* %q) {
> %n = load <4 x i32>* %p
>
> Modified: llvm/trunk/test/CodeGen/X86/2008-10-24-FlippedCompare.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-10-24-FlippedCompare.ll?rev=58232&r1=58231&r2=58232&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/test/CodeGen/X86/2008-10-24-FlippedCompare.ll
> (original)
> +++ llvm/trunk/test/CodeGen/X86/2008-10-24-FlippedCompare.ll Mon Oct
> 27 03:42:46 2008
> @@ -1,4 +1,4 @@
> -; RUN: llvm-as < %s | llc -enable-legalize-types -march=x86 -mattr=
> +sse2 -o - | not grep {ucomiss\[^,\]*esp}
> +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o - | not grep
> {ucomiss\[^,\]*esp}
>
> define void @f(float %wt) {
> entry:
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From baldrick at free.fr Mon Oct 27 04:19:11 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 27 Oct 2008 10:19:11 +0100
Subject: [llvm-commits] [llvm] r58232 - in /llvm/trunk:
lib/CodeGen/SelectionDAG/ test/CodeGen/Generic/
test/CodeGen/Mips/ test/CodeGen/X86/
In-Reply-To: <68EAAD50-D1F3-4F48-A60D-97FE8C01111E@gmail.com>
References: <200810270842.m9R8gl1t004026@zion.cs.uiuc.edu>
<68EAAD50-D1F3-4F48-A60D-97FE8C01111E@gmail.com>
Message-ID: <200810271019.12570.baldrick@free.fr>
Hi Bill, this is kind of hard to read since it seems to be one long
line. Still, here goes.
> Here's the failures I get:
>
> Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/
> CodeGen/ARM/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/
> build/llvm.src/test/CodeGen/ARM/cse-libcalls.ll Failed with exit(1) at
> line 1 while running: llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-
> llvm/build/llvm.src/test/CodeGen/ARM/cse-libcalls.ll | llc -march=arm
> | /usr/bin/grep {bl.*__ltdf} | count 1 count: expected 1 lines and got
> 2. child process exited abnormally
This is a known failure, mentioned in my email. It is due to a bug
in UpdateNodeOperands exposed by LegalizeTypes and should be fixed shortly.
> Running /Volumes/Sandbox/
> Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/PowerPC/dg.exp ...
> FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/
> CodeGen/PowerPC/vec_spat.ll Failed with exit(1) at line 3 while
> running: grep vspltw vec_spat.ll.tmp | count 2 count: expected 2 lines
> and got 3. child process exited abnormally
This is also a known failure, also mentioned in my email. I'm still
discussing with Chris the best approach to fixing this.
I didn't spot any other failures in the list, so it looks like this
is as expected. Thanks for testing.
Ciao,
Duncan.
From isanbard at gmail.com Mon Oct 27 04:27:34 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 27 Oct 2008 09:27:34 -0000
Subject: [llvm-commits] [llvm] r58237 - /llvm/trunk/docs/ReleaseNotes.html
Message-ID: <200810270927.m9R9RYM6006175@zion.cs.uiuc.edu>
Author: void
Date: Mon Oct 27 04:27:33 2008
New Revision: 58237
URL: http://llvm.org/viewvc/llvm-project?rev=58237&view=rev
Log:
Some grammar fixes, and non-invasive format changes.
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=58237&r1=58236&r2=58237&view=diff
==============================================================================
--- llvm/trunk/docs/ReleaseNotes.html (original)
+++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 27 04:27:33 2008
@@ -98,28 +98,31 @@
yet production quality, it is progressing very nicely. In addition, C++
front-end work has started to make significant progress.
-Clang, in conjunction with the ccc driver, is now usable as a
-replacement for gcc for building some small- to medium-sized C applications.
+Clang, in conjunction with the ccc driver, is now usable as a
+replacement for gcc for building some small- to medium-sized C applications.
Additionally, Clang now has code generation support for Objective-C on Mac OS X
-platform. Major highlights include:
+platform. Major highlights include:
+
- Clang/ccc pass almost all of the LLVM test suite on Mac OS X and Linux
on the 32-bit x86 architecture. This includes significant C
applications such as sqlite3,
lua, and
-Clam AntiVirus.
+Clam AntiVirus.
- Clang can build the majority of Objective-C examples shipped with the
-Mac OS X Developer Tools.
+Mac OS X Developer Tools.
-Clang code generation still needs considerable testing and development, however.
-Some areas under active development include:
+Clang code generation still needs considerable testing and development,
+however. Some areas under active development include:
+
- - Improved support for C and Objective-C features, for example
- variable-length arrays, va_arg, exception handling (Obj-C), and garbage
- collection (Obj-C).
-
- ABI compatibility, especially for platforms other than 32-bit x86.
+
- Improved support for C and Objective-C features, for example
+ variable-length arrays, va_arg, exception handling (Obj-C), and garbage
+ collection (Obj-C).
+ - ABI compatibility, especially for platforms other than 32-bit
+ x86.
@@ -145,15 +148,14 @@
the tool. While still early in development, the GUI illustrates some of the key
features of Clang: accurate source location information, which is used by the
GUI to highlight specific code expressions that relate to a bug (including those
-that span multiple lines) and built-in knowledge of macros, which is used to
+that span multiple lines); and built-in knowledge of macros, which is used to
perform inline expansion of macros within the GUI itself.
The set of checks performed by the static analyzer is gradually expanding,
-and
-future plans for the tool include full source-level inter-procedural analysis
-and deeper checks such as buffer overrun detection. There are many opportunities
-to extend and enhance the static analyzer, and anyone interested in working on
-this project is encouraged to get involved!
+and future plans for the tool include full source-level inter-procedural
+analysis and deeper checks such as buffer overrun detection. There are many
+opportunities to extend and enhance the static analyzer, and anyone interested
+in working on this project is encouraged to get involved!
@@ -174,15 +176,15 @@
-- Support for generics in the .Net virtual machine.
-
- Initial support for the Mono class libraries.
+
- Support for generics in the .Net virtual machine.
+- Initial support for the Mono class libraries.
- Support for MacOSX/x86, following LLVM's support for exceptions in
-JIT on MacOSX/x86.
-
- A new vmkit driver: a program to run java or .net applications. The
-driver supports llvm command line arguments including the new "-fast" option.
+JIT on MacOSX/x86.
+- A new vmkit driver: a program to run java or .net applications. The driver
+supports llvm command line arguments including the new "-fast" option.
- A new memory allocation scheme in the JVM that makes unloading a
-class loader very fast.
-
- VMKit now follows the LLVM Makefile machinery.
+class loader very fast.
+- VMKit now follows the LLVM Makefile machinery.
@@ -196,7 +198,7 @@
-
This release includes a huge number of bug fixes, performance tweaks and
+
This release includes a huge number of bug fixes, performance tweaks, and
minor improvements. Some of the major improvements and new features are listed
in this section.
@@ -214,24 +216,24 @@
The most visible end-user change in LLVM 2.4 is that it includes many
optimizations and changes to make -O0 compile times much faster. You should see
-improvements on the order of 30% (or more) faster than LLVM 2.3. There are many
-pieces to this change, described in more detail below. The speedups and new
-components can also be used for JIT compilers that want fast compilation as
-well.
+improvements in speed on the order of 30% (or more) than in LLVM 2.3. There are
+many pieces to this change described in more detail below. The speedups and new
+components can also be used for JIT compilers that want fast
+compilation.
The biggest change to the LLVM IR is that Multiple Return Values (which
were introduced in LLVM 2.3) have been generalized to full support for "First
Class Aggregate" values in LLVM 2.4. This means that LLVM IR supports using
structs and arrays as values in a function. This capability is mostly useful
for front-end authors, who prefer to treat things like complex numbers, simple
-tuples, dope vectors, etc as Value*'s instead of as a tuple of Value*'s or as
+tuples, dope vectors, etc., as Value*'s instead of as a tuple of Value*'s or as
memory values. Bitcode files from LLVM 2.3 will automatically migrate to the
general representation.
LLVM 2.4 also includes an initial port for the PIC16 microprocessor. This
-is the LLVM target that only has support for 8 bit registers, and a number of
-other crazy constraints. While the port is still in early development stages,
-it shows some interesting things you can do with LLVM.
+target only has support for 8 bit registers, and a number of other crazy
+constraints. While the port is still in early development stages, it shows some
+interesting things you can do with LLVM.
@@ -251,20 +253,20 @@
- LLVM 2.4 supports the full set of atomic __sync_* builtins. LLVM
-2.3 only supported those used by OpenMP, but 2.4 supports them all. While
-llvm-gcc supports all of these builtins, note that not all targets do. X86
-support them all in both 32-bit and 64-bit mode and PowerPC supports them all
-except for the 64-bit operations when in 32-bit mode.
+2.3 only supported those used by OpenMP, but 2.4 supports them all. Note that
+while llvm-gcc supports all of these builtins, not all targets do. X86 support
+them all in both 32-bit and 64-bit mode and PowerPC supports them all except for
+the 64-bit operations when in 32-bit mode.
- llvm-gcc now supports an -flimited-precision option, which tells
-the compiler that it is ok to use low-precision approximations of certain libm
-functions (like tan, log, etc). This allows you to get high performance if you
-only need (say) 14-bits of precision.
+the compiler that it is okay to use low-precision approximations of certain libm
+functions (like exp, log, etc). This allows you to get high
+performance if you only need (say) 12-bits of precision.
- llvm-gcc now supports a C language extension known as "Blocks".
This feature is similar to nested functions and closures, but does not
-require stack trampolines (with most ABIs) and supports returning closures
+require stack trampolines (with most ABIs), and supports returning closures
from functions that define them. Note that actually using Blocks
requires a small runtime that is not included with llvm-gcc.
@@ -284,8 +286,7 @@
-
New features include:
-
+
New features include:
- A major change to the Use class landed, which shrank it by 25%. Since
@@ -298,14 +299,14 @@
- LLVM 2.4 includes some changes for better vector support. First, the shift
-operations (shl, ashr, lshr) now all support vectors
-and do an element-by-element shift (shifts of the whole vector can be
-accomplished by bitcasting the vector to <1 x i128> for example). Second,
-there is initial support in development for vector comparisons with the
-fcmp/icmp
+operations (shl, ashr, and lshr) now all support
+vectors and do an element-by-element shift (shifts of the whole vector can be
+accomplished by bitcasting the vector to <1 x i128>, for example). Second,
+there is initial support in development for vector comparisons with the
+fcmp/icmp
instructions. These instructions compare two vectors and return a vector of
-i1's for each result. Note that there is very little codegen support available
-for any of these IR features though.
+i1's for each result. Note that there is very little codegen support
+available for any of these IR features though.
- A new DebugInfoBuilder class is available, which makes it much
easier for front-ends to create debug info descriptors, similar to the way that
@@ -317,11 +318,11 @@
useful when learning how LLVM works. The TargetFolder class folds the most,
doing target dependent constant folding.
-- LLVM now supports "function attributes", which allows us to separate return
+
- LLVM now supports "function attributes", which allow us to separate return
value attributes from function attributes. LLVM now supports attributes on a
function itself, a return value, and its parameters. New supported function
-attributes include noinline/alwaysinline and the "opt-size" flag which says the
-function should be optimized for code size.
+attributes include noinline/alwaysinline and the opt-size flag,
+which says the function should be optimized for code size.
- LLVM IR now directly represents "common" linkage, instead of
representing it as a form of weak linkage.
From edwintorok at gmail.com Mon Oct 27 05:16:28 2008
From: edwintorok at gmail.com (Torok Edwin)
Date: Mon, 27 Oct 2008 10:16:28 -0000
Subject: [llvm-commits] [llvm] r58238 - in /llvm/trunk:
include/llvm/Transforms/Scalar.h lib/Transforms/Utils/InstructionNamer.cpp
Message-ID: <200810271016.m9RAGSxQ007835@zion.cs.uiuc.edu>
Author: edwin
Date: Mon Oct 27 05:16:27 2008
New Revision: 58238
URL: http://llvm.org/viewvc/llvm-project?rev=58238&view=rev
Log:
export an ID for the instructionNamer, allowing analysis/transformation passes
that need it to require it by ID.
Modified:
llvm/trunk/include/llvm/Transforms/Scalar.h
llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp
Modified: llvm/trunk/include/llvm/Transforms/Scalar.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Scalar.h?rev=58238&r1=58237&r2=58238&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Scalar.h (original)
+++ llvm/trunk/include/llvm/Transforms/Scalar.h Mon Oct 27 05:16:27 2008
@@ -329,6 +329,7 @@
// InstructionNamer - Give any unnamed non-void instructions "tmp" names.
//
FunctionPass *createInstructionNamerPass();
+extern const PassInfo *const InstructionNamerID;
} // End llvm namespace
Modified: llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp?rev=58238&r1=58237&r2=58238&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/InstructionNamer.cpp Mon Oct 27 05:16:27 2008
@@ -40,6 +40,7 @@
}
+const PassInfo *const llvm::InstructionNamerID = &X;
//===----------------------------------------------------------------------===//
//
// InstructionNamer - Give any unnamed non-void instructions "tmp" names.
From ggreif at gmail.com Mon Oct 27 05:17:24 2008
From: ggreif at gmail.com (Gabor Greif)
Date: Mon, 27 Oct 2008 10:17:24 -0000
Subject: [llvm-commits] [llvm] r58239 - /llvm/trunk/docs/ReleaseNotes.html
Message-ID: <200810271017.m9RAHOtX007876@zion.cs.uiuc.edu>
Author: ggreif
Date: Mon Oct 27 05:17:24 2008
New Revision: 58239
URL: http://llvm.org/viewvc/llvm-project?rev=58239&view=rev
Log:
formatting tweak for intrinsic
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=58239&r1=58238&r2=58239&view=diff
==============================================================================
--- llvm/trunk/docs/ReleaseNotes.html (original)
+++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 27 05:17:24 2008
@@ -446,7 +446,7 @@
- Exception handling is supported by default on Linux/x86-64.
- Position Independent Code (PIC) is now supported on Linux/x86-64.
-- @llvm.frameaddress now supports getting the frame address of stack frames
+
- @llvm.frameaddress now supports getting the frame address of stack frames
> 0 on x86/x86-64.
- MIPS has improved a lot since last release, the most important changes
are: Little endian support, floating point support, allegrex core and
From edwintorok at gmail.com Mon Oct 27 05:18:45 2008
From: edwintorok at gmail.com (Torok Edwin)
Date: Mon, 27 Oct 2008 10:18:45 -0000
Subject: [llvm-commits] [llvm] r58240 - /llvm/trunk/lib/Analysis/LoopVR.cpp
Message-ID: <200810271018.m9RAIjfb007922@zion.cs.uiuc.edu>
Author: edwin
Date: Mon Oct 27 05:18:45 2008
New Revision: 58240
URL: http://llvm.org/viewvc/llvm-project?rev=58240&view=rev
Log:
Avoid crashing if instruction is not part of a loop.
If it is not part of a loop it is obviously invariant wrt to all loops.
Modified:
llvm/trunk/lib/Analysis/LoopVR.cpp
Modified: llvm/trunk/lib/Analysis/LoopVR.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopVR.cpp?rev=58240&r1=58239&r2=58240&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopVR.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopVR.cpp Mon Oct 27 05:18:45 2008
@@ -247,12 +247,13 @@
return ConstantRange(cast(V->getType())->getBitWidth(), false);
LoopInfo &LI = getAnalysis();
- ScalarEvolution &SE = getAnalysis();
Loop *L = LI.getLoopFor(I->getParent());
- if (L->isLoopInvariant(I))
+ if (!L || L->isLoopInvariant(I))
return ConstantRange(cast(V->getType())->getBitWidth(), false);
+ ScalarEvolution &SE = getAnalysis();
+
SCEVHandle S = SE.getSCEV(I);
if (isa(S) || isa(S))
return ConstantRange(cast(V->getType())->getBitWidth(), false);
From edwintorok at gmail.com Mon Oct 27 06:15:49 2008
From: edwintorok at gmail.com (=?ISO-8859-1?Q?T=F6r=F6k_Edwin?=)
Date: Mon, 27 Oct 2008 13:15:49 +0200
Subject: [llvm-commits] [llvm] r58238 - in /llvm/trunk:
include/llvm/Transforms/Scalar.h lib/Transforms/Utils/InstructionNamer.cpp
In-Reply-To: <200810271016.m9RAGSxQ007835@zion.cs.uiuc.edu>
References: <200810271016.m9RAGSxQ007835@zion.cs.uiuc.edu>
Message-ID: <4905A2E5.5040601@gmail.com>
On 2008-10-27 12:16, Torok Edwin wrote:
> Author: edwin
> Date: Mon Oct 27 05:16:27 2008
> New Revision: 58238
>
> URL: http://llvm.org/viewvc/llvm-project?rev=58238&view=rev
> Log:
> export an ID for the instructionNamer, allowing analysis/transformation passes
> that need it to require it by ID.
>
I think that this change and the one in 58240 is straight forward
enough, so
I didn't request approval prior to committing.
Best regards,
--Edwin
From baldrick at free.fr Mon Oct 27 08:18:32 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 27 Oct 2008 13:18:32 -0000
Subject: [llvm-commits] [llvm] r58246 -
/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
Message-ID: <200810271318.m9RDIWEj014127@zion.cs.uiuc.edu>
Author: baldrick
Date: Mon Oct 27 08:18:32 2008
New Revision: 58246
URL: http://llvm.org/viewvc/llvm-project?rev=58246&view=rev
Log:
Fix a bug in which a node could be added to the
worklist twice: UpdateNodeOperands could morph
a new node into a node already on the worklist.
We would then recalculate the NodeId for this
existing node and add it to the worklist. The
testcase is ARM/cse-libcalls.ll, the problem
showing up once UpdateNodeOperands is taught to
do CSE for calls.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp?rev=58246&r1=58245&r2=58246&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp Mon Oct 27 08:18:32 2008
@@ -272,9 +272,14 @@
&NewOps[0],
NewOps.size()).getNode();
- N->setNodeId(N->getNumOperands()-NumProcessed);
- if (N->getNodeId() == ReadyToProcess)
- Worklist.push_back(N);
+ // Calculate the NodeId if we haven't morphed into an existing node for
+ // which it is already known.
+ if (N->getNodeId() == NewNode) {
+ N->setNodeId(N->getNumOperands()-NumProcessed);
+ if (N->getNodeId() == ReadyToProcess)
+ Worklist.push_back(N);
+ }
+
return N;
}
From baldrick at free.fr Mon Oct 27 10:30:55 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 27 Oct 2008 15:30:55 -0000
Subject: [llvm-commits] [llvm] r58249 -
/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Message-ID: <200810271530.m9RFUt2P018901@zion.cs.uiuc.edu>
Author: baldrick
Date: Mon Oct 27 10:30:53 2008
New Revision: 58249
URL: http://llvm.org/viewvc/llvm-project?rev=58249&view=rev
Log:
Fix UpdateNodeOperands so that it does CSE of calls
(and a bunch of other node types). While there, I
added a doNotCSE predicate and used it to reduce code
duplication (some of the duplicated code was wrong...).
This fixes ARM/cse-libcalls.ll when using LegalizeTypes.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=58249&r1=58248&r2=58249&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Oct 27 10:30:53 2008
@@ -354,17 +354,9 @@
AddNodeIDOperands(ID, OpList, N);
}
-
-/// AddNodeIDNode - Generic routine for adding a nodes info to the NodeID
-/// data.
-static void AddNodeIDNode(FoldingSetNodeID &ID, const SDNode *N) {
- AddNodeIDOpcode(ID, N->getOpcode());
- // Add the return value info.
- AddNodeIDValueTypes(ID, N->getVTList());
- // Add the operand info.
- AddNodeIDOperands(ID, N->op_begin(), N->getNumOperands());
-
- // Handle SDNode leafs with special info.
+/// AddNodeIDCustom - If this is an SDNode with special info, add this info to
+/// the NodeID data.
+static void AddNodeIDCustom(FoldingSetNodeID &ID, const SDNode *N) {
switch (N->getOpcode()) {
default: break; // Normal nodes don't need extra info.
case ISD::ARG_FLAGS:
@@ -505,6 +497,19 @@
} // end switch (N->getOpcode())
}
+/// AddNodeIDNode - Generic routine for adding a nodes info to the NodeID
+/// data.
+static void AddNodeIDNode(FoldingSetNodeID &ID, const SDNode *N) {
+ AddNodeIDOpcode(ID, N->getOpcode());
+ // Add the return value info.
+ AddNodeIDValueTypes(ID, N->getVTList());
+ // Add the operand info.
+ AddNodeIDOperands(ID, N->op_begin(), N->getNumOperands());
+
+ // Handle SDNode leafs with special info.
+ AddNodeIDCustom(ID, N);
+}
+
/// encodeMemSDNodeFlags - Generic routine for computing a value for use in
/// the CSE map that carries both alignment and volatility information.
///
@@ -517,6 +522,29 @@
// SelectionDAG Class
//===----------------------------------------------------------------------===//
+/// doNotCSE - Return true if CSE should not be performed for this node.
+static bool doNotCSE(SDNode *N) {
+ if (N->getValueType(0) == MVT::Flag)
+ return true; // Never CSE anything that produces a flag.
+
+ switch (N->getOpcode()) {
+ default: break;
+ case ISD::HANDLENODE:
+ case ISD::DBG_LABEL:
+ case ISD::DBG_STOPPOINT:
+ case ISD::EH_LABEL:
+ case ISD::DECLARE:
+ return true; // Never CSE these nodes.
+ }
+
+ // Check that remaining values produced are not flags.
+ for (unsigned i = 1, e = N->getNumValues(); i != e; ++i)
+ if (N->getValueType(i) == MVT::Flag)
+ return true; // Never CSE anything that produces a flag.
+
+ return false;
+}
+
/// RemoveDeadNodes - This method deletes all unreachable nodes in the
/// SelectionDAG.
void SelectionDAG::RemoveDeadNodes() {
@@ -650,11 +678,7 @@
// flag result (which cannot be CSE'd) or is one of the special cases that are
// not subject to CSE.
if (!Erased && N->getValueType(N->getNumValues()-1) != MVT::Flag &&
- !N->isMachineOpcode() &&
- N->getOpcode() != ISD::DBG_LABEL &&
- N->getOpcode() != ISD::DBG_STOPPOINT &&
- N->getOpcode() != ISD::EH_LABEL &&
- N->getOpcode() != ISD::DECLARE) {
+ !N->isMachineOpcode() && !doNotCSE(N)) {
N->dump(this);
cerr << "\n";
assert(0 && "Node is not in map!");
@@ -671,24 +695,9 @@
SDNode *SelectionDAG::AddNonLeafNodeToCSEMaps(SDNode *N) {
assert(N->getNumOperands() && "This is a leaf node!");
- if (N->getValueType(0) == MVT::Flag)
- return 0; // Never CSE anything that produces a flag.
+ if (doNotCSE(N))
+ return 0;
- switch (N->getOpcode()) {
- default: break;
- case ISD::HANDLENODE:
- case ISD::DBG_LABEL:
- case ISD::DBG_STOPPOINT:
- case ISD::EH_LABEL:
- case ISD::DECLARE:
- return 0; // Never add these nodes.
- }
-
- // Check that remaining values produced are not flags.
- for (unsigned i = 1, e = N->getNumValues(); i != e; ++i)
- if (N->getValueType(i) == MVT::Flag)
- return 0; // Never CSE anything that produces a flag.
-
SDNode *New = CSEMap.GetOrInsertNode(N);
if (New != N) return New; // Node already existed.
return 0;
@@ -700,26 +709,13 @@
/// node already exists with these operands, the slot will be non-null.
SDNode *SelectionDAG::FindModifiedNodeSlot(SDNode *N, SDValue Op,
void *&InsertPos) {
- if (N->getValueType(0) == MVT::Flag)
- return 0; // Never CSE anything that produces a flag.
+ if (doNotCSE(N))
+ return 0;
- switch (N->getOpcode()) {
- default: break;
- case ISD::HANDLENODE:
- case ISD::DBG_LABEL:
- case ISD::DBG_STOPPOINT:
- case ISD::EH_LABEL:
- return 0; // Never add these nodes.
- }
-
- // Check that remaining values produced are not flags.
- for (unsigned i = 1, e = N->getNumValues(); i != e; ++i)
- if (N->getValueType(i) == MVT::Flag)
- return 0; // Never CSE anything that produces a flag.
-
SDValue Ops[] = { Op };
FoldingSetNodeID ID;
AddNodeIDNode(ID, N->getOpcode(), N->getVTList(), Ops, 1);
+ AddNodeIDCustom(ID, N);
return CSEMap.FindNodeOrInsertPos(ID, InsertPos);
}
@@ -730,16 +726,13 @@
SDNode *SelectionDAG::FindModifiedNodeSlot(SDNode *N,
SDValue Op1, SDValue Op2,
void *&InsertPos) {
- if (N->getOpcode() == ISD::HANDLENODE || N->getValueType(0) == MVT::Flag)
-
- // Check that remaining values produced are not flags.
- for (unsigned i = 1, e = N->getNumValues(); i != e; ++i)
- if (N->getValueType(i) == MVT::Flag)
- return 0; // Never CSE anything that produces a flag.
-
+ if (doNotCSE(N))
+ return 0;
+
SDValue Ops[] = { Op1, Op2 };
FoldingSetNodeID ID;
AddNodeIDNode(ID, N->getOpcode(), N->getVTList(), Ops, 2);
+ AddNodeIDCustom(ID, N);
return CSEMap.FindNodeOrInsertPos(ID, InsertPos);
}
@@ -751,39 +744,12 @@
SDNode *SelectionDAG::FindModifiedNodeSlot(SDNode *N,
const SDValue *Ops,unsigned NumOps,
void *&InsertPos) {
- if (N->getValueType(0) == MVT::Flag)
- return 0; // Never CSE anything that produces a flag.
+ if (doNotCSE(N))
+ return 0;
- switch (N->getOpcode()) {
- default: break;
- case ISD::HANDLENODE:
- case ISD::DBG_LABEL:
- case ISD::DBG_STOPPOINT:
- case ISD::EH_LABEL:
- case ISD::DECLARE:
- return 0; // Never add these nodes.
- }
-
- // Check that remaining values produced are not flags.
- for (unsigned i = 1, e = N->getNumValues(); i != e; ++i)
- if (N->getValueType(i) == MVT::Flag)
- return 0; // Never CSE anything that produces a flag.
-
FoldingSetNodeID ID;
AddNodeIDNode(ID, N->getOpcode(), N->getVTList(), Ops, NumOps);
-
- if (const LoadSDNode *LD = dyn_cast(N)) {
- ID.AddInteger(LD->getAddressingMode());
- ID.AddInteger(LD->getExtensionType());
- ID.AddInteger(LD->getMemoryVT().getRawBits());
- ID.AddInteger(LD->getRawFlags());
- } else if (const StoreSDNode *ST = dyn_cast(N)) {
- ID.AddInteger(ST->getAddressingMode());
- ID.AddInteger(ST->isTruncatingStore());
- ID.AddInteger(ST->getMemoryVT().getRawBits());
- ID.AddInteger(ST->getRawFlags());
- }
-
+ AddNodeIDCustom(ID, N);
return CSEMap.FindNodeOrInsertPos(ID, InsertPos);
}
From gohman at apple.com Mon Oct 27 10:51:33 2008
From: gohman at apple.com (Dan Gohman)
Date: Mon, 27 Oct 2008 08:51:33 -0700 (PDT)
Subject: [llvm-commits] [llvm] r58185 -
/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
In-Reply-To: <200810261540.m9QFekk6009665@zion.cs.uiuc.edu>
References: <200810261540.m9QFekk6009665@zion.cs.uiuc.edu>
Message-ID: <7569311f0c3599a61cad9fedaab7eddc.squirrel@webmail.apple.com>
On Sun, October 26, 2008 8:40 am, Cedric Venet wrote:
> @@ -45,6 +45,9 @@
> /// an operand, specified with syntax like ${opname:modifier}.
> std::string MiModifier;
>
> + // To make VS STL happy
> + AsmWriterOperand():OperandType(isLiteralTextOperand) {}
> +
> AsmWriterOperand(const std::string &LitStr)
> : OperandType(isLiteralTextOperand), Str(LitStr) {}
Please don't use tabs.
Thanks,
Dan
From matthijs at stdin.nl Mon Oct 27 10:59:49 2008
From: matthijs at stdin.nl (Matthijs Kooijman)
Date: Mon, 27 Oct 2008 15:59:49 -0000
Subject: [llvm-commits] [llvm] r58250 -
/llvm/trunk/utils/TableGen/CodeGenInstruction.cpp
Message-ID: <200810271559.m9RFxoNS019988@zion.cs.uiuc.edu>
Author: matthijs
Date: Mon Oct 27 10:59:43 2008
New Revision: 58250
URL: http://llvm.org/viewvc/llvm-project?rev=58250&view=rev
Log:
Remove redundant word in tblgen error message.
Modified:
llvm/trunk/utils/TableGen/CodeGenInstruction.cpp
Modified: llvm/trunk/utils/TableGen/CodeGenInstruction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenInstruction.cpp?rev=58250&r1=58249&r2=58250&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenInstruction.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenInstruction.cpp Mon Oct 27 10:59:43 2008
@@ -166,7 +166,7 @@
} else if (!Rec->isSubClassOf("RegisterClass") &&
Rec->getName() != "ptr_rc" && Rec->getName() != "unknown")
throw "Unknown operand class '" + Rec->getName() +
- "' in instruction '" + R->getName() + "' instruction!";
+ "' in '" + R->getName() + "' instruction!";
// Check that the operand has a name and that it's unique.
if (DI->getArgName(i).empty())
From cedric.venet at laposte.net Mon Oct 27 11:06:55 2008
From: cedric.venet at laposte.net (=?ISO-8859-1?Q?C=E9dric_Venet?=)
Date: Mon, 27 Oct 2008 17:06:55 +0100
Subject: [llvm-commits] [llvm] r58185 -
/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
In-Reply-To: <7569311f0c3599a61cad9fedaab7eddc.squirrel@webmail.apple.com>
References: <200810261540.m9QFekk6009665@zion.cs.uiuc.edu>
<7569311f0c3599a61cad9fedaab7eddc.squirrel@webmail.apple.com>
Message-ID: <4905E71F.9080708@laposte.net>
Dan Gohman a ?crit :
> On Sun, October 26, 2008 8:40 am, Cedric Venet wrote:
>> @@ -45,6 +45,9 @@
>> /// an operand, specified with syntax like ${opname:modifier}.
>> std::string MiModifier;
>>
>> + // To make VS STL happy
>> + AsmWriterOperand():OperandType(isLiteralTextOperand) {}
>> +
>> AsmWriterOperand(const std::string &LitStr)
>> : OperandType(isLiteralTextOperand), Str(LitStr) {}
>
> Please don't use tabs.
>
> Thanks,
>
> Dan
Sorry, I just reinstalled my IDE and forgot to change my tabs settings.
Should I change this to space?
regards,
C?dric
From gohman at apple.com Mon Oct 27 12:37:04 2008
From: gohman at apple.com (Dan Gohman)
Date: Mon, 27 Oct 2008 10:37:04 -0700
Subject: [llvm-commits] [llvm] r58185 -
/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
In-Reply-To: <4905E71F.9080708@laposte.net>
References: <200810261540.m9QFekk6009665@zion.cs.uiuc.edu>
<7569311f0c3599a61cad9fedaab7eddc.squirrel@webmail.apple.com>
<4905E71F.9080708@laposte.net>
Message-ID: <198C81DB-37A8-4A53-89A5-9B166F14686B@apple.com>
On Oct 27, 2008, at 9:06 AM, C?dric Venet wrote:
> Dan Gohman a ?crit :
>> On Sun, October 26, 2008 8:40 am, Cedric Venet wrote:
>>> @@ -45,6 +45,9 @@
>>> /// an operand, specified with syntax like ${opname:modifier}.
>>> std::string MiModifier;
>>>
>>> + // To make VS STL happy
>>> + AsmWriterOperand():OperandType(isLiteralTextOperand) {}
>>> +
>>> AsmWriterOperand(const std::string &LitStr)
>>> : OperandType(isLiteralTextOperand), Str(LitStr) {}
>>
>> Please don't use tabs.
>>
>> Thanks,
>>
>> Dan
>
> Sorry, I just reinstalled my IDE and forgot to change my tabs
> settings.
> Should I change this to space?
Yes, thanks.
Dan
From greened at obbligato.org Mon Oct 27 12:39:00 2008
From: greened at obbligato.org (David Greene)
Date: Mon, 27 Oct 2008 17:39:00 -0000
Subject: [llvm-commits] [llvm] r58255 -
/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
Message-ID: <200810271739.m9RHd0op024272@zion.cs.uiuc.edu>
Author: greened
Date: Mon Oct 27 12:38:59 2008
New Revision: 58255
URL: http://llvm.org/viewvc/llvm-project?rev=58255&view=rev
Log:
Fix PR2634. Create new virtual registers from spills early so that we
can give it the same stack slot as the spilled interval if it is folded.
This prevents the fold/unfold code from pointing to the wrong register.
Modified:
llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=58255&r1=58254&r2=58255&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Mon Oct 27 12:38:59 2008
@@ -1231,6 +1231,17 @@
if (!TrySplit)
SSWeight += Weight;
+ // Create a new virtual register for the spill interval.
+ // Create the new register now so we can map the fold instruction
+ // to the new register so when it is unfolded we get the correct
+ // answer.
+ bool CreatedNewVReg = false;
+ if (NewVReg == 0) {
+ NewVReg = mri_->createVirtualRegister(rc);
+ vrm.grow();
+ CreatedNewVReg = true;
+ }
+
if (!TryFold)
CanFold = false;
else {
@@ -1238,9 +1249,16 @@
// optimal point to insert a load / store later.
if (!TrySplit) {
if (tryFoldMemoryOperand(MI, vrm, ReMatDefMI, index,
- Ops, FoldSS, FoldSlot, Reg)) {
+ Ops, FoldSS, FoldSlot, NewVReg)) {
// Folding the load/store can completely change the instruction in
// unpredictable ways, rescan it from the beginning.
+
+ if (FoldSS) {
+ // We need to give the new vreg the same stack slot as the
+ // spilled interval.
+ vrm.assignVirt2StackSlot(NewVReg, FoldSlot);
+ }
+
HasUse = false;
HasDef = false;
CanFold = false;
@@ -1256,13 +1274,6 @@
}
}
- // Create a new virtual register for the spill interval.
- bool CreatedNewVReg = false;
- if (NewVReg == 0) {
- NewVReg = mri_->createVirtualRegister(rc);
- vrm.grow();
- CreatedNewVReg = true;
- }
mop.setReg(NewVReg);
if (mop.isImplicit())
rewriteImplicitOps(li, MI, NewVReg, vrm);
From isanbard at gmail.com Mon Oct 27 12:50:37 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 27 Oct 2008 10:50:37 -0700
Subject: [llvm-commits] [llvm] r58232 - in /llvm/trunk:
lib/CodeGen/SelectionDAG/ test/CodeGen/Generic/
test/CodeGen/Mips/ test/CodeGen/X86/
In-Reply-To: <200810271019.12570.baldrick@free.fr>
References: <200810270842.m9R8gl1t004026@zion.cs.uiuc.edu>
<68EAAD50-D1F3-4F48-A60D-97FE8C01111E@gmail.com>
<200810271019.12570.baldrick@free.fr>
Message-ID: <16e5fdf90810271050v24cf0108r3aa0bc68577e3817@mail.gmail.com>
On Mon, Oct 27, 2008 at 2:19 AM, Duncan Sands wrote:
> Hi Bill, this is kind of hard to read since it seems to be one long
> line. Still, here goes.
>
>> Here's the failures I get:
>>
>> Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/
>> CodeGen/ARM/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/
>> build/llvm.src/test/CodeGen/ARM/cse-libcalls.ll Failed with exit(1) at
>> line 1 while running: llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-
>> llvm/build/llvm.src/test/CodeGen/ARM/cse-libcalls.ll | llc -march=arm
>> | /usr/bin/grep {bl.*__ltdf} | count 1 count: expected 1 lines and got
>> 2. child process exited abnormally
>
> This is a known failure, mentioned in my email. It is due to a bug
> in UpdateNodeOperands exposed by LegalizeTypes and should be fixed shortly.
>
>> Running /Volumes/Sandbox/
>> Buildbot/llvm/full-llvm/build/llvm.src/test/CodeGen/PowerPC/dg.exp ...
>> FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/
>> CodeGen/PowerPC/vec_spat.ll Failed with exit(1) at line 3 while
>> running: grep vspltw vec_spat.ll.tmp | count 2 count: expected 2 lines
>> and got 3. child process exited abnormally
>
> This is also a known failure, also mentioned in my email. I'm still
> discussing with Chris the best approach to fixing this.
>
> I didn't spot any other failures in the list, so it looks like this
> is as expected. Thanks for testing.
>
If you're working on a fix, could you XFAIL this for now?
Thanks!
-bw
From baldrick at free.fr Mon Oct 27 13:00:32 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 27 Oct 2008 19:00:32 +0100
Subject: [llvm-commits] [llvm] r58232 - in /llvm/trunk:
lib/CodeGen/SelectionDAG/ test/CodeGen/Generic/
test/CodeGen/Mips/ test/CodeGen/X86/
In-Reply-To: <16e5fdf90810271050v24cf0108r3aa0bc68577e3817@mail.gmail.com>
References: <200810270842.m9R8gl1t004026@zion.cs.uiuc.edu>
<200810271019.12570.baldrick@free.fr>
<16e5fdf90810271050v24cf0108r3aa0bc68577e3817@mail.gmail.com>
Message-ID: <200810271900.33073.baldrick@free.fr>
Hi Bill,
> If you're working on a fix, could you XFAIL this for now?
the cse-libcalls is fixed. I will xfail the vec_splat one tomorrow.
The reason for not doing that now is that as nightly tester results
come in I can see if they have LegalizeTypes turned on or not by
looking at whether vec_spat.ll fails! I hope this is acceptable.
Ciao,
Duncan.
From clattner at apple.com Mon Oct 27 13:14:38 2008
From: clattner at apple.com (Chris Lattner)
Date: Mon, 27 Oct 2008 11:14:38 -0700
Subject: [llvm-commits] [llvm] r58230 - in /llvm/trunk:
include/llvm/Target/TargetInstrInfo.h
lib/CodeGen/PreAllocSplitting.cpp
lib/Target/X86/X86InstrInfo.cpp lib/Target/X86/X86InstrInfo.h
lib/Target/X86/X86RegisterInfo.h test/CodeGen/X86/pre-split7.ll
In-Reply-To: <200810270714.m9R7EpwT024528@zion.cs.uiuc.edu>
References: <200810270714.m9R7EpwT024528@zion.cs.uiuc.edu>
Message-ID: <2FE23620-131F-49FB-935F-530AB43C95BE@apple.com>
On Oct 27, 2008, at 12:14 AM, Evan Cheng wrote:
> Author: evancheng
> Date: Mon Oct 27 02:14:50 2008
> New Revision: 58230
>
> URL: http://llvm.org/viewvc/llvm-project?rev=58230&view=rev
> Log:
> For now, don't split live intervals around x87 stack register
> barriers. FpGET_ST0_80 must be right after a call instruction (and
> ADJCALLSTACKUP) so we need to find a way to prevent reload of x87
> registers between them.
Eww... This seems exactly like the "copy instruction that clobbers
flags" problem,
-Chris
From greened at obbligato.org Mon Oct 27 13:15:25 2008
From: greened at obbligato.org (David Greene)
Date: Mon, 27 Oct 2008 18:15:25 -0000
Subject: [llvm-commits] [llvm] r58256 -
/llvm/trunk/include/llvm/ADT/DenseMap.h
Message-ID: <200810271815.m9RIFPSx025538@zion.cs.uiuc.edu>
Author: greened
Date: Mon Oct 27 13:15:15 2008
New Revision: 58256
URL: http://llvm.org/viewvc/llvm-project?rev=58256&view=rev
Log:
Add STL-style typedefs and default constructors to make it possible to
use DenseMap in more contexts.
Modified:
llvm/trunk/include/llvm/ADT/DenseMap.h
Modified: llvm/trunk/include/llvm/ADT/DenseMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseMap.h?rev=58256&r1=58255&r2=58256&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/DenseMap.h (original)
+++ llvm/trunk/include/llvm/ADT/DenseMap.h Mon Oct 27 13:15:15 2008
@@ -105,6 +105,8 @@
unsigned NumEntries;
unsigned NumTombstones;
public:
+ typedef KeyT key_type;
+ typedef ValueT mapped_type;
typedef BucketT value_type;
DenseMap(const DenseMap& other) {
@@ -452,6 +454,8 @@
protected:
const BucketT *Ptr, *End;
public:
+ DenseMapIterator(void) : Ptr(0), End(0) {}
+
DenseMapIterator(const BucketT *Pos, const BucketT *E) : Ptr(Pos), End(E) {
AdvancePastEmptyBuckets();
}
@@ -494,6 +498,7 @@
template
class DenseMapConstIterator : public DenseMapIterator {
public:
+ DenseMapConstIterator(void) : DenseMapIterator() {}
DenseMapConstIterator(const std::pair *Pos,
const std::pair *E)
: DenseMapIterator(Pos, E) {
From greened at obbligato.org Mon Oct 27 13:17:03 2008
From: greened at obbligato.org (David Greene)
Date: Mon, 27 Oct 2008 18:17:03 -0000
Subject: [llvm-commits] [llvm] r58257 - in /llvm/trunk:
include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
Message-ID: <200810271817.m9RIH4tA025597@zion.cs.uiuc.edu>
Author: greened
Date: Mon Oct 27 13:17:03 2008
New Revision: 58257
URL: http://llvm.org/viewvc/llvm-project?rev=58257&view=rev
Log:
Add setSubgraphColor to color an entire portion of a SelectionDAG. This
will be used to support debug features in TableGen.
Modified:
llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=58257&r1=58256&r2=58257&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Mon Oct 27 13:17:03 2008
@@ -16,6 +16,7 @@
#define LLVM_CODEGEN_SELECTIONDAG_H
#include "llvm/ADT/ilist.h"
+#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/CodeGen/SelectionDAGNodes.h"
@@ -102,6 +103,12 @@
/// VerifyNode - Sanity check the given node. Aborts if it is invalid.
void VerifyNode(SDNode *N);
+ /// setGraphColorHelper - Implementation of setSubgraphColor.
+ /// Return whether we had to truncate the search.
+ ///
+ bool setSubgraphColorHelper(SDNode *N, const char *Color, DenseSet &visited,
+ int level, bool &printed);
+
public:
SelectionDAG(TargetLowering &tli, FunctionLoweringInfo &fli);
~SelectionDAG();
@@ -147,6 +154,10 @@
///
void setGraphColor(const SDNode *N, const char *Color);
+ /// setGraphColor - Convenience for setting subgraph color attribute.
+ ///
+ void setSubgraphColor(SDNode *N, const char *Color);
+
typedef ilist::const_iterator allnodes_const_iterator;
allnodes_const_iterator allnodes_begin() const { return AllNodes.begin(); }
allnodes_const_iterator allnodes_end() const { return AllNodes.end(); }
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp?rev=58257&r1=58256&r2=58257&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp Mon Oct 27 13:17:03 2008
@@ -22,8 +22,10 @@
#include "llvm/CodeGen/PseudoSourceValue.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetMachine.h"
+#include "llvm/Support/Debug.h"
#include "llvm/Support/GraphWriter.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Config/config.h"
#include
@@ -326,6 +328,61 @@
#endif
}
+/// setSubgraphColorHelper - Implement setSubgraphColor. Return
+/// whether we truncated the search.
+///
+bool SelectionDAG::setSubgraphColorHelper(SDNode *N, const char *Color, DenseSet &visited,
+ int level, bool &printed) {
+ bool hit_limit = false;
+
+#ifndef NDEBUG
+ if (level >= 20) {
+ if (!printed) {
+ printed = true;
+ DOUT << "setSubgraphColor hit max level\n";
+ }
+ return true;
+ }
+
+ unsigned oldSize = visited.size();
+ visited.insert(N);
+ if (visited.size() != oldSize) {
+ setGraphColor(N, Color);
+ for(SDNodeIterator i = SDNodeIterator::begin(N), iend = SDNodeIterator::end(N);
+ i != iend;
+ ++i) {
+ hit_limit = setSubgraphColorHelper(*i, Color, visited, level+1, printed) || hit_limit;
+ }
+ }
+#else
+ cerr << "SelectionDAG::setSubgraphColor is only available in debug builds"
+ << " on systems with Graphviz or gv!\n";
+#endif
+ return hit_limit;
+}
+
+/// setSubgraphColor - Convenience for setting subgraph color attribute.
+///
+void SelectionDAG::setSubgraphColor(SDNode *N, const char *Color) {
+#ifndef NDEBUG
+ DenseSet visited;
+ bool printed = false;
+ if (setSubgraphColorHelper(N, Color, visited, 0, printed)) {
+ // Visually mark that we hit the limit
+ if (Color == "red" ) {
+ setSubgraphColorHelper(N, "blue", visited, 0, printed);
+ }
+ else if (Color == "yellow" ) {
+ setSubgraphColorHelper(N, "green", visited, 0, printed);
+ }
+ }
+
+#else
+ cerr << "SelectionDAG::setSubgraphColor is only available in debug builds"
+ << " on systems with Graphviz or gv!\n";
+#endif
+}
+
namespace llvm {
template<>
struct DOTGraphTraits : public DefaultDOTGraphTraits {
From evan.cheng at apple.com Mon Oct 27 13:24:03 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Mon, 27 Oct 2008 18:24:03 -0000
Subject: [llvm-commits] [test-suite] r58258 -
/test-suite/trunk/MultiSource/Benchmarks/BitBench/drop3/drop3.c
Message-ID: <200810271824.m9RIO3Lu025883@zion.cs.uiuc.edu>
Author: evancheng
Date: Mon Oct 27 13:24:02 2008
New Revision: 58258
URL: http://llvm.org/viewvc/llvm-project?rev=58258&view=rev
Log:
Don't assume file name is shorter than 100 characters.
Modified:
test-suite/trunk/MultiSource/Benchmarks/BitBench/drop3/drop3.c
Modified: test-suite/trunk/MultiSource/Benchmarks/BitBench/drop3/drop3.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/BitBench/drop3/drop3.c?rev=58258&r1=58257&r2=58258&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/BitBench/drop3/drop3.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/BitBench/drop3/drop3.c Mon Oct 27 13:24:02 2008
@@ -62,7 +62,7 @@
size_t size;
int outsize,time;
unsigned char *inbuf, *outbuf, *temp;
- char outfilename[100];
+ char *outfilename;
char postfix[] = ".c";
struct timeval pre,post;
@@ -77,12 +77,15 @@
perror(argv[1]);
exit(1);
}
+ outfilename = malloc(strlen(argv[1]) + strlen(postfix) + 1);
strcpy(outfilename,argv[1]);
strcat(outfilename,postfix);
if ((out = fopen(outfilename, "w")) == NULL) {
perror(outfilename);
+ free(outfilename);
exit(1);
}
+ free(outfilename);
argv++; argc--;
}
else
From evan.cheng at apple.com Mon Oct 27 13:26:07 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Mon, 27 Oct 2008 18:26:07 -0000
Subject: [llvm-commits] [test-suite] r58259 -
/test-suite/trunk/MultiSource/Benchmarks/BitBench/uuencode/uuencode.c
Message-ID: <200810271826.m9RIQ7gw025981@zion.cs.uiuc.edu>
Author: evancheng
Date: Mon Oct 27 13:26:06 2008
New Revision: 58259
URL: http://llvm.org/viewvc/llvm-project?rev=58259&view=rev
Log:
Fix test.
Modified:
test-suite/trunk/MultiSource/Benchmarks/BitBench/uuencode/uuencode.c
Modified: test-suite/trunk/MultiSource/Benchmarks/BitBench/uuencode/uuencode.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/BitBench/uuencode/uuencode.c?rev=58259&r1=58258&r2=58259&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/BitBench/uuencode/uuencode.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/BitBench/uuencode/uuencode.c Mon Oct 27 13:26:06 2008
@@ -155,8 +155,6 @@
size_t size;
int outsize,time;
unsigned char *inbuf, *outbuf, *temp;
- char outfilename[100];
- char postfix[] = ".c";
struct timeval pre,post;
/* optional input arg */
@@ -169,8 +167,6 @@
perror(argv[1]);
exit(1);
}
- strcpy(outfilename,argv[1]);
- strcat(outfilename,postfix);
argc--;
}
From sabre at nondot.org Mon Oct 27 13:28:25 2008
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 27 Oct 2008 18:28:25 -0000
Subject: [llvm-commits] [llvm] r58260 - in /llvm/trunk/test/CodeGen/PowerPC:
vec_spat.ll vec_splat.ll
Message-ID: <200810271828.m9RISP9a026084@zion.cs.uiuc.edu>
Author: lattner
Date: Mon Oct 27 13:28:24 2008
New Revision: 58260
URL: http://llvm.org/viewvc/llvm-project?rev=58260&view=rev
Log:
rename vec_spat -> vec_splat, pointed out by duncan
Added:
llvm/trunk/test/CodeGen/PowerPC/vec_splat.ll
- copied unchanged from r58257, llvm/trunk/test/CodeGen/PowerPC/vec_spat.ll
Removed:
llvm/trunk/test/CodeGen/PowerPC/vec_spat.ll
Removed: llvm/trunk/test/CodeGen/PowerPC/vec_spat.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/vec_spat.ll?rev=58259&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/vec_spat.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/vec_spat.ll (removed)
@@ -1,71 +0,0 @@
-; Test that vectors are scalarized/lowered correctly.
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g3 | \
-; RUN: grep stfs | count 4
-; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 -o %t -f
-; RUN: grep vspltw %t | count 2
-; RUN: grep vsplti %t | count 3
-; RUN: grep vsplth %t | count 1
-
- %f4 = type <4 x float>
- %i4 = type <4 x i32>
-
-define void @splat(%f4* %P, %f4* %Q, float %X) nounwind {
- %tmp = insertelement %f4 undef, float %X, i32 0 ; <%f4> [#uses=1]
- %tmp2 = insertelement %f4 %tmp, float %X, i32 1 ; <%f4> [#uses=1]
- %tmp4 = insertelement %f4 %tmp2, float %X, i32 2 ; <%f4> [#uses=1]
- %tmp6 = insertelement %f4 %tmp4, float %X, i32 3 ; <%f4> [#uses=1]
- %q = load %f4* %Q ; <%f4> [#uses=1]
- %R = add %f4 %q, %tmp6 ; <%f4> [#uses=1]
- store %f4 %R, %f4* %P
- ret void
-}
-
-define void @splat_i4(%i4* %P, %i4* %Q, i32 %X) nounwind {
- %tmp = insertelement %i4 undef, i32 %X, i32 0 ; <%i4> [#uses=1]
- %tmp2 = insertelement %i4 %tmp, i32 %X, i32 1 ; <%i4> [#uses=1]
- %tmp4 = insertelement %i4 %tmp2, i32 %X, i32 2 ; <%i4> [#uses=1]
- %tmp6 = insertelement %i4 %tmp4, i32 %X, i32 3 ; <%i4> [#uses=1]
- %q = load %i4* %Q ; <%i4> [#uses=1]
- %R = add %i4 %q, %tmp6 ; <%i4> [#uses=1]
- store %i4 %R, %i4* %P
- ret void
-}
-
-define void @splat_imm_i32(%i4* %P, %i4* %Q, i32 %X) nounwind {
- %q = load %i4* %Q ; <%i4> [#uses=1]
- %R = add %i4 %q, < i32 -1, i32 -1, i32 -1, i32 -1 > ; <%i4> [#uses=1]
- store %i4 %R, %i4* %P
- ret void
-}
-
-define void @splat_imm_i16(%i4* %P, %i4* %Q, i32 %X) nounwind {
- %q = load %i4* %Q ; <%i4> [#uses=1]
- %R = add %i4 %q, < i32 65537, i32 65537, i32 65537, i32 65537 > ; <%i4> [#uses=1]
- store %i4 %R, %i4* %P
- ret void
-}
-
-define void @splat_h(i16 %tmp, <16 x i8>* %dst) nounwind {
- %tmp.upgrd.1 = insertelement <8 x i16> undef, i16 %tmp, i32 0
- %tmp72 = insertelement <8 x i16> %tmp.upgrd.1, i16 %tmp, i32 1
- %tmp73 = insertelement <8 x i16> %tmp72, i16 %tmp, i32 2
- %tmp74 = insertelement <8 x i16> %tmp73, i16 %tmp, i32 3
- %tmp75 = insertelement <8 x i16> %tmp74, i16 %tmp, i32 4
- %tmp76 = insertelement <8 x i16> %tmp75, i16 %tmp, i32 5
- %tmp77 = insertelement <8 x i16> %tmp76, i16 %tmp, i32 6
- %tmp78 = insertelement <8 x i16> %tmp77, i16 %tmp, i32 7
- %tmp78.upgrd.2 = bitcast <8 x i16> %tmp78 to <16 x i8>
- store <16 x i8> %tmp78.upgrd.2, <16 x i8>* %dst
- ret void
-}
-
-define void @spltish(<16 x i8>* %A, <16 x i8>* %B) nounwind {
- %tmp = load <16 x i8>* %B ; <<16 x i8>> [#uses=1]
- %tmp.s = bitcast <16 x i8> %tmp to <16 x i8> ; <<16 x i8>> [#uses=1]
- %tmp4 = sub <16 x i8> %tmp.s, bitcast (<8 x i16> < i16 15, i16 15, i16 15, i16 15, i16 15, i16
- 15, i16 15, i16 15 > to <16 x i8>) ; <<16 x i8>> [#uses=1]
- %tmp4.u = bitcast <16 x i8> %tmp4 to <16 x i8> ; <<16 x i8>> [#uses=1]
- store <16 x i8> %tmp4.u, <16 x i8>* %A
- ret void
-}
-
From isanbard at gmail.com Mon Oct 27 13:28:31 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 27 Oct 2008 11:28:31 -0700
Subject: [llvm-commits] [llvm] r58232 - in /llvm/trunk:
lib/CodeGen/SelectionDAG/ test/CodeGen/Generic/
test/CodeGen/Mips/ test/CodeGen/X86/
In-Reply-To: <200810271900.33073.baldrick@free.fr>
References: <200810270842.m9R8gl1t004026@zion.cs.uiuc.edu>
<200810271019.12570.baldrick@free.fr>
<16e5fdf90810271050v24cf0108r3aa0bc68577e3817@mail.gmail.com>
<200810271900.33073.baldrick@free.fr>
Message-ID: <16e5fdf90810271128q7561854fo25234c6fc40e7172@mail.gmail.com>
On Mon, Oct 27, 2008 at 11:00 AM, Duncan Sands wrote:
> Hi Bill,
>
>> If you're working on a fix, could you XFAIL this for now?
>
> the cse-libcalls is fixed. I will xfail the vec_splat one tomorrow.
> The reason for not doing that now is that as nightly tester results
> come in I can see if they have LegalizeTypes turned on or not by
> looking at whether vec_spat.ll fails! I hope this is acceptable.
>
It's not ideal, but I suppose it's okay for now. I did see this
failure now happening on my PPC box:
$ llvm-dis -o - bug.bc
; ModuleID = 'bugpoint-reduced-simplified.bc'
target datalayout =
"E-p:64:64:64-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-f128:64:128"
target triple = "powerpc64-apple-darwin9.5"
define void @__divtc3({ ppc_fp128, ppc_fp128 }* noalias sret
%agg.result, ppc_fp128 %a, ppc_fp128 %b, ppc_fp128 %c, ppc_fp128 %d)
nounwind {
entry:
%imag59 = load ppc_fp128* null, align 8 ; [#uses=1]
%0 = mul ppc_fp128 0xM00000000000000000000000000000000, %imag59 ;
[#uses=1]
%1 = mul ppc_fp128 0xM00000000000000000000000000000000,
0xM00000000000000000000000000000000 ; [#uses=1]
%2 = add ppc_fp128 %0, %1 ; [#uses=1]
store ppc_fp128 %2, ppc_fp128* null, align 16
unreachable
}
$ llc -o - bug.bc
Assertion failed: (NodeID != ReadyToProcess && NodeID != Processed &&
"Invalid node id for user of unprocessed node!"), function run, file
/Volumes/Gir/devel/llvm/llvm.src/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp,
line 145.
0 llc 0x0080de25
_ZN4llvm3sys20SetInterruptFunctionEPFvvE + 87
1 llc 0x0080df91
_ZN4llvm3sys20SetInterruptFunctionEPFvvE + 451
2 libSystem.B.dylib 0x92f0109b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 libSystem.B.dylib 0x92f79ec2 raise + 26
Does this look related to your stuff?
-bw
From gohman at apple.com Mon Oct 27 13:32:16 2008
From: gohman at apple.com (Dan Gohman)
Date: Mon, 27 Oct 2008 11:32:16 -0700
Subject: [llvm-commits] [test-suite] r58258 -
/test-suite/trunk/MultiSource/Benchmarks/BitBench/drop3/drop3.c
In-Reply-To: <200810271824.m9RIO3Lu025883@zion.cs.uiuc.edu>
References: <200810271824.m9RIO3Lu025883@zion.cs.uiuc.edu>
Message-ID: <0B0F56DC-77E2-4719-97DC-6308B3810FBC@apple.com>
On Oct 27, 2008, at 11:24 AM, Evan Cheng wrote:
> Author: evancheng
> Date: Mon Oct 27 13:24:02 2008
> New Revision: 58258
>
> URL: http://llvm.org/viewvc/llvm-project?rev=58258&view=rev
> Log:
> Don't assume file name is shorter than 100 characters.
Thanks for finding this! This explains why those tests weren't
failing for me -- I guess my directories don't have long enough
names ;-).
Dan
From evan.cheng at apple.com Mon Oct 27 13:47:10 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Mon, 27 Oct 2008 11:47:10 -0700
Subject: [llvm-commits] [llvm] r58230 - in /llvm/trunk:
include/llvm/Target/TargetInstrInfo.h lib/CodeGen/PreAllocSplitting.cpp
lib/Target/X86/X86InstrInfo.cpp lib/Target/X86/X86InstrInfo.h
lib/Target/X86/X86RegisterInfo.h test/CodeGen/X86/pre-split7.ll
In-Reply-To: <2FE23620-131F-49FB-935F-530AB43C95BE@apple.com>
References: <200810270714.m9R7EpwT024528@zion.cs.uiuc.edu>
<2FE23620-131F-49FB-935F-530AB43C95BE@apple.com>
Message-ID: <6E99516D-AC07-403B-9A31-65AE58023836@apple.com>
On Oct 27, 2008, at 11:14 AM, Chris Lattner wrote:
>
> On Oct 27, 2008, at 12:14 AM, Evan Cheng wrote:
>
>> Author: evancheng
>> Date: Mon Oct 27 02:14:50 2008
>> New Revision: 58230
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=58230&view=rev
>> Log:
>> For now, don't split live intervals around x87 stack register
>> barriers. FpGET_ST0_80 must be right after a call instruction (and
>> ADJCALLSTACKUP) so we need to find a way to prevent reload of x87
>> registers between them.
>
> Eww... This seems exactly like the "copy instruction that clobbers
> flags" problem,
Yep. Except this is not modeled in the machine instruction level at
all. Once we figure out a way to deal with it, this patch can go away.
Evan
>
>
> -Chris
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From cedric.venet at laposte.net Mon Oct 27 14:21:37 2008
From: cedric.venet at laposte.net (Cedric Venet)
Date: Mon, 27 Oct 2008 19:21:37 -0000
Subject: [llvm-commits] [llvm] r58263 -
/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
Message-ID: <200810271921.m9RJLbZm028041@zion.cs.uiuc.edu>
Author: venet
Date: Mon Oct 27 14:21:35 2008
New Revision: 58263
URL: http://llvm.org/viewvc/llvm-project?rev=58263&view=rev
Log:
Remove tabs from my previous commit.
Modified:
llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=58263&r1=58262&r2=58263&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Mon Oct 27 14:21:35 2008
@@ -45,8 +45,8 @@
/// an operand, specified with syntax like ${opname:modifier}.
std::string MiModifier;
- // To make VS STL happy
- AsmWriterOperand():OperandType(isLiteralTextOperand) {}
+ // To make VS STL happy
+ AsmWriterOperand():OperandType(isLiteralTextOperand) {}
AsmWriterOperand(const std::string &LitStr)
: OperandType(isLiteralTextOperand), Str(LitStr) {}
From baldrick at free.fr Mon Oct 27 14:59:01 2008
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 27 Oct 2008 20:59:01 +0100
Subject: [llvm-commits] [llvm] r58232 - in /llvm/trunk:
lib/CodeGen/SelectionDAG/ test/CodeGen/Generic/
test/CodeGen/Mips/ test/CodeGen/X86/
In-Reply-To: <16e5fdf90810271128q7561854fo25234c6fc40e7172@mail.gmail.com>
References: <200810270842.m9R8gl1t004026@zion.cs.uiuc.edu>
<200810271900.33073.baldrick@free.fr>
<16e5fdf90810271128q7561854fo25234c6fc40e7172@mail.gmail.com>
Message-ID: <200810272059.01601.baldrick@free.fr>
Hi Bill,
> It's not ideal, but I suppose it's okay for now. I did see this
> failure now happening on my PPC box:
>
> $ llvm-dis -o - bug.bc
> ; ModuleID = 'bugpoint-reduced-simplified.bc'
> target datalayout =
> "E-p:64:64:64-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-f128:64:128"
> target triple = "powerpc64-apple-darwin9.5"
...
> Does this look related to your stuff?
yup, thanks for the testcase! Investigating...
Ciao,
Duncan.
From tonic at nondot.org Mon Oct 27 15:40:33 2008
From: tonic at nondot.org (Tanya Lattner)
Date: Mon, 27 Oct 2008 15:40:33 -0500
Subject: [llvm-commits] CVS: llvm-www/www-index.html
Message-ID: <200810272040.m9RKeX2d031000@zion.cs.uiuc.edu>
Changes in directory llvm-www:
www-index.html updated: 1.163 -> 1.164
---
Log message:
Update release schedule.
---
Diffs of the changes: (+3 -3)
www-index.html | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Index: llvm-www/www-index.html
diff -u llvm-www/www-index.html:1.163 llvm-www/www-index.html:1.164
--- llvm-www/www-index.html:1.163 Fri Oct 3 12:14:35 2008
+++ llvm-www/www-index.html Mon Oct 27 15:39:48 2008
@@ -110,9 +110,9 @@
- Oct 6, 2008: Branch creation/Code Freeze (9PM PDT).
- Oct 9, 2008: First round of pre-release testing begins.
- Oct 19, 2008: Pre-release testing ends.
-- Oct 21, 2008: Second round of pre-release testing begins.
-- Oct 28, 2008: Pre-release testing ends.
-- Oct 30, 2008: 2.4 Released.
+- Oct 29, 2008: Second round of pre-release testing begins.
+- Nov 3, 2008: Pre-release testing ends.
+- Nov 5, 2008: 2.4 Released.
From gohman at apple.com Mon Oct 27 15:46:33 2008
From: gohman at apple.com (Dan Gohman)
Date: Mon, 27 Oct 2008 20:46:33 -0000
Subject: [llvm-commits] [test-suite] r58267 - in
/test-suite/trunk/MultiSource/Benchmarks/MallocBench/cfrac: pdefs.h
precision.h
Message-ID: <200810272046.m9RKkXS5031215@zion.cs.uiuc.edu>
Author: djg
Date: Mon Oct 27 15:46:33 2008
New Revision: 58267
URL: http://llvm.org/viewvc/llvm-project?rev=58267&view=rev
Log:
Fix cfrac on LP64 platforms. Some prototypes for functions that
return pointer values where mistakenly missing, and the typedef
for u32 was broken.
Modified:
test-suite/trunk/MultiSource/Benchmarks/MallocBench/cfrac/pdefs.h
test-suite/trunk/MultiSource/Benchmarks/MallocBench/cfrac/precision.h
Modified: test-suite/trunk/MultiSource/Benchmarks/MallocBench/cfrac/pdefs.h
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/MallocBench/cfrac/pdefs.h?rev=58267&r1=58266&r2=58267&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/MallocBench/cfrac/pdefs.h (original)
+++ test-suite/trunk/MultiSource/Benchmarks/MallocBench/cfrac/pdefs.h Mon Oct 27 15:46:33 2008
@@ -43,9 +43,10 @@
/*
* These next four types are used only used in this include file
*/
-typedef unsigned char u8; /* 8 bits */
-typedef unsigned short u16; /* 16 bits */
-typedef unsigned long u32; /* 32 bits */
+#include
+typedef uint8_t u8; /* 8 bits */
+typedef uint16_t u16; /* 16 bits */
+typedef uint32_t u32; /* 32 bits */
typedef u8 boolean; /* 1 bit */
#define BASE 65536 /* Base * (Base-1) <= MAXINT */
Modified: test-suite/trunk/MultiSource/Benchmarks/MallocBench/cfrac/precision.h
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/MallocBench/cfrac/precision.h?rev=58267&r1=58266&r2=58267&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/MallocBench/cfrac/precision.h (original)
+++ test-suite/trunk/MultiSource/Benchmarks/MallocBench/cfrac/precision.h Mon Oct 27 15:46:33 2008
@@ -118,11 +118,18 @@
#endif
#ifdef __STDC__ /* if ANSI compiler */
+/* LLVM - Disable all of the inlining */
+#if 0
#ifndef __GNUC__
extern precision pnew(precision); /* initialization */
extern precision presult(precision); /* function result */
extern precision psetq(precision *, precision); /* quick assignment */
#endif
+#else
+extern precision pnew(precision); /* initialization */
+extern precision presult(precision); /* function result */
+extern precision psetq(precision *, precision); /* quick assignment */
+#endif
extern precision psetv(precision *, precision); /* checked assignment */
extern precision pparmv(precision); /* checked parameter */
extern precision pparmf(precision); /* unchecked parameter (fn) */
@@ -225,11 +232,18 @@
* Function versions of above if you still want side effects
*/
+/* LLVM - Disable all of the inlining */
+#if 0
#ifndef __GNUC__
extern precision pnew(); /* initialization */
extern precision presult(); /* function result */
extern precision psetq(); /* quick assignment */
#endif
+#else
+extern precision pnew(); /* initialization */
+extern precision presult(); /* function result */
+extern precision psetq(); /* quick assignment */
+#endif
extern precision psetv(); /* checked assignment */
extern precision pparmv(); /* checked parameter */
extern precision pparmf(); /* unchecked parameter (fn) */
From daniel at zuster.org Mon Oct 27 15:50:02 2008
From: daniel at zuster.org (Daniel Dunbar)
Date: Mon, 27 Oct 2008 20:50:02 -0000
Subject: [llvm-commits] [llvm] r58268 -
/llvm/trunk/include/llvm/ADT/StringSet.h
Message-ID: <200810272050.m9RKo20b031332@zion.cs.uiuc.edu>
Author: ddunbar
Date: Mon Oct 27 15:50:02 2008
New Revision: 58268
URL: http://llvm.org/viewvc/llvm-project?rev=58268&view=rev
Log:
Return bool (inserted) from StringSet::insert as for StringMap::insert.
Modified:
llvm/trunk/include/llvm/ADT/StringSet.h
Modified: llvm/trunk/include/llvm/ADT/StringSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringSet.h?rev=58268&r1=58267&r2=58268&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/StringSet.h (original)
+++ llvm/trunk/include/llvm/ADT/StringSet.h Mon Oct 27 15:50:02 2008
@@ -27,12 +27,12 @@
class StringSet : public llvm::StringMap {
typedef llvm::StringMap base;
public:
- void insert (const std::string& InLang) {
+ bool insert (const std::string& InLang) {
assert(!InLang.empty());
const char* KeyStart = &InLang[0];
const char* KeyEnd = KeyStart + InLang.size();
- base::insert(llvm::StringMapEntry::
- Create(KeyStart, KeyEnd, base::getAllocator(), '+'));
+ return base::insert(llvm::StringMapEntry::
+ Create(KeyStart, KeyEnd, base::getAllocator(), '+'));
}
};
}
From dalej at apple.com Mon Oct 27 16:00:31 2008
From: dalej at apple.com (Dale Johannesen)
Date: Mon, 27 Oct 2008 21:00:31 -0000
Subject: [llvm-commits] [llvm-gcc-4.2] r58271 -
/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/_Pragma3.c
Message-ID: <200810272100.m9RL0VBM031701@zion.cs.uiuc.edu>
Author: johannes
Date: Mon Oct 27 16:00:31 2008
New Revision: 58271
URL: http://llvm.org/viewvc/llvm-project?rev=58271&view=rev
Log:
attempt to store with a later timestamp
Modified:
llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/_Pragma3.c
Modified: llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/_Pragma3.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/_Pragma3.c?rev=58271&r1=58270&r2=58271&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/_Pragma3.c (original)
+++ llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/_Pragma3.c Mon Oct 27 16:00:31 2008
@@ -3,7 +3,7 @@
/* { dg-do preprocess } */
/* Pragma buffers have a NULL "inc" member, which we would dereference
- when getting a file's date and time.
+ when getting a file's date and time.
Based on PR 7526. 14 Aug 2002. */
From dalej at apple.com Mon Oct 27 16:09:35 2008
From: dalej at apple.com (Dale Johannesen)
Date: Mon, 27 Oct 2008 21:09:35 -0000
Subject: [llvm-commits] [llvm-gcc-4.2] r58273 -
/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/cpp.exp
Message-ID: <200810272109.m9RL9ZeY032289@zion.cs.uiuc.edu>
Author: johannes
Date: Mon Oct 27 16:09:34 2008
New Revision: 58273
URL: http://llvm.org/viewvc/llvm-project?rev=58273&view=rev
Log:
Hack the relative timestamps of _Pragma3.c and its included file.
Not sure how portable 'touch' is, if it doesn't work for you please
substitute whatever your equivalent functionality is...
Modified:
llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/cpp.exp
Modified: llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/cpp.exp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/cpp.exp?rev=58273&r1=58272&r2=58273&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/cpp.exp (original)
+++ llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/cpp.exp Mon Oct 27 16:09:34 2008
@@ -28,6 +28,10 @@
foreach header { A.h bA.h c.h d/d.h } {
remote_download host $srcdir/$subdir/inc/$header $header
}
+# LLVM LOCAL the timestamp of this file must be newer than that of
+# a file it includes, or the test fails.
+exec touch $srcdir/$subdir/_Pragma3.c
+
# APPLE LOCAL end headermaps
# Load support procs.
From greened at obbligato.org Mon Oct 27 16:56:29 2008
From: greened at obbligato.org (David Greene)
Date: Mon, 27 Oct 2008 21:56:29 -0000
Subject: [llvm-commits] [llvm] r58278 - in /llvm/trunk:
include/llvm/CodeGen/DAGISelHeader.h lib/Target/ARM/ARMISelDAGToDAG.cpp
lib/Target/Alpha/AlphaISelDAGToDAG.cpp
lib/Target/CellSPU/SPUISelDAGToDAG.cpp lib/Target/IA64/IA64ISelDAGToDAG.cpp
lib/Target/Mips/MipsISelDAGToDAG.cpp lib/Target/PIC16/PIC16ISelDAGToDAG.cpp
lib/Target/PowerPC/PPCISelDAGToDAG.cpp
lib/Target/Sparc/SparcISelDAGToDAG.cpp lib/Target/X86/X86ISelDAGToDAG.cpp
utils/TableGen/DAGISelEmitter.cpp
Message-ID: <200810272156.m9RLuT7v001548@zion.cs.uiuc.edu>
Author: greened
Date: Mon Oct 27 16:56:29 2008
New Revision: 58278
URL: http://llvm.org/viewvc/llvm-project?rev=58278&view=rev
Log:
Have TableGen emit setSubgraphColor calls under control of a -gen-debug
flag. Then in a debugger developers can set breakpoints at these calls
to see waht is about to be selected and what the resulting subgraph
looks like. This really helps when debugging instruction selection.
Modified:
llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h
llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp
llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp
llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp
llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp
llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp
llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp
llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=58278&r1=58277&r2=58278&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original)
+++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Mon Oct 27 16:56:29 2008
@@ -153,7 +153,7 @@
/// SelectRoot - Top level entry to DAG instruction selector.
/// Selects instructions starting at the root of the current DAG.
-void SelectRoot() {
+void SelectRoot(SelectionDAG &DAG) {
SelectRootInit();
unsigned NumBytes = (DAGSize + 7) / 8;
ISelQueued = new unsigned char[NumBytes];
@@ -176,14 +176,18 @@
// Skip already selected nodes.
if (isSelected(Node->getNodeId()))
continue;
+ DAG.setSubgraphColor(Node, "red");
SDNode *ResNode = Select(SDValue(Node, 0));
// If node should not be replaced,
// continue with the next one.
if (ResNode == Node)
continue;
// Replace node.
- if (ResNode)
+ if (ResNode) {
+ DAG.setSubgraphColor(ResNode, "yellow");
+ DAG.setSubgraphColor(ResNode, "black");
ReplaceUses(Node, ResNode);
+ }
// If after the replacement this node is not used any more,
// remove this dead node.
if (Node->use_empty()) { // Don't delete EntryToken, etc.
@@ -191,6 +195,7 @@
CurDAG->RemoveDeadNode(Node, &ISQU);
UpdateQueue(ISQU);
}
+ //DAG.setSubgraphColor(Node, "black");
}
delete[] ISelQueued;
Modified: llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp?rev=58278&r1=58277&r2=58278&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp Mon Oct 27 16:56:29 2008
@@ -94,7 +94,7 @@
void ARMDAGToDAGISel::InstructionSelect() {
DEBUG(BB->dump());
- SelectRoot();
+ SelectRoot(*CurDAG);
CurDAG->RemoveDeadNodes();
}
Modified: llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp?rev=58278&r1=58277&r2=58278&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Mon Oct 27 16:56:29 2008
@@ -230,7 +230,7 @@
DEBUG(BB->dump());
// Select target instructions for the DAG.
- SelectRoot();
+ SelectRoot(*CurDAG);
CurDAG->RemoveDeadNodes();
}
Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp?rev=58278&r1=58277&r2=58278&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Mon Oct 27 16:56:29 2008
@@ -344,7 +344,7 @@
DEBUG(BB->dump());
// Select target instructions for the DAG.
- SelectRoot();
+ SelectRoot(*CurDAG);
CurDAG->RemoveDeadNodes();
}
Modified: llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp?rev=58278&r1=58277&r2=58278&view=diff
==============================================================================
--- llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp Mon Oct 27 16:56:29 2008
@@ -97,7 +97,7 @@
DEBUG(BB->dump());
// Select target instructions for the DAG.
- SelectRoot();
+ SelectRoot(*CurDAG);
CurDAG->RemoveDeadNodes();
}
Modified: llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp?rev=58278&r1=58277&r2=58278&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp Mon Oct 27 16:56:29 2008
@@ -105,7 +105,7 @@
#endif
// Select target instructions for the DAG.
- SelectRoot();
+ SelectRoot(*CurDAG);
#ifndef NDEBUG
DOUT << "===== Instruction selection ends:\n";
Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp?rev=58278&r1=58277&r2=58278&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp Mon Oct 27 16:56:29 2008
@@ -102,7 +102,7 @@
#endif
// Select target instructions for the DAG.
- SelectRoot();
+ SelectRoot(*CurDAG);
DOUT << "===== Instruction selection ends:\n";
Modified: llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp?rev=58278&r1=58277&r2=58278&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Mon Oct 27 16:56:29 2008
@@ -204,7 +204,7 @@
DEBUG(BB->dump());
// Select target instructions for the DAG.
- SelectRoot();
+ SelectRoot(*CurDAG);
CurDAG->RemoveDeadNodes();
}
Modified: llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp?rev=58278&r1=58277&r2=58278&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp Mon Oct 27 16:56:29 2008
@@ -70,7 +70,7 @@
DEBUG(BB->dump());
// Select target instructions for the DAG.
- SelectRoot();
+ SelectRoot(*CurDAG);
CurDAG->RemoveDeadNodes();
}
Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=58278&r1=58277&r2=58278&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Mon Oct 27 16:56:29 2008
@@ -655,7 +655,7 @@
DOUT << "===== Instruction selection begins:\n";
Indent = 0;
#endif
- SelectRoot();
+ SelectRoot(*CurDAG);
#ifndef NDEBUG
DOUT << "===== Instruction selection ends:\n";
#endif
Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=58278&r1=58277&r2=58278&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Mon Oct 27 16:56:29 2008
@@ -14,13 +14,21 @@
#include "DAGISelEmitter.h"
#include "Record.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
+#include "llvm/Support/Debug.h"
#include "llvm/Support/Streams.h"
#include
#include
using namespace llvm;
+namespace {
+ cl::opt
+ GenDebug("gen-debug", cl::desc("Generate debug code"),
+ cl::init(false));
+}
+
//===----------------------------------------------------------------------===//
// DAGISelEmitter Helper methods
//
@@ -969,6 +977,10 @@
emitCode("InChains.push_back(" + ChainName + ");");
emitCode(ChainName + " = CurDAG->getNode(ISD::TokenFactor, MVT::Other, "
"&InChains[0], InChains.size());");
+ if (GenDebug) {
+ emitCode("CurDAG->setSubgraphColor(" + ChainName +".getNode(), \"yellow\");");
+ emitCode("CurDAG->setSubgraphColor(" + ChainName +".getNode(), \"black\");");
+ }
}
// Loop over all of the operands of the instruction pattern, emitting code
@@ -1096,13 +1108,18 @@
if (II.isSimpleLoad | II.mayLoad | II.mayStore) {
std::vector::const_iterator mi, mie;
for (mi = LSI.begin(), mie = LSI.end(); mi != mie; ++mi) {
- emitCode("SDValue LSI_" + *mi + " = "
+ std::string LSIName = "LSI_" + *mi;
+ emitCode("SDValue " + LSIName + " = "
"CurDAG->getMemOperand(cast(" +
*mi + ")->getMemOperand());");
+ if (GenDebug) {
+ emitCode("CurDAG->setSubgraphColor(" + LSIName +".getNode(), \"yellow\");");
+ emitCode("CurDAG->setSubgraphColor(" + LSIName +".getNode(), \"black\");");
+ }
if (IsVariadic)
- emitCode("Ops" + utostr(OpsNo) + ".push_back(LSI_" + *mi + ");");
+ emitCode("Ops" + utostr(OpsNo) + ".push_back(" + LSIName + ");");
else
- AllOps.push_back("LSI_" + *mi);
+ AllOps.push_back(LSIName);
}
}
@@ -1269,6 +1286,18 @@
}
emitCode(CodePrefix + Code + ");");
+
+ if (GenDebug) {
+ if (!isRoot) {
+ emitCode("CurDAG->setSubgraphColor(" + NodeName +".getNode(), \"yellow\");");
+ emitCode("CurDAG->setSubgraphColor(" + NodeName +".getNode(), \"black\");");
+ }
+ else {
+ emitCode("CurDAG->setSubgraphColor(" + NodeName +", \"yellow\");");
+ emitCode("CurDAG->setSubgraphColor(" + NodeName +", \"black\");");
+ }
+ }
+
for (unsigned i = 0, e = After.size(); i != e; ++i)
emitCode(After[i]);
@@ -1766,8 +1795,19 @@
// Replace the emission code within selection routines with calls to the
// emission functions.
- CallerCode = "return Emit_" + utostr(EmitFuncNum) + CallerCode;
- GeneratedCode.push_back(std::make_pair(false, CallerCode));
+ if (GenDebug) {
+ GeneratedCode.push_back(std::make_pair(0, "CurDAG->setSubgraphColor(N.getNode(), \"red\");"));
+ }
+ CallerCode = "SDNode *Result = Emit_" + utostr(EmitFuncNum) + CallerCode;
+ GeneratedCode.push_back(std::make_pair(3, CallerCode));
+ if (GenDebug) {
+ GeneratedCode.push_back(std::make_pair(0, "if(Result) {"));
+ GeneratedCode.push_back(std::make_pair(0, " CurDAG->setSubgraphColor(Result, \"yellow\");"));
+ GeneratedCode.push_back(std::make_pair(0, " CurDAG->setSubgraphColor(Result, \"black\");"));
+ GeneratedCode.push_back(std::make_pair(0, "}"));
+ //GeneratedCode.push_back(std::make_pair(0, "CurDAG->setSubgraphColor(N.getNode(), \"black\");"));
+ }
+ GeneratedCode.push_back(std::make_pair(0, "return Result;"));
}
// Print function.
From kremenek at apple.com Mon Oct 27 17:05:57 2008
From: kremenek at apple.com (Ted Kremenek)
Date: Mon, 27 Oct 2008 22:05:57 -0000
Subject: [llvm-commits] [llvm] r58283 - /llvm/tags/checker/checker-118/
Message-ID: <200810272205.m9RM5vlg001947@zion.cs.uiuc.edu>
Author: kremenek
Date: Mon Oct 27 17:05:57 2008
New Revision: 58283
URL: http://llvm.org/viewvc/llvm-project?rev=58283&view=rev
Log:
Tagging checker-118.
Added:
llvm/tags/checker/checker-118/
- copied from r58282, llvm/trunk/
From evan.cheng at apple.com Mon Oct 27 17:22:03 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Mon, 27 Oct 2008 15:22:03 -0700
Subject: [llvm-commits] [llvm] r58232 - in /llvm/trunk:
lib/CodeGen/SelectionDAG/
test/CodeGen/Generic/ test/CodeGen/Mips/ test/CodeGen/X86/
In-Reply-To: <200810272059.01601.baldrick@free.fr>
References: <200810270842.m9R8gl1t004026@zion.cs.uiuc.edu>
<200810271900.33073.baldrick@free.fr>
<16e5fdf90810271128q7561854fo25234c6fc40e7172@mail.gmail.com>
<200810272059.01601.baldrick@free.fr>
Message-ID: <62BE7F59-47B9-40C5-ADEC-185E066BBAC3@apple.com>
Hi Duncan,
Apple style llvm-gcc is not building now due to this:
Undefined symbols:
"___fixunstfsi", referenced from:
___fixunstfdi in _fixunstfdi_s.o
___fixunstfdi in _fixunstfdi_s.o
___fixunstfdi in _fixunstfdi_s.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Looks like ppc backend is generating __fixunstfsi now. I'll send you a
bc file.
Thanks,
Evan
On Oct 27, 2008, at 12:59 PM, Duncan Sands wrote:
> Hi Bill,
>
>> It's not ideal, but I suppose it's okay for now. I did see this
>> failure now happening on my PPC box:
>>
>> $ llvm-dis -o - bug.bc
>> ; ModuleID = 'bugpoint-reduced-simplified.bc'
>> target datalayout =
>> "E-p:64:64:64-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-f128:64:128"
>> target triple = "powerpc64-apple-darwin9.5"
> ...
>> Does this look related to your stuff?
>
> yup, thanks for the testcase! Investigating...
>
> Ciao,
>
> Duncan.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From kremenek at apple.com Mon Oct 27 17:43:07 2008
From: kremenek at apple.com (Ted Kremenek)
Date: Mon, 27 Oct 2008 22:43:07 -0000
Subject: [llvm-commits] [llvm] r58290 -
/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
Message-ID: <200810272243.m9RMh7JJ003252@zion.cs.uiuc.edu>
Author: kremenek
Date: Mon Oct 27 17:43:07 2008
New Revision: 58290
URL: http://llvm.org/viewvc/llvm-project?rev=58290&view=rev
Log:
Fix bogus comparison of "const char *" with c-string literal. Use strcmp instead.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp?rev=58290&r1=58289&r2=58290&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp Mon Oct 27 17:43:07 2008
@@ -369,10 +369,10 @@
bool printed = false;
if (setSubgraphColorHelper(N, Color, visited, 0, printed)) {
// Visually mark that we hit the limit
- if (Color == "red" ) {
+ if (strcmp(Color, "red") == 0) {
setSubgraphColorHelper(N, "blue", visited, 0, printed);
}
- else if (Color == "yellow" ) {
+ else if (strcmp(Color, "yellow") == 0) {
setSubgraphColorHelper(N, "green", visited, 0, printed);
}
}
From echristo at apple.com Mon Oct 27 18:02:57 2008
From: echristo at apple.com (Eric Christopher)
Date: Mon, 27 Oct 2008 16:02:57 -0700
Subject: [llvm-commits] [llvm-gcc-4.2] r58271 -
/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/_Pragma3.c
In-Reply-To: <200810272100.m9RL0VBM031701@zion.cs.uiuc.edu>
References: <200810272100.m9RL0VBM031701@zion.cs.uiuc.edu>
Message-ID: <9528AF5B-AB4F-46EB-8DC1-115BD2E24EE3@apple.com>
On Oct 27, 2008, at 2:00 PM, Dale Johannesen wrote:
> Author: johannes
> Date: Mon Oct 27 16:00:31 2008
> New Revision: 58271
>
> URL: http://llvm.org/viewvc/llvm-project?rev=58271&view=rev
> Log:
> attempt to store with a later timestamp
The gcc_update script should handle this.
-eric
From echristo at apple.com Mon Oct 27 18:03:33 2008
From: echristo at apple.com (Eric Christopher)
Date: Mon, 27 Oct 2008 16:03:33 -0700
Subject: [llvm-commits] [llvm-gcc-4.2] r58273 -
/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/cpp.exp
In-Reply-To: <200810272109.m9RL9ZeY032289@zion.cs.uiuc.edu>
References: <200810272109.m9RL9ZeY032289@zion.cs.uiuc.edu>
Message-ID: <7C97B4A8-5154-4BEF-BFA9-5153002CCE67@apple.com>
On Oct 27, 2008, at 2:09 PM, Dale Johannesen wrote:
> Author: johannes
> Date: Mon Oct 27 16:09:34 2008
> New Revision: 58273
>
> URL: http://llvm.org/viewvc/llvm-project?rev=58273&view=rev
> Log:
> Hack the relative timestamps of _Pragma3.c and its included file.
>
> Not sure how portable 'touch' is, if it doesn't work for you please
> substitute whatever your equivalent functionality is...
>
This is what gcc_update does - probably be best to just have things
use gcc_update instead.
-eric
From dalej at apple.com Mon Oct 27 18:12:34 2008
From: dalej at apple.com (Dale Johannesen)
Date: Mon, 27 Oct 2008 16:12:34 -0700
Subject: [llvm-commits] [llvm-gcc-4.2] r58273 -
/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/cpp.exp
In-Reply-To: <7C97B4A8-5154-4BEF-BFA9-5153002CCE67@apple.com>
References: <200810272109.m9RL9ZeY032289@zion.cs.uiuc.edu>
<7C97B4A8-5154-4BEF-BFA9-5153002CCE67@apple.com>
Message-ID: <4098B227-F7EB-4EAC-84AE-6B80697DBF44@apple.com>
You may be right, but that appears to affect only generated files?
That is not the problem here.
On Oct 27, 2008, at 4:03 PMPDT, Eric Christopher wrote:
> On Oct 27, 2008, at 2:09 PM, Dale Johannesen wrote:
>
>> Author: johannes
>> Date: Mon Oct 27 16:09:34 2008
>> New Revision: 58273
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=58273&view=rev
>> Log:
>> Hack the relative timestamps of _Pragma3.c and its included file.
>>
>> Not sure how portable 'touch' is, if it doesn't work for you please
>> substitute whatever your equivalent functionality is...
>>
>
> This is what gcc_update does - probably be best to just have things
> use gcc_update instead.
>
> -eric
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From isanbard at gmail.com Mon Oct 27 18:19:33 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 27 Oct 2008 23:19:33 -0000
Subject: [llvm-commits] [llvm] r58293 - in /llvm/tags/Apple/llvmCore-2077.3:
./ utils/buildit/build_llvm
Message-ID: <200810272319.m9RNJXYu004442@zion.cs.uiuc.edu>
Author: void
Date: Mon Oct 27 18:19:33 2008
New Revision: 58293
URL: http://llvm.org/viewvc/llvm-project?rev=58293&view=rev
Log:
Pass in the LLVM_SUBMIT_VERSION flags when doing a 'make install'. The libLTO install process uses this flag.
Added:
llvm/tags/Apple/llvmCore-2077.3/
- copied from r58209, llvm/tags/Apple/llvmCore-2077.2/
Modified:
llvm/tags/Apple/llvmCore-2077.3/utils/buildit/build_llvm
Modified: llvm/tags/Apple/llvmCore-2077.3/utils/buildit/build_llvm
URL: http://llvm.org/viewvc/llvm-project/llvm/tags/Apple/llvmCore-2077.3/utils/buildit/build_llvm?rev=58293&r1=58209&r2=58293&view=diff
==============================================================================
--- llvm/tags/Apple/llvmCore-2077.3/utils/buildit/build_llvm (original)
+++ llvm/tags/Apple/llvmCore-2077.3/utils/buildit/build_llvm Mon Oct 27 18:19:33 2008
@@ -89,7 +89,7 @@
|| exit 1
fi
-SUBVERSION=`echo $RC_ProjectSourceVersion | sed -e 's/.*\.//'`
+SUBVERSION=`echo $RC_ProjectSourceVersion | sed -e 's/[^.]*\.\([0-9]*\).*/\1/'`
if [ "x$SUBVERSION" != "x$RC_ProjectSourceVersion" ]; then
LLVM_SUBMIT_SUBVERSION=`printf "%02d" $SUBVERSION`
@@ -138,7 +138,8 @@
make $JOBS_FLAG $OPTIMIZE_OPTS UNIVERSAL=1 UNIVERSAL_ARCH="$TARGETS" \
LLVM_SUBMIT_VERSION=$LLVM_SUBMIT_VERSION \
LLVM_SUBMIT_SUBVERSION=$LLVM_SUBMIT_SUBVERSION \
- CXXFLAGS="-DLLVM_VERSION_INFO='\" Apple Build #$LLVM_VERSION\"'"
+ CXXFLAGS="-DLLVM_VERSION_INFO='\" Apple Build #$LLVM_VERSION\"'" \
+ VERBOSE=1
if ! test $? == 0 ; then
echo "error: LLVM 'make' failed!"
@@ -158,7 +159,10 @@
# Install the tree into the destination directory.
make $LOCAL_MAKEFLAGS $OPTIMIZE_OPTS UNIVERSAL=1 UNIVERSAL_ARCH="$TARGETS" \
- OPTIMIZE_OPTION='-O2' install
+ OPTIMIZE_OPTION='-O2' \
+ LLVM_SUBMIT_VERSION=$LLVM_SUBMIT_VERSION \
+ LLVM_SUBMIT_SUBVERSION=$LLVM_SUBMIT_SUBVERSION \
+ VERBOSE=1 install
if ! test $? == 0 ; then
echo "error: LLVM 'make install' failed!"
From evan.cheng at apple.com Mon Oct 27 18:21:02 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Mon, 27 Oct 2008 23:21:02 -0000
Subject: [llvm-commits] [llvm] r58294 - in /llvm/trunk:
lib/CodeGen/PreAllocSplitting.cpp lib/CodeGen/SimpleRegisterCoalescing.cpp
lib/CodeGen/SimpleRegisterCoalescing.h
test/CodeGen/X86/2008-10-27-CoalescerBug.ll
Message-ID: <200810272321.m9RNL2cP004514@zion.cs.uiuc.edu>
Author: evancheng
Date: Mon Oct 27 18:21:01 2008
New Revision: 58294
URL: http://llvm.org/viewvc/llvm-project?rev=58294&view=rev
Log:
Remove val# defined by a remat'ed def that is now dead.
Added:
llvm/trunk/test/CodeGen/X86/2008-10-27-CoalescerBug.ll
Modified:
llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.h
Modified: llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp?rev=58294&r1=58293&r2=58294&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp (original)
+++ llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp Mon Oct 27 18:21:01 2008
@@ -561,6 +561,9 @@
SpillMI = prior(SpillPt);
LIs->InsertMachineInstrInMaps(SpillMI, SpillIndex);
} else if (!PrevSpilled) {
+ if (!DefMI)
+ // Def is dead. Do nothing.
+ return false;
// If it's already split, just restore the value. There is no need to spill
// the def again.
// Check if it's possible to insert a spill after the def MI.
Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=58294&r1=58293&r2=58294&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
+++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Mon Oct 27 18:21:01 2008
@@ -707,6 +707,18 @@
return false;
}
+/// RemoveDeadDef - If a def of a live interval is now determined dead, remove
+/// the val# it defines. If the live interval becomes empty, remove it as well.
+bool SimpleRegisterCoalescing::RemoveDeadDef(LiveInterval &li,
+ MachineInstr *DefMI) {
+ unsigned DefIdx = li_->getDefIndex(li_->getInstructionIndex(DefMI));
+ LiveInterval::iterator MLR = li.FindLiveRangeContaining(DefIdx);
+ if (DefIdx != MLR->valno->def)
+ return false;
+ li.removeValNo(MLR->valno);
+ return removeIntervalIfEmpty(li, li_, tri_);
+}
+
/// PropagateDeadness - Propagate the dead marker to the instruction which
/// defines the val#.
static void PropagateDeadness(LiveInterval &li, MachineInstr *CopyMI,
@@ -2280,6 +2292,7 @@
// Perform a final pass over the instructions and compute spill weights
// and remove identity moves.
+ SmallVector DeadDefs;
for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_->end();
mbbi != mbbe; ++mbbi) {
MachineBasicBlock* mbb = mbbi;
@@ -2313,9 +2326,13 @@
bool isDead = true;
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
const MachineOperand &MO = MI->getOperand(i);
- if (!MO.isReg() || MO.isDead())
+ if (!MO.isReg())
continue;
unsigned Reg = MO.getReg();
+ if (TargetRegisterInfo::isVirtualRegister(Reg))
+ DeadDefs.push_back(Reg);
+ if (MO.isDead())
+ continue;
if (TargetRegisterInfo::isPhysicalRegister(Reg) ||
!mri_->use_empty(Reg)) {
isDead = false;
@@ -2323,10 +2340,16 @@
}
}
if (isDead) {
+ while (!DeadDefs.empty()) {
+ unsigned DeadDef = DeadDefs.back();
+ DeadDefs.pop_back();
+ RemoveDeadDef(li_->getInterval(DeadDef), MI);
+ }
li_->RemoveMachineInstrFromMaps(mii);
mii = mbbi->erase(mii);
continue;
- }
+ } else
+ DeadDefs.clear();
}
// If the move will be an identity move delete it
Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.h?rev=58294&r1=58293&r2=58294&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.h (original)
+++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.h Mon Oct 27 18:21:01 2008
@@ -269,6 +269,11 @@
/// live range is dead. Return true if live interval is removed.
bool ShortenDeadCopySrcLiveRange(LiveInterval &li, MachineInstr *CopyMI);
+ /// RemoveDeadDef - If a def of a live interval is now determined dead,
+ /// remove the val# it defines. If the live interval becomes empty, remove
+ /// it as well.
+ bool RemoveDeadDef(LiveInterval &li, MachineInstr *DefMI);
+
/// lastRegisterUse - Returns the last use of the specific register between
/// cycles Start and End or NULL if there are no uses.
MachineOperand *lastRegisterUse(unsigned Start, unsigned End, unsigned Reg,
Added: llvm/trunk/test/CodeGen/X86/2008-10-27-CoalescerBug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-10-27-CoalescerBug.ll?rev=58294&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2008-10-27-CoalescerBug.ll (added)
+++ llvm/trunk/test/CodeGen/X86/2008-10-27-CoalescerBug.ll Mon Oct 27 18:21:01 2008
@@ -0,0 +1,44 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -stats |& not grep {Number of register spills}
+
+define fastcc void @fourn(double* %data, i32 %isign) nounwind {
+entry:
+ br label %bb
+
+bb: ; preds = %bb, %entry
+ %indvar93 = phi i32 [ 0, %entry ], [ %idim.030, %bb ] ; [#uses=2]
+ %idim.030 = add i32 %indvar93, 1 ; [#uses=1]
+ %0 = add i32 %indvar93, 2 ; [#uses=1]
+ %1 = icmp sgt i32 %0, 2 ; [#uses=1]
+ br i1 %1, label %bb30.loopexit, label %bb
+
+bb3: ; preds = %bb30.loopexit, %bb25, %bb3
+ %2 = load i32* null, align 4 ; [#uses=1]
+ %3 = mul i32 %2, 0 ; [#uses=1]
+ %4 = icmp slt i32 0, %3 ; [#uses=1]
+ br i1 %4, label %bb18, label %bb3
+
+bb18: ; preds = %bb3
+ %5 = fdiv double %11, 0.000000e+00 ; [#uses=1]
+ %6 = tail call double @sin(double %5) nounwind readonly ; [#uses=1]
+ br label %bb24.preheader
+
+bb22.preheader: ; preds = %bb24.preheader, %bb22.preheader
+ br label %bb22.preheader
+
+bb25: ; preds = %bb24.preheader
+ %7 = mul double 0.000000e+00, %6 ; [#uses=0]
+ %8 = add i32 %i3.122100, 0 ; [#uses=1]
+ %9 = icmp sgt i32 %8, 0 ; [#uses=1]
+ br i1 %9, label %bb3, label %bb24.preheader
+
+bb24.preheader: ; preds = %bb25, %bb18
+ %i3.122100 = or i32 0, 1 ; [#uses=2]
+ %10 = icmp slt i32 0, %i3.122100 ; [#uses=1]
+ br i1 %10, label %bb25, label %bb22.preheader
+
+bb30.loopexit: ; preds = %bb
+ %11 = mul double 0.000000e+00, 0x401921FB54442D1C ; [#uses=1]
+ br label %bb3
+}
+
+declare double @sin(double) nounwind readonly
From isanbard at gmail.com Mon Oct 27 18:22:50 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 27 Oct 2008 23:22:50 -0000
Subject: [llvm-commits] [llvm-gcc-4.2] r58295 -
/llvm-gcc-4.2/tags/llvmgcc42-2077.3/
Message-ID: <200810272322.m9RNMofa004593@zion.cs.uiuc.edu>
Author: void
Date: Mon Oct 27 18:22:50 2008
New Revision: 58295
URL: http://llvm.org/viewvc/llvm-project?rev=58295&view=rev
Log:
Copy from llvmgcc42-2077.2 to keep version numbers in sync with llvmCore.
Added:
llvm-gcc-4.2/tags/llvmgcc42-2077.3/
- copied from r58294, llvm-gcc-4.2/tags/llvmgcc42-2077.2/
From greened at obbligato.org Mon Oct 27 18:24:04 2008
From: greened at obbligato.org (David Greene)
Date: Mon, 27 Oct 2008 23:24:04 -0000
Subject: [llvm-commits] [llvm] r58296 -
/llvm/trunk/lib/Analysis/ValueTracking.cpp
Message-ID: <200810272324.m9RNO4SD004642@zion.cs.uiuc.edu>
Author: greened
Date: Mon Oct 27 18:24:03 2008
New Revision: 58296
URL: http://llvm.org/viewvc/llvm-project?rev=58296&view=rev
Log:
Re-apply 55137 with fixes.
Modified:
llvm/trunk/lib/Analysis/ValueTracking.cpp
Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=58296&r1=58295&r2=58296&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Mon Oct 27 18:24:03 2008
@@ -509,12 +509,15 @@
ComputeMaskedBits(R, Mask2, KnownZero2, KnownOne2, TD, Depth+1);
Mask2 = APInt::getLowBitsSet(BitWidth,
KnownZero2.countTrailingOnes());
- KnownOne2.clear();
- KnownZero2.clear();
- ComputeMaskedBits(L, Mask2, KnownZero2, KnownOne2, TD, Depth+1);
+
+ // We need to take the minimum number of known bits
+ APInt KnownZero3(KnownZero), KnownOne3(KnownOne);
+ ComputeMaskedBits(L, Mask2, KnownZero3, KnownOne3, TD, Depth+1);
+
KnownZero = Mask &
APInt::getLowBitsSet(BitWidth,
- KnownZero2.countTrailingOnes());
+ std::min(KnownZero2.countTrailingOnes(),
+ KnownZero3.countTrailingOnes()));
break;
}
}
From evan.cheng at apple.com Mon Oct 27 18:29:28 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Mon, 27 Oct 2008 23:29:28 -0000
Subject: [llvm-commits] [llvm] r58297 -
/llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
Message-ID: <200810272329.m9RNTSLO004863@zion.cs.uiuc.edu>
Author: evancheng
Date: Mon Oct 27 18:29:28 2008
New Revision: 58297
URL: http://llvm.org/viewvc/llvm-project?rev=58297&view=rev
Log:
Silence a bogus compile time warning.
Modified:
llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
Modified: llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp?rev=58297&r1=58296&r2=58297&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp (original)
+++ llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp Mon Oct 27 18:29:28 2008
@@ -543,9 +543,9 @@
// Add a spill either before the barrier or after the definition.
MachineBasicBlock *DefMBB = DefMI ? DefMI->getParent() : NULL;
const TargetRegisterClass *RC = MRI->getRegClass(CurrLI->reg);
- int SS;
unsigned SpillIndex = 0;
MachineInstr *SpillMI = NULL;
+ int SS = -1;
bool PrevSpilled = isAlreadySplit(CurrLI->reg, ValNo->id, SS);
if (ValNo->def == ~0U) {
// If it's defined by a phi, we must split just before the barrier.
From isanbard at gmail.com Mon Oct 27 18:31:24 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 27 Oct 2008 23:31:24 -0000
Subject: [llvm-commits] [llvm] r58298 - /llvm/trunk/utils/buildit/build_llvm
Message-ID: <200810272331.m9RNVOSl004936@zion.cs.uiuc.edu>
Author: void
Date: Mon Oct 27 18:31:24 2008
New Revision: 58298
URL: http://llvm.org/viewvc/llvm-project?rev=58298&view=rev
Log:
- Fix SUBVERSION string to handle x.x.x version number formats.
- Add VERBOSE=1 flag.
- Specify the LLVM_SUBMIT_VERSION when doing the "make install".
The libLTO.dylib relies upon this flag during that time.
Modified:
llvm/trunk/utils/buildit/build_llvm
Modified: llvm/trunk/utils/buildit/build_llvm
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/buildit/build_llvm?rev=58298&r1=58297&r2=58298&view=diff
==============================================================================
--- llvm/trunk/utils/buildit/build_llvm (original)
+++ llvm/trunk/utils/buildit/build_llvm Mon Oct 27 18:31:24 2008
@@ -89,7 +89,7 @@
|| exit 1
fi
-SUBVERSION=`echo $RC_ProjectSourceVersion | sed -e 's/.*\.//'`
+SUBVERSION=`echo $RC_ProjectSourceVersion | sed -e 's/[^.]*\.\([0-9]*\).*/\1/'`
if [ "x$SUBVERSION" != "x$RC_ProjectSourceVersion" ]; then
LLVM_SUBMIT_SUBVERSION=`printf "%02d" $SUBVERSION`
@@ -138,7 +138,8 @@
make $JOBS_FLAG $OPTIMIZE_OPTS UNIVERSAL=1 UNIVERSAL_ARCH="$TARGETS" \
LLVM_SUBMIT_VERSION=$LLVM_SUBMIT_VERSION \
LLVM_SUBMIT_SUBVERSION=$LLVM_SUBMIT_SUBVERSION \
- CXXFLAGS="-DLLVM_VERSION_INFO='\" Apple Build #$LLVM_VERSION\"'"
+ CXXFLAGS="-DLLVM_VERSION_INFO='\" Apple Build #$LLVM_VERSION\"'" \
+ VERBOSE=1
if ! test $? == 0 ; then
echo "error: LLVM 'make' failed!"
@@ -158,7 +159,9 @@
# Install the tree into the destination directory.
make $LOCAL_MAKEFLAGS $OPTIMIZE_OPTS UNIVERSAL=1 UNIVERSAL_ARCH="$TARGETS" \
- OPTIMIZE_OPTION='-O2' install
+ LLVM_SUBMIT_VERSION=$LLVM_SUBMIT_VERSION \
+ LLVM_SUBMIT_SUBVERSION=$LLVM_SUBMIT_SUBVERSION \
+ OPTIMIZE_OPTION='-O2' VERBOSE=1 install
if ! test $? == 0 ; then
echo "error: LLVM 'make install' failed!"
From isanbard at gmail.com Mon Oct 27 18:32:46 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 27 Oct 2008 23:32:46 -0000
Subject: [llvm-commits] [llvm-gcc-4.2] r58299 - in /llvm-gcc-4.2/tags:
Apple/llvmgcc42-2077.2/ llvmgcc42-2077.2/
Message-ID: <200810272332.m9RNWkiJ004981@zion.cs.uiuc.edu>
Author: void
Date: Mon Oct 27 18:32:46 2008
New Revision: 58299
URL: http://llvm.org/viewvc/llvm-project?rev=58299&view=rev
Log:
Move Apple tag into the Apple subdirectory.
Added:
llvm-gcc-4.2/tags/Apple/llvmgcc42-2077.2/
- copied from r58298, llvm-gcc-4.2/tags/llvmgcc42-2077.2/
Removed:
llvm-gcc-4.2/tags/llvmgcc42-2077.2/
From echristo at apple.com Mon Oct 27 18:39:02 2008
From: echristo at apple.com (Eric Christopher)
Date: Mon, 27 Oct 2008 16:39:02 -0700
Subject: [llvm-commits] [llvm-gcc-4.2] r58273 -
/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/cpp.exp
In-Reply-To: <4098B227-F7EB-4EAC-84AE-6B80697DBF44@apple.com>
References: <200810272109.m9RL9ZeY032289@zion.cs.uiuc.edu>
<7C97B4A8-5154-4BEF-BFA9-5153002CCE67@apple.com>
<4098B227-F7EB-4EAC-84AE-6B80697DBF44@apple.com>
Message-ID:
On Oct 27, 2008, at 4:12 PM, Dale Johannesen wrote:
> You may be right, but that appears to affect only generated files?
> That is not the problem here.
Hmm.. it used to, doesn't appear to anymore - it is part of the script
though (grep for Pragma) and probably affects the Makefiles used to
make sure that the time stamp is reasonable.
-eric
From isanbard at gmail.com Mon Oct 27 18:53:13 2008
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 27 Oct 2008 23:53:13 -0000
Subject: [llvm-commits] [llvm-gcc-4.2] r58301 - in /llvm-gcc-4.2/tags:
Apple/llvmgcc42-2077.3/ llvmgcc42-2077.3/
Message-ID: <200810272353.m9RNrDLD005631@zion.cs.uiuc.edu>
Author: void
Date: Mon Oct 27 18:53:12 2008
New Revision: 58301
URL: http://llvm.org/viewvc/llvm-project?rev=58301&view=rev
Log:
Move llvmgcc42-2077.3 into Apple directory.
Added:
llvm-gcc-4.2/tags/Apple/llvmgcc42-2077.3/
- copied from r58300, llvm-gcc-4.2/tags/llvmgcc42-2077.3/
Removed:
llvm-gcc-4.2/tags/llvmgcc42-2077.3/
From dalej at apple.com Mon Oct 27 19:36:37 2008
From: dalej at apple.com (Dale Johannesen)
Date: Mon, 27 Oct 2008 17:36:37 -0700
Subject: [llvm-commits] [llvm-gcc-4.2] r58273 -
/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/cpp.exp
In-Reply-To:
References: <200810272109.m9RL9ZeY032289@zion.cs.uiuc.edu>
<7C97B4A8-5154-4BEF-BFA9-5153002CCE67@apple.com>
<4098B227-F7EB-4EAC-84AE-6B80697DBF44@apple.com>
Message-ID: <7FE8A066-5C78-4553-969D-271A9F1CFCCE@apple.com>
That does look like it's trying to solve the same problem. OTOH,
it is not invoked automatically, at least not by the build+test
procedure we use here; I consider a solution contained within the
testsuite much cleaner; and that script looks like serious overkill for
the problem. So I'm inclined to leave it alone.
On Oct 27, 2008, at 4:39 PMPDT, Eric Christopher wrote:
> On Oct 27, 2008, at 4:12 PM, Dale Johannesen wrote:
>
>> You may be right, but that appears to affect only generated files?
>> That is not the problem here.
>
> Hmm.. it used to, doesn't appear to anymore - it is part of the script
> though (grep for Pragma) and probably affects the Makefiles used to
> make sure that the time stamp is reasonable.
>
> -eric
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From evan.cheng at apple.com Mon Oct 27 19:47:50 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 28 Oct 2008 00:47:50 -0000
Subject: [llvm-commits] [llvm] r58309 - in /llvm/trunk:
lib/CodeGen/PreAllocSplitting.cpp test/CodeGen/X86/pre-split8.ll
test/CodeGen/X86/pre-split9.ll
Message-ID: <200810280047.m9S0loPr008149@zion.cs.uiuc.edu>
Author: evancheng
Date: Mon Oct 27 19:47:49 2008
New Revision: 58309
URL: http://llvm.org/viewvc/llvm-project?rev=58309&view=rev
Log:
Avoid putting a split past the end of the live range; always shrink wrap live interval in the barrier mbb.
Added:
llvm/trunk/test/CodeGen/X86/pre-split8.ll
llvm/trunk/test/CodeGen/X86/pre-split9.ll
Modified:
llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
Modified: llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp?rev=58309&r1=58308&r2=58309&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp (original)
+++ llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp Mon Oct 27 19:47:49 2008
@@ -109,7 +109,7 @@
SmallPtrSet&, unsigned&);
MachineBasicBlock::iterator
- findRestorePoint(MachineBasicBlock*, MachineInstr*,
+ findRestorePoint(MachineBasicBlock*, MachineInstr*, unsigned,
SmallPtrSet&, unsigned&);
void RecordSplit(unsigned, unsigned, unsigned, int);
@@ -203,12 +203,15 @@
/// found.
MachineBasicBlock::iterator
PreAllocSplitting::findRestorePoint(MachineBasicBlock *MBB, MachineInstr *MI,
+ unsigned LastIdx,
SmallPtrSet &RefsInMBB,
unsigned &RestoreIndex) {
MachineBasicBlock::iterator Pt = MBB->end();
+ unsigned EndIdx = LIs->getMBBEndIdx(MBB);
- // Go bottom up if RefsInMBB is empty.
- if (RefsInMBB.empty()) {
+ // Go bottom up if RefsInMBB is empty and the end of the mbb isn't beyond
+ // the last index in the live range.
+ if (RefsInMBB.empty() && LastIdx >= EndIdx) {
MachineBasicBlock::iterator MII = MBB->end();
MachineBasicBlock::iterator EndPt = MI;
do {
@@ -224,8 +227,12 @@
} else {
MachineBasicBlock::iterator MII = MI;
MII = ++MII;
+ // FIXME: Limit the number of instructions to examine to reduce
+ // compile time?
while (MII != MBB->end()) {
unsigned Index = LIs->getInstructionIndex(MII);
+ if (Index > LastIdx)
+ break;
unsigned Gap = LIs->findGapBeforeInstr(Index);
if (Gap) {
Pt = MII;
@@ -438,13 +445,15 @@
// If live interval is live in another successor path, then we can't process
// this block. But we may able to do so after all the successors have been
// processed.
- for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(),
- SE = MBB->succ_end(); SI != SE; ++SI) {
- MachineBasicBlock *SMBB = *SI;
- if (SMBB == SuccMBB)
- continue;
- if (CurrLI->liveAt(LIs->getMBBStartIdx(SMBB)))
- return;
+ if (MBB != BarrierMBB) {
+ for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(),
+ SE = MBB->succ_end(); SI != SE; ++SI) {
+ MachineBasicBlock *SMBB = *SI;
+ if (SMBB == SuccMBB)
+ continue;
+ if (CurrLI->liveAt(LIs->getMBBStartIdx(SMBB)))
+ return;
+ }
}
Visited.insert(MBB);
@@ -536,7 +545,7 @@
// Find a point to restore the value after the barrier.
unsigned RestoreIndex;
MachineBasicBlock::iterator RestorePt =
- findRestorePoint(BarrierMBB, Barrier, RefsInMBB, RestoreIndex);
+ findRestorePoint(BarrierMBB, Barrier, LR->end, RefsInMBB, RestoreIndex);
if (RestorePt == BarrierMBB->end())
return false;
Added: llvm/trunk/test/CodeGen/X86/pre-split8.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pre-split8.ll?rev=58309&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/pre-split8.ll (added)
+++ llvm/trunk/test/CodeGen/X86/pre-split8.ll Mon Oct 27 19:47:49 2008
@@ -0,0 +1,35 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \
+; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 1
+
+ at current_surfaces.b = external global i1 ; [#uses=1]
+
+declare double @asin(double) nounwind readonly
+
+declare double @tan(double) nounwind readonly
+
+define fastcc void @trace_line(i32 %line) nounwind {
+entry:
+ %.b3 = load i1* @current_surfaces.b ; [#uses=1]
+ br i1 %.b3, label %bb, label %return
+
+bb: ; preds = %bb9.i, %entry
+ %.rle4 = phi double [ %7, %bb9.i ], [ 0.000000e+00, %entry ] ; [#uses=1]
+ %0 = load double* null, align 8 ; [#uses=3]
+ %1 = fcmp une double %0, 0.000000e+00 ; [#uses=1]
+ br i1 %1, label %bb9.i, label %bb13.i
+
+bb9.i: ; preds = %bb
+ %2 = sub double %.rle4, %0 ; [#uses=0]
+ %3 = tail call double @asin(double 0.000000e+00) nounwind readonly ; [#uses=0]
+ %4 = mul double 0.000000e+00, %0 ; [#uses=1]
+ %5 = tail call double @tan(double 0.000000e+00) nounwind readonly ; [#uses=0]
+ %6 = mul double %4, 0.000000e+00 ; [#uses=1]
+ %7 = add double %6, 0.000000e+00 ; [#uses=1]
+ br i1 false, label %return, label %bb
+
+bb13.i: ; preds = %bb
+ unreachable
+
+return: ; preds = %bb9.i, %entry
+ ret void
+}
Added: llvm/trunk/test/CodeGen/X86/pre-split9.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pre-split9.ll?rev=58309&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/pre-split9.ll (added)
+++ llvm/trunk/test/CodeGen/X86/pre-split9.ll Mon Oct 27 19:47:49 2008
@@ -0,0 +1,38 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \
+; RUN: grep {pre-alloc-split} | grep {Number of intervals split} | grep 1
+
+ at current_surfaces.b = external global i1 ; [#uses=1]
+
+declare double @sin(double) nounwind readonly
+
+declare double @asin(double) nounwind readonly
+
+declare double @tan(double) nounwind readonly
+
+define fastcc void @trace_line(i32 %line) nounwind {
+entry:
+ %.b3 = load i1* @current_surfaces.b ; [#uses=1]
+ br i1 %.b3, label %bb, label %return
+
+bb: ; preds = %bb9.i, %entry
+ %.rle4 = phi double [ %8, %bb9.i ], [ 0.000000e+00, %entry ] ; [#uses=1]
+ %0 = load double* null, align 8 ; [#uses=3]
+ %1 = fcmp une double %0, 0.000000e+00 ; [#uses=1]
+ br i1 %1, label %bb9.i, label %bb13.i
+
+bb9.i: ; preds = %bb
+ %2 = sub double %.rle4, %0 ; [#uses=0]
+ %3 = tail call double @asin(double 0.000000e+00) nounwind readonly ; [#uses=0]
+ %4 = tail call double @sin(double 0.000000e+00) nounwind readonly ; [#uses=1]
+ %5 = mul double %4, %0 ; [#uses=1]
+ %6 = tail call double @tan(double 0.000000e+00) nounwind readonly ; [#uses=0]
+ %7 = mul double %5, 0.000000e+00 ; [#uses=1]
+ %8 = add double %7, 0.000000e+00 ; [#uses=1]
+ br i1 false, label %return, label %bb
+
+bb13.i: ; preds = %bb
+ unreachable
+
+return: ; preds = %bb9.i, %entry
+ ret void
+}
From gohman at apple.com Mon Oct 27 19:52:46 2008
From: gohman at apple.com (Dan Gohman)
Date: Tue, 28 Oct 2008 00:52:46 -0000
Subject: [llvm-commits] [llvm] r58310 -
/llvm/trunk/include/llvm/Support/NoFolder.h
Message-ID: <200810280052.m9S0qkqn008297@zion.cs.uiuc.edu>
Author: djg
Date: Mon Oct 27 19:52:46 2008
New Revision: 58310
URL: http://llvm.org/viewvc/llvm-project?rev=58310&view=rev
Log:
Fix the name of the include guard to match the filename.
Modified:
llvm/trunk/include/llvm/Support/NoFolder.h
Modified: llvm/trunk/include/llvm/Support/NoFolder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/NoFolder.h?rev=58310&r1=58309&r2=58310&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/NoFolder.h (original)
+++ llvm/trunk/include/llvm/Support/NoFolder.h Mon Oct 27 19:52:46 2008
@@ -20,8 +20,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_SUPPORT_NULLFOLDER_H
-#define LLVM_SUPPORT_NULLFOLDER_H
+#ifndef LLVM_SUPPORT_NOFOLDER_H
+#define LLVM_SUPPORT_NOFOLDER_H
#include "llvm/Constants.h"
#include "llvm/Instructions.h"
From gohman at apple.com Mon Oct 27 20:00:31 2008
From: gohman at apple.com (Dan Gohman)
Date: Mon, 27 Oct 2008 18:00:31 -0700
Subject: [llvm-commits] [llvm] r58278 - in /llvm/trunk:
include/llvm/CodeGen/DAGISelHeader.h
lib/Target/ARM/ARMISelDAGToDAG.cpp
lib/Target/Alpha/AlphaISelDAGToDAG.cpp
lib/Target/CellSPU/SPUISelDAGToDAG.cpp
lib/Target/IA64/IA64ISelDAGToDAG.cpp
lib/Target/Mips/MipsISelDAGToDAG.cpp
lib/Target/PIC16/PIC16ISelDAGToDAG.cpp
lib/Target/PowerPC/PPCISelDAGToDAG.cpp
lib/Target/Sparc/SparcISelDAGToDAG.cpp
lib/Target/X86/X86ISelDAGToDAG.cpp utils/TableGen/DAGISelEmitter.cpp
In-Reply-To: <200810272156.m9RLuT7v001548@zion.cs.uiuc.edu>
References: <200810272156.m9RLuT7v001548@zion.cs.uiuc.edu>
Message-ID: <4F0BF11F-0920-4FC4-977D-7E12E5AA2A86@apple.com>
On Oct 27, 2008, at 2:56 PM, David Greene wrote:
> Author: greened
> Date: Mon Oct 27 16:56:29 2008
> New Revision: 58278
>
> URL: http://llvm.org/viewvc/llvm-project?rev=58278&view=rev
> Log:
>
> Have TableGen emit setSubgraphColor calls under control of a -gen-
> debug
> flag. Then in a debugger developers can set breakpoints at these
> calls
> to see waht is about to be selected and what the resulting subgraph
> looks like. This really helps when debugging instruction selection.
Cool! Comments below.
>
>
> Modified:
> llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h
> llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp
> llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
> llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp
> llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp
> llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp
> llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp
> llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
> llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp
> llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
> llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
>
> Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=58278&r1=58277&r2=58278&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original)
> +++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Mon Oct 27
> 16:56:29 2008
> @@ -153,7 +153,7 @@
>
> /// SelectRoot - Top level entry to DAG instruction selector.
> /// Selects instructions starting at the root of the current DAG.
> -void SelectRoot() {
> +void SelectRoot(SelectionDAG &DAG) {
This DAG parameter shouldn't be necessary. SelectRoot is a member
of SelectionDAGISel, where it can access the CurDAG member.
>
> SelectRootInit();
> unsigned NumBytes = (DAGSize + 7) / 8;
> ISelQueued = new unsigned char[NumBytes];
> @@ -176,14 +176,18 @@
> // Skip already selected nodes.
> if (isSelected(Node->getNodeId()))
> continue;
> + DAG.setSubgraphColor(Node, "red");
I think this line should be guarded by #ifndef NDEBUG, so that
it doesn't slow down release mode. Either that, or perhaps
setSubgraphColor itself should be an empty inline function in
the NDEBUG case.
>
> SDNode *ResNode = Select(SDValue(Node, 0));
> // If node should not be replaced,
> // continue with the next one.
> if (ResNode == Node)
> continue;
> // Replace node.
> - if (ResNode)
> + if (ResNode) {
> + DAG.setSubgraphColor(ResNode, "yellow");
> + DAG.setSubgraphColor(ResNode, "black");
Setting the node to yellow and then immediately to black?
>
> ReplaceUses(Node, ResNode);
> + }
> // If after the replacement this node is not used any more,
> // remove this dead node.
> if (Node->use_empty()) { // Don't delete EntryToken, etc.
> @@ -191,6 +195,7 @@
> CurDAG->RemoveDeadNode(Node, &ISQU);
> UpdateQueue(ISQU);
> }
> + //DAG.setSubgraphColor(Node, "black");
Please decide what to do this code, instead of just
leaving it here commented out.
>
> }
>
> delete[] ISelQueued;
>
> Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=58278&r1=58277&r2=58278&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original)
> +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Mon Oct 27 16:56:29
> 2008
> @@ -14,13 +14,21 @@
> #include "DAGISelEmitter.h"
> #include "Record.h"
> #include "llvm/ADT/StringExtras.h"
> +#include "llvm/Support/CommandLine.h"
> #include "llvm/Support/Debug.h"
> #include "llvm/Support/MathExtras.h"
> +#include "llvm/Support/Debug.h"
> #include "llvm/Support/Streams.h"
> #include
> #include
> using namespace llvm;
>
> +namespace {
> + cl::opt
> + GenDebug("gen-debug", cl::desc("Generate debug code"),
> + cl::init(false));
> +}
As a tablegen option, this cool functionality is somewhat
out of common view. Would it make sense to turn this functionality
on by default, with the code guarded by #ifndef NDEBUG?
>
> +
> //
> =
> =
> =
> ----------------------------------------------------------------------=
> ==//
> // DAGISelEmitter Helper methods
> //
> @@ -969,6 +977,10 @@
> emitCode("InChains.push_back(" + ChainName + ");");
> emitCode(ChainName + " = CurDAG->getNode(ISD::TokenFactor,
> MVT::Other, "
> "&InChains[0], InChains.size());");
> + if (GenDebug) {
> + emitCode("CurDAG->setSubgraphColor(" + ChainName
> +".getNode(), \"yellow\");");
> + emitCode("CurDAG->setSubgraphColor(" + ChainName
> +".getNode(), \"black\");");
> + }
Again, yellow and then immediately black?
>
> }
>
> // Loop over all of the operands of the instruction pattern,
> emitting code
> @@ -1096,13 +1108,18 @@
> if (II.isSimpleLoad | II.mayLoad | II.mayStore) {
> std::vector::const_iterator mi, mie;
> for (mi = LSI.begin(), mie = LSI.end(); mi != mie; ++mi) {
> - emitCode("SDValue LSI_" + *mi + " = "
> + std::string LSIName = "LSI_" + *mi;
> + emitCode("SDValue " + LSIName + " = "
> "CurDAG->getMemOperand(cast(" +
> *mi + ")->getMemOperand());");
> + if (GenDebug) {
> + emitCode("CurDAG->setSubgraphColor(" + LSIName
> +".getNode(), \"yellow\");");
> + emitCode("CurDAG->setSubgraphColor(" + LSIName
> +".getNode(), \"black\");");
> + }
> if (IsVariadic)
> - emitCode("Ops" + utostr(OpsNo) + ".push_back(LSI_" +
> *mi + ");");
> + emitCode("Ops" + utostr(OpsNo) + ".push_back(" +
> LSIName + ");");
> else
> - AllOps.push_back("LSI_" + *mi);
> + AllOps.push_back(LSIName);
> }
> }
>
> @@ -1269,6 +1286,18 @@
> }
>
> emitCode(CodePrefix + Code + ");");
> +
> + if (GenDebug) {
> + if (!isRoot) {
> + emitCode("CurDAG->setSubgraphColor(" + NodeName
> +".getNode(), \"yellow\");");
> + emitCode("CurDAG->setSubgraphColor(" + NodeName
> +".getNode(), \"black\");");
> + }
> + else {
> + emitCode("CurDAG->setSubgraphColor(" + NodeName +",
> \"yellow\");");
> + emitCode("CurDAG->setSubgraphColor(" + NodeName +",
> \"black\");");
> + }
> + }
> +
> for (unsigned i = 0, e = After.size(); i != e; ++i)
> emitCode(After[i]);
>
> @@ -1766,8 +1795,19 @@
>
> // Replace the emission code within selection routines with
> calls to the
> // emission functions.
> - CallerCode = "return Emit_" + utostr(EmitFuncNum) +
> CallerCode;
> - GeneratedCode.push_back(std::make_pair(false, CallerCode));
> + if (GenDebug) {
> + GeneratedCode.push_back(std::make_pair(0, "CurDAG-
> >setSubgraphColor(N.getNode(), \"red\");"));
> + }
> + CallerCode = "SDNode *Result = Emit_" + utostr(EmitFuncNum)
> + CallerCode;
> + GeneratedCode.push_back(std::make_pair(3, CallerCode));
> + if (GenDebug) {
> + GeneratedCode.push_back(std::make_pair(0, "if(Result) {"));
> + GeneratedCode.push_back(std::make_pair(0, " CurDAG-
> >setSubgraphColor(Result, \"yellow\");"));
> + GeneratedCode.push_back(std::make_pair(0, " CurDAG-
> >setSubgraphColor(Result, \"black\");"));
> + GeneratedCode.push_back(std::make_pair(0, "}"));
> + //GeneratedCode.push_back(std::make_pair(0, "CurDAG-
> >setSubgraphColor(N.getNode(), \"black\");"));
> + }
> + GeneratedCode.push_back(std::make_pair(0, "return Result;"));
> }
>
> // Print function.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
From echristo at apple.com Mon Oct 27 20:11:26 2008
From: echristo at apple.com (Eric Christopher)
Date: Mon, 27 Oct 2008 18:11:26 -0700
Subject: [llvm-commits] [llvm-gcc-4.2] r58273 -
/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/cpp.exp
In-Reply-To: <7FE8A066-5C78-4553-969D-271A9F1CFCCE@apple.com>
References: <200810272109.m9RL9ZeY032289@zion.cs.uiuc.edu>
<7C97B4A8-5154-4BEF-BFA9-5153002CCE67@apple.com>
<4098B227-F7EB-4EAC-84AE-6B80697DBF44@apple.com>
<7FE8A066-5C78-4553-969D-271A9F1CFCCE@apple.com>
Message-ID: <3C6576B7-7366-4528-BD5A-19B6F4C137B8@apple.com>
On Oct 27, 2008, at 5:36 PM, Dale Johannesen wrote:
> That does look like it's trying to solve the same problem. OTOH,
> it is not invoked automatically, at least not by the build+test
> procedure we use here; I consider a solution contained within the
> testsuite much cleaner; and that script looks like serious overkill
> for
> the problem. So I'm inclined to leave it alone.
The script solves the problem for more than just that test.
-eric
From dalej at apple.com Mon Oct 27 20:15:28 2008
From: dalej at apple.com (Dale Johannesen)
Date: Mon, 27 Oct 2008 18:15:28 -0700
Subject: [llvm-commits] [llvm-gcc-4.2] r58273 -
/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/cpp.exp
In-Reply-To: <3C6576B7-7366-4528-BD5A-19B6F4C137B8@apple.com>
References: <200810272109.m9RL9ZeY032289@zion.cs.uiuc.edu>
<7C97B4A8-5154-4BEF-BFA9-5153002CCE67@apple.com>
<4098B227-F7EB-4EAC-84AE-6B80697DBF44@apple.com>
<7FE8A066-5C78-4553-969D-271A9F1CFCCE@apple.com>
<3C6576B7-7366-4528-BD5A-19B6F4C137B8@apple.com>
Message-ID: <9906EE7E-773D-4AB1-A5B2-80956C79A728@apple.com>
On Oct 27, 2008, at 6:11 PMPDT, Eric Christopher wrote:
>
> On Oct 27, 2008, at 5:36 PM, Dale Johannesen wrote:
>
>> That does look like it's trying to solve the same problem. OTOH,
>> it is not invoked automatically, at least not by the build+test
>> procedure we use here; I consider a solution contained within the
>> testsuite much cleaner; and that script looks like serious overkill
>> for
>> the problem. So I'm inclined to leave it alone.
>
> The script solves the problem for more than just that test.
That would certainly be a reason to use it, but AFAIK nobody has run
into a similar problem anywhere else.
From echristo at apple.com Mon Oct 27 20:16:20 2008
From: echristo at apple.com (Eric Christopher)
Date: Mon, 27 Oct 2008 18:16:20 -0700
Subject: [llvm-commits] [llvm-gcc-4.2] r58273 -
/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/cpp/cpp.exp
In-Reply-To: <9906EE7E-773D-4AB1-A5B2-80956C79A728@apple.com>
References: <200810272109.m9RL9ZeY032289@zion.cs.uiuc.edu>
<7C97B4A8-5154-4BEF-BFA9-5153002CCE67@apple.com>
<4098B227-F7EB-4EAC-84AE-6B80697DBF44@apple.com>
<7FE8A066-5C78-4553-969D-271A9F1CFCCE@apple.com>
<3C6576B7-7366-4528-BD5A-19B6F4C137B8@apple.com>
<9906EE7E-773D-4AB1-A5B2-80956C79A728@apple.com>
Message-ID: <3EA6E2DB-13A3-4398-81FA-C8DF2CD96DBB@apple.com>
On Oct 27, 2008, at 6:15 PM, Dale Johannesen wrote:
>
> On Oct 27, 2008, at 6:11 PMPDT, Eric Christopher wrote:
>
>>
>> On Oct 27, 2008, at 5:36 PM, Dale Johannesen wrote:
>>
>>> That does look like it's trying to solve the same problem. OTOH,
>>> it is not invoked automatically, at least not by the build+test
>>> procedure we use here; I consider a solution contained within the
>>> testsuite much cleaner; and that script looks like serious overkill
>>> for
>>> the problem. So I'm inclined to leave it alone.
>>
>> The script solves the problem for more than just that test.
>
> That would certainly be a reason to use it, but AFAIK nobody has run
> into a similar problem anywhere else.
"Yet" and that's because we don't get far enough in some other
languages.
-eric
From evan.cheng at apple.com Mon Oct 27 20:48:25 2008
From: evan.cheng at apple.com (Evan Cheng)
Date: Tue, 28 Oct 2008 01:48:25 -0000
Subject: [llvm-commits] [llvm] r58312 -
/llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
Message-ID: <200810280148.m9S1mPJL010024@zion.cs.uiuc.edu>
Author: evancheng
Date: Mon Oct 27 20:48:24 2008
New Revision: 58312
URL: http://llvm.org/viewvc/llvm-project?rev=58312&view=rev
Log:
Add command line option to limit the number splits to help debugging.
Modified:
llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
Modified: llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp?rev=58312&r1=58311&r2=58312&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp (original)
+++ llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp Mon Oct 27 20:48:24 2008
@@ -33,7 +33,9 @@
#include