From jlaskey at apple.com Mon Jun 19 07:54:28 2006 From: jlaskey at apple.com (Jim Laskey) Date: Mon, 19 Jun 2006 07:54:28 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/MachineDebugInfo.cpp Message-ID: <200606191254.HAA28948@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: MachineDebugInfo.cpp updated: 1.42 -> 1.43 --- Log message: Handle versioning of compile unit. --- Diffs of the changes: (+6 -0) MachineDebugInfo.cpp | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm/lib/CodeGen/MachineDebugInfo.cpp diff -u llvm/lib/CodeGen/MachineDebugInfo.cpp:1.42 llvm/lib/CodeGen/MachineDebugInfo.cpp:1.43 --- llvm/lib/CodeGen/MachineDebugInfo.cpp:1.42 Fri Jun 16 08:14:03 2006 +++ llvm/lib/CodeGen/MachineDebugInfo.cpp Mon Jun 19 07:54:15 2006 @@ -614,6 +614,12 @@ /// void CompileUnitDesc::ApplyToFields(DIVisitor *Visitor) { AnchoredDesc::ApplyToFields(Visitor); + + // Handle cases out of sync with compiler. + if (getVersion() == 0) { + unsigned DebugVersion; + Visitor->Apply(DebugVersion); + } Visitor->Apply(Language); Visitor->Apply(FileName); From jlaskey at apple.com Mon Jun 19 07:54:27 2006 From: jlaskey at apple.com (Jim Laskey) Date: Mon, 19 Jun 2006 07:54:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/IntrinsicInst.cpp Message-ID: <200606191254.HAA28944@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: IntrinsicInst.cpp updated: 1.7 -> 1.8 --- Log message: Handle versioning of compile unit. --- Diffs of the changes: (+5 -0) IntrinsicInst.cpp | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/lib/VMCore/IntrinsicInst.cpp diff -u llvm/lib/VMCore/IntrinsicInst.cpp:1.7 llvm/lib/VMCore/IntrinsicInst.cpp:1.8 --- llvm/lib/VMCore/IntrinsicInst.cpp:1.7 Fri Jun 16 18:36:12 2006 +++ llvm/lib/VMCore/IntrinsicInst.cpp Mon Jun 19 07:54:15 2006 @@ -29,6 +29,7 @@ #include "llvm/Constants.h" #include "llvm/GlobalVariable.h" +#include "llvm/CodeGen/MachineDebugInfo.h" using namespace llvm; @@ -59,12 +60,16 @@ /// std::string DbgStopPointInst::getFileName() const { + // Once the operand indices are verified, update this assert + assert(LLVMDebugVersion == (4 << 16) && "Verify operand indices"); GlobalVariable *GV = cast(getContext()); ConstantStruct *CS = cast(GV->getInitializer()); return CS->getOperand(3)->getStringValue(); } std::string DbgStopPointInst::getDirectory() const { + // Once the operand indices are verified, update this assert + assert(LLVMDebugVersion == (4 << 16) && "Verify operand indices"); GlobalVariable *GV = cast(getContext()); ConstantStruct *CS = cast(GV->getInitializer()); return CS->getOperand(4)->getStringValue(); From alenhar2 at cs.uiuc.edu Mon Jun 19 09:55:40 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Mon, 19 Jun 2006 09:55:40 -0500 Subject: [llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp PoolAllocate.h TransformFunctionBody.cpp Message-ID: <200606191455.JAA30211@zion.cs.uiuc.edu> Changes in directory llvm-poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.123 -> 1.124 PoolAllocate.h updated: 1.49 -> 1.50 TransformFunctionBody.cpp updated: 1.52 -> 1.53 --- Log message: add an option to use the td graph to resolve unresolved call sites. Also always check the BU DSNode for info if the callgraph fails us. --- Diffs of the changes: (+49 -5) PoolAllocate.cpp | 11 +++++++++++ PoolAllocate.h | 2 ++ TransformFunctionBody.cpp | 41 ++++++++++++++++++++++++++++++++++++----- 3 files changed, 49 insertions(+), 5 deletions(-) Index: llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.123 llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.124 --- llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.123 Wed Jan 25 16:07:36 2006 +++ llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp Mon Jun 19 09:55:28 2006 @@ -26,6 +26,7 @@ #include "llvm/Target/TargetData.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Transforms/Utils/Cloning.h" +#include "llvm/Analysis/DataStructure/CallTargets.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" @@ -76,6 +77,10 @@ cl::opt DisablePoolFreeOpt("poolalloc-force-all-poolfrees", cl::desc("Do not try to elide poolfree's where possible")); + + cl::opt + UseTDResolve("poolalloc-usetd-resolve", + cl::desc("Use Top-Down Graph as a resolve source")); } void PoolAllocate::getAnalysisUsage(AnalysisUsage &AU) const { @@ -93,6 +98,8 @@ AU.setPreservesAll(); #endif AU.addRequired(); + if (UseTDResolve) + AU.addRequired(); } bool PoolAllocate::runOnModule(Module &M) { @@ -102,6 +109,10 @@ #endif CurModule = &M; ECGraphs = &getAnalysis(); // folded inlined CBU graphs + if (UseTDResolve) + CTF = &getAnalysis(); + else + CTF = 0; CurHeuristic = Heuristic::create(); CurHeuristic->Initialize(M, ECGraphs->getGlobalsGraph(), *this); Index: llvm-poolalloc/lib/PoolAllocate/PoolAllocate.h diff -u llvm-poolalloc/lib/PoolAllocate/PoolAllocate.h:1.49 llvm-poolalloc/lib/PoolAllocate/PoolAllocate.h:1.50 --- llvm-poolalloc/lib/PoolAllocate/PoolAllocate.h:1.49 Wed Jun 14 16:17:32 2006 +++ llvm-poolalloc/lib/PoolAllocate/PoolAllocate.h Mon Jun 19 09:55:28 2006 @@ -43,6 +43,7 @@ class Type; class AllocaInst; class EquivClassGraphs; +class CallTargetFinder; namespace PA { @@ -122,6 +123,7 @@ Module *CurModule; EquivClassGraphs *ECGraphs; + CallTargetFinder* CTF; std::map FunctionInfo; std::map CloneToOrigMap; Index: llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.52 llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.53 --- llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.52 Thu Apr 13 09:07:35 2006 +++ llvm-poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Mon Jun 19 09:55:28 2006 @@ -15,6 +15,7 @@ #include "PoolAllocate.h" #include "llvm/Analysis/DataStructure/DataStructure.h" #include "llvm/Analysis/DataStructure/DSGraph.h" +#include "llvm/Analysis/DataStructure/CallTargets.h" #include "llvm/Module.h" #include "llvm/DerivedTypes.h" #include "llvm/Constants.h" @@ -34,6 +35,7 @@ PoolAllocate &PAInfo; DSGraph &G; // The Bottom-up DS Graph FuncInfo &FI; + CallTargetFinder* CTF; // PoolUses - For each pool (identified by the pool descriptor) keep track // of which blocks require the memory in the pool to not be freed. This @@ -47,8 +49,9 @@ FuncTransform(PoolAllocate &P, DSGraph &g, FuncInfo &fi, std::multimap &poolUses, - std::multimap &poolFrees) - : PAInfo(P), G(g), FI(fi), + std::multimap &poolFrees, + CallTargetFinder* ctf) + : PAInfo(P), G(g), FI(fi), CTF(ctf), PoolUses(poolUses), PoolFrees(poolFrees) { } @@ -115,7 +118,7 @@ std::multimap &poolUses, std::multimap &poolFrees, Function &F) { - FuncTransform(*this, g, fi, poolUses, poolFrees).visit(F); + FuncTransform(*this, g, fi, poolUses, poolFrees, CTF).visit(F); } @@ -519,11 +522,39 @@ CF = I->second; break; } - + + // If we didn't find the callee in the constructed call graph, try + // checking in the DSNode itself. + // This isn't ideal as it means that this call site didn't have inlining + // happen. + if (!CF) { + DSGraph* dg = &ECGraphs.getDSGraph(*OrigInst->getParent()->getParent()); + DSNode* d = dg->getNodeForValue(OrigInst->getOperand(0)).getNode(); + const std::vector &g = d->getGlobalsList(); + for(std::vector::const_iterator ii = g.begin(), ee = g.end(); + !CF && ii != ee; ++ii) { + EquivalenceClasses< GlobalValue *> & EC = ECGraphs.getGlobalECs(); + for (EquivalenceClasses::member_iterator MI = EC.findLeader(*ii); + MI != EC.member_end(); ++MI) // Loop over members in this set. + if ((CF = dyn_cast(*MI))) { + std::cerr << "\n***\nPA: *** WARNING (FuncTransform::visitCallSite): " + << "Using DSNode for callees for call-site in function " + << CS.getCaller()->getName() << "\n***\n"; + break; + } + } + } + + if (!CF && CTF) { + std::cerr << "\nPA: Last Resort TD Indirect Resolve in " << CS.getCaller()->getName() << "\n"; + CF = *CTF->begin(isa(OrigInst)?CallSite(cast(OrigInst)) + :CallSite(cast(OrigInst))); + if (CF) std::cerr << "TD resolved to " << CF->getName() << "\n"; + } if (!CF) { // FIXME: Unknown callees for a call-site. Warn and ignore. - std::cerr << "\n***\n*** WARNING (FuncTransform::visitCallSite): " + std::cerr << "\n***\nPA: *** WARNING (FuncTransform::visitCallSite): " << "Unknown callees for call-site in function " << CS.getCaller()->getName() << "\n***\n"; return; From dhurjati at cs.uiuc.edu Mon Jun 19 10:01:39 2006 From: dhurjati at cs.uiuc.edu (Dinakar Dhurjati) Date: Mon, 19 Jun 2006 10:01:39 -0500 Subject: [llvm-commits] CVS: llvm-www/pubs/2006-05-24-SAFECode-BoundsCheck.html 2006-05-24-SAFECode-BoundsCheck.pdf Message-ID: <200606191501.KAA30327@zion.cs.uiuc.edu> Changes in directory llvm-www/pubs: 2006-05-24-SAFECode-BoundsCheck.html added (r1.1) 2006-05-24-SAFECode-BoundsCheck.pdf added (r1.1) --- Log message: Added SAFECode ICSE paper --- Diffs of the changes: (+65 -0) 2006-05-24-SAFECode-BoundsCheck.html | 65 +++++++++++++++++++++++++++++++++++ 2006-05-24-SAFECode-BoundsCheck.pdf | 0 2 files changed, 65 insertions(+) Index: llvm-www/pubs/2006-05-24-SAFECode-BoundsCheck.html diff -c /dev/null llvm-www/pubs/2006-05-24-SAFECode-BoundsCheck.html:1.1 *** /dev/null Mon Jun 19 10:01:37 2006 --- llvm-www/pubs/2006-05-24-SAFECode-BoundsCheck.html Mon Jun 19 10:01:27 2006 *************** *** 0 **** --- 1,65 ---- + + + + + + Backwards-Compatible Array Bounds Checking for C + with Very Low Overhead + + + +
+ Backwards-Compatible Array Bounds Checking for C with Very Low Overhead +
+
+ Dinakar Dhurjati and Vikram Adve +
+ +

Abstract:

+
+ The problem of enforcing correct usage of array and pointer references in C + and C++ programs remains unsolved. The approach proposed by Jones and Kelly + (extended by Ruwase and Lam) is the only one we know of that does not require + significant manual changes to programs, but it has extremely high overheads of + 5x-6x and 11x--12x in the two versions. In this paper, we describe a + collection of techniques that dramatically reduce the overhead of this + approach, by exploiting a fine-grain partitioning of memory called Automatic + Pool Allocation. Together, these techniques bring the average overhead checks + down to only 12\% for a set of benchmarks (but 69\% for one case). + We show that the memory partitioning is key to bringing down this overhead. + We also show that our technique successfully detects all buffer overrun + violations in a test suite modeling reported violations in some important + real-world programs. +
+ +

Published:

+
+ "Backwards-Compatible Array Bounds Checking for C + with Very Low Overhead", Dinakar Dhurjati and Vikram Adve.
+ Proceedings of the 28th International Conference on Software Engineering (ICSE '06), Shanghai, China, 2006. +
+ +

Download:

+ + +

BibTeX Entry:

+ +
+ @techreport{da06icse,
+   author = {Dinakar Dhurjati and Vikram Adve},
+   title = "{Backwards-Compatible Array Bounds Checking for C with Very Low Overhead}",
+   booktitle = "{Proceedings of the 2006 International Conference on Software Engineering (ICSE'06)}",
+   address   = {Shanghai, China},
+   month     = {May},
+   year      = {2006}
+   url       = {http://llvm.org/pubs/2006-05-24-SAFECode-BoundsCheck.html}
+ }
+ 
+ + + Index: llvm-www/pubs/2006-05-24-SAFECode-BoundsCheck.pdf From alenhar2 at cs.uiuc.edu Mon Jun 19 10:42:59 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Mon, 19 Jun 2006 10:42:59 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200606191542.KAA30986@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.246 -> 1.247 --- Log message: Fix a bug, don't drop indirect call sites, especially if there is nothing known about them yet, and restore a simple version of a removed function --- Diffs of the changes: (+27 -1) DataStructure.cpp | 28 +++++++++++++++++++++++++++- 1 files changed, 27 insertions(+), 1 deletion(-) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.246 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.247 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.246 Wed May 24 12:04:03 2006 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Mon Jun 19 10:42:47 2006 @@ -938,7 +938,10 @@ // two node handles, since "this" may get merged away at intermediate steps. DSNodeHandle CurNodeH(this, Offset); DSNodeHandle NHCopy(NH); - DSNode::MergeNodes(CurNodeH, NHCopy); + if (CurNodeH.getOffset() >= NHCopy.getOffset()) + DSNode::MergeNodes(CurNodeH, NHCopy); + else + DSNode::MergeNodes(NHCopy, CurNodeH); } @@ -1594,6 +1597,13 @@ for (afc_iterator I = Graph.afc_begin(), E = Graph.afc_end(); I!=E; ++I) if (SCCFinder.PathExistsToClonedNode(*I)) AuxCallToCopy.push_back(&*I); + else if (I->isIndirectCall()){ + //If the call node doesn't have any callees, clone it + std::vector< Function *> List; + I->getCalleeNode()->addFullFunctionList(List); + if (!List.size()) + AuxCallToCopy.push_back(&*I); + } const DSScalarMap &GSM = Graph.getScalarMap(); for (DSScalarMap::global_iterator GI = GSM.global_begin(), @@ -2397,3 +2407,19 @@ computeNodeMapping(CalleeSM[*GI], CallerSM[*GI], NodeMap); } } + +/// updateFromGlobalGraph - This function rematerializes global nodes and +/// nodes reachable from them from the globals graph into the current graph. +/// +void DSGraph::updateFromGlobalGraph() { + TIME_REGION(X, "updateFromGlobalGraph"); + ReachabilityCloner RC(*this, *GlobalsGraph, 0); + + // Clone the non-up-to-date global nodes into this graph. + for (DSScalarMap::global_iterator I = getScalarMap().global_begin(), + E = getScalarMap().global_end(); I != E; ++I) { + DSScalarMap::iterator It = GlobalsGraph->ScalarMap.find(*I); + if (It != GlobalsGraph->ScalarMap.end()) + RC.merge(getNodeForValue(*I), It->second); + } +} From jlaskey at apple.com Mon Jun 19 10:48:12 2006 From: jlaskey at apple.com (Jim Laskey) Date: Mon, 19 Jun 2006 10:48:12 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200606191548.KAA31030@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.63 -> 1.64 --- Log message: References need to be section relative. --- Diffs of the changes: (+1 -1) DwarfWriter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.63 llvm/lib/CodeGen/DwarfWriter.cpp:1.64 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.63 Fri Jun 16 08:14:03 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Mon Jun 19 10:48:00 2006 @@ -2152,7 +2152,7 @@ EmitInt16(DWARF_VERSION); EOL("DWARF Version"); - EmitReference("info_begin", Unit->getID()); + EmitDifference("info_begin", Unit->getID(), "section_info", 0); EOL("Offset of Compilation Unit Info"); EmitDifference("info_end", Unit->getID(), "info_begin", Unit->getID()); From alenhar2 at cs.uiuc.edu Mon Jun 19 13:23:11 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Mon, 19 Jun 2006 13:23:11 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Message-ID: <200606191823.NAA32346@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.118 -> 1.119 --- Log message: Do partial inlining in BU. This resolves more call sites. Also add options to merge in globals during recursion and to back annotate DSNodes when function pointers are resolved. This makes PA work for a whole lot more things (unresolved call sites being what has been killing various DSA based passes) --- Diffs of the changes: (+171 -61) BottomUpClosure.cpp | 232 ++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 171 insertions(+), 61 deletions(-) Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.118 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.119 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.118 Wed Apr 19 10:33:35 2006 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Mon Jun 19 13:22:59 2006 @@ -13,11 +13,13 @@ // applications like alias analysis. // //===----------------------------------------------------------------------===// - +#define DEBUG_TYPE "bu_dsa" #include "llvm/Analysis/DataStructure/DataStructure.h" #include "llvm/Analysis/DataStructure/DSGraph.h" #include "llvm/Module.h" +#include "llvm/DerivedTypes.h" #include "llvm/ADT/Statistic.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Timer.h" #include @@ -28,10 +30,20 @@ Statistic<> NumBUInlines("budatastructures", "Number of graphs inlined"); Statistic<> NumCallEdges("budatastructures", "Number of 'actual' call edges"); + cl::opt + AddGlobals("budatastructures-annotate-calls", + cl::desc("Annotate call sites with functions as they are resolved")); + cl::opt + UpdateGlobals("budatastructures-update-from-globals", + cl::desc("Update local graph from global graph when processing function")); + RegisterAnalysis X("budatastructure", "Bottom-up Data Structure Analysis"); } +static bool GetAllCallees(const DSCallSite &CS, + std::vector &Callees); + /// BuildGlobalECs - Look at all of the nodes in the globals graph. If any node /// contains multiple globals, DSA will never, ever, be able to tell the globals /// apart. Instead of maintaining this information in all of the graphs @@ -114,6 +126,26 @@ DEBUG(if(MadeChange) G.AssertGraphOK()); } +static void AddGlobalToNode(BUDataStructures* B, DSCallSite D, Function* F) { + if(!AddGlobals) + return; + if(D.isIndirectCall()) { + DSGraph* GI = &B->getDSGraph(D.getCaller()); + DSNodeHandle& NHF = GI->getNodeForValue(F); + DSCallSite DL = GI->getDSCallSiteForCallSite(D.getCallSite()); + if (DL.getCalleeNode() != NHF.getNode() || NHF.isNull()) { + if (NHF.isNull()) { + DSNode *N = new DSNode(F->getType()->getElementType(), GI); // Create the node + N->addGlobal(F); + NHF.setTo(N,0); + DEBUG(std::cerr << "Adding " << F->getName() << " to a call node in " + << D.getCaller().getName() << "\n"); + } + DL.getCalleeNode()->mergeWith(NHF, 0); + } + } +} + // run - Calculate the bottom up data structure graphs for each function in the // program. // @@ -132,6 +164,7 @@ unsigned NextID = 1; Function *MainFunc = M.getMainFunction(); + if (MainFunc) calculateGraphs(MainFunc, Stack, NextID, ValMap); @@ -146,8 +179,6 @@ calculateGraphs(I, Stack, NextID, ValMap); // Calculate all graphs. } - NumCallEdges += ActualCallees.size(); - // If we computed any temporary indcallgraphs, free them now. for (std::map, std::pair > >::iterator I = @@ -187,9 +218,8 @@ if (MainFunc && !MainFunc->isExternal()) { DSGraph &MainGraph = getOrCreateGraph(MainFunc); const DSGraph &GG = *MainGraph.getGlobalsGraph(); - ReachabilityCloner RC(MainGraph, GG, - DSGraph::DontCloneCallNodes | - DSGraph::DontCloneAuxCallNodes); + ReachabilityCloner RC(MainGraph, GG, DSGraph::DontCloneCallNodes | + DSGraph::DontCloneAuxCallNodes); // Clone the global nodes into this graph. for (DSScalarMap::global_iterator I = GG.getScalarMap().global_begin(), @@ -200,8 +230,26 @@ MainGraph.maskIncompleteMarkers(); MainGraph.markIncompleteNodes(DSGraph::MarkFormalArgs | DSGraph::IgnoreGlobals); + + //Debug messages if along the way we didn't resolve a call site + //also update the call graph and callsites we did find. + for(DSGraph::afc_iterator ii = MainGraph.afc_begin(), + ee = MainGraph.afc_end(); ii != ee; ++ii) { + std::vector Funcs; + GetAllCallees(*ii, Funcs); + std::cerr << "Lost site\n"; + for (std::vector::iterator iif = Funcs.begin(), eef = Funcs.end(); + iif != eef; ++iif) { + AddGlobalToNode(this, *ii, *iif); + std::cerr << "Adding\n"; + ActualCallees.insert(std::make_pair(ii->getCallSite().getInstruction(), *iif)); + } + } + } + NumCallEdges += ActualCallees.size(); + return false; } @@ -236,26 +284,33 @@ return !callee->isExternal() || isVAHackFn(callee); } -static void GetAllCallees(const DSCallSite &CS, +//returns true if all callees were resolved +static bool GetAllCallees(const DSCallSite &CS, std::vector &Callees) { if (CS.isDirectCall()) { - if (isResolvableFunc(CS.getCalleeFunc())) + if (isResolvableFunc(CS.getCalleeFunc())) { Callees.push_back(CS.getCalleeFunc()); - } else if (!CS.getCalleeNode()->isIncomplete()) { + return true; + } else + return false; + } else { // Get all callees. + bool retval = CS.getCalleeNode()->isComplete(); unsigned OldSize = Callees.size(); CS.getCalleeNode()->addFullFunctionList(Callees); - // If any of the callees are unresolvable, remove the whole batch! - for (unsigned i = OldSize, e = Callees.size(); i != e; ++i) + // If any of the callees are unresolvable, remove that one + for (unsigned i = OldSize; i != Callees.size(); ++i) if (!isResolvableFunc(Callees[i])) { - Callees.erase(Callees.begin()+OldSize, Callees.end()); - return; + Callees.erase(Callees.begin()+i); + --i; + retval = false; } + return retval; + //return false; } } - /// GetAllAuxCallees - Return a list containing all of the resolvable callees in /// the aux list for the specified graph in the Callees vector. static void GetAllAuxCallees(DSGraph &G, std::vector &Callees) { @@ -267,7 +322,7 @@ unsigned BUDataStructures::calculateGraphs(Function *F, std::vector &Stack, unsigned &NextID, - hash_map &ValMap) { + hash_map &ValMap) { assert(!ValMap.count(F) && "Shouldn't revisit functions!"); unsigned Min = NextID++, MyID = Min; ValMap[F] = Min; @@ -284,6 +339,8 @@ } DSGraph &Graph = getOrCreateGraph(F); + if (UpdateGlobals) + Graph.updateFromGlobalGraph(); // Find all callee functions. std::vector CalleeFunctions; @@ -313,7 +370,7 @@ Stack.pop_back(); DSGraph &G = getDSGraph(*F); DEBUG(std::cerr << " [BU] Calculating graph for: " << F->getName()<< "\n"); - calculateGraph(G); + bool redo = calculateGraph(G); DEBUG(std::cerr << " [BU] Done inlining: " << F->getName() << " [" << G.getGraphSize() << "+" << G.getAuxFunctionCalls().size() << "]\n"); @@ -322,8 +379,8 @@ // Should we revisit the graph? Only do it if there are now new resolvable // callees. - GetAllAuxCallees(Graph, CalleeFunctions); - if (!CalleeFunctions.empty()) { + if (redo) { + DEBUG(std::cerr << "Recalculating " << F->getName() << " due to new knowledge\n"); ValMap.erase(F); return calculateGraphs(F, Stack, NextID, ValMap); } else { @@ -376,10 +433,14 @@ // Now that we have one big happy family, resolve all of the call sites in // the graph... - calculateGraph(SCCGraph); + bool redo = calculateGraph(SCCGraph); DEBUG(std::cerr << " [BU] Done inlining SCC [" << SCCGraph.getGraphSize() << "+" << SCCGraph.getAuxFunctionCalls().size() << "]\n"); + if (redo) { + DEBUG(std::cerr << "MISSING REDO\n"); + } + std::cerr << "DONE with SCC #: " << MyID << "\n"; // We never have to revisit "SCC" processed functions... @@ -434,7 +495,7 @@ } -void BUDataStructures::calculateGraph(DSGraph &Graph) { +bool BUDataStructures::calculateGraph(DSGraph &Graph) { // If this graph contains the main function, clone the globals graph into this // graph before we inline callees and other fun stuff. bool ContainsMain = false; @@ -470,42 +531,27 @@ std::list TempFCs; std::list &AuxCallsList = Graph.getAuxFunctionCalls(); TempFCs.swap(AuxCallsList); + //remember what we've seen (or will see) + unsigned oldSize = TempFCs.size(); bool Printed = false; - std::vector CalledFuncs; + bool missingNode = false; + while (!TempFCs.empty()) { DSCallSite &CS = *TempFCs.begin(); - - CalledFuncs.clear(); + Instruction *TheCall = CS.getCallSite().getInstruction(); + DSGraph *GI; // Fast path for noop calls. Note that we don't care about merging globals // in the callee with nodes in the caller here. - if (CS.getRetVal().isNull() && CS.getNumPtrArgs() == 0) { - TempFCs.erase(TempFCs.begin()); - continue; - } else if (CS.isDirectCall() && isVAHackFn(CS.getCalleeFunc())) { - TempFCs.erase(TempFCs.begin()); - continue; - } - - GetAllCallees(CS, CalledFuncs); - - if (CalledFuncs.empty()) { - // Remember that we could not resolve this yet! - AuxCallsList.splice(AuxCallsList.end(), TempFCs, TempFCs.begin()); - continue; - } else { - DSGraph *GI; - Instruction *TheCall = CS.getCallSite().getInstruction(); - - if (CalledFuncs.size() == 1) { - Function *Callee = CalledFuncs[0]; + if (CS.isDirectCall()) { + if (!isVAHackFn(CS.getCalleeFunc()) && isResolvableFunc(CS.getCalleeFunc())) { + Function* Callee = CS.getCalleeFunc(); ActualCallees.insert(std::make_pair(TheCall, Callee)); - - // Get the data structure graph for the called function. + + assert(doneDSGraph(Callee) && "Direct calls should always be precomputed"); GI = &getDSGraph(*Callee); // Graph to inline DEBUG(std::cerr << " Inlining graph for " << Callee->getName()); - DEBUG(std::cerr << "[" << GI->getGraphSize() << "+" << GI->getAuxFunctionCalls().size() << "] into '" << Graph.getFunctionNames() << "' [" << Graph.getGraphSize() <<"+" @@ -514,22 +560,38 @@ DSGraph::StripAllocaBit|DSGraph::DontCloneCallNodes); ++NumBUInlines; } else { + DEBUG(std::cerr << "Graph " << Graph.getFunctionNames() << " Call Site " << + CS.getCallSite().getInstruction() << " never resolvable\n"); + } + --oldSize; + TempFCs.pop_front(); + continue; + } else { + std::vector CalledFuncs; + bool resolved = GetAllCallees(CS, CalledFuncs); + + if (CalledFuncs.empty()) { + DEBUG(std::cerr << "Graph " << Graph.getFunctionNames() << " Call Site " << + CS.getCallSite().getInstruction() << " delayed\n"); + } else { + DEBUG( if (!Printed) std::cerr << "In Fns: " << Graph.getFunctionNames() << "\n"; std::cerr << " calls " << CalledFuncs.size() << " fns from site: " << CS.getCallSite().getInstruction() << " " << *CS.getCallSite().getInstruction(); std::cerr << " Fns ="; + ); unsigned NumPrinted = 0; for (std::vector::iterator I = CalledFuncs.begin(), E = CalledFuncs.end(); I != E; ++I) { - if (NumPrinted++ < 8) std::cerr << " " << (*I)->getName(); + DEBUG(if (NumPrinted++ < 8) std::cerr << " " << (*I)->getName();); // Add the call edges to the call graph. ActualCallees.insert(std::make_pair(TheCall, *I)); } - std::cerr << "\n"; + DEBUG(std::cerr << "\n"); // See if we already computed a graph for this set of callees. std::sort(CalledFuncs.begin(), CalledFuncs.end()); @@ -541,6 +603,14 @@ E = CalledFuncs.end(); // Start with a copy of the first graph. + if (!doneDSGraph(*I)) { + AuxCallsList.splice(AuxCallsList.end(), TempFCs, TempFCs.begin()); + missingNode = true; + continue; + } + + AddGlobalToNode(this, CS, *I); + GI = IndCallGraph.first = new DSGraph(getDSGraph(**I), GlobalECs); GI->setGlobalsGraph(Graph.getGlobalsGraph()); std::vector &Args = IndCallGraph.second; @@ -550,10 +620,17 @@ GI->getFunctionArgumentsForCall(*I, Args); // Merge all of the other callees into this graph. - for (++I; I != E; ++I) { + bool locMissing = false; + for (++I; I != E && !locMissing; ++I) { + AddGlobalToNode(this, CS, *I); // If the graph already contains the nodes for the function, don't // bother merging it in again. if (!GI->containsFunction(*I)) { + if (!doneDSGraph(*I)) { + locMissing = true; + break; + } + GI->cloneInto(getDSGraph(**I)); ++NumBUInlines; } @@ -568,29 +645,44 @@ for (e = NextArgs.size(); i != e; ++i) Args.push_back(NextArgs[i]); } + if (locMissing) { + AuxCallsList.splice(AuxCallsList.end(), TempFCs, TempFCs.begin()); + missingNode = true; + continue; + } // Clean up the final graph! GI->removeDeadNodes(DSGraph::KeepUnreachableGlobals); } else { - std::cerr << "***\n*** RECYCLED GRAPH ***\n***\n"; + DEBUG(std::cerr << "***\n*** RECYCLED GRAPH ***\n***\n"); + for (std::vector::iterator I = CalledFuncs.begin(), E = CalledFuncs.end(); I != E; ++I) { + AddGlobalToNode(this, CS, *I); + } } GI = IndCallGraph.first; - // Merge the unified graph into this graph now. - DEBUG(std::cerr << " Inlining multi callee graph " - << "[" << GI->getGraphSize() << "+" - << GI->getAuxFunctionCalls().size() << "] into '" - << Graph.getFunctionNames() << "' [" << Graph.getGraphSize() <<"+" - << Graph.getAuxFunctionCalls().size() << "]\n"); + if (AlreadyInlined[CS.getCallSite()] != CalledFuncs) { + AlreadyInlined[CS.getCallSite()].swap(CalledFuncs); - Graph.mergeInGraph(CS, IndCallGraph.second, *GI, - DSGraph::StripAllocaBit | - DSGraph::DontCloneCallNodes); - ++NumBUInlines; + // Merge the unified graph into this graph now. + DEBUG(std::cerr << " Inlining multi callee graph " + << "[" << GI->getGraphSize() << "+" + << GI->getAuxFunctionCalls().size() << "] into '" + << Graph.getFunctionNames() << "' [" << Graph.getGraphSize() <<"+" + << Graph.getAuxFunctionCalls().size() << "]\n"); + + Graph.mergeInGraph(CS, IndCallGraph.second, *GI, + DSGraph::StripAllocaBit | + DSGraph::DontCloneCallNodes); + + ++NumBUInlines; + } else { + DEBUG(std::cerr << " Skipping already inlined graph\n"); + } } + AuxCallsList.splice(AuxCallsList.end(), TempFCs, TempFCs.begin()); } - TempFCs.erase(TempFCs.begin()); } // Recompute the Incomplete markers @@ -613,6 +705,24 @@ RC.getClonedNH(MainSM[*I]); //Graph.writeGraphToFile(std::cerr, "bu_" + F.getName()); + AuxCallsList.sort(); + AuxCallsList.unique(); + //conditionally prune the call list keeping only one copy of each actual + //CallSite + if (AuxCallsList.size() > 100) { + DEBUG(std::cerr << "Reducing Aux from " << AuxCallsList.size()); + std::map::iterator> keepers; + TempFCs.swap(AuxCallsList); + for( std::list::iterator ii = TempFCs.begin(), ee = TempFCs.end(); + ii != ee; ++ii) + keepers[ii->getCallSite()] = ii; + for (std::map::iterator>::iterator + ii = keepers.begin(), ee = keepers.end(); + ii != ee; ++ii) + AuxCallsList.splice(AuxCallsList.end(), TempFCs, ii->second); + DEBUG(std::cerr << " to " << AuxCallsList.size() << "\n"); + } + return missingNode || oldSize != AuxCallsList.size(); } static const Function *getFnForValue(const Value *V) { From alenhar2 at cs.uiuc.edu Mon Jun 19 13:23:48 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Mon, 19 Jun 2006 13:23:48 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure/DataStructure.h Message-ID: <200606191823.NAA32374@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis/DataStructure: DataStructure.h updated: 1.95 -> 1.96 --- Log message: Do partial inlining in BU. This resolves more call sites. Also add options to merge in globals during recursion and to back annotate DSNodes when function pointers are resolved. This makes PA work for a whole lot more things (unresolved call sites being what has been killing various DSA based passes) --- Diffs of the changes: (+10 -1) DataStructure.h | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletion(-) Index: llvm/include/llvm/Analysis/DataStructure/DataStructure.h diff -u llvm/include/llvm/Analysis/DataStructure/DataStructure.h:1.95 llvm/include/llvm/Analysis/DataStructure/DataStructure.h:1.96 --- llvm/include/llvm/Analysis/DataStructure/DataStructure.h:1.95 Sun Oct 23 19:38:25 2005 +++ llvm/include/llvm/Analysis/DataStructure/DataStructure.h Mon Jun 19 13:23:36 2006 @@ -116,6 +116,9 @@ /// GlobalECs - The equivalence classes for each global value that is merged /// with other global values in the DSGraphs. EquivalenceClasses GlobalECs; + + std::map > AlreadyInlined; + public: ~BUDataStructures() { releaseMyMemory(); } @@ -135,6 +138,12 @@ return const_cast(this)-> CreateGraphForExternalFunction(F); } + + /// DSGraphExists - Is the DSGraph computed for this function? + /// + bool doneDSGraph(const Function *F) const { + return (DSInfo.find(const_cast(F)) != DSInfo.end()); + } DSGraph &getGlobalsGraph() const { return *GlobalsGraph; } @@ -176,7 +185,7 @@ } private: - void calculateGraph(DSGraph &G); + bool calculateGraph(DSGraph &G); DSGraph &getOrCreateGraph(Function *F); From evan.cheng at apple.com Mon Jun 19 14:25:42 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 19 Jun 2006 14:25:42 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrSSE.td Message-ID: <200606191925.OAA00386@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86InstrSSE.td updated: 1.123 -> 1.124 --- Log message: Minor clean up. --- Diffs of the changes: (+3 -6) X86InstrSSE.td | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) Index: llvm/lib/Target/X86/X86InstrSSE.td diff -u llvm/lib/Target/X86/X86InstrSSE.td:1.123 llvm/lib/Target/X86/X86InstrSSE.td:1.124 --- llvm/lib/Target/X86/X86InstrSSE.td:1.123 Thu Jun 15 03:14:54 2006 +++ llvm/lib/Target/X86/X86InstrSSE.td Mon Jun 19 14:25:30 2006 @@ -173,13 +173,10 @@ class PDI o, Format F, dag ops, string asm, list pattern> : I, TB, OpSize, Requires<[HasSSE2]>; class PSIi8 o, Format F, dag ops, string asm, list pattern> - : X86Inst, TB, Requires<[HasSSE1]> { - let Pattern = pattern; -} + : Ii8, TB, Requires<[HasSSE1]>; class PDIi8 o, Format F, dag ops, string asm, list pattern> - : X86Inst, TB, OpSize, Requires<[HasSSE2]> { - let Pattern = pattern; -} + : Ii8, TB, OpSize, Requires<[HasSSE2]>; + class S3SI o, Format F, dag ops, string asm, list pattern> : I, XS, Requires<[HasSSE3]>; class S3DI o, Format F, dag ops, string asm, list pattern> From jlaskey at apple.com Mon Jun 19 14:49:54 2006 From: jlaskey at apple.com (Jim Laskey) Date: Mon, 19 Jun 2006 14:49:54 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200606191949.OAA00534@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.64 -> 1.65 --- Log message: References need to be section relative. --- Diffs of the changes: (+5 -3) DwarfWriter.cpp | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.64 llvm/lib/CodeGen/DwarfWriter.cpp:1.65 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.64 Mon Jun 19 10:48:00 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Mon Jun 19 14:49:42 2006 @@ -1205,7 +1205,7 @@ /// AddSourceLine - Add location information to specified debug information /// entry. -void DwarfWriter::AddSourceLine(DIE *Die, CompileUnitDesc *File, unsigned Line) { +void DwarfWriter::AddSourceLine(DIE *Die, CompileUnitDesc *File, unsigned Line){ if (File && Line) { CompileUnit *FileUnit = FindCompileUnit(File); unsigned FileID = FileUnit->getID(); @@ -1598,7 +1598,7 @@ // Define the Scope debug information entry. DebugScope *Scope = Scopes[j]; // FIXME - Ignore inlined functions for the time being. - if (Scope->getParent()) continue; + if (!Scope->getParent()) continue; DIE *ScopeDie = new DIE(DW_TAG_lexical_block); @@ -2081,6 +2081,7 @@ // Start the dwarf frame section. Asm->SwitchToDataSection(DwarfFrameSection, 0); + EmitLabel("frame_common", 0); EmitDifference("frame_common_end", 0, "frame_common_begin", 0); EOL("Length of Common Information Entry"); @@ -2116,7 +2117,8 @@ EmitLabel("frame_begin", SubprogramCount); - EmitReference("section_frame", 0); EOL("FDE CIE offset"); + EmitDifference("frame_common", 0, "section_frame", 0); + EOL("FDE CIE offset"); EmitReference("func_begin", SubprogramCount); EOL("FDE initial location"); EmitDifference("func_end", SubprogramCount, From lattner at cs.uiuc.edu Mon Jun 19 19:12:49 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 19 Jun 2006 19:12:49 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrSSE.td Message-ID: <200606200012.TAA03100@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86InstrSSE.td updated: 1.124 -> 1.125 --- Log message: Fix some mismatched type constraints --- Diffs of the changes: (+6 -6) X86InstrSSE.td | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/lib/Target/X86/X86InstrSSE.td diff -u llvm/lib/Target/X86/X86InstrSSE.td:1.124 llvm/lib/Target/X86/X86InstrSSE.td:1.125 --- llvm/lib/Target/X86/X86InstrSSE.td:1.124 Mon Jun 19 14:25:30 2006 +++ llvm/lib/Target/X86/X86InstrSSE.td Mon Jun 19 19:12:37 2006 @@ -2312,21 +2312,21 @@ Requires<[HasSSE2]>; def : Pat<(v4i32 (bitconvert (v4f32 VR128:$src))), (v4i32 VR128:$src)>, Requires<[HasSSE2]>; -def : Pat<(v8i16 (bitconvert (v2i64 VR128:$src))), (v4i32 VR128:$src)>, +def : Pat<(v8i16 (bitconvert (v2i64 VR128:$src))), (v8i16 VR128:$src)>, Requires<[HasSSE2]>; -def : Pat<(v8i16 (bitconvert (v4i32 VR128:$src))), (v4i32 VR128:$src)>, +def : Pat<(v8i16 (bitconvert (v4i32 VR128:$src))), (v8i16 VR128:$src)>, Requires<[HasSSE2]>; -def : Pat<(v8i16 (bitconvert (v16i8 VR128:$src))), (v4i32 VR128:$src)>, +def : Pat<(v8i16 (bitconvert (v16i8 VR128:$src))), (v8i16 VR128:$src)>, Requires<[HasSSE2]>; def : Pat<(v8i16 (bitconvert (v2f64 VR128:$src))), (v8i16 VR128:$src)>, Requires<[HasSSE2]>; def : Pat<(v8i16 (bitconvert (v4f32 VR128:$src))), (v8i16 VR128:$src)>, Requires<[HasSSE2]>; -def : Pat<(v16i8 (bitconvert (v2i64 VR128:$src))), (v4i32 VR128:$src)>, +def : Pat<(v16i8 (bitconvert (v2i64 VR128:$src))), (v16i8 VR128:$src)>, Requires<[HasSSE2]>; -def : Pat<(v16i8 (bitconvert (v4i32 VR128:$src))), (v4i32 VR128:$src)>, +def : Pat<(v16i8 (bitconvert (v4i32 VR128:$src))), (v16i8 VR128:$src)>, Requires<[HasSSE2]>; -def : Pat<(v16i8 (bitconvert (v8i16 VR128:$src))), (v4i32 VR128:$src)>, +def : Pat<(v16i8 (bitconvert (v8i16 VR128:$src))), (v16i8 VR128:$src)>, Requires<[HasSSE2]>; def : Pat<(v16i8 (bitconvert (v2f64 VR128:$src))), (v16i8 VR128:$src)>, Requires<[HasSSE2]>; From lattner at cs.uiuc.edu Mon Jun 19 19:18:14 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 19 Jun 2006 19:18:14 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200606200018.TAA03182@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.213 -> 1.214 --- Log message: Make sure to use the result of the pattern to infer the result type of the instruction, and the result type of the instruction to refine the pattern. This allows us to write things like this: def : Pat<(v2i64 (bitconvert (v16i8 VR128:$src))), (v2i64 VR128:$src)>; as: def : Pat<(v2i64 (bitconvert (v16i8 VR128:$src))), (VR128:$src)> and fixes a ppc64 issue. --- Diffs of the changes: (+34 -22) DAGISelEmitter.cpp | 56 ++++++++++++++++++++++++++++++++--------------------- 1 files changed, 34 insertions(+), 22 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.213 llvm/utils/TableGen/DAGISelEmitter.cpp:1.214 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.213 Fri Jun 16 13:25:06 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Mon Jun 19 19:18:02 2006 @@ -1554,22 +1554,6 @@ // Inline pattern fragments into it. Pattern->InlinePatternFragments(); - // Infer as many types as possible. If we cannot infer all of them, we can - // never do anything with this pattern: report it to the user. - if (!Pattern->InferAllTypes()) - Pattern->error("Could not infer all types in pattern!"); - - // Validate that the input pattern is correct. - { - std::map InstInputs; - std::map InstResults; - std::vector InstImpInputs; - std::vector InstImpResults; - FindPatternInputsAndOutputs(Pattern, Pattern->getOnlyTree(), - InstInputs, InstResults, - InstImpInputs, InstImpResults); - } - ListInit *LI = Patterns[i]->getValueAsListInit("ResultInstrs"); if (LI->getSize() == 0) continue; // no pattern. @@ -1578,15 +1562,43 @@ // Inline pattern fragments into it. Result->InlinePatternFragments(); - - // Infer as many types as possible. If we cannot infer all of them, we can - // never do anything with this pattern: report it to the user. - if (!Result->InferAllTypes()) - Result->error("Could not infer all types in pattern result!"); - + if (Result->getNumTrees() != 1) Result->error("Cannot handle instructions producing instructions " "with temporaries yet!"); + + bool IterateInference; + do { + // Infer as many types as possible. If we cannot infer all of them, we + // can never do anything with this pattern: report it to the user. + if (!Pattern->InferAllTypes()) + Pattern->error("Could not infer all types in pattern!"); + + // Infer as many types as possible. If we cannot infer all of them, we can + // never do anything with this pattern: report it to the user. + if (!Result->InferAllTypes()) + Result->error("Could not infer all types in pattern result!"); + + // Apply the type of the result to the source pattern. This helps us + // resolve cases where the input type is known to be a pointer type (which + // is considered resolved), but the result knows it needs to be 32- or + // 64-bits. Infer the other way for good measure. + IterateInference = Pattern->getOnlyTree()-> + UpdateNodeType(Result->getOnlyTree()->getExtTypes(), *Result); + IterateInference |= Result->getOnlyTree()-> + UpdateNodeType(Pattern->getOnlyTree()->getExtTypes(), *Result); + } while (IterateInference); + + // Validate that the input pattern is correct. + { + std::map InstInputs; + std::map InstResults; + std::vector InstImpInputs; + std::vector InstImpResults; + FindPatternInputsAndOutputs(Pattern, Pattern->getOnlyTree(), + InstInputs, InstResults, + InstImpInputs, InstImpResults); + } // Promote the xform function to be an explicit node if set. std::vector ResultNodeOperands; From lattner at cs.uiuc.edu Mon Jun 19 19:25:41 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 19 Jun 2006 19:25:41 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrSSE.td Message-ID: <200606200025.TAA03237@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86InstrSSE.td updated: 1.125 -> 1.126 --- Log message: Remove some ugly now-redundant casts. --- Diffs of the changes: (+54 -54) X86InstrSSE.td | 108 ++++++++++++++++++++++++++++----------------------------- 1 files changed, 54 insertions(+), 54 deletions(-) Index: llvm/lib/Target/X86/X86InstrSSE.td diff -u llvm/lib/Target/X86/X86InstrSSE.td:1.125 llvm/lib/Target/X86/X86InstrSSE.td:1.126 --- llvm/lib/Target/X86/X86InstrSSE.td:1.125 Mon Jun 19 19:12:37 2006 +++ llvm/lib/Target/X86/X86InstrSSE.td Mon Jun 19 19:25:29 2006 @@ -2265,16 +2265,16 @@ def : Pat<(v2i64 (undef)), (IMPLICIT_DEF_VR128)>, Requires<[HasSSE2]>; // 128-bit vector all zero's. -def : Pat<(v16i8 immAllZerosV), (v16i8 (V_SET0_PI))>, Requires<[HasSSE2]>; -def : Pat<(v8i16 immAllZerosV), (v8i16 (V_SET0_PI))>, Requires<[HasSSE2]>; -def : Pat<(v4i32 immAllZerosV), (v4i32 (V_SET0_PI))>, Requires<[HasSSE2]>; +def : Pat<(v16i8 immAllZerosV), (V_SET0_PI)>, Requires<[HasSSE2]>; +def : Pat<(v8i16 immAllZerosV), (V_SET0_PI)>, Requires<[HasSSE2]>; +def : Pat<(v4i32 immAllZerosV), (V_SET0_PI)>, Requires<[HasSSE2]>; // 128-bit vector all one's. -def : Pat<(v16i8 immAllOnesV), (v16i8 (V_SETALLONES))>, Requires<[HasSSE2]>; -def : Pat<(v8i16 immAllOnesV), (v8i16 (V_SETALLONES))>, Requires<[HasSSE2]>; -def : Pat<(v4i32 immAllOnesV), (v4i32 (V_SETALLONES))>, Requires<[HasSSE2]>; -def : Pat<(v2i64 immAllOnesV), (v2i64 (V_SETALLONES))>, Requires<[HasSSE2]>; -def : Pat<(v4f32 immAllOnesV), (v4f32 (V_SETALLONES))>, Requires<[HasSSE1]>; +def : Pat<(v16i8 immAllOnesV), (V_SETALLONES)>, Requires<[HasSSE2]>; +def : Pat<(v8i16 immAllOnesV), (V_SETALLONES)>, Requires<[HasSSE2]>; +def : Pat<(v4i32 immAllOnesV), (V_SETALLONES)>, Requires<[HasSSE2]>; +def : Pat<(v2i64 immAllOnesV), (V_SETALLONES)>, Requires<[HasSSE2]>; +def : Pat<(v4f32 immAllOnesV), (V_SETALLONES)>, Requires<[HasSSE1]>; // Store 128-bit integer vector values. def : Pat<(store (v16i8 VR128:$src), addr:$dst), @@ -2286,9 +2286,9 @@ // Scalar to v8i16 / v16i8. The source may be a GR32, but only the lower 8 or // 16-bits matter. -def : Pat<(v8i16 (X86s2vec GR32:$src)), (v8i16 (MOVDI2PDIrr GR32:$src))>, +def : Pat<(v8i16 (X86s2vec GR32:$src)), (MOVDI2PDIrr GR32:$src)>, Requires<[HasSSE2]>; -def : Pat<(v16i8 (X86s2vec GR32:$src)), (v16i8 (MOVDI2PDIrr GR32:$src))>, +def : Pat<(v16i8 (X86s2vec GR32:$src)), (MOVDI2PDIrr GR32:$src)>, Requires<[HasSSE2]>; // bit_convert @@ -2358,155 +2358,155 @@ let AddedComplexity = 20 in { def : Pat<(v8i16 (vector_shuffle immAllZerosV, (v8i16 (X86s2vec GR32:$src)), MOVL_shuffle_mask)), - (v8i16 (MOVZDI2PDIrr GR32:$src))>, Requires<[HasSSE2]>; + (MOVZDI2PDIrr GR32:$src)>, Requires<[HasSSE2]>; def : Pat<(v16i8 (vector_shuffle immAllZerosV, (v16i8 (X86s2vec GR32:$src)), MOVL_shuffle_mask)), - (v16i8 (MOVZDI2PDIrr GR32:$src))>, Requires<[HasSSE2]>; + (MOVZDI2PDIrr GR32:$src)>, Requires<[HasSSE2]>; // Zeroing a VR128 then do a MOVS{S|D} to the lower bits. def : Pat<(v2f64 (vector_shuffle immAllZerosV, (v2f64 (scalar_to_vector FR64:$src)), MOVL_shuffle_mask)), - (v2f64 (MOVLSD2PDrr (V_SET0_PD), FR64:$src))>, Requires<[HasSSE2]>; + (MOVLSD2PDrr (V_SET0_PD), FR64:$src)>, Requires<[HasSSE2]>; def : Pat<(v4f32 (vector_shuffle immAllZerosV, (v4f32 (scalar_to_vector FR32:$src)), MOVL_shuffle_mask)), - (v4f32 (MOVLSS2PSrr (V_SET0_PS), FR32:$src))>, Requires<[HasSSE2]>; + (MOVLSS2PSrr (V_SET0_PS), FR32:$src)>, Requires<[HasSSE2]>; } // Splat v2f64 / v2i64 let AddedComplexity = 10 in { def : Pat<(vector_shuffle (v2f64 VR128:$src), (undef), SSE_splat_v2_mask:$sm), - (v2f64 (UNPCKLPDrr VR128:$src, VR128:$src))>, Requires<[HasSSE2]>; + (UNPCKLPDrr VR128:$src, VR128:$src)>, Requires<[HasSSE2]>; def : Pat<(vector_shuffle (v2i64 VR128:$src), (undef), SSE_splat_v2_mask:$sm), - (v2i64 (PUNPCKLQDQrr VR128:$src, VR128:$src))>, Requires<[HasSSE2]>; + (PUNPCKLQDQrr VR128:$src, VR128:$src)>, Requires<[HasSSE2]>; } // Splat v4f32 def : Pat<(vector_shuffle (v4f32 VR128:$src), (undef), SSE_splat_mask:$sm), - (v4f32 (SHUFPSrri VR128:$src, VR128:$src, SSE_splat_mask:$sm))>, + (SHUFPSrri VR128:$src, VR128:$src, SSE_splat_mask:$sm)>, Requires<[HasSSE1]>; // Special unary SHUFPSrri case. // FIXME: when we want non two-address code, then we should use PSHUFD? def : Pat<(vector_shuffle (v4f32 VR128:$src1), (undef), SHUFP_unary_shuffle_mask:$sm), - (v4f32 (SHUFPSrri VR128:$src1, VR128:$src1, SHUFP_unary_shuffle_mask:$sm))>, + (SHUFPSrri VR128:$src1, VR128:$src1, SHUFP_unary_shuffle_mask:$sm)>, Requires<[HasSSE1]>; // Unary v4f32 shuffle with PSHUF* in order to fold a load. def : Pat<(vector_shuffle (loadv4f32 addr:$src1), (undef), SHUFP_unary_shuffle_mask:$sm), - (v4f32 (PSHUFDmi addr:$src1, SHUFP_unary_shuffle_mask:$sm))>, + (PSHUFDmi addr:$src1, SHUFP_unary_shuffle_mask:$sm)>, Requires<[HasSSE2]>; // Special binary v4i32 shuffle cases with SHUFPS. def : Pat<(vector_shuffle (v4i32 VR128:$src1), (v4i32 VR128:$src2), PSHUFD_binary_shuffle_mask:$sm), - (v4i32 (SHUFPSrri VR128:$src1, VR128:$src2, - PSHUFD_binary_shuffle_mask:$sm))>, Requires<[HasSSE2]>; + (SHUFPSrri VR128:$src1, VR128:$src2, PSHUFD_binary_shuffle_mask:$sm)>, + Requires<[HasSSE2]>; def : Pat<(vector_shuffle (v4i32 VR128:$src1), (bc_v4i32 (loadv2i64 addr:$src2)), PSHUFD_binary_shuffle_mask:$sm), - (v4i32 (SHUFPSrmi VR128:$src1, addr:$src2, - PSHUFD_binary_shuffle_mask:$sm))>, Requires<[HasSSE2]>; + (SHUFPSrmi VR128:$src1, addr:$src2, PSHUFD_binary_shuffle_mask:$sm)>, + Requires<[HasSSE2]>; // vector_shuffle v1, , <0, 0, 1, 1, ...> let AddedComplexity = 10 in { def : Pat<(v4f32 (vector_shuffle VR128:$src, (undef), UNPCKL_v_undef_shuffle_mask)), - (v4f32 (UNPCKLPSrr VR128:$src, VR128:$src))>, Requires<[HasSSE2]>; + (UNPCKLPSrr VR128:$src, VR128:$src)>, Requires<[HasSSE2]>; def : Pat<(v16i8 (vector_shuffle VR128:$src, (undef), UNPCKL_v_undef_shuffle_mask)), - (v16i8 (PUNPCKLBWrr VR128:$src, VR128:$src))>, Requires<[HasSSE2]>; + (PUNPCKLBWrr VR128:$src, VR128:$src)>, Requires<[HasSSE2]>; def : Pat<(v8i16 (vector_shuffle VR128:$src, (undef), UNPCKL_v_undef_shuffle_mask)), - (v8i16 (PUNPCKLWDrr VR128:$src, VR128:$src))>, Requires<[HasSSE2]>; + (PUNPCKLWDrr VR128:$src, VR128:$src)>, Requires<[HasSSE2]>; def : Pat<(v4i32 (vector_shuffle VR128:$src, (undef), UNPCKL_v_undef_shuffle_mask)), - (v4i32 (PUNPCKLDQrr VR128:$src, VR128:$src))>, Requires<[HasSSE1]>; + (PUNPCKLDQrr VR128:$src, VR128:$src)>, Requires<[HasSSE1]>; } let AddedComplexity = 20 in { // vector_shuffle v1, <1, 1, 3, 3> def : Pat<(v4i32 (vector_shuffle VR128:$src, (undef), MOVSHDUP_shuffle_mask)), - (v4i32 (MOVSHDUPrr VR128:$src))>, Requires<[HasSSE3]>; + (MOVSHDUPrr VR128:$src)>, Requires<[HasSSE3]>; def : Pat<(v4i32 (vector_shuffle (bc_v4i32 (loadv2i64 addr:$src)), (undef), MOVSHDUP_shuffle_mask)), - (v4i32 (MOVSHDUPrm addr:$src))>, Requires<[HasSSE3]>; + (MOVSHDUPrm addr:$src)>, Requires<[HasSSE3]>; // vector_shuffle v1, <0, 0, 2, 2> def : Pat<(v4i32 (vector_shuffle VR128:$src, (undef), MOVSLDUP_shuffle_mask)), - (v4i32 (MOVSLDUPrr VR128:$src))>, Requires<[HasSSE3]>; + (MOVSLDUPrr VR128:$src)>, Requires<[HasSSE3]>; def : Pat<(v4i32 (vector_shuffle (bc_v4i32 (loadv2i64 addr:$src)), (undef), MOVSLDUP_shuffle_mask)), - (v4i32 (MOVSLDUPrm addr:$src))>, Requires<[HasSSE3]>; + (MOVSLDUPrm addr:$src)>, Requires<[HasSSE3]>; } let AddedComplexity = 20 in { // vector_shuffle v1, v2 <0, 1, 4, 5> using MOVLHPS def : Pat<(v4i32 (vector_shuffle VR128:$src1, VR128:$src2, MOVHP_shuffle_mask)), - (v4i32 (MOVLHPSrr VR128:$src1, VR128:$src2))>; + (MOVLHPSrr VR128:$src1, VR128:$src2)>; // vector_shuffle v1, v2 <6, 7, 2, 3> using MOVHLPS def : Pat<(v4i32 (vector_shuffle VR128:$src1, VR128:$src2, MOVHLPS_shuffle_mask)), - (v4i32 (MOVHLPSrr VR128:$src1, VR128:$src2))>; + (MOVHLPSrr VR128:$src1, VR128:$src2)>; // vector_shuffle v1, undef <2, 3, ?, ?> using MOVHLPS def : Pat<(v4f32 (vector_shuffle VR128:$src1, (undef), UNPCKH_shuffle_mask)), - (v4f32 (MOVHLPSrr VR128:$src1, VR128:$src1))>; + (MOVHLPSrr VR128:$src1, VR128:$src1)>; def : Pat<(v4i32 (vector_shuffle VR128:$src1, (undef), UNPCKH_shuffle_mask)), - (v4i32 (MOVHLPSrr VR128:$src1, VR128:$src1))>; + (MOVHLPSrr VR128:$src1, VR128:$src1)>; // vector_shuffle v1, (load v2) <4, 5, 2, 3> using MOVLPS // vector_shuffle v1, (load v2) <0, 1, 4, 5> using MOVHPS def : Pat<(v4f32 (vector_shuffle VR128:$src1, (loadv4f32 addr:$src2), MOVLP_shuffle_mask)), - (v4f32 (MOVLPSrm VR128:$src1, addr:$src2))>, Requires<[HasSSE1]>; + (MOVLPSrm VR128:$src1, addr:$src2)>, Requires<[HasSSE1]>; def : Pat<(v2f64 (vector_shuffle VR128:$src1, (loadv2f64 addr:$src2), MOVLP_shuffle_mask)), - (v2f64 (MOVLPDrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; + (MOVLPDrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; def : Pat<(v4f32 (vector_shuffle VR128:$src1, (loadv4f32 addr:$src2), MOVHP_shuffle_mask)), - (v4f32 (MOVHPSrm VR128:$src1, addr:$src2))>, Requires<[HasSSE1]>; + (MOVHPSrm VR128:$src1, addr:$src2)>, Requires<[HasSSE1]>; def : Pat<(v2f64 (vector_shuffle VR128:$src1, (loadv2f64 addr:$src2), MOVHP_shuffle_mask)), - (v2f64 (MOVHPDrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; + (MOVHPDrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; def : Pat<(v4i32 (vector_shuffle VR128:$src1, (bc_v4i32 (loadv2i64 addr:$src2)), MOVLP_shuffle_mask)), - (v4i32 (MOVLPSrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; + (MOVLPSrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; def : Pat<(v2i64 (vector_shuffle VR128:$src1, (loadv2i64 addr:$src2), MOVLP_shuffle_mask)), - (v2i64 (MOVLPDrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; + (MOVLPDrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; def : Pat<(v4i32 (vector_shuffle VR128:$src1, (bc_v4i32 (loadv2i64 addr:$src2)), MOVHP_shuffle_mask)), - (v4i32 (MOVHPSrm VR128:$src1, addr:$src2))>, Requires<[HasSSE1]>; + (MOVHPSrm VR128:$src1, addr:$src2)>, Requires<[HasSSE1]>; def : Pat<(v2i64 (vector_shuffle VR128:$src1, (loadv2i64 addr:$src2), MOVLP_shuffle_mask)), - (v2i64 (MOVLPDrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; + (MOVLPDrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; // Setting the lowest element in the vector. def : Pat<(v4i32 (vector_shuffle VR128:$src1, VR128:$src2, MOVL_shuffle_mask)), - (v4i32 (MOVLPSrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; + (MOVLPSrr VR128:$src1, VR128:$src2)>, Requires<[HasSSE2]>; def : Pat<(v2i64 (vector_shuffle VR128:$src1, VR128:$src2, MOVL_shuffle_mask)), - (v2i64 (MOVLPDrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; + (MOVLPDrr VR128:$src1, VR128:$src2)>, Requires<[HasSSE2]>; // vector_shuffle v1, v2 <4, 5, 2, 3> using MOVLPDrr (movsd) def : Pat<(v4f32 (vector_shuffle VR128:$src1, VR128:$src2, MOVLP_shuffle_mask)), - (v4f32 (MOVLPDrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; + (MOVLPDrr VR128:$src1, VR128:$src2)>, Requires<[HasSSE2]>; def : Pat<(v4i32 (vector_shuffle VR128:$src1, VR128:$src2, MOVLP_shuffle_mask)), - (v4i32 (MOVLPDrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; + (MOVLPDrr VR128:$src1, VR128:$src2)>, Requires<[HasSSE2]>; // Set lowest element and zero upper elements. def : Pat<(bc_v2i64 (vector_shuffle immAllZerosV, (v2f64 (scalar_to_vector (loadf64 addr:$src))), MOVL_shuffle_mask)), - (v2i64 (MOVZQI2PQIrm addr:$src))>, Requires<[HasSSE2]>; + (MOVZQI2PQIrm addr:$src)>, Requires<[HasSSE2]>; } // FIXME: Temporary workaround since 2-wide shuffle is broken. @@ -2550,20 +2550,20 @@ // Some special case pandn patterns. def : Pat<(v2i64 (and (xor VR128:$src1, (bc_v2i64 (v4i32 immAllOnesV))), VR128:$src2)), - (v2i64 (PANDNrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; + (PANDNrr VR128:$src1, VR128:$src2)>, Requires<[HasSSE2]>; def : Pat<(v2i64 (and (xor VR128:$src1, (bc_v2i64 (v8i16 immAllOnesV))), VR128:$src2)), - (v2i64 (PANDNrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; + (PANDNrr VR128:$src1, VR128:$src2)>, Requires<[HasSSE2]>; def : Pat<(v2i64 (and (xor VR128:$src1, (bc_v2i64 (v16i8 immAllOnesV))), VR128:$src2)), - (v2i64 (PANDNrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; + (PANDNrr VR128:$src1, VR128:$src2)>, Requires<[HasSSE2]>; def : Pat<(v2i64 (and (xor VR128:$src1, (bc_v2i64 (v4i32 immAllOnesV))), (load addr:$src2))), - (v2i64 (PANDNrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; + (PANDNrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; def : Pat<(v2i64 (and (xor VR128:$src1, (bc_v2i64 (v8i16 immAllOnesV))), (load addr:$src2))), - (v2i64 (PANDNrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; + (PANDNrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; def : Pat<(v2i64 (and (xor VR128:$src1, (bc_v2i64 (v16i8 immAllOnesV))), (load addr:$src2))), - (v2i64 (PANDNrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; + (PANDNrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; From lattner at cs.uiuc.edu Mon Jun 19 19:31:39 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 19 Jun 2006 19:31:39 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200606200031.TAA03399@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.214 -> 1.215 --- Log message: Don't require src/dst patterns to be able to fully resolve their types, because information about one can help refine the other. This allows us to write: def : Pat<(i32 (extload xaddr:$src, i8)), (LBZX xaddr:$src)>; as: def : Pat<(extload xaddr:$src, i8), (LBZX xaddr:$src)>; because tblgen knows LBZX returns i32. --- Diffs of the changes: (+11 -5) DAGISelEmitter.cpp | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.214 llvm/utils/TableGen/DAGISelEmitter.cpp:1.215 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.214 Mon Jun 19 19:18:02 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Mon Jun 19 19:31:27 2006 @@ -1568,17 +1568,16 @@ "with temporaries yet!"); bool IterateInference; + bool InferredAllPatternTypes, InferredAllResultTypes; do { // Infer as many types as possible. If we cannot infer all of them, we // can never do anything with this pattern: report it to the user. - if (!Pattern->InferAllTypes()) - Pattern->error("Could not infer all types in pattern!"); + InferredAllPatternTypes = Pattern->InferAllTypes(); // Infer as many types as possible. If we cannot infer all of them, we can // never do anything with this pattern: report it to the user. - if (!Result->InferAllTypes()) - Result->error("Could not infer all types in pattern result!"); - + InferredAllResultTypes = Result->InferAllTypes(); + // Apply the type of the result to the source pattern. This helps us // resolve cases where the input type is known to be a pointer type (which // is considered resolved), but the result knows it needs to be 32- or @@ -1588,6 +1587,13 @@ IterateInference |= Result->getOnlyTree()-> UpdateNodeType(Pattern->getOnlyTree()->getExtTypes(), *Result); } while (IterateInference); + + // Verify that we inferred enough types that we can do something with the + // pattern and result. If these fire the user has to add type casts. + if (!InferredAllPatternTypes) + Pattern->error("Could not infer all types in pattern!"); + if (!InferredAllResultTypes) + Result->error("Could not infer all types in pattern result!"); // Validate that the input pattern is correct. { From lattner at cs.uiuc.edu Mon Jun 19 19:38:48 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 19 Jun 2006 19:38:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstr64Bit.td Message-ID: <200606200038.TAA03510@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstr64Bit.td updated: 1.3 -> 1.4 --- Log message: Add some patterns for ppc64 --- Diffs of the changes: (+14 -13) PPCInstr64Bit.td | 27 ++++++++++++++------------- 1 files changed, 14 insertions(+), 13 deletions(-) Index: llvm/lib/Target/PowerPC/PPCInstr64Bit.td diff -u llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.3 llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.4 --- llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.3 Fri Jun 16 16:29:41 2006 +++ llvm/lib/Target/PowerPC/PPCInstr64Bit.td Mon Jun 19 19:38:36 2006 @@ -105,12 +105,13 @@ let isLoad = 1, PPC970_Unit = 2 in { -def LWA : DSForm_1<58, 2, (ops G8RC:$rT, memrix:$src), - "lwa $rT, $src", LdStLWA, - []>, isPPC64, PPC970_DGroup_Cracked; -def LD : DSForm_2<58, 0, (ops G8RC:$rT, memrix:$src), - "ld $rT, $src", LdStLD, - []>, isPPC64; +def LWA : DSForm_1<58, 2, (ops G8RC:$rD, memrix:$src), + "lwa $rD, $src", LdStLWA, + [(set G8RC:$rD, (sextload ixaddr:$src, i32))]>, isPPC64, + PPC970_DGroup_Cracked; +def LD : DSForm_2<58, 0, (ops G8RC:$rD, memrix:$src), + "ld $rD, $src", LdStLD, + [(set G8RC:$rD, (load ixaddr:$src))]>, isPPC64; def LWAX : XForm_1<31, 341, (ops G8RC:$rD, memrr:$src), "lwax $rD, $src", LdStLHA, @@ -121,14 +122,14 @@ [(set G8RC:$rD, (load xaddr:$src))]>, isPPC64; } let isStore = 1, noResults = 1, PPC970_Unit = 2 in { -def STD : DSForm_2<62, 0, (ops G8RC:$rT, memrix:$src), - "std $rT, $src", LdStSTD, - []>, isPPC64; - -def STDX : XForm_8<31, 149, (ops GPRC:$rS, memrr:$dst), +def STD : DSForm_2<62, 0, (ops G8RC:$rS, memrix:$dst), + "std $rS, $dst", LdStSTD, + [(store G8RC:$rS, ixaddr:$dst)]>, isPPC64; +def STDX : XForm_8<31, 149, (ops G8RC:$rS, memrr:$dst), "stdx $rS, $dst", LdStSTD, - []>, isPPC64, PPC970_DGroup_Cracked; -def STDUX : XForm_8<31, 181, (ops GPRC:$rS, memrr:$dst), + [(store G8RC:$rS, iaddr:$dst)]>, isPPC64, + PPC970_DGroup_Cracked; +def STDUX : XForm_8<31, 181, (ops G8RC:$rS, memrr:$dst), "stdux $rS, $dst", LdStSTD, []>, isPPC64; From lattner at cs.uiuc.edu Mon Jun 19 19:40:08 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 19 Jun 2006 19:40:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrAltivec.td PPCInstrInfo.td Message-ID: <200606200040.TAA03587@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstrAltivec.td updated: 1.53 -> 1.54 PPCInstrInfo.td updated: 1.225 -> 1.226 --- Log message: Remove some now-unneeded casts from instruction patterns. With the casts removed, tblgen produces identical output to with them in. --- Diffs of the changes: (+22 -22) PPCInstrAltivec.td | 22 +++++++++++----------- PPCInstrInfo.td | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) Index: llvm/lib/Target/PowerPC/PPCInstrAltivec.td diff -u llvm/lib/Target/PowerPC/PPCInstrAltivec.td:1.53 llvm/lib/Target/PowerPC/PPCInstrAltivec.td:1.54 --- llvm/lib/Target/PowerPC/PPCInstrAltivec.td:1.53 Thu Apr 20 14:01:30 2006 +++ llvm/lib/Target/PowerPC/PPCInstrAltivec.td Mon Jun 19 19:39:56 2006 @@ -546,7 +546,7 @@ def : Pat<(v4f32 (undef)), (IMPLICIT_DEF_VRRC)>; // Loads. -def : Pat<(v4i32 (load xoaddr:$src)), (v4i32 (LVX xoaddr:$src))>; +def : Pat<(v4i32 (load xoaddr:$src)), (LVX xoaddr:$src)>; // Stores. def : Pat<(store (v4i32 VRRC:$rS), xoaddr:$dst), @@ -594,29 +594,29 @@ (VMRGHW VRRC:$vA, VRRC:$vA)>; // Logical Operations -def : Pat<(v4i32 (vnot VRRC:$vA)), (v4i32 (VNOR VRRC:$vA, VRRC:$vA))>; -def : Pat<(v4i32 (vnot_conv VRRC:$vA)), (v4i32 (VNOR VRRC:$vA, VRRC:$vA))>; +def : Pat<(v4i32 (vnot VRRC:$vA)), (VNOR VRRC:$vA, VRRC:$vA)>; +def : Pat<(v4i32 (vnot_conv VRRC:$vA)), (VNOR VRRC:$vA, VRRC:$vA)>; def : Pat<(v4i32 (vnot_conv (or VRRC:$A, VRRC:$B))), - (v4i32 (VNOR VRRC:$A, VRRC:$B))>; + (VNOR VRRC:$A, VRRC:$B)>; def : Pat<(v4i32 (and VRRC:$A, (vnot_conv VRRC:$B))), - (v4i32 (VANDC VRRC:$A, VRRC:$B))>; + (VANDC VRRC:$A, VRRC:$B)>; def : Pat<(fmul VRRC:$vA, VRRC:$vB), - (v4f32 (VMADDFP VRRC:$vA, VRRC:$vB, (v4i32 (V_SET0))))>; + (VMADDFP VRRC:$vA, VRRC:$vB, (v4i32 (V_SET0)))>; // Fused multiply add and multiply sub for packed float. These are represented // separately from the real instructions above, for operations that must have // the additional precision, such as Newton-Rhapson (used by divide, sqrt) def : Pat<(PPCvmaddfp VRRC:$A, VRRC:$B, VRRC:$C), - (v4f32 (VMADDFP VRRC:$A, VRRC:$B, VRRC:$C))>; + (VMADDFP VRRC:$A, VRRC:$B, VRRC:$C)>; def : Pat<(PPCvnmsubfp VRRC:$A, VRRC:$B, VRRC:$C), - (v4f32 (VNMSUBFP VRRC:$A, VRRC:$B, VRRC:$C))>; + (VNMSUBFP VRRC:$A, VRRC:$B, VRRC:$C)>; def : Pat<(int_ppc_altivec_vmaddfp VRRC:$A, VRRC:$B, VRRC:$C), - (v4f32 (VMADDFP VRRC:$A, VRRC:$B, VRRC:$C))>; + (VMADDFP VRRC:$A, VRRC:$B, VRRC:$C)>; def : Pat<(int_ppc_altivec_vnmsubfp VRRC:$A, VRRC:$B, VRRC:$C), - (v4f32 (VNMSUBFP VRRC:$A, VRRC:$B, VRRC:$C))>; + (VNMSUBFP VRRC:$A, VRRC:$B, VRRC:$C)>; def : Pat<(PPCvperm (v16i8 VRRC:$vA), VRRC:$vB, VRRC:$vC), - (v16i8 (VPERM VRRC:$vA, VRRC:$vB, VRRC:$vC))>; + (VPERM VRRC:$vA, VRRC:$vB, VRRC:$vC)>; Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.225 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.226 --- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.225 Fri Jun 16 16:29:03 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Mon Jun 19 19:39:56 2006 @@ -490,7 +490,7 @@ [(set GPRC:$rA, (not (xor GPRC:$rS, GPRC:$rB)))]>; def XOR : XForm_6<31, 316, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB), "xor $rA, $rS, $rB", IntGeneral, - [(set GPRC:$rA, (xor GPRC:$rS, GPRC:$rB))]>; + [(set GPRC:$rA, (xor GPRC:$rS, GPRC:$rB))]>; def SLW : XForm_6<31, 24, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB), "slw $rA, $rS, $rB", IntGeneral, [(set GPRC:$rA, (PPCshl GPRC:$rS, GPRC:$rB))]>; @@ -936,25 +936,25 @@ def : Pat<(shl GPRC:$rS, GPRC:$rB), (SLW GPRC:$rS, GPRC:$rB)>; -def : Pat<(i32 (zextload iaddr:$src, i1)), +def : Pat<(zextload iaddr:$src, i1), (LBZ iaddr:$src)>; -def : Pat<(i32 (zextload xaddr:$src, i1)), +def : Pat<(zextload xaddr:$src, i1), (LBZX xaddr:$src)>; -def : Pat<(i32 (extload iaddr:$src, i1)), +def : Pat<(extload iaddr:$src, i1), (LBZ iaddr:$src)>; -def : Pat<(i32 (extload xaddr:$src, i1)), +def : Pat<(extload xaddr:$src, i1), (LBZX xaddr:$src)>; -def : Pat<(i32 (extload iaddr:$src, i8)), +def : Pat<(extload iaddr:$src, i8), (LBZ iaddr:$src)>; -def : Pat<(i32 (extload xaddr:$src, i8)), +def : Pat<(extload xaddr:$src, i8), (LBZX xaddr:$src)>; -def : Pat<(i32 (extload iaddr:$src, i16)), +def : Pat<(extload iaddr:$src, i16), (LHZ iaddr:$src)>; -def : Pat<(i32 (extload xaddr:$src, i16)), +def : Pat<(extload xaddr:$src, i16), (LHZX xaddr:$src)>; -def : Pat<(f64 (extload iaddr:$src, f32)), +def : Pat<(extload iaddr:$src, f32), (FMRSD (LFS iaddr:$src))>; -def : Pat<(f64 (extload xaddr:$src, f32)), +def : Pat<(extload xaddr:$src, f32), (FMRSD (LFSX xaddr:$src))>; include "PPCInstrAltivec.td" From lattner at cs.uiuc.edu Mon Jun 19 19:56:49 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 19 Jun 2006 19:56:49 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200606200056.TAA03701@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.215 -> 1.216 --- Log message: Fix an error message regression. Print: LI8: (LI8:i64 (imm:i64):$imm) instead of: LI8: (LI8:MVT::i64 (imm:MVT::i64):$imm) --- Diffs of the changes: (+8 -1) DAGISelEmitter.cpp | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletion(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.215 llvm/utils/TableGen/DAGISelEmitter.cpp:1.216 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.215 Mon Jun 19 19:31:27 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Mon Jun 19 19:56:37 2006 @@ -436,7 +436,14 @@ case MVT::isFP : OS << ":isFP"; break; case MVT::isUnknown: ; /*OS << ":?";*/ break; case MVT::iPTR: OS << ":iPTR"; break; - default: OS << ":" << getTypeNum(0); break; + default: { + std::string VTName = llvm::getName(getTypeNum(0)); + // Strip off MVT:: prefix if present. + if (VTName.substr(0,5) == "MVT::") + VTName = VTName.substr(5); + OS << ":" << VTName; + break; + } } if (!isLeaf()) { From criswell at cs.uiuc.edu Tue Jun 20 09:29:34 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue, 20 Jun 2006 09:29:34 -0500 Subject: [llvm-commits] CVS: llvm-www/pubs/2006-06-18-WIOSCA-LLVAOS.html 2006-06-18-WIOSCA-LLVAOS.pdf 2006-06-18-WIOSCA-LLVAOS.ppt Message-ID: <200606201429.JAA15860@zion.cs.uiuc.edu> Changes in directory llvm-www/pubs: 2006-06-18-WIOSCA-LLVAOS.html added (r1.1) 2006-06-18-WIOSCA-LLVAOS.pdf added (r1.1) 2006-06-18-WIOSCA-LLVAOS.ppt added (r1.1) --- Log message: Addition of the WIOSCA paper. --- Diffs of the changes: (+55 -0) 2006-06-18-WIOSCA-LLVAOS.html | 55 ++++++++++++++++++++++++++++++++++++++++++ 2006-06-18-WIOSCA-LLVAOS.pdf | 0 2006-06-18-WIOSCA-LLVAOS.ppt | 0 3 files changed, 55 insertions(+) Index: llvm-www/pubs/2006-06-18-WIOSCA-LLVAOS.html diff -c /dev/null llvm-www/pubs/2006-06-18-WIOSCA-LLVAOS.html:1.1 *** /dev/null Tue Jun 20 09:29:32 2006 --- llvm-www/pubs/2006-06-18-WIOSCA-LLVAOS.html Tue Jun 20 09:29:21 2006 *************** *** 0 **** --- 1,55 ---- + + + + + + A Virtual Instruction Set Interface for Operating System Kernels + + + +
+ A Virtual Instruction Set Interface for Operating System Kernels +
+
+ John Criswell, Brent Monroe, and Vikram Adve +
+ +

Abstract:

+
+ In this paper, we propose and evaluate a virtual instruction set interface + between an operating system (OS) kernel and a general purpose processor + architecture. This interface is a set of operations added to a previously + proposed virtual instruction set architecture called LLVA (Low Level Virtual + Architecture) and can be implemented on existing processor hardware. The + long-term benefits of such an interface include + richer OS-information for hardware, + greater flexibility in evolving hardware, + and + sophisticated analysis and optimization capabilities for kernel code, + including + across the application-kernel boundary transformations. + Our interface design (LLVA-OS) contains + several novel features for machine-independence and performance, including + efficient saving and restoring of (hidden) native state, + mechanisms for error recovery, and several primitive + abstractions that expose semantic information to the underlying translator and + hardware. We describe the design, a prototype implementation of LLVA-OS + on x86, and our experience porting the Linux 2.4.22 kernel to LLVA-OS. + We perform a performance evaluation of this kernel, identifying and + explaining the root causes of key sources of virtualization overhead. +
+ +

Published:

+
+ "A Virtual Instruction Set Interface for Operating System Kernels", John Criswell, Brent Monroe, and Vikram Adve.
+ Workshop on the Interaction between Operating Systems and Computer Architecture (WIOSCA '06), Boston, Massachusetts, 2006. +
+ +

Download:

+ + + + Index: llvm-www/pubs/2006-06-18-WIOSCA-LLVAOS.pdf Index: llvm-www/pubs/2006-06-18-WIOSCA-LLVAOS.ppt From alenhar2 at cs.uiuc.edu Tue Jun 20 10:32:29 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 20 Jun 2006 10:32:29 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure/DataStructure.h Message-ID: <200606201532.KAA16340@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis/DataStructure: DataStructure.h updated: 1.96 -> 1.97 --- Log message: Fix build on old compilers --- Diffs of the changes: (+1 -1) DataStructure.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/Analysis/DataStructure/DataStructure.h diff -u llvm/include/llvm/Analysis/DataStructure/DataStructure.h:1.96 llvm/include/llvm/Analysis/DataStructure/DataStructure.h:1.97 --- llvm/include/llvm/Analysis/DataStructure/DataStructure.h:1.96 Mon Jun 19 13:23:36 2006 +++ llvm/include/llvm/Analysis/DataStructure/DataStructure.h Tue Jun 20 10:32:17 2006 @@ -16,6 +16,7 @@ #include "llvm/Pass.h" #include "llvm/Target/TargetData.h" +#include "llvm/Support/CallSite.h" #include "llvm/ADT/hash_map" #include "llvm/ADT/hash_set" #include "llvm/ADT/EquivalenceClasses.h" @@ -25,7 +26,6 @@ class Type; class Instruction; class GlobalValue; -class CallSite; class DSGraph; class DSCallSite; class DSNode; From criswell at cs.uiuc.edu Tue Jun 20 12:09:31 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue, 20 Jun 2006 12:09:31 -0500 Subject: [llvm-commits] CVS: llvm-www/pubs/index.html Message-ID: <200606201709.MAA16822@zion.cs.uiuc.edu> Changes in directory llvm-www/pubs: index.html updated: 1.39 -> 1.40 --- Log message: Added the WIOSCA 2006 paper on LLVA-OS to the About LLVM section. Moved the VEE 2006 paper on Vector LLVA to the About LLVM section. These were placed here because they propose extensions to the LLVM instruction set. --- Diffs of the changes: (+6 -0) index.html | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm-www/pubs/index.html diff -u llvm-www/pubs/index.html:1.39 llvm-www/pubs/index.html:1.40 --- llvm-www/pubs/index.html:1.39 Mon Jun 12 15:34:42 2006 +++ llvm-www/pubs/index.html Tue Jun 20 12:09:19 2006 @@ -3,6 +3,12 @@
    +
  1. "A Virtual Instruction Set Interface for Operating System Kernels"
    John Criswell, Brent Monroe, and Vikram Adve.
    +Workshop on the Interaction between Operating Systems and Computer Architecture (WIOSCA '06), Boston, Massachusetts, 2006.
  2. + +
  3. "Vector LLVA: A Virtual Vector Instruction Set for Media Processing"
    Robert L. Bocchino Jr. and Vikram S. Adve.
    +Proc. of the Second International Conference on Virtual Execution Environments (VEE'06), Ottawa, Canada, 2006.
  4. +
  5. "Introduction to the LLVM Compiler Infrastructure"
    Chris Lattner
    2006 Itanium Conference and Expo, San Jose, California, April 2006.
  6. From criswell at cs.uiuc.edu Tue Jun 20 12:19:30 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue, 20 Jun 2006 12:19:30 -0500 Subject: [llvm-commits] CVS: llvm-www/pubs/index.html Message-ID: <200606201719.MAA23957@zion.cs.uiuc.edu> Changes in directory llvm-www/pubs: index.html updated: 1.40 -> 1.41 --- Log message: Fix name of file. --- Diffs of the changes: (+1 -1) index.html | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/pubs/index.html diff -u llvm-www/pubs/index.html:1.40 llvm-www/pubs/index.html:1.41 --- llvm-www/pubs/index.html:1.40 Tue Jun 20 12:09:19 2006 +++ llvm-www/pubs/index.html Tue Jun 20 12:19:12 2006 @@ -3,7 +3,7 @@
      -
    1. "A Virtual Instruction Set Interface for Operating System Kernels"
      John Criswell, Brent Monroe, and Vikram Adve.
      +
    2. "A Virtual Instruction Set Interface for Operating System Kernels"
      John Criswell, Brent Monroe, and Vikram Adve.
      Workshop on the Interaction between Operating Systems and Computer Architecture (WIOSCA '06), Boston, Massachusetts, 2006.
    3. "Vector LLVA: A Virtual Vector Instruction Set for Media Processing"
      Robert L. Bocchino Jr. and Vikram S. Adve.
      From criswell at cs.uiuc.edu Tue Jun 20 12:45:02 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue, 20 Jun 2006 12:45:02 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200606201745.MAA21997@choi.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.234 -> 1.235 --- Log message: Added the privbracket project to the list of projects to auto-configure. --- Diffs of the changes: (+1 -0) configure.ac | 1 + 1 files changed, 1 insertion(+) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.234 llvm/autoconf/configure.ac:1.235 --- llvm/autoconf/configure.ac:1.234 Mon Jun 5 11:11:07 2006 +++ llvm/autoconf/configure.ac Tue Jun 20 12:44:40 2006 @@ -69,6 +69,7 @@ "CVS") ;; "sample") AC_CONFIG_SUBDIRS([projects/sample]) ;; "Stacker") AC_CONFIG_SUBDIRS([projects/Stacker]) ;; + "privbracket") AC_CONFIG_SUBDIRS([projects/privbracket]) ;; "llvm-test") AC_CONFIG_SUBDIRS([projects/llvm-test]) ;; "llvm-reopt") AC_CONFIG_SUBDIRS([projects/llvm-reopt]);; "llvm-gcc") AC_CONFIG_SUBDIRS([projects/llvm-gcc]) ;; From criswell at cs.uiuc.edu Tue Jun 20 12:45:02 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue, 20 Jun 2006 12:45:02 -0500 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200606201745.MAA21996@choi.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.237 -> 1.238 --- Log message: Added the privbracket project to the list of projects to auto-configure. --- Diffs of the changes: (+34 -29) configure | 63 +++++++++++++++++++++++++++++++++----------------------------- 1 files changed, 34 insertions(+), 29 deletions(-) Index: llvm/configure diff -u llvm/configure:1.237 llvm/configure:1.238 --- llvm/configure:1.237 Mon Jun 5 11:11:07 2006 +++ llvm/configure Tue Jun 20 12:44:37 2006 @@ -432,6 +432,7 @@ ac_unique_file="lib/VMCore/Module.cpp" ac_subdirs_all="$ac_subdirs_all projects/sample" ac_subdirs_all="$ac_subdirs_all projects/Stacker" +ac_subdirs_all="$ac_subdirs_all projects/privbracket" ac_subdirs_all="$ac_subdirs_all projects/llvm-test" ac_subdirs_all="$ac_subdirs_all projects/llvm-reopt" ac_subdirs_all="$ac_subdirs_all projects/llvm-gcc" @@ -1584,6 +1585,10 @@ subdirs="$subdirs projects/Stacker" ;; + "privbracket") + +subdirs="$subdirs projects/privbracket" + ;; "llvm-test") subdirs="$subdirs projects/llvm-test" @@ -8550,7 +8555,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext + echo '#line 10549 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -11026,7 +11031,7 @@ # Provide some information about the compiler. -echo "$as_me:11029:" \ +echo "$as_me:11034:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -12083,11 +12088,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12086: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12091: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12090: \$? = $ac_status" >&5 + echo "$as_me:12095: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -12326,11 +12331,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12329: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12334: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12333: \$? = $ac_status" >&5 + echo "$as_me:12338: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -12386,11 +12391,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12389: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12394: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12393: \$? = $ac_status" >&5 + echo "$as_me:12398: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14571,7 +14576,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:16870: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16869: \$? = $ac_status" >&5 + echo "$as_me:16874: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -16922,11 +16927,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16925: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16930: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16929: \$? = $ac_status" >&5 + echo "$as_me:16934: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18283,7 +18288,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:19226: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:19225: \$? = $ac_status" >&5 + echo "$as_me:19230: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -19278,11 +19283,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:19281: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19286: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:19285: \$? = $ac_status" >&5 + echo "$as_me:19290: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -21317,11 +21322,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21320: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21325: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21324: \$? = $ac_status" >&5 + echo "$as_me:21329: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -21560,11 +21565,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21563: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21568: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21567: \$? = $ac_status" >&5 + echo "$as_me:21572: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -21620,11 +21625,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21623: $lt_compile\"" >&5) + (eval echo "\"\$as_me:21628: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:21627: \$? = $ac_status" >&5 + echo "$as_me:21632: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -23805,7 +23810,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < Changes in directory llvm/docs: index.html updated: 1.52 -> 1.53 --- Log message: Added LLVM publications describing the LLVM compiler infrastructure. --- Diffs of the changes: (+37 -1) index.html | 38 +++++++++++++++++++++++++++++++++++++- 1 files changed, 37 insertions(+), 1 deletion(-) Index: llvm/docs/index.html diff -u llvm/docs/index.html:1.52 llvm/docs/index.html:1.53 --- llvm/docs/index.html:1.52 Thu Mar 23 00:53:38 2006 +++ llvm/docs/index.html Tue Jun 20 13:21:31 2006 @@ -13,6 +13,7 @@
      + + + + + + @@ -254,6 +290,6 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> LLVM Compiler Infrastructure
      - Last modified: $Date: 2006/03/23 06:53:38 $ + Last modified: $Date: 2006/06/20 18:21:31 $ From criswell at cs.uiuc.edu Tue Jun 20 13:22:18 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue, 20 Jun 2006 13:22:18 -0500 Subject: [llvm-commits] CVS: llvm-www/pubs/index.html Message-ID: <200606201822.NAA13668@choi.cs.uiuc.edu> Changes in directory llvm-www/pubs: index.html updated: 1.41 -> 1.42 --- Log message: Created one list of all LLVM publications. --- Diffs of the changes: (+28 -39) index.html | 67 +++++++++++++++++++++++++------------------------------------ 1 files changed, 28 insertions(+), 39 deletions(-) Index: llvm-www/pubs/index.html diff -u llvm-www/pubs/index.html:1.41 llvm-www/pubs/index.html:1.42 --- llvm-www/pubs/index.html:1.41 Tue Jun 20 12:19:12 2006 +++ llvm-www/pubs/index.html Tue Jun 20 13:22:01 2006 @@ -1,5 +1,5 @@ -
      Publications about LLVM
      +
      LLVM Related Publications
        @@ -9,46 +9,11 @@
      1. "Vector LLVA: A Virtual Vector Instruction Set for Media Processing"
        Robert L. Bocchino Jr. and Vikram S. Adve.
        Proc. of the Second International Conference on Virtual Execution Environments (VEE'06), Ottawa, Canada, 2006.
      2. -
      3. "Introduction to the LLVM Compiler Infrastructure"
        Chris Lattner
        - 2006 Itanium Conference and Expo, San Jose, California, April 2006.
      4. - - -
      5. "The LLVM Compiler Framework and -Infrastructure Tutorial"
        Chris Lattner and Vikram Adve
        -LCPC'04 Mini Workshop on Compiler Research Infrastructures, West Lafayette, Indiana, Sep. 2004.
      6. - -
      7. "LLVM: A Compilation Framework for -Lifelong Program Analysis & Transformation"
        Chris Lattner and Vikram -Adve
        Proc. of the 2004 International Symposium -on Code Generation and Optimization (CGO'04), Palo Alto, California, Mar. -2004.
      8. - -
      9. "LLVA: A Low-level Virtual Instruction Set -Architecture"
        Vikram Adve, Chris Lattner, Michael Brukman, Anand Shukla, -and Brian Gaeke
        Proc. of the -36th annual ACM/IEEE international symposium on Microarchitecture -(MICRO-36), San Diego, CA, December 2003.
      10. - -
      11. "Architecture For a Next-Generation -GCC"
        Chris Lattner & Vikram Adve
        First Annual GCC Developers' -Summit, Ottawa, Canada, May 2003.
      12. - -
      13. "LLVM: An Infrastructure for -Multi-Stage Optimization"
        Chris Lattner
        Masters Thesis, -Computer Science Dept., University of Illinois at Urbana-Champaign, -Dec. 2002
      14. - -
      - -
      Publications using LLVM
      - -
        -
      1. "Checker: a Static Program Checker"
        Nicholas Lewycky.
        B.Sc. Thesis, Computer Science Dept., Ryerson University, June 2006.
      2. -
      3. "Vector LLVA: A Virtual Vector Instruction Set for Media Processing"
        Robert L. Bocchino Jr. and Vikram S. Adve.
        -Proc. of the Second International Conference on Virtual Execution Environments (VEE'06), Ottawa, Canada, 2006.
      4. +
      5. "Introduction to the LLVM Compiler Infrastructure"
        Chris Lattner
        + 2006 Itanium Conference and Expo, San Jose, California, April 2006.
      6. "Tailoring Graph-coloring Register Allocation For Runtime Compilation"
        Keith D. Cooper and Anshuman Dasgupta
        Proc. of the 2006 International Symposium on Code Generation and Optimization (CGO'06), New York, New York, 2006.
      7. @@ -116,7 +81,10 @@ Dhurjati, Sumant Kowshik, Vikram Adve and Chris Lattner
        ACM Transactions in Embedded Computing Systems (TECS), February 2005. - +
      8. "The LLVM Compiler Framework and +Infrastructure Tutorial"
        Chris Lattner and Vikram Adve
        +LCPC'04 Mini Workshop on Compiler Research Infrastructures, West Lafayette, Indiana, Sep. 2004.
      9. +
      10. "RubyComp - A Ruby-to-LLVM Compiler Prototype"
        Anders Alexandersson
        Masters Thesis, Division of Computer Science at the Department of Informatics and Mathematics, @@ -131,6 +99,18 @@ Brian Ensink and Vikram Adve
        Proc. of the 24th International Conference on Distributed Computing Systems (ICDCS 2004), Tokyo, Japan, March 2004
      11. +
      12. "LLVM: A Compilation Framework for +Lifelong Program Analysis & Transformation"
        Chris Lattner and Vikram +Adve
        Proc. of the 2004 International Symposium +on Code Generation and Optimization (CGO'04), Palo Alto, California, Mar. +2004.
      13. + +
      14. "LLVA: A Low-level Virtual Instruction Set +Architecture"
        Vikram Adve, Chris Lattner, Michael Brukman, Anand Shukla, +and Brian Gaeke
        Proc. of the +36th annual ACM/IEEE international symposium on Microarchitecture +(MICRO-36), San Diego, CA, December 2003.
      15. +
      16. "Language Extensions for Performance-Oriented Programming"
        Joel Stanley
        Masters Thesis, Computer Science Dept., University of Illinois at Urbana-Champaign, @@ -147,11 +127,20 @@ Languages Compilers and Tools for Embedded Systems 2003 (LCTES 03), San Diego, CA, June 2003.
      17. +
      18. "Architecture For a Next-Generation +GCC"
        Chris Lattner & Vikram Adve
        First Annual GCC Developers' +Summit, Ottawa, Canada, May 2003.
      19. +
      20. "Data Structure Analysis: An Efficient Context-Sensitive Heap Analysis"
        Chris Lattner & Vikram Adve
        Technical Report #UIUCDCS-R-2003-2340, Computer Science Dept., Univ. of Illinois, Apr. 2003.
      21. +
      22. "LLVM: An Infrastructure for +Multi-Stage Optimization"
        Chris Lattner
        Masters Thesis, +Computer Science Dept., University of Illinois at Urbana-Champaign, +Dec. 2002
      23. +
      24. "Ensuring Code Safety Without Runtime Checks for Real-Time Control Systems"
        Sumant Kowshik, Dinakar Dhurjati, and Vikram Adve
        Proc. Int'l Conf. From evan.cheng at apple.com Tue Jun 20 13:47:59 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 20 Jun 2006 13:47:59 -0500 Subject: [llvm-commits] CVS: llvm-test/Makefile.rules Message-ID: <200606201847.NAA26506@zion.cs.uiuc.edu> Changes in directory llvm-test: Makefile.rules updated: 1.12 -> 1.13 --- Log message: Rename EXTRA_FLAGS to EXTRA_OPTIONS. --- Diffs of the changes: (+2 -2) Makefile.rules | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-test/Makefile.rules diff -u llvm-test/Makefile.rules:1.12 llvm-test/Makefile.rules:1.13 --- llvm-test/Makefile.rules:1.12 Tue Jun 6 19:05:16 2006 +++ llvm-test/Makefile.rules Tue Jun 20 13:47:47 2006 @@ -321,8 +321,8 @@ TARGET_FLAGS := -mdynamic-no-pic -fomit-frame-pointer endif -ifdef EXTRA_FLAGS -TARGET_FLAGS += $(EXTRA_FLAGS) +ifdef EXTRA_OPTIONS +TARGET_FLAGS += $(EXTRA_OPTIONS) endif # From evan.cheng at apple.com Tue Jun 20 13:49:26 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 20 Jun 2006 13:49:26 -0500 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200606201849.NAA26576@zion.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.109 -> 1.110 --- Log message: Rename EXTRA_FLAGS to EXTRA_OPTIONS. --- Diffs of the changes: (+1 -1) NightlyTest.pl | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.109 llvm/utils/NightlyTest.pl:1.110 --- llvm/utils/NightlyTest.pl:1.109 Mon Jun 12 14:03:17 2006 +++ llvm/utils/NightlyTest.pl Tue Jun 20 13:49:13 2006 @@ -334,7 +334,7 @@ $MAKEOPTS = "$MAKEOPTS $ARGV[0]"; shift; next; } if (/^-extraflags/) { - $PROGTESTOPTS .= " EXTRA_FLAGS=\'$ARGV[0]\'"; shift; next; + $PROGTESTOPTS .= " EXTRA_OPTIONS=\'$ARGV[0]\'"; shift; next; } if (/^-noexternals$/) { $NOEXTERNALS = 1; next; } if (/^-nodejagnu$/) { $NODEJAGNU = 1; next; } From evan.cheng at apple.com Tue Jun 20 13:51:00 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 20 Jun 2006 13:51:00 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200606201851.NAA26656@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.380 -> 1.381 --- Log message: Allow LLVM to be built with extra options. --- Diffs of the changes: (+1 -1) Makefile.rules | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.380 llvm/Makefile.rules:1.381 --- llvm/Makefile.rules:1.380 Fri Jun 16 16:47:59 2006 +++ llvm/Makefile.rules Tue Jun 20 13:50:48 2006 @@ -362,7 +362,7 @@ #---------------------------------------------------------- CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -Wno-long-long \ - -pedantic + -pedantic $(EXTRA_OPTIONS) ifeq ($(OS),HP-UX) CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE From jlaskey at apple.com Tue Jun 20 14:41:19 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 20 Jun 2006 14:41:19 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp MachineDebugInfo.cpp Message-ID: <200606201941.OAA27093@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.65 -> 1.66 MachineDebugInfo.cpp updated: 1.43 -> 1.44 --- Log message: Add support for function types. --- Diffs of the changes: (+20 -1) DwarfWriter.cpp | 17 +++++++++++++++++ MachineDebugInfo.cpp | 4 +++- 2 files changed, 20 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.65 llvm/lib/CodeGen/DwarfWriter.cpp:1.66 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.65 Mon Jun 19 14:49:42 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Tue Jun 20 14:41:06 2006 @@ -1402,6 +1402,23 @@ break; } + case DW_TAG_subroutine_type: { + // Add prototype flag. + Ty->AddUInt(DW_AT_prototyped, DW_FORM_flag, 1); + // Add return type. + Ty->AddDIEntry(DW_AT_type, DW_FORM_ref4, + NewType(Context, cast(Elements[0]), Unit)); + + // Add arguments. + for(unsigned i = 1, N = Elements.size(); i < N; ++i) { + DIE *Arg = new DIE(DW_TAG_formal_parameter); + Arg->AddDIEntry(DW_AT_type, DW_FORM_ref4, + NewType(Context, cast(Elements[i]), Unit)); + Ty->AddChild(Arg); + } + + break; + } default: break; } } Index: llvm/lib/CodeGen/MachineDebugInfo.cpp diff -u llvm/lib/CodeGen/MachineDebugInfo.cpp:1.43 llvm/lib/CodeGen/MachineDebugInfo.cpp:1.44 --- llvm/lib/CodeGen/MachineDebugInfo.cpp:1.43 Mon Jun 19 07:54:15 2006 +++ llvm/lib/CodeGen/MachineDebugInfo.cpp Tue Jun 20 14:41:06 2006 @@ -493,7 +493,8 @@ case DW_TAG_structure_type: case DW_TAG_union_type: case DW_TAG_enumeration_type: - case DW_TAG_vector_type: return new CompositeTypeDesc(Tag); + case DW_TAG_vector_type: + case DW_TAG_subroutine_type: return new CompositeTypeDesc(Tag); case DW_TAG_subrange_type: return new SubrangeDesc(); case DW_TAG_enumerator: return new EnumeratorDesc(); case DW_TAG_return_variable: @@ -831,6 +832,7 @@ case DW_TAG_union_type: case DW_TAG_enumeration_type: case DW_TAG_vector_type: + case DW_TAG_subroutine_type: return true; default: break; } From lattner at cs.uiuc.edu Tue Jun 20 15:47:50 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 20 Jun 2006 15:47:50 -0500 Subject: [llvm-commits] CVS: llvm/docs/index.html Message-ID: <200606202047.PAA27661@zion.cs.uiuc.edu> Changes in directory llvm/docs: index.html updated: 1.53 -> 1.54 --- Log message: Fix broken links, remove author information, add brief summary. --- Diffs of the changes: (+8 -29) index.html | 37 ++++++++----------------------------- 1 files changed, 8 insertions(+), 29 deletions(-) Index: llvm/docs/index.html diff -u llvm/docs/index.html:1.53 llvm/docs/index.html:1.54 --- llvm/docs/index.html:1.53 Tue Jun 20 13:21:31 2006 +++ llvm/docs/index.html Tue Jun 20 15:47:38 2006 @@ -55,34 +55,13 @@ @@ -290,6 +269,6 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> LLVM Compiler Infrastructure
        - Last modified: $Date: 2006/06/20 18:21:31 $ + Last modified: $Date: 2006/06/20 20:47:38 $ From lattner at cs.uiuc.edu Tue Jun 20 15:54:59 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 20 Jun 2006 15:54:59 -0500 Subject: [llvm-commits] CVS: llvm/docs/index.html Message-ID: <200606202054.PAA27889@zion.cs.uiuc.edu> Changes in directory llvm/docs: index.html updated: 1.54 -> 1.55 --- Log message: more significant moving of stuff around. --- Diffs of the changes: (+10 -19) index.html | 29 ++++++++++------------------- 1 files changed, 10 insertions(+), 19 deletions(-) Index: llvm/docs/index.html diff -u llvm/docs/index.html:1.54 llvm/docs/index.html:1.55 --- llvm/docs/index.html:1.54 Tue Jun 20 15:47:38 2006 +++ llvm/docs/index.html Tue Jun 20 15:54:47 2006 @@ -33,28 +33,13 @@ - + - - - - - - @@ -135,6 +121,9 @@ @@ -260,6 +260,6 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> LLVM Compiler Infrastructure
        - Last modified: $Date: 2006/06/20 20:54:47 $ + Last modified: $Date: 2006/06/20 20:56:03 $ From jlaskey at apple.com Tue Jun 20 16:13:33 2006 From: jlaskey at apple.com (Jim Laskey) Date: Tue, 20 Jun 2006 16:13:33 -0500 Subject: [llvm-commits] CVS: llvm/docs/SourceLevelDebugging.html Message-ID: <200606202113.QAA28175@zion.cs.uiuc.edu> Changes in directory llvm/docs: SourceLevelDebugging.html updated: 1.21 -> 1.22 --- Log message: add subroutine types --- Diffs of the changes: (+6 -1) SourceLevelDebugging.html | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) Index: llvm/docs/SourceLevelDebugging.html diff -u llvm/docs/SourceLevelDebugging.html:1.21 llvm/docs/SourceLevelDebugging.html:1.22 --- llvm/docs/SourceLevelDebugging.html:1.21 Fri Jun 16 08:45:38 2006 +++ llvm/docs/SourceLevelDebugging.html Tue Jun 20 16:13:20 2006 @@ -590,6 +590,7 @@ DW_TAG_structure_type = 19 DW_TAG_union_type = 23 DW_TAG_vector_type = 259 + DW_TAG_subroutine_type = 46

        The vector flag indicates that an array type is a native packed vector.

        @@ -610,6 +611,10 @@ or composite type descriptors, each representing a field member of the structure or union.

        +

        The the first member of subroutine (tag = DW_TAG_subroutine_type) +types is the type of the return value for the subroutine. The remaining +elements are the formal arguments to the subroutine.

        +

        Composite type location can be determined from the compile unit and line number. The size, alignment and offset are expressed in bits and can be 64 bit values. The alignment is used to @@ -1750,7 +1755,7 @@ Chris Lattner
        LLVM Compiler Infrastructure
        - Last modified: $Date: 2006/06/16 13:45:38 $ + Last modified: $Date: 2006/06/20 21:13:20 $ From lattner at cs.uiuc.edu Tue Jun 20 16:23:18 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 20 Jun 2006 16:23:18 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstr64Bit.td Message-ID: <200606202123.QAA28325@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstr64Bit.td updated: 1.4 -> 1.5 --- Log message: Add some patterns for globals, so we can now compile this: static unsigned long long X, Y; void test1() { X = Y; } into: _test1: lis r2, ha16(_Y) lis r3, ha16(_X) ld r2, lo16(_Y)(r2) std r2, lo16(_X)(r3) blr --- Diffs of the changes: (+37 -1) PPCInstr64Bit.td | 38 +++++++++++++++++++++++++++++++++++++- 1 files changed, 37 insertions(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPCInstr64Bit.td diff -u llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.4 llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.5 --- llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.4 Mon Jun 19 19:38:36 2006 +++ llvm/lib/Target/PowerPC/PPCInstr64Bit.td Tue Jun 20 16:23:06 2006 @@ -12,6 +12,18 @@ // //===----------------------------------------------------------------------===// +//===----------------------------------------------------------------------===// +// 64-bit operands. +// +def symbolHi64 : Operand { + let PrintMethod = "printSymbolHi"; +} +def symbolLo64 : Operand { + let PrintMethod = "printSymbolLo"; +} + + + //===----------------------------------------------------------------------===// // Fixed point instructions. @@ -19,6 +31,13 @@ let PPC970_Unit = 1 in { // FXU Operations. +def LI8 : DForm_2_r0<14, (ops G8RC:$rD, symbolLo64:$imm), + "li $rD, $imm", IntGeneral, + [(set G8RC:$rD, immSExt16:$imm)]>; +def LIS8 : DForm_2_r0<15, (ops G8RC:$rD, symbolHi64:$imm), + "lis $rD, $imm", IntGeneral, + [(set G8RC:$rD, imm16Shifted:$imm)]>; + def OR8 : XForm_6<31, 444, (ops G8RC:$rA, G8RC:$rS, G8RC:$rB), "or $rA, $rS, $rB", IntGeneral, [(set G8RC:$rA, (or G8RC:$rS, G8RC:$rB))]>; @@ -32,6 +51,10 @@ def ADD8 : XOForm_1<31, 266, 0, (ops G8RC:$rT, G8RC:$rA, G8RC:$rB), "add $rT, $rA, $rB", IntGeneral, [(set G8RC:$rT, (add G8RC:$rA, G8RC:$rB))]>; +def ADDIS8 : DForm_2<15, (ops G8RC:$rD, G8RC:$rA, symbolHi64:$imm), + "addis $rD, $rA, $imm", IntGeneral, + [(set G8RC:$rD, (add G8RC:$rA, imm16Shifted:$imm))]>; + def MULHD : XOForm_1<31, 73, 0, (ops G8RC:$rT, G8RC:$rA, G8RC:$rB), "mulhd $rT, $rA, $rB", IntMulHW, [(set G8RC:$rT, (mulhs G8RC:$rA, G8RC:$rB))]>; @@ -163,7 +186,6 @@ //===----------------------------------------------------------------------===// // Instruction Patterns // - // Extensions and truncates to/from 32-bit regs. def : Pat<(i64 (zext GPRC:$in)), (RLDICL (OR4To8 GPRC:$in, GPRC:$in), 0, 32)>; @@ -177,3 +199,17 @@ (RLDICR G8RC:$in, imm:$imm, (SHL64 imm:$imm))>; def : Pat<(srl G8RC:$in, (i64 imm:$imm)), (RLDICL G8RC:$in, (SRL64 imm:$imm), imm:$imm)>; + +// Hi and Lo for Darwin Global Addresses. +def : Pat<(PPChi tglobaladdr:$in, 0), (LIS8 tglobaladdr:$in)>; +def : Pat<(PPClo tglobaladdr:$in, 0), (LI8 tglobaladdr:$in)>; +def : Pat<(PPChi tconstpool:$in , 0), (LIS8 tconstpool:$in)>; +def : Pat<(PPClo tconstpool:$in , 0), (LI8 tconstpool:$in)>; +def : Pat<(PPChi tjumptable:$in , 0), (LIS8 tjumptable:$in)>; +def : Pat<(PPClo tjumptable:$in , 0), (LI8 tjumptable:$in)>; +def : Pat<(add G8RC:$in, (PPChi tglobaladdr:$g, 0)), + (ADDIS8 G8RC:$in, tglobaladdr:$g)>; +def : Pat<(add G8RC:$in, (PPChi tconstpool:$g, 0)), + (ADDIS8 G8RC:$in, tconstpool:$g)>; +def : Pat<(add G8RC:$in, (PPChi tjumptable:$g, 0)), + (ADDIS8 G8RC:$in, tjumptable:$g)>; From lattner at cs.uiuc.edu Tue Jun 20 16:39:42 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 20 Jun 2006 16:39:42 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrInfo.td Message-ID: <200606202139.QAA28506@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstrInfo.td updated: 1.226 -> 1.227 --- Log message: 64-bit bugfix: 0xFFFF0000 cannot be formed with a single lis. --- Diffs of the changes: (+5 -1) PPCInstrInfo.td | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.226 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.227 --- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.226 Mon Jun 19 19:39:56 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Tue Jun 20 16:39:30 2006 @@ -143,7 +143,11 @@ def imm16Shifted : PatLeaf<(imm), [{ // imm16Shifted predicate - True if only bits in the top 16-bits of the // immediate are set. Used by instructions like 'addis'. - return ((unsigned)N->getValue() & 0xFFFF0000U) == (unsigned)N->getValue(); + if (N->getValue() & 0xFFFF) return false; + if (N->getValueType(0) == MVT::i32) + return true; + // For 64-bit, make sure it is sext right. + return N->getValue() == (uint64_t)(int)N->getValue(); }], HI16>; From evan.cheng at apple.com Tue Jun 20 17:11:24 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 20 Jun 2006 17:11:24 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200606202211.RAA28816@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.265 -> 1.266 --- Log message: __i386__, __i386, etc. are not defined for x86-64. Use __x86_64__. --- Diffs of the changes: (+2 -1) Writer.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.265 llvm/lib/Target/CBackend/Writer.cpp:1.266 --- llvm/lib/Target/CBackend/Writer.cpp:1.265 Tue Jun 6 16:45:47 2006 +++ llvm/lib/Target/CBackend/Writer.cpp Tue Jun 20 17:11:12 2006 @@ -937,7 +937,8 @@ Out << "#define CODE_FOR_MAIN() /* Any target-specific code for main()*/\n"; // On X86, set the FP control word to 64-bits of precision instead of 80 bits. Out << "#if defined(__GNUC__) && !defined(__llvm__)\n" - << "#if defined(i386) || defined(__i386__) || defined(__i386)\n" + << "#if defined(i386) || defined(__i386__) || defined(__i386) || " + << "defined(__x86_64__)\n" << "#undef CODE_FOR_MAIN\n" << "#define CODE_FOR_MAIN() \\\n" << " {short F;__asm__ (\"fnstcw %0\" : \"=m\" (*&F)); \\\n" From evan.cheng at apple.com Tue Jun 20 17:16:45 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 20 Jun 2006 17:16:45 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.config.in configure Message-ID: <200606202216.RAA28855@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.config.in updated: 1.58 -> 1.59 configure updated: 1.238 -> 1.239 --- Log message: Added --with-extra-options=opts to specify additional options to build LLVM and run tests. --- Diffs of the changes: (+21 -1) Makefile.config.in | 3 +++ configure | 19 ++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.58 llvm/Makefile.config.in:1.59 --- llvm/Makefile.config.in:1.58 Wed May 31 20:09:43 2006 +++ llvm/Makefile.config.in Tue Jun 20 17:16:32 2006 @@ -103,6 +103,9 @@ # Targets that we should build TARGETS_TO_BUILD=@TARGETS_TO_BUILD@ +# Extra options to compile LLVM with +EXTRA_OPTIONS=@EXTRA_OPTIONS@ + # Endian-ness of the target ENDIAN=@ENDIAN@ Index: llvm/configure diff -u llvm/configure:1.238 llvm/configure:1.239 --- llvm/configure:1.238 Tue Jun 20 12:44:37 2006 +++ llvm/configure Tue Jun 20 17:16:32 2006 @@ -477,7 +477,7 @@ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVM_ON_UNIX LLVM_ON_WIN32 ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CVSBUILD ENABLE_OPTIMIZED DISABLE_ASSERTIONS DEBUG_RUNTIME JIT TARGET_HAS_JIT ENABLE_DOXYGEN ENABLE_THREADS TARGETS_TO_BUILD CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON ifGNUmake LN_S CMP CP DATE FIND GREP MKDIR MV RANLIB ac_ct_RANLIB RM SED TAR GRAPHVIZ DOT GV DOTTY PERL HAVE_PERL INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZIP2 DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN RUNTEST TCLSH ! ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS LLVMGCC LLVMGXX ALLOCA MMAP_FILE LLVMCC1 LLVMCC1PLUS LLVMGCCDIR LLVMGCC_VERSION LLVMGCC_MAJVERS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS LLVM_COPYRIGHT subdirs build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVM_ON_UNIX LLVM_ON_WIN32 ARCH ENDIAN CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CVSBUILD ENABLE_OPTIMIZED DISABLE_ASSERTIONS DEBUG_RUNTIME JIT TARGET_HAS_JIT ENABLE_DOXYGEN ENABLE_THREADS TARGETS_TO_BUILD EXTRA_OPTIONS CPP CXX CXXFLAGS ac_ct_CXX LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON ifGNUmake LN_S CMP CP DATE FIND GREP MKDIR MV RANLIB ac_ct_RANLIB RM SED TAR GRAPHVIZ DOT GV DOTTY PERL HAVE_PERL INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA BZIP2 DOXYGEN ETAGS GROFF GZIP POD2HTML POD2MAN ! RUNTEST TCLSH ZIP EGREP INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL ECHO AR ac_ct_AR STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL ETAGSFLAGS LLVMGCC LLVMGXX ALLOCA MMAP_FILE LLVMCC1 LLVMCC1PLUS LLVMGCCDIR LLVMGCC_VERSION LLVMGCC_MAJVERS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1057,6 +1057,7 @@ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-llvmgccdir Specify location of llvm-gcc install dir (default searches PATH) + --with-extra-options Specify addtional options to compile LLVM with --with-tclinclude directory where tcl headers are --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use @@ -3163,6 +3164,21 @@ +# Check whether --with-extra-options or --without-extra-options was given. +if test "${with_extra_options+set}" = set; then + extraopts="$with_extra_options" + +else + extraopts=default +fi; +case "$extraopts" in + default) EXTRA_OPTIONS= ;; + *) EXTRA_OPTIONS=$extraopts ;; +esac +EXTRA_OPTIONS=$EXTRA_OPTIONS + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -31891,6 +31907,7 @@ s, at ENABLE_DOXYGEN@,$ENABLE_DOXYGEN,;t t s, at ENABLE_THREADS@,$ENABLE_THREADS,;t t s, at TARGETS_TO_BUILD@,$TARGETS_TO_BUILD,;t t +s, at EXTRA_OPTIONS@,$EXTRA_OPTIONS,;t t s, at CPP@,$CPP,;t t s, at CXX@,$CXX,;t t s, at CXXFLAGS@,$CXXFLAGS,;t t From evan.cheng at apple.com Tue Jun 20 17:16:46 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 20 Jun 2006 17:16:46 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200606202216.RAA28859@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.235 -> 1.236 --- Log message: Added --with-extra-options=opts to specify additional options to build LLVM and run tests. --- Diffs of the changes: (+10 -0) configure.ac | 10 ++++++++++ 1 files changed, 10 insertions(+) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.235 llvm/autoconf/configure.ac:1.236 --- llvm/autoconf/configure.ac:1.235 Tue Jun 20 12:44:40 2006 +++ llvm/autoconf/configure.ac Tue Jun 20 17:16:32 2006 @@ -325,6 +325,16 @@ *) AC_MSG_ERROR([Invalid path for --with-llvmgccdir. Provide full path]) ;; esac +dnl Specify extra build options +AC_ARG_WITH(extra-options, + AS_HELP_STRING([--with-extra-options], + [Specify addtional options to compile LLVM with]),, + extraopts=default) +case "$extraopts" in + default) EXTRA_OPTIONS= ;; + *) EXTRA_OPTIONS=$extraopts ;; +esac +AC_SUBST(EXTRA_OPTIONS,$EXTRA_OPTIONS) dnl===-----------------------------------------------------------------------=== dnl=== From lattner at cs.uiuc.edu Tue Jun 20 17:34:33 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 20 Jun 2006 17:34:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstr64Bit.td PPCInstrInfo.td Message-ID: <200606202234.RAA28980@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstr64Bit.td updated: 1.5 -> 1.6 PPCInstrInfo.td updated: 1.227 -> 1.228 --- Log message: Add some 64-bit logical ops. Split imm16Shifted into a sext/zext form for 64-bit support. Add some patterns for immediate formation. For example, we now compile this: static unsigned long long Y; void test3() { Y = 0xF0F00F00; } into: _test3: li r2, 3840 lis r3, ha16(_Y) xoris r2, r2, 61680 std r2, lo16(_Y)(r3) blr GCC produces: _test3: li r0,0 lis r2,ha16(_Y) ori r0,r0,61680 sldi r0,r0,16 ori r0,r0,3840 std r0,lo16(_Y)(r2) blr --- Diffs of the changes: (+78 -16) PPCInstr64Bit.td | 66 ++++++++++++++++++++++++++++++++++++++++++++++++------- PPCInstrInfo.td | 28 ++++++++++++++++------- 2 files changed, 78 insertions(+), 16 deletions(-) Index: llvm/lib/Target/PowerPC/PPCInstr64Bit.td diff -u llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.5 llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.6 --- llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.5 Tue Jun 20 16:23:06 2006 +++ llvm/lib/Target/PowerPC/PPCInstr64Bit.td Tue Jun 20 17:34:10 2006 @@ -31,13 +31,7 @@ let PPC970_Unit = 1 in { // FXU Operations. -def LI8 : DForm_2_r0<14, (ops G8RC:$rD, symbolLo64:$imm), - "li $rD, $imm", IntGeneral, - [(set G8RC:$rD, immSExt16:$imm)]>; -def LIS8 : DForm_2_r0<15, (ops G8RC:$rD, symbolHi64:$imm), - "lis $rD, $imm", IntGeneral, - [(set G8RC:$rD, imm16Shifted:$imm)]>; - +// Copies, extends, truncates. def OR8 : XForm_6<31, 444, (ops G8RC:$rA, G8RC:$rS, G8RC:$rB), "or $rA, $rS, $rB", IntGeneral, [(set G8RC:$rA, (or G8RC:$rS, G8RC:$rB))]>; @@ -47,13 +41,47 @@ def OR8To4 : XForm_6<31, 444, (ops GPRC:$rA, G8RC:$rS, G8RC:$rB), "or $rA, $rS, $rB", IntGeneral, []>; + +def LI8 : DForm_2_r0<14, (ops G8RC:$rD, symbolLo64:$imm), + "li $rD, $imm", IntGeneral, + [(set G8RC:$rD, immSExt16:$imm)]>; +def LIS8 : DForm_2_r0<15, (ops G8RC:$rD, symbolHi64:$imm), + "lis $rD, $imm", IntGeneral, + [(set G8RC:$rD, imm16ShiftedSExt:$imm)]>; + +// Logical ops. +def ANDIo8 : DForm_4<28, (ops G8RC:$dst, G8RC:$src1, u16imm:$src2), + "andi. $dst, $src1, $src2", IntGeneral, + [(set G8RC:$dst, (and G8RC:$src1, immZExt16:$src2))]>, + isDOT; +def ANDISo8 : DForm_4<29, (ops G8RC:$dst, G8RC:$src1, u16imm:$src2), + "andis. $dst, $src1, $src2", IntGeneral, + [(set G8RC:$dst, (and G8RC:$src1,imm16ShiftedZExt:$src2))]>, + isDOT; +def ORI8 : DForm_4<24, (ops G8RC:$dst, G8RC:$src1, u16imm:$src2), + "ori $dst, $src1, $src2", IntGeneral, + [(set G8RC:$dst, (or G8RC:$src1, immZExt16:$src2))]>; +def ORIS8 : DForm_4<25, (ops G8RC:$dst, G8RC:$src1, u16imm:$src2), + "oris $dst, $src1, $src2", IntGeneral, + [(set G8RC:$dst, (or G8RC:$src1, imm16ShiftedZExt:$src2))]>; +def XORI8 : DForm_4<26, (ops G8RC:$dst, G8RC:$src1, u16imm:$src2), + "xori $dst, $src1, $src2", IntGeneral, + [(set G8RC:$dst, (xor G8RC:$src1, immZExt16:$src2))]>; +def XORIS8 : DForm_4<27, (ops G8RC:$dst, G8RC:$src1, u16imm:$src2), + "xoris $dst, $src1, $src2", IntGeneral, + [(set G8RC:$dst, (xor G8RC:$src1, imm16ShiftedZExt:$src2))]>; + + def ADD8 : XOForm_1<31, 266, 0, (ops G8RC:$rT, G8RC:$rA, G8RC:$rB), "add $rT, $rA, $rB", IntGeneral, [(set G8RC:$rT, (add G8RC:$rA, G8RC:$rB))]>; def ADDIS8 : DForm_2<15, (ops G8RC:$rD, G8RC:$rA, symbolHi64:$imm), "addis $rD, $rA, $imm", IntGeneral, - [(set G8RC:$rD, (add G8RC:$rA, imm16Shifted:$imm))]>; + [(set G8RC:$rD, (add G8RC:$rA, imm16ShiftedSExt:$imm))]>; + + + def MULHD : XOForm_1<31, 73, 0, (ops G8RC:$rT, G8RC:$rA, G8RC:$rB), "mulhd $rT, $rA, $rB", IntMulHW, @@ -186,6 +214,28 @@ //===----------------------------------------------------------------------===// // Instruction Patterns // + +// Immediate support. +// Handled above: +// sext(0x0000_0000_0000_FFFF, i8) -> li imm +// sext(0x0000_0000_FFFF_0000, i16) -> lis imm>>16 + +// sext(0x0000_0000_FFFF_FFFF, i16) -> lis + ori +def sext_0x0000_0000_FFFF_FFFF_i16 : PatLeaf<(imm), [{ + return N->getValue() == (uint64_t)(int32_t)N->getValue(); +}]>; +def : Pat<(i64 sext_0x0000_0000_FFFF_FFFF_i16:$imm), + (ORI8 (LIS8 (HI16 imm:$imm)), (LO16 imm:$imm))>; + +// zext(0x0000_0000_FFFF_FFFF, i16) -> xoris (li lo16(imm)), imm>>16 +def zext_0x0000_0000_FFFF_FFFF_i16 : PatLeaf<(imm), [{ + return (N->getValue() & 0xFFFFFFFF00000000ULL) == 0; +}]>; +def : Pat<(i64 zext_0x0000_0000_FFFF_FFFF_i16:$imm), + (XORIS8 (LI8 (LO16 imm:$imm)), (HI16 imm:$imm))>; + + + // Extensions and truncates to/from 32-bit regs. def : Pat<(i64 (zext GPRC:$in)), (RLDICL (OR4To8 GPRC:$in, GPRC:$in), 0, 32)>; Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.227 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.228 --- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.227 Tue Jun 20 16:39:30 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Tue Jun 20 17:34:10 2006 @@ -140,9 +140,21 @@ return (unsigned)N->getValue() == (unsigned short)N->getValue(); }], LO16>; -def imm16Shifted : PatLeaf<(imm), [{ - // imm16Shifted predicate - True if only bits in the top 16-bits of the - // immediate are set. Used by instructions like 'addis'. +// imm16Shifted* - These match immediates where the low 16-bits are zero. There +// are two forms: imm16ShiftedSExt and imm16ShiftedZExt. These two forms are +// identical in 32-bit mode, but in 64-bit mode, they return true if the +// immediate fits into a sign/zero extended 32-bit immediate (with the low bits +// clear). +def imm16ShiftedZExt : PatLeaf<(imm), [{ + // imm16ShiftedZExt predicate - True if only bits in the top 16-bits of the + // immediate are set. Used by instructions like 'xoris'. + return (N->getValue() & ~uint64_t(0xFFFF0000)) == 0; +}], HI16>; + +def imm16ShiftedSExt : PatLeaf<(imm), [{ + // imm16ShiftedSExt predicate - True if only bits in the top 16-bits of the + // immediate are set. Used by instructions like 'addis'. Identical to + // imm16ShiftedZExt in 32-bit mode. if (N->getValue() & 0xFFFF) return false; if (N->getValueType(0) == MVT::i32) return true; @@ -364,7 +376,7 @@ []>; def ADDIS : DForm_2<15, (ops GPRC:$rD, GPRC:$rA, symbolHi:$imm), "addis $rD, $rA, $imm", IntGeneral, - [(set GPRC:$rD, (add GPRC:$rA, imm16Shifted:$imm))]>; + [(set GPRC:$rD, (add GPRC:$rA, imm16ShiftedSExt:$imm))]>; def LA : DForm_2<14, (ops GPRC:$rD, GPRC:$rA, symbolLo:$sym), "la $rD, $sym($rA)", IntGeneral, [(set GPRC:$rD, (add GPRC:$rA, @@ -380,7 +392,7 @@ [(set GPRC:$rD, immSExt16:$imm)]>; def LIS : DForm_2_r0<15, (ops GPRC:$rD, symbolHi:$imm), "lis $rD, $imm", IntGeneral, - [(set GPRC:$rD, imm16Shifted:$imm)]>; + [(set GPRC:$rD, imm16ShiftedSExt:$imm)]>; } let isStore = 1, noResults = 1, PPC970_Unit = 2 in { def STB : DForm_3<38, (ops GPRC:$rS, memri:$src), @@ -403,20 +415,20 @@ isDOT; def ANDISo : DForm_4<29, (ops GPRC:$dst, GPRC:$src1, u16imm:$src2), "andis. $dst, $src1, $src2", IntGeneral, - [(set GPRC:$dst, (and GPRC:$src1, imm16Shifted:$src2))]>, + [(set GPRC:$dst, (and GPRC:$src1,imm16ShiftedZExt:$src2))]>, isDOT; def ORI : DForm_4<24, (ops GPRC:$dst, GPRC:$src1, u16imm:$src2), "ori $dst, $src1, $src2", IntGeneral, [(set GPRC:$dst, (or GPRC:$src1, immZExt16:$src2))]>; def ORIS : DForm_4<25, (ops GPRC:$dst, GPRC:$src1, u16imm:$src2), "oris $dst, $src1, $src2", IntGeneral, - [(set GPRC:$dst, (or GPRC:$src1, imm16Shifted:$src2))]>; + [(set GPRC:$dst, (or GPRC:$src1, imm16ShiftedZExt:$src2))]>; def XORI : DForm_4<26, (ops GPRC:$dst, GPRC:$src1, u16imm:$src2), "xori $dst, $src1, $src2", IntGeneral, [(set GPRC:$dst, (xor GPRC:$src1, immZExt16:$src2))]>; def XORIS : DForm_4<27, (ops GPRC:$dst, GPRC:$src1, u16imm:$src2), "xoris $dst, $src1, $src2", IntGeneral, - [(set GPRC:$dst, (xor GPRC:$src1, imm16Shifted:$src2))]>; + [(set GPRC:$dst, (xor GPRC:$src1,imm16ShiftedZExt:$src2))]>; def NOP : DForm_4_zero<24, (ops), "nop", IntGeneral, []>; def CMPI : DForm_5<11, (ops CRRC:$crD, i1imm:$L, GPRC:$rA, s16imm:$imm), From lattner at cs.uiuc.edu Tue Jun 20 17:39:11 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 20 Jun 2006 17:39:11 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstr64Bit.td Message-ID: <200606202239.RAA29061@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstr64Bit.td updated: 1.6 -> 1.7 --- Log message: Instead of li/xoris use li/oris. Note that this doesn't work if bit 15 is set, so disable the pattern in that case. --- Diffs of the changes: (+5 -5) PPCInstr64Bit.td | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) Index: llvm/lib/Target/PowerPC/PPCInstr64Bit.td diff -u llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.6 llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.7 --- llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.6 Tue Jun 20 17:34:10 2006 +++ llvm/lib/Target/PowerPC/PPCInstr64Bit.td Tue Jun 20 17:38:59 2006 @@ -227,12 +227,12 @@ def : Pat<(i64 sext_0x0000_0000_FFFF_FFFF_i16:$imm), (ORI8 (LIS8 (HI16 imm:$imm)), (LO16 imm:$imm))>; -// zext(0x0000_0000_FFFF_FFFF, i16) -> xoris (li lo16(imm)), imm>>16 -def zext_0x0000_0000_FFFF_FFFF_i16 : PatLeaf<(imm), [{ - return (N->getValue() & 0xFFFFFFFF00000000ULL) == 0; +// zext(0x0000_0000_FFFF_7FFF, i16) -> oris (li lo16(imm)), imm>>16 +def zext_0x0000_0000_FFFF_7FFF_i16 : PatLeaf<(imm), [{ + return (N->getValue() & 0xFFFFFFFF00008000ULL) == 0; }]>; -def : Pat<(i64 zext_0x0000_0000_FFFF_FFFF_i16:$imm), - (XORIS8 (LI8 (LO16 imm:$imm)), (HI16 imm:$imm))>; +def : Pat<(i64 zext_0x0000_0000_FFFF_7FFF_i16:$imm), + (ORIS8 (LI8 (LO16 imm:$imm)), (HI16 imm:$imm))>; From lattner at cs.uiuc.edu Tue Jun 20 18:03:13 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 20 Jun 2006 18:03:13 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstr64Bit.td Message-ID: <200606202303.SAA29214@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstr64Bit.td updated: 1.7 -> 1.8 --- Log message: Add some more immediate patterns. This allows us to compile: void test6() { Y = 0xABCD0123BCDE4567; } into: _test6: lis r2, -21555 lis r3, ha16(_Y) ori r2, r2, 291 rldicr r2, r2, 32, 31 oris r2, r2, 48350 ori r2, r2, 17767 std r2, lo16(_Y)(r3) blr --- Diffs of the changes: (+30 -0) PPCInstr64Bit.td | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+) Index: llvm/lib/Target/PowerPC/PPCInstr64Bit.td diff -u llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.7 llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.8 --- llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.7 Tue Jun 20 17:38:59 2006 +++ llvm/lib/Target/PowerPC/PPCInstr64Bit.td Tue Jun 20 18:03:01 2006 @@ -215,6 +215,17 @@ // Instruction Patterns // +def HI32_48 : SDNodeXFormgetValue() >> 32)); +}]>; + +def HI48_64 : SDNodeXFormgetValue() >> 48)); +}]>; + + // Immediate support. // Handled above: // sext(0x0000_0000_0000_FFFF, i8) -> li imm @@ -234,6 +245,25 @@ def : Pat<(i64 zext_0x0000_0000_FFFF_7FFF_i16:$imm), (ORIS8 (LI8 (LO16 imm:$imm)), (HI16 imm:$imm))>; +// zext(0x0000_0000_FFFF_FFFF, i16) -> oris (ori (li 0), lo16(imm)), imm>>16 +def zext_0x0000_0000_FFFF_FFFF_i16 : PatLeaf<(imm), [{ + return (N->getValue() & 0xFFFFFFFF00000000ULL) == 0; +}]>; +def : Pat<(i64 zext_0x0000_0000_FFFF_FFFF_i16:$imm), + (ORIS8 (ORI8 (LI8 0), (LO16 imm:$imm)), (HI16 imm:$imm))>; + + +// Fully general (and most expensive: 6 instructions!) immediate pattern. +def : Pat<(i64 imm:$imm), + (ORI8 + (ORIS8 + (RLDICR + (ORI8 + (LIS8 (HI48_64 imm:$imm)), + (HI32_48 imm:$imm)), + 32, 31), + (HI16 imm:$imm)), + (LO16 imm:$imm))>; // Extensions and truncates to/from 32-bit regs. From lattner at cs.uiuc.edu Tue Jun 20 18:11:48 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 20 Jun 2006 18:11:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrInfo.td Message-ID: <200606202311.SAA29303@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstrInfo.td updated: 1.228 -> 1.229 --- Log message: remove some unused patterns --- Diffs of the changes: (+0 -6) PPCInstrInfo.td | 6 ------ 1 files changed, 6 deletions(-) Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.228 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.229 --- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.228 Tue Jun 20 17:34:10 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Tue Jun 20 18:11:36 2006 @@ -483,9 +483,6 @@ def AND : XForm_6<31, 28, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB), "and $rA, $rS, $rB", IntGeneral, [(set GPRC:$rA, (and GPRC:$rS, GPRC:$rB))]>; -def ANDo : XForm_6<31, 28, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB), - "and. $rA, $rS, $rB", IntGeneral, - []>, isDOT; def ANDC : XForm_6<31, 60, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB), "andc $rA, $rS, $rB", IntGeneral, [(set GPRC:$rA, (and GPRC:$rS, (not GPRC:$rB)))]>; @@ -495,9 +492,6 @@ def NOR : XForm_6<31, 124, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB), "nor $rA, $rS, $rB", IntGeneral, [(set GPRC:$rA, (not (or GPRC:$rS, GPRC:$rB)))]>; -def ORo : XForm_6<31, 444, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB), - "or. $rA, $rS, $rB", IntGeneral, - []>, isDOT; def ORC : XForm_6<31, 412, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB), "orc $rA, $rS, $rB", IntGeneral, [(set GPRC:$rA, (or GPRC:$rS, (not GPRC:$rB)))]>; From lattner at cs.uiuc.edu Tue Jun 20 18:12:11 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 20 Jun 2006 18:12:11 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstr64Bit.td Message-ID: <200606202312.SAA29338@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstr64Bit.td updated: 1.8 -> 1.9 --- Log message: add some logical ops --- Diffs of the changes: (+28 -3) PPCInstr64Bit.td | 31 ++++++++++++++++++++++++++++--- 1 files changed, 28 insertions(+), 3 deletions(-) Index: llvm/lib/Target/PowerPC/PPCInstr64Bit.td diff -u llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.8 llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.9 --- llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.8 Tue Jun 20 18:03:01 2006 +++ llvm/lib/Target/PowerPC/PPCInstr64Bit.td Tue Jun 20 18:11:59 2006 @@ -32,9 +32,6 @@ let PPC970_Unit = 1 in { // FXU Operations. // Copies, extends, truncates. -def OR8 : XForm_6<31, 444, (ops G8RC:$rA, G8RC:$rS, G8RC:$rB), - "or $rA, $rS, $rB", IntGeneral, - [(set G8RC:$rA, (or G8RC:$rS, G8RC:$rB))]>; def OR4To8 : XForm_6<31, 444, (ops G8RC:$rA, GPRC:$rS, GPRC:$rB), "or $rA, $rS, $rB", IntGeneral, []>; @@ -50,6 +47,32 @@ [(set G8RC:$rD, imm16ShiftedSExt:$imm)]>; // Logical ops. +def NAND8: XForm_6<31, 476, (ops G8RC:$rA, G8RC:$rS, G8RC:$rB), + "nand $rA, $rS, $rB", IntGeneral, + [(set G8RC:$rA, (not (and G8RC:$rS, G8RC:$rB)))]>; +def AND8 : XForm_6<31, 28, (ops G8RC:$rA, G8RC:$rS, G8RC:$rB), + "and $rA, $rS, $rB", IntGeneral, + [(set G8RC:$rA, (and G8RC:$rS, G8RC:$rB))]>; +def ANDC8: XForm_6<31, 60, (ops G8RC:$rA, G8RC:$rS, G8RC:$rB), + "andc $rA, $rS, $rB", IntGeneral, + [(set G8RC:$rA, (and G8RC:$rS, (not G8RC:$rB)))]>; +def OR8 : XForm_6<31, 444, (ops G8RC:$rA, G8RC:$rS, G8RC:$rB), + "or $rA, $rS, $rB", IntGeneral, + [(set G8RC:$rA, (or G8RC:$rS, G8RC:$rB))]>; +def NOR8 : XForm_6<31, 124, (ops G8RC:$rA, G8RC:$rS, G8RC:$rB), + "nor $rA, $rS, $rB", IntGeneral, + [(set G8RC:$rA, (not (or G8RC:$rS, G8RC:$rB)))]>; +def ORC8 : XForm_6<31, 412, (ops G8RC:$rA, G8RC:$rS, G8RC:$rB), + "orc $rA, $rS, $rB", IntGeneral, + [(set G8RC:$rA, (or G8RC:$rS, (not G8RC:$rB)))]>; +def EQV8 : XForm_6<31, 284, (ops G8RC:$rA, G8RC:$rS, G8RC:$rB), + "eqv $rA, $rS, $rB", IntGeneral, + [(set G8RC:$rA, (not (xor G8RC:$rS, G8RC:$rB)))]>; +def XOR8 : XForm_6<31, 316, (ops G8RC:$rA, G8RC:$rS, G8RC:$rB), + "xor $rA, $rS, $rB", IntGeneral, + [(set G8RC:$rA, (xor G8RC:$rS, G8RC:$rB))]>; + +// Logical ops with immediate. def ANDIo8 : DForm_4<28, (ops G8RC:$dst, G8RC:$src1, u16imm:$src2), "andi. $dst, $src1, $src2", IntGeneral, [(set G8RC:$dst, (and G8RC:$src1, immZExt16:$src2))]>, @@ -252,6 +275,8 @@ def : Pat<(i64 zext_0x0000_0000_FFFF_FFFF_i16:$imm), (ORIS8 (ORI8 (LI8 0), (LO16 imm:$imm)), (HI16 imm:$imm))>; +// FIXME: Handle smart forms where the top 32-bits are set. Right now, stuff +// like 0xABCD0123BCDE0000 hits the case below, which produces ORI R, R, 0's! // Fully general (and most expensive: 6 instructions!) immediate pattern. def : Pat<(i64 imm:$imm), From lattner at cs.uiuc.edu Tue Jun 20 18:15:19 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 20 Jun 2006 18:15:19 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrFormats.td PPCInstrInfo.td Message-ID: <200606202315.SAA29419@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstrFormats.td updated: 1.74 -> 1.75 PPCInstrInfo.td updated: 1.229 -> 1.230 --- Log message: remove unused flag --- Diffs of the changes: (+0 -2) PPCInstrFormats.td | 1 - PPCInstrInfo.td | 1 - 2 files changed, 2 deletions(-) Index: llvm/lib/Target/PowerPC/PPCInstrFormats.td diff -u llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.74 llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.75 --- llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.74 Tue Jun 6 16:29:23 2006 +++ llvm/lib/Target/PowerPC/PPCInstrFormats.td Tue Jun 20 18:15:07 2006 @@ -16,7 +16,6 @@ field bits<32> Inst; bit PPC64 = 0; // Default value, override with isPPC64 - bit VMX = 0; // Default value, override with isVMX let Name = ""; let Namespace = "PPC"; Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.229 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.230 --- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.229 Tue Jun 20 18:11:36 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Tue Jun 20 18:15:07 2006 @@ -167,7 +167,6 @@ // PowerPC Flag Definitions. class isPPC64 { bit PPC64 = 1; } -class isVMX { bit VMX = 1; } class isDOT { list Defs = [CR0]; bit RC = 1; From lattner at cs.uiuc.edu Tue Jun 20 18:19:10 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 20 Jun 2006 18:19:10 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp PPCInstr64Bit.td PPCInstrFormats.td PPCInstrInfo.cpp PPCInstrInfo.td PPCRegisterInfo.cpp Message-ID: <200606202319.SAA29500@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCAsmPrinter.cpp updated: 1.178 -> 1.179 PPCInstr64Bit.td updated: 1.9 -> 1.10 PPCInstrFormats.td updated: 1.75 -> 1.76 PPCInstrInfo.cpp updated: 1.21 -> 1.22 PPCInstrInfo.td updated: 1.230 -> 1.231 PPCRegisterInfo.cpp updated: 1.69 -> 1.70 --- Log message: Rename OR4 -> OR. Move some PPC64-specific stuff to the 64-bit file --- Diffs of the changes: (+28 -28) PPCAsmPrinter.cpp | 2 +- PPCInstr64Bit.td | 33 ++++++++++++++++++++++----------- PPCInstrFormats.td | 1 - PPCInstrInfo.cpp | 2 +- PPCInstrInfo.td | 12 +----------- PPCRegisterInfo.cpp | 6 +++--- 6 files changed, 28 insertions(+), 28 deletions(-) Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.178 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.179 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.178 Thu Jun 15 15:51:43 2006 +++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Tue Jun 20 18:18:58 2006 @@ -465,7 +465,7 @@ O << ", " << (unsigned int)SH << "\n"; return; } - } else if (MI->getOpcode() == PPC::OR4 || MI->getOpcode() == PPC::OR8) { + } else if (MI->getOpcode() == PPC::OR || MI->getOpcode() == PPC::OR8) { if (MI->getOperand(1).getReg() == MI->getOperand(2).getReg()) { O << "mr "; printOperand(MI, 0); Index: llvm/lib/Target/PowerPC/PPCInstr64Bit.td diff -u llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.9 llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.10 --- llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.9 Tue Jun 20 18:11:59 2006 +++ llvm/lib/Target/PowerPC/PPCInstr64Bit.td Tue Jun 20 18:18:58 2006 @@ -22,7 +22,29 @@ let PrintMethod = "printSymbolLo"; } +//===----------------------------------------------------------------------===// +// 64-bit transformation functions. +// + +def SHL64 : SDNodeXFormgetValue()); +}]>; +def SRL64 : SDNodeXFormgetValue() ? getI32Imm(64 - N->getValue()) : getI32Imm(0); +}]>; + +def HI32_48 : SDNodeXFormgetValue() >> 32)); +}]>; + +def HI48_64 : SDNodeXFormgetValue() >> 48)); +}]>; //===----------------------------------------------------------------------===// @@ -238,17 +260,6 @@ // Instruction Patterns // -def HI32_48 : SDNodeXFormgetValue() >> 32)); -}]>; - -def HI48_64 : SDNodeXFormgetValue() >> 48)); -}]>; - - // Immediate support. // Handled above: // sext(0x0000_0000_0000_FFFF, i8) -> li imm Index: llvm/lib/Target/PowerPC/PPCInstrFormats.td diff -u llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.75 llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.76 --- llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.75 Tue Jun 20 18:15:07 2006 +++ llvm/lib/Target/PowerPC/PPCInstrFormats.td Tue Jun 20 18:18:58 2006 @@ -785,7 +785,6 @@ class Pseudo pattern> : I<0, OL, asmstr, NoItinerary> { let PPC64 = 0; - let VMX = 0; let Pattern = pattern; let Inst{31-0} = 0; } Index: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1.21 llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1.22 --- llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:1.21 Fri Jun 16 19:01:04 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.cpp Tue Jun 20 18:18:58 2006 @@ -35,7 +35,7 @@ unsigned& sourceReg, unsigned& destReg) const { MachineOpCode oc = MI.getOpcode(); - if (oc == PPC::OR4 || oc == PPC::OR8 || oc == PPC::VOR || + if (oc == PPC::OR || oc == PPC::OR8 || oc == PPC::VOR || oc == PPC::OR4To8 || oc == PPC::OR8To4) { // or r1, r2, r2 assert(MI.getNumOperands() == 3 && MI.getOperand(0).isRegister() && Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.230 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.231 --- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.230 Tue Jun 20 18:15:07 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Tue Jun 20 18:18:58 2006 @@ -97,21 +97,11 @@ return getI32Imm(31 - N->getValue()); }]>; -def SHL64 : SDNodeXFormgetValue()); -}]>; - def SRL32 : SDNodeXFormgetValue() ? getI32Imm(32 - N->getValue()) : getI32Imm(0); }]>; -def SRL64 : SDNodeXFormgetValue() ? getI32Imm(64 - N->getValue()) : getI32Imm(0); -}]>; - def LO16 : SDNodeXFormgetValue()); @@ -485,7 +475,7 @@ def ANDC : XForm_6<31, 60, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB), "andc $rA, $rS, $rB", IntGeneral, [(set GPRC:$rA, (and GPRC:$rS, (not GPRC:$rB)))]>; -def OR4 : XForm_6<31, 444, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB), +def OR : XForm_6<31, 444, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB), "or $rA, $rS, $rB", IntGeneral, [(set GPRC:$rA, (or GPRC:$rS, GPRC:$rB))]>; def NOR : XForm_6<31, 124, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB), Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.69 llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.70 --- llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.69 Mon Jun 12 18:59:16 2006 +++ llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Tue Jun 20 18:18:58 2006 @@ -189,7 +189,7 @@ unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *RC) const { if (RC == PPC::GPRCRegisterClass) { - BuildMI(MBB, MI, PPC::OR4, 2, DestReg).addReg(SrcReg).addReg(SrcReg); + BuildMI(MBB, MI, PPC::OR, 2, DestReg).addReg(SrcReg).addReg(SrcReg); } else if (RC == PPC::G8RCRegisterClass) { BuildMI(MBB, MI, PPC::OR8, 2, DestReg).addReg(SrcReg).addReg(SrcReg); } else if (RC == PPC::F4RCRegisterClass) { @@ -282,7 +282,7 @@ // it takes more than one instruction to store it. unsigned Opc = MI->getOpcode(); - if ((Opc == PPC::OR4 && + if ((Opc == PPC::OR && MI->getOperand(1).getReg() == MI->getOperand(2).getReg())) { if (OpNum == 0) { // move -> store unsigned InReg = MI->getOperand(1).getReg(); @@ -631,7 +631,7 @@ if (HasFP) { BuildMI(MBB, MBBI, PPC::STW, 3) .addReg(PPC::R31).addImm(GPRSize).addReg(PPC::R1); - BuildMI(MBB, MBBI, PPC::OR4, 2, PPC::R31).addReg(PPC::R1).addReg(PPC::R1); + BuildMI(MBB, MBBI, PPC::OR, 2, PPC::R31).addReg(PPC::R1).addReg(PPC::R1); } } From lattner at cs.uiuc.edu Tue Jun 20 18:21:32 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 20 Jun 2006 18:21:32 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrInfo.td Message-ID: <200606202321.SAA29569@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCInstrInfo.td updated: 1.231 -> 1.232 --- Log message: Make these predicates correct in 64-bit mode too. --- Diffs of the changes: (+5 -2) PPCInstrInfo.td | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.231 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.232 --- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.231 Tue Jun 20 18:18:58 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Tue Jun 20 18:21:20 2006 @@ -122,12 +122,15 @@ def immSExt16 : PatLeaf<(imm), [{ // immSExt16 predicate - True if the immediate fits in a 16-bit sign extended // field. Used by instructions like 'addi'. - return (int)N->getValue() == (short)N->getValue(); + if (N->getValueType(0) == MVT::i32) + return (int32_t)N->getValue() == (short)N->getValue(); + else + return (int64_t)N->getValue() == (short)N->getValue(); }]>; def immZExt16 : PatLeaf<(imm), [{ // immZExt16 predicate - True if the immediate fits in a 16-bit zero extended // field. Used by instructions like 'ori'. - return (unsigned)N->getValue() == (unsigned short)N->getValue(); + return (uint64_t)N->getValue() == (unsigned short)N->getValue(); }], LO16>; // imm16Shifted* - These match immediates where the low 16-bits are zero. There From evan.cheng at apple.com Tue Jun 20 19:29:26 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 20 Jun 2006 19:29:26 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineCodeEmitter.h Message-ID: <200606210029.TAA30327@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineCodeEmitter.h updated: 1.40 -> 1.41 --- Log message: Fix non-64-bit clean code. --- Diffs of the changes: (+2 -1) MachineCodeEmitter.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/MachineCodeEmitter.h diff -u llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.40 llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.41 --- llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.40 Wed May 3 12:10:41 2006 +++ llvm/include/llvm/CodeGen/MachineCodeEmitter.h Tue Jun 20 19:29:14 2006 @@ -129,7 +129,8 @@ if (Alignment == 0) Alignment = 1; // Move the current buffer ptr up to the specified alignment. CurBufferPtr = - (unsigned char*)(((intptr_t)CurBufferPtr+Alignment-1) & ~(Alignment-1)); + (unsigned char*)(((intptr_t)CurBufferPtr+Alignment-1) & + ~(intptr_t)(Alignment-1)); if (CurBufferPtr > BufferEnd) CurBufferPtr = BufferEnd; } From lattner at cs.uiuc.edu Tue Jun 20 19:34:16 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 20 Jun 2006 19:34:16 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp Message-ID: <200606210034.TAA30419@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCISelLowering.cpp updated: 1.190 -> 1.191 --- Log message: Correct returns of 64-bit values, though they seemed to work before... --- Diffs of the changes: (+19 -9) PPCISelLowering.cpp | 28 +++++++++++++++++++--------- 1 files changed, 19 insertions(+), 9 deletions(-) Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.190 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.191 --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.190 Fri Jun 16 16:01:35 2006 +++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Tue Jun 20 19:34:03 2006 @@ -733,8 +733,8 @@ Op.getOperand(1), Op.getOperand(2)); } -static SDOperand LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG, - int &VarArgsFrameIndex) { +static SDOperand LowerFORMAL_ARGUMENTS_32(SDOperand Op, SelectionDAG &DAG, + int &VarArgsFrameIndex) { // TODO: add description of PPC stack frame format, or at least some docs. // MachineFunction &MF = DAG.getMachineFunction(); @@ -883,6 +883,11 @@ return DAG.getNode(ISD::MERGE_VALUES, RetVT, ArgValues); } +static SDOperand LowerFORMAL_ARGUMENTS_64(SDOperand Op, SelectionDAG &DAG, + int &VarArgsFrameIndex) { + return LowerFORMAL_ARGUMENTS_32(Op, DAG, VarArgsFrameIndex); +} + /// isCallCompatibleAddress - Return the immediate to use if the specified /// 32-bit value is representable in the immediate field of a BxA instruction. static SDNode *isBLACompatibleAddress(SDOperand Op, SelectionDAG &DAG) { @@ -1165,13 +1170,15 @@ case 3: { MVT::ValueType ArgVT = Op.getOperand(1).getValueType(); unsigned ArgReg; - if (MVT::isVector(ArgVT)) - ArgReg = PPC::V2; - else if (MVT::isInteger(ArgVT)) + if (ArgVT == MVT::i32) { ArgReg = PPC::R3; - else { - assert(MVT::isFloatingPoint(ArgVT)); + } else if (ArgVT == MVT::i64) { + ArgReg = PPC::X3; + } else if (MVT::isFloatingPoint(ArgVT)) { ArgReg = PPC::F1; + } else { + assert(MVT::isVector(ArgVT)); + ArgReg = PPC::V2; } Copy = DAG.getCopyToReg(Op.getOperand(0), ArgReg, Op.getOperand(1), @@ -2128,8 +2135,11 @@ case ISD::JumpTable: return LowerJumpTable(Op, DAG); case ISD::SETCC: return LowerSETCC(Op, DAG); case ISD::VASTART: return LowerVASTART(Op, DAG, VarArgsFrameIndex); - case ISD::FORMAL_ARGUMENTS: return LowerFORMAL_ARGUMENTS(Op, DAG, - VarArgsFrameIndex); + case ISD::FORMAL_ARGUMENTS: + if (getPointerTy() == MVT::i32) + return LowerFORMAL_ARGUMENTS_32(Op, DAG, VarArgsFrameIndex); + else + return LowerFORMAL_ARGUMENTS_64(Op, DAG, VarArgsFrameIndex); case ISD::CALL: return LowerCALL(Op, DAG); case ISD::RET: return LowerRET(Op, DAG); From alenhar2 at cs.uiuc.edu Tue Jun 20 20:00:55 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 20 Jun 2006 20:00:55 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelLowering.cpp Message-ID: <200606210100.UAA30666@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaISelLowering.cpp updated: 1.51 -> 1.52 --- Log message: fix argument problem --- Diffs of the changes: (+5 -1) AlphaISelLowering.cpp | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.51 llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.52 --- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.51 Tue Jun 13 13:27:39 2006 +++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Tue Jun 20 20:00:43 2006 @@ -210,11 +210,15 @@ std::cerr << "Unknown Type " << ObjectVT << "\n"; abort(); case MVT::f64: - case MVT::f32: args_float[ArgNo] = AddLiveIn(MF, args_float[ArgNo], &Alpha::F8RCRegClass); ArgVal = DAG.getCopyFromReg(Root, args_float[ArgNo], ObjectVT); break; + case MVT::f32: + args_float[ArgNo] = AddLiveIn(MF, args_float[ArgNo], + &Alpha::F4RCRegClass); + ArgVal = DAG.getCopyFromReg(Root, args_float[ArgNo], ObjectVT); + break; case MVT::i64: args_int[ArgNo] = AddLiveIn(MF, args_int[ArgNo], &Alpha::GPRCRegClass); From jlaskey at apple.com Wed Jun 21 06:08:23 2006 From: jlaskey at apple.com (Jim Laskey) Date: Wed, 21 Jun 2006 06:08:23 -0500 Subject: [llvm-commits] CVS: llvm/docs/SourceLevelDebugging.html Message-ID: <200606211108.GAA29710@zion.cs.uiuc.edu> Changes in directory llvm/docs: SourceLevelDebugging.html updated: 1.22 -> 1.23 --- Log message: fix typos --- Diffs of the changes: (+3 -3) SourceLevelDebugging.html | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/docs/SourceLevelDebugging.html diff -u llvm/docs/SourceLevelDebugging.html:1.22 llvm/docs/SourceLevelDebugging.html:1.23 --- llvm/docs/SourceLevelDebugging.html:1.22 Tue Jun 20 16:13:20 2006 +++ llvm/docs/SourceLevelDebugging.html Wed Jun 21 06:08:10 2006 @@ -611,8 +611,8 @@ or composite type descriptors, each representing a field member of the structure or union.

        -

        The the first member of subroutine (tag = DW_TAG_subroutine_type) -types is the type of the return value for the subroutine. The remaining +

        The first member of subroutine (tag = DW_TAG_subroutine_type) +type elements is the return type for the subroutine. The remaining elements are the formal arguments to the subroutine.

        Composite type location can be @@ -1755,7 +1755,7 @@ Chris Lattner
        LLVM Compiler Infrastructure
        - Last modified: $Date: 2006/06/20 21:13:20 $ + Last modified: $Date: 2006/06/21 11:08:10 $ From alenhar2 at cs.uiuc.edu Wed Jun 21 08:37:53 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Wed, 21 Jun 2006 08:37:53 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp AlphaISelLowering.cpp AlphaISelLowering.h Message-ID: <200606211337.IAA14586@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaAsmPrinter.cpp updated: 1.43 -> 1.44 AlphaISelLowering.cpp updated: 1.52 -> 1.53 AlphaISelLowering.h updated: 1.18 -> 1.19 --- Log message: inline asm, at least for floats --- Diffs of the changes: (+58 -0) AlphaAsmPrinter.cpp | 12 ++++++++++++ AlphaISelLowering.cpp | 39 +++++++++++++++++++++++++++++++++++++++ AlphaISelLowering.h | 7 +++++++ 3 files changed, 58 insertions(+) Index: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp diff -u llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.43 llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.44 --- llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.43 Wed May 17 14:24:31 2006 +++ llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp Wed Jun 21 08:37:27 2006 @@ -59,6 +59,9 @@ bool runOnMachineFunction(MachineFunction &F); bool doInitialization(Module &M); bool doFinalization(Module &M); + + bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, + unsigned AsmVariant, const char *ExtraCode); }; } // end of anonymous namespace @@ -265,3 +268,12 @@ AsmPrinter::doFinalization(M); return false; } + +/// PrintAsmOperand - Print out an operand for an inline asm expression. +/// +bool AlphaAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, + unsigned AsmVariant, + const char *ExtraCode) { + printOperand(MI, OpNo); + return false; +} Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.52 llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.53 --- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.52 Tue Jun 20 20:00:43 2006 +++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Wed Jun 21 08:37:27 2006 @@ -580,3 +580,42 @@ // The code in LowerOperation already handles i32 vaarg return LowerOperation(Op, DAG); } + + +//Inline Asm + +/// getConstraintType - Given a constraint letter, return the type of +/// constraint it is for this target. +AlphaTargetLowering::ConstraintType +AlphaTargetLowering::getConstraintType(char ConstraintLetter) const { + switch (ConstraintLetter) { + default: break; + case 'f': + return C_RegisterClass; + } + return TargetLowering::getConstraintType(ConstraintLetter); +} + +std::vector AlphaTargetLowering:: +getRegClassForInlineAsmConstraint(const std::string &Constraint, + MVT::ValueType VT) const { + if (Constraint.size() == 1) { + switch (Constraint[0]) { + default: break; // Unknown constriant letter + case 'f': + return make_vector(Alpha::F0 , Alpha::F1 , Alpha::F2 , + Alpha::F3 , Alpha::F4 , Alpha::F5 , + Alpha::F6 , Alpha::F7 , Alpha::F8 , + Alpha::F9 , Alpha::F10, Alpha::F11, + Alpha::F12, Alpha::F13, Alpha::F14, + Alpha::F15, Alpha::F16, Alpha::F17, + Alpha::F18, Alpha::F19, Alpha::F20, + Alpha::F21, Alpha::F22, Alpha::F23, + Alpha::F24, Alpha::F25, Alpha::F26, + Alpha::F27, Alpha::F28, Alpha::F29, + Alpha::F30, Alpha::F31, 0); + } + } + + return std::vector(); +} Index: llvm/lib/Target/Alpha/AlphaISelLowering.h diff -u llvm/lib/Target/Alpha/AlphaISelLowering.h:1.18 llvm/lib/Target/Alpha/AlphaISelLowering.h:1.19 --- llvm/lib/Target/Alpha/AlphaISelLowering.h:1.18 Tue Jun 13 13:27:39 2006 +++ llvm/lib/Target/Alpha/AlphaISelLowering.h Wed Jun 21 08:37:27 2006 @@ -15,6 +15,7 @@ #ifndef LLVM_TARGET_ALPHA_ALPHAISELLOWERING_H #define LLVM_TARGET_ALPHA_ALPHAISELLOWERING_H +#include "llvm/ADT/VectorExtras.h" #include "llvm/Target/TargetLowering.h" #include "llvm/CodeGen/SelectionDAG.h" #include "Alpha.h" @@ -77,6 +78,12 @@ bool isTailCall, SDOperand Callee, ArgListTy &Args, SelectionDAG &DAG); + ConstraintType getConstraintType(char ConstraintLetter) const; + + std::vector + getRegClassForInlineAsmConstraint(const std::string &Constraint, + MVT::ValueType VT) const; + void restoreGP(MachineBasicBlock* BB); void restoreRA(MachineBasicBlock* BB); unsigned getVRegGP() { return GP; } From alenhar2 at cs.uiuc.edu Wed Jun 21 10:42:48 2006 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Wed, 21 Jun 2006 10:42:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp AlphaISelDAGToDAG.cpp AlphaISelLowering.cpp Message-ID: <200606211542.KAA15141@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Alpha: AlphaAsmPrinter.cpp updated: 1.44 -> 1.45 AlphaISelDAGToDAG.cpp updated: 1.45 -> 1.46 AlphaISelLowering.cpp updated: 1.53 -> 1.54 --- Log message: Add memory operand and int regs --- Diffs of the changes: (+46 -0) AlphaAsmPrinter.cpp | 14 ++++++++++++++ AlphaISelDAGToDAG.cpp | 18 ++++++++++++++++++ AlphaISelLowering.cpp | 14 ++++++++++++++ 3 files changed, 46 insertions(+) Index: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp diff -u llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.44 llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.45 --- llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.44 Wed Jun 21 08:37:27 2006 +++ llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp Wed Jun 21 10:42:36 2006 @@ -62,6 +62,10 @@ bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode); + bool PrintAsmMemoryOperand(const MachineInstr *MI, + unsigned OpNo, + unsigned AsmVariant, + const char *ExtraCode); }; } // end of anonymous namespace @@ -277,3 +281,13 @@ printOperand(MI, OpNo); return false; } + +bool AlphaAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, + unsigned OpNo, + unsigned AsmVariant, + const char *ExtraCode) { + if (ExtraCode && ExtraCode[0]) + return true; // Unknown modifier. + printOperand(MI, OpNo); + return false; +} Index: llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp diff -u llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.45 llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.46 --- llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp:1.45 Tue Jun 13 15:34:47 2006 +++ llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Wed Jun 21 10:42:36 2006 @@ -119,6 +119,24 @@ return "Alpha DAG->DAG Pattern Instruction Selection"; } + /// SelectInlineAsmMemoryOperand - Implement addressing mode selection for + /// inline asm expressions. + virtual bool SelectInlineAsmMemoryOperand(const SDOperand &Op, + char ConstraintCode, + std::vector &OutOps, + SelectionDAG &DAG) { + SDOperand Op0; + switch (ConstraintCode) { + default: return true; + case 'm': // memory + Select(Op0, Op); + break; + } + + OutOps.push_back(Op0); + return false; + } + // Include the pieces autogenerated from the target description. #include "AlphaGenDAGISel.inc" Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.53 llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.54 --- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.53 Wed Jun 21 08:37:27 2006 +++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Wed Jun 21 10:42:36 2006 @@ -591,6 +591,7 @@ switch (ConstraintLetter) { default: break; case 'f': + case 'r': return C_RegisterClass; } return TargetLowering::getConstraintType(ConstraintLetter); @@ -614,6 +615,19 @@ Alpha::F24, Alpha::F25, Alpha::F26, Alpha::F27, Alpha::F28, Alpha::F29, Alpha::F30, Alpha::F31, 0); + case 'r': + return make_vector(Alpha::R0 , Alpha::R1 , Alpha::R2 , + Alpha::R3 , Alpha::R4 , Alpha::R5 , + Alpha::R6 , Alpha::R7 , Alpha::R8 , + Alpha::R9 , Alpha::R10, Alpha::R11, + Alpha::R12, Alpha::R13, Alpha::R14, + Alpha::R15, Alpha::R16, Alpha::R17, + Alpha::R18, Alpha::R19, Alpha::R20, + Alpha::R21, Alpha::R22, Alpha::R23, + Alpha::R24, Alpha::R25, Alpha::R26, + Alpha::R27, Alpha::R28, Alpha::R29, + Alpha::R30, Alpha::R31, 0); + } } From lattner at cs.uiuc.edu Wed Jun 21 11:53:12 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 21 Jun 2006 11:53:12 -0500 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs llvmAsmParser.y.cvs Message-ID: <200606211653.LAA15954@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.cpp.cvs updated: 1.6 -> 1.7 llvmAsmParser.y.cvs updated: 1.6 -> 1.7 --- Log message: fix typo --- Diffs of the changes: (+187 -187) llvmAsmParser.cpp.cvs | 372 +++++++++++++++++++++++++------------------------- llvmAsmParser.y.cvs | 2 2 files changed, 187 insertions(+), 187 deletions(-) Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.6 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.7 --- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.6 Fri May 19 16:28:53 2006 +++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Wed Jun 21 11:53:00 2006 @@ -1,5 +1,5 @@ -/* A Bison parser, made from /Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y +/* A Bison parser, made from /Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y by GNU Bison version 1.28 */ #define YYBISON 1 /* Identify Bison output. */ @@ -112,7 +112,7 @@ #define VAARG_old 355 #define VANEXT_old 356 -#line 14 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 14 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -174,7 +174,7 @@ std::map LateResolveTypes; /// PlaceHolderInfo - When temporary placeholder objects are created, remember - /// how they were referenced and one which line of the input they came from so + /// how they were referenced and on which line of the input they came from so /// that we can resolve them later and print error messages as appropriate. std::map > PlaceHolderInfo; @@ -988,7 +988,7 @@ } -#line 890 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 890 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" typedef union { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -2243,7 +2243,7 @@ switch (yyn) { case 2: -#line 1011 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1011 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].UIntVal > (uint32_t)INT32_MAX) // Outside of my range! ThrowException("Value too large for type!"); @@ -2251,7 +2251,7 @@ ; break;} case 4: -#line 1019 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1019 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].UInt64Val > (uint64_t)INT64_MAX) // Outside of my range! ThrowException("Value too large for type!"); @@ -2259,59 +2259,59 @@ ; break;} case 33: -#line 1042 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1042 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.StrVal = yyvsp[-1].StrVal; ; break;} case 34: -#line 1045 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1045 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.StrVal = 0; ; break;} case 35: -#line 1049 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1049 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Linkage = GlobalValue::InternalLinkage; ; break;} case 36: -#line 1050 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1050 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Linkage = GlobalValue::LinkOnceLinkage; ; break;} case 37: -#line 1051 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1051 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Linkage = GlobalValue::WeakLinkage; ; break;} case 38: -#line 1052 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1052 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Linkage = GlobalValue::AppendingLinkage; ; break;} case 39: -#line 1053 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1053 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Linkage = GlobalValue::ExternalLinkage; ; break;} case 40: -#line 1055 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1055 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = CallingConv::C; ; break;} case 41: -#line 1056 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1056 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = CallingConv::C; ; break;} case 42: -#line 1057 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1057 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = CallingConv::CSRet; ; break;} case 43: -#line 1058 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1058 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = CallingConv::Fast; ; break;} case 44: -#line 1059 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1059 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = CallingConv::Cold; ; break;} case 45: -#line 1060 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1060 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((unsigned)yyvsp[0].UInt64Val != yyvsp[0].UInt64Val) ThrowException("Calling conv too large!"); @@ -2319,11 +2319,11 @@ ; break;} case 46: -#line 1068 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1068 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = 0; ; break;} case 47: -#line 1069 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1069 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = yyvsp[0].UInt64Val; if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal)) @@ -2331,11 +2331,11 @@ ; break;} case 48: -#line 1074 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1074 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = 0; ; break;} case 49: -#line 1075 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1075 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.UIntVal = yyvsp[0].UInt64Val; if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal)) @@ -2343,7 +2343,7 @@ ; break;} case 50: -#line 1082 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1082 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { for (unsigned i = 0, e = strlen(yyvsp[0].StrVal); i != e; ++i) if (yyvsp[0].StrVal[i] == '"' || yyvsp[0].StrVal[i] == '\\') @@ -2352,30 +2352,30 @@ ; break;} case 51: -#line 1089 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1089 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.StrVal = 0; ; break;} case 52: -#line 1090 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1090 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.StrVal = yyvsp[0].StrVal; ; break;} case 53: -#line 1095 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1095 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" {; break;} case 54: -#line 1096 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1096 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" {; break;} case 55: -#line 1097 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1097 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV->setSection(yyvsp[0].StrVal); free(yyvsp[0].StrVal); ; break;} case 56: -#line 1101 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1101 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].UInt64Val != 0 && !isPowerOf2_32(yyvsp[0].UInt64Val)) ThrowException("Alignment must be a power of two!"); @@ -2383,15 +2383,15 @@ ; break;} case 58: -#line 1114 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1114 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; break;} case 60: -#line 1115 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1115 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; break;} case 61: -#line 1117 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1117 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) ThrowException("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription()); @@ -2399,25 +2399,25 @@ ; break;} case 75: -#line 1128 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1128 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeVal = new PATypeHolder(OpaqueType::get()); ; break;} case 76: -#line 1131 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1131 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); ; break;} case 77: -#line 1134 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1134 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... yyval.TypeVal = new PATypeHolder(getTypeVal(yyvsp[0].ValIDVal)); ; break;} case 78: -#line 1140 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1140 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if (yyvsp[0].UInt64Val > (uint64_t)~0U) ThrowException("Value out of range!"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -2427,7 +2427,7 @@ ; break;} case 79: -#line 1147 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1147 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Function derived type? std::vector Params; for (std::list::iterator I = yyvsp[-1].TypeList->begin(), @@ -2442,14 +2442,14 @@ ; break;} case 80: -#line 1159 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1159 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Sized array type? yyval.TypeVal = new PATypeHolder(HandleUpRefs(ArrayType::get(*yyvsp[-1].TypeVal, (unsigned)yyvsp[-3].UInt64Val))); delete yyvsp[-1].TypeVal; ; break;} case 81: -#line 1163 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1163 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Packed array type? const llvm::Type* ElemTy = yyvsp[-1].TypeVal->get(); if ((unsigned)yyvsp[-3].UInt64Val != yyvsp[-3].UInt64Val) @@ -2463,7 +2463,7 @@ ; break;} case 82: -#line 1174 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1174 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = yyvsp[-1].TypeList->begin(), @@ -2475,51 +2475,51 @@ ; break;} case 83: -#line 1183 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1183 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? yyval.TypeVal = new PATypeHolder(StructType::get(std::vector())); ; break;} case 84: -#line 1186 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1186 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Pointer type? yyval.TypeVal = new PATypeHolder(HandleUpRefs(PointerType::get(*yyvsp[-1].TypeVal))); delete yyvsp[-1].TypeVal; ; break;} case 85: -#line 1194 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1194 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeList = new std::list(); yyval.TypeList->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; ; break;} case 86: -#line 1198 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1198 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList=yyvsp[-2].TypeList)->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; ; break;} case 88: -#line 1204 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1204 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList=yyvsp[-2].TypeList)->push_back(Type::VoidTy); ; break;} case 89: -#line 1207 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1207 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList = new std::list())->push_back(Type::VoidTy); ; break;} case 90: -#line 1210 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1210 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TypeList = new std::list(); ; break;} case 91: -#line 1220 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1220 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const ArrayType *ATy = dyn_cast(yyvsp[-3].TypeVal->get()); if (ATy == 0) @@ -2547,7 +2547,7 @@ ; break;} case 92: -#line 1245 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1245 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get()); if (ATy == 0) @@ -2563,7 +2563,7 @@ ; break;} case 93: -#line 1258 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1258 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get()); if (ATy == 0) @@ -2595,7 +2595,7 @@ ; break;} case 94: -#line 1287 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1287 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const PackedType *PTy = dyn_cast(yyvsp[-3].TypeVal->get()); if (PTy == 0) @@ -2623,7 +2623,7 @@ ; break;} case 95: -#line 1312 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1312 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast(yyvsp[-3].TypeVal->get()); if (STy == 0) @@ -2646,7 +2646,7 @@ ; break;} case 96: -#line 1332 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1332 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast(yyvsp[-2].TypeVal->get()); if (STy == 0) @@ -2661,7 +2661,7 @@ ; break;} case 97: -#line 1344 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1344 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PTy = dyn_cast(yyvsp[-1].TypeVal->get()); if (PTy == 0) @@ -2673,14 +2673,14 @@ ; break;} case 98: -#line 1353 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1353 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ConstVal = UndefValue::get(yyvsp[-1].TypeVal->get()); delete yyvsp[-1].TypeVal; ; break;} case 99: -#line 1357 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1357 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *Ty = dyn_cast(yyvsp[-1].TypeVal->get()); if (Ty == 0) @@ -2742,7 +2742,7 @@ ; break;} case 100: -#line 1416 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1416 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-1].TypeVal->get() != yyvsp[0].ConstVal->getType()) ThrowException("Mismatched types for constant expression!"); @@ -2751,7 +2751,7 @@ ; break;} case 101: -#line 1422 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1422 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = yyvsp[-1].TypeVal->get(); if (isa(Ty) || Ty == Type::LabelTy || isa(Ty)) @@ -2761,7 +2761,7 @@ ; break;} case 102: -#line 1430 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1430 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantSInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].SInt64Val)) ThrowException("Constant value doesn't fit in type!"); @@ -2769,7 +2769,7 @@ ; break;} case 103: -#line 1435 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1435 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantUInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].UInt64Val)) ThrowException("Constant value doesn't fit in type!"); @@ -2777,19 +2777,19 @@ ; break;} case 104: -#line 1440 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1440 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants yyval.ConstVal = ConstantBool::True; ; break;} case 105: -#line 1443 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1443 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants yyval.ConstVal = ConstantBool::False; ; break;} case 106: -#line 1446 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1446 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Float & Double constants if (!ConstantFP::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].FPVal)) ThrowException("Floating point constant invalid for type!!"); @@ -2797,7 +2797,7 @@ ; break;} case 107: -#line 1453 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1453 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!yyvsp[-3].ConstVal->getType()->isFirstClassType()) ThrowException("cast constant expression from a non-primitive type: '" + @@ -2810,7 +2810,7 @@ ; break;} case 108: -#line 1463 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1463 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa(yyvsp[-2].ConstVal->getType())) ThrowException("GetElementPtr requires a pointer operand!"); @@ -2844,7 +2844,7 @@ ; break;} case 109: -#line 1494 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1494 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-5].ConstVal->getType() != Type::BoolTy) ThrowException("Select condition must be of boolean type!"); @@ -2854,7 +2854,7 @@ ; break;} case 110: -#line 1501 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1501 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("Binary operator types must match!"); @@ -2878,7 +2878,7 @@ ; break;} case 111: -#line 1522 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1522 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("Logical operator types must match!"); @@ -2891,7 +2891,7 @@ ; break;} case 112: -#line 1532 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1532 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) ThrowException("setcc operand types must match!"); @@ -2899,7 +2899,7 @@ ; break;} case 113: -#line 1537 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1537 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-1].ConstVal->getType() != Type::UByteTy) ThrowException("Shift count for shift constant must be unsigned byte!"); @@ -2909,7 +2909,7 @@ ; break;} case 114: -#line 1544 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1544 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands(yyvsp[-3].ConstVal, yyvsp[-1].ConstVal)) ThrowException("Invalid extractelement operands!"); @@ -2917,7 +2917,7 @@ ; break;} case 115: -#line 1549 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1549 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal)) ThrowException("Invalid insertelement operands!"); @@ -2925,7 +2925,7 @@ ; break;} case 116: -#line 1554 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1554 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal)) ThrowException("Invalid shufflevector operands!"); @@ -2933,60 +2933,60 @@ ; break;} case 117: -#line 1562 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1562 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector = yyvsp[-2].ConstVector)->push_back(yyvsp[0].ConstVal); ; break;} case 118: -#line 1565 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1565 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ConstVector = new std::vector(); yyval.ConstVector->push_back(yyvsp[0].ConstVal); ; break;} case 119: -#line 1572 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1572 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = false; ; break;} case 120: -#line 1572 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1572 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = true; ; break;} case 121: -#line 1582 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1582 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = ParserResult = yyvsp[0].ModuleVal; CurModule.ModuleDone(); ; break;} case 122: -#line 1589 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1589 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = yyvsp[-1].ModuleVal; CurFun.FunctionDone(); ; break;} case 123: -#line 1593 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1593 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = yyvsp[-1].ModuleVal; ; break;} case 124: -#line 1596 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1596 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = yyvsp[-3].ModuleVal; ; break;} case 125: -#line 1599 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1599 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = yyvsp[-1].ModuleVal; ; break;} case 126: -#line 1602 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1602 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ModuleVal = CurModule.CurrentModule; // Emit an error if there are any unresolved types left. @@ -3000,7 +3000,7 @@ ; break;} case 127: -#line 1615 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1615 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Eagerly resolve types. This is not an optimization, this is a // requirement that is due to the fact that we could have this: @@ -3023,30 +3023,30 @@ ; break;} case 128: -#line 1635 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1635 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Function prototypes can be in const pool ; break;} case 129: -#line 1637 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1637 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Asm blocks can be in the const pool ; break;} case 130: -#line 1639 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1639 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].ConstVal == 0) ThrowException("Global value initializer is not a constant!"); CurGV = ParseGlobalVariable(yyvsp[-3].StrVal, yyvsp[-2].Linkage, yyvsp[-1].BoolVal, yyvsp[0].ConstVal->getType(), yyvsp[0].ConstVal); ; break;} case 131: -#line 1642 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1642 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ; break;} case 132: -#line 1645 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1645 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::ExternalLinkage, yyvsp[-1].BoolVal, *yyvsp[0].TypeVal, 0); @@ -3054,28 +3054,28 @@ ; break;} case 133: -#line 1649 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1649 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ; break;} case 134: -#line 1652 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1652 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} case 135: -#line 1654 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1654 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} case 136: -#line 1656 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1656 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} case 137: -#line 1660 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1660 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); char *EndStr = UnEscapeLexed(yyvsp[0].StrVal, true); @@ -3089,21 +3089,21 @@ ; break;} case 138: -#line 1672 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1672 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Endianness = Module::BigEndian; ; break;} case 139: -#line 1673 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1673 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.Endianness = Module::LittleEndian; ; break;} case 140: -#line 1675 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1675 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setEndianness(yyvsp[0].Endianness); ; break;} case 141: -#line 1678 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1678 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].UInt64Val == 32) CurModule.CurrentModule->setPointerSize(Module::Pointer32); @@ -3114,37 +3114,37 @@ ; break;} case 142: -#line 1686 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1686 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple(yyvsp[0].StrVal); free(yyvsp[0].StrVal); ; break;} case 144: -#line 1693 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1693 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal); free(yyvsp[0].StrVal); ; break;} case 145: -#line 1697 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1697 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal); free(yyvsp[0].StrVal); ; break;} case 146: -#line 1701 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1701 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ; break;} case 150: -#line 1710 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1710 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.StrVal = 0; ; break;} case 151: -#line 1712 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1712 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (*yyvsp[-1].TypeVal == Type::VoidTy) ThrowException("void typed arguments are invalid!"); @@ -3152,7 +3152,7 @@ ; break;} case 152: -#line 1718 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1718 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = yyvsp[-2].ArgList; yyvsp[-2].ArgList->push_back(*yyvsp[0].ArgVal); @@ -3160,7 +3160,7 @@ ; break;} case 153: -#line 1723 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1723 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = new std::vector >(); yyval.ArgList->push_back(*yyvsp[0].ArgVal); @@ -3168,13 +3168,13 @@ ; break;} case 154: -#line 1729 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1729 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = yyvsp[0].ArgList; ; break;} case 155: -#line 1732 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1732 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = yyvsp[-2].ArgList; yyval.ArgList->push_back(std::pair >(); yyval.ArgList->push_back(std::make_pair(new PATypeHolder(Type::VoidTy), (char*)0)); ; break;} case 157: -#line 1741 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1741 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ArgList = 0; ; break;} case 158: -#line 1746 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1746 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { UnEscapeLexed(yyvsp[-5].StrVal); std::string FunctionName(yyvsp[-5].StrVal); @@ -3282,7 +3282,7 @@ ; break;} case 161: -#line 1833 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1833 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = CurFun.CurrentFunction; @@ -3292,84 +3292,84 @@ ; break;} case 164: -#line 1843 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1843 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = yyvsp[-1].FunctionVal; ; break;} case 165: -#line 1847 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1847 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ; break;} case 166: -#line 1847 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1847 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = CurFun.CurrentFunction; CurFun.FunctionDone(); ; break;} case 167: -#line 1856 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1856 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = false; ; break;} case 168: -#line 1859 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1859 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = true; ; break;} case 169: -#line 1863 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1863 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant yyval.ValIDVal = ValID::create(yyvsp[0].SInt64Val); ; break;} case 170: -#line 1866 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1866 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(yyvsp[0].UInt64Val); ; break;} case 171: -#line 1869 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1869 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? yyval.ValIDVal = ValID::create(yyvsp[0].FPVal); ; break;} case 172: -#line 1872 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1872 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(ConstantBool::True); ; break;} case 173: -#line 1875 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1875 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(ConstantBool::False); ; break;} case 174: -#line 1878 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1878 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::createNull(); ; break;} case 175: -#line 1881 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1881 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::createUndef(); ; break;} case 176: -#line 1884 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1884 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // A vector zero constant. yyval.ValIDVal = ValID::createZeroInit(); ; break;} case 177: -#line 1887 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1887 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*yyvsp[-1].ConstVector)[0]->getType(); int NumElements = yyvsp[-1].ConstVector->size(); @@ -3396,13 +3396,13 @@ ; break;} case 178: -#line 1911 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1911 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValIDVal = ValID::create(yyvsp[0].ConstVal); ; break;} case 179: -#line 1914 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1914 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { char *End = UnEscapeLexed(yyvsp[-2].StrVal, true); std::string AsmStr = std::string(yyvsp[-2].StrVal, End); @@ -3414,37 +3414,37 @@ ; break;} case 180: -#line 1927 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1927 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? yyval.ValIDVal = ValID::create(yyvsp[0].SIntVal); ; break;} case 181: -#line 1930 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1930 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? yyval.ValIDVal = ValID::create(yyvsp[0].StrVal); ; break;} case 184: -#line 1941 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1941 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueVal = getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal); delete yyvsp[-1].TypeVal; ; break;} case 185: -#line 1945 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1945 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.FunctionVal = yyvsp[-1].FunctionVal; ; break;} case 186: -#line 1948 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1948 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks yyval.FunctionVal = yyvsp[-1].FunctionVal; ; break;} case 187: -#line 1956 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1956 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { setValueName(yyvsp[0].TermInstVal, yyvsp[-1].StrVal); InsertValue(yyvsp[0].TermInstVal); @@ -3455,14 +3455,14 @@ ; break;} case 188: -#line 1965 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1965 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyvsp[-1].BasicBlockVal->getInstList().push_back(yyvsp[0].InstVal); yyval.BasicBlockVal = yyvsp[-1].BasicBlockVal; ; break;} case 189: -#line 1969 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1969 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BasicBlockVal = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true); @@ -3475,7 +3475,7 @@ ; break;} case 190: -#line 1979 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1979 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BasicBlockVal = CurBB = getBBVal(ValID::create(yyvsp[0].StrVal), true); @@ -3488,31 +3488,31 @@ ; break;} case 191: -#line 1990 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1990 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with a result... yyval.TermInstVal = new ReturnInst(yyvsp[0].ValueVal); ; break;} case 192: -#line 1993 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1993 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with no result... yyval.TermInstVal = new ReturnInst(); ; break;} case 193: -#line 1996 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1996 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... yyval.TermInstVal = new BranchInst(getBBVal(yyvsp[0].ValIDVal)); ; break;} case 194: -#line 1999 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1999 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TermInstVal = new BranchInst(getBBVal(yyvsp[-3].ValIDVal), getBBVal(yyvsp[0].ValIDVal), getVal(Type::BoolTy, yyvsp[-6].ValIDVal)); ; break;} case 195: -#line 2002 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2002 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { SwitchInst *S = new SwitchInst(getVal(yyvsp[-7].PrimType, yyvsp[-6].ValIDVal), getBBVal(yyvsp[-3].ValIDVal), yyvsp[-1].JumpTable->size()); yyval.TermInstVal = S; @@ -3529,14 +3529,14 @@ ; break;} case 196: -#line 2016 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2016 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { SwitchInst *S = new SwitchInst(getVal(yyvsp[-6].PrimType, yyvsp[-5].ValIDVal), getBBVal(yyvsp[-2].ValIDVal), 0); yyval.TermInstVal = S; ; break;} case 197: -#line 2021 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2021 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -3591,19 +3591,19 @@ ; break;} case 198: -#line 2073 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2073 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TermInstVal = new UnwindInst(); ; break;} case 199: -#line 2076 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2076 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.TermInstVal = new UnreachableInst(); ; break;} case 200: -#line 2082 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2082 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.JumpTable = yyvsp[-5].JumpTable; Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal)); @@ -3614,7 +3614,7 @@ ; break;} case 201: -#line 2090 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2090 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.JumpTable = new std::vector >(); Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal)); @@ -3626,7 +3626,7 @@ ; break;} case 202: -#line 2100 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2100 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName(yyvsp[0].InstVal, yyvsp[-1].StrVal); @@ -3635,7 +3635,7 @@ ; break;} case 203: -#line 2107 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2107 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes yyval.PHIList = new std::list >(); yyval.PHIList->push_back(std::make_pair(getVal(*yyvsp[-5].TypeVal, yyvsp[-3].ValIDVal), getBBVal(yyvsp[-1].ValIDVal))); @@ -3643,7 +3643,7 @@ ; break;} case 204: -#line 2112 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2112 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.PHIList = yyvsp[-6].PHIList; yyvsp[-6].PHIList->push_back(std::make_pair(getVal(yyvsp[-6].PHIList->front().first->getType(), yyvsp[-3].ValIDVal), @@ -3651,37 +3651,37 @@ ; break;} case 205: -#line 2119 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2119 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for call statements, and memory insts... yyval.ValueList = new std::vector(); yyval.ValueList->push_back(yyvsp[0].ValueVal); ; break;} case 206: -#line 2123 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2123 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = yyvsp[-2].ValueList; yyvsp[-2].ValueList->push_back(yyvsp[0].ValueVal); ; break;} case 208: -#line 2129 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2129 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = 0; ; break;} case 209: -#line 2131 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2131 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = true; ; break;} case 210: -#line 2134 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2134 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = false; ; break;} case 211: -#line 2140 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2140 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!(*yyvsp[-3].TypeVal)->isInteger() && !(*yyvsp[-3].TypeVal)->isFloatingPoint() && !isa((*yyvsp[-3].TypeVal).get())) @@ -3696,7 +3696,7 @@ ; break;} case 212: -#line 2152 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2152 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!(*yyvsp[-3].TypeVal)->isIntegral()) { if (!isa(yyvsp[-3].TypeVal->get()) || @@ -3710,7 +3710,7 @@ ; break;} case 213: -#line 2163 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2163 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if(isa((*yyvsp[-3].TypeVal).get())) { ThrowException( @@ -3723,7 +3723,7 @@ ; break;} case 214: -#line 2173 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2173 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::cerr << "WARNING: Use of eliminated 'not' instruction:" << " Replacing with 'xor'.\n"; @@ -3738,7 +3738,7 @@ ; break;} case 215: -#line 2185 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2185 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[0].ValueVal->getType() != Type::UByteTy) ThrowException("Shift amount must be ubyte!"); @@ -3748,7 +3748,7 @@ ; break;} case 216: -#line 2192 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2192 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!yyvsp[0].TypeVal->get()->isFirstClassType()) ThrowException("cast instruction to a non-primitive type: '" + @@ -3758,7 +3758,7 @@ ; break;} case 217: -#line 2199 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2199 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (yyvsp[-4].ValueVal->getType() != Type::BoolTy) ThrowException("select condition must be boolean!"); @@ -3768,7 +3768,7 @@ ; break;} case 218: -#line 2206 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2206 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { NewVarArgs = true; yyval.InstVal = new VAArgInst(yyvsp[-2].ValueVal, *yyvsp[0].TypeVal); @@ -3776,7 +3776,7 @@ ; break;} case 219: -#line 2211 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2211 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = yyvsp[-2].ValueVal->getType(); @@ -3798,7 +3798,7 @@ ; break;} case 220: -#line 2230 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2230 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ObsoleteVarArgs = true; const Type* ArgTy = yyvsp[-2].ValueVal->getType(); @@ -3823,7 +3823,7 @@ ; break;} case 221: -#line 2252 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2252 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands(yyvsp[-2].ValueVal, yyvsp[0].ValueVal)) ThrowException("Invalid extractelement operands!"); @@ -3831,7 +3831,7 @@ ; break;} case 222: -#line 2257 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2257 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal)) ThrowException("Invalid insertelement operands!"); @@ -3839,7 +3839,7 @@ ; break;} case 223: -#line 2262 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2262 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal)) ThrowException("Invalid shufflevector operands!"); @@ -3847,7 +3847,7 @@ ; break;} case 224: -#line 2267 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2267 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = yyvsp[0].PHIList->front().first->getType(); if (!Ty->isFirstClassType()) @@ -3864,7 +3864,7 @@ ; break;} case 225: -#line 2281 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2281 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -3924,65 +3924,65 @@ ; break;} case 226: -#line 2338 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2338 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.InstVal = yyvsp[0].InstVal; ; break;} case 227: -#line 2344 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2344 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = yyvsp[0].ValueList; ; break;} case 228: -#line 2346 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2346 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.ValueList = new std::vector(); ; break;} case 229: -#line 2350 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2350 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = true; ; break;} case 230: -#line 2353 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2353 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.BoolVal = false; ; break;} case 231: -#line 2359 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2359 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.InstVal = new MallocInst(*yyvsp[-1].TypeVal, 0, yyvsp[0].UIntVal); delete yyvsp[-1].TypeVal; ; break;} case 232: -#line 2363 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2363 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.InstVal = new MallocInst(*yyvsp[-4].TypeVal, getVal(yyvsp[-2].PrimType, yyvsp[-1].ValIDVal), yyvsp[0].UIntVal); delete yyvsp[-4].TypeVal; ; break;} case 233: -#line 2367 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2367 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.InstVal = new AllocaInst(*yyvsp[-1].TypeVal, 0, yyvsp[0].UIntVal); delete yyvsp[-1].TypeVal; ; break;} case 234: -#line 2371 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2371 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { yyval.InstVal = new AllocaInst(*yyvsp[-4].TypeVal, getVal(yyvsp[-2].PrimType, yyvsp[-1].ValIDVal), yyvsp[0].UIntVal); delete yyvsp[-4].TypeVal; ; break;} case 235: -#line 2375 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2375 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa(yyvsp[0].ValueVal->getType())) ThrowException("Trying to free nonpointer type " + @@ -3991,7 +3991,7 @@ ; break;} case 236: -#line 2382 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2382 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa(yyvsp[-1].TypeVal->get())) ThrowException("Can't load from nonpointer type: " + @@ -4004,7 +4004,7 @@ ; break;} case 237: -#line 2392 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2392 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const PointerType *PT = dyn_cast(yyvsp[-1].TypeVal->get()); if (!PT) @@ -4020,7 +4020,7 @@ ; break;} case 238: -#line 2405 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2405 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa(yyvsp[-2].TypeVal->get())) ThrowException("getelementptr insn requires pointer operand!"); @@ -4265,7 +4265,7 @@ } return 1; } -#line 2428 "/Volumes/Projects/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2428 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" int yyerror(const char *ErrorMsg) { std::string where Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.6 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.7 --- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.6 Fri May 19 16:28:53 2006 +++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Wed Jun 21 11:53:00 2006 @@ -72,7 +72,7 @@ std::map LateResolveTypes; /// PlaceHolderInfo - When temporary placeholder objects are created, remember - /// how they were referenced and one which line of the input they came from so + /// how they were referenced and on which line of the input they came from so /// that we can resolve them later and print error messages as appropriate. std::map > PlaceHolderInfo; From lattner at cs.uiuc.edu Wed Jun 21 11:54:01 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 21 Jun 2006 11:54:01 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/ADT/Statistic.h Message-ID: <200606211654.LAA16006@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/ADT: Statistic.h updated: 1.15 -> 1.16 --- Log message: Add some out-of-line virtual dtors so that the class has a "home", preventing vtables for (e.g.) Instruction from being emitted into every .o file. --- Diffs of the changes: (+2 -1) Statistic.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/include/llvm/ADT/Statistic.h diff -u llvm/include/llvm/ADT/Statistic.h:1.15 llvm/include/llvm/ADT/Statistic.h:1.16 --- llvm/include/llvm/ADT/Statistic.h:1.15 Sun Jan 22 17:43:45 2006 +++ llvm/include/llvm/ADT/Statistic.h Wed Jun 21 11:53:47 2006 @@ -37,7 +37,8 @@ StatisticBase(const char *name, const char *desc) : Name(name), Desc(desc) { ++NumStats; // Keep track of how many stats are created... } - virtual ~StatisticBase() {} + // Out of line virtual dtor, to give the vtable etc a home. + virtual ~StatisticBase(); // destroy - Called by subclass dtor so that we can still invoke virtual // functions on the subclass. From lattner at cs.uiuc.edu Wed Jun 21 11:54:01 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 21 Jun 2006 11:54:01 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/Statistic.cpp Message-ID: <200606211654.LAA16010@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: Statistic.cpp updated: 1.16 -> 1.17 --- Log message: Add some out-of-line virtual dtors so that the class has a "home", preventing vtables for (e.g.) Instruction from being emitted into every .o file. --- Diffs of the changes: (+4 -0) Statistic.cpp | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/lib/Support/Statistic.cpp diff -u llvm/lib/Support/Statistic.cpp:1.16 llvm/lib/Support/Statistic.cpp:1.17 --- llvm/lib/Support/Statistic.cpp:1.16 Thu Apr 21 17:52:05 2005 +++ llvm/lib/Support/Statistic.cpp Wed Jun 21 11:53:47 2006 @@ -61,6 +61,10 @@ static std::vector *AccumStats = 0; +// Out of line virtual dtor, to give the vtable etc a home. +StatisticBase::~StatisticBase() { +} + // Print information when destroyed, iff command line option is specified void StatisticBase::destroy() const { if (Enabled && hasSomeData()) { From lattner at cs.uiuc.edu Wed Jun 21 11:54:01 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 21 Jun 2006 11:54:01 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/InstrTypes.h Instruction.h Instructions.h Message-ID: <200606211654.LAA16018@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: InstrTypes.h updated: 1.45 -> 1.46 Instruction.h updated: 1.71 -> 1.72 Instructions.h updated: 1.36 -> 1.37 --- Log message: Add some out-of-line virtual dtors so that the class has a "home", preventing vtables for (e.g.) Instruction from being emitted into every .o file. --- Diffs of the changes: (+11 -7) InstrTypes.h | 5 +++++ Instruction.h | 8 +++----- Instructions.h | 5 +++-- 3 files changed, 11 insertions(+), 7 deletions(-) Index: llvm/include/llvm/InstrTypes.h diff -u llvm/include/llvm/InstrTypes.h:1.45 llvm/include/llvm/InstrTypes.h:1.46 --- llvm/include/llvm/InstrTypes.h:1.45 Sun Apr 24 02:28:04 2005 +++ llvm/include/llvm/InstrTypes.h Wed Jun 21 11:53:47 2006 @@ -43,6 +43,9 @@ const std::string &Name, BasicBlock *InsertAtEnd) : Instruction(Ty, iType, Ops, NumOps, Name, InsertAtEnd) {} + // Out of line virtual method, so the vtable, etc has a home. + ~TerminatorInst(); + /// Virtual methods - Terminators should overload these and provide inline /// overrides of non-V methods. virtual BasicBlock *getSuccessorV(unsigned idx) const = 0; @@ -96,6 +99,8 @@ : Instruction(Ty, iType, &Op, 1, Name, IAE), Op(V, this) { } public: + // Out of line virtual method, so the vtable, etc has a home. + ~UnaryInstruction(); // Transparently provide more efficient getOperand methods. Value *getOperand(unsigned i) const { Index: llvm/include/llvm/Instruction.h diff -u llvm/include/llvm/Instruction.h:1.71 llvm/include/llvm/Instruction.h:1.72 --- llvm/include/llvm/Instruction.h:1.71 Tue May 9 12:29:17 2006 +++ llvm/include/llvm/Instruction.h Wed Jun 21 11:53:47 2006 @@ -52,11 +52,9 @@ Instruction(const Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, const std::string &Name, BasicBlock *InsertAtEnd); public: - - ~Instruction() { - assert(Parent == 0 && "Instruction still linked in the program!"); - } - + // Out of line virtual method, so the vtable, etc has a home. + ~Instruction(); + /// mayWriteToMemory - Return true if this instruction may modify memory. /// virtual bool mayWriteToMemory() const { return false; } Index: llvm/include/llvm/Instructions.h diff -u llvm/include/llvm/Instructions.h:1.36 llvm/include/llvm/Instructions.h:1.37 --- llvm/include/llvm/Instructions.h:1.36 Fri May 19 14:07:54 2006 +++ llvm/include/llvm/Instructions.h Wed Jun 21 11:53:47 2006 @@ -40,9 +40,10 @@ const std::string &Name = "", Instruction *InsertBefore = 0); AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, unsigned Align, const std::string &Name, BasicBlock *InsertAtEnd); - public: - + // Out of line virtual method, so the vtable, etc has a home. + virtual ~AllocationInst(); + /// isArrayAllocation - Return true if there is an allocation size parameter /// to the allocation instruction that is not 1. /// From lattner at cs.uiuc.edu Wed Jun 21 11:54:02 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 21 Jun 2006 11:54:02 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Instruction.cpp Instructions.cpp Message-ID: <200606211654.LAA16024@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Instruction.cpp updated: 1.51 -> 1.52 Instructions.cpp updated: 1.38 -> 1.39 --- Log message: Add some out-of-line virtual dtors so that the class has a "home", preventing vtables for (e.g.) Instruction from being emitted into every .o file. --- Diffs of the changes: (+19 -0) Instruction.cpp | 6 ++++++ Instructions.cpp | 13 +++++++++++++ 2 files changed, 19 insertions(+) Index: llvm/lib/VMCore/Instruction.cpp diff -u llvm/lib/VMCore/Instruction.cpp:1.51 llvm/lib/VMCore/Instruction.cpp:1.52 --- llvm/lib/VMCore/Instruction.cpp:1.51 Fri Apr 7 20:18:18 2006 +++ llvm/lib/VMCore/Instruction.cpp Wed Jun 21 11:53:47 2006 @@ -43,6 +43,12 @@ InsertAtEnd->getInstList().push_back(this); } +// Out of line virtual method, so the vtable, etc has a home. +Instruction::~Instruction() { + assert(Parent == 0 && "Instruction still linked in the program!"); +} + + void Instruction::setOpcode(unsigned opc) { setValueType(Value::InstructionVal + opc); } Index: llvm/lib/VMCore/Instructions.cpp diff -u llvm/lib/VMCore/Instructions.cpp:1.38 llvm/lib/VMCore/Instructions.cpp:1.39 --- llvm/lib/VMCore/Instructions.cpp:1.38 Sun May 14 13:34:36 2006 +++ llvm/lib/VMCore/Instructions.cpp Wed Jun 21 11:53:47 2006 @@ -34,6 +34,8 @@ } + + //===----------------------------------------------------------------------===// // TerminatorInst Class //===----------------------------------------------------------------------===// @@ -48,6 +50,13 @@ : Instruction(Type::VoidTy, iType, Ops, NumOps, "", IAE) { } +// Out of line virtual method, so the vtable, etc has a home. +TerminatorInst::~TerminatorInst() { +} + +// Out of line virtual method, so the vtable, etc has a home. +UnaryInstruction::~UnaryInstruction() { +} //===----------------------------------------------------------------------===// @@ -532,6 +541,10 @@ assert(Ty != Type::VoidTy && "Cannot allocate void!"); } +// Out of line virtual method, so the vtable, etc has a home. +AllocationInst::~AllocationInst() { +} + bool AllocationInst::isArrayAllocation() const { if (ConstantUInt *CUI = dyn_cast(getOperand(0))) return CUI->getValue() != 1; From reid at x10sys.com Wed Jun 21 12:21:52 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 21 Jun 2006 12:21:52 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvmc/Makefile Message-ID: <200606211721.MAA31957@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvmc: Makefile updated: 1.17 -> 1.18 --- Log message: For PR811: http://llvm.org/PR811 : Don't both with the "C" and "cc" extensions as they aren't common and they the "C" extension conflicts with the "c" extension on operating systems that have case insensitive file names. --- Diffs of the changes: (+0 -2) Makefile | 2 -- 1 files changed, 2 deletions(-) Index: llvm/tools/llvmc/Makefile diff -u llvm/tools/llvmc/Makefile:1.17 llvm/tools/llvmc/Makefile:1.18 --- llvm/tools/llvmc/Makefile:1.17 Wed May 31 20:30:27 2006 +++ llvm/tools/llvmc/Makefile Wed Jun 21 12:21:39 2006 @@ -29,7 +29,5 @@ install:: $(Echo) Installing additional C++ configuration clones - $(Verb)$(DataInstall) $(PROJ_SRC_DIR)/cpp $(PROJ_etcdir)/cc $(Verb)$(DataInstall) $(PROJ_SRC_DIR)/cpp $(PROJ_etcdir)/c++ $(Verb)$(DataInstall) $(PROJ_SRC_DIR)/cpp $(PROJ_etcdir)/cxx - $(Verb)$(DataInstall) $(PROJ_SRC_DIR)/cpp $(PROJ_etcdir)/C From lattner at cs.uiuc.edu Wed Jun 21 12:26:25 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 21 Jun 2006 12:26:25 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvmc/Makefile Message-ID: <200606211726.MAA07089@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvmc: Makefile updated: 1.18 -> 1.19 --- Log message: Remove unneeded libs --- Diffs of the changes: (+1 -1) Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/tools/llvmc/Makefile diff -u llvm/tools/llvmc/Makefile:1.18 llvm/tools/llvmc/Makefile:1.19 --- llvm/tools/llvmc/Makefile:1.18 Wed Jun 21 12:21:39 2006 +++ llvm/tools/llvmc/Makefile Wed Jun 21 12:26:13 2006 @@ -8,7 +8,7 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. TOOLNAME = llvmc -USEDLIBS = LLVMBCReader.a LLVMCore.a LLVMSupport.a LLVMbzip2.a LLVMSystem.a +USEDLIBS = LLVMCore.a LLVMSupport.a LLVMSystem.a CONFIG_FILES = c cpp ll EXTRA_DIST = c cpp ll ConfigLexer.cpp.cvs ConfigLexer.l.cvs From lattner at cs.uiuc.edu Wed Jun 21 13:13:48 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 21 Jun 2006 13:13:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/ConstantFolding.cpp Message-ID: <200606211813.NAA07334@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: ConstantFolding.cpp updated: 1.87 -> 1.88 --- Log message: Add more anonymous namespaces to make it clear that these are private classes --- Diffs of the changes: (+18 -1) ConstantFolding.cpp | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletion(-) Index: llvm/lib/VMCore/ConstantFolding.cpp diff -u llvm/lib/VMCore/ConstantFolding.cpp:1.87 llvm/lib/VMCore/ConstantFolding.cpp:1.88 --- llvm/lib/VMCore/ConstantFolding.cpp:1.87 Fri Apr 7 20:18:18 2006 +++ llvm/lib/VMCore/ConstantFolding.cpp Wed Jun 21 13:13:36 2006 @@ -86,6 +86,7 @@ // This class also provides subclasses with typesafe implementations of methods // so that don't have to do type casting. // +namespace { template class TemplateRules : public ConstRules { @@ -210,7 +211,7 @@ public: virtual ~TemplateRules() {} }; - +} // end anonymous namespace //===----------------------------------------------------------------------===// @@ -219,12 +220,14 @@ // // EmptyRules provides a concrete base class of ConstRules that does nothing // +namespace { struct EmptyRules : public TemplateRules { static Constant *EqualTo(const Constant *V1, const Constant *V2) { if (V1 == V2) return ConstantBool::True; return 0; } }; +} // end anonymous namespace @@ -234,6 +237,7 @@ // // BoolRules provides a concrete base class of ConstRules for the 'bool' type. // +namespace { struct BoolRules : public TemplateRules { static Constant *LessThan(const ConstantBool *V1, const ConstantBool *V2) { @@ -275,6 +279,7 @@ DEF_CAST(Double, ConstantFP , double) #undef DEF_CAST }; +} // end anonymous namespace //===----------------------------------------------------------------------===// @@ -284,6 +289,7 @@ // NullPointerRules provides a concrete base class of ConstRules for null // pointers. // +namespace { struct NullPointerRules : public TemplateRules { static Constant *EqualTo(const Constant *V1, const Constant *V2) { @@ -328,6 +334,7 @@ return ConstantPointerNull::get(PTy); } }; +} // end anonymous namespace //===----------------------------------------------------------------------===// // ConstantPackedRules Class @@ -349,6 +356,7 @@ /// PackedTypeRules provides a concrete base class of ConstRules for /// ConstantPacked operands. /// +namespace { struct ConstantPackedRules : public TemplateRules { @@ -397,6 +405,7 @@ return 0; } }; +} // end anonymous namespace //===----------------------------------------------------------------------===// @@ -407,8 +416,10 @@ /// PackedType operands, where both operands are not ConstantPacked. The usual /// cause for this is that one operand is a ConstantAggregateZero. /// +namespace { struct GeneralPackedRules : public TemplateRules { }; +} // end anonymous namespace //===----------------------------------------------------------------------===// @@ -419,6 +430,7 @@ // different types. This allows the C++ compiler to automatically generate our // constant handling operations in a typesafe and accurate manner. // +namespace { template struct DirectRules : public TemplateRules { static Constant *Add(const ConstantClass *V1, const ConstantClass *V2) { @@ -478,6 +490,7 @@ DEF_CAST(Double, ConstantFP , double) #undef DEF_CAST }; +} // end anonymous namespace //===----------------------------------------------------------------------===// @@ -487,6 +500,7 @@ // DirectIntRules provides implementations of functions that are valid on // integer types, but not all types in general. // +namespace { template struct DirectIntRules : public DirectRules struct DirectFPRules : public DirectRules Changes in directory llvm: Makefile.rules updated: 1.381 -> 1.382 --- Log message: Factor a bunch of rules together, no functionality change. --- Diffs of the changes: (+23 -56) Makefile.rules | 79 ++++++++++++++++----------------------------------------- 1 files changed, 23 insertions(+), 56 deletions(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.381 llvm/Makefile.rules:1.382 --- llvm/Makefile.rules:1.381 Tue Jun 20 13:50:48 2006 +++ llvm/Makefile.rules Wed Jun 21 15:58:03 2006 @@ -981,56 +981,40 @@ DISABLE_AUTO_DEPENDENCIES=1 endif +ifdef SHARED_LIBRARY +PIC_FLAG = "(PIC)" +MAYBE_PIC_Compile.CXX = $(LTCompile.CXX) +MAYBE_PIC_Compile.C = $(LTCompile.C) +else +MAYBE_PIC_Compile.CXX = $(Compile.CXX) +MAYBE_PIC_Compile.C = $(Compile.C) +endif + # Provide rule sets for when dependency generation is enabled ifndef DISABLE_AUTO_DEPENDENCIES #--------------------------------------------------------- # Create .lo files in the ObjDir directory from the .cpp and .c files... #--------------------------------------------------------- -ifdef SHARED_LIBRARY $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.cpp for $(BuildMode) build (PIC)" - $(Verb) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\ - then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \ - else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi + $(Echo) "Compiling $*.cpp for $(BuildMode) build " $(PIC_FLAG) + $(Verb) if $(MAYBE_PIC_Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\ + then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \ + else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi $(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.cc for $(BuildMode) build (PIC)" - $(Verb) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\ + $(Echo) "Compiling $*.cc for $(BuildMode) build" $(PIC_FLAG) + $(Verb) if $(MAYBE_PIC_Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ;\ then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \ else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.c for $(BuildMode) build (PIC)" - $(Verb) if $(LTCompile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACd $< -o $@ ; \ + $(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG) + $(Verb) if $(MAYBE_PIC_Compile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACd $< -o $@ ; \ then $(MV) -f "$(ObjDir)/$*.LACd" "$(ObjDir)/$*.d"; \ else $(RM) -f "$(ObjDir)/$*.LACd"; exit 1; fi -#--------------------------------------------------------- -# Create .o files in the ObjDir directory from the .cpp and .c files... -#--------------------------------------------------------- -else - -$(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.cpp for $(BuildMode) build" - $(Verb) if $(Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.CXXd $< -o $@ ; \ - then $(MV) -f "$(ObjDir)/$*.CXXd" "$(ObjDir)/$*.d"; \ - else $(RM) -f "$(ObjDir)/$*.CXXd"; exit 1; fi - -$(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.cc for $(BuildMode) build" - $(Verb) if $(Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.CXXd $< -o $@ ; \ - then $(MV) -f "$(ObjDir)/$*.CXXd" "$(ObjDir)/$*.d"; \ - else $(RM) -f "$(ObjDir)/$*.CXXd"; exit 1; fi - -$(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.c for $(BuildMode) build" - $(Verb) if $(Compile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.Cd $< -o $@ ; \ - then $(MV) -f "$(ObjDir)/$*.Cd" "$(ObjDir)/$*.d"; \ - else $(RM) -f "$(ObjDir)/$*.Cd"; exit 1; fi - -endif ## Rules for building preprocessed (.i/.ii) outputs. $(BuildMode)/%.ii: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) @@ -1074,34 +1058,17 @@ # Provide alternate rule sets if dependencies are disabled else -ifdef SHARED_LIBRARY - $(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.cpp for $(BuildMode) build (PIC)" - $(LTCompile.CXX) $< -o $@ + $(Echo) "Compiling $*.cpp for $(BuildMode) build" $(PIC_FLAG) + $(MAYBE_PIC_Compile.CXX) $< -o $@ $(ObjDir)/%.lo $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.cc for $(BuildMode) build (PIC)" - $(LTCompile.CXX) $< -o $@ + $(Echo) "Compiling $*.cc for $(BuildMode) build" $(PIC_FLAG) + $(MAYBE_PIC_Compile.CXX) $< -o $@ $(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.c for $(BuildMode) build (PIC)" - $(LTCompile.C) $< -o $@ - -else - -$(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.cpp for $(BuildMode) build" - $(Compile.CXX) $< -o $@ - -$(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.cc for $(BuildMode) build" - $(Compile.CXX) $< -o $@ - -$(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.c for $(BuildMode) build" - $(Compile.C) $< -o $@ -endif + $(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG) + $(MAYBE_PIC_Compile.C) $< -o $@ $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)" From lattner at cs.uiuc.edu Wed Jun 21 16:01:33 2006 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 21 Jun 2006 16:01:33 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200606212101.QAA09340@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.382 -> 1.383 --- Log message: Add targets for generating .s file in addition to .o files. --- Diffs of the changes: (+28 -15) Makefile.rules | 43 ++++++++++++++++++++++++++++--------------- 1 files changed, 28 insertions(+), 15 deletions(-) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.382 llvm/Makefile.rules:1.383 --- llvm/Makefile.rules:1.382 Wed Jun 21 15:58:03 2006 +++ llvm/Makefile.rules Wed Jun 21 16:01:20 2006 @@ -1015,21 +1015,6 @@ then $(MV) -f "$(ObjDir)/$*.LACd" "$(ObjDir)/$*.d"; \ else $(RM) -f "$(ObjDir)/$*.LACd"; exit 1; fi - -## Rules for building preprocessed (.i/.ii) outputs. -$(BuildMode)/%.ii: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.cpp for $(BuildMode) build to .ii file" - $(Verb) $(Preprocess.CXX) $< -o $@ - -$(BuildMode)/%.ii: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.cc for $(BuildMode) build to .ii file" - $(Verb) $(Preprocess.CXX) $< -o $@ - - $(BuildMode)/%.i: %.c $(ObjDir)/.dir $(BUILT_SOURCES) - $(Echo) "Compiling $*.c for $(BuildMode) build to .i file" - $(Verb) $(Preprocess.C) $< -o $@ - - #--------------------------------------------------------- # Create .bc files in the ObjDir directory from .cpp .cc and .c files... #--------------------------------------------------------- @@ -1084,6 +1069,34 @@ endif + +## Rules for building preprocessed (.i/.ii) outputs. +$(BuildMode)/%.ii: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.cpp for $(BuildMode) build to .ii file" + $(Verb) $(Preprocess.CXX) $< -o $@ + +$(BuildMode)/%.ii: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.cc for $(BuildMode) build to .ii file" + $(Verb) $(Preprocess.CXX) $< -o $@ + + $(BuildMode)/%.i: %.c $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.c for $(BuildMode) build to .i file" + $(Verb) $(Preprocess.C) $< -o $@ + + +$(ObjDir)/%.s: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.cpp to asm for $(BuildMode) build" $(PIC_FLAG) + $(MAYBE_PIC_Compile.CXX) $< -o $@ -S + +$(ObjDir)/%.s: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.cc to asm for $(BuildMode) build" $(PIC_FLAG) + $(MAYBE_PIC_Compile.CXX) $< -o $@ -S + +$(ObjDir)/%.s: %.c $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.c to asm for $(BuildMode) build" $(PIC_FLAG) + $(MAYBE_PIC_Compile.C) $< -o $@ -S + + # make the C and C++ compilers strip debug info out of bytecode libraries. ifdef DEBUG_RUNTIME $(ObjectsBC): $(ObjDir)/%.bc: $(ObjDir)/%.ll $(GCCAS) From reid at x10sys.com Wed Jun 21 16:55:06 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 21 Jun 2006 16:55:06 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/MathExtras.h Message-ID: <200606212155.QAA09635@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: MathExtras.h updated: 1.30 -> 1.31 --- Log message: Use C++ style casts instead of C-style casts to shut up compiler warnings when compiling with -pedantic. Passes regression tests on Linux. --- Diffs of the changes: (+18 -6) MathExtras.h | 24 ++++++++++++++++++------ 1 files changed, 18 insertions(+), 6 deletions(-) Index: llvm/include/llvm/Support/MathExtras.h diff -u llvm/include/llvm/Support/MathExtras.h:1.30 llvm/include/llvm/Support/MathExtras.h:1.31 --- llvm/include/llvm/Support/MathExtras.h:1.30 Wed May 24 14:21:13 2006 +++ llvm/include/llvm/Support/MathExtras.h Wed Jun 21 16:54:54 2006 @@ -34,12 +34,24 @@ } // is?Type - these functions produce optimal testing for integer data types. -inline bool isInt8 (int Value) { return ( signed char )Value == Value; } -inline bool isUInt8 (int Value) { return (unsigned char )Value == Value; } -inline bool isInt16 (int Value) { return ( signed short)Value == Value; } -inline bool isUInt16(int Value) { return (unsigned short)Value == Value; } -inline bool isInt32 (int64_t Value) { return ( signed int )Value == Value; } -inline bool isUInt32(int64_t Value) { return (unsigned int )Value == Value; } +inline bool isInt8 (int Value) { + return static_cast(Value) == Value; +} +inline bool isUInt8 (int Value) { + return static_cast(Value) == Value; +} +inline bool isInt16 (int Value) { + return static_cast(Value) == Value; +} +inline bool isUInt16(int Value) { + return static_cast(Value) == Value; +} +inline bool isInt32 (int64_t Value) { + return static_cast(Value) == Value; +} +inline bool isUInt32(int64_t Value) { + return static_cast(Value) == Value; +} // isMask_32 - This function returns true if the argument is a sequence of ones // starting at the least significant bit with the remainder zero (32 bit version.) From reid at x10sys.com Wed Jun 21 17:19:12 2006 From: reid at x10sys.com (Reid Spencer) Date: Wed, 21 Jun 2006 17:19:12 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/MathExtras.h Message-ID: <200606212219.RAA09752@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: MathExtras.h updated: 1.31 -> 1.32 --- Log message: Whoops, missed a couple more C-style casts. --- Diffs of the changes: (+2 -2) MathExtras.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/include/llvm/Support/MathExtras.h diff -u llvm/include/llvm/Support/MathExtras.h:1.31 llvm/include/llvm/Support/MathExtras.h:1.32 --- llvm/include/llvm/Support/MathExtras.h:1.31 Wed Jun 21 16:54:54 2006 +++ llvm/include/llvm/Support/MathExtras.h Wed Jun 21 17:19:00 2006 @@ -25,12 +25,12 @@ // Hi_32 - This function returns the high 32 bits of a 64 bit value. inline unsigned Hi_32(uint64_t Value) { - return (unsigned)(Value >> 32); + return static_cast(Value >> 32); } // Lo_32 - This function returns the low 32 bits of a 64 bit value. inline unsigned Lo_32(uint64_t Value) { - return (unsigned)Value; + return static_cast(Value); } // is?Type - these functions produce optimal testing for integer data types. From evan.cheng at apple.com Wed Jun 21 18:37:19 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 21 Jun 2006 18:37:19 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86CodeEmitter.cpp Message-ID: <200606212337.SAA10305@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86CodeEmitter.cpp updated: 1.107 -> 1.108 --- Log message: variable_ops instructions such as call can have any number of operands. --- Diffs of the changes: (+1 -1) X86CodeEmitter.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86CodeEmitter.cpp diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.107 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.108 --- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.107 Tue May 16 02:21:53 2006 +++ llvm/lib/Target/X86/X86CodeEmitter.cpp Wed Jun 21 18:37:07 2006 @@ -408,7 +408,7 @@ case X86II::RawFrm: MCE.emitByte(BaseOpcode); - if (MI.getNumOperands() == 1) { + if (Desc.numOperands == 1) { const MachineOperand &MO = MI.getOperand(0); if (MO.isMachineBasicBlock()) { emitPCRelativeBlockAddress(MO.getMachineBasicBlock()); From evan.cheng at apple.com Wed Jun 21 19:03:07 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 21 Jun 2006 19:03:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86CodeEmitter.cpp Message-ID: <200606220003.TAA10453@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86CodeEmitter.cpp updated: 1.108 -> 1.109 --- Log message: Eliminate unneeded parameter. --- Diffs of the changes: (+4 -8) X86CodeEmitter.cpp | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) Index: llvm/lib/Target/X86/X86CodeEmitter.cpp diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.108 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.109 --- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.108 Wed Jun 21 18:37:07 2006 +++ llvm/lib/Target/X86/X86CodeEmitter.cpp Wed Jun 21 19:02:55 2006 @@ -54,8 +54,7 @@ void emitPCRelativeValue(unsigned Address); void emitGlobalAddressForCall(GlobalValue *GV, bool isTailCall); void emitGlobalAddressForPtr(GlobalValue *GV, int Disp = 0); - void emitExternalSymbolAddress(const char *ES, bool isPCRelative, - bool isTailCall); + void emitExternalSymbolAddress(const char *ES, bool isPCRelative); void emitDisplacementField(const MachineOperand *RelocOp, int DispVal); @@ -144,8 +143,7 @@ /// emitExternalSymbolAddress - Arrange for the address of an external symbol to /// be emitted to the current location in the function, and allow it to be PC /// relative. -void Emitter::emitExternalSymbolAddress(const char *ES, bool isPCRelative, - bool isTailCall) { +void Emitter::emitExternalSymbolAddress(const char *ES, bool isPCRelative) { MCE.addRelocation(MachineRelocation::getExtSym(MCE.getCurrentPCOffset(), isPCRelative ? X86::reloc_pcrel_word : X86::reloc_absolute_word, ES)); MCE.emitWordLE(0); @@ -417,9 +415,7 @@ Opcode == X86::TAILJMPr || Opcode == X86::TAILJMPm; emitGlobalAddressForCall(MO.getGlobal(), isTailCall); } else if (MO.isExternalSymbol()) { - bool isTailCall = Opcode == X86::TAILJMPd || - Opcode == X86::TAILJMPr || Opcode == X86::TAILJMPm; - emitExternalSymbolAddress(MO.getSymbolName(), true, isTailCall); + emitExternalSymbolAddress(MO.getSymbolName(), true); } else if (MO.isImmediate()) { emitConstant(MO.getImmedValue(), sizeOfImm(Desc)); } else { @@ -439,7 +435,7 @@ } else if (MO1.isExternalSymbol()) { assert(sizeOfImm(Desc) == 4 && "Don't know how to emit non-pointer values!"); - emitExternalSymbolAddress(MO1.getSymbolName(), false, false); + emitExternalSymbolAddress(MO1.getSymbolName(), false); } else if (MO1.isJumpTableIndex()) { assert(sizeOfImm(Desc) == 4 && "Don't know how to emit non-pointer values!"); From criswell at cs.uiuc.edu Thu Jun 22 11:07:55 2006 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 22 Jun 2006 11:07:55 -0500 Subject: [llvm-commits] CVS: CVSROOT/loginfo Message-ID: <200606221607.LAA21271@choi.cs.uiuc.edu> Changes in directory CVSROOT: loginfo updated: 1.10 -> 1.11 --- Log message: Send commit diffs to my email address. May update to send to others or commits list depending on what others want. --- Diffs of the changes: (+1 -0) loginfo | 1 + 1 files changed, 1 insertion(+) Index: CVSROOT/loginfo diff -u CVSROOT/loginfo:1.10 CVSROOT/loginfo:1.11 --- CVSROOT/loginfo:1.10 Fri Jan 7 13:55:09 2005 +++ CVSROOT/loginfo Thu Jun 22 11:07:42 2006 @@ -28,4 +28,5 @@ ^reopt /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu ^llva-emu /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-emu at nondot.org ^llvm-java /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu +^privbracket /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} criswell at cs.uiuc.edu ^CVSROOT /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu From evan.cheng at apple.com Thu Jun 22 20:02:49 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 22 Jun 2006 20:02:49 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineRelocation.h Message-ID: <200606230102.UAA30724@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineRelocation.h updated: 1.9 -> 1.10 --- Log message: Added jump table address relocation. --- Diffs of the changes: (+35 -4) MachineRelocation.h | 39 +++++++++++++++++++++++++++++++++++---- 1 files changed, 35 insertions(+), 4 deletions(-) Index: llvm/include/llvm/CodeGen/MachineRelocation.h diff -u llvm/include/llvm/CodeGen/MachineRelocation.h:1.9 llvm/include/llvm/CodeGen/MachineRelocation.h:1.10 --- llvm/include/llvm/CodeGen/MachineRelocation.h:1.9 Wed May 3 15:30:20 2006 +++ llvm/include/llvm/CodeGen/MachineRelocation.h Thu Jun 22 20:02:37 2006 @@ -39,7 +39,8 @@ isResult, // Relocation has be transformed into its result pointer. isGV, // The Target.GV field is valid. isExtSym, // The Target.ExtSym field is valid. - isConstPool, // The Target.ConstPool field is valid. + isConstPool, // Relocation of constant pool address. + isJumpTable, // Relocation of jump table address. isGOTIndex // The Target.GOTIndex field is valid. }; @@ -54,7 +55,7 @@ void *Result; // If this has been resolved to a resolved pointer GlobalValue *GV; // If this is a pointer to an LLVM global const char *ExtSym; // If this is a pointer to a named symbol - unsigned ConstPool; // In this is a pointer to a constant pool entry + unsigned Index; // Constant pool / jump table index unsigned GOTIndex; // Index in the GOT of this symbol/global } Target; @@ -113,7 +114,24 @@ Result.AddrType = isConstPool; Result.DoesntNeedFnStub = false; Result.GOTRelative = false; - Result.Target.ConstPool = CPI; + Result.Target.Index = CPI; + return Result; + } + + /// MachineRelocation::getJumpTable - Return a relocation entry for a jump + /// table entry. + /// + static MachineRelocation getJumpTable(intptr_t offset,unsigned RelocationType, + unsigned JTI, intptr_t cst = 0) { + assert((RelocationType & ~63) == 0 && "Relocation type too large!"); + MachineRelocation Result; + Result.Offset = offset; + Result.ConstantVal = cst; + Result.TargetReloType = RelocationType; + Result.AddrType = isJumpTable; + Result.DoesntNeedFnStub = false; + Result.GOTRelative = false; + Result.Target.Index = JTI; return Result; } @@ -154,6 +172,12 @@ return AddrType == isConstPool; } + /// isJumpTableIndex - Return true if this is a jump table reference. + /// + bool isJumpTableIndex() const { + return AddrType == isJumpTable; + } + /// isGOTRelative - Return true the target wants the index into the GOT of /// the symbol rather than the address of the symbol. bool isGOTRelative() const { @@ -187,7 +211,14 @@ /// the index into the constant pool. unsigned getConstantPoolIndex() const { assert(isConstantPoolIndex() && "This is not a constant pool reference!"); - return Target.ConstPool; + return Target.Index; + } + + /// getJumpTableIndex - If this is a jump table reference, return + /// the index into the jump table. + unsigned getJumpTableIndex() const { + assert(isJumpTableIndex() && "This is not a jump table reference!"); + return Target.Index; } /// getResultPointer - Once this has been resolved to point to an actual From evan.cheng at apple.com Thu Jun 22 20:02:50 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 22 Jun 2006 20:02:50 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Message-ID: <200606230102.UAA30728@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: JITEmitter.cpp updated: 1.104 -> 1.105 --- Log message: Added jump table address relocation. --- Diffs of the changes: (+5 -1) JITEmitter.cpp | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.104 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.105 --- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.104 Fri Jun 16 13:09:26 2006 +++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Thu Jun 22 20:02:37 2006 @@ -786,9 +786,13 @@ ResultPtr = getPointerToGlobal(MR.getGlobalValue(), BufferBegin+MR.getMachineCodeOffset(), MR.doesntNeedFunctionStub()); - } else { + } else if (MR.isConstantPoolIndex()){ assert(MR.isConstantPoolIndex()); ResultPtr=(void*)getConstantPoolEntryAddress(MR.getConstantPoolIndex()); + } else { + assert(MR.isJumpTableIndex()); + ResultPtr=(void*)getJumpTableEntryAddress(MR.getJumpTableIndex()); + } MR.setResultPointer(ResultPtr); From jlaskey at apple.com Fri Jun 23 07:52:19 2006 From: jlaskey at apple.com (Jim Laskey) Date: Fri, 23 Jun 2006 07:52:19 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/AsmPrinter.h DwarfWriter.h MachineDebugInfo.h Message-ID: <200606231252.HAA09717@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: AsmPrinter.h updated: 1.40 -> 1.41 DwarfWriter.h updated: 1.37 -> 1.38 MachineDebugInfo.h updated: 1.36 -> 1.37 --- Log message: Add and sort "sections" in debug lines. This always stepping through code in sections other than ".text", including weak sections like ctors and dtors. --- Diffs of the changes: (+15 -16) AsmPrinter.h | 8 ++++---- DwarfWriter.h | 17 ++++++++--------- MachineDebugInfo.h | 6 +++--- 3 files changed, 15 insertions(+), 16 deletions(-) Index: llvm/include/llvm/CodeGen/AsmPrinter.h diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.40 llvm/include/llvm/CodeGen/AsmPrinter.h:1.41 --- llvm/include/llvm/CodeGen/AsmPrinter.h:1.40 Fri May 19 14:07:54 2006 +++ llvm/include/llvm/CodeGen/AsmPrinter.h Fri Jun 23 07:51:53 2006 @@ -26,10 +26,6 @@ class GlobalVariable; class AsmPrinter : public MachineFunctionPass { - /// CurrentSection - The current section we are emitting to. This is - /// controlled and used by the SwitchSection method. - std::string CurrentSection; - /// FunctionNumber - This provides a unique ID for each function emitted in /// this translation unit. It is autoincremented by SetupMachineFunction, /// and can be accessed with getFunctionNumber() and @@ -134,6 +130,10 @@ //===--- Section Switching Directives ---------------------------------===// + /// CurrentSection - The current section we are emitting to. This is + /// controlled and used by the SwitchSection method. + std::string CurrentSection; + /// SwitchToSectionDirective - This is the directive used when we want to /// emit a global to an arbitrary section. The section name is emited after /// this. Index: llvm/include/llvm/CodeGen/DwarfWriter.h diff -u llvm/include/llvm/CodeGen/DwarfWriter.h:1.37 llvm/include/llvm/CodeGen/DwarfWriter.h:1.38 --- llvm/include/llvm/CodeGen/DwarfWriter.h:1.37 Wed Jun 14 06:35:03 2006 +++ llvm/include/llvm/CodeGen/DwarfWriter.h Fri Jun 23 07:51:53 2006 @@ -47,6 +47,7 @@ class Module; class MRegisterInfo; class SubprogramDesc; +class SourceLineInfo; class TargetData; class Type; class TypeDesc; @@ -110,11 +111,6 @@ /// bool shouldEmit; - /// IsNormalText - Flag to indicate if routine is not special case text - /// (coalesced.) - // FIXME - should be able to debug coalesced functions. - bool IsNormalText; - /// SubprogramCount - The running count of functions being compiled. /// unsigned SubprogramCount; @@ -144,10 +140,13 @@ /// descriptors to debug information entries. std::map DescToDieMap; - /// TypeToDieMap - Type to DIEType map. + /// SectionMap - Provides a unique id per text section. + /// + UniqueVector SectionMap; + + /// SectionSourceLines - Tracks line numbers per text section. /// - // FIXME - Should not be needed. - std::map TypeToDieMap; + std::vector > SectionSourceLines; //===--------------------------------------------------------------------===// // Properties to be set by the derived class ctor, used to configure the @@ -483,7 +482,7 @@ /// BeginFunction - Gather pre-function debug information. Assumes being /// emitted immediately after the function entry point. - void BeginFunction(MachineFunction *MF, bool IsNormalText); + void BeginFunction(MachineFunction *MF); /// EndFunction - Gather and emit post-function debug information. /// Index: llvm/include/llvm/CodeGen/MachineDebugInfo.h diff -u llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.36 llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.37 --- llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.36 Fri Jun 16 08:14:03 2006 +++ llvm/include/llvm/CodeGen/MachineDebugInfo.h Fri Jun 23 07:51:53 2006 @@ -1031,9 +1031,9 @@ return SourceFiles; } - /// getSourceLines - Return a vector of source lines. Vector index + 1 - /// equals label ID. - const std::vector &getSourceLines() const { + /// getSourceLines - Return a vector of source lines. + /// + std::vector &getSourceLines() { return Lines; } From jlaskey at apple.com Fri Jun 23 07:52:19 2006 From: jlaskey at apple.com (Jim Laskey) Date: Fri, 23 Jun 2006 07:52:19 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp Message-ID: <200606231252.HAA09712@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.66 -> 1.67 --- Log message: Add and sort "sections" in debug lines. This always stepping through code in sections other than ".text", including weak sections like ctors and dtors. --- Diffs of the changes: (+113 -88) DwarfWriter.cpp | 201 +++++++++++++++++++++++++++++++------------------------- 1 files changed, 113 insertions(+), 88 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.66 llvm/lib/CodeGen/DwarfWriter.cpp:1.67 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.66 Tue Jun 20 14:41:06 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Fri Jun 23 07:51:53 2006 @@ -1446,8 +1446,8 @@ DIE *Die = new DIE(DW_TAG_compile_unit); Die->AddDelta (DW_AT_stmt_list, DW_FORM_data4, DWLabel("line", 0), DWLabel("section_line", 0)); - Die->AddLabel (DW_AT_high_pc, DW_FORM_addr, DWLabel("text_end", 0)); - Die->AddLabel (DW_AT_low_pc, DW_FORM_addr, DWLabel("text_begin", 0)); +// Die->AddLabel (DW_AT_high_pc, DW_FORM_addr, DWLabel("text_end", 0)); +// Die->AddLabel (DW_AT_low_pc, DW_FORM_addr, DWLabel("text_begin", 0)); Die->AddString(DW_AT_producer, DW_FORM_string, UnitDesc->getProducer()); Die->AddUInt (DW_AT_language, DW_FORM_data1, UnitDesc->getLanguage()); Die->AddString(DW_AT_name, DW_FORM_string, UnitDesc->getFileName()); @@ -1702,11 +1702,11 @@ Asm->SwitchToDataSection(DwarfRangesSection, 0); EmitLabel("section_ranges", 0); - Asm->SwitchToDataSection(TextSection, 0); + Asm->SwitchToTextSection(TextSection, 0); EmitLabel("text_begin", 0); Asm->SwitchToDataSection(DataSection, 0); EmitLabel("data_begin", 0); - + // Emit common frame information. EmitInitialDebugFrame(); } @@ -2011,76 +2011,86 @@ EmitLabel("line_prolog_end", 0); - // Emit line information - const std::vector &LineInfos = DebugInfo->getSourceLines(); - - // Dwarf assumes we start with first line of first source file. - unsigned Source = 1; - unsigned Line = 1; - - // Construct rows of the address, source, line, column matrix. - for (unsigned i = 0, N = LineInfos.size(); i < N; ++i) { - SourceLineInfo *LineInfo = LineInfos[i]; + // A sequence for each text section. + for (unsigned j = 0, M = SectionSourceLines.size(); j < M; ++j) { + // Isolate current sections line info. + const std::vector &LineInfos = SectionSourceLines[j]; if (DwarfVerbose) { - unsigned SourceID = LineInfo->getSourceID(); - const SourceFileInfo &SourceFile = SourceFiles[SourceID]; - unsigned DirectoryID = SourceFile.getDirectoryID(); O << "\t" << Asm->CommentString << " " - << Directories[DirectoryID] - << SourceFile.getName() << ":" - << LineInfo->getLine() << "\n"; + << "Section " + << SectionMap[j + 1].c_str() << "\n"; } - // Define the line address. - EmitInt8(0); EOL("Extended Op"); - EmitInt8(4 + 1); EOL("Op size"); - EmitInt8(DW_LNE_set_address); EOL("DW_LNE_set_address"); - EmitReference("loc", LineInfo->getLabelID()); EOL("Location label"); - - // If change of source, then switch to the new source. - if (Source != LineInfo->getSourceID()) { - Source = LineInfo->getSourceID(); - EmitInt8(DW_LNS_set_file); EOL("DW_LNS_set_file"); - EmitULEB128Bytes(Source); EOL("New Source"); - } - - // If change of line. - if (Line != LineInfo->getLine()) { - // Determine offset. - int Offset = LineInfo->getLine() - Line; - int Delta = Offset - MinLineDelta; + // Dwarf assumes we start with first line of first source file. + unsigned Source = 1; + unsigned Line = 1; + + // Construct rows of the address, source, line, column matrix. + for (unsigned i = 0, N = LineInfos.size(); i < N; ++i) { + SourceLineInfo *LineInfo = LineInfos[i]; - // Update line. - Line = LineInfo->getLine(); + if (DwarfVerbose) { + unsigned SourceID = LineInfo->getSourceID(); + const SourceFileInfo &SourceFile = SourceFiles[SourceID]; + unsigned DirectoryID = SourceFile.getDirectoryID(); + O << "\t" + << Asm->CommentString << " " + << Directories[DirectoryID] + << SourceFile.getName() << ":" + << LineInfo->getLine() << "\n"; + } + + // Define the line address. + EmitInt8(0); EOL("Extended Op"); + EmitInt8(4 + 1); EOL("Op size"); + EmitInt8(DW_LNE_set_address); EOL("DW_LNE_set_address"); + EmitReference("loc", LineInfo->getLabelID()); EOL("Location label"); - // If delta is small enough and in range... - if (Delta >= 0 && Delta < (MaxLineDelta - 1)) { - // ... then use fast opcode. - EmitInt8(Delta - MinLineDelta); EOL("Line Delta"); + // If change of source, then switch to the new source. + if (Source != LineInfo->getSourceID()) { + Source = LineInfo->getSourceID(); + EmitInt8(DW_LNS_set_file); EOL("DW_LNS_set_file"); + EmitULEB128Bytes(Source); EOL("New Source"); + } + + // If change of line. + if (Line != LineInfo->getLine()) { + // Determine offset. + int Offset = LineInfo->getLine() - Line; + int Delta = Offset - MinLineDelta; + + // Update line. + Line = LineInfo->getLine(); + + // If delta is small enough and in range... + if (Delta >= 0 && Delta < (MaxLineDelta - 1)) { + // ... then use fast opcode. + EmitInt8(Delta - MinLineDelta); EOL("Line Delta"); + } else { + // ... otherwise use long hand. + EmitInt8(DW_LNS_advance_line); EOL("DW_LNS_advance_line"); + EmitSLEB128Bytes(Offset); EOL("Line Offset"); + EmitInt8(DW_LNS_copy); EOL("DW_LNS_copy"); + } } else { - // ... otherwise use long hand. - EmitInt8(DW_LNS_advance_line); EOL("DW_LNS_advance_line"); - EmitSLEB128Bytes(Offset); EOL("Line Offset"); + // Copy the previous row (different address or source) EmitInt8(DW_LNS_copy); EOL("DW_LNS_copy"); } - } else { - // Copy the previous row (different address or source) - EmitInt8(DW_LNS_copy); EOL("DW_LNS_copy"); } - } - // Define last address. - EmitInt8(0); EOL("Extended Op"); - EmitInt8(4 + 1); EOL("Op size"); - EmitInt8(DW_LNE_set_address); EOL("DW_LNE_set_address"); - EmitReference("text_end", 0); EOL("Location label"); - - // Mark end of matrix. - EmitInt8(0); EOL("DW_LNE_end_sequence"); - EmitULEB128Bytes(1); O << "\n"; - EmitInt8(1); O << "\n"; + // Define last address of section. + EmitInt8(0); EOL("Extended Op"); + EmitInt8(4 + 1); EOL("Op size"); + EmitInt8(DW_LNE_set_address); EOL("DW_LNE_set_address"); + EmitReference("section_end", j + 1); EOL("Section end label"); + + // Mark end of matrix. + EmitInt8(0); EOL("DW_LNE_end_sequence"); + EmitULEB128Bytes(1); O << "\n"; + EmitInt8(1); O << "\n"; + } EmitLabel("line_end", 0); @@ -2336,14 +2346,14 @@ , DebugInfo(NULL) , didInitial(false) , shouldEmit(false) -, IsNormalText(false) , SubprogramCount(0) , CompileUnits() , Abbreviations() , StringPool() , DescToUnitMap() , DescToDieMap() -, TypeToDieMap() +, SectionMap() +, SectionSourceLines() , AddressSize(sizeof(int32_t)) , hasLEB128(false) , hasDotLoc(false) @@ -2388,6 +2398,9 @@ // Create DIEs for each of the externally visible subprograms. ConstructSubprogramDIEs(); + + // Prime section data. + SectionMap.insert(std::string("\t") + TextSection); } } @@ -2412,6 +2425,12 @@ Asm->SwitchToDataSection(DataSection, 0); EmitLabel("data_end", 0); + // End text sections. + for (unsigned i = 1, N = SectionMap.size(); i <= N; ++i) { + Asm->SwitchToTextSection(SectionMap[i].c_str(), 0); + EmitLabel("section_end", i); + } + // Compute DIE offsets and sizes. SizeAndOffsets(); @@ -2445,24 +2464,17 @@ /// BeginFunction - Gather pre-function debug information. Assumes being /// emitted immediately after the function entry point. -void DwarfWriter::BeginFunction(MachineFunction *MF, bool IsNormalText) { +void DwarfWriter::BeginFunction(MachineFunction *MF) { this->MF = MF; - // FIXME - should be able to debug coalesced functions. - this->IsNormalText = IsNormalText; - // FIXME - should be able to debug coalesced functions. - if (IsNormalText) { - // Begin accumulating function debug information. - DebugInfo->BeginFunction(MF); - - if (!ShouldEmitDwarf()) return; - EOL("Dwarf Begin Function"); - - // Assumes in correct section after the entry point. - EmitLabel("func_begin", ++SubprogramCount); - } else { - ShouldEmitDwarf(); - } + if (!ShouldEmitDwarf()) return; + EOL("Dwarf Begin Function"); + + // Begin accumulating function debug information. + DebugInfo->BeginFunction(MF); + + // Assumes in correct section after the entry point. + EmitLabel("func_begin", ++SubprogramCount); } /// EndFunction - Gather and emit post-function debug information. @@ -2471,18 +2483,31 @@ if (!ShouldEmitDwarf()) return; EOL("Dwarf End Function"); - // FIXME - should be able to debug coalesced functions. - if (IsNormalText) { - // Define end label for subprogram. - EmitLabel("func_end", SubprogramCount); - - // Construct scopes for subprogram. - ConstructRootScope(DebugInfo->getRootScope()); + // Define end label for subprogram. + EmitLabel("func_end", SubprogramCount); - // Emit function frame information. - EmitFunctionDebugFrame(); + // Get function line info. + std::vector &LineInfos = DebugInfo->getSourceLines(); + + if (!LineInfos.empty()) { + // Get section line info. + unsigned ID = SectionMap.insert(Asm->CurrentSection); + if (SectionSourceLines.size() < ID) SectionSourceLines.resize(ID); + std::vector &SectionLineInfos =SectionSourceLines[ID-1]; + // Append the function info to section info. + SectionLineInfos.insert(SectionLineInfos.end(), + LineInfos.begin(), LineInfos.end()); } + // Construct scopes for subprogram. + ConstructRootScope(DebugInfo->getRootScope()); + + // Emit function frame information. + EmitFunctionDebugFrame(); + + // Reset the line numbers for the next function. + LineInfos.clear(); + // Clear function debug information. DebugInfo->EndFunction(); } From jlaskey at apple.com Fri Jun 23 07:52:19 2006 From: jlaskey at apple.com (Jim Laskey) Date: Fri, 23 Jun 2006 07:52:19 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Message-ID: <200606231252.HAA09714@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ATTAsmPrinter.cpp updated: 1.51 -> 1.52 --- Log message: Add and sort "sections" in debug lines. This always stepping through code in sections other than ".text", including weak sections like ctors and dtors. --- Diffs of the changes: (+1 -4) X86ATTAsmPrinter.cpp | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.51 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.52 --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.51 Wed Jun 14 06:35:03 2006 +++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Fri Jun 23 07:51:53 2006 @@ -29,8 +29,6 @@ // Let PassManager know we need debug information and relay // the MachineDebugInfo address on to DwarfWriter. DW.SetDebugInfo(&getAnalysis()); - // FIXME - should be able to debug coalesced functions. - bool IsNormalText = true; SetupMachineFunction(MF); O << "\n\n"; @@ -74,14 +72,13 @@ SwitchToTextSection("", F); O << "\t.weak " << CurrentFnName << "\n"; } - IsNormalText = false; break; } O << CurrentFnName << ":\n"; if (Subtarget->TargetType == X86Subtarget::isDarwin) { // Emit pre-function debug information. - DW.BeginFunction(&MF, IsNormalText); + DW.BeginFunction(&MF); } // Print out code for the function. From jlaskey at apple.com Fri Jun 23 07:52:19 2006 From: jlaskey at apple.com (Jim Laskey) Date: Fri, 23 Jun 2006 07:52:19 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Message-ID: <200606231252.HAA09711@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCAsmPrinter.cpp updated: 1.179 -> 1.180 --- Log message: Add and sort "sections" in debug lines. This always stepping through code in sections other than ".text", including weak sections like ctors and dtors. --- Diffs of the changes: (+1 -4) PPCAsmPrinter.cpp | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.179 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.180 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.179 Tue Jun 20 18:18:58 2006 +++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Fri Jun 23 07:51:53 2006 @@ -489,8 +489,6 @@ /// bool DarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) { DW.SetDebugInfo(&getAnalysis()); - // FIXME - should be able to debug coalesced functions. - bool IsNormalText = true; SetupMachineFunction(MF); O << "\n\n"; @@ -518,14 +516,13 @@ ".section __TEXT,__textcoal_nt,coalesced,pure_instructions", F); O << "\t.globl\t" << CurrentFnName << "\n"; O << "\t.weak_definition\t" << CurrentFnName << "\n"; - IsNormalText = false; break; } EmitAlignment(4, F); O << CurrentFnName << ":\n"; // Emit pre-function debug information. - DW.BeginFunction(&MF, IsNormalText); + DW.BeginFunction(&MF); // Print out code for the function. for (MachineFunction::const_iterator I = MF.begin(), E = MF.end(); From jlaskey at apple.com Fri Jun 23 08:03:29 2006 From: jlaskey at apple.com (Jim Laskey) Date: Fri, 23 Jun 2006 10:03:29 -0300 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/AsmPrinter.h DwarfWriter.h MachineDebugInfo.h In-Reply-To: <200606231252.HAA09717@zion.cs.uiuc.edu> References: <200606231252.HAA09717@zion.cs.uiuc.edu> Message-ID: I'm getting old and my brain is confused. s/always/allows/ Cheers, -- Jim On Jun 23, 2006, at 9:52 AM, Jim Laskey wrote: > Add and sort "sections" in debug lines. This always stepping through > code in sections other than ".text", including weak sections like > ctors and > dtors. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20060623/d3c8893e/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2417 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20060623/d3c8893e/attachment.bin From evan.cheng at apple.com Sat Jun 24 03:36:24 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 24 Jun 2006 03:36:24 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86ISelLowering.h X86JITInfo.cpp Message-ID: <200606240836.DAA16579@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.230 -> 1.231 X86ISelLowering.h updated: 1.66 -> 1.67 X86JITInfo.cpp updated: 1.20 -> 1.21 --- Log message: Simplify X86CompilationCallback: always align to 16-byte boundary; don't save EAX/EDX if unnecessary. --- Diffs of the changes: (+44 -34) X86ISelLowering.cpp | 32 ++++++++++++-------------------- X86ISelLowering.h | 16 ++++++++++++++++ X86JITInfo.cpp | 30 ++++++++++++++++-------------- 3 files changed, 44 insertions(+), 34 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.230 llvm/lib/Target/X86/X86ISelLowering.cpp:1.231 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.230 Thu Jun 15 03:14:54 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Sat Jun 24 03:36:10 2006 @@ -762,26 +762,6 @@ // (when we have a global fp allocator) and do other tricks. // -// FASTCC_NUM_INT_ARGS_INREGS - This is the max number of integer arguments -// to pass in registers. 0 is none, 1 is is "use EAX", 2 is "use EAX and -// EDX". Anything more is illegal. -// -// FIXME: The linscan register allocator currently has problem with -// coalescing. At the time of this writing, whenever it decides to coalesce -// a physreg with a virtreg, this increases the size of the physreg's live -// range, and the live range cannot ever be reduced. This causes problems if -// too many physregs are coaleced with virtregs, which can cause the register -// allocator to wedge itself. -// -// This code triggers this problem more often if we pass args in registers, -// so disable it until this is fixed. -// -// NOTE: this isn't marked const, so that GCC doesn't emit annoying warnings -// about code being dead. -// -static unsigned FASTCC_NUM_INT_ARGS_INREGS = 0; - - /// HowToPassFastCCArgument - Returns how an formal argument of the specified /// type should be passed. If it is through stack, returns the size of the stack /// slot; if it is through integer or XMM register, returns the number of @@ -798,30 +778,38 @@ switch (ObjectVT) { default: assert(0 && "Unhandled argument type!"); case MVT::i8: +#if FASTCC_NUM_INT_ARGS_INREGS > 0 if (NumIntRegs < FASTCC_NUM_INT_ARGS_INREGS) ObjIntRegs = 1; else +#endif ObjSize = 1; break; case MVT::i16: +#if FASTCC_NUM_INT_ARGS_INREGS > 0 if (NumIntRegs < FASTCC_NUM_INT_ARGS_INREGS) ObjIntRegs = 1; else +#endif ObjSize = 2; break; case MVT::i32: +#if FASTCC_NUM_INT_ARGS_INREGS > 0 if (NumIntRegs < FASTCC_NUM_INT_ARGS_INREGS) ObjIntRegs = 1; else +#endif ObjSize = 4; break; case MVT::i64: +#if FASTCC_NUM_INT_ARGS_INREGS > 0 if (NumIntRegs+2 <= FASTCC_NUM_INT_ARGS_INREGS) { ObjIntRegs = 2; } else if (NumIntRegs+1 <= FASTCC_NUM_INT_ARGS_INREGS) { ObjIntRegs = 1; ObjSize = 4; } else +#endif ObjSize = 8; case MVT::f32: ObjSize = 4; @@ -1027,10 +1015,12 @@ case MVT::i8: case MVT::i16: case MVT::i32: +#if FASTCC_NUM_INT_ARGS_INREGS > 0 if (NumIntRegs < FASTCC_NUM_INT_ARGS_INREGS) { ++NumIntRegs; break; } +#endif // Fall through case MVT::f32: NumBytes += 4; @@ -1076,6 +1066,7 @@ case MVT::i8: case MVT::i16: case MVT::i32: +#if FASTCC_NUM_INT_ARGS_INREGS > 0 if (NumIntRegs < FASTCC_NUM_INT_ARGS_INREGS) { RegsToPass.push_back( std::make_pair(GPRArgRegs[Arg.getValueType()-MVT::i8][NumIntRegs], @@ -1083,6 +1074,7 @@ ++NumIntRegs; break; } +#endif // Fall through case MVT::f32: { SDOperand PtrOff = DAG.getConstant(ArgOffset, getPointerTy()); Index: llvm/lib/Target/X86/X86ISelLowering.h diff -u llvm/lib/Target/X86/X86ISelLowering.h:1.66 llvm/lib/Target/X86/X86ISelLowering.h:1.67 --- llvm/lib/Target/X86/X86ISelLowering.h:1.66 Wed May 24 19:59:30 2006 +++ llvm/lib/Target/X86/X86ISelLowering.h Sat Jun 24 03:36:10 2006 @@ -370,4 +370,20 @@ }; } +// FASTCC_NUM_INT_ARGS_INREGS - This is the max number of integer arguments +// to pass in registers. 0 is none, 1 is is "use EAX", 2 is "use EAX and +// EDX". Anything more is illegal. +// +// FIXME: The linscan register allocator currently has problem with +// coalescing. At the time of this writing, whenever it decides to coalesce +// a physreg with a virtreg, this increases the size of the physreg's live +// range, and the live range cannot ever be reduced. This causes problems if +// too many physregs are coaleced with virtregs, which can cause the register +// allocator to wedge itself. +// +// This code triggers this problem more often if we pass args in registers, +// so disable it until this is fixed. +// +#define FASTCC_NUM_INT_ARGS_INREGS 0 + #endif // X86ISELLOWERING_H Index: llvm/lib/Target/X86/X86JITInfo.cpp diff -u llvm/lib/Target/X86/X86JITInfo.cpp:1.20 llvm/lib/Target/X86/X86JITInfo.cpp:1.21 --- llvm/lib/Target/X86/X86JITInfo.cpp:1.20 Thu Jun 1 12:13:10 2006 +++ llvm/lib/Target/X86/X86JITInfo.cpp Sat Jun 24 03:36:10 2006 @@ -57,26 +57,28 @@ #endif "pushl %ebp\n" "movl %esp, %ebp\n" // Standard prologue +#if FASTCC_NUM_INT_ARGS_INREGS > 0 "pushl %eax\n" - "pushl %edx\n" // save EAX/EDX -#if defined(__CYGWIN__) || defined(__MINGW32__) - "call _X86CompilationCallback2\n" -#elif defined(__APPLE__) - "movl 4(%ebp), %eax\n" // load the address of return address - "movl $24, %edx\n" // if the opcode of the instruction at the - "cmpb $-51, (%eax)\n" // return address is our 0xCD marker, then - "movl $12, %eax\n" // subtract 24 from %esp to realign it to 16 - "cmovne %eax, %edx\n" // bytes after the push of edx, the amount to. - "subl %edx, %esp\n" // the push of edx to keep it aligned. - "pushl %edx\n" // subtract. Otherwise, subtract 12 bytes after + "pushl %edx\n" // Save EAX/EDX +#endif +#if defined(__APPLE__) + "andl $-16, %esp\n" // Align ESP on 16-byte boundary +#endif +#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) "call _X86CompilationCallback2\n" - "popl %edx\n" - "addl %edx, %esp\n" #else - "call X86CompilationCallback2\n" + "call X86CompilationCallback2\n" +#endif +#if defined(__APPLE__) + "movl %ebp, %esp\n" // Restore ESP +#endif +#if FASTCC_NUM_INT_ARGS_INREGS > 0 +#if defined(__APPLE__) + "subl $8, %esp\n" #endif "popl %edx\n" "popl %eax\n" +#endif "popl %ebp\n" "ret\n"); #else From evan.cheng at apple.com Sat Jun 24 03:43:36 2006 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 24 Jun 2006 03:43:36 -0500 Subject: [llvm-commits] CVS: llvm-test/Makefile.programs Message-ID: <200606240843.DAA17632@zion.cs.uiuc.edu> Changes in directory llvm-test: Makefile.programs updated: 1.217 -> 1.218 --- Log message: Switch x86 llcbeta back to -enable-x86-fastcc --- Diffs of the changes: (+1 -1) Makefile.programs | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/Makefile.programs diff -u llvm-test/Makefile.programs:1.217 llvm-test/Makefile.programs:1.218 --- llvm-test/Makefile.programs:1.217 Tue Jun 13 23:48:37 2006 +++ llvm-test/Makefile.programs Sat Jun 24 03:43:23 2006 @@ -197,7 +197,7 @@ LLCBETAOPTION := -sched=simple endif ifeq ($(ARCH),x86) -LLCBETAOPTION := -sched=list-tdrr +LLCBETAOPTION := -enable-x86-fastcc endif ifeq ($(ARCH),Sparc) LLCBETAOPTION := -enable-sparc-v9-insts