From xuzhongxing at gmail.com Mon Feb 1 01:32:53 2010 From: xuzhongxing at gmail.com (Zhongxing Xu) Date: Mon, 01 Feb 2010 07:32:53 -0000 Subject: [llvm-commits] [llvm] r94973 - /llvm/trunk/include/llvm/ADT/ImmutableSet.h Message-ID: <201002010732.o117Wrep025441@zion.cs.uiuc.edu> Author: zhongxingxu Date: Mon Feb 1 01:32:52 2010 New Revision: 94973 URL: http://llvm.org/viewvc/llvm-project?rev=94973&view=rev Log: Simplify code. We can compare TNew with T in one batch. Modified: llvm/trunk/include/llvm/ADT/ImmutableSet.h Modified: llvm/trunk/include/llvm/ADT/ImmutableSet.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableSet.h?rev=94973&r1=94972&r2=94973&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/ImmutableSet.h (original) +++ llvm/trunk/include/llvm/ADT/ImmutableSet.h Mon Feb 1 01:32:52 2010 @@ -581,25 +581,14 @@ continue; // We found a collision. Perform a comparison of Contents('T') - // with Contents('L')+'V'+Contents('R'). + // with Contents('TNew') typename TreeTy::iterator TI = T->begin(), TE = T->end(); - // First compare Contents('L') with the (initial) contents of T. - if (!CompareTreeWithSection(TNew->getLeft(), TI, TE)) - continue; - - // Now compare the new data element. - if (TI == TE || !TI->ElementEqual(TNew->getValue())) - continue; - - ++TI; - - // Now compare the remainder of 'T' with 'R'. - if (!CompareTreeWithSection(TNew->getRight(), TI, TE)) + if (!CompareTreeWithSection(TNew, TI, TE)) continue; if (TI != TE) - continue; // Contents('R') did not match suffix of 'T'. + continue; // T has more contents than TNew. // Trees did match! Return 'T'. return T; From scallanan at apple.com Mon Feb 1 02:49:35 2010 From: scallanan at apple.com (Sean Callanan) Date: Mon, 01 Feb 2010 08:49:35 -0000 Subject: [llvm-commits] [llvm] r94974 - in /llvm/trunk/tools/ed: EDDisassembler.cpp EDDisassembler.h EDInst.cpp EDInst.h EDMain.cpp EDOperand.cpp EDOperand.h EDToken.cpp EDToken.h EnhancedDisassembly.exports Message-ID: <201002010849.o118na7N001735@zion.cs.uiuc.edu> Author: spyffe Date: Mon Feb 1 02:49:35 2010 New Revision: 94974 URL: http://llvm.org/viewvc/llvm-project?rev=94974&view=rev Log: Added the enhanced disassembly library's implementation and fleshed out the .exports file. I still have to fix several details of operand parsing, but the basic functionality is there and usable. Added: llvm/trunk/tools/ed/EDDisassembler.cpp llvm/trunk/tools/ed/EDDisassembler.h llvm/trunk/tools/ed/EDInst.cpp llvm/trunk/tools/ed/EDInst.h llvm/trunk/tools/ed/EDOperand.cpp llvm/trunk/tools/ed/EDOperand.h llvm/trunk/tools/ed/EDToken.cpp llvm/trunk/tools/ed/EDToken.h Modified: llvm/trunk/tools/ed/EDMain.cpp llvm/trunk/tools/ed/EnhancedDisassembly.exports Added: llvm/trunk/tools/ed/EDDisassembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EDDisassembler.cpp?rev=94974&view=auto ============================================================================== --- llvm/trunk/tools/ed/EDDisassembler.cpp (added) +++ llvm/trunk/tools/ed/EDDisassembler.cpp Mon Feb 1 02:49:35 2010 @@ -0,0 +1,445 @@ +//===-EDDisassembler.cpp - LLVM Enhanced Disassembler ---------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements the Enhanced Disassembly library's disassembler class. +// The disassembler is responsible for vending individual instructions according +// to a given architecture and disassembly syntax. +// +//===----------------------------------------------------------------------===// + +#include "llvm/ADT/OwningPtr.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/MC/MCAsmInfo.h" +#include "llvm/MC/MCContext.h" +#include "llvm/MC/MCDisassembler.h" +#include "llvm/MC/MCExpr.h" +#include "llvm/MC/MCInst.h" +#include "llvm/MC/MCInstPrinter.h" +#include "llvm/MC/MCStreamer.h" +#include "llvm/MC/MCParser/AsmLexer.h" +#include "llvm/MC/MCParser/AsmParser.h" +#include "llvm/MC/MCParser/MCAsmParser.h" +#include "llvm/MC/MCParser/MCParsedAsmOperand.h" +#include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/MemoryObject.h" +#include "llvm/Support/SourceMgr.h" +#include "llvm/Target/TargetAsmLexer.h" +#include "llvm/Target/TargetAsmParser.h" +#include "llvm/Target/TargetRegistry.h" +#include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetRegisterInfo.h" +#include "llvm/Target/TargetSelect.h" + +#include "EDDisassembler.h" +#include "EDInst.h" + +#include "../../lib/Target/X86/X86GenEDInfo.inc" + +using namespace llvm; + +bool EDDisassembler::sInitialized = false; +EDDisassembler::DisassemblerMap_t EDDisassembler::sDisassemblers; + +struct InfoMap { + Triple::ArchType Arch; + const char *String; + const InstInfo *Info; +}; + +static struct InfoMap infomap[] = { + { Triple::x86, "i386-unknown-unknown", instInfoX86 }, + { Triple::x86_64, "x86_64-unknown-unknown", instInfoX86 }, + { Triple::InvalidArch, NULL, NULL } +}; + +/// infoFromArch - Returns the InfoMap corresponding to a given architecture, +/// or NULL if there is an error +/// +/// @arg arch - The Triple::ArchType for the desired architecture +static const InfoMap *infoFromArch(Triple::ArchType arch) { + unsigned int infoIndex; + + for (infoIndex = 0; infomap[infoIndex].String != NULL; ++infoIndex) { + if(arch == infomap[infoIndex].Arch) + return &infomap[infoIndex]; + } + + return NULL; +} + +/// getLLVMSyntaxVariant - gets the constant to use to get an assembly printer +/// for the desired assembly syntax, suitable for passing to +/// Target::createMCInstPrinter() +/// +/// @arg arch - The target architecture +/// @arg syntax - The assembly syntax in sd form +static int getLLVMSyntaxVariant(Triple::ArchType arch, + EDAssemblySyntax_t syntax) { + switch (syntax) { + default: + return -1; + // Mappings below from X86AsmPrinter.cpp + case kEDAssemblySyntaxX86ATT: + if (arch == Triple::x86 || arch == Triple::x86_64) + return 0; + else + return -1; + case kEDAssemblySyntaxX86Intel: + if (arch == Triple::x86 || arch == Triple::x86_64) + return 1; + else + return -1; + } +} + +#define BRINGUP_TARGET(tgt) \ + LLVMInitialize##tgt##TargetInfo(); \ + LLVMInitialize##tgt##Target(); \ + LLVMInitialize##tgt##AsmPrinter(); \ + LLVMInitialize##tgt##AsmParser(); \ + LLVMInitialize##tgt##Disassembler(); + +void EDDisassembler::initialize() { + if (sInitialized) + return; + + sInitialized = true; + + BRINGUP_TARGET(X86) +} + +#undef BRINGUP_TARGET + +EDDisassembler *EDDisassembler::getDisassembler(Triple::ArchType arch, + EDAssemblySyntax_t syntax) { + CPUKey key; + key.Arch = arch; + key.Syntax = syntax; + + EDDisassembler::DisassemblerMap_t::iterator i = sDisassemblers.find(key); + + if (i != sDisassemblers.end()) { + return i->second; + } + else { + EDDisassembler* sdd = new EDDisassembler(key); + if(!sdd->valid()) { + delete sdd; + return NULL; + } + + sDisassemblers[key] = sdd; + + return sdd; + } + + return NULL; +} + +EDDisassembler *EDDisassembler::getDisassembler(StringRef str, + EDAssemblySyntax_t syntax) { + Triple triple(str); + + return getDisassembler(triple.getArch(), syntax); +} + +namespace { + class EDAsmParser : public MCAsmParser { + AsmLexer Lexer; + MCContext Context; + OwningPtr Streamer; + public: + // Mandatory functions + EDAsmParser(const MCAsmInfo &MAI) : Lexer(MAI) { + Streamer.reset(createNullStreamer(Context)); + } + virtual ~EDAsmParser() { } + MCAsmLexer &getLexer() { return Lexer; } + MCContext &getContext() { return Context; } + MCStreamer &getStreamer() { return *Streamer; } + void Warning(SMLoc L, const Twine &Msg) { } + bool Error(SMLoc L, const Twine &Msg) { return true; } + const AsmToken &Lex() { return Lexer.Lex(); } + bool ParseExpression(const MCExpr *&Res, SMLoc &EndLoc) { + AsmToken token = Lex(); + if(token.isNot(AsmToken::Integer)) + return true; + Res = MCConstantExpr::Create(token.getIntVal(), Context); + return false; + } + bool ParseParenExpression(const MCExpr *&Res, SMLoc &EndLoc) { + assert(0 && "I can't ParseParenExpression()s!"); + } + bool ParseAbsoluteExpression(int64_t &Res) { + assert(0 && "I can't ParseAbsoluteExpression()s!"); + } + + /// setBuffer - loads a buffer into the parser + /// @arg buf - The buffer to read tokens from + void setBuffer(const MemoryBuffer &buf) { Lexer.setBuffer(&buf); } + /// parseInstName - When the lexer is positioned befor an instruction + /// name (with possible intervening whitespace), reads past the name, + /// returning 0 on success and -1 on failure + /// @arg name - A reference to a string that is filled in with the + /// instruction name + /// @arg loc - A reference to a location that is filled in with the + /// position of the instruction name + int parseInstName(StringRef &name, SMLoc &loc) { + AsmToken tok = Lexer.Lex(); + if(tok.isNot(AsmToken::Identifier)) { + return -1; + } + name = tok.getString(); + loc = tok.getLoc(); + return 0; + } + }; +} + +EDDisassembler::EDDisassembler(CPUKey &key) : + Valid(false), ErrorString(), ErrorStream(ErrorString), Key(key) { + const InfoMap *infoMap = infoFromArch(key.Arch); + + if (!infoMap) + return; + + const char *triple = infoMap->String; + + int syntaxVariant = getLLVMSyntaxVariant(key.Arch, key.Syntax); + + if (syntaxVariant < 0) + return; + + std::string tripleString(triple); + std::string errorString; + + Tgt = TargetRegistry::lookupTarget(tripleString, + errorString); + + if (!Tgt) + return; + + std::string featureString; + + OwningPtr + targetMachine(Tgt->createTargetMachine(tripleString, + featureString)); + + const TargetRegisterInfo *registerInfo = targetMachine->getRegisterInfo(); + + if (!registerInfo) + return; + + AsmInfo.reset(Tgt->createAsmInfo(tripleString)); + + if (!AsmInfo) + return; + + Disassembler.reset(Tgt->createMCDisassembler()); + + if (!Disassembler) + return; + + InstString.reset(new std::string); + InstStream.reset(new raw_string_ostream(*InstString)); + + InstPrinter.reset(Tgt->createMCInstPrinter(syntaxVariant, + *AsmInfo, + *InstStream)); + + if (!InstPrinter) + return; + + GenericAsmLexer.reset(new AsmLexer(*AsmInfo)); + SpecificAsmLexer.reset(Tgt->createAsmLexer(*AsmInfo)); + SpecificAsmLexer->InstallLexer(*GenericAsmLexer); + + InstInfos = infoMap->Info; + + Valid = true; +} + +EDDisassembler::~EDDisassembler() { + if(!valid()) + return; +} + +namespace { + /// EDMemoryObject - a subclass of MemoryObject that allows use of a callback + /// as provided by the sd interface. See MemoryObject. + class EDMemoryObject : public llvm::MemoryObject { + private: + EDByteReaderCallback Callback; + void *Arg; + public: + EDMemoryObject(EDByteReaderCallback callback, + void *arg) : Callback(callback), Arg(arg) { } + ~EDMemoryObject() { } + uint64_t getBase() const { return 0x0; } + uint64_t getExtent() const { return (uint64_t)-1; } + int readByte(uint64_t address, uint8_t *ptr) const { + if(!Callback) + return -1; + + if(Callback(ptr, address, Arg)) + return -1; + + return 0; + } + }; +} + +EDInst *EDDisassembler::createInst(EDByteReaderCallback byteReader, + uint64_t address, + void *arg) { + EDMemoryObject memoryObject(byteReader, arg); + + MCInst* inst = new MCInst; + uint64_t byteSize; + + if (!Disassembler->getInstruction(*inst, + byteSize, + memoryObject, + address, + ErrorStream)) { + delete inst; + return NULL; + } + else { + const InstInfo *thisInstInfo = &InstInfos[inst->getOpcode()]; + + EDInst* sdInst = new EDInst(inst, byteSize, *this, thisInstInfo); + return sdInst; + } +} + +void EDDisassembler::initMaps(const TargetRegisterInfo ®isterInfo) { + unsigned numRegisters = registerInfo.getNumRegs(); + unsigned registerIndex; + + for (registerIndex = 0; registerIndex < numRegisters; ++registerIndex) { + const char* registerName = registerInfo.get(registerIndex).Name; + + RegVec.push_back(registerName); + RegRMap[registerName] = registerIndex; + } + + if (Key.Arch == Triple::x86 || + Key.Arch == Triple::x86_64) { + stackPointers.insert(registerIDWithName("SP")); + stackPointers.insert(registerIDWithName("ESP")); + stackPointers.insert(registerIDWithName("RSP")); + + programCounters.insert(registerIDWithName("IP")); + programCounters.insert(registerIDWithName("EIP")); + programCounters.insert(registerIDWithName("RIP")); + } +} + +const char *EDDisassembler::nameWithRegisterID(unsigned registerID) const { + if (registerID >= RegVec.size()) + return NULL; + else + return RegVec[registerID].c_str(); +} + +unsigned EDDisassembler::registerIDWithName(const char *name) const { + regrmap_t::const_iterator iter = RegRMap.find(std::string(name)); + if (iter == RegRMap.end()) + return 0; + else + return (*iter).second; +} + +bool EDDisassembler::registerIsStackPointer(unsigned registerID) { + return (stackPointers.find(registerID) != stackPointers.end()); +} + +bool EDDisassembler::registerIsProgramCounter(unsigned registerID) { + return (programCounters.find(registerID) != programCounters.end()); +} + +int EDDisassembler::printInst(std::string& str, + MCInst& inst) { + PrinterMutex.acquire(); + + InstPrinter->printInst(&inst); + InstStream->flush(); + str = *InstString; + InstString->clear(); + + PrinterMutex.release(); + + return 0; +} + +int EDDisassembler::parseInst(SmallVectorImpl &operands, + SmallVectorImpl &tokens, + const std::string &str) { + int ret = 0; + + const char *cStr = str.c_str(); + MemoryBuffer *buf = MemoryBuffer::getMemBuffer(cStr, cStr + strlen(cStr)); + + StringRef instName; + SMLoc instLoc; + + SourceMgr sourceMgr; + sourceMgr.AddNewSourceBuffer(buf, SMLoc()); // ownership of buf handed over + MCContext context; + OwningPtr streamer + (createNullStreamer(context)); + AsmParser genericParser(sourceMgr, context, *streamer, *AsmInfo); + OwningPtr specificParser + (Tgt->createAsmParser(genericParser)); + + AsmToken OpcodeToken = genericParser.Lex(); + + if(OpcodeToken.is(AsmToken::Identifier)) { + instName = OpcodeToken.getString(); + instLoc = OpcodeToken.getLoc(); + if (specificParser->ParseInstruction(instName, instLoc, operands)) + ret = -1; + } + else { + ret = -1; + } + + SmallVectorImpl::iterator oi; + + for(oi = operands.begin(); oi != operands.end(); ++oi) { + printf("Operand start %p, end %p\n", + (*oi)->getStartLoc().getPointer(), + (*oi)->getEndLoc().getPointer()); + } + + ParserMutex.acquire(); + + if (!ret) { + GenericAsmLexer->setBuffer(buf); + + while (SpecificAsmLexer->Lex(), + SpecificAsmLexer->isNot(AsmToken::Eof) && + SpecificAsmLexer->isNot(AsmToken::EndOfStatement)) { + if (SpecificAsmLexer->is(AsmToken::Error)) { + ret = -1; + break; + } + tokens.push_back(SpecificAsmLexer->getTok()); + } + } + + ParserMutex.release(); + + return ret; +} + +int EDDisassembler::llvmSyntaxVariant() const { + return LLVMSyntaxVariant; +} Added: llvm/trunk/tools/ed/EDDisassembler.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EDDisassembler.h?rev=94974&view=auto ============================================================================== --- llvm/trunk/tools/ed/EDDisassembler.h (added) +++ llvm/trunk/tools/ed/EDDisassembler.h Mon Feb 1 02:49:35 2010 @@ -0,0 +1,248 @@ +//===-EDDisassembler.h - LLVM Enhanced Disassembler -------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the interface for the Enhanced Disassembly library's +// disassembler class. The disassembler is responsible for vending individual +// instructions according to a given architecture and disassembly syntax. +// +//===----------------------------------------------------------------------===// + +#ifndef EDDisassembler_ +#define EDDisassembler_ + +#include "EDInfo.inc" + +#include "llvm-c/EnhancedDisassembly.h" + +#include "llvm/ADT/OwningPtr.h" +#include "llvm/ADT/Triple.h" +#include "llvm/Support/raw_ostream.h" +#include "llvm/System/Mutex.h" + +#include +#include +#include +#include + +namespace llvm { +class AsmLexer; +class AsmToken; +class MCContext; +class MCAsmInfo; +class MCAsmLexer; +class AsmParser; +class TargetAsmLexer; +class TargetAsmParser; +class MCDisassembler; +class MCInstPrinter; +class MCInst; +class MCParsedAsmOperand; +class MCStreamer; +template class SmallVectorImpl; +class SourceMgr; +class Target; +class TargetRegisterInfo; +} + +/// EDDisassembler - Encapsulates a disassembler for a single architecture and +/// disassembly syntax. Also manages the static disassembler registry. +struct EDDisassembler { + //////////////////// + // Static members // + //////////////////// + + /// CPUKey - Encapsulates the descriptor of an architecture/disassembly-syntax + /// pair + struct CPUKey { + /// The architecture type + llvm::Triple::ArchType Arch; + + /// The assembly syntax + EDAssemblySyntax_t Syntax; + + /// operator== - Equality operator + bool operator==(const CPUKey &key) const { + return (Arch == key.Arch && + Syntax == key.Syntax); + } + + /// operator< - Less-than operator + bool operator<(const CPUKey &key) const { + if(Arch > key.Arch) + return false; + if(Syntax >= key.Syntax) + return false; + return true; + } + }; + + typedef std::map DisassemblerMap_t; + + /// True if the disassembler registry has been initialized; false if not + static bool sInitialized; + /// A map from disassembler specifications to disassemblers. Populated + /// lazily. + static DisassemblerMap_t sDisassemblers; + + /// getDisassembler - Returns the specified disassemble, or NULL on failure + /// + /// @arg arch - The desired architecture + /// @arg syntax - The desired disassembly syntax + static EDDisassembler *getDisassembler(llvm::Triple::ArchType arch, + EDAssemblySyntax_t syntax); + + /// getDisassembler - Returns the disassembler for a given combination of + /// CPU type, CPU subtype, and assembly syntax, or NULL on failure + /// + /// @arg str - The string representation of the architecture triple, e.g., + /// "x86_64-apple-darwin" + /// @arg syntax - The disassembly syntax for the required disassembler + static EDDisassembler *getDisassembler(llvm::StringRef str, + EDAssemblySyntax_t syntax); + + /// initialize - Initializes the disassembler registry and the LLVM backend + static void initialize(); + + //////////////////////// + // Per-object members // + //////////////////////// + + /// True only if the object has been fully and successfully initialized + bool Valid; + + /// The string that stores disassembler errors from the backend + std::string ErrorString; + /// The stream that wraps the ErrorString + llvm::raw_string_ostream ErrorStream; + + /// The architecture/syntax pair for the current architecture + CPUKey Key; + /// The LLVM target corresponding to the disassembler + const llvm::Target *Tgt; + /// The assembly information for the target architecture + llvm::OwningPtr AsmInfo; + /// The disassembler for the target architecture + llvm::OwningPtr Disassembler; + /// The output string for the instruction printer; must be guarded with + /// PrinterMutex + llvm::OwningPtr InstString; + /// The output stream for the disassembler; must be guarded with + /// PrinterMutex + llvm::OwningPtr InstStream; + /// The instruction printer for the target architecture; must be guarded with + /// PrinterMutex when printing + llvm::OwningPtr InstPrinter; + /// The mutex that guards the instruction printer's printing functions, which + /// use a shared stream + llvm::sys::Mutex PrinterMutex; + /// The array of instruction information provided by the TableGen backend for + /// the target architecture + const InstInfo *InstInfos; + /// The target-specific lexer for use in tokenizing strings, in + /// target-independent and target-specific portions + llvm::OwningPtr GenericAsmLexer; + llvm::OwningPtr SpecificAsmLexer; + /// The guard for the above + llvm::sys::Mutex ParserMutex; + /// The LLVM number used for the target disassembly syntax variant + int LLVMSyntaxVariant; + + typedef std::vector regvec_t; + typedef std::map regrmap_t; + + /// A vector of registers for quick mapping from LLVM register IDs to names + regvec_t RegVec; + /// A map of registers for quick mapping from register names to LLVM IDs + regrmap_t RegRMap; + + /// A set of register IDs for aliases of the stack pointer for the current + /// architecture + std::set stackPointers; + /// A set of register IDs for aliases of the program counter for the current + /// architecture + std::set programCounters; + + /// Constructor - initializes a disassembler with all the necessary objects, + /// which come pre-allocated from the registry accessor function + /// + /// @arg key - the architecture and disassembly syntax for the + /// disassembler + EDDisassembler(CPUKey& key); + + /// valid - reports whether there was a failure in the constructor. + bool valid() { + return Valid; + } + + ~EDDisassembler(); + + /// createInst - creates and returns an instruction given a callback and + /// memory address, or NULL on failure + /// + /// @arg byteReader - A callback function that provides machine code bytes + /// @arg address - The address of the first byte of the instruction, + /// suitable for passing to byteReader + /// @arg arg - An opaque argument for byteReader + EDInst *createInst(EDByteReaderCallback byteReader, + uint64_t address, + void *arg); + + /// initMaps - initializes regVec and regRMap using the provided register + /// info + /// + /// @arg registerInfo - the register information to use as a source + void initMaps(const llvm::TargetRegisterInfo ®isterInfo); + /// nameWithRegisterID - Returns the name (owned by the EDDisassembler) of a + /// register for a given register ID, or NULL on failure + /// + /// @arg registerID - the ID of the register to be queried + const char *nameWithRegisterID(unsigned registerID) const; + /// registerIDWithName - Returns the ID of a register for a given register + /// name, or (unsigned)-1 on failure + /// + /// @arg name - The name of the register + unsigned registerIDWithName(const char *name) const; + + /// registerIsStackPointer - reports whether a register ID is an alias for the + /// stack pointer register + /// + /// @arg registerID - The LLVM register ID + bool registerIsStackPointer(unsigned registerID); + /// registerIsStackPointer - reports whether a register ID is an alias for the + /// stack pointer register + /// + /// @arg registerID - The LLVM register ID + bool registerIsProgramCounter(unsigned registerID); + + /// printInst - prints an MCInst to a string, returning 0 on success, or -1 + /// otherwise + /// + /// @arg str - A reference to a string which is filled in with the string + /// representation of the instruction + /// @arg inst - A reference to the MCInst to be printed + int printInst(std::string& str, + llvm::MCInst& inst); + + /// parseInst - extracts operands and tokens from a string for use in + /// tokenizing the string. Returns 0 on success, or -1 otherwise. + /// + /// @arg operands - A reference to a vector that will be filled in with the + /// parsed operands + /// @arg tokens - A reference to a vector that will be filled in with the + /// tokens + /// @arg str - The string representation of the instruction + int parseInst(llvm::SmallVectorImpl &operands, + llvm::SmallVectorImpl &tokens, + const std::string &str); + + /// llvmSyntaxVariant - returns the LLVM syntax variant for this disassembler + int llvmSyntaxVariant() const; +}; + +#endif Added: llvm/trunk/tools/ed/EDInst.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EDInst.cpp?rev=94974&view=auto ============================================================================== --- llvm/trunk/tools/ed/EDInst.cpp (added) +++ llvm/trunk/tools/ed/EDInst.cpp Mon Feb 1 02:49:35 2010 @@ -0,0 +1,205 @@ +//===-EDInst.cpp - LLVM Enhanced Disassembler -----------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements the Enhanced Disassembly library's instruction class. +// The instruction is responsible for vending the string representation, +// individual tokens, and operands for a single instruction. +// +//===----------------------------------------------------------------------===// + +#include "EDDisassembler.h" +#include "EDInst.h" +#include "EDOperand.h" +#include "EDToken.h" + +#include "llvm/MC/MCInst.h" + +using namespace llvm; + +EDInst::EDInst(llvm::MCInst *inst, + uint64_t byteSize, + EDDisassembler &disassembler, + const InstInfo *info) : + Disassembler(disassembler), + Inst(inst), + ThisInstInfo(info), + ByteSize(byteSize), + BranchTarget(-1), + MoveSource(-1), + MoveTarget(-1) { +} + +EDInst::~EDInst() { + unsigned int index; + unsigned int numOperands = Operands.size(); + + for (index = 0; index < numOperands; ++index) + delete Operands[index]; + + unsigned int numTokens = Tokens.size(); + + for (index = 0; index < numTokens; ++index) + delete Tokens[index]; + + delete Inst; +} + +uint64_t EDInst::byteSize() { + return ByteSize; +} + +int EDInst::stringify() { + if (StringifyResult.valid()) + return StringifyResult.result(); + + if (Disassembler.printInst(String, *Inst)) + return StringifyResult.setResult(-1); + + OperandOrder = ThisInstInfo->operandOrders[Disassembler.llvmSyntaxVariant()]; + + return StringifyResult.setResult(0); +} + +int EDInst::getString(const char*& str) { + if (stringify()) + return -1; + + str = String.c_str(); + + return 0; +} + +unsigned EDInst::instID() { + return Inst->getOpcode(); +} + +bool EDInst::isBranch() { + if (ThisInstInfo) + return ThisInstInfo->instructionFlags & kInstructionFlagBranch; + else + return false; +} + +bool EDInst::isMove() { + if (ThisInstInfo) + return ThisInstInfo->instructionFlags & kInstructionFlagMove; + else + return false; +} + +int EDInst::parseOperands() { + if (ParseResult.valid()) + return ParseResult.result(); + + if (!ThisInstInfo) + return ParseResult.setResult(-1); + + unsigned int opIndex; + unsigned int mcOpIndex = 0; + + for (opIndex = 0; opIndex < ThisInstInfo->numOperands; ++opIndex) { + if (isBranch() && + (ThisInstInfo->operandFlags[opIndex] & kOperandFlagTarget)) { + BranchTarget = opIndex; + } + else if (isMove()) { + if (ThisInstInfo->operandFlags[opIndex] & kOperandFlagSource) + MoveSource = opIndex; + else if (ThisInstInfo->operandFlags[opIndex] & kOperandFlagTarget) + MoveTarget = opIndex; + } + + EDOperand *operand = new EDOperand(Disassembler, *this, opIndex, mcOpIndex); + + Operands.push_back(operand); + } + + return ParseResult.setResult(0); +} + +int EDInst::branchTargetID() { + if (parseOperands()) + return -1; + return BranchTarget; +} + +int EDInst::moveSourceID() { + if (parseOperands()) + return -1; + return MoveSource; +} + +int EDInst::moveTargetID() { + if (parseOperands()) + return -1; + return MoveTarget; +} + +int EDInst::numOperands() { + if (parseOperands()) + return -1; + return Operands.size(); +} + +int EDInst::getOperand(EDOperand *&operand, unsigned int index) { + if (parseOperands()) + return -1; + + if (index >= Operands.size()) + return -1; + + operand = Operands[index]; + return 0; +} + +int EDInst::tokenize() { + if (TokenizeResult.valid()) + return TokenizeResult.result(); + + if (stringify()) + return TokenizeResult.setResult(-1); + + return TokenizeResult.setResult(EDToken::tokenize(Tokens, + String, + OperandOrder, + Disassembler)); + +} + +int EDInst::numTokens() { + if (tokenize()) + return -1; + return Tokens.size(); +} + +int EDInst::getToken(EDToken *&token, unsigned int index) { + if (tokenize()) + return -1; + token = Tokens[index]; + return 0; +} + +#ifdef __BLOCKS__ +int EDInst::visitTokens(EDTokenVisitor_t visitor) { + if (tokenize()) + return -1; + + tokvec_t::iterator iter; + + for (iter = Tokens.begin(); iter != Tokens.end(); ++iter) { + int ret = visitor(*iter); + if (ret == 1) + return 0; + if (ret != 0) + return -1; + } + + return 0; +} +#endif Added: llvm/trunk/tools/ed/EDInst.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EDInst.h?rev=94974&view=auto ============================================================================== --- llvm/trunk/tools/ed/EDInst.h (added) +++ llvm/trunk/tools/ed/EDInst.h Mon Feb 1 02:49:35 2010 @@ -0,0 +1,171 @@ +//===-EDInst.h - LLVM Enhanced Disassembler ---------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the interface for the Enhanced Disassembly library's +// instruction class. The instruction is responsible for vending the string +// representation, individual tokens and operands for a single instruction. +// +//===----------------------------------------------------------------------===// + +#ifndef EDInst_ +#define EDInst_ + +#include "llvm-c/EnhancedDisassembly.h" + +#include "llvm/ADT/SmallVector.h" + +#include +#include + +/// CachedResult - Encapsulates the result of a function along with the validity +/// of that result, so that slow functions don't need to run twice +struct CachedResult { + /// True if the result has been obtained by executing the function + bool Valid; + /// The result last obtained from the function + int Result; + + /// Constructor - Initializes an invalid result + CachedResult() : Valid(false) { } + /// valid - Returns true if the result has been obtained by executing the + /// function and false otherwise + bool valid() { return Valid; } + /// result - Returns the result of the function or an undefined value if + /// valid() is false + int result() { return Result; } + /// setResult - Sets the result of the function and declares it valid + /// returning the result (so that setResult() can be called from inside a + /// return statement) + /// @arg result - The result of the function + int setResult(int result) { Result = result; Valid = true; return result; } +}; + +/// EDInst - Encapsulates a single instruction, which can be queried for its +/// string representation, as well as its operands and tokens +struct EDInst { + /// The parent disassembler + EDDisassembler &Disassembler; + /// The containing MCInst + llvm::MCInst *Inst; + /// The instruction information provided by TableGen for this instruction + const InstInfo *ThisInstInfo; + /// The number of bytes for the machine code representation of the instruction + uint64_t ByteSize; + + /// The result of the stringify() function + CachedResult StringifyResult; + /// The string representation of the instruction + std::string String; + /// The order in which operands from the InstInfo's operand information appear + /// in String + const char* OperandOrder; + + /// The result of the parseOperands() function + CachedResult ParseResult; + typedef llvm::SmallVector opvec_t; + /// The instruction's operands + opvec_t Operands; + /// The operand corresponding to the target, if the instruction is a branch + int BranchTarget; + /// The operand corresponding to the source, if the instruction is a move + int MoveSource; + /// The operand corresponding to the target, if the instruction is a move + int MoveTarget; + + /// The result of the tokenize() function + CachedResult TokenizeResult; + typedef std::vector tokvec_t; + /// The instruction's tokens + tokvec_t Tokens; + + /// Constructor - initializes an instruction given the output of the LLVM + /// C++ disassembler + /// + /// @arg inst - The MCInst, which will now be owned by this object + /// @arg byteSize - The size of the consumed instruction, in bytes + /// @arg disassembler - The parent disassembler + /// @arg instInfo - The instruction information produced by the table + /// generator for this instruction + EDInst(llvm::MCInst *inst, + uint64_t byteSize, + EDDisassembler &disassembler, + const InstInfo *instInfo); + ~EDInst(); + + /// byteSize - returns the number of bytes consumed by the machine code + /// representation of the instruction + uint64_t byteSize(); + /// instID - returns the LLVM instruction ID of the instruction + unsigned instID(); + + /// stringify - populates the String and AsmString members of the instruction, + /// returning 0 on success or -1 otherwise + int stringify(); + /// getString - retrieves a pointer to the string representation of the + /// instructinon, returning 0 on success or -1 otherwise + /// + /// @arg str - A reference to a pointer that, on success, is set to point to + /// the string representation of the instruction; this string is still owned + /// by the instruction and will be deleted when it is + int getString(const char *&str); + + /// isBranch - Returns true if the instruction is a branch + bool isBranch(); + /// isMove - Returns true if the instruction is a move + bool isMove(); + + /// parseOperands - populates the Operands member of the instruction, + /// returning 0 on success or -1 otherwise + int parseOperands(); + /// branchTargetID - returns the ID (suitable for use with getOperand()) of + /// the target operand if the instruction is a branch, or -1 otherwise + int branchTargetID(); + /// moveSourceID - returns the ID of the source operand if the instruction + /// is a move, or -1 otherwise + int moveSourceID(); + /// moveTargetID - returns the ID of the target operand if the instruction + /// is a move, or -1 otherwise + int moveTargetID(); + + /// numOperands - returns the number of operands available to retrieve, or -1 + /// on error + int numOperands(); + /// getOperand - retrieves an operand from the instruction's operand list by + /// index, returning 0 on success or -1 on error + /// + /// @arg operand - A reference whose target is pointed at the operand on + /// success, although the operand is still owned by the EDInst + /// @arg index - The index of the operand in the instruction + int getOperand(EDOperand *&operand, unsigned int index); + + /// tokenize - populates the Tokens member of the instruction, returning 0 on + /// success or -1 otherwise + int tokenize(); + /// numTokens - returns the number of tokens in the instruction, or -1 on + /// error + int numTokens(); + /// getToken - retrieves a token from the instruction's token list by index, + /// returning 0 on success or -1 on error + /// + /// @arg token - A reference whose target is pointed at the token on success, + /// although the token is still owned by the EDInst + /// @arg index - The index of the token in the instrcutino + int getToken(EDToken *&token, unsigned int index); + +#ifdef __BLOCKS__ + /// visitTokens - Visits each token in turn and applies a block to it, + /// returning 0 if all blocks are visited and/or the block signals + /// termination by returning 1; returns -1 on error + /// + /// @arg visitor - The visitor block to apply to all tokens. + int visitTokens(EDTokenVisitor_t visitor); +#endif +}; + +#endif Modified: llvm/trunk/tools/ed/EDMain.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EDMain.cpp?rev=94974&r1=94973&r2=94974&view=diff ============================================================================== --- llvm/trunk/tools/ed/EDMain.cpp (original) +++ llvm/trunk/tools/ed/EDMain.cpp Mon Feb 1 02:49:35 2010 @@ -11,10 +11,241 @@ // //===----------------------------------------------------------------------===// -#include +#include "EDDisassembler.h" +#include "EDInst.h" +#include "EDOperand.h" +#include "EDToken.h" + +#include "llvm-c/EnhancedDisassembly.h" int EDGetDisassembler(EDDisassemblerRef *disassembler, const char *triple, EDAssemblySyntax_t syntax) { - return -1; + EDDisassembler::initialize(); + + EDDisassemblerRef ret = EDDisassembler::getDisassembler(triple, + syntax); + + if (ret) { + *disassembler = ret; + return 0; + } + else { + return -1; + } +} + +int EDGetRegisterName(const char** regName, + EDDisassemblerRef disassembler, + unsigned regID) { + const char* name = disassembler->nameWithRegisterID(regID); + if(!name) + return -1; + *regName = name; + return 0; +} + +int EDRegisterIsStackPointer(EDDisassemblerRef disassembler, + unsigned regID) { + return disassembler->registerIsStackPointer(regID) ? 1 : 0; +} + +int EDRegisterIsProgramCounter(EDDisassemblerRef disassembler, + unsigned regID) { + return disassembler->registerIsProgramCounter(regID) ? 1 : 0; +} + +unsigned int EDCreateInsts(EDInstRef *insts, + unsigned int count, + EDDisassemblerRef disassembler, + EDByteReaderCallback byteReader, + uint64_t address, + void *arg) { + unsigned int index; + + for (index = 0; index < count; index++) { + EDInst *inst = disassembler->createInst(byteReader, address, arg); + + if(!inst) + return index; + + insts[index] = inst; + address += inst->byteSize(); + } + + return count; +} + +void EDReleaseInst(EDInstRef inst) { + delete inst; +} + +int EDInstByteSize(EDInstRef inst) { + return inst->byteSize(); +} + +int EDGetInstString(const char **buf, + EDInstRef inst) { + return inst->getString(*buf); +} + +int EDInstID(unsigned *instID, EDInstRef inst) { + *instID = inst->instID(); + return 0; +} + +int EDInstIsBranch(EDInstRef inst) { + return inst->isBranch(); +} + +int EDInstIsMove(EDInstRef inst) { + return inst->isMove(); +} + +int EDBranchTargetID(EDInstRef inst) { + return inst->branchTargetID(); +} + +int EDMoveSourceID(EDInstRef inst) { + return inst->moveSourceID(); +} + +int EDMoveTargetID(EDInstRef inst) { + return inst->moveTargetID(); +} + +int EDNumTokens(EDInstRef inst) { + return inst->numTokens(); +} + +int EDGetToken(EDTokenRef *token, + EDInstRef inst, + int index) { + return inst->getToken(*token, index); +} + +int EDGetTokenString(const char **buf, + EDTokenRef token) { + return token->getString(*buf); +} + +int EDOperandIndexForToken(EDTokenRef token) { + return token->operandID(); +} + +int EDTokenIsWhitespace(EDTokenRef token) { + if(token->type() == EDToken::kTokenWhitespace) + return 1; + else + return 0; +} + +int EDTokenIsPunctuation(EDTokenRef token) { + if(token->type() == EDToken::kTokenPunctuation) + return 1; + else + return 0; +} + +int EDTokenIsOpcode(EDTokenRef token) { + if(token->type() == EDToken::kTokenOpcode) + return 1; + else + return 0; +} + +int EDTokenIsLiteral(EDTokenRef token) { + if(token->type() == EDToken::kTokenLiteral) + return 1; + else + return 0; +} + +int EDTokenIsRegister(EDTokenRef token) { + if(token->type() == EDToken::kTokenRegister) + return 1; + else + return 0; +} + +int EDTokenIsNegativeLiteral(EDTokenRef token) { + if(token->type() != EDToken::kTokenLiteral) + return -1; + + return token->literalSign(); +} + +int EDLiteralTokenAbsoluteValue(uint64_t *value, + EDTokenRef token) { + if(token->type() != EDToken::kTokenLiteral) + return -1; + + return token->literalAbsoluteValue(*value); +} + +int EDRegisterTokenValue(unsigned *registerID, + EDTokenRef token) { + if(token->type() != EDToken::kTokenRegister) + return -1; + + return token->registerID(*registerID); } + +int EDNumOperands(EDInstRef inst) { + return inst->numOperands(); +} + +int EDGetOperand(EDOperandRef *operand, + EDInstRef inst, + int index) { + return inst->getOperand(*operand, index); +} + +int EDEvaluateOperand(uint64_t *result, + EDOperandRef operand, + EDRegisterReaderCallback regReader, + void *arg) { + return operand->evaluate(*result, regReader, arg); +} + +#ifdef __BLOCKS__ + +struct ByteReaderWrapper { + EDByteBlock_t byteBlock; +}; + +static int readerWrapperCallback(uint8_t *byte, + uint64_t address, + void *arg) { + struct ByteReaderWrapper *wrapper = (struct ByteReaderWrapper *)arg; + return wrapper->byteBlock(byte, address); +} + +unsigned int EDBlockCreateInsts(EDInstRef *insts, + int count, + EDDisassemblerRef disassembler, + EDByteBlock_t byteBlock, + uint64_t address) { + struct ByteReaderWrapper wrapper; + wrapper.byteBlock = byteBlock; + + return EDCreateInsts(insts, + count, + disassembler, + readerWrapperCallback, + address, + (void*)&wrapper); +} + +int EDBlockEvaluateOperand(uint64_t *result, + EDOperandRef operand, + EDRegisterBlock_t regBlock) { + return operand->evaluate(*result, regBlock); +} + +int EDBlockVisitTokens(EDInstRef inst, + EDTokenVisitor_t visitor) { + return inst->visitTokens(visitor); +} + +#endif Added: llvm/trunk/tools/ed/EDOperand.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EDOperand.cpp?rev=94974&view=auto ============================================================================== --- llvm/trunk/tools/ed/EDOperand.cpp (added) +++ llvm/trunk/tools/ed/EDOperand.cpp Mon Feb 1 02:49:35 2010 @@ -0,0 +1,148 @@ +//===-EDOperand.cpp - LLVM Enhanced Disassembler --------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements the Enhanced Disassembly library's operand class. The +// operand is responsible for allowing evaluation given a particular register +// context. +// +//===----------------------------------------------------------------------===// + +#include "EDDisassembler.h" +#include "EDInst.h" +#include "EDOperand.h" + +#include "llvm/MC/MCInst.h" + +using namespace llvm; + +EDOperand::EDOperand(const EDDisassembler &disassembler, + const EDInst &inst, + unsigned int opIndex, + unsigned int &mcOpIndex) : + Disassembler(disassembler), + Inst(inst), + OpIndex(opIndex), + MCOpIndex(mcOpIndex) { + unsigned int numMCOperands = 0; + + if(Disassembler.Key.Arch == Triple::x86 || + Disassembler.Key.Arch == Triple::x86_64) { + uint8_t operandFlags = inst.ThisInstInfo->operandFlags[opIndex]; + + if (operandFlags & kOperandFlagImmediate) { + numMCOperands = 1; + } + else if (operandFlags & kOperandFlagRegister) { + numMCOperands = 1; + } + else if (operandFlags & kOperandFlagMemory) { + if (operandFlags & kOperandFlagPCRelative) { + numMCOperands = 1; + } + else { + numMCOperands = 5; + } + } + else if (operandFlags & kOperandFlagEffectiveAddress) { + numMCOperands = 4; + } + } + + mcOpIndex += numMCOperands; +} + +EDOperand::~EDOperand() { +} + +int EDOperand::evaluate(uint64_t &result, + EDRegisterReaderCallback callback, + void *arg) { + if (Disassembler.Key.Arch == Triple::x86 || + Disassembler.Key.Arch == Triple::x86_64) { + uint8_t operandFlags = Inst.ThisInstInfo->operandFlags[OpIndex]; + + if (operandFlags & kOperandFlagImmediate) { + result = Inst.Inst->getOperand(MCOpIndex).getImm(); + return 0; + } + if (operandFlags & kOperandFlagRegister) { + unsigned reg = Inst.Inst->getOperand(MCOpIndex).getReg(); + return callback(&result, reg, arg); + } + if (operandFlags & kOperandFlagMemory || + operandFlags & kOperandFlagEffectiveAddress){ + if(operandFlags & kOperandFlagPCRelative) { + int64_t displacement = Inst.Inst->getOperand(MCOpIndex).getImm(); + + uint64_t ripVal; + + // TODO fix how we do this + + if (callback(&ripVal, Disassembler.registerIDWithName("RIP"), arg)) + return -1; + + result = ripVal + displacement; + return 0; + } + else { + unsigned baseReg = Inst.Inst->getOperand(MCOpIndex).getReg(); + uint64_t scaleAmount = Inst.Inst->getOperand(MCOpIndex+1).getImm(); + unsigned indexReg = Inst.Inst->getOperand(MCOpIndex+2).getReg(); + int64_t displacement = Inst.Inst->getOperand(MCOpIndex+3).getImm(); + //unsigned segmentReg = Inst.Inst->getOperand(MCOpIndex+4).getReg(); + + uint64_t addr = 0; + + if(baseReg) { + uint64_t baseVal; + if (callback(&baseVal, baseReg, arg)) + return -1; + addr += baseVal; + } + + if(indexReg) { + uint64_t indexVal; + if (callback(&indexVal, indexReg, arg)) + return -1; + addr += (scaleAmount * indexVal); + } + + addr += displacement; + + result = addr; + return 0; + } + } + return -1; + } + + return -1; +} + +#ifdef __BLOCKS__ +struct RegisterReaderWrapper { + EDRegisterBlock_t regBlock; +}; + +int readerWrapperCallback(uint64_t *value, + unsigned regID, + void *arg) { + struct RegisterReaderWrapper *wrapper = (struct RegisterReaderWrapper *)arg; + return wrapper->regBlock(value, regID); +} + +int EDOperand::evaluate(uint64_t &result, + EDRegisterBlock_t regBlock) { + struct RegisterReaderWrapper wrapper; + wrapper.regBlock = regBlock; + return evaluate(result, + readerWrapperCallback, + (void*)&wrapper); +} +#endif Added: llvm/trunk/tools/ed/EDOperand.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EDOperand.h?rev=94974&view=auto ============================================================================== --- llvm/trunk/tools/ed/EDOperand.h (added) +++ llvm/trunk/tools/ed/EDOperand.h Mon Feb 1 02:49:35 2010 @@ -0,0 +1,65 @@ +//===-EDOperand.h - LLVM Enhanced Disassembler ------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the interface for the Enhanced Disassembly library's +// operand class. The operand is responsible for allowing evaluation given a +// particular register context. +// +//===----------------------------------------------------------------------===// + +#ifndef EDOperand_ +#define EDOperand_ + +#include "llvm-c/EnhancedDisassembly.h" + +/// EDOperand - Encapsulates a single operand, which can be evaluated by the +/// client +struct EDOperand { + /// The parent disassembler + const EDDisassembler &Disassembler; + /// The parent instruction + const EDInst &Inst; + + /// The index of the operand in the EDInst + unsigned int OpIndex; + /// The index of the first component of the operand in the MCInst + unsigned int MCOpIndex; + + /// Constructor - Initializes an EDOperand + /// + /// @arg disassembler - The disassembler responsible for the operand + /// @arg inst - The instruction containing this operand + /// @arg opIndex - The index of the operand in inst + /// @arg mcOpIndex - The index of the operand in the original MCInst + EDOperand(const EDDisassembler &disassembler, + const EDInst &inst, + unsigned int opIndex, + unsigned int &mcOpIndex); + ~EDOperand(); + + /// evaluate - Returns the numeric value of an operand to the extent possible, + /// returning 0 on success or -1 if there was some problem (such as a + /// register not being readable) + /// + /// @arg result - A reference whose target is filled in with the value of + /// the operand (the address if it is a memory operand) + /// @arg callback - A function to call to obtain register values + /// @arg arg - An opaque argument to pass to callback + int evaluate(uint64_t &result, + EDRegisterReaderCallback callback, + void *arg); + +#ifdef __BLOCKS__ + /// evaluate - Like evaluate for a callback, but uses a block instead + int evaluate(uint64_t &result, + EDRegisterBlock_t regBlock); +#endif +}; + +#endif Added: llvm/trunk/tools/ed/EDToken.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EDToken.cpp?rev=94974&view=auto ============================================================================== --- llvm/trunk/tools/ed/EDToken.cpp (added) +++ llvm/trunk/tools/ed/EDToken.cpp Mon Feb 1 02:49:35 2010 @@ -0,0 +1,185 @@ +//===-EDToken.cpp - LLVM Enhanced Disassembler ----------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements the Enhanced Disassembler library's token class. The +// token is responsible for vending information about the token, such as its +// type and logical value. +// +//===----------------------------------------------------------------------===// + +#include "EDDisassembler.h" +#include "EDToken.h" + +#include "llvm/ADT/SmallVector.h" +#include "llvm/MC/MCParser/MCAsmLexer.h" +#include "llvm/MC/MCParser/MCParsedAsmOperand.h" + +using namespace llvm; + +EDToken::EDToken(StringRef str, + enum tokenType type, + uint64_t localType, + EDDisassembler &disassembler) : + Disassembler(disassembler), + Str(str), + Type(type), + LocalType(localType), + OperandID(-1) { +} + +EDToken::~EDToken() { +} + +void EDToken::makeLiteral(bool sign, uint64_t absoluteValue) { + Type = kTokenLiteral; + LiteralSign = sign; + LiteralAbsoluteValue = absoluteValue; +} + +void EDToken::makeRegister(unsigned registerID) { + Type = kTokenRegister; + RegisterID = registerID; +} + +void EDToken::setOperandID(int operandID) { + OperandID = operandID; +} + +enum EDToken::tokenType EDToken::type() const { + return Type; +} + +uint64_t EDToken::localType() const { + return LocalType; +} + +StringRef EDToken::string() const { + return Str; +} + +int EDToken::operandID() const { + return OperandID; +} + +int EDToken::literalSign() const { + if(Type != kTokenLiteral) + return -1; + return (LiteralSign ? 1 : 0); +} + +int EDToken::literalAbsoluteValue(uint64_t &value) const { + if(Type != kTokenLiteral) + return -1; + value = LiteralAbsoluteValue; + return 0; +} + +int EDToken::registerID(unsigned ®isterID) const { + if(Type != kTokenRegister) + return -1; + registerID = RegisterID; + return 0; +} + +int EDToken::tokenize(std::vector &tokens, + std::string &str, + const char *operandOrder, + EDDisassembler &disassembler) { + SmallVector parsedOperands; + SmallVector asmTokens; + + disassembler.parseInst(parsedOperands, asmTokens, str); + + SmallVectorImpl::iterator operandIterator; + unsigned int operandIndex; + SmallVectorImpl::iterator tokenIterator; + + operandIterator = parsedOperands.begin(); + operandIndex = 0; + + bool readOpcode = false; + + for (tokenIterator = asmTokens.begin(); + tokenIterator != asmTokens.end(); + ++tokenIterator) { + SMLoc tokenLoc = tokenIterator->getLoc(); + + while (operandIterator != parsedOperands.end() && + tokenLoc.getPointer() > + (*operandIterator)->getEndLoc().getPointer()) { + ++operandIterator; + ++operandIndex; + } + + EDToken *token; + + switch (tokenIterator->getKind()) { + case AsmToken::Identifier: + if (!readOpcode) { + token = new EDToken(tokenIterator->getString(), + EDToken::kTokenOpcode, + (uint64_t)tokenIterator->getKind(), + disassembler); + readOpcode = true; + break; + } + // any identifier that isn't an opcode is mere punctuation; so we fall + // through + default: + token = new EDToken(tokenIterator->getString(), + EDToken::kTokenPunctuation, + (uint64_t)tokenIterator->getKind(), + disassembler); + break; + case AsmToken::Integer: + { + token = new EDToken(tokenIterator->getString(), + EDToken::kTokenLiteral, + (uint64_t)tokenIterator->getKind(), + disassembler); + + int64_t intVal = tokenIterator->getIntVal(); + + if(intVal < 0) + token->makeLiteral(true, -intVal); + else + token->makeLiteral(false, intVal); + break; + } + case AsmToken::Register: + { + token = new EDToken(tokenIterator->getString(), + EDToken::kTokenLiteral, + (uint64_t)tokenIterator->getKind(), + disassembler); + + token->makeRegister((unsigned)tokenIterator->getRegVal()); + break; + } + } + + if(operandIterator != parsedOperands.end() && + tokenLoc.getPointer() >= + (*operandIterator)->getStartLoc().getPointer()) { + token->setOperandID(operandOrder[operandIndex]); + } + + tokens.push_back(token); + } + + return 0; +} + +int EDToken::getString(const char*& buf) { + if(PermStr.length() == 0) { + PermStr = Str.str(); + } + buf = PermStr.c_str(); + return 0; +} Added: llvm/trunk/tools/ed/EDToken.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EDToken.h?rev=94974&view=auto ============================================================================== --- llvm/trunk/tools/ed/EDToken.h (added) +++ llvm/trunk/tools/ed/EDToken.h Mon Feb 1 02:49:35 2010 @@ -0,0 +1,135 @@ +//===-EDToken.h - LLVM Enhanced Disassembler --------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the interface for the Enhanced Disassembly library's token +// class. The token is responsible for vending information about the token, +// such as its type and logical value. +// +//===----------------------------------------------------------------------===// + +#ifndef EDToken_ +#define EDToken_ + +#include "llvm-c/EnhancedDisassembly.h" +#include "llvm/ADT/StringRef.h" + +#include +#include + +/// EDToken - Encapsulates a single token, which can provide a string +/// representation of itself or interpret itself in various ways, depending +/// on the token type. +struct EDToken { + enum tokenType { + kTokenWhitespace, + kTokenOpcode, + kTokenLiteral, + kTokenRegister, + kTokenPunctuation + }; + + /// The parent disassembler + EDDisassembler &Disassembler; + + /// The token's string representation + llvm::StringRef Str; + /// The token's string representation, but in a form suitable for export + std::string PermStr; + /// The type of the token, as exposed through the external API + enum tokenType Type; + /// The type of the token, as recorded by the syntax-specific tokenizer + uint64_t LocalType; + /// The operand corresponding to the token, or (unsigned int)-1 if not + /// part of an operand. + int OperandID; + + /// The sign if the token is a literal (1 if negative, 0 otherwise) + bool LiteralSign; + /// The absolute value if the token is a literal + uint64_t LiteralAbsoluteValue; + /// The LLVM register ID if the token is a register name + unsigned RegisterID; + + /// Constructor - Initializes an EDToken with the information common to all + /// tokens + /// + /// @arg str - The string corresponding to the token + /// @arg type - The token's type as exposed through the public API + /// @arg localType - The token's type as recorded by the tokenizer + /// @arg disassembler - The disassembler responsible for the token + EDToken(llvm::StringRef str, + enum tokenType type, + uint64_t localType, + EDDisassembler &disassembler); + + /// makeLiteral - Adds the information specific to a literal + /// @arg sign - The sign of the literal (1 if negative, 0 + /// otherwise) + /// + /// @arg absoluteValue - The absolute value of the literal + void makeLiteral(bool sign, uint64_t absoluteValue); + /// makeRegister - Adds the information specific to a register + /// + /// @arg registerID - The LLVM register ID + void makeRegister(unsigned registerID); + + /// setOperandID - Links the token to a numbered operand + /// + /// @arg operandID - The operand ID to link to + void setOperandID(int operandID); + + ~EDToken(); + + /// type - Returns the public type of the token + enum tokenType type() const; + /// localType - Returns the tokenizer-specific type of the token + uint64_t localType() const; + /// string - Returns the string representation of the token + llvm::StringRef string() const; + /// operandID - Returns the operand ID of the token + int operandID() const; + + /// literalSign - Returns the sign of the token + /// (1 if negative, 0 if positive or unsigned, -1 if it is not a literal) + int literalSign() const; + /// literalAbsoluteValue - Retrieves the absolute value of the token, and + /// returns -1 if the token is not a literal + /// @arg value - A reference to a value that is filled in with the absolute + /// value, if it is valid + int literalAbsoluteValue(uint64_t &value) const; + /// registerID - Retrieves the register ID of the token, and returns -1 if the + /// token is not a register + /// + /// @arg registerID - A reference to a value that is filled in with the + /// register ID, if it is valid + int registerID(unsigned ®isterID) const; + + /// tokenize - Tokenizes a string using the platform- and syntax-specific + /// tokenizer, and returns 0 on success (-1 on failure) + /// + /// @arg tokens - A vector that will be filled in with pointers to + /// allocated tokens + /// @arg str - The string, as outputted by the AsmPrinter + /// @arg operandOrder - The order of the operands from the operandFlags array + /// as they appear in str + /// @arg disassembler - The disassembler for the desired target and + // assembly syntax + static int tokenize(std::vector &tokens, + std::string &str, + const char *operandOrder, + EDDisassembler &disassembler); + + /// getString - Directs a character pointer to the string, returning 0 on + /// success (-1 on failure) + /// @arg buf - A reference to a pointer that is set to point to the string. + /// The string is still owned by the token. + int getString(const char*& buf); +}; + +#endif Modified: llvm/trunk/tools/ed/EnhancedDisassembly.exports URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EnhancedDisassembly.exports?rev=94974&r1=94973&r2=94974&view=diff ============================================================================== --- llvm/trunk/tools/ed/EnhancedDisassembly.exports (original) +++ llvm/trunk/tools/ed/EnhancedDisassembly.exports Mon Feb 1 02:49:35 2010 @@ -1 +1,31 @@ _EDGetDisassembler +_EDGetRegisterName +_EDRegisterIsStackPointer +_EDRegisterIsProgramCounter +_EDCreateInsts +_EDReleaseInst +_EDInstByteSize +_EDGetInstString +_EDInstIsBranch +_EDInstIsMove +_EDBranchTargetID +_EDMoveSourceID +_EDMoveTargetID +_EDNumTokens +_EDGetToken +_EDGetTokenString +_EDOperandIndexForToken +_EDTokenIsWhitespace +_EDTokenIsPunctuation +_EDTokenIsOpcode +_EDTokenIsLiteral +_EDTokenIsRegister +_EDTokenIsNegativeLiteral +_EDLiteralTokenAbsoluteValue +_EDRegisterTokenValue +_EDNumOperands +_EDGetOperand +_EDEvaluateOperand +_EDBlockCreateInsts +_EDBlockEvaluateOperand +_EDBlockVisitTokens From scallanan at apple.com Mon Feb 1 03:02:24 2010 From: scallanan at apple.com (Sean Callanan) Date: Mon, 01 Feb 2010 09:02:24 -0000 Subject: [llvm-commits] [llvm] r94975 - /llvm/trunk/tools/ed/EDDisassembler.cpp Message-ID: <201002010902.o1192OvH005054@zion.cs.uiuc.edu> Author: spyffe Date: Mon Feb 1 03:02:24 2010 New Revision: 94975 URL: http://llvm.org/viewvc/llvm-project?rev=94975&view=rev Log: Whoops, left some debugging code in that broke a buildbot. Removed. Modified: llvm/trunk/tools/ed/EDDisassembler.cpp Modified: llvm/trunk/tools/ed/EDDisassembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EDDisassembler.cpp?rev=94975&r1=94974&r2=94975&view=diff ============================================================================== --- llvm/trunk/tools/ed/EDDisassembler.cpp (original) +++ llvm/trunk/tools/ed/EDDisassembler.cpp Mon Feb 1 03:02:24 2010 @@ -411,14 +411,6 @@ ret = -1; } - SmallVectorImpl::iterator oi; - - for(oi = operands.begin(); oi != operands.end(); ++oi) { - printf("Operand start %p, end %p\n", - (*oi)->getStartLoc().getPointer(), - (*oi)->getEndLoc().getPointer()); - } - ParserMutex.acquire(); if (!ret) { From xuzhongxing at gmail.com Mon Feb 1 04:43:31 2010 From: xuzhongxing at gmail.com (Zhongxing Xu) Date: Mon, 01 Feb 2010 10:43:31 -0000 Subject: [llvm-commits] [llvm] r94976 - in /llvm/trunk/include/llvm/ADT: ImmutableIntervalMap.h ImmutableMap.h ImmutableSet.h Message-ID: <201002011043.o11AhWVH015436@zion.cs.uiuc.edu> Author: zhongxingxu Date: Mon Feb 1 04:43:31 2010 New Revision: 94976 URL: http://llvm.org/viewvc/llvm-project?rev=94976&view=rev Log: Add an immutable interval map, prepared to be used by flat memory model in the analyzer. WIP. Added: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Modified: llvm/trunk/include/llvm/ADT/ImmutableMap.h llvm/trunk/include/llvm/ADT/ImmutableSet.h Added: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h?rev=94976&view=auto ============================================================================== --- llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h (added) +++ llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Mon Feb 1 04:43:31 2010 @@ -0,0 +1,199 @@ +//===--- ImmutableIntervalMap.h - Immutable (functional) map ---*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the ImmutableIntervalMap class. +// +//===----------------------------------------------------------------------===// +#include "llvm/ADT/ImmutableMap.h" + +namespace llvm { + +class Interval { +private: + uint64_t Start; + uint64_t End; + +public: + Interval(uint64_t S, uint64_t E) : Start(S), End(E) {} + + uint64_t getStart() const { return Start; } + uint64_t getEnd() const { return End; } +}; + +template +struct ImutIntervalInfo { + typedef const std::pair value_type; + typedef const value_type &value_type_ref; + typedef const Interval key_type; + typedef const Interval &key_type_ref; + typedef const T data_type; + typedef const T &data_type_ref; + + static key_type_ref KeyOfValue(value_type_ref V) { + return V.first; + } + + static data_type_ref DataOfValue(value_type_ref V) { + return V.second; + } + + static bool isEqual(key_type_ref L, key_type_ref R) { + return L.getStart() == R.getStart() && L.getEnd() == R.getEnd(); + } + + static bool isDataEqual(data_type_ref L, data_type_ref R) { + return ImutContainerInfo::isEqual(L,R); + } + + static bool isLess(key_type_ref L, key_type_ref R) { + // Assume L and R does not overlap. + if (L.getStart() < R.getStart()) { + assert(L.getEnd() < R.getStart()); + return true; + } else if (L.getStart() == R.getStart()) { + assert(L.getEnd() == R.getEnd()); + return false; + } else { + assert(L.getStart() > R.getEnd()); + return false; + } + } + + static void Profile(FoldingSetNodeID &ID, value_type_ref V) { + ID.AddInteger(V.first.getStart()); + ID.AddInteger(V.first.getEnd()); + ImutProfileInfo::Profile(ID, V.second); + } +}; + +template class ImutIntervalAVLFactory; + +template +class ImutIntervalAVLFactory : public ImutAVLFactory { + typedef ImutAVLTree TreeTy; + typedef typename ImutInfo::value_type value_type; + typedef typename ImutInfo::value_type_ref value_type_ref; + typedef typename ImutInfo::key_type key_type; + typedef typename ImutInfo::key_type_ref key_type_ref; + typedef typename ImutInfo::data_type data_type; + typedef typename ImutInfo::data_type_ref data_type_ref; + +public: + TreeTy *Add(TreeTy* T, value_type_ref V) { + T = Add_internal(V,T); + MarkImmutable(T); + return T; + } + +private: + TreeTy *Add_internal(value_type_ref V, TreeTy *T) { + if (isEmpty(T)) + return CreateNode(NULL, V, NULL); + + assert(!T->isMutable()); + + key_type_ref K = ImutInfo::KeyOfValue(V); + key_type_ref KCurrent = ImutInfo::KeyOfValue(Value(T)); + + T = RemoveAllOverlaps(T, K); + + if (ImutInfo::isLess(K, KCurrent)) + return Balance(Add_internal(V, Left(T)), Value(T), Right(T)); + else + return Balance(Left(T), Value(T), Add_internal(V, Right(T))); + } + + // Remove all overlaps from T. + TreeTy *RemoveAllOverlaps(TreeTy *T, key_type_ref K) { + TreeTy *OldTree, *NewTree; + NewTree = T; + do { + OldTree = NewTree; + NewTree = RemoveOverlap(OldTree, K); + } while (NewTree != OldTree); + } + + // Remove one overlap from T. + TreeTy *RemoveOverlap(TreeTy *T, key_type_ref K) { + Interval CurrentK = ImutInfo::KeyOfValue(Value(T)); + + // If current key does not overlap the inserted key. + if (CurrentK.getStart() > K.getEnd()) + return RemoveOverlap(Left(T), K); + else if (CurrentK.getEnd() < K.getStart()) + return RemoveOverlap(Right(T), K); + + // Current key overlaps with the inserted key. + // Remove the current key. + T = Remove_internal(CurrentK, T); + // Add back the unoverlapped part of the current key. + if (CurrentK.getStart() < K.getStart()) { + if (CurrentK.getEnd() <= K.getEnd()) { + Interval NewK(CurrentK.getStart(), K.getStart()-1); + return Add_internal(std::make_pair(NewK, + ImutInfo::DataOfValue(Value(T))), T); + } else { + Interval NewK1(CurrentK.getStart(), K.getStart()-1); + T = Add_internal(std::make_pair(NewK1, + ImutInfo::DataOfValue(Value(T))), T); + + Interval NewK2(K.getEnd()+1, CurrentK.getEnd()); + return Add_internal(std::make_pair(NewK2, + ImutInfo::DataOfValue(Value(T))), T); + } + } else { + if (CurrentK.getEnd() > K.getEnd()) { + Interval NewK(K.getEnd()+1, CurrentK.getEnd()); + return Add_internal(std::make_pair(NewK, + ImutInfo::DataOfValue(Value(T))), T); + } + } + } +}; + +/// ImmutableIntervalMap maps an interval [start, end] to a value. The intervals +/// in the map are guaranteed to be disjoint. +template +class ImmutableIntervalMap + : public ImmutableMap > { + + typedef typename ImutIntervalInfo::value_type value_type; + typedef typename ImutIntervalInfo::value_type_ref value_type_ref; + typedef typename ImutIntervalInfo::key_type key_type; + typedef typename ImutIntervalInfo::key_type_ref key_type_ref; + typedef typename ImutIntervalInfo::data_type data_type; + typedef typename ImutIntervalInfo::data_type_ref data_type_ref; + typedef ImutAVLTree > TreeTy; + +public: + explicit ImmutableIntervalMap(TreeTy *R) + : ImmutableMap >(R) {} + + class Factory { + ImutIntervalAVLFactory > F; + + public: + ImmutableIntervalMap GetEmptyMap() { + return ImmutableIntervalMap(F.GetEmptyTree()); + } + + ImmutableIntervalMap Add(ImmutableIntervalMap Old, + key_type_ref K, data_type_ref D) { + TreeTy *T = F.Add(Old.Root, std::make_pair(K, D)); + return ImmutableIntervalMap(F.GetCanonicalTree(T)); + } + + ImmutableIntervalMap Remove(ImmutableIntervalMap Old, key_type_ref K) { + TreeTy *T = F.Remove(Old.Root, K); + return ImmutableIntervalMap(F.GetCanonicalTree(T)); + } + }; +}; + +} // end namespace llvm Modified: llvm/trunk/include/llvm/ADT/ImmutableMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableMap.h?rev=94976&r1=94975&r2=94976&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/ImmutableMap.h (original) +++ llvm/trunk/include/llvm/ADT/ImmutableMap.h Mon Feb 1 04:43:31 2010 @@ -68,7 +68,7 @@ typedef typename ValInfo::data_type_ref data_type_ref; typedef ImutAVLTree TreeTy; -private: +protected: TreeTy* Root; public: Modified: llvm/trunk/include/llvm/ADT/ImmutableSet.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableSet.h?rev=94976&r1=94975&r2=94976&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/ImmutableSet.h (original) +++ llvm/trunk/include/llvm/ADT/ImmutableSet.h Mon Feb 1 04:43:31 2010 @@ -27,6 +27,7 @@ //===----------------------------------------------------------------------===// template class ImutAVLFactory; +template class ImutIntervalAVLFactory; template class ImutAVLTreeInOrderIterator; template class ImutAVLTreeGenericIterator; @@ -39,6 +40,7 @@ typedef ImutAVLFactory Factory; friend class ImutAVLFactory; + friend class ImutIntervalAVLFactory; friend class ImutAVLTreeGenericIterator; friend class FoldingSet; @@ -389,7 +391,7 @@ // These have succinct names so that the balancing code // is as terse (and readable) as possible. //===--------------------------------------------------===// -private: +protected: bool isEmpty(TreeTy* T) const { return !T; } unsigned Height(TreeTy* T) const { return T ? T->getHeight() : 0; } From bruno.cardoso at gmail.com Mon Feb 1 06:16:39 2010 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Mon, 01 Feb 2010 12:16:39 -0000 Subject: [llvm-commits] [llvm] r94977 - /llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp Message-ID: <201002011216.o11CGexE019263@zion.cs.uiuc.edu> Author: bruno Date: Mon Feb 1 06:16:39 2010 New Revision: 94977 URL: http://llvm.org/viewvc/llvm-project?rev=94977&view=rev Log: MulOp is actually a Mips specific node, so do the match using Opcode. This fixes PR6192 Modified: llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp?rev=94977&r1=94976&r2=94977&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp Mon Feb 1 06:16:39 2010 @@ -426,7 +426,7 @@ SDValue InFlag = SDValue(MulNode, 0); - if (MulOp == ISD::MUL) + if (Opcode == ISD::MUL) return CurDAG->getMachineNode(Mips::MFLO, dl, MVT::i32, InFlag); else return CurDAG->getMachineNode(Mips::MFHI, dl, MVT::i32, InFlag); From baldrick at free.fr Mon Feb 1 06:53:02 2010 From: baldrick at free.fr (Duncan Sands) Date: Mon, 01 Feb 2010 12:53:02 -0000 Subject: [llvm-commits] [dragonegg] r94978 - in /dragonegg/trunk: llvm-convert.cpp llvm-internal.h Message-ID: <201002011253.o11Cr3Dd020536@zion.cs.uiuc.edu> Author: baldrick Date: Mon Feb 1 06:53:02 2010 New Revision: 94978 URL: http://llvm.org/viewvc/llvm-project?rev=94978&view=rev Log: Factor code. Modified: dragonegg/trunk/llvm-convert.cpp dragonegg/trunk/llvm-internal.h Modified: dragonegg/trunk/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=94978&r1=94977&r2=94978&view=diff ============================================================================== --- dragonegg/trunk/llvm-convert.cpp (original) +++ dragonegg/trunk/llvm-convert.cpp Mon Feb 1 06:53:02 2010 @@ -1329,6 +1329,42 @@ return Builder.CreateCast(opcode, V, Ty); } +/// CreateAnyAdd - Add two LLVM scalar values with the given GCC type. Does not +/// support complex numbers. The type is used to set overflow flags. +Value *TreeToLLVM::CreateAnyAdd(Value *LHS, Value *RHS, tree_node *type) { + if (FLOAT_TYPE_P(type)) + return Builder.CreateFAdd(LHS, RHS); + if (TYPE_OVERFLOW_WRAPS(type)) + return Builder.CreateAdd(LHS, RHS); +// if (TYPE_UNSIGNED(type)) +// return Builder.CreateNUWAdd(LHS, RHS); + return Builder.CreateNSWAdd(LHS, RHS); +} + +/// CreateAnyMul - Multiply two LLVM scalar values with the given GCC type. +/// Does not support complex numbers. The type is used to set overflow flags. +Value *TreeToLLVM::CreateAnyMul(Value *LHS, Value *RHS, tree_node *type) { + if (FLOAT_TYPE_P(type)) + return Builder.CreateFMul(LHS, RHS); + if (TYPE_OVERFLOW_WRAPS(type)) + return Builder.CreateMul(LHS, RHS); +// if (TYPE_UNSIGNED(type)) +// return Builder.CreateNUWMul(LHS, RHS); + return Builder.CreateNSWMul(LHS, RHS); +} + +/// CreateAnySub - Subtract two LLVM scalar values with the given GCC type. +/// Does not support complex numbers. The type is used to set overflow flags. +Value *TreeToLLVM::CreateAnySub(Value *LHS, Value *RHS, tree_node *type) { + if (FLOAT_TYPE_P(type)) + return Builder.CreateFSub(LHS, RHS); + if (TYPE_OVERFLOW_WRAPS(type)) + return Builder.CreateSub(LHS, RHS); +// if (TYPE_UNSIGNED(type)) +// return Builder.CreateNUWSub(LHS, RHS); + return Builder.CreateNSWSub(LHS, RHS); +} + /// CreateTemporary - Create a new alloca instruction of the specified type, /// inserting it into the entry block and returning it. The resulting /// instruction's type is a pointer to the specified type. @@ -6302,26 +6338,13 @@ Value *RHSr, *RHSi; SplitComplex(RHS, RHSr, RHSi, elt_type); // (a+ib) - (c+id) = (a-c) + i(b-d) - if (LHSr->getType()->isFloatingPoint()) { - LHSr = Builder.CreateFSub(LHSr, RHSr); - LHSi = Builder.CreateFSub(LHSi, RHSi); - } else if (TYPE_OVERFLOW_WRAPS(elt_type)) { - LHSr = Builder.CreateSub(LHSr, RHSr); - LHSi = Builder.CreateSub(LHSi, RHSi); - } else { - LHSr = Builder.CreateNSWSub(LHSr, RHSr); - LHSi = Builder.CreateNSWSub(LHSi, RHSi); - } + LHSr = CreateAnySub(LHSr, RHSr, elt_type); + LHSi = CreateAnySub(LHSi, RHSi, elt_type); return CreateComplex(LHSr, LHSi, elt_type); } - if (LHS->getType()->isFPOrFPVector()) - return Builder.CreateFSub(LHS, RHS); - else if (TYPE_OVERFLOW_WRAPS(type)) - return Builder.CreateSub(LHS, RHS); - else - return Builder.CreateNSWSub(LHS, RHS); + return CreateAnySub(LHS, RHS, type); } Value *TreeToLLVM::EmitReg_MULT_EXPR(tree op0, tree op1) { @@ -6336,7 +6359,7 @@ Value *DSTr, *DSTi; // (a+ib) * (c+id) = (ac-bd) + i(ad+cb) - if (LHSr->getType()->isFloatingPoint()) { + if (SCALAR_FLOAT_TYPE_P(elt_type)) { Value *Tmp1 = Builder.CreateFMul(LHSr, RHSr); // a*c Value *Tmp2 = Builder.CreateFMul(LHSi, RHSi); // b*d DSTr = Builder.CreateFSub(Tmp1, Tmp2); // ac-bd @@ -6361,12 +6384,7 @@ return CreateComplex(DSTr, DSTi, elt_type); } - if (LHS->getType()->isFPOrFPVector()) - return Builder.CreateFMul(LHS, RHS); - else if (TYPE_OVERFLOW_WRAPS(type)) - return Builder.CreateMul(LHS, RHS); - else - return Builder.CreateNSWMul(LHS, RHS); + return CreateAnyMul(LHS, RHS, type); } Value *TreeToLLVM::EmitReg_PLUS_EXPR(tree op0, tree op1) { @@ -6380,26 +6398,13 @@ Value *RHSr, *RHSi; SplitComplex(RHS, RHSr, RHSi, elt_type); // (a+ib) + (c+id) = (a+c) + i(b+d) - if (LHSr->getType()->isFloatingPoint()) { - LHSr = Builder.CreateFAdd(LHSr, RHSr); - LHSi = Builder.CreateFAdd(LHSi, RHSi); - } else if (TYPE_OVERFLOW_WRAPS(elt_type)) { - LHSr = Builder.CreateAdd(LHSr, RHSr); - LHSi = Builder.CreateAdd(LHSi, RHSi); - } else { - LHSr = Builder.CreateNSWAdd(LHSr, RHSr); - LHSi = Builder.CreateNSWAdd(LHSi, RHSi); - } + LHSr = CreateAnyAdd(LHSr, RHSr, elt_type); + LHSi = CreateAnyAdd(LHSi, RHSi, elt_type); return CreateComplex(LHSr, LHSi, elt_type); } - if (LHS->getType()->isFPOrFPVector()) - return Builder.CreateFAdd(LHS, RHS); - else if (TYPE_OVERFLOW_WRAPS(type)) - return Builder.CreateAdd(LHS, RHS); - else - return Builder.CreateNSWAdd(LHS, RHS); + return CreateAnyAdd(LHS, RHS, type); } Value *TreeToLLVM::EmitReg_POINTER_PLUS_EXPR(tree type, tree op0, tree op1) { @@ -6427,8 +6432,7 @@ Value *DSTr, *DSTi; // (a+ib) / (c+id) = ((ac+bd)/(cc+dd)) + i((bc-ad)/(cc+dd)) - assert (LHSr->getType()->isFloatingPoint() && - "RDIV_EXPR not floating point!"); + assert (SCALAR_FLOAT_TYPE_P(elt_type) && "RDIV_EXPR not floating point!"); Value *Tmp1 = Builder.CreateFMul(LHSr, RHSr); // a*c Value *Tmp2 = Builder.CreateFMul(LHSi, RHSi); // b*d Value *Tmp3 = Builder.CreateFAdd(Tmp1, Tmp2); // ac+bd @@ -6446,7 +6450,7 @@ return CreateComplex(DSTr, DSTi, elt_type); } - assert(LHS->getType()->isFPOrFPVector() && "RDIV_EXPR not floating point!"); + assert(FLOAT_TYPE_P(type) && "RDIV_EXPR not floating point!"); return Builder.CreateFDiv(LHS, RHS); } @@ -6547,8 +6551,11 @@ Value *DSTr, *DSTi; // (a+ib) / (c+id) = ((ac+bd)/(cc+dd)) + i((bc-ad)/(cc+dd)) - assert (LHSr->getType()->isInteger() && - "TRUNC_DIV_EXPR not integer!"); + assert (LHSr->getType()->isInteger() && "TRUNC_DIV_EXPR not integer!"); + // If overflow does not wrap in the element type then it is tempting to + // use NSW operations here. However that would be wrong since overflow + // of an intermediate value calculated here does not necessarily imply + // that the final result overflows. Value *Tmp1 = Builder.CreateMul(LHSr, RHSr); // a*c Value *Tmp2 = Builder.CreateMul(LHSi, RHSi); // b*d Value *Tmp3 = Builder.CreateAdd(Tmp1, Tmp2); // ac+bd Modified: dragonegg/trunk/llvm-internal.h URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-internal.h?rev=94978&r1=94977&r2=94978&view=diff ============================================================================== --- dragonegg/trunk/llvm-internal.h (original) +++ dragonegg/trunk/llvm-internal.h Mon Feb 1 06:53:02 2010 @@ -473,6 +473,18 @@ /// BitCast, FPTrunc and FPExt. Value *CastToFPType(Value *V, const Type* Ty); + /// CreateAnyAdd - Add two LLVM scalar values with the given GCC type. Does + /// not support complex numbers. The type is used to set overflow flags. + Value *CreateAnyAdd(Value *LHS, Value *RHS, tree_node *type); + + /// CreateAnyMul - Multiply two LLVM scalar values with the given GCC type. + /// Does not support complex numbers. The type is used to set overflow flags. + Value *CreateAnyMul(Value *LHS, Value *RHS, tree_node *type); + + /// CreateAnySub - Subtract two LLVM scalar values with the given GCC type. + /// Does not support complex numbers. + Value *CreateAnySub(Value *LHS, Value *RHS, tree_node *type); + /// CreateTemporary - Create a new alloca instruction of the specified type, /// inserting it into the entry block and returning it. The resulting /// instruction's type is a pointer to the specified type. From baldrick at free.fr Mon Feb 1 07:11:48 2010 From: baldrick at free.fr (Duncan Sands) Date: Mon, 01 Feb 2010 13:11:48 -0000 Subject: [llvm-commits] [dragonegg] r94979 - in /dragonegg/trunk: llvm-backend.cpp llvm-convert.cpp Message-ID: <201002011311.o11DBnKx021154@zion.cs.uiuc.edu> Author: baldrick Date: Mon Feb 1 07:11:48 2010 New Revision: 94979 URL: http://llvm.org/viewvc/llvm-project?rev=94979&view=rev Log: Don't try to generate code if an error occurred. Likewise, don't check that every SSA name got a value if an error occurred. This prevents problems when invalid asm causes us to bail out. Modified: dragonegg/trunk/llvm-backend.cpp dragonegg/trunk/llvm-convert.cpp Modified: dragonegg/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=94979&r1=94978&r2=94979&view=diff ============================================================================== --- dragonegg/trunk/llvm-backend.cpp (original) +++ dragonegg/trunk/llvm-backend.cpp Mon Feb 1 07:11:48 2010 @@ -1563,14 +1563,16 @@ Fn = Emitter.EmitFunction(); } - // TODO performLateBackendInitialization(); - createPerFunctionOptimizationPasses(); + if (!errorcount && !sorrycount) { + // TODO performLateBackendInitialization(); + createPerFunctionOptimizationPasses(); - if (PerFunctionPasses) - PerFunctionPasses->run(*Fn); + if (PerFunctionPasses) + PerFunctionPasses->run(*Fn); - // TODO: Nuke the .ll code for the function at -O[01] if we don't want to - // inline it or something else. + // TODO: Nuke the .ll code for the function at -O[01] if we don't want to + // inline it or something else. + } // Done with this function. current_function_decl = NULL; @@ -1909,6 +1911,9 @@ /// llvm_finish_unit - Finish the .s file. This is called by GCC once the /// compilation unit has been completely processed. static void llvm_finish_unit(void *gcc_data, void *user_data) { + if (errorcount || sorrycount) + return; + if (!quiet_flag) errs() << "Finishing compilation unit\n"; Modified: dragonegg/trunk/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=94979&r1=94978&r2=94979&view=diff ============================================================================== --- dragonegg/trunk/llvm-convert.cpp (original) +++ dragonegg/trunk/llvm-convert.cpp Mon Feb 1 07:11:48 2010 @@ -977,12 +977,13 @@ PopulatePhiNodes(); #ifndef NDEBUG - for (DenseMap >::const_iterator I = SSANames.begin(), - E = SSANames.end(); I != E; ++I) - if (isSSAPlaceholder(I->second)) { - debug_tree(I->first); - llvm_unreachable("SSA name never defined!"); - } + if (!errorcount && !sorrycount) + for (DenseMap >::const_iterator I = SSANames.begin(), + E = SSANames.end(); I != E; ++I) + if (isSSAPlaceholder(I->second)) { + debug_tree(I->first); + llvm_unreachable("SSA name never defined!"); + } #endif return Fn; From baldrick at free.fr Mon Feb 1 07:38:21 2010 From: baldrick at free.fr (Duncan Sands) Date: Mon, 01 Feb 2010 13:38:21 -0000 Subject: [llvm-commits] [dragonegg] r94980 - /dragonegg/trunk/llvm-backend.cpp Message-ID: <201002011338.o11DcLDX022093@zion.cs.uiuc.edu> Author: baldrick Date: Mon Feb 1 07:38:21 2010 New Revision: 94980 URL: http://llvm.org/viewvc/llvm-project?rev=94980&view=rev Log: Bail out much more often if broken code was encountered. Modified: dragonegg/trunk/llvm-backend.cpp Modified: dragonegg/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=94980&r1=94979&r2=94980&view=diff ============================================================================== --- dragonegg/trunk/llvm-backend.cpp (original) +++ dragonegg/trunk/llvm-backend.cpp Mon Feb 1 07:38:21 2010 @@ -1171,11 +1171,11 @@ abort (); #endif - LLVMContext &Context = getGlobalContext(); - if (errorcount || sorrycount) return NULL; // Do not process broken code. + LLVMContext &Context = getGlobalContext(); + // Global register variable with asm name, e.g.: // register unsigned long esp __asm__("ebp"); if (TREE_CODE(decl) != FUNCTION_DECL && DECL_REGISTER(decl)) { @@ -1538,12 +1538,15 @@ /// gate_emission - Whether to turn gimple into LLVM IR. static bool gate_emission(void) { // Don't bother doing anything if the program has errors. - return !errorcount && !sorrycount; + return !errorcount && !sorrycount; // Do not process broken code. } /// emit_function - Turn a gimple function into LLVM IR. This is called once /// for each function in the compilation unit. static void emit_function(struct cgraph_node *node) { + if (errorcount || sorrycount) + return; // Do not process broken code. + tree function = node->decl; struct function *fn = DECL_STRUCT_FUNCTION(function); if (!quiet_flag && DECL_NAME(function)) @@ -1563,7 +1566,7 @@ Fn = Emitter.EmitFunction(); } - if (!errorcount && !sorrycount) { + if (!errorcount && !sorrycount) { // Do not process broken code. // TODO performLateBackendInitialization(); createPerFunctionOptimizationPasses(); @@ -1581,6 +1584,9 @@ /// emit_thunk - Turn a thunk into LLVM IR. void emit_thunk(struct cgraph_node *node) { + if (errorcount || sorrycount) + return; // Do not process broken code. + Function *Thunk = cast(DECL_LLVM(node->decl)); if (Thunk->isVarArg()) { sorry("thunks to varargs functions not supported"); @@ -1660,6 +1666,9 @@ /// emit_alias - Given decl and target emit alias to target. void emit_alias(tree decl, tree target) { + if (errorcount || sorrycount) + return; // Do not process broken code. + // Get or create LLVM global for our alias. GlobalValue *V = cast(DECL_LLVM(decl)); @@ -1752,12 +1761,18 @@ /// emit_same_body_alias - Turn a same-body alias into LLVM IR. static void emit_same_body_alias(struct cgraph_node *alias, struct cgraph_node *target) { + if (errorcount || sorrycount) + return; // Do not process broken code. + emit_alias(alias->decl, alias->thunk.alias); } /// emit_file_scope_asm - Emit the specified string as a file-scope inline /// asm block. static void emit_file_scope_asm(tree string) { + if (errorcount || sorrycount) + return; // Do not process broken code. + if (TREE_CODE(string) == ADDR_EXPR) string = TREE_OPERAND(string, 0); TheModule->appendModuleInlineAsm(TREE_STRING_POINTER (string)); @@ -1765,6 +1780,9 @@ /// emit_functions - Turn all functions in the compilation unit into LLVM IR. static void emit_functions(cgraph_node_set set) { + if (errorcount || sorrycount) + return; // Do not process broken code. + LazilyInitializeModule(); // Visit each function with a body, outputting it only once (the same function @@ -1825,6 +1843,9 @@ /// emit_variables - Output GCC global variables to the LLVM IR. static void emit_variables(cgraph_node_set set) { + if (errorcount || sorrycount) + return; // Do not process broken code. + LazilyInitializeModule(); // Output all externally visible global variables, whether they are used in @@ -1912,7 +1933,7 @@ /// compilation unit has been completely processed. static void llvm_finish_unit(void *gcc_data, void *user_data) { if (errorcount || sorrycount) - return; + return; // Do not process broken code. if (!quiet_flag) errs() << "Finishing compilation unit\n"; From gohman at apple.com Mon Feb 1 10:37:39 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Feb 2010 16:37:39 -0000 Subject: [llvm-commits] [llvm] r94981 - in /llvm/trunk: include/llvm/Constants.h lib/VMCore/Constants.cpp Message-ID: <201002011637.o11Gbdpf029282@zion.cs.uiuc.edu> Author: djg Date: Mon Feb 1 10:37:38 2010 New Revision: 94981 URL: http://llvm.org/viewvc/llvm-project?rev=94981&view=rev Log: Add a generalized form of ConstantExpr::getOffsetOf which works for array types as well as struct types, and which accepts arbitrary Constant indicies. Modified: llvm/trunk/include/llvm/Constants.h llvm/trunk/lib/VMCore/Constants.cpp Modified: llvm/trunk/include/llvm/Constants.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=94981&r1=94980&r2=94981&view=diff ============================================================================== --- llvm/trunk/include/llvm/Constants.h (original) +++ llvm/trunk/include/llvm/Constants.h Mon Feb 1 10:37:38 2010 @@ -652,10 +652,15 @@ /// static Constant *getSizeOf(const Type* Ty); - /// getOffsetOf constant expr - computes the offset of a field in a target - /// independent way (Note: the return type is an i64). + /// getOffsetOf constant expr - computes the offset of a struct field in a + /// target independent way (Note: the return type is an i64). /// - static Constant *getOffsetOf(const StructType* Ty, unsigned FieldNo); + static Constant *getOffsetOf(const StructType* STy, unsigned FieldNo); + + /// getOffsetOf constant expr - This is a generalized form of getOffsetOf, + /// which supports any aggregate type, and any Constant index. + /// + static Constant *getOffsetOf(const Type* Ty, Constant *FieldNo); static Constant *getNeg(Constant *C); static Constant *getFNeg(Constant *C); Modified: llvm/trunk/lib/VMCore/Constants.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Constants.cpp?rev=94981&r1=94980&r2=94981&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Constants.cpp (original) +++ llvm/trunk/lib/VMCore/Constants.cpp Mon Feb 1 10:37:38 2010 @@ -1493,16 +1493,21 @@ } Constant* ConstantExpr::getOffsetOf(const StructType* STy, unsigned FieldNo) { + return getOffsetOf(STy, ConstantInt::get(Type::getInt32Ty(STy->getContext()), + FieldNo)); +} + +Constant* ConstantExpr::getOffsetOf(const Type* Ty, Constant *FieldNo) { // offsetof is implemented as: (i64) gep (Ty*)null, 0, FieldNo // Note that a non-inbounds gep is used, as null isn't within any object. Constant *GEPIdx[] = { - ConstantInt::get(Type::getInt64Ty(STy->getContext()), 0), - ConstantInt::get(Type::getInt32Ty(STy->getContext()), FieldNo) + ConstantInt::get(Type::getInt64Ty(Ty->getContext()), 0), + FieldNo }; Constant *GEP = getGetElementPtr( - Constant::getNullValue(PointerType::getUnqual(STy)), GEPIdx, 2); + Constant::getNullValue(PointerType::getUnqual(Ty)), GEPIdx, 2); return getCast(Instruction::PtrToInt, GEP, - Type::getInt64Ty(STy->getContext())); + Type::getInt64Ty(Ty->getContext())); } Constant *ConstantExpr::getCompare(unsigned short pred, From gohman at apple.com Mon Feb 1 10:38:15 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Feb 2010 16:38:15 -0000 Subject: [llvm-commits] [llvm] r94982 - in /llvm/trunk: include/llvm/Constants.h lib/VMCore/Constants.cpp Message-ID: <201002011638.o11GcFvL029317@zion.cs.uiuc.edu> Author: djg Date: Mon Feb 1 10:38:14 2010 New Revision: 94982 URL: http://llvm.org/viewvc/llvm-project?rev=94982&view=rev Log: Add a getNUWMul function. Modified: llvm/trunk/include/llvm/Constants.h llvm/trunk/lib/VMCore/Constants.cpp Modified: llvm/trunk/include/llvm/Constants.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=94982&r1=94981&r2=94982&view=diff ============================================================================== --- llvm/trunk/include/llvm/Constants.h (original) +++ llvm/trunk/include/llvm/Constants.h Mon Feb 1 10:38:14 2010 @@ -699,6 +699,7 @@ static Constant *getNSWNeg(Constant *C); static Constant *getNSWAdd(Constant *C1, Constant *C2); static Constant *getNSWSub(Constant *C1, Constant *C2); + static Constant *getNUWMul(Constant *C1, Constant *C2); static Constant *getNSWMul(Constant *C1, Constant *C2); static Constant *getExactSDiv(Constant *C1, Constant *C2); Modified: llvm/trunk/lib/VMCore/Constants.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Constants.cpp?rev=94982&r1=94981&r2=94982&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Constants.cpp (original) +++ llvm/trunk/lib/VMCore/Constants.cpp Mon Feb 1 10:38:14 2010 @@ -656,6 +656,11 @@ OverflowingBinaryOperator::NoSignedWrap); } +Constant* ConstantExpr::getNUWMul(Constant* C1, Constant* C2) { + return getTy(C1->getType(), Instruction::Mul, C1, C2, + OverflowingBinaryOperator::NoUnsignedWrap); +} + Constant* ConstantExpr::getNSWMul(Constant* C1, Constant* C2) { return getTy(C1->getType(), Instruction::Mul, C1, C2, OverflowingBinaryOperator::NoSignedWrap); From baldrick at free.fr Mon Feb 1 10:44:34 2010 From: baldrick at free.fr (Duncan Sands) Date: Mon, 01 Feb 2010 16:44:34 -0000 Subject: [llvm-commits] [dragonegg] r94983 - /dragonegg/trunk/llvm-convert.cpp Message-ID: <201002011644.o11GiYDq029551@zion.cs.uiuc.edu> Author: baldrick Date: Mon Feb 1 10:44:34 2010 New Revision: 94983 URL: http://llvm.org/viewvc/llvm-project?rev=94983&view=rev Log: Use a LoadInst rather than a BitCastInst as the placeholder instruction: BitCastInst doesn't cut the mustard since the register might be a complex number (i.e. have struct type), which cannot be used with bitcast. Modified: dragonegg/trunk/llvm-convert.cpp Modified: dragonegg/trunk/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=94983&r1=94982&r2=94983&view=diff ============================================================================== --- dragonegg/trunk/llvm-convert.cpp (original) +++ dragonegg/trunk/llvm-convert.cpp Mon Feb 1 10:44:34 2010 @@ -160,14 +160,20 @@ /// output in dominator order). Replaced with the correct value when the SSA /// name's definition is encountered. static Value *GetSSAPlaceholder(const Type *Ty) { - return new BitCastInst(UndefValue::get(Ty), Ty); + // Cannot use a constant, since there is no way to distinguish a fake value + // from a real value. So use an instruction with no parent. This needs to + // be an instruction that can return a struct type, since the SSA name might + // be a complex number. It could be a PHINode, except that the GCC phi node + // conversion logic also constructs phi nodes with no parent. A SelectInst + // would work, but a LoadInst seemed neater. + return new LoadInst(UndefValue::get(Ty->getPointerTo()), NULL); } /// isSSAPlaceholder - Whether this is a fake value being used as a placeholder /// for the definition of an SSA name. static bool isSSAPlaceholder(Value *V) { - BitCastInst *BC = dyn_cast(V); - return BC && !BC->getParent(); + LoadInst *LI = dyn_cast(V); + return LI && !LI->getParent(); } /// NameValue - Try to name the given value after the given GCC tree node. If From bob.wilson at apple.com Mon Feb 1 11:41:44 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 01 Feb 2010 17:41:44 -0000 Subject: [llvm-commits] [llvm] r94984 - /llvm/trunk/lib/Transforms/Utils/Local.cpp Message-ID: <201002011741.o11Hfimt031624@zion.cs.uiuc.edu> Author: bwilson Date: Mon Feb 1 11:41:44 2010 New Revision: 94984 URL: http://llvm.org/viewvc/llvm-project?rev=94984&view=rev Log: Fix pr6198 by moving the isSized() check to an outer conditional. The testcase from pr6198 does not crash for me -- I don't know what's up with that -- so I'm not adding it to the tests. Modified: llvm/trunk/lib/Transforms/Utils/Local.cpp Modified: llvm/trunk/lib/Transforms/Utils/Local.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/Local.cpp?rev=94984&r1=94983&r2=94984&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/Local.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/Local.cpp Mon Feb 1 11:41:44 2010 @@ -95,13 +95,15 @@ BaseAlign = GV->getAlignment(); } } - if (TD && BaseType && BaseAlign == 0) - BaseAlign = TD->getPrefTypeAlignment(BaseType); - if (BaseType && Align <= BaseAlign) { - if (!TD) - return true; // Loading directly from an alloca or global is OK. - if (BaseType->isSized()) { + if (BaseType && BaseType->isSized()) { + if (TD && BaseAlign == 0) + BaseAlign = TD->getPrefTypeAlignment(BaseType); + + if (Align <= BaseAlign) { + if (!TD) + return true; // Loading directly from an alloca or global is OK. + // Check if the load is within the bounds of the underlying object. const PointerType *AddrTy = cast(V->getType()); uint64_t LoadSize = TD->getTypeStoreSize(AddrTy->getElementType()); From sabre at nondot.org Mon Feb 1 12:04:58 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Feb 2010 18:04:58 -0000 Subject: [llvm-commits] [llvm] r94985 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineCalls.cpp test/Transforms/InstCombine/crash.ll Message-ID: <201002011804.o11I4wgM032465@zion.cs.uiuc.edu> Author: lattner Date: Mon Feb 1 12:04:58 2010 New Revision: 94985 URL: http://llvm.org/viewvc/llvm-project?rev=94985&view=rev Log: fix rdar://7590304, an infinite loop in instcombine. In the invoke case, instcombine can't zap the invoke for fear of changing the CFG. However, we have to do something to prevent the next iteration of instcombine from inserting another store -> undef before the invoke thereby getting into infinite iteration between dead store elim and store insertion. Just zap the callee to null, which will prevent the next iteration from doing anything. Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/trunk/test/Transforms/InstCombine/crash.ll Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=94985&r1=94984&r2=94985&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Mon Feb 1 12:04:58 2010 @@ -703,8 +703,13 @@ // This allows ValueHandlers and custom metadata to adjust itself. if (!OldCall->getType()->isVoidTy()) OldCall->replaceAllUsesWith(UndefValue::get(OldCall->getType())); - if (isa(OldCall)) // Not worth removing an invoke here. + if (isa(OldCall)) return EraseInstFromFunction(*OldCall); + + // We cannot remove an invoke, because it would change the CFG, just + // change the callee to a null pointer. + cast(OldCall)->setOperand(0, + Constant::getNullValue(CalleeF->getType())); return 0; } Modified: llvm/trunk/test/Transforms/InstCombine/crash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/crash.ll?rev=94985&r1=94984&r2=94985&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/crash.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/crash.ll Mon Feb 1 12:04:58 2010 @@ -204,3 +204,25 @@ declare void @_ZSt9terminatev() declare void @_Unwind_Resume_or_Rethrow(i8*) + + + +; rdar://7590304 +define i8* @test10(i8* %self, i8* %tmp3) { +entry: + store i1 true, i1* undef + store i1 true, i1* undef + invoke arm_apcscc void @test10a() + to label %invoke.cont unwind label %try.handler ; [#uses=0] + +invoke.cont: ; preds = %entry + unreachable + +try.handler: ; preds = %entry + ret i8* %self +} + +define void @test10a() { + ret void +} + From sabre at nondot.org Mon Feb 1 12:11:34 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Feb 2010 18:11:34 -0000 Subject: [llvm-commits] [llvm] r94986 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineCalls.cpp test/Transforms/InstCombine/call.ll Message-ID: <201002011811.o11IBYkO032752@zion.cs.uiuc.edu> Author: lattner Date: Mon Feb 1 12:11:34 2010 New Revision: 94986 URL: http://llvm.org/viewvc/llvm-project?rev=94986&view=rev Log: fix rdar://7590304, a miscompilation of objc apps on arm. The caller of objc message send was getting marked arm_apcscc, but the prototype isn't. This is fine at runtime because objcmsgsend is implemented in assembly. Only turn a mismatched caller and callee into 'unreachable' if the callee is a definition. Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/trunk/test/Transforms/InstCombine/call.ll Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=94986&r1=94985&r2=94986&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Mon Feb 1 12:11:34 2010 @@ -692,10 +692,14 @@ Value *Callee = CS.getCalledValue(); if (Function *CalleeF = dyn_cast(Callee)) - if (CalleeF->getCallingConv() != CS.getCallingConv()) { + // If the call and callee calling conventions don't match, this call must + // be unreachable, as the call is undefined. + if (CalleeF->getCallingConv() != CS.getCallingConv() && + // Only do this for calls to a function with a body. A prototype may + // not actually end up matching the implementation's calling conv for a + // variety of reasons (e.g. it may be written in assembly). + !CalleeF->isDeclaration()) { Instruction *OldCall = CS.getInstruction(); - // If the call and callee calling conventions don't match, this call must - // be unreachable, as the call is undefined. new StoreInst(ConstantInt::getTrue(Callee->getContext()), UndefValue::get(Type::getInt1PtrTy(Callee->getContext())), OldCall); Modified: llvm/trunk/test/Transforms/InstCombine/call.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/call.ll?rev=94986&r1=94985&r2=94986&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/call.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/call.ll Mon Feb 1 12:11:34 2010 @@ -75,7 +75,7 @@ declare i32 @test6a(i32) define i32 @test6() { - %X = call i32 bitcast (i32 (i32)* @test6a to i32 ()*)( ) ; [#uses=1] + %X = call i32 bitcast (i32 (i32)* @test6a to i32 ()*)( ) ret i32 %X ; CHECK: %X1 = call i32 @test6a(i32 0) ; CHECK: ret i32 %X1 @@ -96,3 +96,23 @@ } +; rdar://7590304 +declare void @test8a() + +define i8* @test8() { + invoke arm_apcscc void @test8a() + to label %invoke.cont unwind label %try.handler + +invoke.cont: ; preds = %entry + unreachable + +try.handler: ; preds = %entry + ret i8* null +} + +; Don't turn this into "unreachable": the callee and caller don't agree in +; calling conv, but the implementation of test8a may actually end up using the +; right calling conv. +; CHECK: @test8() { +; CHECK-NEXT: invoke arm_apcscc void @test8a() + From gohman at apple.com Mon Feb 1 12:27:39 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Feb 2010 18:27:39 -0000 Subject: [llvm-commits] [llvm] r94987 - in /llvm/trunk: include/llvm/Analysis/ScalarEvolution.h include/llvm/Analysis/ScalarEvolutionExpressions.h lib/Analysis/ConstantFolding.cpp lib/Analysis/ScalarEvolution.cpp lib/Analysis/ScalarEvolutionExpander.cpp lib/VMCore/ConstantFold.cpp test/Other/constant-fold-gep.ll test/Transforms/InstCombine/getelementptr.ll Message-ID: <201002011827.o11IRduW001062@zion.cs.uiuc.edu> Author: djg Date: Mon Feb 1 12:27:38 2010 New Revision: 94987 URL: http://llvm.org/viewvc/llvm-project?rev=94987&view=rev Log: Generalize target-independent folding rules for sizeof to handle more cases, and implement target-independent folding rules for alignof and offsetof. Also, reassociate reassociative operators when it leads to more folding. Generalize ScalarEvolution's isOffsetOf to recognize offsetof on arrays. Rename getAllocSizeExpr to getSizeOfExpr, and getFieldOffsetExpr to getOffsetOfExpr, for consistency with analagous ConstantExpr routines. Make the target-dependent folder promote GEP array indices to pointer-sized integers, to make implicit casting explicit and exposed to subsequent folding. And add a bunch of testcases for this new functionality, and a bunch of related existing functionality. Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h llvm/trunk/lib/Analysis/ConstantFolding.cpp llvm/trunk/lib/Analysis/ScalarEvolution.cpp llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp llvm/trunk/lib/VMCore/ConstantFold.cpp llvm/trunk/test/Other/constant-fold-gep.ll llvm/trunk/test/Transforms/InstCombine/getelementptr.ll Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=94987&r1=94986&r2=94987&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original) +++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Mon Feb 1 12:27:38 2010 @@ -452,11 +452,25 @@ const SCEV *getUMaxExpr(SmallVectorImpl &Operands); const SCEV *getSMinExpr(const SCEV *LHS, const SCEV *RHS); const SCEV *getUMinExpr(const SCEV *LHS, const SCEV *RHS); - const SCEV *getFieldOffsetExpr(const StructType *STy, unsigned FieldNo); - const SCEV *getAllocSizeExpr(const Type *AllocTy); const SCEV *getUnknown(Value *V); const SCEV *getCouldNotCompute(); + /// getSizeOfExpr - Return an expression for sizeof on the given type. + /// + const SCEV *getSizeOfExpr(const Type *AllocTy); + + /// getSizeOfExpr - Return an expression for alignof on the given type. + /// + const SCEV *getAlignOfExpr(const Type *AllocTy); + + /// getSizeOfExpr - Return an expression for offsetof on the given field. + /// + const SCEV *getOffsetOfExpr(const StructType *STy, unsigned FieldNo); + + /// getSizeOfExpr - Return an expression for offsetof on the given field. + /// + const SCEV *getOffsetOfExpr(const Type *CTy, Constant *FieldNo); + /// getNegativeSCEV - Return the SCEV object corresponding to -V. /// const SCEV *getNegativeSCEV(const SCEV *V); Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h?rev=94987&r1=94986&r2=94987&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h (original) +++ llvm/trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h Mon Feb 1 12:27:38 2010 @@ -534,7 +534,7 @@ /// where it isn't absolutely required for these to succeed. bool isSizeOf(const Type *&AllocTy) const; bool isAlignOf(const Type *&AllocTy) const; - bool isOffsetOf(const StructType *&STy, Constant *&FieldNo) const; + bool isOffsetOf(const Type *&STy, Constant *&FieldNo) const; virtual bool isLoopInvariant(const Loop *L) const; virtual bool hasComputableLoopEvolution(const Loop *QL) const { Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ConstantFolding.cpp?rev=94987&r1=94986&r2=94987&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ConstantFolding.cpp (original) +++ llvm/trunk/lib/Analysis/ConstantFolding.cpp Mon Feb 1 12:27:38 2010 @@ -517,6 +517,42 @@ return 0; } +/// CastGEPIndices - If array indices are not pointer-sized integers, +/// explicitly cast them so that they aren't implicitly casted by the +/// getelementptr. +static Constant *CastGEPIndices(Constant *const *Ops, unsigned NumOps, + const Type *ResultTy, + const TargetData *TD) { + if (!TD) return 0; + const Type *IntPtrTy = TD->getIntPtrType(ResultTy->getContext()); + + bool Any = false; + SmallVector NewIdxs; + for (unsigned i = 1; i != NumOps; ++i) { + if ((i == 1 || + !isa(GetElementPtrInst::getIndexedType(Ops[0]->getType(), + reinterpret_cast(Ops+1), + i-1))) && + Ops[i]->getType() != IntPtrTy) { + Any = true; + NewIdxs.push_back(ConstantExpr::getCast(CastInst::getCastOpcode(Ops[i], + true, + IntPtrTy, + true), + Ops[i], IntPtrTy)); + } else + NewIdxs.push_back(Ops[i]); + } + if (!Any) return 0; + + Constant *C = + ConstantExpr::getGetElementPtr(Ops[0], &NewIdxs[0], NewIdxs.size()); + if (ConstantExpr *CE = dyn_cast(C)) + if (Constant *Folded = ConstantFoldConstantExpression(CE, TD)) + C = Folded; + return C; +} + /// SymbolicallyEvaluateGEP - If we can symbolically evaluate the specified GEP /// constant expression, do so. static Constant *SymbolicallyEvaluateGEP(Constant *const *Ops, unsigned NumOps, @@ -810,6 +846,8 @@ case Instruction::ShuffleVector: return ConstantExpr::getShuffleVector(Ops[0], Ops[1], Ops[2]); case Instruction::GetElementPtr: + if (Constant *C = CastGEPIndices(Ops, NumOps, DestTy, TD)) + return C; if (Constant *C = SymbolicallyEvaluateGEP(Ops, NumOps, DestTy, TD)) return C; Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=94987&r1=94986&r2=94987&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Feb 1 12:27:38 2010 @@ -347,26 +347,6 @@ return V->getType(); } -bool SCEVUnknown::isOffsetOf(const StructType *&STy, Constant *&FieldNo) const { - if (ConstantExpr *VCE = dyn_cast(V)) - if (VCE->getOpcode() == Instruction::PtrToInt) - if (ConstantExpr *CE = dyn_cast(VCE->getOperand(0))) - if (CE->getOpcode() == Instruction::GetElementPtr) - if (CE->getOperand(0)->isNullValue()) { - const Type *Ty = - cast(CE->getOperand(0)->getType())->getElementType(); - if (const StructType *StructTy = dyn_cast(Ty)) - if (CE->getNumOperands() == 3 && - CE->getOperand(1)->isNullValue()) { - STy = StructTy; - FieldNo = CE->getOperand(2); - return true; - } - } - - return false; -} - bool SCEVUnknown::isSizeOf(const Type *&AllocTy) const { if (ConstantExpr *VCE = dyn_cast(V)) if (VCE->getOpcode() == Instruction::PtrToInt) @@ -395,7 +375,8 @@ const Type *Ty = cast(CE->getOperand(0)->getType())->getElementType(); if (const StructType *STy = dyn_cast(Ty)) - if (CE->getNumOperands() == 3 && + if (!STy->isPacked() && + CE->getNumOperands() == 3 && CE->getOperand(1)->isNullValue()) { if (ConstantInt *CI = dyn_cast(CE->getOperand(2))) if (CI->isOne() && @@ -410,6 +391,28 @@ return false; } +bool SCEVUnknown::isOffsetOf(const Type *&CTy, Constant *&FieldNo) const { + if (ConstantExpr *VCE = dyn_cast(V)) + if (VCE->getOpcode() == Instruction::PtrToInt) + if (ConstantExpr *CE = dyn_cast(VCE->getOperand(0))) + if (CE->getOpcode() == Instruction::GetElementPtr && + CE->getNumOperands() == 3 && + CE->getOperand(0)->isNullValue() && + CE->getOperand(1)->isNullValue()) { + const Type *Ty = + cast(CE->getOperand(0)->getType())->getElementType(); + // Ignore vector types here so that ScalarEvolutionExpander doesn't + // emit getelementptrs that index into vectors. + if (isa(Ty) || isa(Ty)) { + CTy = Ty; + FieldNo = CE->getOperand(2); + return true; + } + } + + return false; +} + void SCEVUnknown::print(raw_ostream &OS) const { const Type *AllocTy; if (isSizeOf(AllocTy)) { @@ -421,10 +424,10 @@ return; } - const StructType *STy; + const Type *CTy; Constant *FieldNo; - if (isOffsetOf(STy, FieldNo)) { - OS << "offsetof(" << *STy << ", "; + if (isOffsetOf(CTy, FieldNo)) { + OS << "offsetof(" << *CTy << ", "; WriteAsOperand(OS, FieldNo, false); OS << ")"; return; @@ -2231,8 +2234,24 @@ return getNotSCEV(getUMaxExpr(getNotSCEV(LHS), getNotSCEV(RHS))); } -const SCEV *ScalarEvolution::getFieldOffsetExpr(const StructType *STy, - unsigned FieldNo) { +const SCEV *ScalarEvolution::getSizeOfExpr(const Type *AllocTy) { + Constant *C = ConstantExpr::getSizeOf(AllocTy); + if (ConstantExpr *CE = dyn_cast(C)) + C = ConstantFoldConstantExpression(CE, TD); + const Type *Ty = getEffectiveSCEVType(PointerType::getUnqual(AllocTy)); + return getTruncateOrZeroExtend(getSCEV(C), Ty); +} + +const SCEV *ScalarEvolution::getAlignOfExpr(const Type *AllocTy) { + Constant *C = ConstantExpr::getAlignOf(AllocTy); + if (ConstantExpr *CE = dyn_cast(C)) + C = ConstantFoldConstantExpression(CE, TD); + const Type *Ty = getEffectiveSCEVType(PointerType::getUnqual(AllocTy)); + return getTruncateOrZeroExtend(getSCEV(C), Ty); +} + +const SCEV *ScalarEvolution::getOffsetOfExpr(const StructType *STy, + unsigned FieldNo) { Constant *C = ConstantExpr::getOffsetOf(STy, FieldNo); if (ConstantExpr *CE = dyn_cast(C)) C = ConstantFoldConstantExpression(CE, TD); @@ -2240,11 +2259,12 @@ return getTruncateOrZeroExtend(getSCEV(C), Ty); } -const SCEV *ScalarEvolution::getAllocSizeExpr(const Type *AllocTy) { - Constant *C = ConstantExpr::getSizeOf(AllocTy); +const SCEV *ScalarEvolution::getOffsetOfExpr(const Type *CTy, + Constant *FieldNo) { + Constant *C = ConstantExpr::getOffsetOf(CTy, FieldNo); if (ConstantExpr *CE = dyn_cast(C)) C = ConstantFoldConstantExpression(CE, TD); - const Type *Ty = getEffectiveSCEVType(PointerType::getUnqual(AllocTy)); + const Type *Ty = getEffectiveSCEVType(PointerType::getUnqual(CTy)); return getTruncateOrZeroExtend(getSCEV(C), Ty); } @@ -2695,7 +2715,7 @@ // For a struct, add the member offset. unsigned FieldNo = cast(Index)->getZExtValue(); TotalOffset = getAddExpr(TotalOffset, - getFieldOffsetExpr(STy, FieldNo), + getOffsetOfExpr(STy, FieldNo), /*HasNUW=*/false, /*HasNSW=*/InBounds); } else { // For an array, add the element offset, explicitly scaled. @@ -2704,7 +2724,7 @@ // Getelementptr indicies are signed. LocalOffset = getTruncateOrSignExtend(LocalOffset, IntPtrTy); // Lower "inbounds" GEPs to NSW arithmetic. - LocalOffset = getMulExpr(LocalOffset, getAllocSizeExpr(*GTI), + LocalOffset = getMulExpr(LocalOffset, getSizeOfExpr(*GTI), /*HasNUW=*/false, /*HasNSW=*/InBounds); TotalOffset = getAddExpr(TotalOffset, LocalOffset, /*HasNUW=*/false, /*HasNSW=*/InBounds); @@ -3197,7 +3217,7 @@ case Instruction::Shl: // Turn shift left of a constant amount into a multiply. if (ConstantInt *SA = dyn_cast(U->getOperand(1))) { - uint32_t BitWidth = cast(V->getType())->getBitWidth(); + uint32_t BitWidth = cast(U->getType())->getBitWidth(); Constant *X = ConstantInt::get(getContext(), APInt(BitWidth, 1).shl(SA->getLimitedValue(BitWidth))); return getMulExpr(getSCEV(U->getOperand(0)), getSCEV(X)); @@ -3207,7 +3227,7 @@ case Instruction::LShr: // Turn logical shift right of a constant into a unsigned divide. if (ConstantInt *SA = dyn_cast(U->getOperand(1))) { - uint32_t BitWidth = cast(V->getType())->getBitWidth(); + uint32_t BitWidth = cast(U->getType())->getBitWidth(); Constant *X = ConstantInt::get(getContext(), APInt(BitWidth, 1).shl(SA->getLimitedValue(BitWidth))); return getUDivExpr(getSCEV(U->getOperand(0)), getSCEV(X)); @@ -3248,10 +3268,10 @@ return getSCEV(U->getOperand(0)); break; - // It's tempting to handle inttoptr and ptrtoint, however this can - // lead to pointer expressions which cannot be expanded to GEPs - // (because they may overflow). For now, the only pointer-typed - // expressions we handle are GEPs and address literals. + // It's tempting to handle inttoptr and ptrtoint as no-ops, however this can + // lead to pointer expressions which cannot safely be expanded to GEPs, + // because ScalarEvolution doesn't respect the GEP aliasing rules when + // simplifying integer expressions. case Instruction::GetElementPtr: return createNodeForGEP(cast(U)); Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=94987&r1=94986&r2=94987&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Mon Feb 1 12:27:38 2010 @@ -369,7 +369,7 @@ // array indexing. SmallVector ScaledOps; if (ElTy->isSized()) { - const SCEV *ElSize = SE.getAllocSizeExpr(ElTy); + const SCEV *ElSize = SE.getSizeOfExpr(ElTy); if (!ElSize->isZero()) { SmallVector NewOps; for (unsigned i = 0, e = Ops.size(); i != e; ++i) { @@ -433,9 +433,9 @@ // appropriate struct type. for (unsigned i = 0, e = Ops.size(); i != e; ++i) if (const SCEVUnknown *U = dyn_cast(Ops[i])) { - const StructType *StructTy; + const Type *CTy; Constant *FieldNo; - if (U->isOffsetOf(StructTy, FieldNo) && StructTy == STy) { + if (U->isOffsetOf(CTy, FieldNo) && CTy == STy) { GepIndices.push_back(FieldNo); ElTy = STy->getTypeAtIndex(cast(FieldNo)->getZExtValue()); Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=94987&r1=94986&r2=94987&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Mon Feb 1 12:27:38 2010 @@ -323,6 +323,116 @@ } } +/// getFoldedSizeOf - Return a ConstantExpr with type DestTy for sizeof +/// on Ty, with any known factors factored out. If Folded is false, +/// return null if no factoring was possible, to avoid endlessly +/// bouncing an unfoldable expression back into the top-level folder. +/// +static Constant *getFoldedSizeOf(const Type *Ty, const Type *DestTy, + bool Folded) { + if (const ArrayType *ATy = dyn_cast(Ty)) { + Constant *N = ConstantInt::get(DestTy, ATy->getNumElements()); + Constant *E = getFoldedSizeOf(ATy->getElementType(), DestTy, true); + return ConstantExpr::getNUWMul(E, N); + } + if (const VectorType *VTy = dyn_cast(Ty)) { + Constant *N = ConstantInt::get(DestTy, VTy->getNumElements()); + Constant *E = getFoldedSizeOf(VTy->getElementType(), DestTy, true); + return ConstantExpr::getNUWMul(E, N); + } + if (const StructType *STy = dyn_cast(Ty)) + if (!STy->isPacked()) { + unsigned NumElems = STy->getNumElements(); + // An empty struct has size zero. + if (NumElems == 0) + return ConstantExpr::getNullValue(DestTy); + // Check for a struct with all members having the same type. + const Type *MemberTy = STy->getElementType(0); + bool AllSame = true; + for (unsigned i = 1; i != NumElems; ++i) + if (MemberTy != STy->getElementType(i)) { + AllSame = false; + break; + } + if (AllSame) { + Constant *N = ConstantInt::get(DestTy, NumElems); + Constant *E = getFoldedSizeOf(MemberTy, DestTy, true); + return ConstantExpr::getNUWMul(E, N); + } + } + + // If there's no interesting folding happening, bail so that we don't create + // a constant that looks like it needs folding but really doesn't. + if (!Folded) + return 0; + + // Base case: Get a regular sizeof expression. + Constant *C = ConstantExpr::getSizeOf(Ty); + C = ConstantExpr::getCast(CastInst::getCastOpcode(C, false, + DestTy, false), + C, DestTy); + return C; +} + +/// getFoldedOffsetOf - Return a ConstantExpr with type DestTy for offsetof +/// on Ty and FieldNo, with any known factors factored out. If Folded is false, +/// return null if no factoring was possible, to avoid endlessly +/// bouncing an unfoldable expression back into the top-level folder. +/// +static Constant *getFoldedOffsetOf(const Type *Ty, Constant *FieldNo, + const Type *DestTy, + bool Folded) { + if (const ArrayType *ATy = dyn_cast(Ty)) { + Constant *N = ConstantExpr::getCast(CastInst::getCastOpcode(FieldNo, false, + DestTy, false), + FieldNo, DestTy); + Constant *E = getFoldedSizeOf(ATy->getElementType(), DestTy, true); + return ConstantExpr::getNUWMul(E, N); + } + if (const VectorType *VTy = dyn_cast(Ty)) { + Constant *N = ConstantExpr::getCast(CastInst::getCastOpcode(FieldNo, false, + DestTy, false), + FieldNo, DestTy); + Constant *E = getFoldedSizeOf(VTy->getElementType(), DestTy, true); + return ConstantExpr::getNUWMul(E, N); + } + if (const StructType *STy = dyn_cast(Ty)) + if (!STy->isPacked()) { + unsigned NumElems = STy->getNumElements(); + // An empty struct has no members. + if (NumElems == 0) + return 0; + // Check for a struct with all members having the same type. + const Type *MemberTy = STy->getElementType(0); + bool AllSame = true; + for (unsigned i = 1; i != NumElems; ++i) + if (MemberTy != STy->getElementType(i)) { + AllSame = false; + break; + } + if (AllSame) { + Constant *N = ConstantExpr::getCast(CastInst::getCastOpcode(FieldNo, + false, + DestTy, + false), + FieldNo, DestTy); + Constant *E = getFoldedSizeOf(MemberTy, DestTy, true); + return ConstantExpr::getNUWMul(E, N); + } + } + + // If there's no interesting folding happening, bail so that we don't create + // a constant that looks like it needs folding but really doesn't. + if (!Folded) + return 0; + + // Base case: Get a regular offsetof expression. + Constant *C = ConstantExpr::getOffsetOf(Ty, FieldNo); + C = ConstantExpr::getCast(CastInst::getCastOpcode(C, false, + DestTy, false), + C, DestTy); + return C; +} Constant *llvm::ConstantFoldCastInstruction(LLVMContext &Context, unsigned opc, Constant *V, @@ -418,33 +528,59 @@ // Is it a null pointer value? if (V->isNullValue()) return ConstantInt::get(DestTy, 0); - // If this is a sizeof of an array or vector, pull out a multiplication - // by the element size to expose it to subsequent folding. + // If this is a sizeof-like expression, pull out multiplications by + // known factors to expose them to subsequent folding. If it's an + // alignof-like expression, factor out known factors. if (ConstantExpr *CE = dyn_cast(V)) if (CE->getOpcode() == Instruction::GetElementPtr && - CE->getNumOperands() == 2 && - CE->getOperand(0)->isNullValue()) - if (ConstantInt *CI = dyn_cast(CE->getOperand(1))) - if (CI->isOne()) { - const Type *Ty = - cast(CE->getOperand(0)->getType())->getElementType(); - if (const ArrayType *ATy = dyn_cast(Ty)) { - Constant *N = ConstantInt::get(DestTy, ATy->getNumElements()); - Constant *E = ConstantExpr::getSizeOf(ATy->getElementType()); - E = ConstantExpr::getCast(CastInst::getCastOpcode(E, false, + CE->getOperand(0)->isNullValue()) { + const Type *Ty = + cast(CE->getOperand(0)->getType())->getElementType(); + if (CE->getNumOperands() == 2) { + // Handle a sizeof-like expression. + Constant *Idx = CE->getOperand(1); + bool isOne = isa(Idx) && cast(Idx)->isOne(); + if (Constant *C = getFoldedSizeOf(Ty, DestTy, !isOne)) { + Idx = ConstantExpr::getCast(CastInst::getCastOpcode(Idx, true, DestTy, false), - E, DestTy); - return ConstantExpr::getMul(N, E); - } - if (const VectorType *VTy = dyn_cast(Ty)) { - Constant *N = ConstantInt::get(DestTy, VTy->getNumElements()); - Constant *E = ConstantExpr::getSizeOf(VTy->getElementType()); - E = ConstantExpr::getCast(CastInst::getCastOpcode(E, false, - DestTy, false), - E, DestTy); - return ConstantExpr::getMul(N, E); + Idx, DestTy); + return ConstantExpr::getMul(C, Idx); + } + } else if (CE->getNumOperands() == 3 && + CE->getOperand(1)->isNullValue()) { + // Handle an alignof-like expression. + if (const StructType *STy = dyn_cast(Ty)) + if (!STy->isPacked()) { + ConstantInt *CI = cast(CE->getOperand(2)); + if (CI->isOne() && + STy->getNumElements() == 2 && + STy->getElementType(0)->isInteger(1)) { + // The alignment of an array is equal to the alignment of the + // array element. Note that this is not always true for vectors. + if (const ArrayType *ATy = + dyn_cast(STy->getElementType(1))) { + Constant *C = ConstantExpr::getAlignOf(ATy->getElementType()); + C = ConstantExpr::getCast(CastInst::getCastOpcode(C, false, + DestTy, + false), + C, DestTy); + return C; + } + // Packed structs always have an alignment of 1. + if (const StructType *InnerSTy = + dyn_cast(STy->getElementType(1))) + if (InnerSTy->isPacked()) + return ConstantInt::get(DestTy, 1); + } } + // Handle an offsetof-like expression. + if (isa(Ty) || isa(Ty) || isa(Ty)){ + if (Constant *C = getFoldedOffsetOf(Ty, CE->getOperand(2), + DestTy, false)) + return C; } + } + } // Other pointer types cannot be casted return 0; case Instruction::UIToFP: @@ -1156,10 +1292,19 @@ } } - if (isa(C1)) { + if (ConstantExpr *CE1 = dyn_cast(C1)) { // There are many possible foldings we could do here. We should probably // at least fold add of a pointer with an integer into the appropriate // getelementptr. This will improve alias analysis a bit. + + // Given ((a + b) + c), if (b + c) folds to something interesting, return + // (a + (b + c)). + if (Instruction::isAssociative(Opcode, C1->getType()) && + CE1->getOpcode() == Opcode) { + Constant *T = ConstantExpr::get(Opcode, CE1->getOperand(1), C2); + if (!isa(T) || cast(T)->getOpcode() != Opcode) + return ConstantExpr::get(Opcode, CE1->getOperand(0), T); + } } else if (isa(C2)) { // If C2 is a constant expr and C1 isn't, flop them around and fold the // other way if possible. @@ -2004,7 +2149,7 @@ } // Implement folding of: - // int* getelementptr ([2 x int]* cast ([3 x int]* %X to [2 x int]*), + // int* getelementptr ([2 x int]* bitcast ([3 x int]* %X to [2 x int]*), // long 0, long 0) // To: int* getelementptr ([3 x int]* %X, long 0, long 0) // Modified: llvm/trunk/test/Other/constant-fold-gep.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/constant-fold-gep.ll?rev=94987&r1=94986&r2=94987&view=diff ============================================================================== --- llvm/trunk/test/Other/constant-fold-gep.ll (original) +++ llvm/trunk/test/Other/constant-fold-gep.ll Mon Feb 1 12:27:38 2010 @@ -1,9 +1,32 @@ +; "PLAIN" - No optimizations. This tests the target-independent +; constant folder. ; RUN: opt -S -o - < %s | FileCheck --check-prefix=PLAIN %s + +; "OPT" - Optimizations but no targetdata. This tests target-independent +; folding in the optimizers. ; RUN: opt -S -o - -instcombine -globalopt < %s | FileCheck --check-prefix=OPT %s +; "TO" - Optimizations and targetdata. This tests target-dependent +; folding in the optimizers. +; RUN: opt -S -o - -instcombine -globalopt -default-data-layout="e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" < %s | FileCheck --check-prefix=TO %s + +; "SCEV" - ScalarEvolution but no targetdata. +; RUN: opt -analyze -scalar-evolution < %s | FileCheck --check-prefix=SCEV %s + +; ScalarEvolution with targetdata isn't interesting on these testcases +; because ScalarEvolution doesn't attempt to duplicate all of instcombine's +; and the constant folders' folding. + +; PLAIN: %0 = type { i1, double } +; PLAIN: %1 = type { double, float, double, double } +; PLAIN: %2 = type { i64, i64 } +; OPT: %0 = type { i1, double } +; OPT: %1 = type { double, float, double, double } +; OPT: %2 = type { i64, i64 } + ; The automatic constant folder in opt does not have targetdata access, so ; it can't fold gep arithmetic, in general. However, the constant folder run -; from instcombine and global opt does, and can. +; from instcombine and global opt can use targetdata. ; PLAIN: @G8 = global i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1) ; PLAIN: @G1 = global i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1) @@ -11,74 +34,330 @@ ; PLAIN: @F1 = global i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2) ; PLAIN: @H8 = global i8* getelementptr (i8* null, i32 -1) ; PLAIN: @H1 = global i1* getelementptr (i1* null, i32 -1) +; OPT: @G8 = global i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1) +; OPT: @G1 = global i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1) +; OPT: @F8 = global i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2) +; OPT: @F1 = global i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2) +; OPT: @H8 = global i8* getelementptr (i8* null, i32 -1) +; OPT: @H1 = global i1* getelementptr (i1* null, i32 -1) +; TO: @G8 = global i8* null +; TO: @G1 = global i1* null +; TO: @F8 = global i8* inttoptr (i64 -1 to i8*) +; TO: @F1 = global i1* inttoptr (i64 -1 to i1*) +; TO: @H8 = global i8* inttoptr (i64 -1 to i8*) +; TO: @H1 = global i1* inttoptr (i64 -1 to i1*) + + at G8 = global i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1) + at G1 = global i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1) + at F8 = global i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2) + at F1 = global i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2) + at H8 = global i8* getelementptr (i8* inttoptr (i32 0 to i8*), i32 -1) + at H1 = global i1* getelementptr (i1* inttoptr (i32 0 to i1*), i32 -1) + +; The target-independent folder should be able to do some clever +; simplifications on sizeof, alignof, and offsetof expressions. The +; target-dependent folder should fold these down to constants. + +; PLAIN: @a = constant i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2310) +; PLAIN: @b = constant i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) +; PLAIN: @c = constant i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2) +; PLAIN: @d = constant i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 11) +; PLAIN: @e = constant i64 ptrtoint (double* getelementptr (%1* null, i64 0, i32 2) to i64) +; PLAIN: @f = constant i64 1 +; OPT: @a = constant i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2310) +; OPT: @b = constant i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) +; OPT: @c = constant i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2) +; OPT: @d = constant i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 11) +; OPT: @e = constant i64 ptrtoint (double* getelementptr (%1* null, i64 0, i32 2) to i64) +; OPT: @f = constant i64 1 +; TO: @a = constant i64 18480 +; TO: @b = constant i64 8 +; TO: @c = constant i64 16 +; TO: @d = constant i64 88 +; TO: @e = constant i64 16 +; TO: @f = constant i64 1 + + at a = constant i64 mul (i64 3, i64 mul (i64 ptrtoint ({[7 x double], [7 x double]}* getelementptr ({[7 x double], [7 x double]}* null, i64 11) to i64), i64 5)) + at b = constant i64 ptrtoint ([13 x double]* getelementptr ({i1, [13 x double]}* null, i64 0, i32 1) to i64) + at c = constant i64 ptrtoint (double* getelementptr ({double, double, double, double}* null, i64 0, i32 2) to i64) + at d = constant i64 ptrtoint (double* getelementptr ([13 x double]* null, i64 0, i32 11) to i64) + at e = constant i64 ptrtoint (double* getelementptr ({double, float, double, double}* null, i64 0, i32 2) to i64) + at f = constant i64 ptrtoint (<{ i16, i128 }>* getelementptr ({i1, <{ i16, i128 }>}* null, i64 0, i32 1) to i64) + +; The target-dependent folder should cast GEP indices to integer-sized pointers. + +; PLAIN: @M = constant i64* getelementptr (i64* null, i32 1) +; PLAIN: @N = constant i64* getelementptr (%2* null, i32 0, i32 1) +; PLAIN: @O = constant i64* getelementptr ([2 x i64]* null, i32 0, i32 1) +; OPT: @M = constant i64* getelementptr (i64* null, i32 1) +; OPT: @N = constant i64* getelementptr (%2* null, i32 0, i32 1) +; OPT: @O = constant i64* getelementptr ([2 x i64]* null, i32 0, i32 1) +; TO: @M = constant i64* inttoptr (i64 8 to i64*) +; TO: @N = constant i64* inttoptr (i64 8 to i64*) +; TO: @O = constant i64* inttoptr (i64 8 to i64*) + + at M = constant i64* getelementptr (i64 *null, i32 1) + at N = constant i64* getelementptr ({ i64, i64 } *null, i32 0, i32 1) + at O = constant i64* getelementptr ([2 x i64] *null, i32 0, i32 1) + +; Duplicate all of the above as function return values rather than +; global initializers. + ; PLAIN: define i8* @goo8() nounwind { -; PLAIN: ret i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1) +; PLAIN: %t = bitcast i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1) to i8* +; PLAIN: ret i8* %t ; PLAIN: } ; PLAIN: define i1* @goo1() nounwind { -; PLAIN: ret i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1) +; PLAIN: %t = bitcast i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1) to i1* +; PLAIN: ret i1* %t ; PLAIN: } ; PLAIN: define i8* @foo8() nounwind { -; PLAIN: ret i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2) +; PLAIN: %t = bitcast i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2) to i8* +; PLAIN: ret i8* %t ; PLAIN: } ; PLAIN: define i1* @foo1() nounwind { -; PLAIN: ret i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2) +; PLAIN: %t = bitcast i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2) to i1* +; PLAIN: ret i1* %t ; PLAIN: } ; PLAIN: define i8* @hoo8() nounwind { -; PLAIN: ret i8* getelementptr (i8* null, i32 -1) +; PLAIN: %t = bitcast i8* getelementptr (i8* null, i32 -1) to i8* +; PLAIN: ret i8* %t ; PLAIN: } ; PLAIN: define i1* @hoo1() nounwind { -; PLAIN: ret i1* getelementptr (i1* null, i32 -1) +; PLAIN: %t = bitcast i1* getelementptr (i1* null, i32 -1) to i1* +; PLAIN: ret i1* %t ; PLAIN: } - -; OPT: @G8 = global i8* null -; OPT: @G1 = global i1* null -; OPT: @F8 = global i8* inttoptr (i64 -1 to i8*) -; OPT: @F1 = global i1* inttoptr (i64 -1 to i1*) -; OPT: @H8 = global i8* inttoptr (i64 -1 to i8*) -; OPT: @H1 = global i1* inttoptr (i64 -1 to i1*) ; OPT: define i8* @goo8() nounwind { -; OPT: ret i8* null +; OPT: ret i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1) ; OPT: } ; OPT: define i1* @goo1() nounwind { -; OPT: ret i1* null +; OPT: ret i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1) ; OPT: } ; OPT: define i8* @foo8() nounwind { -; OPT: ret i8* inttoptr (i64 -1 to i8*) +; OPT: ret i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2) ; OPT: } ; OPT: define i1* @foo1() nounwind { -; OPT: ret i1* inttoptr (i64 -1 to i1*) +; OPT: ret i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2) ; OPT: } ; OPT: define i8* @hoo8() nounwind { -; OPT: ret i8* inttoptr (i64 -1 to i8*) +; OPT: ret i8* getelementptr (i8* null, i32 -1) ; OPT: } ; OPT: define i1* @hoo1() nounwind { -; OPT: ret i1* inttoptr (i64 -1 to i1*) +; OPT: ret i1* getelementptr (i1* null, i32 -1) ; OPT: } - -target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" - - at G8 = global i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1) - at G1 = global i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1) - at F8 = global i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2) - at F1 = global i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2) - at H8 = global i8* getelementptr (i8* inttoptr (i32 0 to i8*), i32 -1) - at H1 = global i1* getelementptr (i1* inttoptr (i32 0 to i1*), i32 -1) +; TO: define i8* @goo8() nounwind { +; TO: ret i8* null +; TO: } +; TO: define i1* @goo1() nounwind { +; TO: ret i1* null +; TO: } +; TO: define i8* @foo8() nounwind { +; TO: ret i8* inttoptr (i64 -1 to i8*) +; TO: } +; TO: define i1* @foo1() nounwind { +; TO: ret i1* inttoptr (i64 -1 to i1*) +; TO: } +; TO: define i8* @hoo8() nounwind { +; TO: ret i8* inttoptr (i64 -1 to i8*) +; TO: } +; TO: define i1* @hoo1() nounwind { +; TO: ret i1* inttoptr (i64 -1 to i1*) +; TO: } +; SCEV: Classifying expressions for: @goo8 +; SCEV: %t = bitcast i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1) to i8* +; SCEV: --> ((-1 * sizeof(i8)) + inttoptr (i32 1 to i8*)) +; SCEV: Classifying expressions for: @goo1 +; SCEV: %t = bitcast i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1) to i1* +; SCEV: --> ((-1 * sizeof(i1)) + inttoptr (i32 1 to i1*)) +; SCEV: Classifying expressions for: @foo8 +; SCEV: %t = bitcast i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2) to i8* +; SCEV: --> ((-2 * sizeof(i8)) + inttoptr (i32 1 to i8*)) +; SCEV: Classifying expressions for: @foo1 +; SCEV: %t = bitcast i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2) to i1* +; SCEV: --> ((-2 * sizeof(i1)) + inttoptr (i32 1 to i1*)) +; SCEV: Classifying expressions for: @hoo8 +; SCEV: --> (-1 * sizeof(i8)) +; SCEV: Classifying expressions for: @hoo1 +; SCEV: --> (-1 * sizeof(i1)) define i8* @goo8() nounwind { - ret i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1) + %t = bitcast i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -1) to i8* + ret i8* %t } define i1* @goo1() nounwind { - ret i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1) + %t = bitcast i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -1) to i1* + ret i1* %t } define i8* @foo8() nounwind { - ret i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2) + %t = bitcast i8* getelementptr (i8* inttoptr (i32 1 to i8*), i32 -2) to i8* + ret i8* %t } define i1* @foo1() nounwind { - ret i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2) + %t = bitcast i1* getelementptr (i1* inttoptr (i32 1 to i1*), i32 -2) to i1* + ret i1* %t } define i8* @hoo8() nounwind { - ret i8* getelementptr (i8* inttoptr (i32 0 to i8*), i32 -1) + %t = bitcast i8* getelementptr (i8* inttoptr (i32 0 to i8*), i32 -1) to i8* + ret i8* %t } define i1* @hoo1() nounwind { - ret i1* getelementptr (i1* inttoptr (i32 0 to i1*), i32 -1) + %t = bitcast i1* getelementptr (i1* inttoptr (i32 0 to i1*), i32 -1) to i1* + ret i1* %t +} + +; PLAIN: define i64 @fa() nounwind { +; PLAIN: %t = bitcast i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2310) to i64 +; PLAIN: ret i64 %t +; PLAIN: } +; PLAIN: define i64 @fb() nounwind { +; PLAIN: %t = bitcast i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) to i64 +; PLAIN: ret i64 %t +; PLAIN: } +; PLAIN: define i64 @fc() nounwind { +; PLAIN: %t = bitcast i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2) to i64 +; PLAIN: ret i64 %t +; PLAIN: } +; PLAIN: define i64 @fd() nounwind { +; PLAIN: %t = bitcast i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 11) to i64 +; PLAIN: ret i64 %t +; PLAIN: } +; PLAIN: define i64 @fe() nounwind { +; PLAIN: %t = bitcast i64 ptrtoint (double* getelementptr (%1* null, i64 0, i32 2) to i64) to i64 +; PLAIN: ret i64 %t +; PLAIN: } +; PLAIN: define i64 @ff() nounwind { +; PLAIN: %t = bitcast i64 1 to i64 +; PLAIN: ret i64 %t +; PLAIN: } +; OPT: define i64 @fa() nounwind { +; OPT: ret i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2310) +; OPT: } +; OPT: define i64 @fb() nounwind { +; OPT: ret i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) +; OPT: } +; OPT: define i64 @fc() nounwind { +; OPT: ret i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2) +; OPT: } +; OPT: define i64 @fd() nounwind { +; OPT: ret i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 11) +; OPT: } +; OPT: define i64 @fe() nounwind { +; OPT: ret i64 ptrtoint (double* getelementptr (%1* null, i64 0, i32 2) to i64) +; OPT: } +; OPT: define i64 @ff() nounwind { +; OPT: ret i64 1 +; OPT: } +; TO: define i64 @fa() nounwind { +; TO: ret i64 18480 +; TO: } +; TO: define i64 @fb() nounwind { +; TO: ret i64 8 +; TO: } +; TO: define i64 @fc() nounwind { +; TO: ret i64 16 +; TO: } +; TO: define i64 @fd() nounwind { +; TO: ret i64 88 +; TO: } +; TO: define i64 @fe() nounwind { +; TO: ret i64 16 +; TO: } +; TO: define i64 @ff() nounwind { +; TO: ret i64 1 +; TO: } +; SCEV: Classifying expressions for: @fa +; SCEV: %t = bitcast i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2310) to i64 +; SCEV: --> (2310 * sizeof(double)) +; SCEV: Classifying expressions for: @fb +; SCEV: %t = bitcast i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) to i64 +; SCEV: --> alignof(double) +; SCEV: Classifying expressions for: @fc +; SCEV: %t = bitcast i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2) to i64 +; SCEV: --> (2 * sizeof(double)) +; SCEV: Classifying expressions for: @fd +; SCEV: %t = bitcast i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 11) to i64 +; SCEV: --> (11 * sizeof(double)) +; SCEV: Classifying expressions for: @fe +; SCEV: %t = bitcast i64 ptrtoint (double* getelementptr (%1* null, i64 0, i32 2) to i64) to i64 +; SCEV: --> offsetof({ double, float, double, double }, 2) +; SCEV: Classifying expressions for: @ff +; SCEV: %t = bitcast i64 1 to i64 +; SCEV: --> 1 + +define i64 @fa() nounwind { + %t = bitcast i64 mul (i64 3, i64 mul (i64 ptrtoint ({[7 x double], [7 x double]}* getelementptr ({[7 x double], [7 x double]}* null, i64 11) to i64), i64 5)) to i64 + ret i64 %t +} +define i64 @fb() nounwind { + %t = bitcast i64 ptrtoint ([13 x double]* getelementptr ({i1, [13 x double]}* null, i64 0, i32 1) to i64) to i64 + ret i64 %t +} +define i64 @fc() nounwind { + %t = bitcast i64 ptrtoint (double* getelementptr ({double, double, double, double}* null, i64 0, i32 2) to i64) to i64 + ret i64 %t +} +define i64 @fd() nounwind { + %t = bitcast i64 ptrtoint (double* getelementptr ([13 x double]* null, i64 0, i32 11) to i64) to i64 + ret i64 %t +} +define i64 @fe() nounwind { + %t = bitcast i64 ptrtoint (double* getelementptr ({double, float, double, double}* null, i64 0, i32 2) to i64) to i64 + ret i64 %t +} +define i64 @ff() nounwind { + %t = bitcast i64 ptrtoint (<{ i16, i128 }>* getelementptr ({i1, <{ i16, i128 }>}* null, i64 0, i32 1) to i64) to i64 + ret i64 %t +} + +; PLAIN: define i64* @fM() nounwind { +; PLAIN: %t = bitcast i64* getelementptr (i64* null, i32 1) to i64* +; PLAIN: ret i64* %t +; PLAIN: } +; PLAIN: define i64* @fN() nounwind { +; PLAIN: %t = bitcast i64* getelementptr (%2* null, i32 0, i32 1) to i64* +; PLAIN: ret i64* %t +; PLAIN: } +; PLAIN: define i64* @fO() nounwind { +; PLAIN: %t = bitcast i64* getelementptr ([2 x i64]* null, i32 0, i32 1) to i64* +; PLAIN: ret i64* %t +; PLAIN: } +; OPT: define i64* @fM() nounwind { +; OPT: ret i64* getelementptr (i64* null, i32 1) +; OPT: } +; OPT: define i64* @fN() nounwind { +; OPT: ret i64* getelementptr (%2* null, i32 0, i32 1) +; OPT: } +; OPT: define i64* @fO() nounwind { +; OPT: ret i64* getelementptr ([2 x i64]* null, i32 0, i32 1) +; OPT: } +; TO: define i64* @fM() nounwind { +; TO: ret i64* inttoptr (i64 8 to i64*) +; TO: } +; TO: define i64* @fN() nounwind { +; TO: ret i64* inttoptr (i64 8 to i64*) +; TO: } +; TO: define i64* @fO() nounwind { +; TO: ret i64* inttoptr (i64 8 to i64*) +; TO: } +; SCEV: Classifying expressions for: @fM +; SCEV: %t = bitcast i64* getelementptr (i64* null, i32 1) to i64* +; SCEV: --> sizeof(i64) +; SCEV: Classifying expressions for: @fN +; SCEV: %t = bitcast i64* getelementptr (%2* null, i32 0, i32 1) to i64* +; SCEV: --> sizeof(i64) +; SCEV: Classifying expressions for: @fO +; SCEV: %t = bitcast i64* getelementptr ([2 x i64]* null, i32 0, i32 1) to i64* +; SCEV: --> sizeof(i64) + +define i64* @fM() nounwind { + %t = bitcast i64* getelementptr (i64 *null, i32 1) to i64* + ret i64* %t +} +define i64* @fN() nounwind { + %t = bitcast i64* getelementptr ({ i64, i64 } *null, i32 0, i32 1) to i64* + ret i64* %t +} +define i64* @fO() nounwind { + %t = bitcast i64* getelementptr ([2 x i64] *null, i32 0, i32 1) to i64* + ret i64* %t } Modified: llvm/trunk/test/Transforms/InstCombine/getelementptr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/getelementptr.ll?rev=94987&r1=94986&r2=94987&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/getelementptr.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/getelementptr.ll Mon Feb 1 12:27:38 2010 @@ -246,7 +246,7 @@ store i32 0, i32* %tmp53 ret void ; CHECK: @test24 -; CHECK: store i32 0, i32* getelementptr (%"java/lang/StringBuffer"* null, i32 0, i32 1) +; CHECK: store i32 0, i32* getelementptr (%"java/lang/StringBuffer"* null, i64 0, i32 1) } define void @test25() { From gohman at apple.com Mon Feb 1 13:00:32 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 01 Feb 2010 19:00:32 -0000 Subject: [llvm-commits] [llvm] r94989 - /llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll Message-ID: <201002011900.o11J0WCg002561@zion.cs.uiuc.edu> Author: djg Date: Mon Feb 1 13:00:32 2010 New Revision: 94989 URL: http://llvm.org/viewvc/llvm-project?rev=94989&view=rev Log: Update this test for a trivial register allocation difference. Modified: llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll Modified: llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll?rev=94989&r1=94988&r2=94989&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll (original) +++ llvm/trunk/test/CodeGen/X86/2009-09-07-CoalescerBug.ll Mon Feb 1 13:00:32 2010 @@ -8,8 +8,8 @@ define i64 @hammer_time(i64 %modulep, i64 %physfree) nounwind ssp noredzone noimplicitfloat { ; CHECK: hammer_time: ; CHECK: movq $Xrsvd, %rax +; CHECK: movq $Xrsvd, %rsi ; CHECK: movq $Xrsvd, %rdi -; CHECK: movq $Xrsvd, %r8 entry: br i1 undef, label %if.then, label %if.end From wangmp at apple.com Mon Feb 1 13:03:19 2010 From: wangmp at apple.com (Mon P Wang) Date: Mon, 01 Feb 2010 19:03:19 -0000 Subject: [llvm-commits] [llvm] r94990 - in /llvm/trunk/lib/CodeGen/SelectionDAG: DAGCombiner.cpp SelectionDAG.cpp Message-ID: <201002011903.o11J3JvW002675@zion.cs.uiuc.edu> Author: wangmp Date: Mon Feb 1 13:03:18 2010 New Revision: 94990 URL: http://llvm.org/viewvc/llvm-project?rev=94990&view=rev Log: Fixed a couple of optimization with EXTRACT_VECTOR_ELT that assumes the result type is the same as the element type of the vector. EXTRACT_VECTOR_ELT can be used to extended the width of an integer type. This fixes a bug for Generic/vector-casts.ll on a ppc750. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=94990&r1=94989&r2=94990&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Feb 1 13:03:18 2010 @@ -5403,12 +5403,19 @@ SDValue InVec = N->getOperand(0); if (InVec.getOpcode() == ISD::SCALAR_TO_VECTOR) { - // If the operand is wider than the vector element type then it is implicitly - // truncated. Make that explicit here. + // Check if the result type doesn't match the inserted element type. A + // SCALAR_TO_VECTOR may truncate the inserted element and the + // EXTRACT_VECTOR_ELT may widen the extracted vector. EVT EltVT = InVec.getValueType().getVectorElementType(); SDValue InOp = InVec.getOperand(0); - if (InOp.getValueType() != EltVT) - return DAG.getNode(ISD::TRUNCATE, InVec.getDebugLoc(), EltVT, InOp); + EVT NVT = N->getValueType(0); + if (InOp.getValueType() != NVT) { + assert(InOp.getValueType().isInteger() && NVT.isInteger()); + if (NVT.getSizeInBits() > InOp.getValueType().getSizeInBits()) + return DAG.getNode(ISD::SIGN_EXTEND, InVec.getDebugLoc(), NVT, InOp); + else + return DAG.getNode(ISD::TRUNCATE, InVec.getDebugLoc(), NVT, InOp); + } return InOp; } Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=94990&r1=94989&r2=94990&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Feb 1 13:03:18 2010 @@ -2765,7 +2765,7 @@ // operations are lowered to scalars. if (N1.getOpcode() == ISD::INSERT_VECTOR_ELT) { // If the indices are the same, return the inserted element. - if (N1.getOperand(2) == N2) + if (N1.getOperand(2) == N2 && VT == N1.getOperand(1).getValueType()) return N1.getOperand(1); // If the indices are known different, extract the element from // the original vector. From baldrick at free.fr Mon Feb 1 13:20:51 2010 From: baldrick at free.fr (Duncan Sands) Date: Mon, 01 Feb 2010 20:20:51 +0100 Subject: [llvm-commits] [llvm] r94990 - in /llvm/trunk/lib/CodeGen/SelectionDAG: DAGCombiner.cpp SelectionDAG.cpp In-Reply-To: <201002011903.o11J3JvW002675@zion.cs.uiuc.edu> References: <201002011903.o11J3JvW002675@zion.cs.uiuc.edu> Message-ID: <4B672993.3020002@free.fr> Hi Mon Ping, > Fixed a couple of optimization with EXTRACT_VECTOR_ELT that assumes the result > type is the same as the element type of the vector. EXTRACT_VECTOR_ELT can > be used to extended the width of an integer type. This fixes a bug for > Generic/vector-casts.ll on a ppc750. according to the comments in SelectionDAGNodes.h, the operand is only allowed to be wider (or the same as) the element type. If the docs are wrong, please correct them. Are they wrong? Is it a good idea to allow the operand to be smaller than the element type, and if so what kind of implicit extension is being done - anyextend? > - if (InOp.getValueType() != EltVT) > - return DAG.getNode(ISD::TRUNCATE, InVec.getDebugLoc(), EltVT, InOp); > + EVT NVT = N->getValueType(0); > + if (InOp.getValueType() != NVT) { > + assert(InOp.getValueType().isInteger() && NVT.isInteger()); > + if (NVT.getSizeInBits() > InOp.getValueType().getSizeInBits()) > + return DAG.getNode(ISD::SIGN_EXTEND, InVec.getDebugLoc(), NVT, InOp); > + else > + return DAG.getNode(ISD::TRUNCATE, InVec.getDebugLoc(), NVT, InOp); > + } There is a special method for this: DAG.getSExtOrTrunc. > @@ -2765,7 +2765,7 @@ > // operations are lowered to scalars. > if (N1.getOpcode() == ISD::INSERT_VECTOR_ELT) { > // If the indices are the same, return the inserted element. > - if (N1.getOperand(2) == N2) > + if (N1.getOperand(2) == N2 && VT == N1.getOperand(1).getValueType()) > return N1.getOperand(1); > // If the indices are known different, extract the element from > // the original vector. Why not just extend/truncate here too? Ciao, Duncan. From sabre at nondot.org Mon Feb 1 13:35:08 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Feb 2010 19:35:08 -0000 Subject: [llvm-commits] [llvm] r94993 - in /llvm/trunk: lib/VMCore/ConstantFold.cpp test/Transforms/ConstProp/basictest.ll Message-ID: <201002011935.o11JZ8wf004177@zion.cs.uiuc.edu> Author: lattner Date: Mon Feb 1 13:35:08 2010 New Revision: 94993 URL: http://llvm.org/viewvc/llvm-project?rev=94993&view=rev Log: fix PR6197 - infinite recursion in ipsccp due to block addresses evaluateICmpRelation wasn't handling blockaddress. Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp llvm/trunk/test/Transforms/ConstProp/basictest.ll Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=94993&r1=94992&r2=94993&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Mon Feb 1 13:35:08 2010 @@ -1506,15 +1506,16 @@ /// GlobalValues, followed by ConstantExpr's (the most complex). /// static ICmpInst::Predicate evaluateICmpRelation(LLVMContext &Context, - Constant *V1, - Constant *V2, + Constant *V1, Constant *V2, bool isSigned) { assert(V1->getType() == V2->getType() && "Cannot compare different types of values!"); if (V1 == V2) return ICmpInst::ICMP_EQ; - if (!isa(V1) && !isa(V1)) { - if (!isa(V2) && !isa(V2)) { + if (!isa(V1) && !isa(V1) && + !isa(V1)) { + if (!isa(V2) && !isa(V2) && + !isa(V2)) { // We distilled this down to a simple case, use the standard constant // folder. ConstantInt *R = 0; @@ -1541,32 +1542,59 @@ if (SwappedRelation != ICmpInst::BAD_ICMP_PREDICATE) return ICmpInst::getSwappedPredicate(SwappedRelation); - } else if (const GlobalValue *CPR1 = dyn_cast(V1)) { + } else if (const GlobalValue *GV = dyn_cast(V1)) { if (isa(V2)) { // Swap as necessary. ICmpInst::Predicate SwappedRelation = evaluateICmpRelation(Context, V2, V1, isSigned); if (SwappedRelation != ICmpInst::BAD_ICMP_PREDICATE) return ICmpInst::getSwappedPredicate(SwappedRelation); - else - return ICmpInst::BAD_ICMP_PREDICATE; + return ICmpInst::BAD_ICMP_PREDICATE; } - // Now we know that the RHS is a GlobalValue or simple constant, - // which (since the types must match) means that it's a ConstantPointerNull. - if (const GlobalValue *CPR2 = dyn_cast(V2)) { + // Now we know that the RHS is a GlobalValue, BlockAddress or simple + // constant (which, since the types must match, means that it's a + // ConstantPointerNull). + if (const GlobalValue *GV2 = dyn_cast(V2)) { // Don't try to decide equality of aliases. - if (!isa(CPR1) && !isa(CPR2)) - if (!CPR1->hasExternalWeakLinkage() || !CPR2->hasExternalWeakLinkage()) + if (!isa(GV) && !isa(GV2)) + if (!GV->hasExternalWeakLinkage() || !GV2->hasExternalWeakLinkage()) return ICmpInst::ICMP_NE; + } else if (isa(V2)) { + return ICmpInst::ICMP_NE; // Globals never equal labels. } else { assert(isa(V2) && "Canonicalization guarantee!"); - // GlobalVals can never be null. Don't try to evaluate aliases. - if (!CPR1->hasExternalWeakLinkage() && !isa(CPR1)) + // GlobalVals can never be null unless they have external weak linkage. + // We don't try to evaluate aliases here. + if (!GV->hasExternalWeakLinkage() && !isa(GV)) return ICmpInst::ICMP_NE; } + } else if (const BlockAddress *BA = dyn_cast(V1)) { + if (isa(V2)) { // Swap as necessary. + ICmpInst::Predicate SwappedRelation = + evaluateICmpRelation(Context, V2, V1, isSigned); + if (SwappedRelation != ICmpInst::BAD_ICMP_PREDICATE) + return ICmpInst::getSwappedPredicate(SwappedRelation); + return ICmpInst::BAD_ICMP_PREDICATE; + } + + // Now we know that the RHS is a GlobalValue, BlockAddress or simple + // constant (which, since the types must match, means that it is a + // ConstantPointerNull). + if (const BlockAddress *BA2 = dyn_cast(V2)) { + // Block address in another function can't equal this one, but block + // addresses in the current function might be the same if blocks are + // empty. + if (BA2->getFunction() != BA->getFunction()) + return ICmpInst::ICMP_NE; + } else { + // Block addresses aren't null, don't equal the address of globals. + assert((isa(V2) || isa(V2)) && + "Canonicalization guarantee!"); + return ICmpInst::ICMP_NE; + } } else { // Ok, the LHS is known to be a constantexpr. The RHS can be any of a - // constantexpr, a CPR, or a simple constant. + // constantexpr, a global, block address, or a simple constant. ConstantExpr *CE1 = cast(V1); Constant *CE1Op0 = CE1->getOperand(0); @@ -1621,9 +1649,9 @@ return ICmpInst::ICMP_EQ; } // Otherwise, we can't really say if the first operand is null or not. - } else if (const GlobalValue *CPR2 = dyn_cast(V2)) { + } else if (const GlobalValue *GV2 = dyn_cast(V2)) { if (isa(CE1Op0)) { - if (CPR2->hasExternalWeakLinkage()) + if (GV2->hasExternalWeakLinkage()) // Weak linkage GVals could be zero or not. We're comparing it to // a null pointer, so its less-or-equal return isSigned ? ICmpInst::ICMP_SLE : ICmpInst::ICMP_ULE; @@ -1631,8 +1659,8 @@ // If its not weak linkage, the GVal must have a non-zero address // so the result is less-than return isSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT; - } else if (const GlobalValue *CPR1 = dyn_cast(CE1Op0)) { - if (CPR1 == CPR2) { + } else if (const GlobalValue *GV = dyn_cast(CE1Op0)) { + if (GV == GV2) { // If this is a getelementptr of the same global, then it must be // different. Because the types must match, the getelementptr could // only have at most one index, and because we fold getelementptr's Modified: llvm/trunk/test/Transforms/ConstProp/basictest.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ConstProp/basictest.ll?rev=94993&r1=94992&r2=94993&view=diff ============================================================================== --- llvm/trunk/test/Transforms/ConstProp/basictest.ll (original) +++ llvm/trunk/test/Transforms/ConstProp/basictest.ll Mon Feb 1 13:35:08 2010 @@ -19,3 +19,15 @@ ret i32 %Ret } + +; PR6197 +define i1 @test2(i8* %f) nounwind { +entry: + %V = icmp ne i8* blockaddress(@test2, %bb), null + br label %bb +bb: + ret i1 %V + +; CHECK: @test2 +; CHECK: ret i1 true +} From duncan.sands at math.u-psud.fr Mon Feb 1 13:22:03 2010 From: duncan.sands at math.u-psud.fr (Duncan Sands) Date: Mon, 01 Feb 2010 20:22:03 +0100 Subject: [llvm-commits] [llvm] r94990 - in /llvm/trunk/lib/CodeGen/SelectionDAG: DAGCombiner.cpp SelectionDAG.cpp In-Reply-To: <201002011903.o11J3JvW002675@zion.cs.uiuc.edu> References: <201002011903.o11J3JvW002675@zion.cs.uiuc.edu> Message-ID: <4B6729DB.7000607@math.u-psud.fr> PS: My comment here wasn't relevant - I hadn't understood the situation. Sorry for the noise. >> Fixed a couple of optimization with EXTRACT_VECTOR_ELT that assumes the result >> type is the same as the element type of the vector. EXTRACT_VECTOR_ELT can >> be used to extended the width of an integer type. This fixes a bug for >> Generic/vector-casts.ll on a ppc750. > > according to the comments in SelectionDAGNodes.h, the operand is only allowed > to be wider (or the same as) the element type. If the docs are wrong, please > correct them. Are they wrong? Is it a good idea to allow the operand to be > smaller than the element type, and if so what kind of implicit extension is > being done - anyextend? From sabre at nondot.org Mon Feb 1 13:54:46 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Feb 2010 19:54:46 -0000 Subject: [llvm-commits] [llvm] r94995 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Message-ID: <201002011954.o11Jskob005157@zion.cs.uiuc.edu> Author: lattner Date: Mon Feb 1 13:54:45 2010 New Revision: 94995 URL: http://llvm.org/viewvc/llvm-project?rev=94995&view=rev Log: cleanups. Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=94995&r1=94994&r2=94995&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Mon Feb 1 13:54:45 2010 @@ -1589,24 +1589,24 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) { bool Changed = false; + Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); /// Orders the operands of the compare so that they are listed from most /// complex to least complex. This puts constants before unary operators, /// before binary operators. - if (getComplexity(I.getOperand(0)) < getComplexity(I.getOperand(1))) { + if (getComplexity(Op0) < getComplexity(Op1)) { I.swapOperands(); + std::swap(Op0, Op1); Changed = true; } - Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); - if (Value *V = SimplifyICmpInst(I.getPredicate(), Op0, Op1, TD)) return ReplaceInstUsesWith(I, V); const Type *Ty = Op0->getType(); // icmp's with boolean values can always be turned into bitwise operations - if (Ty == Type::getInt1Ty(I.getContext())) { + if (Ty->isInteger(1)) { switch (I.getPredicate()) { default: llvm_unreachable("Invalid icmp instruction!"); case ICmpInst::ICMP_EQ: { // icmp eq i1 A, B -> ~(A^B) From dalej at apple.com Mon Feb 1 13:54:54 2010 From: dalej at apple.com (Dale Johannesen) Date: Mon, 01 Feb 2010 19:54:54 -0000 Subject: [llvm-commits] [llvm] r94996 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Message-ID: <201002011954.o11JssYY005176@zion.cs.uiuc.edu> Author: johannes Date: Mon Feb 1 13:54:53 2010 New Revision: 94996 URL: http://llvm.org/viewvc/llvm-project?rev=94996&view=rev Log: fix PR 6157. Testcase pending. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=94996&r1=94995&r2=94996&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Mon Feb 1 13:54:53 2010 @@ -3747,6 +3747,8 @@ return 0; } case Intrinsic::dbg_declare: { + // FIXME: currently, we get here only if OptLevel != CodeGenOpt::None. + // The real handling of this intrinsic is in FastISel. if (OptLevel != CodeGenOpt::None) // FIXME: Variable debug info is not supported here. return 0; @@ -3776,6 +3778,39 @@ MMI->setVariableDbgInfo(Variable, FI, Dbg); return 0; } + case Intrinsic::dbg_value: { + // FIXME: currently, we get here only if OptLevel != CodeGenOpt::None. + // The real handling of this intrinsic is in FastISel. + if (OptLevel != CodeGenOpt::None) + // FIXME: Variable debug info is not supported here. + return 0; + DwarfWriter *DW = DAG.getDwarfWriter(); + if (!DW) + return 0; + DbgValueInst &DI = cast(I); + if (!DIDescriptor::ValidDebugInfo(DI.getVariable(), CodeGenOpt::None)) + return 0; + + MDNode *Variable = DI.getVariable(); + Value *V = DI.getValue(); + if (!V) + return 0; + if (BitCastInst *BCI = dyn_cast(V)) + V = BCI->getOperand(0); + AllocaInst *AI = dyn_cast(V); + // Don't handle byval struct arguments or VLAs, for example. + if (!AI) + return 0; + DenseMap::iterator SI = + FuncInfo.StaticAllocaMap.find(AI); + if (SI == FuncInfo.StaticAllocaMap.end()) + return 0; // VLAs. + int FI = SI->second; + if (MachineModuleInfo *MMI = DAG.getMachineModuleInfo()) + if (MDNode *Dbg = DI.getMetadata("dbg")) + MMI->setVariableDbgInfo(Variable, FI, Dbg); + return 0; + } case Intrinsic::eh_exception: { // Insert the EXCEPTIONADDR instruction. assert(CurMBB->isLandingPad() &&"Call to eh.exception not in landing pad!"); From sabre at nondot.org Mon Feb 1 14:04:40 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Feb 2010 20:04:40 -0000 Subject: [llvm-commits] [llvm] r94997 - in /llvm/trunk: lib/VMCore/ConstantFold.cpp test/Transforms/InstCombine/icmp.ll Message-ID: <201002012004.o11K4eux005520@zion.cs.uiuc.edu> Author: lattner Date: Mon Feb 1 14:04:40 2010 New Revision: 94997 URL: http://llvm.org/viewvc/llvm-project?rev=94997&view=rev Log: fix PR6195, a bug constant folding scalar -> vector compares. Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp llvm/trunk/test/Transforms/InstCombine/icmp.ll Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=94997&r1=94996&r2=94997&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Mon Feb 1 14:04:40 2010 @@ -2017,10 +2017,12 @@ return ConstantInt::get(Type::getInt1Ty(Context), Result); // If the right hand side is a bitcast, try using its inverse to simplify - // it by moving it to the left hand side. + // it by moving it to the left hand side. We can't do this if it would turn + // a vector compare into scalar compare of visa versa. if (ConstantExpr *CE2 = dyn_cast(C2)) { - if (CE2->getOpcode() == Instruction::BitCast) { - Constant *CE2Op0 = CE2->getOperand(0); + Constant *CE2Op0 = CE2->getOperand(0); + if (CE2->getOpcode() == Instruction::BitCast && + isa(CE2->getType()) ==isa(CE2Op0->getType())){ Constant *Inverse = ConstantExpr::getBitCast(C1, CE2Op0->getType()); return ConstantExpr::getICmp(pred, Inverse, CE2Op0); } Modified: llvm/trunk/test/Transforms/InstCombine/icmp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/icmp.ll?rev=94997&r1=94996&r2=94997&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/icmp.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/icmp.ll Mon Feb 1 14:04:40 2010 @@ -112,3 +112,12 @@ ; CHECK: ret i1 true } +; PR6195 +define i1 @test12(i1 %A) { + %S = select i1 %A, i64 -4294967295, i64 8589934591 + %B = icmp ne i64 bitcast (<2 x i32> to i64), %S + ret i1 %B +; CHECK: @test12 +; CHECK-NEXT: %B = select i1 +; CHECK-NEXT: ret i1 %B +} From gohman at apple.com Mon Feb 1 14:23:01 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 1 Feb 2010 12:23:01 -0800 Subject: [llvm-commits] [llvm] r94974 - in /llvm/trunk/tools/ed: EDDisassembler.cpp EDDisassembler.h EDInst.cpp EDInst.h EDMain.cpp EDOperand.cpp EDOperand.h EDToken.cpp EDToken.h EnhancedDisassembly.exports In-Reply-To: <201002010849.o118na7N001735@zion.cs.uiuc.edu> References: <201002010849.o118na7N001735@zion.cs.uiuc.edu> Message-ID: <62466162-CB31-45F8-97F8-1BEAFE0017A2@apple.com> Hi Sean, "ed" is the name of a standard utility program in POSIX, SUS, etc. Dan On Feb 1, 2010, at 12:49 AM, Sean Callanan wrote: > Author: spyffe > Date: Mon Feb 1 02:49:35 2010 > New Revision: 94974 > > URL: http://llvm.org/viewvc/llvm-project?rev=94974&view=rev > Log: > Added the enhanced disassembly library's implementation and > fleshed out the .exports file. I still have to fix several > details of operand parsing, but the basic functionality is > there and usable. > > Added: > llvm/trunk/tools/ed/EDDisassembler.cpp > llvm/trunk/tools/ed/EDDisassembler.h > llvm/trunk/tools/ed/EDInst.cpp > llvm/trunk/tools/ed/EDInst.h > llvm/trunk/tools/ed/EDOperand.cpp > llvm/trunk/tools/ed/EDOperand.h > llvm/trunk/tools/ed/EDToken.cpp > llvm/trunk/tools/ed/EDToken.h > Modified: > llvm/trunk/tools/ed/EDMain.cpp > llvm/trunk/tools/ed/EnhancedDisassembly.exports > > Added: llvm/trunk/tools/ed/EDDisassembler.cpp From baldrick at free.fr Mon Feb 1 14:42:03 2010 From: baldrick at free.fr (Duncan Sands) Date: Mon, 01 Feb 2010 20:42:03 -0000 Subject: [llvm-commits] [llvm] r95000 - /llvm/trunk/lib/VMCore/ConstantFold.cpp Message-ID: <201002012042.o11Kg3kx007367@zion.cs.uiuc.edu> Author: baldrick Date: Mon Feb 1 14:42:02 2010 New Revision: 95000 URL: http://llvm.org/viewvc/llvm-project?rev=95000&view=rev Log: Fix typo "of" -> "or" and change the way a line was formatted to fit into 80 columns to match my artistic preferences. Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=95000&r1=94999&r2=95000&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Mon Feb 1 14:42:02 2010 @@ -2018,11 +2018,11 @@ // If the right hand side is a bitcast, try using its inverse to simplify // it by moving it to the left hand side. We can't do this if it would turn - // a vector compare into scalar compare of visa versa. + // a vector compare into a scalar compare or visa versa. if (ConstantExpr *CE2 = dyn_cast(C2)) { Constant *CE2Op0 = CE2->getOperand(0); if (CE2->getOpcode() == Instruction::BitCast && - isa(CE2->getType()) ==isa(CE2Op0->getType())){ + isa(CE2->getType())==isa(CE2Op0->getType())) { Constant *Inverse = ConstantExpr::getBitCast(C1, CE2Op0->getType()); return ConstantExpr::getICmp(pred, Inverse, CE2Op0); } From sabre at nondot.org Mon Feb 1 14:48:09 2010 From: sabre at nondot.org (Chris Lattner) Date: Mon, 01 Feb 2010 20:48:09 -0000 Subject: [llvm-commits] [llvm] r95001 - in /llvm/trunk: include/llvm/Constant.h lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/VMCore/ConstantFold.cpp lib/VMCore/ConstantFold.h lib/VMCore/Constants.cpp Message-ID: <201002012048.o11Km90E007660@zion.cs.uiuc.edu> Author: lattner Date: Mon Feb 1 14:48:08 2010 New Revision: 95001 URL: http://llvm.org/viewvc/llvm-project?rev=95001&view=rev Log: eliminate a bunch of pointless LLVMContext arguments. Modified: llvm/trunk/include/llvm/Constant.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/trunk/lib/VMCore/ConstantFold.cpp llvm/trunk/lib/VMCore/ConstantFold.h llvm/trunk/lib/VMCore/Constants.cpp Modified: llvm/trunk/include/llvm/Constant.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constant.h?rev=95001&r1=95000&r2=95001&view=diff ============================================================================== --- llvm/trunk/include/llvm/Constant.h (original) +++ llvm/trunk/include/llvm/Constant.h Mon Feb 1 14:48:08 2010 @@ -104,8 +104,7 @@ /// type, returns the elements of the vector in the specified smallvector. /// This handles breaking down a vector undef into undef elements, etc. For /// constant exprs and other cases we can't handle, we return an empty vector. - void getVectorElements(LLVMContext &Context, - SmallVectorImpl &Elts) const; + void getVectorElements(SmallVectorImpl &Elts) const; /// destroyConstant - Called if some element of this constant is no longer /// valid. At this point only other constants may be on the use_list for this Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=95001&r1=95000&r2=95001&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Mon Feb 1 14:48:08 2010 @@ -2317,8 +2317,7 @@ // Convert the ConstantVector mask operand into an array of ints, with -1 // representing undef values. SmallVector MaskElts; - cast(I.getOperand(2))->getVectorElements(*DAG.getContext(), - MaskElts); + cast(I.getOperand(2))->getVectorElements(MaskElts); unsigned MaskNumElts = MaskElts.size(); for (unsigned i = 0; i != MaskNumElts; ++i) { if (isa(MaskElts[i])) Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=95001&r1=95000&r2=95001&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Mon Feb 1 14:48:08 2010 @@ -24,7 +24,6 @@ #include "llvm/Function.h" #include "llvm/GlobalAlias.h" #include "llvm/GlobalVariable.h" -#include "llvm/LLVMContext.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/ErrorHandling.h" @@ -41,7 +40,7 @@ /// BitCastConstantVector - Convert the specified ConstantVector node to the /// specified vector type. At this point, we know that the elements of the /// input vector constant are all simple integer or FP values. -static Constant *BitCastConstantVector(LLVMContext &Context, ConstantVector *CV, +static Constant *BitCastConstantVector(ConstantVector *CV, const VectorType *DstTy) { // If this cast changes element count then we can't handle it here: // doing so requires endianness information. This should be handled by @@ -91,8 +90,7 @@ Type::getInt64Ty(DstTy->getContext())); } -static Constant *FoldBitCast(LLVMContext &Context, - Constant *V, const Type *DestTy) { +static Constant *FoldBitCast(Constant *V, const Type *DestTy) { const Type *SrcTy = V->getType(); if (SrcTy == DestTy) return V; // no-op cast @@ -103,7 +101,8 @@ if (const PointerType *DPTy = dyn_cast(DestTy)) if (PTy->getAddressSpace() == DPTy->getAddressSpace()) { SmallVector IdxList; - Value *Zero = Constant::getNullValue(Type::getInt32Ty(Context)); + Value *Zero = + Constant::getNullValue(Type::getInt32Ty(DPTy->getContext())); IdxList.push_back(Zero); const Type *ElTy = PTy->getElementType(); while (ElTy != DPTy->getElementType()) { @@ -139,15 +138,14 @@ return Constant::getNullValue(DestTy); if (ConstantVector *CV = dyn_cast(V)) - return BitCastConstantVector(Context, CV, DestPTy); + return BitCastConstantVector(CV, DestPTy); } // Canonicalize scalar-to-vector bitcasts into vector-to-vector bitcasts // This allows for other simplifications (although some of them // can only be handled by Analysis/ConstantFolding.cpp). if (isa(V) || isa(V)) - return ConstantExpr::getBitCast( - ConstantVector::get(&V, 1), DestPTy); + return ConstantExpr::getBitCast(ConstantVector::get(&V, 1), DestPTy); } // Finally, implement bitcast folding now. The code below doesn't handle @@ -163,17 +161,18 @@ return V; if (DestTy->isFloatingPoint()) - return ConstantFP::get(Context, APFloat(CI->getValue(), - DestTy != Type::getPPC_FP128Ty(Context))); + return ConstantFP::get(DestTy->getContext(), + APFloat(CI->getValue(), + !DestTy->isPPC_FP128Ty())); // Otherwise, can't fold this (vector?) return 0; } - // Handle ConstantFP input. + // Handle ConstantFP input: FP -> Integral. if (ConstantFP *FP = dyn_cast(V)) - // FP -> Integral. - return ConstantInt::get(Context, FP->getValueAPF().bitcastToAPInt()); + return ConstantInt::get(FP->getContext(), + FP->getValueAPF().bitcastToAPInt()); return 0; } @@ -434,8 +433,7 @@ return C; } -Constant *llvm::ConstantFoldCastInstruction(LLVMContext &Context, - unsigned opc, Constant *V, +Constant *llvm::ConstantFoldCastInstruction(unsigned opc, Constant *V, const Type *DestTy) { if (isa(V)) { // zext(undef) = 0, because the top bits will be zero. @@ -504,7 +502,7 @@ DestTy->isFP128Ty() ? APFloat::IEEEquad : APFloat::Bogus, APFloat::rmNearestTiesToEven, &ignored); - return ConstantFP::get(Context, Val); + return ConstantFP::get(V->getContext(), Val); } return 0; // Can't fold. case Instruction::FPToUI: @@ -517,7 +515,7 @@ (void) V.convertToInteger(x, DestBitWidth, opc==Instruction::FPToSI, APFloat::rmTowardZero, &ignored); APInt Val(DestBitWidth, 2, x); - return ConstantInt::get(Context, Val); + return ConstantInt::get(FPC->getContext(), Val); } return 0; // Can't fold. case Instruction::IntToPtr: //always treated as unsigned @@ -593,7 +591,7 @@ (void)apf.convertFromAPInt(api, opc==Instruction::SIToFP, APFloat::rmNearestTiesToEven); - return ConstantFP::get(Context, apf); + return ConstantFP::get(V->getContext(), apf); } return 0; case Instruction::ZExt: @@ -601,7 +599,7 @@ uint32_t BitWidth = cast(DestTy)->getBitWidth(); APInt Result(CI->getValue()); Result.zext(BitWidth); - return ConstantInt::get(Context, Result); + return ConstantInt::get(V->getContext(), Result); } return 0; case Instruction::SExt: @@ -609,7 +607,7 @@ uint32_t BitWidth = cast(DestTy)->getBitWidth(); APInt Result(CI->getValue()); Result.sext(BitWidth); - return ConstantInt::get(Context, Result); + return ConstantInt::get(V->getContext(), Result); } return 0; case Instruction::Trunc: { @@ -617,7 +615,7 @@ if (ConstantInt *CI = dyn_cast(V)) { APInt Result(CI->getValue()); Result.trunc(DestBitWidth); - return ConstantInt::get(Context, Result); + return ConstantInt::get(V->getContext(), Result); } // The input must be a constantexpr. See if we can simplify this based on @@ -631,12 +629,11 @@ return 0; } case Instruction::BitCast: - return FoldBitCast(Context, V, DestTy); + return FoldBitCast(V, DestTy); } } -Constant *llvm::ConstantFoldSelectInstruction(LLVMContext&, - Constant *Cond, +Constant *llvm::ConstantFoldSelectInstruction(Constant *Cond, Constant *V1, Constant *V2) { if (ConstantInt *CB = dyn_cast(Cond)) return CB->getZExtValue() ? V1 : V2; @@ -648,8 +645,7 @@ return 0; } -Constant *llvm::ConstantFoldExtractElementInstruction(LLVMContext &Context, - Constant *Val, +Constant *llvm::ConstantFoldExtractElementInstruction(Constant *Val, Constant *Idx) { if (isa(Val)) // ee(undef, x) -> undef return UndefValue::get(cast(Val->getType())->getElementType()); @@ -668,8 +664,7 @@ return 0; } -Constant *llvm::ConstantFoldInsertElementInstruction(LLVMContext &Context, - Constant *Val, +Constant *llvm::ConstantFoldInsertElementInstruction(Constant *Val, Constant *Elt, Constant *Idx) { ConstantInt *CIdx = dyn_cast(Idx); @@ -728,8 +723,7 @@ /// GetVectorElement - If C is a ConstantVector, ConstantAggregateZero or Undef /// return the specified element value. Otherwise return null. -static Constant *GetVectorElement(LLVMContext &Context, Constant *C, - unsigned EltNo) { +static Constant *GetVectorElement(Constant *C, unsigned EltNo) { if (ConstantVector *CV = dyn_cast(C)) return CV->getOperand(EltNo); @@ -741,8 +735,7 @@ return 0; } -Constant *llvm::ConstantFoldShuffleVectorInstruction(LLVMContext &Context, - Constant *V1, +Constant *llvm::ConstantFoldShuffleVectorInstruction(Constant *V1, Constant *V2, Constant *Mask) { // Undefined shuffle mask -> undefined value. @@ -755,7 +748,7 @@ // Loop over the shuffle mask, evaluating each element. SmallVector Result; for (unsigned i = 0; i != MaskNumElts; ++i) { - Constant *InElt = GetVectorElement(Context, Mask, i); + Constant *InElt = GetVectorElement(Mask, i); if (InElt == 0) return 0; if (isa(InElt)) @@ -765,9 +758,9 @@ if (Elt >= SrcNumElts*2) InElt = UndefValue::get(EltTy); else if (Elt >= SrcNumElts) - InElt = GetVectorElement(Context, V2, Elt - SrcNumElts); + InElt = GetVectorElement(V2, Elt - SrcNumElts); else - InElt = GetVectorElement(Context, V1, Elt); + InElt = GetVectorElement(V1, Elt); if (InElt == 0) return 0; } else { // Unknown value. @@ -779,8 +772,7 @@ return ConstantVector::get(&Result[0], Result.size()); } -Constant *llvm::ConstantFoldExtractValueInstruction(LLVMContext &Context, - Constant *Agg, +Constant *llvm::ConstantFoldExtractValueInstruction(Constant *Agg, const unsigned *Idxs, unsigned NumIdx) { // Base case: no indices, so return the entire value. @@ -800,19 +792,18 @@ // Otherwise recurse. if (ConstantStruct *CS = dyn_cast(Agg)) - return ConstantFoldExtractValueInstruction(Context, CS->getOperand(*Idxs), + return ConstantFoldExtractValueInstruction(CS->getOperand(*Idxs), Idxs+1, NumIdx-1); if (ConstantArray *CA = dyn_cast(Agg)) - return ConstantFoldExtractValueInstruction(Context, CA->getOperand(*Idxs), + return ConstantFoldExtractValueInstruction(CA->getOperand(*Idxs), Idxs+1, NumIdx-1); ConstantVector *CV = cast(Agg); - return ConstantFoldExtractValueInstruction(Context, CV->getOperand(*Idxs), + return ConstantFoldExtractValueInstruction(CV->getOperand(*Idxs), Idxs+1, NumIdx-1); } -Constant *llvm::ConstantFoldInsertValueInstruction(LLVMContext &Context, - Constant *Agg, +Constant *llvm::ConstantFoldInsertValueInstruction(Constant *Agg, Constant *Val, const unsigned *Idxs, unsigned NumIdx) { @@ -840,14 +831,14 @@ const Type *MemberTy = AggTy->getTypeAtIndex(i); Constant *Op = (*Idxs == i) ? - ConstantFoldInsertValueInstruction(Context, UndefValue::get(MemberTy), + ConstantFoldInsertValueInstruction(UndefValue::get(MemberTy), Val, Idxs+1, NumIdx-1) : UndefValue::get(MemberTy); Ops[i] = Op; } if (const StructType* ST = dyn_cast(AggTy)) - return ConstantStruct::get(Context, Ops, ST->isPacked()); + return ConstantStruct::get(ST->getContext(), Ops, ST->isPacked()); return ConstantArray::get(cast(AggTy), Ops); } @@ -871,15 +862,14 @@ const Type *MemberTy = AggTy->getTypeAtIndex(i); Constant *Op = (*Idxs == i) ? - ConstantFoldInsertValueInstruction(Context, - Constant::getNullValue(MemberTy), + ConstantFoldInsertValueInstruction(Constant::getNullValue(MemberTy), Val, Idxs+1, NumIdx-1) : Constant::getNullValue(MemberTy); Ops[i] = Op; } - if (const StructType* ST = dyn_cast(AggTy)) - return ConstantStruct::get(Context, Ops, ST->isPacked()); + if (const StructType *ST = dyn_cast(AggTy)) + return ConstantStruct::get(ST->getContext(), Ops, ST->isPacked()); return ConstantArray::get(cast(AggTy), Ops); } @@ -889,13 +879,12 @@ for (unsigned i = 0; i < Agg->getNumOperands(); ++i) { Constant *Op = cast(Agg->getOperand(i)); if (*Idxs == i) - Op = ConstantFoldInsertValueInstruction(Context, Op, - Val, Idxs+1, NumIdx-1); + Op = ConstantFoldInsertValueInstruction(Op, Val, Idxs+1, NumIdx-1); Ops[i] = Op; } if (const StructType* ST = dyn_cast(Agg->getType())) - return ConstantStruct::get(Context, Ops, ST->isPacked()); + return ConstantStruct::get(ST->getContext(), Ops, ST->isPacked()); return ConstantArray::get(cast(Agg->getType()), Ops); } @@ -903,8 +892,7 @@ } -Constant *llvm::ConstantFoldBinaryInstruction(LLVMContext &Context, - unsigned Opcode, +Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode, Constant *C1, Constant *C2) { // No compile-time operations on this type yet. if (C1->getType()->isPPC_FP128Ty()) @@ -1061,51 +1049,51 @@ default: break; case Instruction::Add: - return ConstantInt::get(Context, C1V + C2V); + return ConstantInt::get(CI1->getContext(), C1V + C2V); case Instruction::Sub: - return ConstantInt::get(Context, C1V - C2V); + return ConstantInt::get(CI1->getContext(), C1V - C2V); case Instruction::Mul: - return ConstantInt::get(Context, C1V * C2V); + return ConstantInt::get(CI1->getContext(), C1V * C2V); case Instruction::UDiv: assert(!CI2->isNullValue() && "Div by zero handled above"); - return ConstantInt::get(Context, C1V.udiv(C2V)); + return ConstantInt::get(CI1->getContext(), C1V.udiv(C2V)); case Instruction::SDiv: assert(!CI2->isNullValue() && "Div by zero handled above"); if (C2V.isAllOnesValue() && C1V.isMinSignedValue()) return UndefValue::get(CI1->getType()); // MIN_INT / -1 -> undef - return ConstantInt::get(Context, C1V.sdiv(C2V)); + return ConstantInt::get(CI1->getContext(), C1V.sdiv(C2V)); case Instruction::URem: assert(!CI2->isNullValue() && "Div by zero handled above"); - return ConstantInt::get(Context, C1V.urem(C2V)); + return ConstantInt::get(CI1->getContext(), C1V.urem(C2V)); case Instruction::SRem: assert(!CI2->isNullValue() && "Div by zero handled above"); if (C2V.isAllOnesValue() && C1V.isMinSignedValue()) return UndefValue::get(CI1->getType()); // MIN_INT % -1 -> undef - return ConstantInt::get(Context, C1V.srem(C2V)); + return ConstantInt::get(CI1->getContext(), C1V.srem(C2V)); case Instruction::And: - return ConstantInt::get(Context, C1V & C2V); + return ConstantInt::get(CI1->getContext(), C1V & C2V); case Instruction::Or: - return ConstantInt::get(Context, C1V | C2V); + return ConstantInt::get(CI1->getContext(), C1V | C2V); case Instruction::Xor: - return ConstantInt::get(Context, C1V ^ C2V); + return ConstantInt::get(CI1->getContext(), C1V ^ C2V); case Instruction::Shl: { uint32_t shiftAmt = C2V.getZExtValue(); if (shiftAmt < C1V.getBitWidth()) - return ConstantInt::get(Context, C1V.shl(shiftAmt)); + return ConstantInt::get(CI1->getContext(), C1V.shl(shiftAmt)); else return UndefValue::get(C1->getType()); // too big shift is undef } case Instruction::LShr: { uint32_t shiftAmt = C2V.getZExtValue(); if (shiftAmt < C1V.getBitWidth()) - return ConstantInt::get(Context, C1V.lshr(shiftAmt)); + return ConstantInt::get(CI1->getContext(), C1V.lshr(shiftAmt)); else return UndefValue::get(C1->getType()); // too big shift is undef } case Instruction::AShr: { uint32_t shiftAmt = C2V.getZExtValue(); if (shiftAmt < C1V.getBitWidth()) - return ConstantInt::get(Context, C1V.ashr(shiftAmt)); + return ConstantInt::get(CI1->getContext(), C1V.ashr(shiftAmt)); else return UndefValue::get(C1->getType()); // too big shift is undef } @@ -1135,19 +1123,19 @@ break; case Instruction::FAdd: (void)C3V.add(C2V, APFloat::rmNearestTiesToEven); - return ConstantFP::get(Context, C3V); + return ConstantFP::get(C1->getContext(), C3V); case Instruction::FSub: (void)C3V.subtract(C2V, APFloat::rmNearestTiesToEven); - return ConstantFP::get(Context, C3V); + return ConstantFP::get(C1->getContext(), C3V); case Instruction::FMul: (void)C3V.multiply(C2V, APFloat::rmNearestTiesToEven); - return ConstantFP::get(Context, C3V); + return ConstantFP::get(C1->getContext(), C3V); case Instruction::FDiv: (void)C3V.divide(C2V, APFloat::rmNearestTiesToEven); - return ConstantFP::get(Context, C3V); + return ConstantFP::get(C1->getContext(), C3V); case Instruction::FRem: (void)C3V.mod(C2V, APFloat::rmNearestTiesToEven); - return ConstantFP::get(Context, C3V); + return ConstantFP::get(C1->getContext(), C3V); } } } else if (const VectorType *VTy = dyn_cast(C1->getType())) { @@ -1317,7 +1305,7 @@ case Instruction::Or: case Instruction::Xor: // No change of opcode required. - return ConstantFoldBinaryInstruction(Context, Opcode, C2, C1); + return ConstantFoldBinaryInstruction(Opcode, C2, C1); case Instruction::Shl: case Instruction::LShr: @@ -1358,7 +1346,7 @@ case Instruction::SRem: // We can assume that C2 == 1. If it were zero the result would be // undefined through division by zero. - return ConstantInt::getFalse(Context); + return ConstantInt::getFalse(C1->getContext()); default: break; } @@ -1392,8 +1380,7 @@ /// first is less than the second, return -1, if the second is less than the /// first, return 1. If the constants are not integral, return -2. /// -static int IdxCompare(LLVMContext &Context, Constant *C1, Constant *C2, - const Type *ElTy) { +static int IdxCompare(Constant *C1, Constant *C2, const Type *ElTy) { if (C1 == C2) return 0; // Ok, we found a different index. If they are not ConstantInt, we can't do @@ -1404,10 +1391,10 @@ // Ok, we have two differing integer indices. Sign extend them to be the same // type. Long is always big enough, so we use it. if (!C1->getType()->isInteger(64)) - C1 = ConstantExpr::getSExt(C1, Type::getInt64Ty(Context)); + C1 = ConstantExpr::getSExt(C1, Type::getInt64Ty(C1->getContext())); if (!C2->getType()->isInteger(64)) - C2 = ConstantExpr::getSExt(C2, Type::getInt64Ty(Context)); + C2 = ConstantExpr::getSExt(C2, Type::getInt64Ty(C1->getContext())); if (C1 == C2) return 0; // They are equal @@ -1436,8 +1423,7 @@ /// To simplify this code we canonicalize the relation so that the first /// operand is always the most "complex" of the two. We consider ConstantFP /// to be the simplest, and ConstantExprs to be the most complex. -static FCmpInst::Predicate evaluateFCmpRelation(LLVMContext &Context, - Constant *V1, Constant *V2) { +static FCmpInst::Predicate evaluateFCmpRelation(Constant *V1, Constant *V2) { assert(V1->getType() == V2->getType() && "Cannot compare values of different types!"); @@ -1470,7 +1456,7 @@ } // If the first operand is simple and second is ConstantExpr, swap operands. - FCmpInst::Predicate SwappedRelation = evaluateFCmpRelation(Context, V2, V1); + FCmpInst::Predicate SwappedRelation = evaluateFCmpRelation(V2, V1); if (SwappedRelation != FCmpInst::BAD_FCMP_PREDICATE) return FCmpInst::getSwappedPredicate(SwappedRelation); } else { @@ -1505,8 +1491,7 @@ /// constants (like ConstantInt) to be the simplest, followed by /// GlobalValues, followed by ConstantExpr's (the most complex). /// -static ICmpInst::Predicate evaluateICmpRelation(LLVMContext &Context, - Constant *V1, Constant *V2, +static ICmpInst::Predicate evaluateICmpRelation(Constant *V1, Constant *V2, bool isSigned) { assert(V1->getType() == V2->getType() && "Cannot compare different types of values!"); @@ -1538,14 +1523,14 @@ // If the first operand is simple, swap operands. ICmpInst::Predicate SwappedRelation = - evaluateICmpRelation(Context, V2, V1, isSigned); + evaluateICmpRelation(V2, V1, isSigned); if (SwappedRelation != ICmpInst::BAD_ICMP_PREDICATE) return ICmpInst::getSwappedPredicate(SwappedRelation); } else if (const GlobalValue *GV = dyn_cast(V1)) { if (isa(V2)) { // Swap as necessary. ICmpInst::Predicate SwappedRelation = - evaluateICmpRelation(Context, V2, V1, isSigned); + evaluateICmpRelation(V2, V1, isSigned); if (SwappedRelation != ICmpInst::BAD_ICMP_PREDICATE) return ICmpInst::getSwappedPredicate(SwappedRelation); return ICmpInst::BAD_ICMP_PREDICATE; @@ -1571,7 +1556,7 @@ } else if (const BlockAddress *BA = dyn_cast(V1)) { if (isa(V2)) { // Swap as necessary. ICmpInst::Predicate SwappedRelation = - evaluateICmpRelation(Context, V2, V1, isSigned); + evaluateICmpRelation(V2, V1, isSigned); if (SwappedRelation != ICmpInst::BAD_ICMP_PREDICATE) return ICmpInst::getSwappedPredicate(SwappedRelation); return ICmpInst::BAD_ICMP_PREDICATE; @@ -1617,7 +1602,7 @@ (isa(CE1->getType()) || CE1->getType()->isInteger())) { if (CE1->getOpcode() == Instruction::ZExt) isSigned = false; if (CE1->getOpcode() == Instruction::SExt) isSigned = true; - return evaluateICmpRelation(Context, CE1Op0, + return evaluateICmpRelation(CE1Op0, Constant::getNullValue(CE1Op0->getType()), isSigned); } @@ -1706,7 +1691,7 @@ gep_type_iterator GTI = gep_type_begin(CE1); for (;i != CE1->getNumOperands() && i != CE2->getNumOperands(); ++i, ++GTI) - switch (IdxCompare(Context, CE1->getOperand(i), + switch (IdxCompare(CE1->getOperand(i), CE2->getOperand(i), GTI.getIndexedType())) { case -1: return isSigned ? ICmpInst::ICMP_SLT:ICmpInst::ICMP_ULT; case 1: return isSigned ? ICmpInst::ICMP_SGT:ICmpInst::ICMP_UGT; @@ -1742,14 +1727,14 @@ return ICmpInst::BAD_ICMP_PREDICATE; } -Constant *llvm::ConstantFoldCompareInstruction(LLVMContext &Context, - unsigned short pred, +Constant *llvm::ConstantFoldCompareInstruction(unsigned short pred, Constant *C1, Constant *C2) { const Type *ResultTy; if (const VectorType *VT = dyn_cast(C1->getType())) - ResultTy = VectorType::get(Type::getInt1Ty(Context), VT->getNumElements()); + ResultTy = VectorType::get(Type::getInt1Ty(C1->getContext()), + VT->getNumElements()); else - ResultTy = Type::getInt1Ty(Context); + ResultTy = Type::getInt1Ty(C1->getContext()); // Fold FCMP_FALSE/FCMP_TRUE unconditionally. if (pred == FCmpInst::FCMP_FALSE) @@ -1772,9 +1757,9 @@ // Don't try to evaluate aliases. External weak GV can be null. if (!isa(GV) && !GV->hasExternalWeakLinkage()) { if (pred == ICmpInst::ICMP_EQ) - return ConstantInt::getFalse(Context); + return ConstantInt::getFalse(C1->getContext()); else if (pred == ICmpInst::ICMP_NE) - return ConstantInt::getTrue(Context); + return ConstantInt::getTrue(C1->getContext()); } // icmp eq/ne(GV,null) -> false/true } else if (C2->isNullValue()) { @@ -1782,9 +1767,9 @@ // Don't try to evaluate aliases. External weak GV can be null. if (!isa(GV) && !GV->hasExternalWeakLinkage()) { if (pred == ICmpInst::ICMP_EQ) - return ConstantInt::getFalse(Context); + return ConstantInt::getFalse(C1->getContext()); else if (pred == ICmpInst::ICMP_NE) - return ConstantInt::getTrue(Context); + return ConstantInt::getTrue(C1->getContext()); } } @@ -1807,26 +1792,16 @@ APInt V2 = cast(C2)->getValue(); switch (pred) { default: llvm_unreachable("Invalid ICmp Predicate"); return 0; - case ICmpInst::ICMP_EQ: - return ConstantInt::get(Type::getInt1Ty(Context), V1 == V2); - case ICmpInst::ICMP_NE: - return ConstantInt::get(Type::getInt1Ty(Context), V1 != V2); - case ICmpInst::ICMP_SLT: - return ConstantInt::get(Type::getInt1Ty(Context), V1.slt(V2)); - case ICmpInst::ICMP_SGT: - return ConstantInt::get(Type::getInt1Ty(Context), V1.sgt(V2)); - case ICmpInst::ICMP_SLE: - return ConstantInt::get(Type::getInt1Ty(Context), V1.sle(V2)); - case ICmpInst::ICMP_SGE: - return ConstantInt::get(Type::getInt1Ty(Context), V1.sge(V2)); - case ICmpInst::ICMP_ULT: - return ConstantInt::get(Type::getInt1Ty(Context), V1.ult(V2)); - case ICmpInst::ICMP_UGT: - return ConstantInt::get(Type::getInt1Ty(Context), V1.ugt(V2)); - case ICmpInst::ICMP_ULE: - return ConstantInt::get(Type::getInt1Ty(Context), V1.ule(V2)); - case ICmpInst::ICMP_UGE: - return ConstantInt::get(Type::getInt1Ty(Context), V1.uge(V2)); + case ICmpInst::ICMP_EQ: return ConstantInt::get(ResultTy, V1 == V2); + case ICmpInst::ICMP_NE: return ConstantInt::get(ResultTy, V1 != V2); + case ICmpInst::ICMP_SLT: return ConstantInt::get(ResultTy, V1.slt(V2)); + case ICmpInst::ICMP_SGT: return ConstantInt::get(ResultTy, V1.sgt(V2)); + case ICmpInst::ICMP_SLE: return ConstantInt::get(ResultTy, V1.sle(V2)); + case ICmpInst::ICMP_SGE: return ConstantInt::get(ResultTy, V1.sge(V2)); + case ICmpInst::ICMP_ULT: return ConstantInt::get(ResultTy, V1.ult(V2)); + case ICmpInst::ICMP_UGT: return ConstantInt::get(ResultTy, V1.ugt(V2)); + case ICmpInst::ICMP_ULE: return ConstantInt::get(ResultTy, V1.ule(V2)); + case ICmpInst::ICMP_UGE: return ConstantInt::get(ResultTy, V1.uge(V2)); } } else if (isa(C1) && isa(C2)) { APFloat C1V = cast(C1)->getValueAPF(); @@ -1834,47 +1809,47 @@ APFloat::cmpResult R = C1V.compare(C2V); switch (pred) { default: llvm_unreachable("Invalid FCmp Predicate"); return 0; - case FCmpInst::FCMP_FALSE: return ConstantInt::getFalse(Context); - case FCmpInst::FCMP_TRUE: return ConstantInt::getTrue(Context); + case FCmpInst::FCMP_FALSE: return Constant::getNullValue(ResultTy); + case FCmpInst::FCMP_TRUE: return Constant::getAllOnesValue(ResultTy); case FCmpInst::FCMP_UNO: - return ConstantInt::get(Type::getInt1Ty(Context), R==APFloat::cmpUnordered); + return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered); case FCmpInst::FCMP_ORD: - return ConstantInt::get(Type::getInt1Ty(Context), R!=APFloat::cmpUnordered); + return ConstantInt::get(ResultTy, R!=APFloat::cmpUnordered); case FCmpInst::FCMP_UEQ: - return ConstantInt::get(Type::getInt1Ty(Context), R==APFloat::cmpUnordered || - R==APFloat::cmpEqual); + return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered || + R==APFloat::cmpEqual); case FCmpInst::FCMP_OEQ: - return ConstantInt::get(Type::getInt1Ty(Context), R==APFloat::cmpEqual); + return ConstantInt::get(ResultTy, R==APFloat::cmpEqual); case FCmpInst::FCMP_UNE: - return ConstantInt::get(Type::getInt1Ty(Context), R!=APFloat::cmpEqual); + return ConstantInt::get(ResultTy, R!=APFloat::cmpEqual); case FCmpInst::FCMP_ONE: - return ConstantInt::get(Type::getInt1Ty(Context), R==APFloat::cmpLessThan || - R==APFloat::cmpGreaterThan); + return ConstantInt::get(ResultTy, R==APFloat::cmpLessThan || + R==APFloat::cmpGreaterThan); case FCmpInst::FCMP_ULT: - return ConstantInt::get(Type::getInt1Ty(Context), R==APFloat::cmpUnordered || - R==APFloat::cmpLessThan); + return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered || + R==APFloat::cmpLessThan); case FCmpInst::FCMP_OLT: - return ConstantInt::get(Type::getInt1Ty(Context), R==APFloat::cmpLessThan); + return ConstantInt::get(ResultTy, R==APFloat::cmpLessThan); case FCmpInst::FCMP_UGT: - return ConstantInt::get(Type::getInt1Ty(Context), R==APFloat::cmpUnordered || - R==APFloat::cmpGreaterThan); + return ConstantInt::get(ResultTy, R==APFloat::cmpUnordered || + R==APFloat::cmpGreaterThan); case FCmpInst::FCMP_OGT: - return ConstantInt::get(Type::getInt1Ty(Context), R==APFloat::cmpGreaterThan); + return ConstantInt::get(ResultTy, R==APFloat::cmpGreaterThan); case FCmpInst::FCMP_ULE: - return ConstantInt::get(Type::getInt1Ty(Context), R!=APFloat::cmpGreaterThan); + return ConstantInt::get(ResultTy, R!=APFloat::cmpGreaterThan); case FCmpInst::FCMP_OLE: - return ConstantInt::get(Type::getInt1Ty(Context), R==APFloat::cmpLessThan || - R==APFloat::cmpEqual); + return ConstantInt::get(ResultTy, R==APFloat::cmpLessThan || + R==APFloat::cmpEqual); case FCmpInst::FCMP_UGE: - return ConstantInt::get(Type::getInt1Ty(Context), R!=APFloat::cmpLessThan); + return ConstantInt::get(ResultTy, R!=APFloat::cmpLessThan); case FCmpInst::FCMP_OGE: - return ConstantInt::get(Type::getInt1Ty(Context), R==APFloat::cmpGreaterThan || - R==APFloat::cmpEqual); + return ConstantInt::get(ResultTy, R==APFloat::cmpGreaterThan || + R==APFloat::cmpEqual); } } else if (isa(C1->getType())) { SmallVector C1Elts, C2Elts; - C1->getVectorElements(Context, C1Elts); - C2->getVectorElements(Context, C2Elts); + C1->getVectorElements(C1Elts); + C2->getVectorElements(C2Elts); if (C1Elts.empty() || C2Elts.empty()) return 0; @@ -1890,7 +1865,7 @@ if (C1->getType()->isFloatingPoint()) { int Result = -1; // -1 = unknown, 0 = known false, 1 = known true. - switch (evaluateFCmpRelation(Context, C1, C2)) { + switch (evaluateFCmpRelation(C1, C2)) { default: llvm_unreachable("Unknown relation!"); case FCmpInst::FCMP_UNO: case FCmpInst::FCMP_ORD: @@ -1944,12 +1919,12 @@ // If we evaluated the result, return it now. if (Result != -1) - return ConstantInt::get(Type::getInt1Ty(Context), Result); + return ConstantInt::get(ResultTy, Result); } else { // Evaluate the relation between the two constants, per the predicate. int Result = -1; // -1 = unknown, 0 = known false, 1 = known true. - switch (evaluateICmpRelation(Context, C1, C2, CmpInst::isSigned(pred))) { + switch (evaluateICmpRelation(C1, C2, CmpInst::isSigned(pred))) { default: llvm_unreachable("Unknown relational!"); case ICmpInst::BAD_ICMP_PREDICATE: break; // Couldn't determine anything about these constants. @@ -2014,7 +1989,7 @@ // If we evaluated the result, return it now. if (Result != -1) - return ConstantInt::get(Type::getInt1Ty(Context), Result); + return ConstantInt::get(ResultTy, Result); // If the right hand side is a bitcast, try using its inverse to simplify // it by moving it to the left hand side. We can't do this if it would turn @@ -2094,8 +2069,7 @@ return true; } -Constant *llvm::ConstantFoldGetElementPtr(LLVMContext &Context, - Constant *C, +Constant *llvm::ConstantFoldGetElementPtr(Constant *C, bool inBounds, Constant* const *Idxs, unsigned NumIdx) { @@ -2155,10 +2129,9 @@ if (!Idx0->isNullValue()) { const Type *IdxTy = Combined->getType(); if (IdxTy != Idx0->getType()) { - Constant *C1 = - ConstantExpr::getSExtOrBitCast(Idx0, Type::getInt64Ty(Context)); - Constant *C2 = ConstantExpr::getSExtOrBitCast(Combined, - Type::getInt64Ty(Context)); + const Type *Int64Ty = Type::getInt64Ty(IdxTy->getContext()); + Constant *C1 = ConstantExpr::getSExtOrBitCast(Idx0, Int64Ty); + Constant *C2 = ConstantExpr::getSExtOrBitCast(Combined, Int64Ty); Combined = ConstantExpr::get(Instruction::Add, C1, C2); } else { Combined = @@ -2227,10 +2200,10 @@ // overflow trouble. if (!PrevIdx->getType()->isInteger(64)) PrevIdx = ConstantExpr::getSExt(PrevIdx, - Type::getInt64Ty(Context)); + Type::getInt64Ty(Div->getContext())); if (!Div->getType()->isInteger(64)) Div = ConstantExpr::getSExt(Div, - Type::getInt64Ty(Context)); + Type::getInt64Ty(Div->getContext())); NewIdxs[i-1] = ConstantExpr::getAdd(PrevIdx, Div); } else { Modified: llvm/trunk/lib/VMCore/ConstantFold.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.h?rev=95001&r1=95000&r2=95001&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ConstantFold.h (original) +++ llvm/trunk/lib/VMCore/ConstantFold.h Mon Feb 1 14:48:08 2010 @@ -23,46 +23,31 @@ class Value; class Constant; class Type; - class LLVMContext; // Constant fold various types of instruction... Constant *ConstantFoldCastInstruction( - LLVMContext &Context, unsigned opcode, ///< The opcode of the cast Constant *V, ///< The source constant const Type *DestTy ///< The destination type ); - Constant *ConstantFoldSelectInstruction(LLVMContext &Context, - Constant *Cond, + Constant *ConstantFoldSelectInstruction(Constant *Cond, Constant *V1, Constant *V2); - Constant *ConstantFoldExtractElementInstruction(LLVMContext &Context, - Constant *Val, - Constant *Idx); - Constant *ConstantFoldInsertElementInstruction(LLVMContext &Context, - Constant *Val, - Constant *Elt, + Constant *ConstantFoldExtractElementInstruction(Constant *Val, Constant *Idx); + Constant *ConstantFoldInsertElementInstruction(Constant *Val, Constant *Elt, Constant *Idx); - Constant *ConstantFoldShuffleVectorInstruction(LLVMContext &Context, - Constant *V1, - Constant *V2, + Constant *ConstantFoldShuffleVectorInstruction(Constant *V1, Constant *V2, Constant *Mask); - Constant *ConstantFoldExtractValueInstruction(LLVMContext &Context, - Constant *Agg, + Constant *ConstantFoldExtractValueInstruction(Constant *Agg, const unsigned *Idxs, unsigned NumIdx); - Constant *ConstantFoldInsertValueInstruction(LLVMContext &Context, - Constant *Agg, - Constant *Val, + Constant *ConstantFoldInsertValueInstruction(Constant *Agg, Constant *Val, const unsigned *Idxs, unsigned NumIdx); - Constant *ConstantFoldBinaryInstruction(LLVMContext &Context, - unsigned Opcode, Constant *V1, + Constant *ConstantFoldBinaryInstruction(unsigned Opcode, Constant *V1, Constant *V2); - Constant *ConstantFoldCompareInstruction(LLVMContext &Context, - unsigned short predicate, + Constant *ConstantFoldCompareInstruction(unsigned short predicate, Constant *C1, Constant *C2); - Constant *ConstantFoldGetElementPtr(LLVMContext &Context, Constant *C, - bool inBounds, + Constant *ConstantFoldGetElementPtr(Constant *C, bool inBounds, Constant* const *Idxs, unsigned NumIdx); } // End llvm namespace Modified: llvm/trunk/lib/VMCore/Constants.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Constants.cpp?rev=95001&r1=95000&r2=95001&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Constants.cpp (original) +++ llvm/trunk/lib/VMCore/Constants.cpp Mon Feb 1 14:48:08 2010 @@ -228,8 +228,7 @@ /// type, returns the elements of the vector in the specified smallvector. /// This handles breaking down a vector undef into undef elements, etc. For /// constant exprs and other cases we can't handle, we return an empty vector. -void Constant::getVectorElements(LLVMContext &Context, - SmallVectorImpl &Elts) const { +void Constant::getVectorElements(SmallVectorImpl &Elts) const { assert(isa(getType()) && "Not a vector constant!"); if (const ConstantVector *CV = dyn_cast(this)) { @@ -1139,7 +1138,7 @@ Instruction::CastOps opc, Constant *C, const Type *Ty) { assert(Ty->isFirstClassType() && "Cannot cast to an aggregate type!"); // Fold a few common cases - if (Constant *FC = ConstantFoldCastInstruction(Ty->getContext(), opc, C, Ty)) + if (Constant *FC = ConstantFoldCastInstruction(opc, C, Ty)) return FC; LLVMContextImpl *pImpl = Ty->getContext().pImpl; @@ -1373,8 +1372,7 @@ "Operand types in binary constant expression should match"); if (ReqTy == C1->getType() || ReqTy == Type::getInt1Ty(ReqTy->getContext())) - if (Constant *FC = ConstantFoldBinaryInstruction(ReqTy->getContext(), - Opcode, C1, C2)) + if (Constant *FC = ConstantFoldBinaryInstruction(Opcode, C1, C2)) return FC; // Fold a few common cases... std::vector argVec(1, C1); argVec.push_back(C2); @@ -1526,8 +1524,7 @@ assert(!SelectInst::areInvalidOperands(C, V1, V2)&&"Invalid select operands"); if (ReqTy == V1->getType()) - if (Constant *SC = ConstantFoldSelectInstruction( - ReqTy->getContext(), C, V1, V2)) + if (Constant *SC = ConstantFoldSelectInstruction(C, V1, V2)) return SC; // Fold common cases std::vector argVec(3, C); @@ -1547,9 +1544,8 @@ cast(ReqTy)->getElementType() && "GEP indices invalid!"); - if (Constant *FC = ConstantFoldGetElementPtr( - ReqTy->getContext(), C, /*inBounds=*/false, - (Constant**)Idxs, NumIdx)) + if (Constant *FC = ConstantFoldGetElementPtr(C, /*inBounds=*/false, + (Constant**)Idxs, NumIdx)) return FC; // Fold a few common cases... assert(isa(C->getType()) && @@ -1575,9 +1571,8 @@ cast(ReqTy)->getElementType() && "GEP indices invalid!"); - if (Constant *FC = ConstantFoldGetElementPtr( - ReqTy->getContext(), C, /*inBounds=*/true, - (Constant**)Idxs, NumIdx)) + if (Constant *FC = ConstantFoldGetElementPtr(C, /*inBounds=*/true, + (Constant**)Idxs, NumIdx)) return FC; // Fold a few common cases... assert(isa(C->getType()) && @@ -1633,8 +1628,7 @@ assert(pred >= ICmpInst::FIRST_ICMP_PREDICATE && pred <= ICmpInst::LAST_ICMP_PREDICATE && "Invalid ICmp Predicate"); - if (Constant *FC = ConstantFoldCompareInstruction( - LHS->getContext(), pred, LHS, RHS)) + if (Constant *FC = ConstantFoldCompareInstruction(pred, LHS, RHS)) return FC; // Fold a few common cases... // Look up the constant in the table first to ensure uniqueness @@ -1657,8 +1651,7 @@ assert(LHS->getType() == RHS->getType()); assert(pred <= FCmpInst::LAST_FCMP_PREDICATE && "Invalid FCmp Predicate"); - if (Constant *FC = ConstantFoldCompareInstruction( - LHS->getContext(), pred, LHS, RHS)) + if (Constant *FC = ConstantFoldCompareInstruction(pred, LHS, RHS)) return FC; // Fold a few common cases... // Look up the constant in the table first to ensure uniqueness @@ -1678,8 +1671,7 @@ Constant *ConstantExpr::getExtractElementTy(const Type *ReqTy, Constant *Val, Constant *Idx) { - if (Constant *FC = ConstantFoldExtractElementInstruction( - ReqTy->getContext(), Val, Idx)) + if (Constant *FC = ConstantFoldExtractElementInstruction(Val, Idx)) return FC; // Fold a few common cases. // Look up the constant in the table first to ensure uniqueness std::vector ArgVec(1, Val); @@ -1701,8 +1693,7 @@ Constant *ConstantExpr::getInsertElementTy(const Type *ReqTy, Constant *Val, Constant *Elt, Constant *Idx) { - if (Constant *FC = ConstantFoldInsertElementInstruction( - ReqTy->getContext(), Val, Elt, Idx)) + if (Constant *FC = ConstantFoldInsertElementInstruction(Val, Elt, Idx)) return FC; // Fold a few common cases. // Look up the constant in the table first to ensure uniqueness std::vector ArgVec(1, Val); @@ -1727,8 +1718,7 @@ Constant *ConstantExpr::getShuffleVectorTy(const Type *ReqTy, Constant *V1, Constant *V2, Constant *Mask) { - if (Constant *FC = ConstantFoldShuffleVectorInstruction( - ReqTy->getContext(), V1, V2, Mask)) + if (Constant *FC = ConstantFoldShuffleVectorInstruction(V1, V2, Mask)) return FC; // Fold a few common cases... // Look up the constant in the table first to ensure uniqueness std::vector ArgVec(1, V1); @@ -1761,8 +1751,7 @@ "insertvalue type invalid!"); assert(Agg->getType()->isFirstClassType() && "Non-first-class type for constant InsertValue expression"); - Constant *FC = ConstantFoldInsertValueInstruction( - ReqTy->getContext(), Agg, Val, Idxs, NumIdx); + Constant *FC = ConstantFoldInsertValueInstruction(Agg, Val, Idxs, NumIdx); assert(FC && "InsertValue constant expr couldn't be folded!"); return FC; } @@ -1788,8 +1777,7 @@ "extractvalue indices invalid!"); assert(Agg->getType()->isFirstClassType() && "Non-first-class type for constant extractvalue expression"); - Constant *FC = ConstantFoldExtractValueInstruction( - ReqTy->getContext(), Agg, Idxs, NumIdx); + Constant *FC = ConstantFoldExtractValueInstruction(Agg, Idxs, NumIdx); assert(FC && "ExtractValue constant expr couldn't be folded!"); return FC; } From baldrick at free.fr Mon Feb 1 14:57:35 2010 From: baldrick at free.fr (Duncan Sands) Date: Mon, 01 Feb 2010 20:57:35 -0000 Subject: [llvm-commits] [llvm] r95002 - /llvm/trunk/include/llvm/CodeGen/ValueTypes.h Message-ID: <201002012057.o11KvZus007984@zion.cs.uiuc.edu> Author: baldrick Date: Mon Feb 1 14:57:35 2010 New Revision: 95002 URL: http://llvm.org/viewvc/llvm-project?rev=95002&view=rev Log: Do an early exit when the result is known cheaply. Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.h?rev=95002&r1=95001&r2=95002&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original) +++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Mon Feb 1 14:57:35 2010 @@ -492,26 +492,31 @@ /// bitsEq - Return true if this has the same number of bits as VT. bool bitsEq(EVT VT) const { + if (EVT::operator==(VT)) return true; return getSizeInBits() == VT.getSizeInBits(); } /// bitsGT - Return true if this has more bits than VT. bool bitsGT(EVT VT) const { + if (EVT::operator==(VT)) return false; return getSizeInBits() > VT.getSizeInBits(); } /// bitsGE - Return true if this has no less bits than VT. bool bitsGE(EVT VT) const { + if (EVT::operator==(VT)) return true; return getSizeInBits() >= VT.getSizeInBits(); } /// bitsLT - Return true if this has less bits than VT. bool bitsLT(EVT VT) const { + if (EVT::operator==(VT)) return false; return getSizeInBits() < VT.getSizeInBits(); } /// bitsLE - Return true if this has no more bits than VT. bool bitsLE(EVT VT) const { + if (EVT::operator==(VT)) return true; return getSizeInBits() <= VT.getSizeInBits(); } From bob.wilson at apple.com Mon Feb 1 15:17:14 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 01 Feb 2010 21:17:14 -0000 Subject: [llvm-commits] [llvm] r95007 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp Message-ID: <201002012117.o11LHE5C008850@zion.cs.uiuc.edu> Author: bwilson Date: Mon Feb 1 15:17:14 2010 New Revision: 95007 URL: http://llvm.org/viewvc/llvm-project?rev=95007&view=rev Log: Add an option to GVN to remove all partially redundant loads. This is currently disabled by default. This divides the existing load PRE code into 2 phases: first it checks that it is safe to move the load to each of the predecessors where it is unavailable, and then if it is safe, the code is changed to move the load. Radar 7571861. Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=95007&r1=95006&r2=95007&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Mon Feb 1 15:17:14 2010 @@ -60,6 +60,7 @@ static cl::opt EnablePRE("enable-pre", cl::init(true), cl::Hidden); static cl::opt EnableLoadPRE("enable-load-pre", cl::init(true)); +static cl::opt EnableFullLoadPRE("enable-full-load-pre", cl::init(false)); //===----------------------------------------------------------------------===// // ValueTable Class @@ -1537,10 +1538,12 @@ // at least one of the values is LI. Since this means that we won't be able // to eliminate LI even if we insert uses in the other predecessors, we will // end up increasing code size. Reject this by scanning for LI. - for (unsigned i = 0, e = ValuesPerBlock.size(); i != e; ++i) - if (ValuesPerBlock[i].isSimpleValue() && - ValuesPerBlock[i].getSimpleValue() == LI) - return false; + if (!EnableFullLoadPRE) { + for (unsigned i = 0, e = ValuesPerBlock.size(); i != e; ++i) + if (ValuesPerBlock[i].isSimpleValue() && + ValuesPerBlock[i].getSimpleValue() == LI) + return false; + } // FIXME: It is extremely unclear what this loop is doing, other than // artificially restricting loadpre. @@ -1564,13 +1567,9 @@ return false; } - // Okay, we have some hope :). Check to see if the loaded value is fully - // available in all but one predecessor. - // FIXME: If we could restructure the CFG, we could make a common pred with - // all the preds that don't have an available LI and insert a new load into - // that one block. - BasicBlock *UnavailablePred = 0; - + // Check to see how many predecessors have the loaded value fully + // available. + DenseMap PredLoads; DenseMap FullyAvailableBlocks; for (unsigned i = 0, e = ValuesPerBlock.size(); i != e; ++i) FullyAvailableBlocks[ValuesPerBlock[i].BB] = true; @@ -1579,81 +1578,93 @@ for (pred_iterator PI = pred_begin(LoadBB), E = pred_end(LoadBB); PI != E; ++PI) { - if (IsValueFullyAvailableInBlock(*PI, FullyAvailableBlocks)) + BasicBlock *Pred = *PI; + if (IsValueFullyAvailableInBlock(Pred, FullyAvailableBlocks)) { continue; - - // If this load is not available in multiple predecessors, reject it. - if (UnavailablePred && UnavailablePred != *PI) + } + PredLoads[Pred] = 0; + // We don't currently handle critical edges :( + if (Pred->getTerminator()->getNumSuccessors() != 1) { + DEBUG(dbgs() << "COULD NOT PRE LOAD BECAUSE OF CRITICAL EDGE '" + << Pred->getName() << "': " << *LI << '\n'); return false; - UnavailablePred = *PI; + } } - assert(UnavailablePred != 0 && + // Decide whether PRE is profitable for this load. + unsigned NumUnavailablePreds = PredLoads.size(); + assert(NumUnavailablePreds != 0 && "Fully available value should be eliminated above!"); - - // We don't currently handle critical edges :( - if (UnavailablePred->getTerminator()->getNumSuccessors() != 1) { - DEBUG(dbgs() << "COULD NOT PRE LOAD BECAUSE OF CRITICAL EDGE '" - << UnavailablePred->getName() << "': " << *LI << '\n'); - return false; + if (!EnableFullLoadPRE) { + // If this load is unavailable in multiple predecessors, reject it. + // FIXME: If we could restructure the CFG, we could make a common pred with + // all the preds that don't have an available LI and insert a new load into + // that one block. + if (NumUnavailablePreds != 1) + return false; } - - // Do PHI translation to get its value in the predecessor if necessary. The - // returned pointer (if non-null) is guaranteed to dominate UnavailablePred. - // + + // Check if the load can safely be moved to all the unavailable predecessors. + bool CanDoPRE = true; SmallVector NewInsts; - - // If all preds have a single successor, then we know it is safe to insert the - // load on the pred (?!?), so we can insert code to materialize the pointer if - // it is not available. - PHITransAddr Address(LI->getOperand(0), TD); - Value *LoadPtr = 0; - if (allSingleSucc) { - LoadPtr = Address.PHITranslateWithInsertion(LoadBB, UnavailablePred, - *DT, NewInsts); - } else { - Address.PHITranslateValue(LoadBB, UnavailablePred); - LoadPtr = Address.getAddr(); + for (DenseMap::iterator I = PredLoads.begin(), + E = PredLoads.end(); I != E; ++I) { + BasicBlock *UnavailablePred = I->first; + + // Do PHI translation to get its value in the predecessor if necessary. The + // returned pointer (if non-null) is guaranteed to dominate UnavailablePred. + + // If all preds have a single successor, then we know it is safe to insert + // the load on the pred (?!?), so we can insert code to materialize the + // pointer if it is not available. + PHITransAddr Address(LI->getOperand(0), TD); + Value *LoadPtr = 0; + if (allSingleSucc) { + LoadPtr = Address.PHITranslateWithInsertion(LoadBB, UnavailablePred, + *DT, NewInsts); + } else { + Address.PHITranslateValue(LoadBB, UnavailablePred); + LoadPtr = Address.getAddr(); - // Make sure the value is live in the predecessor. - if (Instruction *Inst = dyn_cast_or_null(LoadPtr)) - if (!DT->dominates(Inst->getParent(), UnavailablePred)) - LoadPtr = 0; - } + // Make sure the value is live in the predecessor. + if (Instruction *Inst = dyn_cast_or_null(LoadPtr)) + if (!DT->dominates(Inst->getParent(), UnavailablePred)) + LoadPtr = 0; + } - // If we couldn't find or insert a computation of this phi translated value, - // we fail PRE. - if (LoadPtr == 0) { - assert(NewInsts.empty() && "Shouldn't insert insts on failure"); - DEBUG(dbgs() << "COULDN'T INSERT PHI TRANSLATED VALUE OF: " - << *LI->getOperand(0) << "\n"); - return false; - } + // If we couldn't find or insert a computation of this phi translated value, + // we fail PRE. + if (LoadPtr == 0) { + DEBUG(dbgs() << "COULDN'T INSERT PHI TRANSLATED VALUE OF: " + << *LI->getOperand(0) << "\n"); + CanDoPRE = false; + break; + } - // Assign value numbers to these new instructions. - for (unsigned i = 0, e = NewInsts.size(); i != e; ++i) { - // FIXME: We really _ought_ to insert these value numbers into their - // parent's availability map. However, in doing so, we risk getting into - // ordering issues. If a block hasn't been processed yet, we would be - // marking a value as AVAIL-IN, which isn't what we intend. - VN.lookup_or_add(NewInsts[i]); + // Make sure it is valid to move this load here. We have to watch out for: + // @1 = getelementptr (i8* p, ... + // test p and branch if == 0 + // load @1 + // It is valid to have the getelementptr before the test, even if p can be 0, + // as getelementptr only does address arithmetic. + // If we are not pushing the value through any multiple-successor blocks + // we do not have this case. Otherwise, check that the load is safe to + // put anywhere; this can be improved, but should be conservatively safe. + if (!allSingleSucc && + // FIXME: REEVALUTE THIS. + !isSafeToLoadUnconditionally(LoadPtr, + UnavailablePred->getTerminator(), + LI->getAlignment(), TD)) { + CanDoPRE = false; + break; + } + + I->second = LoadPtr; } - - // Make sure it is valid to move this load here. We have to watch out for: - // @1 = getelementptr (i8* p, ... - // test p and branch if == 0 - // load @1 - // It is valid to have the getelementptr before the test, even if p can be 0, - // as getelementptr only does address arithmetic. - // If we are not pushing the value through any multiple-successor blocks - // we do not have this case. Otherwise, check that the load is safe to - // put anywhere; this can be improved, but should be conservatively safe. - if (!allSingleSucc && - // FIXME: REEVALUTE THIS. - !isSafeToLoadUnconditionally(LoadPtr, - UnavailablePred->getTerminator(), - LI->getAlignment(), TD)) { - assert(NewInsts.empty() && "Should not have inserted instructions"); + + if (!CanDoPRE) { + while (!NewInsts.empty()) + NewInsts.pop_back_val()->eraseFromParent(); return false; } @@ -1665,12 +1676,28 @@ dbgs() << "INSERTED " << NewInsts.size() << " INSTS: " << *NewInsts.back() << '\n'); - Value *NewLoad = new LoadInst(LoadPtr, LI->getName()+".pre", false, - LI->getAlignment(), - UnavailablePred->getTerminator()); + // Assign value numbers to the new instructions. + for (unsigned i = 0, e = NewInsts.size(); i != e; ++i) { + // FIXME: We really _ought_ to insert these value numbers into their + // parent's availability map. However, in doing so, we risk getting into + // ordering issues. If a block hasn't been processed yet, we would be + // marking a value as AVAIL-IN, which isn't what we intend. + VN.lookup_or_add(NewInsts[i]); + } - // Add the newly created load. - ValuesPerBlock.push_back(AvailableValueInBlock::get(UnavailablePred,NewLoad)); + for (DenseMap::iterator I = PredLoads.begin(), + E = PredLoads.end(); I != E; ++I) { + BasicBlock *UnavailablePred = I->first; + Value *LoadPtr = I->second; + + Value *NewLoad = new LoadInst(LoadPtr, LI->getName()+".pre", false, + LI->getAlignment(), + UnavailablePred->getTerminator()); + + // Add the newly created load. + ValuesPerBlock.push_back(AvailableValueInBlock::get(UnavailablePred, + NewLoad)); + } // Perform PHI construction. Value *V = ConstructSSAForLoadSet(LI, ValuesPerBlock, TD, *DT, From scallanan at apple.com Mon Feb 1 15:57:51 2010 From: scallanan at apple.com (Sean Callanan) Date: Mon, 01 Feb 2010 21:57:51 -0000 Subject: [llvm-commits] [llvm] r95011 - /llvm/trunk/tools/ed/EnhancedDisassembly.exports Message-ID: <201002012157.o11Lvpa1010529@zion.cs.uiuc.edu> Author: spyffe Date: Mon Feb 1 15:57:50 2010 New Revision: 95011 URL: http://llvm.org/viewvc/llvm-project?rev=95011&view=rev Log: Rollback on including blocks functionality in .exports because some platforms don't support blocks and then break because the symbols aren't present Modified: llvm/trunk/tools/ed/EnhancedDisassembly.exports Modified: llvm/trunk/tools/ed/EnhancedDisassembly.exports URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EnhancedDisassembly.exports?rev=95011&r1=95010&r2=95011&view=diff ============================================================================== --- llvm/trunk/tools/ed/EnhancedDisassembly.exports (original) +++ llvm/trunk/tools/ed/EnhancedDisassembly.exports Mon Feb 1 15:57:50 2010 @@ -26,6 +26,3 @@ _EDNumOperands _EDGetOperand _EDEvaluateOperand -_EDBlockCreateInsts -_EDBlockEvaluateOperand -_EDBlockVisitTokens From wangmp at apple.com Mon Feb 1 16:15:09 2010 From: wangmp at apple.com (Mon P Wang) Date: Mon, 01 Feb 2010 22:15:09 -0000 Subject: [llvm-commits] [llvm] r95012 - in /llvm/trunk/lib/CodeGen/SelectionDAG: DAGCombiner.cpp SelectionDAG.cpp Message-ID: <201002012215.o11MF9Lw011387@zion.cs.uiuc.edu> Author: wangmp Date: Mon Feb 1 16:15:09 2010 New Revision: 95012 URL: http://llvm.org/viewvc/llvm-project?rev=95012&view=rev Log: Improve EXTRACT_VECTOR_ELT patch based on comments from Duncan Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=95012&r1=95011&r2=95012&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Feb 1 16:15:09 2010 @@ -5411,10 +5411,7 @@ EVT NVT = N->getValueType(0); if (InOp.getValueType() != NVT) { assert(InOp.getValueType().isInteger() && NVT.isInteger()); - if (NVT.getSizeInBits() > InOp.getValueType().getSizeInBits()) - return DAG.getNode(ISD::SIGN_EXTEND, InVec.getDebugLoc(), NVT, InOp); - else - return DAG.getNode(ISD::TRUNCATE, InVec.getDebugLoc(), NVT, InOp); + return DAG.getSExtOrTrunc(InOp, InVec.getDebugLoc(), NVT); } return InOp; } Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=95012&r1=95011&r2=95012&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Feb 1 16:15:09 2010 @@ -2764,13 +2764,16 @@ // EXTRACT_VECTOR_ELT of INSERT_VECTOR_ELT is often formed when vector // operations are lowered to scalars. if (N1.getOpcode() == ISD::INSERT_VECTOR_ELT) { - // If the indices are the same, return the inserted element. - if (N1.getOperand(2) == N2 && VT == N1.getOperand(1).getValueType()) - return N1.getOperand(1); - // If the indices are known different, extract the element from + // If the indices are the same, return the inserted element else + // if the indices are known different, extract the element from // the original vector. - else if (isa(N1.getOperand(2)) && - isa(N2)) + if (N1.getOperand(2) == N2) { + if (VT == N1.getOperand(1).getValueType()) + return N1.getOperand(1); + else + return getSExtOrTrunc(N1.getOperand(1), DL, VT); + } else if (isa(N1.getOperand(2)) && + isa(N2)) return getNode(ISD::EXTRACT_VECTOR_ELT, DL, VT, N1.getOperand(0), N2); } break; From wangmp at apple.com Mon Feb 1 16:16:34 2010 From: wangmp at apple.com (Mon Ping Wang) Date: Mon, 1 Feb 2010 14:16:34 -0800 Subject: [llvm-commits] [llvm] r94990 - in /llvm/trunk/lib/CodeGen/SelectionDAG: DAGCombiner.cpp SelectionDAG.cpp In-Reply-To: <4B672993.3020002@free.fr> References: <201002011903.o11J3JvW002675@zion.cs.uiuc.edu> <4B672993.3020002@free.fr> Message-ID: Hi Duncan, On Feb 1, 2010, at 11:20 AM, Duncan Sands wrote: > >> - if (InOp.getValueType() != EltVT) >> - return DAG.getNode(ISD::TRUNCATE, InVec.getDebugLoc(), EltVT, InOp); >> + EVT NVT = N->getValueType(0); >> + if (InOp.getValueType() != NVT) { >> + assert(InOp.getValueType().isInteger() && NVT.isInteger()); >> + if (NVT.getSizeInBits() > InOp.getValueType().getSizeInBits()) >> + return DAG.getNode(ISD::SIGN_EXTEND, InVec.getDebugLoc(), NVT, InOp); >> + else >> + return DAG.getNode(ISD::TRUNCATE, InVec.getDebugLoc(), NVT, InOp); >> + } > > There is a special method for this: DAG.getSExtOrTrunc. Fixed. > >> @@ -2765,7 +2765,7 @@ >> // operations are lowered to scalars. >> if (N1.getOpcode() == ISD::INSERT_VECTOR_ELT) { >> // If the indices are the same, return the inserted element. >> - if (N1.getOperand(2) == N2) >> + if (N1.getOperand(2) == N2 && VT == N1.getOperand(1).getValueType()) >> return N1.getOperand(1); >> // If the indices are known different, extract the element from >> // the original vector. > > Why not just extend/truncate here too? > Fixed. Thanks, -- Mon Ping From evan.cheng at apple.com Mon Feb 1 16:21:08 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 01 Feb 2010 22:21:08 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r95013 - /llvm-gcc-4.2/trunk/gcc/config/darwin-c.c Message-ID: <201002012221.o11ML8K8011574@zion.cs.uiuc.edu> Author: evancheng Date: Mon Feb 1 16:21:08 2010 New Revision: 95013 URL: http://llvm.org/viewvc/llvm-project?rev=95013&view=rev Log: Do not force ustring's with embedded null chars into __TEXT,__ustring. rdar://7589850. Modified: llvm-gcc-4.2/trunk/gcc/config/darwin-c.c Modified: llvm-gcc-4.2/trunk/gcc/config/darwin-c.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/darwin-c.c?rev=95013&r1=95012&r2=95013&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/darwin-c.c (original) +++ llvm-gcc-4.2/trunk/gcc/config/darwin-c.c Mon Feb 1 16:21:08 2010 @@ -1204,10 +1204,22 @@ static int num; const char *name_prefix = "__utf16_string_"; char *name; + int embedNull = 0; if (!cvt_utf8_utf16 (inbuf, length, &uniCharBuf, numUniChars)) return NULL_TREE; + /* LLVM LOCAL begin 7589850. */ + /* ustring with embedded null should go into __const. It should not be forced + into "__TEXT,__ustring" section. */ + for (l = 0; l < length; l++) { + if (!inbuf[l]) { + embedNull = 1; + break; + } + } + /* LLVM LOCAL end 7589850. */ + for (l = 0; l < *numUniChars; l++) initlist = tree_cons (NULL_TREE, build_int_cst (char_type_node, uniCharBuf[l]), initlist); /* LLVM LOCAL utf16 has two trailing nulls 7095855 */ @@ -1226,9 +1238,12 @@ TREE_READONLY (decl) = 1; /* LLVM LOCAL end */ - attribute = tree_cons (NULL_TREE, build_string (len, section_name), NULL_TREE); - attribute = tree_cons (get_identifier ("section"), attribute, NULL_TREE); - decl_attributes (&decl, attribute, 0); + /* LLVM LOCAL 7589850 */ + if (!embedNull) { + attribute = tree_cons (NULL_TREE, build_string (len, section_name), NULL_TREE); + attribute = tree_cons (get_identifier ("section"), attribute, NULL_TREE); + decl_attributes (&decl, attribute, 0); + } attribute = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 2), NULL_TREE); attribute = tree_cons (get_identifier ("aligned"), attribute, NULL_TREE); decl_attributes (&decl, attribute, 0); From evan.cheng at apple.com Mon Feb 1 16:32:43 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 01 Feb 2010 22:32:43 -0000 Subject: [llvm-commits] [llvm] r95014 - /llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m Message-ID: <201002012232.o11MWhiA011960@zion.cs.uiuc.edu> Author: evancheng Date: Mon Feb 1 16:32:42 2010 New Revision: 95014 URL: http://llvm.org/viewvc/llvm-project?rev=95014&view=rev Log: Add test case for 95013. Added: llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m Added: llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m?rev=95014&view=auto ============================================================================== --- llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m (added) +++ llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m Mon Feb 1 16:32:42 2010 @@ -0,0 +1,5 @@ +/* RUN: %llvmgcc -w -x objective-c -S %s -o - | not grep {__ustring} + rdar://7589850 */ + +void *P = @"good\0bye"; + From evan.cheng at apple.com Mon Feb 1 16:40:09 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 01 Feb 2010 22:40:09 -0000 Subject: [llvm-commits] [llvm] r95017 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/2010-02-01-TaillCallCrash.ll Message-ID: <201002012240.o11Me9v4012241@zion.cs.uiuc.edu> Author: evancheng Date: Mon Feb 1 16:40:09 2010 New Revision: 95017 URL: http://llvm.org/viewvc/llvm-project?rev=95017&view=rev Log: Fix PR6196. GV callee may not be a function. Added: llvm/trunk/test/CodeGen/X86/2010-02-01-TaillCallCrash.ll Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=95017&r1=95016&r2=95017&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Feb 1 16:40:09 2010 @@ -2288,9 +2288,11 @@ // Don't tail call optimize recursive call. GlobalAddressSDNode *G = dyn_cast(Callee); if (!G) return false; // FIXME: common external symbols? - const Function *CalleeF = cast(G->getGlobal()); - const Type *CalleeRetTy = CalleeF->getReturnType(); - return CallerRetTy == CalleeRetTy; + if (const Function *CalleeF = dyn_cast(G->getGlobal())) { + const Type *CalleeRetTy = CalleeF->getReturnType(); + return CallerRetTy == CalleeRetTy; + } + return false; } FastISel * Added: llvm/trunk/test/CodeGen/X86/2010-02-01-TaillCallCrash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-02-01-TaillCallCrash.ll?rev=95017&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2010-02-01-TaillCallCrash.ll (added) +++ llvm/trunk/test/CodeGen/X86/2010-02-01-TaillCallCrash.ll Mon Feb 1 16:40:09 2010 @@ -0,0 +1,12 @@ +; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu +; PR6196 + +%"char[]" = type [1 x i8] + + at .str = external constant %"char[]", align 1 ; <%"char[]"*> [#uses=1] + +define i32 @regex_subst() nounwind { +entry: + %0 = tail call i32 bitcast (%"char[]"* @.str to i32 (i32)*)(i32 0) nounwind ; [#uses=1] + ret i32 %0 +} From kledzik at apple.com Mon Feb 1 16:40:40 2010 From: kledzik at apple.com (Nick Kledzik) Date: Mon, 01 Feb 2010 22:40:40 -0000 Subject: [llvm-commits] [compiler-rt] r95018 - /compiler-rt/trunk/make/platform/darwin_bni.mk Message-ID: <201002012240.o11Mee67012294@zion.cs.uiuc.edu> Author: kledzik Date: Mon Feb 1 16:40:40 2010 New Revision: 95018 URL: http://llvm.org/viewvc/llvm-project?rev=95018&view=rev Log: FUNCTIONS.armv6 to have actual function names Modified: compiler-rt/trunk/make/platform/darwin_bni.mk Modified: compiler-rt/trunk/make/platform/darwin_bni.mk URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/platform/darwin_bni.mk?rev=95018&r1=95017&r2=95018&view=diff ============================================================================== --- compiler-rt/trunk/make/platform/darwin_bni.mk (original) +++ compiler-rt/trunk/make/platform/darwin_bni.mk Mon Feb 1 16:40:40 2010 @@ -48,6 +48,8 @@ muldf3vfp mulsf3vfp \ nedf2vfp negdf2vfp negsf2vfp nesf2vfp \ subdf3vfp subsf3vfp truncdfsf2vfp unorddf2vfp unordsf2vfp \ - modsi3 umodsi3 udivsi3 divsi3 switch save_restore_d8_d15 + modsi3 umodsi3 udivsi3 divsi3 \ + switch8 switchu8 switch16 switch32 \ + restore_vfp_d8_d15_regs save_vfp_d8_d15_regs VISIBILITY_HIDDEN := 0 From dalej at apple.com Mon Feb 1 16:46:05 2010 From: dalej at apple.com (Dale Johannesen) Date: Mon, 01 Feb 2010 22:46:05 -0000 Subject: [llvm-commits] [llvm] r95021 - /llvm/trunk/test/DebugInfo/2010-02-01-DbgValueCrash.ll Message-ID: <201002012246.o11Mk6JI012544@zion.cs.uiuc.edu> Author: johannes Date: Mon Feb 1 16:46:05 2010 New Revision: 95021 URL: http://llvm.org/viewvc/llvm-project?rev=95021&view=rev Log: Testcase for 94996 (PR 6157) Added: llvm/trunk/test/DebugInfo/2010-02-01-DbgValueCrash.ll Added: llvm/trunk/test/DebugInfo/2010-02-01-DbgValueCrash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/2010-02-01-DbgValueCrash.ll?rev=95021&view=auto ============================================================================== --- llvm/trunk/test/DebugInfo/2010-02-01-DbgValueCrash.ll (added) +++ llvm/trunk/test/DebugInfo/2010-02-01-DbgValueCrash.ll Mon Feb 1 16:46:05 2010 @@ -0,0 +1,34 @@ +; RUN: llc -O1 < %s +; ModuleID = 'pr6157.bc' +target triple = "x86_64-unknown-linux-gnu" +; formerly crashed in SelectionDAGBuilder + +%tart.reflect.ComplexType = type { double, double } + + at .type.SwitchStmtTest = constant %tart.reflect.ComplexType { double 3.0, double 2.0 } + +define i32 @"main(tart.core.String[])->int32"(i32 %args) { +entry: + tail call void @llvm.dbg.value(metadata !14, i64 0, metadata !8) + tail call void @"tart.reflect.ComplexType.create->tart.core.Object"(%tart.reflect.ComplexType* @.type.SwitchStmtTest) ; <%tart.core.Object*> [#uses=2] + ret i32 3 +} + +declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone +declare void @"tart.reflect.ComplexType.create->tart.core.Object"(%tart.reflect.ComplexType*) nounwind readnone + +!0 = metadata !{i32 458769, i32 0, i32 1, metadata !"sm.c", metadata !"/Volumes/MacOS9/tests/", metadata !"4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", i1 true, i1 false, metadata !"", i32 0} ; [ DW_TAG_compile_unit ] +!1 = metadata !{i32 458790, metadata !0, metadata !"", metadata !0, i32 0, i64 192, i64 64, i64 0, i32 0, metadata !2} ; [ DW_TAG_const_type ] +!2 = metadata !{i32 458771, metadata !0, metadata !"C", metadata !0, i32 1, i64 192, i64 64, i64 0, i32 0, null, metadata !3, i32 0, null} ; [ DW_TAG_structure_type ] +!3 = metadata !{metadata !4, metadata !6, metadata !7} +!4 = metadata !{i32 458765, metadata !2, metadata !"x", metadata !0, i32 1, i64 64, i64 64, i64 0, i32 0, metadata !5} ; [ DW_TAG_member ] +!5 = metadata !{i32 458788, metadata !0, metadata !"double", metadata !0, i32 0, i64 64, i64 64, i64 0, i32 0, i32 4} ; [ DW_TAG_base_type ] +!6 = metadata !{i32 458765, metadata !2, metadata !"y", metadata !0, i32 1, i64 64, i64 64, i64 64, i32 0, metadata !5} ; [ DW_TAG_member ] +!7 = metadata !{i32 458765, metadata !2, metadata !"z", metadata !0, i32 1, i64 64, i64 64, i64 128, i32 0, metadata !5} ; [ DW_TAG_member ] +!8 = metadata !{i32 459008, metadata !9, metadata !"t", metadata !0, i32 5, metadata !2} ; [ DW_TAG_auto_variable ] +!9 = metadata !{i32 458763, metadata !10} ; [ DW_TAG_lexical_block ] +!10 = metadata !{i32 458798, i32 0, metadata !0, metadata !"foo", metadata !"foo", metadata !"foo", metadata !0, i32 4, metadata !11, i1 false, i1 true, i32 0, i32 0, null} ; [ DW_TAG_subprogram ] +!11 = metadata !{i32 458773, metadata !0, metadata !"", metadata !0, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !12, i32 0, null} ; [ DW_TAG_subroutine_type ] +!12 = metadata !{metadata !13} +!13 = metadata !{i32 458788, metadata !0, metadata !"int", metadata !0, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] +!14 = metadata !{%tart.reflect.ComplexType* @.type.SwitchStmtTest} From isanbard at gmail.com Mon Feb 1 16:51:23 2010 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 01 Feb 2010 22:51:23 -0000 Subject: [llvm-commits] [llvm] r95022 - in /llvm/trunk: include/llvm/Analysis/IVUsers.h lib/Analysis/IVUsers.cpp Message-ID: <201002012251.o11MpOTt012753@zion.cs.uiuc.edu> Author: void Date: Mon Feb 1 16:51:23 2010 New Revision: 95022 URL: http://llvm.org/viewvc/llvm-project?rev=95022&view=rev Log: Add "dump" method to IVUsersOneStride. Modified: llvm/trunk/include/llvm/Analysis/IVUsers.h llvm/trunk/lib/Analysis/IVUsers.cpp Modified: llvm/trunk/include/llvm/Analysis/IVUsers.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/IVUsers.h?rev=95022&r1=95021&r2=95022&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/IVUsers.h (original) +++ llvm/trunk/include/llvm/Analysis/IVUsers.h Mon Feb 1 16:51:23 2010 @@ -165,6 +165,11 @@ void removeUser(IVStrideUse *User) { Users.erase(User); } + + void print(raw_ostream &OS) const; + + /// dump - This method is used for debugging. + void dump() const; }; class IVUsers : public LoopPass { Modified: llvm/trunk/lib/Analysis/IVUsers.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IVUsers.cpp?rev=95022&r1=95021&r2=95022&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IVUsers.cpp (original) +++ llvm/trunk/lib/Analysis/IVUsers.cpp Mon Feb 1 16:51:23 2010 @@ -386,3 +386,26 @@ Parent->Users.erase(this); // this now dangles! } + +void IVUsersOfOneStride::print(raw_ostream &OS) const { + OS << "IV Users of one stride:\n"; + + if (Stride) + OS << " Stride: " << *Stride << '\n'; + + OS << " Users:\n"; + + unsigned Count = 1; + + for (ilist::const_iterator + I = Users.begin(), E = Users.end(); I != E; ++I) { + const IVStrideUse &SU = *I; + OS << " " << Count++ << '\n'; + OS << " Offset: " << *SU.getOffset() << '\n'; + OS << " Instr: " << *SU << '\n'; + } +} + +void IVUsersOfOneStride::dump() const { + print(dbgs()); +} From scallanan at apple.com Mon Feb 1 17:01:39 2010 From: scallanan at apple.com (Sean Callanan) Date: Mon, 01 Feb 2010 23:01:39 -0000 Subject: [llvm-commits] [llvm] r95024 - in /llvm/trunk/tools/ed: EnhancedDisassembly.exports EnhancedDisassembly.exports.blocks EnhancedDisassembly.exports.noblocks Makefile Message-ID: <201002012301.o11N1dvA013195@zion.cs.uiuc.edu> Author: spyffe Date: Mon Feb 1 17:01:38 2010 New Revision: 95024 URL: http://llvm.org/viewvc/llvm-project?rev=95024&view=rev Log: Updated to use the proper .exports file for the target platform, depending on whether the target supports the blocks API or not Added: llvm/trunk/tools/ed/EnhancedDisassembly.exports.blocks llvm/trunk/tools/ed/EnhancedDisassembly.exports.noblocks Removed: llvm/trunk/tools/ed/EnhancedDisassembly.exports Modified: llvm/trunk/tools/ed/Makefile Removed: llvm/trunk/tools/ed/EnhancedDisassembly.exports URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EnhancedDisassembly.exports?rev=95023&view=auto ============================================================================== --- llvm/trunk/tools/ed/EnhancedDisassembly.exports (original) +++ llvm/trunk/tools/ed/EnhancedDisassembly.exports (removed) @@ -1,28 +0,0 @@ -_EDGetDisassembler -_EDGetRegisterName -_EDRegisterIsStackPointer -_EDRegisterIsProgramCounter -_EDCreateInsts -_EDReleaseInst -_EDInstByteSize -_EDGetInstString -_EDInstIsBranch -_EDInstIsMove -_EDBranchTargetID -_EDMoveSourceID -_EDMoveTargetID -_EDNumTokens -_EDGetToken -_EDGetTokenString -_EDOperandIndexForToken -_EDTokenIsWhitespace -_EDTokenIsPunctuation -_EDTokenIsOpcode -_EDTokenIsLiteral -_EDTokenIsRegister -_EDTokenIsNegativeLiteral -_EDLiteralTokenAbsoluteValue -_EDRegisterTokenValue -_EDNumOperands -_EDGetOperand -_EDEvaluateOperand Added: llvm/trunk/tools/ed/EnhancedDisassembly.exports.blocks URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EnhancedDisassembly.exports.blocks?rev=95024&view=auto ============================================================================== --- llvm/trunk/tools/ed/EnhancedDisassembly.exports.blocks (added) +++ llvm/trunk/tools/ed/EnhancedDisassembly.exports.blocks Mon Feb 1 17:01:38 2010 @@ -0,0 +1,31 @@ +_EDGetDisassembler +_EDGetRegisterName +_EDRegisterIsStackPointer +_EDRegisterIsProgramCounter +_EDCreateInsts +_EDReleaseInst +_EDInstByteSize +_EDGetInstString +_EDInstIsBranch +_EDInstIsMove +_EDBranchTargetID +_EDMoveSourceID +_EDMoveTargetID +_EDNumTokens +_EDGetToken +_EDGetTokenString +_EDOperandIndexForToken +_EDTokenIsWhitespace +_EDTokenIsPunctuation +_EDTokenIsOpcode +_EDTokenIsLiteral +_EDTokenIsRegister +_EDTokenIsNegativeLiteral +_EDLiteralTokenAbsoluteValue +_EDRegisterTokenValue +_EDNumOperands +_EDGetOperand +_EDEvaluateOperand +_EDBlockCreateInsts +_EDBlockEvaluateOperand +_EDBlockVisitTokens Added: llvm/trunk/tools/ed/EnhancedDisassembly.exports.noblocks URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EnhancedDisassembly.exports.noblocks?rev=95024&view=auto ============================================================================== --- llvm/trunk/tools/ed/EnhancedDisassembly.exports.noblocks (added) +++ llvm/trunk/tools/ed/EnhancedDisassembly.exports.noblocks Mon Feb 1 17:01:38 2010 @@ -0,0 +1,28 @@ +_EDGetDisassembler +_EDGetRegisterName +_EDRegisterIsStackPointer +_EDRegisterIsProgramCounter +_EDCreateInsts +_EDReleaseInst +_EDInstByteSize +_EDGetInstString +_EDInstIsBranch +_EDInstIsMove +_EDBranchTargetID +_EDMoveSourceID +_EDMoveTargetID +_EDNumTokens +_EDGetToken +_EDGetTokenString +_EDOperandIndexForToken +_EDTokenIsWhitespace +_EDTokenIsPunctuation +_EDTokenIsOpcode +_EDTokenIsLiteral +_EDTokenIsRegister +_EDTokenIsNegativeLiteral +_EDLiteralTokenAbsoluteValue +_EDRegisterTokenValue +_EDNumOperands +_EDGetOperand +_EDEvaluateOperand Modified: llvm/trunk/tools/ed/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/Makefile?rev=95024&r1=95023&r2=95024&view=diff ============================================================================== --- llvm/trunk/tools/ed/Makefile (original) +++ llvm/trunk/tools/ed/Makefile Mon Feb 1 17:01:38 2010 @@ -10,7 +10,7 @@ LEVEL = ../.. LIBRARYNAME = EnhancedDisassembly -BUILT_SOURCES = EDInfo.inc +BUILT_SOURCES = EDInfo.inc EnhancedDisassembly.exports # Include this here so we can get the configuration of the targets # that have been configured for construction. We have to do this @@ -51,5 +51,17 @@ $(Echo) "Building semantic information header" $(Verb) $(TableGen) -o $(call SYSPATH, $@) -gen-enhanced-disassembly-header /dev/null +EnhancedDisassembly.exports: EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports.blocks + $(Echo) "Copying exports file" +ifeq ($(HOST_OS),Darwin) + $(Verb) if [ $(DARWIN_VERS) -ge 10 ] ; \ + then $(CP) -f EnhancedDisassembly.exports.blocks EnhancedDisassembly.exports ; \ + else $(CP) -f EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports ; \ + fi +else + $(Verb) $(CP) -f EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports +endif + clean:: -$(Verb) $(RM) -f EDInfo.inc + -$(Verb) $(RM) -f EnhancedDisassembly.exports From johnny.chen at apple.com Mon Feb 1 17:06:04 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Mon, 01 Feb 2010 23:06:04 -0000 Subject: [llvm-commits] [llvm] r95025 - /llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Message-ID: <201002012306.o11N64qB013374@zion.cs.uiuc.edu> Author: johnny Date: Mon Feb 1 17:06:04 2010 New Revision: 95025 URL: http://llvm.org/viewvc/llvm-project?rev=95025&view=rev Log: MOVi16 should also be marked as a UnaryDP instruction, i.e., it doesn't have a Rn operand. Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=95025&r1=95024&r2=95025&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Mon Feb 1 17:06:04 2010 @@ -1015,7 +1015,7 @@ DPFrm, IIC_iMOVi, "movw", "\t$dst, $src", [(set GPR:$dst, imm0_65535:$src)]>, - Requires<[IsARM, HasV6T2]> { + Requires<[IsARM, HasV6T2]>, UnaryDP { let Inst{20} = 0; let Inst{25} = 1; } From espindola at google.com Mon Feb 1 17:13:02 2010 From: espindola at google.com (Rafael Espindola) Date: Mon, 1 Feb 2010 18:13:02 -0500 Subject: [llvm-commits] [patch][llvm-gcc] Merge bits from llvm-abi-default.cpp into llvm-abi-linux-ppc.cpp Message-ID: <38a0d8451002011513h36ea40f8l41336d6fe6621cde@mail.gmail.com> The attached patch copies bits from llvm-abi-default.cpp to llvm-abi-linux-ppc.cpp. These are most likely features added to the default implementation after the linux ppc forked and were never copied over. Tested by compiling llvm-gcc and running the test-suite under qemu's system emulation. Should be done tomorrow morning. OK if there are no regressions? Next step: replace the "inreg" ppc hack with pad arguments. Cheers. -- Rafael ?vila de Esp?ndola -------------- next part -------------- A non-text attachment was scrubbed... Name: merge.patch Type: text/x-diff Size: 3687 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100201/45001e21/attachment.bin From echristo at apple.com Mon Feb 1 17:25:04 2010 From: echristo at apple.com (Eric Christopher) Date: Mon, 01 Feb 2010 23:25:04 -0000 Subject: [llvm-commits] [llvm] r95027 - /llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Message-ID: <201002012325.o11NP4AS014107@zion.cs.uiuc.edu> Author: echristo Date: Mon Feb 1 17:25:03 2010 New Revision: 95027 URL: http://llvm.org/viewvc/llvm-project?rev=95027&view=rev Log: Formatting. Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=95027&r1=95026&r2=95027&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Mon Feb 1 17:25:03 2010 @@ -232,10 +232,10 @@ AWI = AttributeWithIndex::get(~0u, Attribute::ReadOnly | Attribute::NoUnwind); Value *MemChr = M->getOrInsertFunction("memchr", AttrListPtr::get(&AWI, 1), - Type::getInt8PtrTy(*Context), - Type::getInt8PtrTy(*Context), + Type::getInt8PtrTy(*Context), + Type::getInt8PtrTy(*Context), Type::getInt32Ty(*Context), - TD->getIntPtrType(*Context), + TD->getIntPtrType(*Context), NULL); CallInst *CI = B.CreateCall3(MemChr, CastToCStr(Ptr, B), Val, Len, "memchr"); From scallanan at apple.com Mon Feb 1 17:27:58 2010 From: scallanan at apple.com (Sean Callanan) Date: Mon, 01 Feb 2010 23:27:58 -0000 Subject: [llvm-commits] [llvm] r95028 - /llvm/trunk/tools/ed/Makefile Message-ID: <201002012327.o11NRwbt014219@zion.cs.uiuc.edu> Author: spyffe Date: Mon Feb 1 17:27:57 2010 New Revision: 95028 URL: http://llvm.org/viewvc/llvm-project?rev=95028&view=rev Log: Fix for builds with separate source and build directories (like, oh, say, any multistage build) Modified: llvm/trunk/tools/ed/Makefile Modified: llvm/trunk/tools/ed/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/Makefile?rev=95028&r1=95027&r2=95028&view=diff ============================================================================== --- llvm/trunk/tools/ed/Makefile (original) +++ llvm/trunk/tools/ed/Makefile Mon Feb 1 17:27:57 2010 @@ -34,7 +34,7 @@ # extra options to override libtool defaults LLVMLibsOptions := $(LLVMLibsOptions) \ -avoid-version \ - -Wl,-exported_symbols_list -Wl,$(PROJ_SRC_DIR)/EnhancedDisassembly.exports \ + -Wl,-exported_symbols_list -Wl,EnhancedDisassembly.exports \ -Wl,-dead_strip \ -Wl,-seg1addr -Wl,0xE0000000 @@ -55,11 +55,11 @@ $(Echo) "Copying exports file" ifeq ($(HOST_OS),Darwin) $(Verb) if [ $(DARWIN_VERS) -ge 10 ] ; \ - then $(CP) -f EnhancedDisassembly.exports.blocks EnhancedDisassembly.exports ; \ - else $(CP) -f EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports ; \ + then $(CP) -f $(PROJ_SRC_DIR)/EnhancedDisassembly.exports.blocks EnhancedDisassembly.exports ; \ + else $(CP) -f $(PROJ_SRC_DIR)/EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports ; \ fi else - $(Verb) $(CP) -f EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports + $(Verb) $(CP) -f $(PROJ_SRC_DIR)/EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports endif clean:: From clattner at apple.com Mon Feb 1 17:29:13 2010 From: clattner at apple.com (Chris Lattner) Date: Mon, 1 Feb 2010 15:29:13 -0800 Subject: [llvm-commits] [llvm] r95014 - /llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m In-Reply-To: <201002012232.o11MWhiA011960@zion.cs.uiuc.edu> References: <201002012232.o11MWhiA011960@zion.cs.uiuc.edu> Message-ID: <85CCC317-B528-4C52-BB62-570B9C0ACD52@apple.com> On Feb 1, 2010, at 2:32 PM, Evan Cheng wrote: > Author: evancheng > Date: Mon Feb 1 16:32:42 2010 > New Revision: 95014 > > URL: http://llvm.org/viewvc/llvm-project?rev=95014&view=rev > Log: > Add test case for 95013. Hey Evan, I don't think this will go into ustring anyway, you need a non-ascii (unicode) character in there as well as \0. -Chris > > Added: > llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m > > Added: llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m?rev=95014&view=auto > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m (added) > +++ llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m Mon > Feb 1 16:32:42 2010 > @@ -0,0 +1,5 @@ > +/* RUN: %llvmgcc -w -x objective-c -S %s -o - | not grep {__ustring} > + rdar://7589850 */ > + > +void *P = @"good\0bye"; > + > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From evan.cheng at apple.com Mon Feb 1 17:36:13 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 1 Feb 2010 15:36:13 -0800 Subject: [llvm-commits] [llvm] r95014 - /llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m In-Reply-To: <85CCC317-B528-4C52-BB62-570B9C0ACD52@apple.com> References: <201002012232.o11MWhiA011960@zion.cs.uiuc.edu> <85CCC317-B528-4C52-BB62-570B9C0ACD52@apple.com> Message-ID: <2F1D952B-C29C-4ED1-A8AB-B2DF09142058@apple.com> On Feb 1, 2010, at 3:29 PM, Chris Lattner wrote: > > On Feb 1, 2010, at 2:32 PM, Evan Cheng wrote: > >> Author: evancheng >> Date: Mon Feb 1 16:32:42 2010 >> New Revision: 95014 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=95014&view=rev >> Log: >> Add test case for 95013. > > Hey Evan, > > I don't think this will go into ustring anyway, you need a non-ascii (unicode) character in there as well as \0. Does '@' mean it's going to be a CFString? This compiles to the following before: .section __TEXT,__ustring .align 1 ___utf16_string_1: .asciz "g\000o\000o\000d\000\000\000b\000y\000e\000\000" Now: .section __TEXT,__const .align 1 ___utf16_string_1: .asciz "g\000o\000o\000d\000\000\000b\000y\000e\000\000" Evan > > -Chris > > >> >> Added: >> llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m >> >> Added: llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m?rev=95014&view=auto >> >> ============================================================================== >> --- llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m (added) >> +++ llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m Mon Feb 1 16:32:42 2010 >> @@ -0,0 +1,5 @@ >> +/* RUN: %llvmgcc -w -x objective-c -S %s -o - | not grep {__ustring} >> + rdar://7589850 */ >> + >> +void *P = @"good\0bye"; >> + >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From clattner at apple.com Mon Feb 1 17:47:03 2010 From: clattner at apple.com (Chris Lattner) Date: Mon, 1 Feb 2010 15:47:03 -0800 Subject: [llvm-commits] [llvm] r95024 - in /llvm/trunk/tools/ed: EnhancedDisassembly.exports EnhancedDisassembly.exports.blocks EnhancedDisassembly.exports.noblocks Makefile In-Reply-To: <201002012301.o11N1dvA013195@zion.cs.uiuc.edu> References: <201002012301.o11N1dvA013195@zion.cs.uiuc.edu> Message-ID: <7B6A1306-8D17-4B0F-9FEB-77DB62CFE654@apple.com> On Feb 1, 2010, at 3:01 PM, Sean Callanan wrote: > Author: spyffe > Date: Mon Feb 1 17:01:38 2010 > New Revision: 95024 > > URL: http://llvm.org/viewvc/llvm-project?rev=95024&view=rev > Log: > Updated to use the proper .exports file for the > target platform, depending on whether the target > supports the blocks API or not Hey Sean, An easier and cleaner way to do this might be to just stub out the 'blocks' functions like this: #ifndef __BLOCKS void EDBlockCreateInsts() { abort(); } ... #endif That way the export map is constant, -Chris From clattner at apple.com Mon Feb 1 17:47:26 2010 From: clattner at apple.com (Chris Lattner) Date: Mon, 1 Feb 2010 15:47:26 -0800 Subject: [llvm-commits] [llvm] r95027 - /llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp In-Reply-To: <201002012325.o11NP4AS014107@zion.cs.uiuc.edu> References: <201002012325.o11NP4AS014107@zion.cs.uiuc.edu> Message-ID: <64FA6D54-9FB8-47A6-A0FD-64A9FA95FDDB@apple.com> On Feb 1, 2010, at 3:25 PM, Eric Christopher wrote: > Author: echristo > Date: Mon Feb 1 17:25:03 2010 > New Revision: 95027 > > URL: http://llvm.org/viewvc/llvm-project?rev=95027&view=rev > Log: > Formatting. Please stay in 80 cols. -Chris > > Modified: > llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp > > Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=95027&r1=95026&r2=95027&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original) > +++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Mon Feb 1 > 17:25:03 2010 > @@ -232,10 +232,10 @@ > AWI = AttributeWithIndex::get(~0u, Attribute::ReadOnly | > Attribute::NoUnwind); > > Value *MemChr = M->getOrInsertFunction("memchr", > AttrListPtr::get(&AWI, 1), > - Type::getInt8PtrTy(*Context), > - Type::getInt8PtrTy(*Context), > + Type::getInt8PtrTy(*Context), > + Type::getInt8PtrTy(*Context), > Type::getInt32Ty(*Context), > - TD->getIntPtrType(*Context), > + TD->getIntPtrType(*Context), > NULL); > CallInst *CI = B.CreateCall3(MemChr, CastToCStr(Ptr, B), Val, Len, > "memchr"); > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From clattner at apple.com Mon Feb 1 17:49:14 2010 From: clattner at apple.com (Chris Lattner) Date: Mon, 1 Feb 2010 15:49:14 -0800 Subject: [llvm-commits] [llvm] r95014 - /llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m In-Reply-To: <2F1D952B-C29C-4ED1-A8AB-B2DF09142058@apple.com> References: <201002012232.o11MWhiA011960@zion.cs.uiuc.edu> <85CCC317-B528-4C52-BB62-570B9C0ACD52@apple.com> <2F1D952B-C29C-4ED1-A8AB-B2DF09142058@apple.com> Message-ID: <50010AFC-0F50-4BC0-A63A-48E9B5D2ABC9@apple.com> On Feb 1, 2010, at 3:36 PM, Evan Cheng wrote: > > On Feb 1, 2010, at 3:29 PM, Chris Lattner wrote: > >> >> On Feb 1, 2010, at 2:32 PM, Evan Cheng wrote: >> >>> Author: evancheng >>> Date: Mon Feb 1 16:32:42 2010 >>> New Revision: 95014 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=95014&view=rev >>> Log: >>> Add test case for 95013. >> >> Hey Evan, >> >> I don't think this will go into ustring anyway, you need a non- >> ascii (unicode) character in there as well as \0. > > Does '@' mean it's going to be a CFString? Yes, but not that it will have 16-bit elements. For example @"foo" gets emitted as: .section __TEXT,__cstring,cstring_literals L_.str: .asciz "foo" > > This compiles to the following before: > .section __TEXT,__ustring > .align 1 > ___utf16_string_1: > .asciz "g\000o\000o\000d\000\000\000b\000y\000e\000\000" > > Now: > .section __TEXT,__const > .align 1 > ___utf16_string_1: > .asciz "g\000o\000o\000d\000\000\000b\000y\000e\000\000" Huh, ok, I guess that's enough then! -Chris From natebegeman at mac.com Mon Feb 1 17:56:59 2010 From: natebegeman at mac.com (Nate Begeman) Date: Mon, 01 Feb 2010 23:56:59 -0000 Subject: [llvm-commits] [llvm] r95033 - in /llvm/trunk: include/llvm/CodeGen/FileWriters.h include/llvm/Target/TargetMachine.h lib/CodeGen/LLVMTargetMachine.cpp lib/CodeGen/MachOWriter.cpp lib/CodeGen/MachOWriter.h tools/llc/llc.cpp Message-ID: <201002012356.o11Nuxm4015633@zion.cs.uiuc.edu> Author: sampo Date: Mon Feb 1 17:56:58 2010 New Revision: 95033 URL: http://llvm.org/viewvc/llvm-project?rev=95033&view=rev Log: Kill the Mach-O writer, and temporarily make filetype=obj an error. The MCStreamer based assemblers will take over for this functionality. Removed: llvm/trunk/lib/CodeGen/MachOWriter.cpp llvm/trunk/lib/CodeGen/MachOWriter.h Modified: llvm/trunk/include/llvm/CodeGen/FileWriters.h llvm/trunk/include/llvm/Target/TargetMachine.h llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp llvm/trunk/tools/llc/llc.cpp Modified: llvm/trunk/include/llvm/CodeGen/FileWriters.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/FileWriters.h?rev=95033&r1=95032&r2=95033&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/FileWriters.h (original) +++ llvm/trunk/include/llvm/CodeGen/FileWriters.h Mon Feb 1 17:56:58 2010 @@ -20,18 +20,9 @@ class ObjectCodeEmitter; class TargetMachine; class raw_ostream; - class formatted_raw_ostream; - class MachineFunctionPass; - class MCAsmInfo; - class MCCodeEmitter; ObjectCodeEmitter *AddELFWriter(PassManagerBase &FPM, raw_ostream &O, TargetMachine &TM); - MachineFunctionPass *createMachOWriter(formatted_raw_ostream &O, - TargetMachine &TM, - const MCAsmInfo *T, - MCCodeEmitter *MCE); - } // end llvm namespace #endif // LLVM_CODEGEN_FILEWRITERS_H Modified: llvm/trunk/include/llvm/Target/TargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=95033&r1=95032&r2=95033&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetMachine.h (original) +++ llvm/trunk/include/llvm/Target/TargetMachine.h Mon Feb 1 17:56:58 2010 @@ -471,14 +471,6 @@ bool addAssemblyEmitter(PassManagerBase &, CodeGenOpt::Level, bool /* VerboseAsmDefault */, formatted_raw_ostream &); - - /// addObjectFileEmitter - Helper function which creates a target specific - /// object files emitter, if available. This interface is temporary, for - /// bringing up MCAssembler-based object file emitters. - /// - /// \return Returns 'false' on success. - bool addObjectFileEmitter(PassManagerBase &, CodeGenOpt::Level, - formatted_raw_ostream &); }; } // End llvm namespace Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=95033&r1=95032&r2=95033&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Mon Feb 1 17:56:58 2010 @@ -115,10 +115,7 @@ return FileModel::Error; return FileModel::AsmFile; case TargetMachine::ObjectFile: - if (!addObjectFileEmitter(PM, OptLevel, Out)) - return FileModel::MachOFile; - else if (getELFWriterInfo()) - return FileModel::ElfFile; + return FileModel::Error; } return FileModel::Error; } @@ -136,17 +133,6 @@ return false; } -bool LLVMTargetMachine::addObjectFileEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - formatted_raw_ostream &Out) { - MCCodeEmitter *Emitter = getTarget().createCodeEmitter(*this); - if (!Emitter) - return true; - - PM.add(createMachOWriter(Out, *this, getMCAsmInfo(), Emitter)); - return false; -} - /// addPassesToEmitFileFinish - If the passes to emit the specified file had to /// be split up (e.g., to add an object writer pass), this method can be used to /// finish up adding passes to emit the file, if necessary. @@ -194,8 +180,6 @@ // Make sure the code model is set. setCodeModelForStatic(); - if (OCE) - addSimpleCodeEmitter(PM, OptLevel, *OCE); if (PrintEmittedAsm) addAssemblyEmitter(PM, OptLevel, true, ferrs()); Removed: llvm/trunk/lib/CodeGen/MachOWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachOWriter.cpp?rev=95032&view=auto ============================================================================== --- llvm/trunk/lib/CodeGen/MachOWriter.cpp (original) +++ llvm/trunk/lib/CodeGen/MachOWriter.cpp (removed) @@ -1,125 +0,0 @@ -//===-- MachOWriter.cpp - Target-independent Mach-O Writer code -----------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the target-independent Mach-O writer. This file writes -// out the Mach-O file in the following order: -// -// #1 FatHeader (universal-only) -// #2 FatArch (universal-only, 1 per universal arch) -// Per arch: -// #3 Header -// #4 Load Commands -// #5 Sections -// #6 Relocations -// #7 Symbols -// #8 Strings -// -//===----------------------------------------------------------------------===// - -#include "MachOWriter.h" -#include "llvm/Function.h" -#include "llvm/CodeGen/FileWriters.h" -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/MC/MCAsmInfo.h" -#include "llvm/MC/MCContext.h" -#include "llvm/MC/MCCodeEmitter.h" -#include "llvm/MC/MCInst.h" -#include "llvm/MC/MCStreamer.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/FormattedStream.h" -#include "llvm/Support/raw_ostream.h" -#include "llvm/Target/Mangler.h" -#include "llvm/Target/TargetData.h" -#include "llvm/Target/TargetLowering.h" -#include "llvm/Target/TargetLoweringObjectFile.h" -using namespace llvm; - -namespace llvm { -MachineFunctionPass *createMachOWriter(formatted_raw_ostream &O, - TargetMachine &TM, - const MCAsmInfo *T, - MCCodeEmitter *MCE) { - return new MachOWriter(O, TM, T, MCE); -} -} - -//===----------------------------------------------------------------------===// -// MachOWriter Implementation -//===----------------------------------------------------------------------===// - -char MachOWriter::ID = 0; - -MachOWriter::MachOWriter(formatted_raw_ostream &o, TargetMachine &tm, - const MCAsmInfo *T, MCCodeEmitter *MCE) - : MachineFunctionPass(&ID), O(o), TM(tm), MAI(T), MCCE(MCE), - OutContext(*new MCContext()), - OutStreamer(*createMachOStreamer(OutContext, O, MCCE)) { -} - -MachOWriter::~MachOWriter() { - delete &OutStreamer; - delete &OutContext; - delete MCCE; -} - -bool MachOWriter::doInitialization(Module &M) { - // Initialize TargetLoweringObjectFile. - TM.getTargetLowering()->getObjFileLowering().Initialize(OutContext, TM); - - return false; -} - -/// doFinalization - Now that the module has been completely processed, emit -/// the Mach-O file to 'O'. -bool MachOWriter::doFinalization(Module &M) { - OutStreamer.Finish(); - return false; -} - -bool MachOWriter::runOnMachineFunction(MachineFunction &MF) { - const Function *F = MF.getFunction(); - TargetLoweringObjectFile &TLOF = TM.getTargetLowering()->getObjFileLowering(); - const MCSection *S = TLOF.SectionForGlobal(F, Mang, TM); - OutStreamer.SwitchSection(S); - - for (MachineFunction::const_iterator I = MF.begin(), E = MF.end(); - I != E; ++I) { - // Print a label for the basic block. - for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end(); - II != IE; ++II) { - const MachineInstr *MI = II; - MCInst OutMI; - OutMI.setOpcode(MI->getOpcode()); - - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { - const MachineOperand &MO = MI->getOperand(i); - MCOperand MCOp; - - switch (MO.getType()) { - default: - MI->dump(); - llvm_unreachable("unknown operand type"); - case MachineOperand::MO_Register: - // Ignore all implicit register operands. - if (MO.isImplicit()) continue; - MCOp = MCOperand::CreateReg(MO.getReg()); - break; - case MachineOperand::MO_Immediate: - MCOp = MCOperand::CreateImm(MO.getImm()); - break; - } - OutMI.addOperand(MCOp); - } - - OutStreamer.EmitInstruction(OutMI); - } - } - - return false; -} Removed: llvm/trunk/lib/CodeGen/MachOWriter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachOWriter.h?rev=95032&view=auto ============================================================================== --- llvm/trunk/lib/CodeGen/MachOWriter.h (original) +++ llvm/trunk/lib/CodeGen/MachOWriter.h (removed) @@ -1,88 +0,0 @@ -//=== MachOWriter.h - Target-independent Mach-O writer support --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the MachOWriter class. -// -//===----------------------------------------------------------------------===// - -#ifndef MACHOWRITER_H -#define MACHOWRITER_H - -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/Target/TargetMachine.h" - -namespace llvm { - class GlobalVariable; - class Mangler; - class MCCodeEmitter; - class MCContext; - class MCStreamer; - - /// MachOWriter - This class implements the common target-independent code for - /// writing Mach-O files. Targets should derive a class from this to - /// parameterize the output format. - /// - class MachOWriter : public MachineFunctionPass { - static char ID; - - protected: - /// Output stream to send the resultant object file to. - /// - formatted_raw_ostream &O; - - /// Target machine description. - /// - TargetMachine &TM; - - /// Target Asm Printer information. - /// - const MCAsmInfo *MAI; - - /// MCCE - The MCCodeEmitter object that we are exposing to emit machine - /// code for functions to the .o file. - MCCodeEmitter *MCCE; - - /// OutContext - This is the context for the output file that we are - /// streaming. This owns all of the global MC-related objects for the - /// generated translation unit. - MCContext &OutContext; - - /// OutStreamer - This is the MCStreamer object for the file we are - /// generating. This contains the transient state for the current - /// translation unit that we are generating (such as the current section - /// etc). - MCStreamer &OutStreamer; - - /// Name-mangler for global names. - /// - Mangler *Mang; - - /// doInitialization - Emit the file header and all of the global variables - /// for the module to the Mach-O file. - bool doInitialization(Module &M); - - /// doFinalization - Now that the module has been completely processed, emit - /// the Mach-O file to 'O'. - bool doFinalization(Module &M); - - bool runOnMachineFunction(MachineFunction &MF); - - public: - explicit MachOWriter(formatted_raw_ostream &O, TargetMachine &TM, - const MCAsmInfo *T, MCCodeEmitter *MCE); - - virtual ~MachOWriter(); - - virtual const char *getPassName() const { - return "Mach-O Writer"; - } - }; -} - -#endif Modified: llvm/trunk/tools/llc/llc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=95033&r1=95032&r2=95033&view=diff ============================================================================== --- llvm/trunk/tools/llc/llc.cpp (original) +++ llvm/trunk/tools/llc/llc.cpp Mon Feb 1 17:56:58 2010 @@ -23,7 +23,6 @@ #include "llvm/CodeGen/FileWriters.h" #include "llvm/CodeGen/LinkAllAsmWriterComponents.h" #include "llvm/CodeGen/LinkAllCodegenComponents.h" -#include "llvm/CodeGen/ObjectCodeEmitter.h" #include "llvm/Config/config.h" #include "llvm/LinkAllVMCore.h" #include "llvm/Support/CommandLine.h" @@ -346,9 +345,6 @@ Passes.add(createVerifierPass()); #endif - // Ask the target to add backend passes as necessary. - ObjectCodeEmitter *OCE = 0; - // Override default to generate verbose assembly. Target.setAsmVerbosityDefault(true); @@ -364,14 +360,10 @@ sys::Path(OutputFilename).eraseFromDisk(); return 1; case FileModel::AsmFile: - case FileModel::MachOFile: - break; - case FileModel::ElfFile: - OCE = AddELFWriter(Passes, *Out, Target); break; } - if (Target.addPassesToEmitFileFinish(Passes, OCE, OLvl)) { + if (Target.addPassesToEmitFileFinish(Passes, (ObjectCodeEmitter *)0, OLvl)){ errs() << argv[0] << ": target does not support generation of this" << " file type!\n"; if (Out != &fouts()) delete Out; From scallanan at apple.com Mon Feb 1 18:04:46 2010 From: scallanan at apple.com (Sean Callanan) Date: Tue, 02 Feb 2010 00:04:46 -0000 Subject: [llvm-commits] [llvm] r95034 - in /llvm/trunk/tools/ed: EDMain.cpp EnhancedDisassembly.exports EnhancedDisassembly.exports.blocks EnhancedDisassembly.exports.noblocks Makefile Message-ID: <201002020004.o1204k8D016022@zion.cs.uiuc.edu> Author: spyffe Date: Mon Feb 1 18:04:46 2010 New Revision: 95034 URL: http://llvm.org/viewvc/llvm-project?rev=95034&view=rev Log: Changed to Chris Lattner's suggested approach, which merely stubs out the blocks-based disassembly functions if the library wasn't built with blocks, which allows a constant .exports file and also properly deals with situations in which the compiler used to build a client is different from the compiler used to build the library. Added: llvm/trunk/tools/ed/EnhancedDisassembly.exports Removed: llvm/trunk/tools/ed/EnhancedDisassembly.exports.blocks llvm/trunk/tools/ed/EnhancedDisassembly.exports.noblocks Modified: llvm/trunk/tools/ed/EDMain.cpp llvm/trunk/tools/ed/Makefile Modified: llvm/trunk/tools/ed/EDMain.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EDMain.cpp?rev=95034&r1=95033&r2=95034&view=diff ============================================================================== --- llvm/trunk/tools/ed/EDMain.cpp (original) +++ llvm/trunk/tools/ed/EDMain.cpp Mon Feb 1 18:04:46 2010 @@ -248,4 +248,18 @@ return inst->visitTokens(visitor); } +#else + +extern "C" unsigned int EDBlockCreateInsts() { + return 0; +} + +extern "C" int EDBlockEvaluateOperand() { + return -1; +} + +extern "C" int EDBlockVisitTokens() { + return -1; +} + #endif Added: llvm/trunk/tools/ed/EnhancedDisassembly.exports URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EnhancedDisassembly.exports?rev=95034&view=auto ============================================================================== --- llvm/trunk/tools/ed/EnhancedDisassembly.exports (added) +++ llvm/trunk/tools/ed/EnhancedDisassembly.exports Mon Feb 1 18:04:46 2010 @@ -0,0 +1,31 @@ +_EDGetDisassembler +_EDGetRegisterName +_EDRegisterIsStackPointer +_EDRegisterIsProgramCounter +_EDCreateInsts +_EDReleaseInst +_EDInstByteSize +_EDGetInstString +_EDInstIsBranch +_EDInstIsMove +_EDBranchTargetID +_EDMoveSourceID +_EDMoveTargetID +_EDNumTokens +_EDGetToken +_EDGetTokenString +_EDOperandIndexForToken +_EDTokenIsWhitespace +_EDTokenIsPunctuation +_EDTokenIsOpcode +_EDTokenIsLiteral +_EDTokenIsRegister +_EDTokenIsNegativeLiteral +_EDLiteralTokenAbsoluteValue +_EDRegisterTokenValue +_EDNumOperands +_EDGetOperand +_EDEvaluateOperand +_EDBlockCreateInsts +_EDBlockEvaluateOperand +_EDBlockVisitTokens Removed: llvm/trunk/tools/ed/EnhancedDisassembly.exports.blocks URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EnhancedDisassembly.exports.blocks?rev=95033&view=auto ============================================================================== --- llvm/trunk/tools/ed/EnhancedDisassembly.exports.blocks (original) +++ llvm/trunk/tools/ed/EnhancedDisassembly.exports.blocks (removed) @@ -1,31 +0,0 @@ -_EDGetDisassembler -_EDGetRegisterName -_EDRegisterIsStackPointer -_EDRegisterIsProgramCounter -_EDCreateInsts -_EDReleaseInst -_EDInstByteSize -_EDGetInstString -_EDInstIsBranch -_EDInstIsMove -_EDBranchTargetID -_EDMoveSourceID -_EDMoveTargetID -_EDNumTokens -_EDGetToken -_EDGetTokenString -_EDOperandIndexForToken -_EDTokenIsWhitespace -_EDTokenIsPunctuation -_EDTokenIsOpcode -_EDTokenIsLiteral -_EDTokenIsRegister -_EDTokenIsNegativeLiteral -_EDLiteralTokenAbsoluteValue -_EDRegisterTokenValue -_EDNumOperands -_EDGetOperand -_EDEvaluateOperand -_EDBlockCreateInsts -_EDBlockEvaluateOperand -_EDBlockVisitTokens Removed: llvm/trunk/tools/ed/EnhancedDisassembly.exports.noblocks URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EnhancedDisassembly.exports.noblocks?rev=95033&view=auto ============================================================================== --- llvm/trunk/tools/ed/EnhancedDisassembly.exports.noblocks (original) +++ llvm/trunk/tools/ed/EnhancedDisassembly.exports.noblocks (removed) @@ -1,28 +0,0 @@ -_EDGetDisassembler -_EDGetRegisterName -_EDRegisterIsStackPointer -_EDRegisterIsProgramCounter -_EDCreateInsts -_EDReleaseInst -_EDInstByteSize -_EDGetInstString -_EDInstIsBranch -_EDInstIsMove -_EDBranchTargetID -_EDMoveSourceID -_EDMoveTargetID -_EDNumTokens -_EDGetToken -_EDGetTokenString -_EDOperandIndexForToken -_EDTokenIsWhitespace -_EDTokenIsPunctuation -_EDTokenIsOpcode -_EDTokenIsLiteral -_EDTokenIsRegister -_EDTokenIsNegativeLiteral -_EDLiteralTokenAbsoluteValue -_EDRegisterTokenValue -_EDNumOperands -_EDGetOperand -_EDEvaluateOperand Modified: llvm/trunk/tools/ed/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/Makefile?rev=95034&r1=95033&r2=95034&view=diff ============================================================================== --- llvm/trunk/tools/ed/Makefile (original) +++ llvm/trunk/tools/ed/Makefile Mon Feb 1 18:04:46 2010 @@ -10,7 +10,7 @@ LEVEL = ../.. LIBRARYNAME = EnhancedDisassembly -BUILT_SOURCES = EDInfo.inc EnhancedDisassembly.exports +BUILT_SOURCES = EDInfo.inc # Include this here so we can get the configuration of the targets # that have been configured for construction. We have to do this @@ -34,7 +34,7 @@ # extra options to override libtool defaults LLVMLibsOptions := $(LLVMLibsOptions) \ -avoid-version \ - -Wl,-exported_symbols_list -Wl,EnhancedDisassembly.exports \ + -Wl,-exported_symbols_list -Wl,$(PROJ_SRC_DIR)/EnhancedDisassembly.exports \ -Wl,-dead_strip \ -Wl,-seg1addr -Wl,0xE0000000 @@ -51,17 +51,5 @@ $(Echo) "Building semantic information header" $(Verb) $(TableGen) -o $(call SYSPATH, $@) -gen-enhanced-disassembly-header /dev/null -EnhancedDisassembly.exports: EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports.blocks - $(Echo) "Copying exports file" -ifeq ($(HOST_OS),Darwin) - $(Verb) if [ $(DARWIN_VERS) -ge 10 ] ; \ - then $(CP) -f $(PROJ_SRC_DIR)/EnhancedDisassembly.exports.blocks EnhancedDisassembly.exports ; \ - else $(CP) -f $(PROJ_SRC_DIR)/EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports ; \ - fi -else - $(Verb) $(CP) -f $(PROJ_SRC_DIR)/EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports -endif - clean:: -$(Verb) $(RM) -f EDInfo.inc - -$(Verb) $(RM) -f EnhancedDisassembly.exports From echristo at apple.com Mon Feb 1 18:06:55 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 02 Feb 2010 00:06:55 -0000 Subject: [llvm-commits] [llvm] r95035 - /llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Message-ID: <201002020006.o1206tSc016104@zion.cs.uiuc.edu> Author: echristo Date: Mon Feb 1 18:06:55 2010 New Revision: 95035 URL: http://llvm.org/viewvc/llvm-project?rev=95035&view=rev Log: Untabify previous commit. Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=95035&r1=95034&r2=95035&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Mon Feb 1 18:06:55 2010 @@ -232,10 +232,10 @@ AWI = AttributeWithIndex::get(~0u, Attribute::ReadOnly | Attribute::NoUnwind); Value *MemChr = M->getOrInsertFunction("memchr", AttrListPtr::get(&AWI, 1), - Type::getInt8PtrTy(*Context), - Type::getInt8PtrTy(*Context), + Type::getInt8PtrTy(*Context), + Type::getInt8PtrTy(*Context), Type::getInt32Ty(*Context), - TD->getIntPtrType(*Context), + TD->getIntPtrType(*Context), NULL); CallInst *CI = B.CreateCall3(MemChr, CastToCStr(Ptr, B), Val, Len, "memchr"); From echristo at apple.com Mon Feb 1 18:13:06 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 02 Feb 2010 00:13:06 -0000 Subject: [llvm-commits] [llvm] r95036 - /llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Message-ID: <201002020013.o120D6Mk016310@zion.cs.uiuc.edu> Author: echristo Date: Mon Feb 1 18:13:06 2010 New Revision: 95036 URL: http://llvm.org/viewvc/llvm-project?rev=95036&view=rev Log: More indentation/tabification fixes. Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=95036&r1=95035&r2=95036&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Mon Feb 1 18:13:06 2010 @@ -152,7 +152,7 @@ Constant *StrLen =M->getOrInsertFunction("strlen", AttrListPtr::get(AWI, 2), TD->getIntPtrType(*Context), - Type::getInt8PtrTy(*Context), + Type::getInt8PtrTy(*Context), NULL); CallInst *CI = B.CreateCall(StrLen, CastToCStr(Ptr, B), "strlen"); if (const Function *F = dyn_cast(StrLen->stripPointerCasts())) @@ -321,9 +321,9 @@ Type::getInt32Ty(*Context), NULL); CallInst *CI = B.CreateCall(PutChar, B.CreateIntCast(Char, - Type::getInt32Ty(*Context), - /*isSigned*/true, - "chari"), + Type::getInt32Ty(*Context), + /*isSigned*/true, + "chari"), "putchar"); if (const Function *F = dyn_cast(PutChar->stripPointerCasts())) @@ -341,7 +341,7 @@ Value *PutS = M->getOrInsertFunction("puts", AttrListPtr::get(AWI, 2), Type::getInt32Ty(*Context), - Type::getInt8PtrTy(*Context), + Type::getInt8PtrTy(*Context), NULL); CallInst *CI = B.CreateCall(PutS, CastToCStr(Str, B), "puts"); if (const Function *F = dyn_cast(PutS->stripPointerCasts())) @@ -359,13 +359,13 @@ Constant *F; if (isa(File->getType())) F = M->getOrInsertFunction("fputc", AttrListPtr::get(AWI, 2), - Type::getInt32Ty(*Context), + Type::getInt32Ty(*Context), Type::getInt32Ty(*Context), File->getType(), - NULL); + NULL); else F = M->getOrInsertFunction("fputc", - Type::getInt32Ty(*Context), - Type::getInt32Ty(*Context), + Type::getInt32Ty(*Context), + Type::getInt32Ty(*Context), File->getType(), NULL); Char = B.CreateIntCast(Char, Type::getInt32Ty(*Context), /*isSigned*/true, "chari"); @@ -386,7 +386,7 @@ Constant *F; if (isa(File->getType())) F = M->getOrInsertFunction("fputs", AttrListPtr::get(AWI, 3), - Type::getInt32Ty(*Context), + Type::getInt32Ty(*Context), Type::getInt8PtrTy(*Context), File->getType(), NULL); else @@ -414,13 +414,13 @@ TD->getIntPtrType(*Context), Type::getInt8PtrTy(*Context), TD->getIntPtrType(*Context), - TD->getIntPtrType(*Context), + TD->getIntPtrType(*Context), File->getType(), NULL); else F = M->getOrInsertFunction("fwrite", TD->getIntPtrType(*Context), Type::getInt8PtrTy(*Context), TD->getIntPtrType(*Context), - TD->getIntPtrType(*Context), + TD->getIntPtrType(*Context), File->getType(), NULL); CallInst *CI = B.CreateCall4(F, CastToCStr(Ptr, B), Size, ConstantInt::get(TD->getIntPtrType(*Context), 1), File); @@ -1327,7 +1327,7 @@ Module *M = Caller->getParent(); Value *Callee = M->getOrInsertFunction(Name, Op->getType(), Op->getType(), - Type::getInt32Ty(*Context),NULL); + Type::getInt32Ty(*Context),NULL); CallInst *CI = B.CreateCall2(Callee, One, LdExpArg); if (const Function *F = dyn_cast(Callee->stripPointerCasts())) CI->setCallingConv(F->getCallingConv()); From evan.cheng at apple.com Mon Feb 1 18:15:08 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 1 Feb 2010 16:15:08 -0800 Subject: [llvm-commits] [llvm] r95034 - in /llvm/trunk/tools/ed: EDMain.cpp EnhancedDisassembly.exports EnhancedDisassembly.exports.blocks EnhancedDisassembly.exports.noblocks Makefile In-Reply-To: <201002020004.o1204k8D016022@zion.cs.uiuc.edu> References: <201002020004.o1204k8D016022@zion.cs.uiuc.edu> Message-ID: Sean, please see Dan's comment to r94974. It's very bad to have a tool named 'ed' in the Unix world. Evan On Feb 1, 2010, at 4:04 PM, Sean Callanan wrote: > Author: spyffe > Date: Mon Feb 1 18:04:46 2010 > New Revision: 95034 > > URL: http://llvm.org/viewvc/llvm-project?rev=95034&view=rev > Log: > Changed to Chris Lattner's suggested approach, which > merely stubs out the blocks-based disassembly functions > if the library wasn't built with blocks, which allows a > constant .exports file and also properly deals with > situations in which the compiler used to build a client > is different from the compiler used to build the library. > > Added: > llvm/trunk/tools/ed/EnhancedDisassembly.exports > Removed: > llvm/trunk/tools/ed/EnhancedDisassembly.exports.blocks > llvm/trunk/tools/ed/EnhancedDisassembly.exports.noblocks > Modified: > llvm/trunk/tools/ed/EDMain.cpp > llvm/trunk/tools/ed/Makefile > > Modified: llvm/trunk/tools/ed/EDMain.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EDMain.cpp?rev=95034&r1=95033&r2=95034&view=diff > > ============================================================================== > --- llvm/trunk/tools/ed/EDMain.cpp (original) > +++ llvm/trunk/tools/ed/EDMain.cpp Mon Feb 1 18:04:46 2010 > @@ -248,4 +248,18 @@ > return inst->visitTokens(visitor); > } > > +#else > + > +extern "C" unsigned int EDBlockCreateInsts() { > + return 0; > +} > + > +extern "C" int EDBlockEvaluateOperand() { > + return -1; > +} > + > +extern "C" int EDBlockVisitTokens() { > + return -1; > +} > + > #endif > > Added: llvm/trunk/tools/ed/EnhancedDisassembly.exports > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EnhancedDisassembly.exports?rev=95034&view=auto > > ============================================================================== > --- llvm/trunk/tools/ed/EnhancedDisassembly.exports (added) > +++ llvm/trunk/tools/ed/EnhancedDisassembly.exports Mon Feb 1 18:04:46 2010 > @@ -0,0 +1,31 @@ > +_EDGetDisassembler > +_EDGetRegisterName > +_EDRegisterIsStackPointer > +_EDRegisterIsProgramCounter > +_EDCreateInsts > +_EDReleaseInst > +_EDInstByteSize > +_EDGetInstString > +_EDInstIsBranch > +_EDInstIsMove > +_EDBranchTargetID > +_EDMoveSourceID > +_EDMoveTargetID > +_EDNumTokens > +_EDGetToken > +_EDGetTokenString > +_EDOperandIndexForToken > +_EDTokenIsWhitespace > +_EDTokenIsPunctuation > +_EDTokenIsOpcode > +_EDTokenIsLiteral > +_EDTokenIsRegister > +_EDTokenIsNegativeLiteral > +_EDLiteralTokenAbsoluteValue > +_EDRegisterTokenValue > +_EDNumOperands > +_EDGetOperand > +_EDEvaluateOperand > +_EDBlockCreateInsts > +_EDBlockEvaluateOperand > +_EDBlockVisitTokens > > Removed: llvm/trunk/tools/ed/EnhancedDisassembly.exports.blocks > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EnhancedDisassembly.exports.blocks?rev=95033&view=auto > > ============================================================================== > --- llvm/trunk/tools/ed/EnhancedDisassembly.exports.blocks (original) > +++ llvm/trunk/tools/ed/EnhancedDisassembly.exports.blocks (removed) > @@ -1,31 +0,0 @@ > -_EDGetDisassembler > -_EDGetRegisterName > -_EDRegisterIsStackPointer > -_EDRegisterIsProgramCounter > -_EDCreateInsts > -_EDReleaseInst > -_EDInstByteSize > -_EDGetInstString > -_EDInstIsBranch > -_EDInstIsMove > -_EDBranchTargetID > -_EDMoveSourceID > -_EDMoveTargetID > -_EDNumTokens > -_EDGetToken > -_EDGetTokenString > -_EDOperandIndexForToken > -_EDTokenIsWhitespace > -_EDTokenIsPunctuation > -_EDTokenIsOpcode > -_EDTokenIsLiteral > -_EDTokenIsRegister > -_EDTokenIsNegativeLiteral > -_EDLiteralTokenAbsoluteValue > -_EDRegisterTokenValue > -_EDNumOperands > -_EDGetOperand > -_EDEvaluateOperand > -_EDBlockCreateInsts > -_EDBlockEvaluateOperand > -_EDBlockVisitTokens > > Removed: llvm/trunk/tools/ed/EnhancedDisassembly.exports.noblocks > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EnhancedDisassembly.exports.noblocks?rev=95033&view=auto > > ============================================================================== > --- llvm/trunk/tools/ed/EnhancedDisassembly.exports.noblocks (original) > +++ llvm/trunk/tools/ed/EnhancedDisassembly.exports.noblocks (removed) > @@ -1,28 +0,0 @@ > -_EDGetDisassembler > -_EDGetRegisterName > -_EDRegisterIsStackPointer > -_EDRegisterIsProgramCounter > -_EDCreateInsts > -_EDReleaseInst > -_EDInstByteSize > -_EDGetInstString > -_EDInstIsBranch > -_EDInstIsMove > -_EDBranchTargetID > -_EDMoveSourceID > -_EDMoveTargetID > -_EDNumTokens > -_EDGetToken > -_EDGetTokenString > -_EDOperandIndexForToken > -_EDTokenIsWhitespace > -_EDTokenIsPunctuation > -_EDTokenIsOpcode > -_EDTokenIsLiteral > -_EDTokenIsRegister > -_EDTokenIsNegativeLiteral > -_EDLiteralTokenAbsoluteValue > -_EDRegisterTokenValue > -_EDNumOperands > -_EDGetOperand > -_EDEvaluateOperand > > Modified: llvm/trunk/tools/ed/Makefile > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/Makefile?rev=95034&r1=95033&r2=95034&view=diff > > ============================================================================== > --- llvm/trunk/tools/ed/Makefile (original) > +++ llvm/trunk/tools/ed/Makefile Mon Feb 1 18:04:46 2010 > @@ -10,7 +10,7 @@ > LEVEL = ../.. > LIBRARYNAME = EnhancedDisassembly > > -BUILT_SOURCES = EDInfo.inc EnhancedDisassembly.exports > +BUILT_SOURCES = EDInfo.inc > > # Include this here so we can get the configuration of the targets > # that have been configured for construction. We have to do this > @@ -34,7 +34,7 @@ > # extra options to override libtool defaults > LLVMLibsOptions := $(LLVMLibsOptions) \ > -avoid-version \ > - -Wl,-exported_symbols_list -Wl,EnhancedDisassembly.exports \ > + -Wl,-exported_symbols_list -Wl,$(PROJ_SRC_DIR)/EnhancedDisassembly.exports \ > -Wl,-dead_strip \ > -Wl,-seg1addr -Wl,0xE0000000 > > @@ -51,17 +51,5 @@ > $(Echo) "Building semantic information header" > $(Verb) $(TableGen) -o $(call SYSPATH, $@) -gen-enhanced-disassembly-header /dev/null > > -EnhancedDisassembly.exports: EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports.blocks > - $(Echo) "Copying exports file" > -ifeq ($(HOST_OS),Darwin) > - $(Verb) if [ $(DARWIN_VERS) -ge 10 ] ; \ > - then $(CP) -f $(PROJ_SRC_DIR)/EnhancedDisassembly.exports.blocks EnhancedDisassembly.exports ; \ > - else $(CP) -f $(PROJ_SRC_DIR)/EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports ; \ > - fi > -else > - $(Verb) $(CP) -f $(PROJ_SRC_DIR)/EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports > -endif > - > clean:: > -$(Verb) $(RM) -f EDInfo.inc > - -$(Verb) $(RM) -f EnhancedDisassembly.exports > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From scallanan at apple.com Mon Feb 1 18:24:34 2010 From: scallanan at apple.com (Sean Callanan) Date: Mon, 1 Feb 2010 16:24:34 -0800 Subject: [llvm-commits] [llvm] r94974 - in /llvm/trunk/tools/ed: EDDisassembler.cpp EDDisassembler.h EDInst.cpp EDInst.h EDMain.cpp EDOperand.cpp EDOperand.h EDToken.cpp EDToken.h EnhancedDisassembly.exports In-Reply-To: <62466162-CB31-45F8-97F8-1BEAFE0017A2@apple.com> References: <201002010849.o118na7N001735@zion.cs.uiuc.edu> <62466162-CB31-45F8-97F8-1BEAFE0017A2@apple.com> Message-ID: <01E269D8-7100-4EF8-8369-C69DFA1343C0@apple.com> Dan, you're right, and I definitely wouldn't name an executable that way. The library that's built in tools/ed is libEnhancedDisassembler.a/.so. The reason I called the directory ed is that if I called it EnhancedDisassembly it would play havoc with what people see when they type 'ls' in the tools subdirectory, and it would be annoying to cd into that directory. If you think the potential confusion still outweighs the benefits of a compact folder name, let me know and I'll see what I can do to fix it. Sean On Feb 1, 2010, at 12:23 PM, Dan Gohman wrote: > Hi Sean, > > "ed" is the name of a standard utility program in POSIX, SUS, etc. > > Dan > > On Feb 1, 2010, at 12:49 AM, Sean Callanan wrote: > >> Author: spyffe >> Date: Mon Feb 1 02:49:35 2010 >> New Revision: 94974 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=94974&view=rev >> Log: >> Added the enhanced disassembly library's implementation and >> fleshed out the .exports file. I still have to fix several >> details of operand parsing, but the basic functionality is >> there and usable. >> >> Added: >> llvm/trunk/tools/ed/EDDisassembler.cpp >> llvm/trunk/tools/ed/EDDisassembler.h >> llvm/trunk/tools/ed/EDInst.cpp >> llvm/trunk/tools/ed/EDInst.h >> llvm/trunk/tools/ed/EDOperand.cpp >> llvm/trunk/tools/ed/EDOperand.h >> llvm/trunk/tools/ed/EDToken.cpp >> llvm/trunk/tools/ed/EDToken.h >> Modified: >> llvm/trunk/tools/ed/EDMain.cpp >> llvm/trunk/tools/ed/EnhancedDisassembly.exports >> >> Added: llvm/trunk/tools/ed/EDDisassembler.cpp > From bob.wilson at apple.com Mon Feb 1 18:29:26 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Mon, 1 Feb 2010 16:29:26 -0800 Subject: [llvm-commits] [llvm] r94974 - in /llvm/trunk/tools/ed: EDDisassembler.cpp EDDisassembler.h EDInst.cpp EDInst.h EDMain.cpp EDOperand.cpp EDOperand.h EDToken.cpp EDToken.h EnhancedDisassembly.exports In-Reply-To: <01E269D8-7100-4EF8-8369-C69DFA1343C0@apple.com> References: <201002010849.o118na7N001735@zion.cs.uiuc.edu> <62466162-CB31-45F8-97F8-1BEAFE0017A2@apple.com> <01E269D8-7100-4EF8-8369-C69DFA1343C0@apple.com> Message-ID: <98892535-CA6B-4583-9A9C-59593C806946@apple.com> You could compromise and go with something like "edis" On Feb 1, 2010, at 4:24 PM, Sean Callanan wrote: > Dan, > > you're right, and I definitely wouldn't name an executable that way. > > The library that's built in tools/ed is libEnhancedDisassembler.a/.so. The reason I called the directory ed is that if I called it EnhancedDisassembly it would play havoc with what people see when they type 'ls' in the tools subdirectory, and it would be annoying to cd into that directory. > > If you think the potential confusion still outweighs the benefits of a compact folder name, let me know and I'll see what I can do to fix it. > > Sean > > > On Feb 1, 2010, at 12:23 PM, Dan Gohman wrote: > >> Hi Sean, >> >> "ed" is the name of a standard utility program in POSIX, SUS, etc. >> >> Dan >> >> On Feb 1, 2010, at 12:49 AM, Sean Callanan wrote: >> >>> Author: spyffe >>> Date: Mon Feb 1 02:49:35 2010 >>> New Revision: 94974 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=94974&view=rev >>> Log: >>> Added the enhanced disassembly library's implementation and >>> fleshed out the .exports file. I still have to fix several >>> details of operand parsing, but the basic functionality is >>> there and usable. >>> >>> Added: >>> llvm/trunk/tools/ed/EDDisassembler.cpp >>> llvm/trunk/tools/ed/EDDisassembler.h >>> llvm/trunk/tools/ed/EDInst.cpp >>> llvm/trunk/tools/ed/EDInst.h >>> llvm/trunk/tools/ed/EDOperand.cpp >>> llvm/trunk/tools/ed/EDOperand.h >>> llvm/trunk/tools/ed/EDToken.cpp >>> llvm/trunk/tools/ed/EDToken.h >>> Modified: >>> llvm/trunk/tools/ed/EDMain.cpp >>> llvm/trunk/tools/ed/EnhancedDisassembly.exports >>> >>> Added: llvm/trunk/tools/ed/EDDisassembler.cpp >> > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From echristo at apple.com Mon Feb 1 18:30:40 2010 From: echristo at apple.com (Eric Christopher) Date: Mon, 1 Feb 2010 16:30:40 -0800 Subject: [llvm-commits] [llvm] r94974 - in /llvm/trunk/tools/ed: EDDisassembler.cpp EDDisassembler.h EDInst.cpp EDInst.h EDMain.cpp EDOperand.cpp EDOperand.h EDToken.cpp EDToken.h EnhancedDisassembly.exports In-Reply-To: <01E269D8-7100-4EF8-8369-C69DFA1343C0@apple.com> References: <201002010849.o118na7N001735@zion.cs.uiuc.edu> <62466162-CB31-45F8-97F8-1BEAFE0017A2@apple.com> <01E269D8-7100-4EF8-8369-C69DFA1343C0@apple.com> Message-ID: Hi Sean, > > you're right, and I definitely wouldn't name an executable that way. > > The library that's built in tools/ed is libEnhancedDisassembler.a/.so. The reason I called the directory ed is that if I called it EnhancedDisassembly it would play havoc with what people see when they type 'ls' in the tools subdirectory, and it would be annoying to cd into that directory. > > If you think the potential confusion still outweighs the benefits of a compact folder name, let me know and I'll see what I can do to fix it. > Were you planning on having a command line tool to test the library (or just use on the command line for that matter :). If so, something like Bob's suggestion of edis could be nice, or llvm-edis to match everything else. -eric From scallanan at apple.com Mon Feb 1 18:31:31 2010 From: scallanan at apple.com (Sean Callanan) Date: Mon, 1 Feb 2010 16:31:31 -0800 Subject: [llvm-commits] [llvm] r94974 - in /llvm/trunk/tools/ed: EDDisassembler.cpp EDDisassembler.h EDInst.cpp EDInst.h EDMain.cpp EDOperand.cpp EDOperand.h EDToken.cpp EDToken.h EnhancedDisassembly.exports In-Reply-To: <98892535-CA6B-4583-9A9C-59593C806946@apple.com> References: <201002010849.o118na7N001735@zion.cs.uiuc.edu> <62466162-CB31-45F8-97F8-1BEAFE0017A2@apple.com> <01E269D8-7100-4EF8-8369-C69DFA1343C0@apple.com> <98892535-CA6B-4583-9A9C-59593C806946@apple.com> Message-ID: <6423996B-BA08-4A24-8531-76C4504970B8@apple.com> Sounds good to me! If I don't hear any complaints by tomorrow morning, I'll rename the subdirectory to edis. Sean On Feb 1, 2010, at 4:29 PM, Bob Wilson wrote: > You could compromise and go with something like "edis" > > On Feb 1, 2010, at 4:24 PM, Sean Callanan wrote: > >> Dan, >> >> you're right, and I definitely wouldn't name an executable that way. >> >> The library that's built in tools/ed is libEnhancedDisassembler.a/.so. The reason I called the directory ed is that if I called it EnhancedDisassembly it would play havoc with what people see when they type 'ls' in the tools subdirectory, and it would be annoying to cd into that directory. >> >> If you think the potential confusion still outweighs the benefits of a compact folder name, let me know and I'll see what I can do to fix it. >> >> Sean >> >> >> On Feb 1, 2010, at 12:23 PM, Dan Gohman wrote: >> >>> Hi Sean, >>> >>> "ed" is the name of a standard utility program in POSIX, SUS, etc. >>> >>> Dan >>> >>> On Feb 1, 2010, at 12:49 AM, Sean Callanan wrote: >>> >>>> Author: spyffe >>>> Date: Mon Feb 1 02:49:35 2010 >>>> New Revision: 94974 >>>> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=94974&view=rev >>>> Log: >>>> Added the enhanced disassembly library's implementation and >>>> fleshed out the .exports file. I still have to fix several >>>> details of operand parsing, but the basic functionality is >>>> there and usable. >>>> >>>> Added: >>>> llvm/trunk/tools/ed/EDDisassembler.cpp >>>> llvm/trunk/tools/ed/EDDisassembler.h >>>> llvm/trunk/tools/ed/EDInst.cpp >>>> llvm/trunk/tools/ed/EDInst.h >>>> llvm/trunk/tools/ed/EDOperand.cpp >>>> llvm/trunk/tools/ed/EDOperand.h >>>> llvm/trunk/tools/ed/EDToken.cpp >>>> llvm/trunk/tools/ed/EDToken.h >>>> Modified: >>>> llvm/trunk/tools/ed/EDMain.cpp >>>> llvm/trunk/tools/ed/EnhancedDisassembly.exports >>>> >>>> Added: llvm/trunk/tools/ed/EDDisassembler.cpp >>> >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From echristo at apple.com Mon Feb 1 18:51:45 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 02 Feb 2010 00:51:45 -0000 Subject: [llvm-commits] [llvm] r95040 - /llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Message-ID: <201002020051.o120pj41017842@zion.cs.uiuc.edu> Author: echristo Date: Mon Feb 1 18:51:45 2010 New Revision: 95040 URL: http://llvm.org/viewvc/llvm-project?rev=95040&view=rev Log: Don't need to check the last argument since it'll always be bool. We also don't use TargetData here. Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=95040&r1=95039&r2=95040&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Mon Feb 1 18:51:45 2010 @@ -1203,14 +1203,10 @@ struct StrCpyChkOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { - // These optimizations require TargetData. - if (!TD) return 0; - const FunctionType *FT = Callee->getFunctionType(); if (FT->getNumParams() != 3 || FT->getReturnType() != FT->getParamType(0) || !isa(FT->getParamType(0)) || - !isa(FT->getParamType(1)) || - !isa(FT->getParamType(2))) + !isa(FT->getParamType(1))) return 0; ConstantInt *SizeCI = dyn_cast(CI->getOperand(3)); From daniel at zuster.org Mon Feb 1 19:12:22 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 02 Feb 2010 01:12:22 -0000 Subject: [llvm-commits] [llvm] r95041 - /llvm/trunk/lib/CodeGen/CMakeLists.txt Message-ID: <201002020112.o121CMr5018474@zion.cs.uiuc.edu> Author: ddunbar Date: Mon Feb 1 19:12:20 2010 New Revision: 95041 URL: http://llvm.org/viewvc/llvm-project?rev=95041&view=rev Log: Update CMake. Modified: llvm/trunk/lib/CodeGen/CMakeLists.txt Modified: llvm/trunk/lib/CodeGen/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CMakeLists.txt?rev=95041&r1=95040&r2=95041&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/CMakeLists.txt (original) +++ llvm/trunk/lib/CodeGen/CMakeLists.txt Mon Feb 1 19:12:20 2010 @@ -21,7 +21,6 @@ LiveStackAnalysis.cpp LiveVariables.cpp LowerSubregs.cpp - MachOWriter.cpp MachineBasicBlock.cpp MachineDominators.cpp MachineFunction.cpp From gohman at apple.com Mon Feb 1 19:38:50 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 02 Feb 2010 01:38:50 -0000 Subject: [llvm-commits] [llvm] r95044 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp Message-ID: <201002020138.o121coc5019465@zion.cs.uiuc.edu> Author: djg Date: Mon Feb 1 19:38:49 2010 New Revision: 95044 URL: http://llvm.org/viewvc/llvm-project?rev=95044&view=rev Log: Various code simplifications. Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=95044&r1=95043&r2=95044&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Feb 1 19:38:49 2010 @@ -351,17 +351,15 @@ if (ConstantExpr *VCE = dyn_cast(V)) if (VCE->getOpcode() == Instruction::PtrToInt) if (ConstantExpr *CE = dyn_cast(VCE->getOperand(0))) - if (CE->getOpcode() == Instruction::GetElementPtr) - if (CE->getOperand(0)->isNullValue()) { - const Type *Ty = - cast(CE->getOperand(0)->getType())->getElementType(); - if (CE->getNumOperands() == 2) - if (ConstantInt *CI = dyn_cast(CE->getOperand(1))) - if (CI->isOne()) { - AllocTy = Ty; - return true; - } - } + if (CE->getOpcode() == Instruction::GetElementPtr && + CE->getOperand(0)->isNullValue() && + CE->getNumOperands() == 2) + if (ConstantInt *CI = dyn_cast(CE->getOperand(1))) + if (CI->isOne()) { + AllocTy = cast(CE->getOperand(0)->getType()) + ->getElementType(); + return true; + } return false; } @@ -370,23 +368,23 @@ if (ConstantExpr *VCE = dyn_cast(V)) if (VCE->getOpcode() == Instruction::PtrToInt) if (ConstantExpr *CE = dyn_cast(VCE->getOperand(0))) - if (CE->getOpcode() == Instruction::GetElementPtr) - if (CE->getOperand(0)->isNullValue()) { - const Type *Ty = - cast(CE->getOperand(0)->getType())->getElementType(); - if (const StructType *STy = dyn_cast(Ty)) - if (!STy->isPacked() && - CE->getNumOperands() == 3 && - CE->getOperand(1)->isNullValue()) { - if (ConstantInt *CI = dyn_cast(CE->getOperand(2))) - if (CI->isOne() && - STy->getNumElements() == 2 && - STy->getElementType(0)->isInteger(1)) { - AllocTy = STy->getElementType(1); - return true; - } - } - } + if (CE->getOpcode() == Instruction::GetElementPtr && + CE->getOperand(0)->isNullValue()) { + const Type *Ty = + cast(CE->getOperand(0)->getType())->getElementType(); + if (const StructType *STy = dyn_cast(Ty)) + if (!STy->isPacked() && + CE->getNumOperands() == 3 && + CE->getOperand(1)->isNullValue()) { + if (ConstantInt *CI = dyn_cast(CE->getOperand(2))) + if (CI->isOne() && + STy->getNumElements() == 2 && + STy->getElementType(0)->isInteger(1)) { + AllocTy = STy->getElementType(1); + return true; + } + } + } return false; } @@ -2720,9 +2718,8 @@ } else { // For an array, add the element offset, explicitly scaled. const SCEV *LocalOffset = getSCEV(Index); - if (!isa(LocalOffset->getType())) - // Getelementptr indicies are signed. - LocalOffset = getTruncateOrSignExtend(LocalOffset, IntPtrTy); + // Getelementptr indicies are signed. + LocalOffset = getTruncateOrSignExtend(LocalOffset, IntPtrTy); // Lower "inbounds" GEPs to NSW arithmetic. LocalOffset = getMulExpr(LocalOffset, getSizeOfExpr(*GTI), /*HasNUW=*/false, /*HasNSW=*/InBounds); From gohman at apple.com Mon Feb 1 19:41:39 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 02 Feb 2010 01:41:39 -0000 Subject: [llvm-commits] [llvm] r95045 - in /llvm/trunk: lib/VMCore/ConstantFold.cpp test/Other/constant-fold-gep.ll Message-ID: <201002020141.o121fdp0019568@zion.cs.uiuc.edu> Author: djg Date: Mon Feb 1 19:41:39 2010 New Revision: 95045 URL: http://llvm.org/viewvc/llvm-project?rev=95045&view=rev Log: Factor out alignof expression folding into a separate function and generalize it to handle more cases. Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp llvm/trunk/test/Other/constant-fold-gep.ll Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=95045&r1=95044&r2=95045&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Mon Feb 1 19:41:39 2010 @@ -345,18 +345,19 @@ // An empty struct has size zero. if (NumElems == 0) return ConstantExpr::getNullValue(DestTy); - // Check for a struct with all members having the same type. - const Type *MemberTy = STy->getElementType(0); + // Check for a struct with all members having the same size. + Constant *MemberSize = + getFoldedSizeOf(STy->getElementType(0), DestTy, true); bool AllSame = true; for (unsigned i = 1; i != NumElems; ++i) - if (MemberTy != STy->getElementType(i)) { + if (MemberSize != + getFoldedSizeOf(STy->getElementType(i), DestTy, true)) { AllSame = false; break; } if (AllSame) { Constant *N = ConstantInt::get(DestTy, NumElems); - Constant *E = getFoldedSizeOf(MemberTy, DestTy, true); - return ConstantExpr::getNUWMul(E, N); + return ConstantExpr::getNUWMul(MemberSize, N); } } @@ -373,6 +374,62 @@ return C; } +/// getFoldedAlignOf - Return a ConstantExpr with type DestTy for alignof +/// on Ty, with any known factors factored out. If Folded is false, +/// return null if no factoring was possible, to avoid endlessly +/// bouncing an unfoldable expression back into the top-level folder. +/// +static Constant *getFoldedAlignOf(const Type *Ty, const Type *DestTy, + bool Folded) { + // The alignment of an array is equal to the alignment of the + // array element. Note that this is not always true for vectors. + if (const ArrayType *ATy = dyn_cast(Ty)) { + Constant *C = ConstantExpr::getAlignOf(ATy->getElementType()); + C = ConstantExpr::getCast(CastInst::getCastOpcode(C, false, + DestTy, + false), + C, DestTy); + return C; + } + + if (const StructType *STy = dyn_cast(Ty)) { + // Packed structs always have an alignment of 1. + if (STy->isPacked()) + return ConstantInt::get(DestTy, 1); + + // Otherwise, struct alignment is the maximum alignment of any member. + // Without target data, we can't compare much, but we can check to see + // if all the members have the same alignment. + unsigned NumElems = STy->getNumElements(); + // An empty struct has minimal alignment. + if (NumElems == 0) + return ConstantInt::get(DestTy, 1); + // Check for a struct with all members having the same alignment. + Constant *MemberAlign = + getFoldedAlignOf(STy->getElementType(0), DestTy, true); + bool AllSame = true; + for (unsigned i = 1; i != NumElems; ++i) + if (MemberAlign != getFoldedAlignOf(STy->getElementType(i), DestTy, true)) { + AllSame = false; + break; + } + if (AllSame) + return MemberAlign; + } + + // If there's no interesting folding happening, bail so that we don't create + // a constant that looks like it needs folding but really doesn't. + if (!Folded) + return 0; + + // Base case: Get a regular alignof expression. + Constant *C = ConstantExpr::getAlignOf(Ty); + C = ConstantExpr::getCast(CastInst::getCastOpcode(C, false, + DestTy, false), + C, DestTy); + return C; +} + /// getFoldedOffsetOf - Return a ConstantExpr with type DestTy for offsetof /// on Ty and FieldNo, with any known factors factored out. If Folded is false, /// return null if no factoring was possible, to avoid endlessly @@ -401,11 +458,13 @@ // An empty struct has no members. if (NumElems == 0) return 0; - // Check for a struct with all members having the same type. - const Type *MemberTy = STy->getElementType(0); + // Check for a struct with all members having the same size. + Constant *MemberSize = + getFoldedSizeOf(STy->getElementType(0), DestTy, true); bool AllSame = true; for (unsigned i = 1; i != NumElems; ++i) - if (MemberTy != STy->getElementType(i)) { + if (MemberSize != + getFoldedSizeOf(STy->getElementType(i), DestTy, true)) { AllSame = false; break; } @@ -415,8 +474,7 @@ DestTy, false), FieldNo, DestTy); - Constant *E = getFoldedSizeOf(MemberTy, DestTy, true); - return ConstantExpr::getNUWMul(E, N); + return ConstantExpr::getNUWMul(MemberSize, N); } } @@ -553,22 +611,7 @@ if (CI->isOne() && STy->getNumElements() == 2 && STy->getElementType(0)->isInteger(1)) { - // The alignment of an array is equal to the alignment of the - // array element. Note that this is not always true for vectors. - if (const ArrayType *ATy = - dyn_cast(STy->getElementType(1))) { - Constant *C = ConstantExpr::getAlignOf(ATy->getElementType()); - C = ConstantExpr::getCast(CastInst::getCastOpcode(C, false, - DestTy, - false), - C, DestTy); - return C; - } - // Packed structs always have an alignment of 1. - if (const StructType *InnerSTy = - dyn_cast(STy->getElementType(1))) - if (InnerSTy->isPacked()) - return ConstantInt::get(DestTy, 1); + return getFoldedAlignOf(STy->getElementType(1), DestTy, false); } } // Handle an offsetof-like expression. Modified: llvm/trunk/test/Other/constant-fold-gep.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/constant-fold-gep.ll?rev=95045&r1=95044&r2=95045&view=diff ============================================================================== --- llvm/trunk/test/Other/constant-fold-gep.ll (original) +++ llvm/trunk/test/Other/constant-fold-gep.ll Mon Feb 1 19:41:39 2010 @@ -64,18 +64,21 @@ ; PLAIN: @d = constant i64 mul nuw (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 11) ; PLAIN: @e = constant i64 ptrtoint (double* getelementptr (%1* null, i64 0, i32 2) to i64) ; PLAIN: @f = constant i64 1 +; PLAIN: @g = constant i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) ; OPT: @a = constant i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2310) ; OPT: @b = constant i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) ; OPT: @c = constant i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2) ; OPT: @d = constant i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 11) ; OPT: @e = constant i64 ptrtoint (double* getelementptr (%1* null, i64 0, i32 2) to i64) ; OPT: @f = constant i64 1 +; OPT: @g = constant i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) ; TO: @a = constant i64 18480 ; TO: @b = constant i64 8 ; TO: @c = constant i64 16 ; TO: @d = constant i64 88 ; TO: @e = constant i64 16 ; TO: @f = constant i64 1 +; TO: @g = constant i64 8 @a = constant i64 mul (i64 3, i64 mul (i64 ptrtoint ({[7 x double], [7 x double]}* getelementptr ({[7 x double], [7 x double]}* null, i64 11) to i64), i64 5)) @b = constant i64 ptrtoint ([13 x double]* getelementptr ({i1, [13 x double]}* null, i64 0, i32 1) to i64) @@ -83,6 +86,7 @@ @d = constant i64 ptrtoint (double* getelementptr ([13 x double]* null, i64 0, i32 11) to i64) @e = constant i64 ptrtoint (double* getelementptr ({double, float, double, double}* null, i64 0, i32 2) to i64) @f = constant i64 ptrtoint (<{ i16, i128 }>* getelementptr ({i1, <{ i16, i128 }>}* null, i64 0, i32 1) to i64) + at g = constant i64 ptrtoint ({double, double}* getelementptr ({i1, {double, double}}* null, i64 0, i32 1) to i64) ; The target-dependent folder should cast GEP indices to integer-sized pointers. @@ -229,6 +233,10 @@ ; PLAIN: %t = bitcast i64 1 to i64 ; PLAIN: ret i64 %t ; PLAIN: } +; PLAIN: define i64 @fg() nounwind { +; PLAIN: %t = bitcast i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) +; PLAIN: ret i64 %t +; PLAIN: } ; OPT: define i64 @fa() nounwind { ; OPT: ret i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2310) ; OPT: } @@ -247,6 +255,9 @@ ; OPT: define i64 @ff() nounwind { ; OPT: ret i64 1 ; OPT: } +; OPT: define i64 @fg() nounwind { +; OPT: ret i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) +; OPT: } ; TO: define i64 @fa() nounwind { ; TO: ret i64 18480 ; TO: } @@ -265,6 +276,9 @@ ; TO: define i64 @ff() nounwind { ; TO: ret i64 1 ; TO: } +; TO: define i64 @fg() nounwind { +; TO: ret i64 8 +; TO: } ; SCEV: Classifying expressions for: @fa ; SCEV: %t = bitcast i64 mul (i64 ptrtoint (double* getelementptr (double* null, i32 1) to i64), i64 2310) to i64 ; SCEV: --> (2310 * sizeof(double)) @@ -283,6 +297,9 @@ ; SCEV: Classifying expressions for: @ff ; SCEV: %t = bitcast i64 1 to i64 ; SCEV: --> 1 +; SCEV: Classifying expressions for: @fg +; SCEV: %t = bitcast i64 ptrtoint (double* getelementptr (%0* null, i64 0, i32 1) to i64) +; SCEV: --> alignof(double) define i64 @fa() nounwind { %t = bitcast i64 mul (i64 3, i64 mul (i64 ptrtoint ({[7 x double], [7 x double]}* getelementptr ({[7 x double], [7 x double]}* null, i64 11) to i64), i64 5)) to i64 @@ -308,6 +325,10 @@ %t = bitcast i64 ptrtoint (<{ i16, i128 }>* getelementptr ({i1, <{ i16, i128 }>}* null, i64 0, i32 1) to i64) to i64 ret i64 %t } +define i64 @fg() nounwind { + %t = bitcast i64 ptrtoint ({double, double}* getelementptr ({i1, {double, double}}* null, i64 0, i32 1) to i64) to i64 + ret i64 %t +} ; PLAIN: define i64* @fM() nounwind { ; PLAIN: %t = bitcast i64* getelementptr (i64* null, i32 1) to i64* From gohman at apple.com Mon Feb 1 19:44:03 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 02 Feb 2010 01:44:03 -0000 Subject: [llvm-commits] [llvm] r95046 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Message-ID: <201002020144.o121i3iH019659@zion.cs.uiuc.edu> Author: djg Date: Mon Feb 1 19:44:02 2010 New Revision: 95046 URL: http://llvm.org/viewvc/llvm-project?rev=95046&view=rev Log: LangRef.html says that inttoptr and ptrtoint always use zero-extension when the cast is extending. Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp?rev=95046&r1=95045&r2=95046&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Mon Feb 1 19:44:02 2010 @@ -1145,16 +1145,22 @@ } Instruction *InstCombiner::visitIntToPtr(IntToPtrInst &CI) { - // If the source integer type is larger than the intptr_t type for - // this target, do a trunc to the intptr_t type, then inttoptr of it. This - // allows the trunc to be exposed to other transforms. Don't do this for - // extending inttoptr's, because we don't know if the target sign or zero - // extends to pointers. - if (TD && CI.getOperand(0)->getType()->getScalarSizeInBits() > - TD->getPointerSizeInBits()) { - Value *P = Builder->CreateTrunc(CI.getOperand(0), - TD->getIntPtrType(CI.getContext()), "tmp"); - return new IntToPtrInst(P, CI.getType()); + // If the source integer type is not the intptr_t type for this target, do a + // trunc or zext to the intptr_t type, then inttoptr of it. This allows the + // cast to be exposed to other transforms. + if (TD) { + if (CI.getOperand(0)->getType()->getScalarSizeInBits() > + TD->getPointerSizeInBits()) { + Value *P = Builder->CreateTrunc(CI.getOperand(0), + TD->getIntPtrType(CI.getContext()), "tmp"); + return new IntToPtrInst(P, CI.getType()); + } + if (CI.getOperand(0)->getType()->getScalarSizeInBits() < + TD->getPointerSizeInBits()) { + Value *P = Builder->CreateZExt(CI.getOperand(0), + TD->getIntPtrType(CI.getContext()), "tmp"); + return new IntToPtrInst(P, CI.getType()); + } } if (Instruction *I = commonCastTransforms(CI)) @@ -1216,17 +1222,22 @@ } Instruction *InstCombiner::visitPtrToInt(PtrToIntInst &CI) { - // If the destination integer type is smaller than the intptr_t type for - // this target, do a ptrtoint to intptr_t then do a trunc. This allows the - // trunc to be exposed to other transforms. Don't do this for extending - // ptrtoint's, because we don't know if the target sign or zero extends its - // pointers. - if (TD && - CI.getType()->getScalarSizeInBits() < TD->getPointerSizeInBits()) { - Value *P = Builder->CreatePtrToInt(CI.getOperand(0), - TD->getIntPtrType(CI.getContext()), - "tmp"); - return new TruncInst(P, CI.getType()); + // If the destination integer type is not the intptr_t type for this target, + // do a ptrtoint to intptr_t then do a trunc or zext. This allows the cast + // to be exposed to other transforms. + if (TD) { + if (CI.getType()->getScalarSizeInBits() < TD->getPointerSizeInBits()) { + Value *P = Builder->CreatePtrToInt(CI.getOperand(0), + TD->getIntPtrType(CI.getContext()), + "tmp"); + return new TruncInst(P, CI.getType()); + } + if (CI.getType()->getScalarSizeInBits() > TD->getPointerSizeInBits()) { + Value *P = Builder->CreatePtrToInt(CI.getOperand(0), + TD->getIntPtrType(CI.getContext()), + "tmp"); + return new ZExtInst(P, CI.getType()); + } } return commonPointerCastTransforms(CI); From xuzhongxing at gmail.com Mon Feb 1 19:57:02 2010 From: xuzhongxing at gmail.com (Zhongxing Xu) Date: Tue, 02 Feb 2010 01:57:02 -0000 Subject: [llvm-commits] [llvm] r95047 - /llvm/trunk/include/llvm/ADT/ImmutableMap.h Message-ID: <201002020157.o121v2ET020082@zion.cs.uiuc.edu> Author: zhongxingxu Date: Mon Feb 1 19:57:01 2010 New Revision: 95047 URL: http://llvm.org/viewvc/llvm-project?rev=95047&view=rev Log: 11.8p1: A nested class is a member and as such has the same access rights as any other member. Modified: llvm/trunk/include/llvm/ADT/ImmutableMap.h Modified: llvm/trunk/include/llvm/ADT/ImmutableMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableMap.h?rev=95047&r1=95046&r2=95047&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/ImmutableMap.h (original) +++ llvm/trunk/include/llvm/ADT/ImmutableMap.h Mon Feb 1 19:57:01 2010 @@ -106,13 +106,10 @@ void operator=(const Factory& RHS); // DO NOT IMPLEMENT }; - friend class Factory; - bool contains(key_type_ref K) const { return Root ? Root->contains(K) : false; } - bool operator==(ImmutableMap RHS) const { return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root; } From clattner at apple.com Mon Feb 1 19:59:43 2010 From: clattner at apple.com (Chris Lattner) Date: Mon, 1 Feb 2010 17:59:43 -0800 Subject: [llvm-commits] [llvm] r95046 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp In-Reply-To: <201002020144.o121i3iH019659@zion.cs.uiuc.edu> References: <201002020144.o121i3iH019659@zion.cs.uiuc.edu> Message-ID: <2029AE14-22F9-4FBF-AC9E-0BE50E2A5DB5@apple.com> On Feb 1, 2010, at 5:44 PM, Dan Gohman wrote: > Author: djg > Date: Mon Feb 1 19:44:02 2010 > New Revision: 95046 > > URL: http://llvm.org/viewvc/llvm-project?rev=95046&view=rev > Log: > LangRef.html says that inttoptr and ptrtoint always use zero-extension > when the cast is extending. Just to verify, does codegen agree? -Chris From gohman at apple.com Mon Feb 1 20:02:21 2010 From: gohman at apple.com (Dan Gohman) Date: Mon, 1 Feb 2010 18:02:21 -0800 Subject: [llvm-commits] [llvm] r95046 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp In-Reply-To: <2029AE14-22F9-4FBF-AC9E-0BE50E2A5DB5@apple.com> References: <201002020144.o121i3iH019659@zion.cs.uiuc.edu> <2029AE14-22F9-4FBF-AC9E-0BE50E2A5DB5@apple.com> Message-ID: On Feb 1, 2010, at 5:59 PM, Chris Lattner wrote: > > On Feb 1, 2010, at 5:44 PM, Dan Gohman wrote: > >> Author: djg >> Date: Mon Feb 1 19:44:02 2010 >> New Revision: 95046 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=95046&view=rev >> Log: >> LangRef.html says that inttoptr and ptrtoint always use zero-extension >> when the cast is extending. > > Just to verify, does codegen agree? Yes. Dan From dalej at apple.com Mon Feb 1 20:08:02 2010 From: dalej at apple.com (Dale Johannesen) Date: Tue, 02 Feb 2010 02:08:02 -0000 Subject: [llvm-commits] [llvm] r95050 - in /llvm/trunk: lib/CodeGen/RegAllocLocal.cpp test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll test/CodeGen/X86/phys-reg-local-regalloc.ll Message-ID: <201002020208.o12282Ct020678@zion.cs.uiuc.edu> Author: johannes Date: Mon Feb 1 20:08:02 2010 New Revision: 95050 URL: http://llvm.org/viewvc/llvm-project?rev=95050&view=rev Log: Make local RA smarter about reusing input register of a copy as output. Needed for (functional) correctness in inline asm, and should be generally beneficial. 7361612. Modified: llvm/trunk/lib/CodeGen/RegAllocLocal.cpp llvm/trunk/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll llvm/trunk/test/CodeGen/X86/phys-reg-local-regalloc.ll Modified: llvm/trunk/lib/CodeGen/RegAllocLocal.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLocal.cpp?rev=95050&r1=95049&r2=95050&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocLocal.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocLocal.cpp Mon Feb 1 20:08:02 2010 @@ -764,8 +764,11 @@ // Determine whether this is a copy instruction. The cases where the // source or destination are phys regs are handled specially. unsigned SrcCopyReg, DstCopyReg, SrcCopySubReg, DstCopySubReg; + unsigned SrcCopyPhysReg = 0U; bool isCopy = TII->isMoveInstr(*MI, SrcCopyReg, DstCopyReg, SrcCopySubReg, DstCopySubReg); + if (isCopy && TargetRegisterInfo::isVirtualRegister(SrcCopyReg)) + SrcCopyPhysReg = getVirt2PhysRegMapSlot(SrcCopyReg); // Loop over the implicit uses, making sure that they are at the head of the // use order list, so they don't get reallocated. @@ -977,13 +980,24 @@ // If DestVirtReg already has a value, use it. if (!(DestPhysReg = getVirt2PhysRegMapSlot(DestVirtReg))) { + // If this is a copy try to reuse the input as the output; + // that will make the copy go away. // If this is a copy, the source reg is a phys reg, and // that reg is available, use that phys reg for DestPhysReg. + // If this is a copy, the source reg is a virtual reg, and + // the phys reg that was assigned to that virtual reg is now + // available, use that phys reg for DestPhysReg. (If it's now + // available that means this was the last use of the source.) if (isCopy && TargetRegisterInfo::isPhysicalRegister(SrcCopyReg) && isPhysRegAvailable(SrcCopyReg)) { DestPhysReg = SrcCopyReg; assignVirtToPhysReg(DestVirtReg, DestPhysReg); + } else if (isCopy && + TargetRegisterInfo::isVirtualRegister(SrcCopyReg) && + SrcCopyPhysReg && isPhysRegAvailable(SrcCopyPhysReg)) { + DestPhysReg = SrcCopyPhysReg; + assignVirtToPhysReg(DestVirtReg, DestPhysReg); } else DestPhysReg = getReg(MBB, MI, DestVirtReg); } Modified: llvm/trunk/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll?rev=95050&r1=95049&r2=95050&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll (original) +++ llvm/trunk/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll Mon Feb 1 20:08:02 2010 @@ -1,7 +1,7 @@ ; RUN: llc < %s | grep {subfc r3,r5,r4} ; RUN: llc < %s | grep {subfze r4,r2} -; RUN: llc < %s -regalloc=local | grep {subfc r5,r4,r3} -; RUN: llc < %s -regalloc=local | grep {subfze r2,r2} +; RUN: llc < %s -regalloc=local | grep {subfc r2,r5,r4} +; RUN: llc < %s -regalloc=local | grep {subfze r3,r3} ; The first argument of subfc must not be the same as any other register. ; PR1357 Modified: llvm/trunk/test/CodeGen/X86/phys-reg-local-regalloc.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/phys-reg-local-regalloc.ll?rev=95050&r1=95049&r2=95050&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/phys-reg-local-regalloc.ll (original) +++ llvm/trunk/test/CodeGen/X86/phys-reg-local-regalloc.ll Mon Feb 1 20:08:02 2010 @@ -1,4 +1,6 @@ ; RUN: llc < %s -march=x86 -mtriple=i386-apple-darwin9 -regalloc=local | FileCheck %s +; RUN: llc -O0 < %s -march=x86 -mtriple=i386-apple-darwin9 -regalloc=local | FileCheck %s +; CHECKed instructions should be the same with or without -O0. @.str = private constant [12 x i8] c"x + y = %i\0A\00", align 1 ; <[12 x i8]*> [#uses=1] From clattner at apple.com Mon Feb 1 20:11:02 2010 From: clattner at apple.com (Chris Lattner) Date: Mon, 1 Feb 2010 18:11:02 -0800 Subject: [llvm-commits] [llvm] r94757 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAG.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h In-Reply-To: <201001282151.o0SLpfCd005603@zion.cs.uiuc.edu> References: <201001282151.o0SLpfCd005603@zion.cs.uiuc.edu> Message-ID: On Jan 28, 2010, at 1:51 PM, Bill Wendling wrote: > Author: void > Date: Thu Jan 28 15:51:40 2010 > New Revision: 94757 > > URL: http://llvm.org/viewvc/llvm-project?rev=94757&view=rev > Log: > Assign the ordering of SDNodes in a much less intrusive fashion. > After the > "visit*" method is called, take the newly created nodes, walk them > in a DFS > fashion, and if they don't have an ordering set, then give it one. Awesome! include/llvm/CodeGen/SelectionDAG.h | 2 lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 855 +++ +------------------- lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | 5 4 files changed, 172 insertions(+), 692 deletions(-) -Chris From scallanan at apple.com Mon Feb 1 20:18:20 2010 From: scallanan at apple.com (Sean Callanan) Date: Tue, 02 Feb 2010 02:18:20 -0000 Subject: [llvm-commits] [llvm] r95051 - /llvm/trunk/tools/ed/EDDisassembler.cpp Message-ID: <201002020218.o122ILOA021084@zion.cs.uiuc.edu> Author: spyffe Date: Mon Feb 1 20:18:20 2010 New Revision: 95051 URL: http://llvm.org/viewvc/llvm-project?rev=95051&view=rev Log: Removed an unnecessary class from the EDDisassembler implementation. Also made sure that the register maps were created during disassembler initialization. Modified: llvm/trunk/tools/ed/EDDisassembler.cpp Modified: llvm/trunk/tools/ed/EDDisassembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/ed/EDDisassembler.cpp?rev=95051&r1=95050&r2=95051&view=diff ============================================================================== --- llvm/trunk/tools/ed/EDDisassembler.cpp (original) +++ llvm/trunk/tools/ed/EDDisassembler.cpp Mon Feb 1 20:18:20 2010 @@ -149,59 +149,6 @@ return getDisassembler(triple.getArch(), syntax); } -namespace { - class EDAsmParser : public MCAsmParser { - AsmLexer Lexer; - MCContext Context; - OwningPtr Streamer; - public: - // Mandatory functions - EDAsmParser(const MCAsmInfo &MAI) : Lexer(MAI) { - Streamer.reset(createNullStreamer(Context)); - } - virtual ~EDAsmParser() { } - MCAsmLexer &getLexer() { return Lexer; } - MCContext &getContext() { return Context; } - MCStreamer &getStreamer() { return *Streamer; } - void Warning(SMLoc L, const Twine &Msg) { } - bool Error(SMLoc L, const Twine &Msg) { return true; } - const AsmToken &Lex() { return Lexer.Lex(); } - bool ParseExpression(const MCExpr *&Res, SMLoc &EndLoc) { - AsmToken token = Lex(); - if(token.isNot(AsmToken::Integer)) - return true; - Res = MCConstantExpr::Create(token.getIntVal(), Context); - return false; - } - bool ParseParenExpression(const MCExpr *&Res, SMLoc &EndLoc) { - assert(0 && "I can't ParseParenExpression()s!"); - } - bool ParseAbsoluteExpression(int64_t &Res) { - assert(0 && "I can't ParseAbsoluteExpression()s!"); - } - - /// setBuffer - loads a buffer into the parser - /// @arg buf - The buffer to read tokens from - void setBuffer(const MemoryBuffer &buf) { Lexer.setBuffer(&buf); } - /// parseInstName - When the lexer is positioned befor an instruction - /// name (with possible intervening whitespace), reads past the name, - /// returning 0 on success and -1 on failure - /// @arg name - A reference to a string that is filled in with the - /// instruction name - /// @arg loc - A reference to a location that is filled in with the - /// position of the instruction name - int parseInstName(StringRef &name, SMLoc &loc) { - AsmToken tok = Lexer.Lex(); - if(tok.isNot(AsmToken::Identifier)) { - return -1; - } - name = tok.getString(); - loc = tok.getLoc(); - return 0; - } - }; -} - EDDisassembler::EDDisassembler(CPUKey &key) : Valid(false), ErrorString(), ErrorStream(ErrorString), Key(key) { const InfoMap *infoMap = infoFromArch(key.Arch); @@ -261,6 +208,8 @@ SpecificAsmLexer->InstallLexer(*GenericAsmLexer); InstInfos = infoMap->Info; + + initMaps(*targetMachine->getRegisterInfo()); Valid = true; } From evan.cheng at apple.com Mon Feb 1 20:22:50 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 02 Feb 2010 02:22:50 -0000 Subject: [llvm-commits] [llvm] r95053 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/tailcall2.ll Message-ID: <201002020222.o122MpXh021250@zion.cs.uiuc.edu> Author: evancheng Date: Mon Feb 1 20:22:50 2010 New Revision: 95053 URL: http://llvm.org/viewvc/llvm-project?rev=95053&view=rev Log: Perform sibcall in some cases when arguments are passes memory. Look for cases where callee's arguments are already in the caller's own caller's stack and they line up perfectly. e.g. extern int foo(int a, int b, int c); int bar(int a, int b, int c) { return foo(a, b, c); } Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/test/CodeGen/X86/tailcall2.ll Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=95053&r1=95052&r2=95053&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Feb 1 20:22:50 2010 @@ -1807,6 +1807,10 @@ unsigned NumBytes = CCInfo.getNextStackOffset(); if (FuncIsMadeTailCallSafe(CallConv)) NumBytes = GetAlignedArgumentStackSize(NumBytes, DAG); + else if (isTailCall && !PerformTailCallOpt) + // This is a sibcall. The memory operands are available in caller's + // own caller's stack. + NumBytes = 0; int FPDiff = 0; if (isTailCall) { @@ -1976,9 +1980,11 @@ int FI = 0; // Do not flag preceeding copytoreg stuff together with the following stuff. InFlag = SDValue(); - for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { - CCValAssign &VA = ArgLocs[i]; - if (!VA.isRegLoc()) { + if (PerformTailCallOpt) { + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + CCValAssign &VA = ArgLocs[i]; + if (VA.isRegLoc()) + continue; assert(VA.isMemLoc()); SDValue Arg = Outs[i].Val; ISD::ArgFlagsTy Flags = Outs[i].Flags; @@ -2259,11 +2265,14 @@ return false; } + + // Look for obvious safe cases to perform tail call optimization that does not + // requite ABI changes. This is what gcc calls sibcall. + // Do not tail call optimize vararg calls for now. if (isVarArg) return false; - // Look for obvious safe cases to perform tail call optimization. // If the callee takes no arguments then go on to check the results of the // call. if (!Outs.empty()) { @@ -2273,8 +2282,42 @@ CCState CCInfo(CalleeCC, isVarArg, getTargetMachine(), ArgLocs, *DAG.getContext()); CCInfo.AnalyzeCallOperands(Outs, CCAssignFnForNode(CalleeCC)); - if (CCInfo.getNextStackOffset()) - return false; + if (CCInfo.getNextStackOffset()) { + MachineFunction &MF = DAG.getMachineFunction(); + if (MF.getInfo()->getBytesToPopOnReturn()) + return false; + if (Subtarget->isTargetWin64()) + // Win64 ABI has additional complications. + return false; + + // Check if the arguments are already laid out in the right way as + // the caller's fixed stack objects. + MachineFrameInfo *MFI = MF.getFrameInfo(); + for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { + CCValAssign &VA = ArgLocs[i]; + EVT RegVT = VA.getLocVT(); + SDValue Arg = Outs[i].Val; + ISD::ArgFlagsTy Flags = Outs[i].Flags; + if (Flags.isByVal()) + return false; // TODO + if (VA.getLocInfo() == CCValAssign::Indirect) + return false; + if (!VA.isRegLoc()) { + LoadSDNode *Ld = dyn_cast(Arg); + if (!Ld) + return false; + SDValue Ptr = Ld->getBasePtr(); + FrameIndexSDNode *FINode = dyn_cast(Ptr); + if (!FINode) + return false; + int FI = FINode->getIndex(); + if (!MFI->isFixedObjectIndex(FI)) + return false; + if (VA.getLocMemOffset() != MFI->getObjectOffset(FI)) + return false; + } + } + } } // If the caller does not return a value, then this is obviously safe. Modified: llvm/trunk/test/CodeGen/X86/tailcall2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/tailcall2.ll?rev=95053&r1=95052&r2=95053&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/tailcall2.ll (original) +++ llvm/trunk/test/CodeGen/X86/tailcall2.ll Mon Feb 1 20:22:50 2010 @@ -89,3 +89,16 @@ } declare i32 @bar(i32) + +define i32 @t7(i32 %a, i32 %b, i32 %c) nounwind ssp { +entry: +; 32: t7: +; 32: jmp {{_?}}bar2 + +; 64: t7: +; 64: jmp {{_?}}bar2 + %0 = tail call i32 @bar2(i32 %a, i32 %b, i32 %c) nounwind + ret i32 %0 +} + +declare i32 @bar2(i32, i32, i32) From sabre at nondot.org Mon Feb 1 20:23:38 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 02:23:38 -0000 Subject: [llvm-commits] [llvm] r95054 - in /llvm/trunk/test/Transforms/LoopUnswitch: 2006-02-14-LoopSimplifyCrash.ll 2006-02-22-UnswitchCrash.ll crash.ll Message-ID: <201002020223.o122NcDj021301@zion.cs.uiuc.edu> Author: lattner Date: Mon Feb 1 20:23:37 2010 New Revision: 95054 URL: http://llvm.org/viewvc/llvm-project?rev=95054&view=rev Log: remove an unreduced testcase, rename another. Added: llvm/trunk/test/Transforms/LoopUnswitch/crash.ll - copied unchanged from r95032, llvm/trunk/test/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll Removed: llvm/trunk/test/Transforms/LoopUnswitch/2006-02-14-LoopSimplifyCrash.ll llvm/trunk/test/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll Removed: llvm/trunk/test/Transforms/LoopUnswitch/2006-02-14-LoopSimplifyCrash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopUnswitch/2006-02-14-LoopSimplifyCrash.ll?rev=95053&view=auto ============================================================================== --- llvm/trunk/test/Transforms/LoopUnswitch/2006-02-14-LoopSimplifyCrash.ll (original) +++ llvm/trunk/test/Transforms/LoopUnswitch/2006-02-14-LoopSimplifyCrash.ll (removed) @@ -1,1697 +0,0 @@ -; RUN: opt < %s -loop-unswitch -disable-output -; END. - -target datalayout = "E-p:32:32" -target triple = "powerpc-apple-darwin8.2.0" -deplibs = [ "c", "crtend" ] - %struct.__sFILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } - %struct.__sFILEX = type opaque - %struct.__sbuf = type { i8*, i32 } - %struct.fd_set = type { [32 x i32] } - %struct.timeval = type { i32, i32 } - %struct.tm = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8* } - %typedef.CHESS_PATH = type { [65 x i32], i8, i8, i8 } - %typedef.CHESS_POSITION = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i32, i32, i8, i8, [64 x i8], i8, i8, i8, i8, i8 } - %typedef.HASH_ENTRY = type { i64, i64 } - %typedef.NEXT_MOVE = type { i32, i32, i32* } - %typedef.PAWN_HASH_ENTRY = type { i32, i16, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 } - %typedef.SEARCH_POSITION = type { i8, i8, i8, i8 } - %union.doub0. = type { i64 } - at search = external global %typedef.CHESS_POSITION ; <%typedef.CHESS_POSITION*> [#uses=1] - at w_pawn_attacks = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at b_pawn_attacks = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at knight_attacks = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at bishop_attacks_rl45 = external global [64 x [256 x i64]] ; <[64 x [256 x i64]]*> [#uses=0] - at bishop_shift_rl45 = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at bishop_attacks_rr45 = external global [64 x [256 x i64]] ; <[64 x [256 x i64]]*> [#uses=0] - at bishop_shift_rr45 = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at rook_attacks_r0 = external global [64 x [256 x i64]] ; <[64 x [256 x i64]]*> [#uses=0] - at rook_attacks_rl90 = external global [64 x [256 x i64]] ; <[64 x [256 x i64]]*> [#uses=0] - at king_attacks = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at set_mask = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at first_ones = external global [65536 x i8] ; <[65536 x i8]*> [#uses=0] - at last_ones = external global [65536 x i8] ; <[65536 x i8]*> [#uses=0] - at draw_score_is_zero = external global i32 ; [#uses=0] - at default_draw_score = external global i32 ; [#uses=0] - at opening = external global i32 ; [#uses=0] - at middle_game = external global i32 ; [#uses=0] - at tc_increment = external global i32 ; [#uses=0] - at tc_time_remaining_opponent = external global i32 ; [#uses=0] - at .ctor_1 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] - at input_stream = external global %struct.__sFILE* ; <%struct.__sFILE**> [#uses=0] - at __sF = external global [0 x %struct.__sFILE] ; <[0 x %struct.__sFILE]*> [#uses=1] - at xboard = external global i32 ; [#uses=0] - at .str_1 = external global [14 x i8] ; <[14 x i8]*> [#uses=0] - at .str_2 = external global [14 x i8] ; <[14 x i8]*> [#uses=0] - at buffer = external global [512 x i8] ; <[512 x i8]*> [#uses=0] - at nargs = external global i32 ; [#uses=0] - at args = external global [32 x i8*] ; <[32 x i8*]*> [#uses=0] - at .str_3 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_4 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] - at .str_5 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_6 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_7 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at .str_8 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at .str_9 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_10 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at .str_11 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at .str_12 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] - at .str_14 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] - at position = external global [67 x %typedef.SEARCH_POSITION] ; <[67 x %typedef.SEARCH_POSITION]*> [#uses=0] - at log_file = external global %struct.__sFILE* ; <%struct.__sFILE**> [#uses=0] - at move_number = external global i32 ; [#uses=0] - at rephead_b = external global i64* ; [#uses=0] - at replist_b = external global [82 x i64] ; <[82 x i64]*> [#uses=0] - at rephead_w = external global i64* ; [#uses=0] - at replist_w = external global [82 x i64] ; <[82 x i64]*> [#uses=0] - at moves_out_of_book = external global i32 ; [#uses=0] - at largest_positional_score = external global i32 ; [#uses=0] - at end_game = external global i32 ; [#uses=0] - at p_values = external global [15 x i32] ; <[15 x i32]*> [#uses=0] - at clear_mask = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at directions = external global [64 x [64 x i8]] ; <[64 x [64 x i8]]*> [#uses=0] - at root_wtm = external global i32 ; [#uses=0] - at all_pawns = external global i64 ; [#uses=0] - at pawn_score = external global %typedef.PAWN_HASH_ENTRY ; <%typedef.PAWN_HASH_ENTRY*> [#uses=0] - at pawn_probes = external global i32 ; [#uses=0] - at pawn_hits = external global i32 ; [#uses=0] - at outside_passed = external global [128 x i32] ; <[128 x i32]*> [#uses=0] - at root_total_black_pieces = external global i32 ; [#uses=0] - at root_total_white_pawns = external global i32 ; [#uses=0] - at root_total_white_pieces = external global i32 ; [#uses=0] - at root_total_black_pawns = external global i32 ; [#uses=0] - at mask_A7H7 = external global i64 ; [#uses=0] - at mask_B6B7 = external global i64 ; [#uses=0] - at mask_G6G7 = external global i64 ; [#uses=0] - at mask_A2H2 = external global i64 ; [#uses=0] - at mask_B2B3 = external global i64 ; [#uses=0] - at mask_G2G3 = external global i64 ; [#uses=0] - at king_defects_w = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at good_bishop_kw = external global i64 ; [#uses=0] - at mask_F3H3 = external global i64 ; [#uses=0] - at file_mask = external global [8 x i64] ; <[8 x i64]*> [#uses=0] - at good_bishop_qw = external global i64 ; [#uses=0] - at mask_A3C3 = external global i64 ; [#uses=0] - at king_defects_b = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at good_bishop_kb = external global i64 ; [#uses=0] - at mask_F6H6 = external global i64 ; [#uses=0] - at good_bishop_qb = external global i64 ; [#uses=0] - at mask_A6C6 = external global i64 ; [#uses=0] - at square_color = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at evaluations = external global i32 ; [#uses=0] - at king_value_w = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at rank_mask = external global [8 x i64] ; <[8 x i64]*> [#uses=0] - at mask_kr_trapped_w = external global [3 x i64] ; <[3 x i64]*> [#uses=0] - at mask_qr_trapped_w = external global [3 x i64] ; <[3 x i64]*> [#uses=0] - at king_value_b = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at mask_kr_trapped_b = external global [3 x i64] ; <[3 x i64]*> [#uses=0] - at mask_qr_trapped_b = external global [3 x i64] ; <[3 x i64]*> [#uses=0] - at white_outpost = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at mask_no_pawn_attacks_b = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at knight_value_w = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at black_outpost = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at mask_no_pawn_attacks_w = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at knight_value_b = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at bishop_value_w = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at bishop_mobility_rl45 = external global [64 x [256 x i32]] ; <[64 x [256 x i32]]*> [#uses=0] - at bishop_mobility_rr45 = external global [64 x [256 x i32]] ; <[64 x [256 x i32]]*> [#uses=0] - at bishop_value_b = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at rook_value_w = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at plus8dir = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at mask_abs7_w = external global i64 ; [#uses=0] - at rook_value_b = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at minus8dir = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at mask_abs7_b = external global i64 ; [#uses=0] - at queen_value_w = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at queen_value_b = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at white_minor_pieces = external global i64 ; [#uses=0] - at black_minor_pieces = external global i64 ; [#uses=0] - at not_rook_pawns = external global i64 ; [#uses=0] - at dark_squares = external global i64 ; [#uses=0] - at b_n_mate_dark_squares = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at b_n_mate_light_squares = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at mate = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at first_ones_8bit = external global [256 x i8] ; <[256 x i8]*> [#uses=0] - at reduced_material_passer = external global [20 x i32] ; <[20 x i32]*> [#uses=0] - at supported_passer = external global [8 x i32] ; <[8 x i32]*> [#uses=0] - at passed_pawn_value = external global [8 x i32] ; <[8 x i32]*> [#uses=0] - at connected_passed = external global [256 x i8] ; <[256 x i8]*> [#uses=0] - at black_pawn_race_btm = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at white_pawn_race_wtm = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at black_pawn_race_wtm = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at white_pawn_race_btm = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at obstructed = external global [64 x [64 x i64]] ; <[64 x [64 x i64]]*> [#uses=0] - at pawn_hash_table = external global %typedef.PAWN_HASH_ENTRY* ; <%typedef.PAWN_HASH_ENTRY**> [#uses=0] - at pawn_hash_mask = external global i32 ; [#uses=0] - at pawn_value_w = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at mask_pawn_isolated = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at mask_pawn_passed_w = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at mask_pawn_protected_w = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at pawn_value_b = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at mask_pawn_passed_b = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at mask_pawn_protected_b = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at unblocked_pawns = external global [9 x i32] ; <[9 x i32]*> [#uses=0] - at mask_wk_4th = external global i64 ; [#uses=0] - at mask_wk_5th = external global i64 ; [#uses=0] - at mask_wq_4th = external global i64 ; [#uses=0] - at mask_wq_5th = external global i64 ; [#uses=0] - at stonewall_white = external global i64 ; [#uses=0] - at mask_bk_4th = external global i64 ; [#uses=0] - at mask_bk_5th = external global i64 ; [#uses=0] - at mask_bq_5th = external global i64 ; [#uses=0] - at mask_bq_4th = external global i64 ; [#uses=0] - at stonewall_black = external global i64 ; [#uses=0] - at last_ones_8bit = external global [256 x i8] ; <[256 x i8]*> [#uses=0] - at right_side_mask = external global [8 x i64] ; <[8 x i64]*> [#uses=0] - at left_side_empty_mask = external global [8 x i64] ; <[8 x i64]*> [#uses=0] - at left_side_mask = external global [8 x i64] ; <[8 x i64]*> [#uses=0] - at right_side_empty_mask = external global [8 x i64] ; <[8 x i64]*> [#uses=0] - at pv = external global [65 x %typedef.CHESS_PATH] ; <[65 x %typedef.CHESS_PATH]*> [#uses=0] - at history_w = external global [4096 x i32] ; <[4096 x i32]*> [#uses=0] - at history_b = external global [4096 x i32] ; <[4096 x i32]*> [#uses=0] - at killer_move1 = external global [65 x i32] ; <[65 x i32]*> [#uses=0] - at killer_count1 = external global [65 x i32] ; <[65 x i32]*> [#uses=0] - at killer_move2 = external global [65 x i32] ; <[65 x i32]*> [#uses=0] - at killer_count2 = external global [65 x i32] ; <[65 x i32]*> [#uses=0] - at current_move = external global [65 x i32] ; <[65 x i32]*> [#uses=0] - at init_r90 = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at init_l90 = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at init_l45 = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at init_ul45 = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at init_r45 = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at init_ur45 = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at diagonal_length = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at last = external global [65 x i32*] ; <[65 x i32*]*> [#uses=0] - at move_list = external global [5120 x i32] ; <[5120 x i32]*> [#uses=0] - at history_file = external global %struct.__sFILE* ; <%struct.__sFILE**> [#uses=0] - at .str_1.upgrd.1 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_2.upgrd.2 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_3.upgrd.3 = external global [32 x i8] ; <[32 x i8]*> [#uses=0] - at .str_5.upgrd.4 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_6.upgrd.5 = external global [14 x i8] ; <[14 x i8]*> [#uses=0] - at trans_ref_wa = external global %typedef.HASH_ENTRY* ; <%typedef.HASH_ENTRY**> [#uses=0] - at hash_table_size = external global i32 ; [#uses=0] - at trans_ref_wb = external global %typedef.HASH_ENTRY* ; <%typedef.HASH_ENTRY**> [#uses=0] - at trans_ref_ba = external global %typedef.HASH_ENTRY* ; <%typedef.HASH_ENTRY**> [#uses=0] - at trans_ref_bb = external global %typedef.HASH_ENTRY* ; <%typedef.HASH_ENTRY**> [#uses=0] - at pawn_hash_table_size = external global i32 ; [#uses=0] - at .str_9.upgrd.6 = external global [37 x i8] ; <[37 x i8]*> [#uses=0] - at log_hash = external global i32 ; [#uses=0] - at log_pawn_hash = external global i32 ; [#uses=0] - at hash_maska = external global i32 ; [#uses=0] - at hash_maskb = external global i32 ; [#uses=0] - at mask_1 = external global i64 ; [#uses=0] - at bishop_attacks = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at queen_attacks = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at plus7dir = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at plus9dir = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at minus7dir = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at minus9dir = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at plus1dir = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at minus1dir = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at rook_attacks = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at king_attacks_1 = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at king_attacks_2 = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at .ctor_1.upgrd.7 = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at .ctor_2 = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at rook_mobility_r0 = external global [64 x [256 x i32]] ; <[64 x [256 x i32]]*> [#uses=0] - at rook_mobility_rl90 = external global [64 x [256 x i32]] ; <[64 x [256 x i32]]*> [#uses=0] - at initial_position = external global [80 x i8] ; <[80 x i8]*> [#uses=5] -@"\01a1.0__" = external global [80 x i8] ; <[80 x i8]*> [#uses=0] -@"\01a2.1__" = external global [16 x i8] ; <[16 x i8]*> [#uses=0] -@"\01a3.2__" = external global [16 x i8] ; <[16 x i8]*> [#uses=0] -@"\01a4.3__" = external global [16 x i8] ; <[16 x i8]*> [#uses=0] -@"\01a5.4__" = external global [16 x i8] ; <[16 x i8]*> [#uses=0] -@"\01args.5__" = external global [16 x i8*] ; <[16 x i8*]*> [#uses=0] - at .str_10.upgrd.8 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at w_pawn_random = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at w_pawn_random32 = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at b_pawn_random = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at b_pawn_random32 = external global [64 x i32] ; <[64 x i32]*> [#uses=0] - at w_knight_random = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at b_knight_random = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at w_bishop_random = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at b_bishop_random = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at w_rook_random = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at b_rook_random = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at w_queen_random = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at b_queen_random = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at w_king_random = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at b_king_random = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at enpassant_random = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at castle_random_w = external global [2 x i64] ; <[2 x i64]*> [#uses=0] - at castle_random_b = external global [2 x i64] ; <[2 x i64]*> [#uses=0] - at set_mask_rl90 = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at set_mask_rl45 = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at set_mask_rr45 = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at transposition_id = external global i8 ; [#uses=0] - at mask_2 = external global i64 ; [#uses=0] - at mask_3 = external global i64 ; [#uses=0] - at mask_4 = external global i64 ; [#uses=0] - at mask_8 = external global i64 ; [#uses=0] - at mask_16 = external global i64 ; [#uses=0] - at mask_32 = external global i64 ; [#uses=0] - at mask_72 = external global i64 ; [#uses=0] - at mask_80 = external global i64 ; [#uses=0] - at mask_85 = external global i64 ; [#uses=0] - at mask_96 = external global i64 ; [#uses=0] - at mask_107 = external global i64 ; [#uses=0] - at mask_108 = external global i64 ; [#uses=0] - at mask_112 = external global i64 ; [#uses=0] - at mask_118 = external global i64 ; [#uses=0] - at mask_120 = external global i64 ; [#uses=0] - at mask_121 = external global i64 ; [#uses=0] - at mask_127 = external global i64 ; [#uses=0] - at mask_clear_entry = external global i64 ; [#uses=0] - at clear_mask_rl45 = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at clear_mask_rr45 = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at clear_mask_rl90 = external global [65 x i64] ; <[65 x i64]*> [#uses=0] - at right_half_mask = external global i64 ; [#uses=0] - at left_half_mask = external global i64 ; [#uses=0] - at mask_not_rank8 = external global i64 ; [#uses=0] - at mask_not_rank1 = external global i64 ; [#uses=0] - at center = external global i64 ; [#uses=0] - at mask_pawn_connected = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at mask_eptest = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at mask_kingside_attack_w1 = external global i64 ; [#uses=0] - at mask_kingside_attack_w2 = external global i64 ; [#uses=0] - at mask_queenside_attack_w1 = external global i64 ; [#uses=0] - at mask_queenside_attack_w2 = external global i64 ; [#uses=0] - at mask_kingside_attack_b1 = external global i64 ; [#uses=0] - at mask_kingside_attack_b2 = external global i64 ; [#uses=0] - at mask_queenside_attack_b1 = external global i64 ; [#uses=0] - at mask_queenside_attack_b2 = external global i64 ; [#uses=0] - at pawns_cramp_black = external global i64 ; [#uses=0] - at pawns_cramp_white = external global i64 ; [#uses=0] - at light_squares = external global i64 ; [#uses=0] - at mask_left_edge = external global i64 ; [#uses=0] - at mask_right_edge = external global i64 ; [#uses=0] - at mask_advance_2_w = external global i64 ; [#uses=0] - at mask_advance_2_b = external global i64 ; [#uses=0] - at mask_corner_squares = external global i64 ; [#uses=0] - at mask_promotion_threat_w = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at mask_promotion_threat_b = external global [64 x i64] ; <[64 x i64]*> [#uses=0] - at promote_mask_w = external global i64 ; [#uses=0] - at promote_mask_b = external global i64 ; [#uses=0] - at mask_a1_corner = external global i64 ; [#uses=0] - at mask_h1_corner = external global i64 ; [#uses=0] - at mask_a8_corner = external global i64 ; [#uses=0] - at mask_h8_corner = external global i64 ; [#uses=0] - at white_center_pawns = external global i64 ; [#uses=0] - at black_center_pawns = external global i64 ; [#uses=0] - at wtm_random = external global [2 x i64] ; <[2 x i64]*> [#uses=0] - at endgame_random_w = external global i64 ; [#uses=0] - at endgame_random_b = external global i64 ; [#uses=0] - at w_rooks_random = external global i64 ; [#uses=0] - at b_rooks_random = external global i64 ; [#uses=0] - at .ctor_11 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] - at .ctor_2.upgrd.9 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] - at .str_1.upgrd.10 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_2.upgrd.11 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_32 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_4.upgrd.12 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_5.upgrd.13 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_6.upgrd.14 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_7.upgrd.15 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_8.upgrd.16 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_9.upgrd.17 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_10.upgrd.18 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_11.upgrd.19 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_12.upgrd.20 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_13 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] - at num_ponder_moves = external global i32 ; [#uses=0] - at ponder_moves = external global [220 x i32] ; <[220 x i32]*> [#uses=0] - at .str_14.upgrd.21 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] - at .str_15 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_16 = external global [20 x i8] ; <[20 x i8]*> [#uses=0] - at auto232 = external global i32 ; [#uses=0] - at puzzling = external global i8 ; [#uses=0] - at abort_search = external global i8 ; [#uses=0] - at .str_24 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at wtm = external global i32 ; [#uses=0] - at .str_3.upgrd.22 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] - at .str_4.upgrd.23 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] - at end_time = external global i32 ; [#uses=0] - at time_type = external global i32 ; [#uses=0] - at start_time = external global i32 ; [#uses=0] - at .str_6.upgrd.24 = external global [12 x i8] ; <[12 x i8]*> [#uses=0] - at .str_7.upgrd.25 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at nodes_searched = external global i32 ; [#uses=0] - at iteration_depth = external global i32 ; [#uses=0] - at searched_this_root_move = external global [256 x i8] ; <[256 x i8]*> [#uses=0] - at .str_9.upgrd.26 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_10.upgrd.27 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_11.upgrd.28 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_12.upgrd.29 = external global [12 x i8] ; <[12 x i8]*> [#uses=0] - at .str_14.upgrd.30 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at .str_16.upgrd.31 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at thinking = external global i8 ; [#uses=0] - at time_abort = external global i32 ; [#uses=0] - at .str_17 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] - at analyze_move_read = external global i32 ; [#uses=0] - at analyze_mode = external global i32 ; [#uses=0] - at pondering = external global i8 ; [#uses=0] - at auto232_delay = external global i32 ; [#uses=0] - at auto_file = external global %struct.__sFILE* ; <%struct.__sFILE**> [#uses=0] - at .str_19 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at .str_20 = external global [11 x i8] ; <[11 x i8]*> [#uses=0] - at .str_21 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at ponder_move = external global i32 ; [#uses=0] - at predicted = external global i32 ; [#uses=0] - at made_predicted_move = external global i32 ; [#uses=0] - at opponent_end_time = external global i32 ; [#uses=0] - at program_start_time = external global i32 ; [#uses=0] - at .str_23 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_24.upgrd.32 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_25 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_26 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_28 = external global [31 x i8] ; <[31 x i8]*> [#uses=0] - at book_move = external global i32 ; [#uses=0] - at elapsed_start = external global i32 ; [#uses=0] - at burp = external global i32 ; [#uses=0] - at cpu_percent = external global i32 ; [#uses=0] - at next_time_check = external global i32 ; [#uses=0] - at nodes_between_time_checks = external global i32 ; [#uses=0] - at transposition_hits = external global i32 ; [#uses=0] - at transposition_probes = external global i32 ; [#uses=0] - at tb_probes = external global i32 ; [#uses=0] - at tb_probes_successful = external global i32 ; [#uses=0] - at check_extensions_done = external global i32 ; [#uses=0] - at recapture_extensions_done = external global i32 ; [#uses=0] - at passed_pawn_extensions_done = external global i32 ; [#uses=0] - at one_reply_extensions_done = external global i32 ; [#uses=0] - at program_end_time = external global i32 ; [#uses=0] - at root_value = external global i32 ; [#uses=0] - at last_search_value = external global i32 ; [#uses=0] - at .str_1.upgrd.33 = external global [48 x i8] ; <[48 x i8]*> [#uses=0] - at .str_2.upgrd.34 = external global [48 x i8] ; <[48 x i8]*> [#uses=0] - at booking = external global i8 ; [#uses=0] - at annotate_mode = external global i32 ; [#uses=0] - at .str_4.upgrd.35 = external global [38 x i8] ; <[38 x i8]*> [#uses=0] - at .str_5.upgrd.36 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at last_pv = external global %typedef.CHESS_PATH ; <%typedef.CHESS_PATH*> [#uses=0] - at .str_8.upgrd.37 = external global [53 x i8] ; <[53 x i8]*> [#uses=0] - at root_alpha = external global i32 ; [#uses=0] - at last_value = external global i32 ; [#uses=0] - at root_beta = external global i32 ; [#uses=0] - at root_nodes = external global [256 x i32] ; <[256 x i32]*> [#uses=0] - at trace_level = external global i32 ; [#uses=0] - at .str_9.upgrd.38 = external global [36 x i8] ; <[36 x i8]*> [#uses=0] - at .str_10.upgrd.39 = external global [37 x i8] ; <[37 x i8]*> [#uses=0] - at search_failed_high = external global i32 ; [#uses=0] - at search_failed_low = external global i32 ; [#uses=0] - at nodes_per_second = external global i32 ; [#uses=0] - at time_limit = external global i32 ; [#uses=0] - at easy_move = external global i32 ; [#uses=0] - at noise_level = external global i32 ; [#uses=0] - at .str_12.upgrd.40 = external global [34 x i8] ; <[34 x i8]*> [#uses=0] - at .str_136 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at solution_type = external global i32 ; [#uses=0] - at number_of_solutions = external global i32 ; [#uses=0] - at solutions = external global [10 x i32] ; <[10 x i32]*> [#uses=0] - at early_exit = external global i32 ; [#uses=0] - at .str_14.upgrd.41 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_15.upgrd.42 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_16.upgrd.43 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at whisper_value = external global i32 ; [#uses=0] - at .str_17.upgrd.44 = external global [29 x i8] ; <[29 x i8]*> [#uses=0] - at .str_19.upgrd.45 = external global [37 x i8] ; <[37 x i8]*> [#uses=0] - at last_mate_score = external global i32 ; [#uses=0] - at search_depth = external global i32 ; [#uses=0] - at elapsed_end = external global i32 ; [#uses=0] - at .str_20.upgrd.46 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_21.upgrd.47 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_22 = external global [13 x i8] ; <[13 x i8]*> [#uses=0] - at .str_23.upgrd.48 = external global [58 x i8] ; <[58 x i8]*> [#uses=0] - at .str_24.upgrd.49 = external global [48 x i8] ; <[48 x i8]*> [#uses=0] - at .str_25.upgrd.50 = external global [67 x i8] ; <[67 x i8]*> [#uses=0] - at .str_26.upgrd.51 = external global [69 x i8] ; <[69 x i8]*> [#uses=0] - at hash_move = external global [65 x i32] ; <[65 x i32]*> [#uses=0] - at version = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at mode = external global i32 ; [#uses=0] - at batch_mode = external global i32 ; [#uses=0] - at crafty_rating = external global i32 ; [#uses=0] - at opponent_rating = external global i32 ; [#uses=0] - at pgn_event = external global [32 x i8] ; <[32 x i8]*> [#uses=0] - at pgn_site = external global [32 x i8] ; <[32 x i8]*> [#uses=0] - at pgn_date = external global [32 x i8] ; <[32 x i8]*> [#uses=0] - at pgn_round = external global [32 x i8] ; <[32 x i8]*> [#uses=0] - at pgn_white = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at pgn_white_elo = external global [32 x i8] ; <[32 x i8]*> [#uses=0] - at pgn_black = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at pgn_black_elo = external global [32 x i8] ; <[32 x i8]*> [#uses=0] - at pgn_result = external global [32 x i8] ; <[32 x i8]*> [#uses=0] - at number_auto_kibitzers = external global i32 ; [#uses=0] - at auto_kibitz_list = external global [100 x [20 x i8]] ; <[100 x [20 x i8]]*> [#uses=0] - at number_of_computers = external global i32 ; [#uses=0] - at computer_list = external global [100 x [20 x i8]] ; <[100 x [20 x i8]]*> [#uses=0] - at number_of_GMs = external global i32 ; [#uses=0] - at GM_list = external global [100 x [20 x i8]] ; <[100 x [20 x i8]]*> [#uses=0] - at number_of_IMs = external global i32 ; [#uses=0] - at IM_list = external global [100 x [20 x i8]] ; <[100 x [20 x i8]]*> [#uses=0] - at ics = external global i32 ; [#uses=0] - at output_format = external global i32 ; [#uses=0] - at EGTBlimit = external global i32 ; [#uses=0] - at whisper = external global i32 ; [#uses=0] - at channel = external global i32 ; [#uses=0] - at new_game = external global i32 ; [#uses=0] - at channel_title = external global [32 x i8] ; <[32 x i8]*> [#uses=0] - at initialized = external global i32 ; [#uses=0] - at kibitz = external global i32 ; [#uses=0] - at post = external global i32 ; [#uses=0] - at log_id = external global i32 ; [#uses=0] - at crafty_is_white = external global i32 ; [#uses=0] - at last_opponent_move = external global i32 ; [#uses=0] - at search_move = external global i32 ; [#uses=0] - at time_used = external global i32 ; [#uses=0] - at time_used_opponent = external global i32 ; [#uses=0] - at auto_kibitzing = external global i32 ; [#uses=0] - at test_mode = external global i32 ; [#uses=0] - at resign = external global i8 ; [#uses=0] - at resign_counter = external global i8 ; [#uses=0] - at resign_count = external global i8 ; [#uses=0] - at draw_counter = external global i8 ; [#uses=0] - at draw_count = external global i8 ; [#uses=0] - at tc_moves = external global i32 ; [#uses=0] - at tc_time = external global i32 ; [#uses=0] - at tc_time_remaining = external global i32 ; [#uses=0] - at tc_moves_remaining = external global i32 ; [#uses=0] - at tc_secondary_moves = external global i32 ; [#uses=0] - at tc_secondary_time = external global i32 ; [#uses=0] - at tc_sudden_death = external global i32 ; [#uses=0] - at tc_operator_time = external global i32 ; [#uses=0] - at tc_safety_margin = external global i32 ; [#uses=0] - at force = external global i32 ; [#uses=0] - at over = external global i32 ; [#uses=0] - at usage_level = external global i32 ; [#uses=0] - at audible_alarm = external global i8 ; [#uses=0] - at ansi = external global i32 ; [#uses=0] - at book_accept_mask = external global i32 ; [#uses=0] - at book_reject_mask = external global i32 ; [#uses=0] - at book_random = external global i32 ; [#uses=0] - at book_search_trigger = external global i32 ; [#uses=0] - at learning = external global i32 ; [#uses=0] - at show_book = external global i32 ; [#uses=0] - at book_selection_width = external global i32 ; [#uses=0] - at ponder = external global i32 ; [#uses=0] - at verbosity_level = external global i32 ; [#uses=0] - at push_extensions = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at .str_28.upgrd.52 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_3.upgrd.53 = external global [43 x i8] ; <[43 x i8]*> [#uses=0] - at display = external global %typedef.CHESS_POSITION ; <%typedef.CHESS_POSITION*> [#uses=0] - at .str_4.upgrd.54 = external global [14 x i8] ; <[14 x i8]*> [#uses=0] - at opponent_start_time = external global i32 ; [#uses=0] - at .str_8.upgrd.55 = external global [12 x i8] ; <[12 x i8]*> [#uses=0] - at .str_9.upgrd.56 = external global [12 x i8] ; <[12 x i8]*> [#uses=0] - at .str_18 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_19.upgrd.57 = external global [35 x i8] ; <[35 x i8]*> [#uses=0] - at .str_2013 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_21.upgrd.58 = external global [41 x i8] ; <[41 x i8]*> [#uses=0] - at .str_22.upgrd.59 = external global [29 x i8] ; <[29 x i8]*> [#uses=0] - at .str_23.upgrd.60 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at whisper_text = external global [500 x i8] ; <[500 x i8]*> [#uses=0] - at .str_24.upgrd.61 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_25.upgrd.62 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_26.upgrd.63 = external global [11 x i8] ; <[11 x i8]*> [#uses=0] - at .str_28.upgrd.64 = external global [13 x i8] ; <[13 x i8]*> [#uses=0] - at .str_29 = external global [13 x i8] ; <[13 x i8]*> [#uses=0] - at .str_30 = external global [33 x i8] ; <[33 x i8]*> [#uses=0] - at .str_31 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at .str_32.upgrd.65 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_36 = external global [3 x i8] ; <[3 x i8]*> [#uses=1] - at .str_37 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] - at .str_44 = external global [12 x i8] ; <[12 x i8]*> [#uses=0] - at .str_45 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_49 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] - at .str_52 = external global [12 x i8] ; <[12 x i8]*> [#uses=0] - at previous_search_value = external global i32 ; [#uses=0] - at .str_64 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at whisper_depth = external global i32 ; [#uses=0] - at .str_65 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_66 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at total_moves = external global i32 ; [#uses=0] - at book_file = external global %struct.__sFILE* ; <%struct.__sFILE**> [#uses=0] - at books_file = external global %struct.__sFILE* ; <%struct.__sFILE**> [#uses=0] - at book_lrn_file = external global %struct.__sFILE* ; <%struct.__sFILE**> [#uses=0] - at position_file = external global %struct.__sFILE* ; <%struct.__sFILE**> [#uses=0] - at position_lrn_file = external global %struct.__sFILE* ; <%struct.__sFILE**> [#uses=0] - at log_filename = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at history_filename = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at book_path = external global [128 x i8] ; <[128 x i8]*> [#uses=0] - at log_path = external global [128 x i8] ; <[128 x i8]*> [#uses=0] - at tb_path = external global [128 x i8] ; <[128 x i8]*> [#uses=0] - at cmd_buffer = external global [512 x i8] ; <[512 x i8]*> [#uses=0] - at root_move = external global i32 ; [#uses=0] - at hint = external global [16 x i8] ; <[16 x i8]*> [#uses=0] - at absolute_time_limit = external global i32 ; [#uses=0] - at search_time_limit = external global i32 ; [#uses=0] - at in_check = external global [65 x i8] ; <[65 x i8]*> [#uses=0] - at extended_reason = external global [65 x i8] ; <[65 x i8]*> [#uses=0] - at current_phase = external global [65 x i8] ; <[65 x i8]*> [#uses=0] - at sort_value = external global [256 x i32] ; <[256 x i32]*> [#uses=0] - at next_status = external global [65 x %typedef.NEXT_MOVE] ; <[65 x %typedef.NEXT_MOVE]*> [#uses=0] - at save_hash_key = external global [67 x i64] ; <[67 x i64]*> [#uses=0] - at save_pawn_hash_key = external global [67 x i32] ; <[67 x i32]*> [#uses=0] - at pawn_advance = external global [8 x i32] ; <[8 x i32]*> [#uses=0] - at bit_move = external global i64 ; [#uses=0] - at .str_1.upgrd.66 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] - at .str_2.upgrd.67 = external global [36 x i8] ; <[36 x i8]*> [#uses=0] - at .str_3.upgrd.68 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_1.upgrd.69 = external global [34 x i8] ; <[34 x i8]*> [#uses=0] - at .str_2.upgrd.70 = external global [46 x i8] ; <[46 x i8]*> [#uses=0] - at .str_2.upgrd.71 = external global [47 x i8] ; <[47 x i8]*> [#uses=0] - at .str_1.upgrd.72 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_2.upgrd.73 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_3.upgrd.74 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_4.upgrd.75 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_5.upgrd.76 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_615 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_7.upgrd.77 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] - at .str_10.upgrd.78 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_11.upgrd.79 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_12.upgrd.80 = external global [18 x i8] ; <[18 x i8]*> [#uses=0] - at .str_1318 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_1419 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at .str_15.upgrd.81 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] - at .str_16.upgrd.82 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_19.upgrd.83 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_20.upgrd.84 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_2222 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_2323 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_25.upgrd.85 = external global [29 x i8] ; <[29 x i8]*> [#uses=0] - at .str_27 = external global [48 x i8] ; <[48 x i8]*> [#uses=0] - at .str_28.upgrd.86 = external global [42 x i8] ; <[42 x i8]*> [#uses=0] - at .str_29.upgrd.87 = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at .str_30.upgrd.88 = external global [27 x i8] ; <[27 x i8]*> [#uses=0] - at .str_31.upgrd.89 = external global [18 x i8] ; <[18 x i8]*> [#uses=0] - at .str_32.upgrd.90 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_33 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_34 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_35 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_36.upgrd.91 = external global [46 x i8] ; <[46 x i8]*> [#uses=0] - at .str_37.upgrd.92 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_38 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_41 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_42 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_43 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_44.upgrd.93 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_4525 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_46 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_47 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] - at .str_48 = external global [35 x i8] ; <[35 x i8]*> [#uses=0] - at .str_49.upgrd.94 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_50 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] - at .str_51 = external global [25 x i8] ; <[25 x i8]*> [#uses=0] - at .str_52.upgrd.95 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_53 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_54 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] - at .str_55 = external global [32 x i8] ; <[32 x i8]*> [#uses=0] - at .str_56 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_57 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_58 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_59 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_60 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_61 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_62 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_63 = external global [16 x i8] ; <[16 x i8]*> [#uses=0] - at .str_64.upgrd.96 = external global [37 x i8] ; <[37 x i8]*> [#uses=0] - at .str_66.upgrd.97 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_67 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] - at .str_68 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_69 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_71 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_72 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_73 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_74 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_75 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_81 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_83 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_84 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] - at .str_86 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_87 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_89 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_90 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_91 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_92 = external global [47 x i8] ; <[47 x i8]*> [#uses=0] - at .str_94 = external global [37 x i8] ; <[37 x i8]*> [#uses=0] - at .str_95 = external global [33 x i8] ; <[33 x i8]*> [#uses=0] - at .str_96 = external global [34 x i8] ; <[34 x i8]*> [#uses=0] - at .str_97 = external global [33 x i8] ; <[33 x i8]*> [#uses=0] - at .str_98 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_100 = external global [42 x i8] ; <[42 x i8]*> [#uses=0] - at .str_101 = external global [38 x i8] ; <[38 x i8]*> [#uses=0] - at .str_102 = external global [39 x i8] ; <[39 x i8]*> [#uses=0] - at .str_103 = external global [38 x i8] ; <[38 x i8]*> [#uses=0] - at .str_104 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_105 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_106 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_107 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_108 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_109 = external global [56 x i8] ; <[56 x i8]*> [#uses=0] - at .str_110 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_111 = external global [54 x i8] ; <[54 x i8]*> [#uses=0] - at .str_112 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_113 = external global [58 x i8] ; <[58 x i8]*> [#uses=0] - at .str_114 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_115 = external global [48 x i8] ; <[48 x i8]*> [#uses=0] - at .str_116 = external global [61 x i8] ; <[61 x i8]*> [#uses=0] - at .str_117 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_118 = external global [63 x i8] ; <[63 x i8]*> [#uses=0] - at .str_119 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_120 = external global [63 x i8] ; <[63 x i8]*> [#uses=0] - at .str_121 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_122 = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at .str_123 = external global [61 x i8] ; <[61 x i8]*> [#uses=0] - at .str_124 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_125 = external global [65 x i8] ; <[65 x i8]*> [#uses=0] - at .str_126 = external global [65 x i8] ; <[65 x i8]*> [#uses=0] - at .str_127 = external global [69 x i8] ; <[69 x i8]*> [#uses=0] - at .str_128 = external global [66 x i8] ; <[66 x i8]*> [#uses=0] - at .str_129 = external global [61 x i8] ; <[61 x i8]*> [#uses=0] - at .str_130 = external global [63 x i8] ; <[63 x i8]*> [#uses=0] - at .str_131 = external global [67 x i8] ; <[67 x i8]*> [#uses=0] - at .str_132 = external global [63 x i8] ; <[63 x i8]*> [#uses=0] - at .str_133 = external global [58 x i8] ; <[58 x i8]*> [#uses=0] - at .str_134 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_135 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_136.upgrd.98 = external global [56 x i8] ; <[56 x i8]*> [#uses=0] - at .str_137 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_138 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_139 = external global [58 x i8] ; <[58 x i8]*> [#uses=0] - at .str_140 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_141 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_142 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_143 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_144 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_145 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_146 = external global [61 x i8] ; <[61 x i8]*> [#uses=0] - at .str_147 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_148 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_149 = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at .str_150 = external global [65 x i8] ; <[65 x i8]*> [#uses=0] - at .str_151 = external global [61 x i8] ; <[61 x i8]*> [#uses=0] - at .str_152 = external global [46 x i8] ; <[46 x i8]*> [#uses=0] - at .str_153 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_154 = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at .str_156 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_157 = external global [31 x i8] ; <[31 x i8]*> [#uses=0] - at .str_158 = external global [71 x i8] ; <[71 x i8]*> [#uses=0] - at .str_159 = external global [72 x i8] ; <[72 x i8]*> [#uses=0] - at .str_160 = external global [56 x i8] ; <[56 x i8]*> [#uses=0] - at .str_161 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_162 = external global [63 x i8] ; <[63 x i8]*> [#uses=0] - at .str_163 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_164 = external global [58 x i8] ; <[58 x i8]*> [#uses=0] - at .str_165 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_166 = external global [61 x i8] ; <[61 x i8]*> [#uses=0] - at .str_167 = external global [63 x i8] ; <[63 x i8]*> [#uses=0] - at .str_168 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_169 = external global [65 x i8] ; <[65 x i8]*> [#uses=0] - at .str_170 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_171 = external global [63 x i8] ; <[63 x i8]*> [#uses=0] - at .str_172 = external global [61 x i8] ; <[61 x i8]*> [#uses=0] - at .str_173 = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at .str_174 = external global [51 x i8] ; <[51 x i8]*> [#uses=0] - at .str_175 = external global [70 x i8] ; <[70 x i8]*> [#uses=0] - at .str_176 = external global [67 x i8] ; <[67 x i8]*> [#uses=0] - at .str_177 = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at .str_178 = external global [48 x i8] ; <[48 x i8]*> [#uses=0] - at .str_180 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_181 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_182 = external global [53 x i8] ; <[53 x i8]*> [#uses=0] - at .str_183 = external global [61 x i8] ; <[61 x i8]*> [#uses=0] - at .str_184 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_185 = external global [61 x i8] ; <[61 x i8]*> [#uses=0] - at .str_186 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_187 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_188 = external global [35 x i8] ; <[35 x i8]*> [#uses=0] - at .str_189 = external global [58 x i8] ; <[58 x i8]*> [#uses=0] - at .str_190 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_191 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_192 = external global [39 x i8] ; <[39 x i8]*> [#uses=0] - at .str_193 = external global [55 x i8] ; <[55 x i8]*> [#uses=0] - at .str_194 = external global [32 x i8] ; <[32 x i8]*> [#uses=0] - at .str_195 = external global [33 x i8] ; <[33 x i8]*> [#uses=0] - at .str_196 = external global [46 x i8] ; <[46 x i8]*> [#uses=0] - at .str_197 = external global [11 x i8] ; <[11 x i8]*> [#uses=0] - at .str_198 = external global [16 x i8] ; <[16 x i8]*> [#uses=0] - at .str_201 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_202 = external global [58 x i8] ; <[58 x i8]*> [#uses=0] - at .str_203 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_204 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_206 = external global [48 x i8] ; <[48 x i8]*> [#uses=0] - at .str_207 = external global [46 x i8] ; <[46 x i8]*> [#uses=0] - at .str_208 = external global [56 x i8] ; <[56 x i8]*> [#uses=0] - at .str_209 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_210 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_211 = external global [43 x i8] ; <[43 x i8]*> [#uses=0] - at .str_213 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_214 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_215 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_216 = external global [14 x i8] ; <[14 x i8]*> [#uses=0] - at .str_218 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_219 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_220 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_221 = external global [37 x i8] ; <[37 x i8]*> [#uses=0] - at .str_222 = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at .str_223 = external global [66 x i8] ; <[66 x i8]*> [#uses=0] - at .str_224 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_225 = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at .str_226 = external global [63 x i8] ; <[63 x i8]*> [#uses=0] - at .str_227 = external global [46 x i8] ; <[46 x i8]*> [#uses=0] - at .str_228 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_229 = external global [56 x i8] ; <[56 x i8]*> [#uses=0] - at .str_230 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_231 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] - at .str_232 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_233 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_234 = external global [54 x i8] ; <[54 x i8]*> [#uses=0] - at .str_235 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_236 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] - at .str_237 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_238 = external global [61 x i8] ; <[61 x i8]*> [#uses=0] - at .str_239 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_240 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] - at .str_241 = external global [61 x i8] ; <[61 x i8]*> [#uses=0] - at .str_242 = external global [61 x i8] ; <[61 x i8]*> [#uses=0] - at .str_243 = external global [35 x i8] ; <[35 x i8]*> [#uses=0] - at .str_245 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_246 = external global [58 x i8] ; <[58 x i8]*> [#uses=0] - at .str_247 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_248 = external global [56 x i8] ; <[56 x i8]*> [#uses=0] - at .str_249 = external global [58 x i8] ; <[58 x i8]*> [#uses=0] - at .str_250 = external global [45 x i8] ; <[45 x i8]*> [#uses=0] - at .str_253 = external global [56 x i8] ; <[56 x i8]*> [#uses=0] - at .str_254 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] - at .str_256 = external global [43 x i8] ; <[43 x i8]*> [#uses=0] - at .str_258 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_259 = external global [27 x i8] ; <[27 x i8]*> [#uses=0] - at .str_261 = external global [43 x i8] ; <[43 x i8]*> [#uses=0] - at .str_262 = external global [43 x i8] ; <[43 x i8]*> [#uses=0] - at .str_263 = external global [43 x i8] ; <[43 x i8]*> [#uses=0] - at .str_266 = external global [43 x i8] ; <[43 x i8]*> [#uses=0] - at .str_267 = external global [43 x i8] ; <[43 x i8]*> [#uses=0] - at .str_268 = external global [43 x i8] ; <[43 x i8]*> [#uses=0] - at .str_270 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_271 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_272 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_273 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_274 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_275 = external global [44 x i8] ; <[44 x i8]*> [#uses=0] - at .str_276 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_277 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] - at .str_278 = external global [48 x i8] ; <[48 x i8]*> [#uses=0] - at .str_279 = external global [51 x i8] ; <[51 x i8]*> [#uses=0] - at .str_280 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_281 = external global [53 x i8] ; <[53 x i8]*> [#uses=0] - at .str_282 = external global [50 x i8] ; <[50 x i8]*> [#uses=0] - at .str_283 = external global [53 x i8] ; <[53 x i8]*> [#uses=0] - at .str_284 = external global [56 x i8] ; <[56 x i8]*> [#uses=0] - at .str_285 = external global [55 x i8] ; <[55 x i8]*> [#uses=0] - at .str_286 = external global [56 x i8] ; <[56 x i8]*> [#uses=0] - at .str_287 = external global [54 x i8] ; <[54 x i8]*> [#uses=0] - at .str_288 = external global [58 x i8] ; <[58 x i8]*> [#uses=0] - at .str_289 = external global [61 x i8] ; <[61 x i8]*> [#uses=0] - at .str_290 = external global [56 x i8] ; <[56 x i8]*> [#uses=0] - at .str_291 = external global [58 x i8] ; <[58 x i8]*> [#uses=0] - at .str_292 = external global [58 x i8] ; <[58 x i8]*> [#uses=0] - at .str_293 = external global [54 x i8] ; <[54 x i8]*> [#uses=0] - at .str_294 = external global [56 x i8] ; <[56 x i8]*> [#uses=0] - at .str_295 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_296 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_297 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_298 = external global [51 x i8] ; <[51 x i8]*> [#uses=0] - at .str_299 = external global [54 x i8] ; <[54 x i8]*> [#uses=0] - at .str_300 = external global [49 x i8] ; <[49 x i8]*> [#uses=0] - at .str_301 = external global [56 x i8] ; <[56 x i8]*> [#uses=0] - at .str_302 = external global [18 x i8] ; <[18 x i8]*> [#uses=0] - at .str_304 = external global [50 x i8] ; <[50 x i8]*> [#uses=0] - at .str_305 = external global [50 x i8] ; <[50 x i8]*> [#uses=0] - at .str_306 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_308 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_310 = external global [50 x i8] ; <[50 x i8]*> [#uses=0] - at .str_311 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_312 = external global [53 x i8] ; <[53 x i8]*> [#uses=0] - at .str_313 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_314 = external global [53 x i8] ; <[53 x i8]*> [#uses=0] - at .str_315 = external global [54 x i8] ; <[54 x i8]*> [#uses=0] - at .str_316 = external global [51 x i8] ; <[51 x i8]*> [#uses=0] - at .str_317 = external global [26 x i8] ; <[26 x i8]*> [#uses=0] - at .str_319 = external global [56 x i8] ; <[56 x i8]*> [#uses=0] - at .str_320 = external global [53 x i8] ; <[53 x i8]*> [#uses=0] - at .str_321 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_322 = external global [55 x i8] ; <[55 x i8]*> [#uses=0] - at .str_323 = external global [20 x i8] ; <[20 x i8]*> [#uses=0] - at .str_325 = external global [26 x i8] ; <[26 x i8]*> [#uses=0] - at .str_327 = external global [51 x i8] ; <[51 x i8]*> [#uses=0] - at .str_328 = external global [51 x i8] ; <[51 x i8]*> [#uses=0] - at .str_329 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_330 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_331 = external global [53 x i8] ; <[53 x i8]*> [#uses=0] - at .str_332 = external global [39 x i8] ; <[39 x i8]*> [#uses=0] - at .str_333 = external global [50 x i8] ; <[50 x i8]*> [#uses=0] - at .str_334 = external global [54 x i8] ; <[54 x i8]*> [#uses=0] - at .str_335 = external global [48 x i8] ; <[48 x i8]*> [#uses=0] - at .str_336 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_337 = external global [50 x i8] ; <[50 x i8]*> [#uses=0] - at .str_338 = external global [56 x i8] ; <[56 x i8]*> [#uses=0] - at .str_339 = external global [36 x i8] ; <[36 x i8]*> [#uses=0] - at .str_340 = external global [55 x i8] ; <[55 x i8]*> [#uses=0] - at .str_341 = external global [54 x i8] ; <[54 x i8]*> [#uses=0] - at .str_342 = external global [49 x i8] ; <[49 x i8]*> [#uses=0] - at .str_343 = external global [63 x i8] ; <[63 x i8]*> [#uses=0] - at .str_344 = external global [49 x i8] ; <[49 x i8]*> [#uses=0] - at .str_345 = external global [47 x i8] ; <[47 x i8]*> [#uses=0] - at .str_346 = external global [49 x i8] ; <[49 x i8]*> [#uses=0] - at .str_347 = external global [43 x i8] ; <[43 x i8]*> [#uses=0] - at .str_348 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_349 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_350 = external global [55 x i8] ; <[55 x i8]*> [#uses=0] - at .str_351 = external global [47 x i8] ; <[47 x i8]*> [#uses=0] - at .str_352 = external global [49 x i8] ; <[49 x i8]*> [#uses=0] - at .str_353 = external global [49 x i8] ; <[49 x i8]*> [#uses=0] - at .str_354 = external global [42 x i8] ; <[42 x i8]*> [#uses=0] - at .str_355 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_356 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_357 = external global [53 x i8] ; <[53 x i8]*> [#uses=0] - at .str_358 = external global [47 x i8] ; <[47 x i8]*> [#uses=0] - at .str_359 = external global [63 x i8] ; <[63 x i8]*> [#uses=0] - at .str_360 = external global [54 x i8] ; <[54 x i8]*> [#uses=0] - at .str_362 = external global [53 x i8] ; <[53 x i8]*> [#uses=0] - at .str_363 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_364 = external global [56 x i8] ; <[56 x i8]*> [#uses=0] - at .str_365 = external global [51 x i8] ; <[51 x i8]*> [#uses=0] - at .str_366 = external global [64 x i8] ; <[64 x i8]*> [#uses=0] - at .str_367 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_368 = external global [48 x i8] ; <[48 x i8]*> [#uses=0] - at .str_369 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_370 = external global [58 x i8] ; <[58 x i8]*> [#uses=0] - at .str_371 = external global [49 x i8] ; <[49 x i8]*> [#uses=0] - at .str_372 = external global [58 x i8] ; <[58 x i8]*> [#uses=0] - at .str_373 = external global [61 x i8] ; <[61 x i8]*> [#uses=0] - at .str_374 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_375 = external global [63 x i8] ; <[63 x i8]*> [#uses=0] - at .str_376 = external global [63 x i8] ; <[63 x i8]*> [#uses=0] - at .str_377 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_378 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_379 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_380 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_381 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_382 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_383 = external global [49 x i8] ; <[49 x i8]*> [#uses=0] - at .str_384 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_385 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_387 = external global [53 x i8] ; <[53 x i8]*> [#uses=0] - at .str_388 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_389 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_390 = external global [55 x i8] ; <[55 x i8]*> [#uses=0] - at .str_391 = external global [55 x i8] ; <[55 x i8]*> [#uses=0] - at .str_392 = external global [71 x i8] ; <[71 x i8]*> [#uses=0] - at .str_393 = external global [46 x i8] ; <[46 x i8]*> [#uses=0] - at .str_394 = external global [51 x i8] ; <[51 x i8]*> [#uses=0] - at .str_395 = external global [54 x i8] ; <[54 x i8]*> [#uses=0] - at .str_396 = external global [60 x i8] ; <[60 x i8]*> [#uses=0] - at .str_397 = external global [49 x i8] ; <[49 x i8]*> [#uses=0] - at .str_398 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_399 = external global [67 x i8] ; <[67 x i8]*> [#uses=0] - at .str_400 = external global [55 x i8] ; <[55 x i8]*> [#uses=0] - at .str_401 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_402 = external global [62 x i8] ; <[62 x i8]*> [#uses=0] - at .str_403 = external global [47 x i8] ; <[47 x i8]*> [#uses=0] - at .str_404 = external global [59 x i8] ; <[59 x i8]*> [#uses=0] - at .str_405 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_406 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_407 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_408 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_409 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_410 = external global [26 x i8] ; <[26 x i8]*> [#uses=0] - at .str_411 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at .str_412 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_413 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_414 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] - at .str_421 = external global [53 x i8] ; <[53 x i8]*> [#uses=0] - at .str_422 = external global [55 x i8] ; <[55 x i8]*> [#uses=0] - at .str_423 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] - at .str_424 = external global [39 x i8] ; <[39 x i8]*> [#uses=0] - at .str_426 = external global [42 x i8] ; <[42 x i8]*> [#uses=0] - at .str_427 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_429 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_430 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] - at .str_431 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_432 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] - at .str_433 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] - at .str_434 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] - at .str_435 = external global [27 x i8] ; <[27 x i8]*> [#uses=0] - at .str_436 = external global [28 x i8] ; <[28 x i8]*> [#uses=0] - at .str_437 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_438 = external global [38 x i8] ; <[38 x i8]*> [#uses=0] - at .str_440 = external global [44 x i8] ; <[44 x i8]*> [#uses=0] - at .str_445 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_446 = external global [26 x i8] ; <[26 x i8]*> [#uses=0] - at .str_447 = external global [36 x i8] ; <[36 x i8]*> [#uses=0] - at .str_448 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_449 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_450 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_451 = external global [44 x i8] ; <[44 x i8]*> [#uses=0] - at .str_452 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_453 = external global [26 x i8] ; <[26 x i8]*> [#uses=0] - at .str_454 = external global [36 x i8] ; <[36 x i8]*> [#uses=0] - at .str_455 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_456 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_459 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at .str_460 = external global [32 x i8] ; <[32 x i8]*> [#uses=0] - at .str_461 = external global [42 x i8] ; <[42 x i8]*> [#uses=0] - at .str_462 = external global [39 x i8] ; <[39 x i8]*> [#uses=0] - at .str_463 = external global [28 x i8] ; <[28 x i8]*> [#uses=0] - at .str_466 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_467 = external global [35 x i8] ; <[35 x i8]*> [#uses=0] - at .str_468 = external global [45 x i8] ; <[45 x i8]*> [#uses=0] - at .str_469 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_470 = external global [31 x i8] ; <[31 x i8]*> [#uses=0] - at .str_474 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_477 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_480 = external global [16 x i8] ; <[16 x i8]*> [#uses=0] - at .str_483 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] - at .str_485 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_487 = external global [32 x i8] ; <[32 x i8]*> [#uses=0] - at .str_490 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_494 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_495 = external global [33 x i8] ; <[33 x i8]*> [#uses=0] - at .str_497 = external global [12 x i8] ; <[12 x i8]*> [#uses=0] - at .str_498 = external global [13 x i8] ; <[13 x i8]*> [#uses=0] - at .str_507 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_508 = external global [11 x i8] ; <[11 x i8]*> [#uses=0] - at .str_509 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_510 = external global [37 x i8] ; <[37 x i8]*> [#uses=0] - at .str_511 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_512 = external global [32 x i8] ; <[32 x i8]*> [#uses=0] - at .str_513 = external global [18 x i8] ; <[18 x i8]*> [#uses=0] - at .str_514 = external global [14 x i8] ; <[14 x i8]*> [#uses=0] - at .str_515 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_516 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] - at .str_517 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_519 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] - at .str_520 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] - at .str_521 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] - at .str_522 = external global [16 x i8] ; <[16 x i8]*> [#uses=0] - at .str_523 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_524 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_525 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_526 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] - at .str_527 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] - at .str_528 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_529 = external global [28 x i8] ; <[28 x i8]*> [#uses=0] - at .str_530 = external global [54 x i8] ; <[54 x i8]*> [#uses=0] - at .str_531 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_532 = external global [38 x i8] ; <[38 x i8]*> [#uses=0] - at .str_533 = external global [32 x i8] ; <[32 x i8]*> [#uses=0] - at .str_534 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_535 = external global [27 x i8] ; <[27 x i8]*> [#uses=0] - at .str_536 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_537 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_539 = external global [39 x i8] ; <[39 x i8]*> [#uses=0] - at .str_540 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_541 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_542 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_543 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_544 = external global [49 x i8] ; <[49 x i8]*> [#uses=0] - at .str_546 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_550 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_551 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_552 = external global [31 x i8] ; <[31 x i8]*> [#uses=0] - at .str_553 = external global [52 x i8] ; <[52 x i8]*> [#uses=0] - at .str_554 = external global [43 x i8] ; <[43 x i8]*> [#uses=0] - at .str_555 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_556 = external global [26 x i8] ; <[26 x i8]*> [#uses=0] - at .str_557 = external global [16 x i8] ; <[16 x i8]*> [#uses=0] - at .str_559 = external global [27 x i8] ; <[27 x i8]*> [#uses=0] - at .str_560 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_562 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_564 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_565 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_567 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_568 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_570 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_571 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_572 = external global [30 x i8] ; <[30 x i8]*> [#uses=0] - at .str_574 = external global [20 x i8] ; <[20 x i8]*> [#uses=0] - at .str_576 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] - at .str_577 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_578 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_579 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_580 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_581 = external global [36 x i8] ; <[36 x i8]*> [#uses=0] - at .str_582 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_583 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] - at .str_584 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_586 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_587 = external global [28 x i8] ; <[28 x i8]*> [#uses=0] - at .str_589 = external global [28 x i8] ; <[28 x i8]*> [#uses=0] - at .str_590 = external global [39 x i8] ; <[39 x i8]*> [#uses=0] - at .str_591 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_592 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_596 = external global [25 x i8] ; <[25 x i8]*> [#uses=0] - at .str_597 = external global [27 x i8] ; <[27 x i8]*> [#uses=0] - at .str_598 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] - at .str_599 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] - at .str_605 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_610 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_613 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_616 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_621 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_622 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] - at .str_623 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_624 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] - at .str_625 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_626 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_628 = external global [30 x i8] ; <[30 x i8]*> [#uses=0] - at .str_629 = external global [14 x i8] ; <[14 x i8]*> [#uses=0] - at .str_630 = external global [13 x i8] ; <[13 x i8]*> [#uses=0] - at .str_631 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] - at .str_632 = external global [14 x i8] ; <[14 x i8]*> [#uses=0] - at .str_633 = external global [14 x i8] ; <[14 x i8]*> [#uses=0] - at .str_634 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] - at .str_635 = external global [14 x i8] ; <[14 x i8]*> [#uses=0] - at .str_636 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] - at .str_637 = external global [16 x i8] ; <[16 x i8]*> [#uses=0] - at .str_639 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_643 = external global [20 x i8] ; <[20 x i8]*> [#uses=0] - at .str_644 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_645 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at .str_646 = external global [1 x i8] ; <[1 x i8]*> [#uses=0] - at .str_649 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_654 = external global [2 x i8] ; <[2 x i8]*> [#uses=1] - at .str_656 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_658 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at .str_660 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at .str_662 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at .str_664 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] - at .str_666 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_667 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_669 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_670 = external global [20 x i8] ; <[20 x i8]*> [#uses=0] - at .str_671 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_672 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] - at .str_674 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_675 = external global [39 x i8] ; <[39 x i8]*> [#uses=0] - at .str_676 = external global [30 x i8] ; <[30 x i8]*> [#uses=0] - at .str_680 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_682 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_683 = external global [37 x i8] ; <[37 x i8]*> [#uses=0] - at .str_684 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_685 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_686 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_687 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_688 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_689 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_690 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_691 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_692 = external global [20 x i8] ; <[20 x i8]*> [#uses=0] - at .str_694 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_695 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] - at .str_697 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_698 = external global [28 x i8] ; <[28 x i8]*> [#uses=0] - at .str_700 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_701 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] - at .str_702 = external global [26 x i8] ; <[26 x i8]*> [#uses=0] - at .str_703 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_704 = external global [25 x i8] ; <[25 x i8]*> [#uses=0] - at .str_707 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] - at .str_708 = external global [16 x i8] ; <[16 x i8]*> [#uses=0] - at .str_709 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_710 = external global [20 x i8] ; <[20 x i8]*> [#uses=0] - at .str_711 = external global [37 x i8] ; <[37 x i8]*> [#uses=0] - at .str_722 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_723 = external global [34 x i8] ; <[34 x i8]*> [#uses=0] - at .str_726 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_727 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] - at .str_728 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_729 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_730 = external global [12 x i8] ; <[12 x i8]*> [#uses=0] - at .str_732 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_734 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_735 = external global [28 x i8] ; <[28 x i8]*> [#uses=0] - at .str_736 = external global [61 x i8] ; <[61 x i8]*> [#uses=0] - at .str_738 = external global [25 x i8] ; <[25 x i8]*> [#uses=0] - at .str_739 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_740 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_741 = external global [25 x i8] ; <[25 x i8]*> [#uses=0] - at .str_742 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_743 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_744 = external global [31 x i8] ; <[31 x i8]*> [#uses=0] - at .str_745 = external global [42 x i8] ; <[42 x i8]*> [#uses=0] - at .str_747 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_748 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_750 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] -@"\01text_move.0__" = external global [10 x i8] ; <[10 x i8]*> [#uses=0] -@"\01new_text.1__" = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_1.upgrd.99 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] -@"\01text_move.2__" = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_1.upgrd.100 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] - at .str_2.upgrd.101 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] - at .str_3.upgrd.102 = external global [16 x i8] ; <[16 x i8]*> [#uses=0] - at .str_130.upgrd.103 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_231.upgrd.104 = external global [47 x i8] ; <[47 x i8]*> [#uses=0] - at .str_3.upgrd.105 = external global [27 x i8] ; <[27 x i8]*> [#uses=0] - at .str_4.upgrd.106 = external global [27 x i8] ; <[27 x i8]*> [#uses=0] - at .str_7.upgrd.107 = external global [30 x i8] ; <[30 x i8]*> [#uses=0] -@"\01hashing_pawns.0__" = external global i32 ; [#uses=0] -@"\01hashing_opening.1__" = external global i32 ; [#uses=0] -@"\01hashing_middle_game.2__" = external global i32 ; [#uses=0] -@"\01hashing_end_game.3__" = external global i32 ; [#uses=0] -@"\01last_wtm.4__" = external global i32 ; [#uses=0] - at .str_1.upgrd.108 = external global [37 x i8] ; <[37 x i8]*> [#uses=0] - at .str_1.upgrd.109 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_1.upgrd.110 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] - at .str_2.upgrd.111 = external global [16 x i8] ; <[16 x i8]*> [#uses=0] - at .str_3.upgrd.112 = external global [30 x i8] ; <[30 x i8]*> [#uses=0] - at .str_4.upgrd.113 = external global [30 x i8] ; <[30 x i8]*> [#uses=0] - at .str_5.upgrd.114 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_6.upgrd.115 = external global [25 x i8] ; <[25 x i8]*> [#uses=0] - at .str_7.upgrd.116 = external global [14 x i8] ; <[14 x i8]*> [#uses=0] - at .str_934 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_1.upgrd.117 = external global [28 x i8] ; <[28 x i8]*> [#uses=0] - at .str_3.upgrd.118 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_1.upgrd.119 = external global [38 x i8] ; <[38 x i8]*> [#uses=0] - at .str_2.upgrd.120 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_4.upgrd.121 = external global [28 x i8] ; <[28 x i8]*> [#uses=0] - at .str_5.upgrd.122 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_1.upgrd.123 = external global [11 x i8] ; <[11 x i8]*> [#uses=0] - at .str_2.upgrd.124 = external global [27 x i8] ; <[27 x i8]*> [#uses=0] - at .str_7.upgrd.125 = external global [29 x i8] ; <[29 x i8]*> [#uses=0] - at .str_10.upgrd.126 = external global [34 x i8] ; <[34 x i8]*> [#uses=0] - at .str_1141 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_12.upgrd.127 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_14.upgrd.128 = external global [20 x i8] ; <[20 x i8]*> [#uses=0] - at .str_1542 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] - at .ctor_1.upgrd.129 = external global [25 x i8] ; <[25 x i8]*> [#uses=0] - at .str_1.upgrd.130 = external global [33 x i8] ; <[33 x i8]*> [#uses=0] - at .str_3.upgrd.131 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] - at .str_4.upgrd.132 = external global [25 x i8] ; <[25 x i8]*> [#uses=0] - at .str_5.upgrd.133 = external global [26 x i8] ; <[26 x i8]*> [#uses=0] - at .str_6.upgrd.134 = external global [55 x i8] ; <[55 x i8]*> [#uses=0] - at .str_143.upgrd.135 = external global [33 x i8] ; <[33 x i8]*> [#uses=0] - at .str_2.upgrd.136 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] - at .str_1.upgrd.137 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_2.upgrd.138 = external global [51 x i8] ; <[51 x i8]*> [#uses=0] - at bit_move44 = external global i64 ; [#uses=0] - at .str_1.upgrd.139 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_248.upgrd.140 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_349.upgrd.141 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .ctor_1.upgrd.142 = external global [46 x i8] ; <[46 x i8]*> [#uses=0] - at .str_5.upgrd.143 = external global [43 x i8] ; <[43 x i8]*> [#uses=0] - at .str_6.upgrd.144 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_751 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_852 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] - at .str_9.upgrd.145 = external global [42 x i8] ; <[42 x i8]*> [#uses=0] - at .str_10.upgrd.146 = external global [41 x i8] ; <[41 x i8]*> [#uses=0] -@"\01out.0__" = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_1153 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_12.upgrd.147 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_13.upgrd.148 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_14.upgrd.149 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_15.upgrd.150 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_16.upgrd.151 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_17.upgrd.152 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] -@"\01out.1__" = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_18.upgrd.153 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_19.upgrd.154 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_20.upgrd.155 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_21.upgrd.156 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_2254 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_2355 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] - at .str_24.upgrd.157 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - at .str_25.upgrd.158 = external global [45 x i8] ; <[45 x i8]*> [#uses=0] - at .str_26.upgrd.159 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] -@"\01out.2__" = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_31.upgrd.160 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] -@"\01out.3__" = external global [10 x i8] ; <[10 x i8]*> [#uses=0] -@"\01out.4__" = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_3457 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_35.upgrd.161 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_36.upgrd.162 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_37.upgrd.163 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_41.upgrd.164 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_45.upgrd.165 = external global [55 x i8] ; <[55 x i8]*> [#uses=0] -@"\01save_book_selection_width.5__" = external global i32 ; [#uses=0] -@"\01save_book_random.6__" = external global i32 ; [#uses=0] -@"\01save_whisper.7__" = external global i32 ; [#uses=0] -@"\01save_kibitz.8__" = external global i32 ; [#uses=0] -@"\01save_channel.9__" = external global i32 ; [#uses=0] -@"\01save_resign.10" = external global i32 ; [#uses=0] -@"\01save_resign_count.11" = external global i32 ; [#uses=0] -@"\01save_draw_count.12" = external global i32 ; [#uses=0] -@"\01save_learning.13" = external global i32 ; [#uses=0] - at .str_49.upgrd.166 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_51.upgrd.167 = external global [44 x i8] ; <[44 x i8]*> [#uses=0] -@"\01x.14" = external global [55 x i32] ; <[55 x i32]*> [#uses=0] -@"\01init.15.b" = external global i1 ; [#uses=0] -@"\01y.16" = external global [55 x i32] ; <[55 x i32]*> [#uses=0] -@"\01j.17" = external global i32 ; [#uses=0] -@"\01k.18" = external global i32 ; [#uses=0] - at .str_52.upgrd.168 = external global [50 x i8] ; <[50 x i8]*> [#uses=0] -@"\01text.19" = external global [128 x i8] ; <[128 x i8]*> [#uses=0] - at .str_5659 = external global [12 x i8] ; <[12 x i8]*> [#uses=0] - at .str_62.upgrd.169 = external global [14 x i8] ; <[14 x i8]*> [#uses=0] - at .str_6662 = external global [5 x i8] ; <[5 x i8]*> [#uses=0] - at .str_68.upgrd.170 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_69.upgrd.171 = external global [16 x i8] ; <[16 x i8]*> [#uses=0] - at .str_70 = external global [16 x i8] ; <[16 x i8]*> [#uses=0] - at .str_72.upgrd.172 = external global [35 x i8] ; <[35 x i8]*> [#uses=0] - at .str_74.upgrd.173 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] - at .str_76 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] - at .str_78 = external global [57 x i8] ; <[57 x i8]*> [#uses=0] - at .str_80 = external global [45 x i8] ; <[45 x i8]*> [#uses=0] - at .str_82 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_84.upgrd.174 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] - at .str_86.upgrd.175 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] - at .str_88 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] - at .str_90.upgrd.176 = external global [31 x i8] ; <[31 x i8]*> [#uses=0] - at .str_92.upgrd.177 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] - at .str_94.upgrd.178 = external global [30 x i8] ; <[30 x i8]*> [#uses=0] - at .str_95.upgrd.179 = external global [48 x i8] ; <[48 x i8]*> [#uses=0] - at .str_97.upgrd.180 = external global [18 x i8] ; <[18 x i8]*> [#uses=0] - at .str_98.upgrd.181 = external global [36 x i8] ; <[36 x i8]*> [#uses=0] - at .str_100.upgrd.182 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] - at .str_163.upgrd.183 = external global [38 x i8] ; <[38 x i8]*> [#uses=0] - at .str_2.upgrd.184 = external global [38 x i8] ; <[38 x i8]*> [#uses=0] - at .str_3.upgrd.185 = external global [50 x i8] ; <[50 x i8]*> [#uses=0] - at .str_4.upgrd.186 = external global [50 x i8] ; <[50 x i8]*> [#uses=0] - at .str_5.upgrd.187 = external global [51 x i8] ; <[51 x i8]*> [#uses=0] - at .str_6.upgrd.188 = external global [30 x i8] ; <[30 x i8]*> [#uses=0] - at .str_7.upgrd.189 = external global [28 x i8] ; <[28 x i8]*> [#uses=0] - at .str_8.upgrd.190 = external global [33 x i8] ; <[33 x i8]*> [#uses=0] - at .str_9.upgrd.191 = external global [54 x i8] ; <[54 x i8]*> [#uses=0] - at .str_10.upgrd.192 = external global [47 x i8] ; <[47 x i8]*> [#uses=0] - at .str_11.upgrd.193 = external global [46 x i8] ; <[46 x i8]*> [#uses=0] - at .str_12.upgrd.194 = external global [47 x i8] ; <[47 x i8]*> [#uses=0] - at .str_13.upgrd.195 = external global [46 x i8] ; <[46 x i8]*> [#uses=0] - at .str_14.upgrd.196 = external global [35 x i8] ; <[35 x i8]*> [#uses=0] - at .str_15.upgrd.197 = external global [36 x i8] ; <[36 x i8]*> [#uses=0] - at .str_16.upgrd.198 = external global [35 x i8] ; <[35 x i8]*> [#uses=0] - at .str_17.upgrd.199 = external global [36 x i8] ; <[36 x i8]*> [#uses=0] - at .str_18.upgrd.200 = external global [35 x i8] ; <[35 x i8]*> [#uses=0] - at .str_19.upgrd.201 = external global [41 x i8] ; <[41 x i8]*> [#uses=0] - at .str_20.upgrd.202 = external global [36 x i8] ; <[36 x i8]*> [#uses=0] - at .str_22.upgrd.203 = external global [35 x i8] ; <[35 x i8]*> [#uses=0] - at .str_23.upgrd.204 = external global [39 x i8] ; <[39 x i8]*> [#uses=0] - at .str_24.upgrd.205 = external global [36 x i8] ; <[36 x i8]*> [#uses=0] - at .str_26.upgrd.206 = external global [35 x i8] ; <[35 x i8]*> [#uses=0] - at .str_27.upgrd.207 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_28.upgrd.208 = external global [36 x i8] ; <[36 x i8]*> [#uses=0] - at .str_30.upgrd.209 = external global [35 x i8] ; <[35 x i8]*> [#uses=0] - at .str_31.upgrd.210 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_32.upgrd.211 = external global [36 x i8] ; <[36 x i8]*> [#uses=0] - at .str_33.upgrd.212 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_34.upgrd.213 = external global [39 x i8] ; <[39 x i8]*> [#uses=0] - at .str_3565 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_36.upgrd.214 = external global [39 x i8] ; <[39 x i8]*> [#uses=0] - at .str_37.upgrd.215 = external global [41 x i8] ; <[41 x i8]*> [#uses=0] - at .str_38.upgrd.216 = external global [41 x i8] ; <[41 x i8]*> [#uses=0] - at .str_39 = external global [39 x i8] ; <[39 x i8]*> [#uses=0] - at .str_40 = external global [39 x i8] ; <[39 x i8]*> [#uses=0] - at .str_41.upgrd.217 = external global [40 x i8] ; <[40 x i8]*> [#uses=0] - at .str_42.upgrd.218 = external global [39 x i8] ; <[39 x i8]*> [#uses=0] - at .str_43.upgrd.219 = external global [41 x i8] ; <[41 x i8]*> [#uses=0] - at .str_44.upgrd.220 = external global [41 x i8] ; <[41 x i8]*> [#uses=0] - at .str_45.upgrd.221 = external global [39 x i8] ; <[39 x i8]*> [#uses=0] - at .str_46.upgrd.222 = external global [35 x i8] ; <[35 x i8]*> [#uses=0] - at .str_47.upgrd.223 = external global [50 x i8] ; <[50 x i8]*> [#uses=0] - at .str_48.upgrd.224 = external global [26 x i8] ; <[26 x i8]*> [#uses=0] - at .str_49.upgrd.225 = external global [31 x i8] ; <[31 x i8]*> [#uses=0] - at .str_50.upgrd.226 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] - at .str_51.upgrd.227 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] - at .str_52.upgrd.228 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] - at .str_53.upgrd.229 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] - -declare i64 @AttacksFrom(i32, i32) - -declare i64 @AttacksTo(i32) - -declare i32 @Attacked(i32, i32) - -declare i64 @Mask(i32) - -declare i32 @PopCnt(i64) - -declare i32 @FirstOne(i64) - -declare i32 @LastOne(i64) - -declare i32 @DrawScore() - -declare i32 @Drawn(i32) - -declare i8* @strchr(i8*, i32) - -declare i32 @strcmp(i8*, i8*) - -declare i32 @strlen(i8*) - -declare i32 @printf(i8*, ...) - -declare void @Edit() - -declare void @llvm.memcpy(i8*, i8*, i32, i32) - -declare i32 @fflush(%struct.__sFILE*) - -declare i32 @Read(i32, i8*) - -declare i32 @ReadParse(i8*, i8**, i8*) - -declare void @DisplayChessBoard(%struct.__sFILE*, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8) - -declare void @SetChessBitBoards(%typedef.SEARCH_POSITION*) - -declare i32 @EnPrise(i32, i32) - -declare i64 @SwapXray(i64, i32, i32) - -declare i32 @Evaluate(i32, i32, i32, i32) - -declare i32 @EvaluateMate() - -declare i32 @EvaluatePawns() - -declare i32 @EvaluatePassedPawns() - -declare i32 @EvaluatePassedPawnRaces(i32) - -declare i32 @Swap(i32, i32, i32) - -declare i32 @EvaluateDevelopment(i32) - -declare i32 @EvaluateDraws() - -declare i32 @HasOpposition(i32, i32, i32) - -declare void @HistoryBest(i32, i32, i32) - -declare void @HistoryRefutation(i32, i32, i32) - -declare i32 @sprintf(i8*, i8*, ...) - -declare void @Initialize(i32) - -declare void @InitializeZeroMasks() - -declare void @InitializeMasks() - -declare void @InitializeRandomHash() - -declare void @InitializeAttackBoards() - -declare void @InitializePawnMasks() - -declare void @InitializePieceMasks() - -declare void @InitializeChessBoard(%typedef.SEARCH_POSITION*) - -declare %struct.__sFILE* @fopen(i8*, i8*) - -define i32 @Option() { -no_exit.53.outer: - %tmp.4747 = shl i32 7, 3 ; [#uses=1] - %tmp.4779 = icmp eq %struct.__sFILE* getelementptr ([0 x %struct.__sFILE]* @__sF, i32 0, i32 1), null ; [#uses=2] - br label %no_exit.53 -no_exit.53: ; preds = %else.166, %else.168, %then.360, %no_exit.53.outer - %file.2.3.3.ph = phi i32 [ 0, %no_exit.53.outer ], [ %inc.551688, %then.360 ], [ %inc.551701, %else.168 ], [ %file.2.3.3.ph, %else.166 ] ; [#uses=2] - %nempty.5.3.ph = phi i32 [ 0, %no_exit.53.outer ], [ %nempty.5.3, %then.360 ], [ %nempty.5.3, %else.168 ], [ %nempty.5.3.ph, %else.166 ] ; [#uses=2] - %indvar2053.ui = phi i32 [ 0, %no_exit.53.outer ], [ 0, %then.360 ], [ 0, %else.168 ], [ %indvar.next2054, %else.166 ] ; [#uses=2] - %indvar2053 = bitcast i32 %indvar2053.ui to i32 ; [#uses=2] - %file.2.3.3 = add i32 %indvar2053, %file.2.3.3.ph ; [#uses=4] - %nempty.5.3 = add i32 %indvar2053, %nempty.5.3.ph ; [#uses=3] - %tmp.4749 = add i32 %file.2.3.3, %tmp.4747 ; [#uses=1] - %tmp.4750 = getelementptr %typedef.CHESS_POSITION* @search, i32 0, i32 22, i32 %tmp.4749 ; [#uses=3] - %tmp.4751 = load i8* %tmp.4750 ; [#uses=1] - %tmp.4752 = icmp eq i8 %tmp.4751, 0 ; [#uses=1] - br i1 %tmp.4752, label %else.166, label %then.357 -then.357: ; preds = %no_exit.53 - %tmp.4755 = icmp eq i32 %nempty.5.3, 0 ; [#uses=1] - br i1 %tmp.4755, label %endif.358, label %then.358 -then.358: ; preds = %then.357 - ret i32 0 -endif.358: ; preds = %then.357 - br i1 %tmp.4779, label %else.168, label %then.360 -then.360: ; preds = %endif.358 - %tmp.4791 = load i8* %tmp.4750 ; [#uses=1] - %tmp.4792 = sext i8 %tmp.4791 to i32 ; [#uses=1] - %tmp.4793 = add i32 %tmp.4792, 7 ; [#uses=1] - %tmp.4794 = getelementptr [15 x i8]* null, i32 0, i32 %tmp.4793 ; [#uses=1] - %tmp.4795 = load i8* %tmp.4794 ; [#uses=1] - %tmp.4796 = sext i8 %tmp.4795 to i32 ; [#uses=1] - %tmp.4781 = call i32 (%struct.__sFILE*, i8*, ...)* @fprintf( %struct.__sFILE* getelementptr ([0 x %struct.__sFILE]* @__sF, i32 0, i32 1), i8* getelementptr ([3 x i8]* @.str_36, i32 0, i32 0), i32 %tmp.4796 ) ; [#uses=0] - %inc.551688 = add i32 %file.2.3.3, 1 ; [#uses=2] - %tmp.47421699 = icmp slt i32 %inc.551688, 8 ; [#uses=1] - br i1 %tmp.47421699, label %no_exit.53, label %loopexit.56 -else.168: ; preds = %endif.358 - %tmp.4799 = call i32 @strlen( i8* getelementptr ([80 x i8]* @initial_position, i32 0, i32 0) ) ; [#uses=2] - %gep.upgrd.230 = zext i32 %tmp.4799 to i64 ; [#uses=1] - %tmp.4802 = getelementptr [80 x i8]* @initial_position, i32 0, i64 %gep.upgrd.230 ; [#uses=1] - %tmp.4811 = load i8* %tmp.4750 ; [#uses=1] - %tmp.4812 = sext i8 %tmp.4811 to i32 ; [#uses=1] - %tmp.4813 = add i32 %tmp.4812, 7 ; [#uses=1] - %tmp.4814 = getelementptr [15 x i8]* null, i32 0, i32 %tmp.4813 ; [#uses=1] - %tmp.4815 = load i8* %tmp.4814 ; [#uses=1] - store i8 %tmp.4815, i8* %tmp.4802 - %tmp.4802.sum = add i32 %tmp.4799, 1 ; [#uses=1] - %gep.upgrd.231 = zext i32 %tmp.4802.sum to i64 ; [#uses=1] - %tmp.4802.end = getelementptr [80 x i8]* @initial_position, i32 0, i64 %gep.upgrd.231 ; [#uses=1] - store i8 0, i8* %tmp.4802.end - %inc.551701 = add i32 %file.2.3.3, 1 ; [#uses=2] - %tmp.47421703 = icmp slt i32 %inc.551701, 8 ; [#uses=1] - br i1 %tmp.47421703, label %no_exit.53, label %loopexit.56 -else.166: ; preds = %no_exit.53 - %inc.55 = add i32 %file.2.3.3, 1 ; [#uses=1] - %tmp.47421705 = icmp slt i32 %inc.55, 8 ; [#uses=1] - %indvar.next2054 = add i32 %indvar2053.ui, 1 ; [#uses=1] - br i1 %tmp.47421705, label %no_exit.53, label %loopexit.56 -loopexit.56: ; preds = %else.166, %else.168, %then.360 - br i1 %tmp.4779, label %else.169, label %then.361 -then.361: ; preds = %loopexit.56 - %tmp.4822 = call i32 @fwrite( i8* getelementptr ([2 x i8]* @.str_654, i32 0, i32 0), i32 1, i32 1, %struct.__sFILE* getelementptr ([0 x %struct.__sFILE]* @__sF, i32 0, i32 1) ) ; [#uses=0] - %dec.101707 = add i32 7, -1 ; [#uses=1] - %tmp.47391709 = icmp sgt i32 %dec.101707, -1 ; [#uses=0] - ret i32 0 -else.169: ; preds = %loopexit.56 - %tmp.4827 = call i32 @strlen( i8* getelementptr ([80 x i8]* @initial_position, i32 0, i32 0) ) ; [#uses=2] - %gep.upgrd.232 = zext i32 %tmp.4827 to i64 ; [#uses=1] - %tmp.4830 = getelementptr [80 x i8]* @initial_position, i32 0, i64 %gep.upgrd.232 ; [#uses=1] - store i8 47, i8* %tmp.4830 - %tmp.4830.sum = add i32 %tmp.4827, 1 ; [#uses=1] - %gep.upgrd.233 = zext i32 %tmp.4830.sum to i64 ; [#uses=1] - %tmp.4830.end = getelementptr [80 x i8]* @initial_position, i32 0, i64 %gep.upgrd.233 ; [#uses=1] - store i8 0, i8* %tmp.4830.end - %dec.10 = add i32 7, -1 ; [#uses=1] - %tmp.47391711 = icmp sgt i32 %dec.10, -1 ; [#uses=0] - ret i32 0 -} - -declare void @InitializeHashTables() - -declare i32 @InitializeFindAttacks(i32, i32, i32) - -declare void @SetBoard(i32, i8**, i32) - -declare i32 @KingPawnSquare(i32, i32, i32, i32) - -declare i64 @Random64() - -declare i32 @Random32() - -declare i8* @strcpy(i8*, i8*) - -declare i32 @InputMove(i8*, i32, i32, i32, i32) - -declare i32 @InputMoveICS(i8*, i32, i32, i32, i32) - -declare i32* @GenerateCaptures(i32, i32, i32*) - -declare i32* @GenerateNonCaptures(i32, i32, i32*) - -declare void @MakeMove(i32, i32, i32) - -declare void @UnMakeMove(i32, i32, i32) - -declare void @Interrupt(i32) - -declare i32 @GetTime(i32) - -declare i8* @DisplayTime(i32) - -declare i8* @OutputMoveICS(i32*) - -declare void @Delay(i32) - -declare i32 @fprintf(%struct.__sFILE*, i8*, ...) - -declare void @SignalInterrupt(i32) - -declare void (i32)* @signal(i32, void (i32)*) - -declare i32 @Iterate(i32, i32, i32) - -declare void @PreEvaluate(i32) - -declare void @RootMoveList(i32) - -declare i8* @OutputMove(i32*, i32, i32) - -declare void @TimeSet(i32) - -declare void @StorePV(i32, i32) - -declare i32 @SearchRoot(i32, i32, i32, i32) - -declare void @Whisper(i32, i32, i32, i32, i32, i32, i8*) - -declare i8* @DisplayEvaluation(i32) - -declare i32 @LookUp(i32, i32, i32, i32*, i32*) - -declare i8* @strstr(i8*, i8*) - -declare i32 @main(i32, i8**) - -declare void @__main() - -declare i32 @atoi(i8*) - -declare void @NewGame(i32) - -declare i32 @Ponder(i32) - -declare i32 @fseek(%struct.__sFILE*, i32, i32) - -declare void @MakeMoveRoot(i32, i32) - -declare i32 @RepetitionDraw(i32) - -declare i8* @Reverse() - -declare i8* @Normal() - -declare void @TimeAdjust(i32, i32) - -declare void @ValidatePosition(i32, i32, i8*) - -declare i32 @ValidMove(i32, i32, i32) - -declare i32* @GenerateCheckEvasions(i32, i32, i32*) - -declare i64 @InterposeSquares(i32, i32, i32) - -declare i32 @PinnedOnKing(i32, i32) - -declare i32 @NextMove(i32, i32) - -declare i32 @NextEvasion(i32, i32) - -declare i32 @NextRootMove(i32) - -declare i32 @TimeCheck(i32) - -declare i32 @strncmp(i8*, i8*, i32) - -declare void @exit(i32) - -declare i32 @OptionMatch(i8*, i8*) - -declare i32 @fclose(%struct.__sFILE*) - -declare i32 @ParseTime(i8*) - -declare i8* @DisplayHHMM(i32) - -declare void @DisplayPieceBoards(i32*, i32*) - -declare i32 @fscanf(%struct.__sFILE*, i8*, ...) - -declare i32 @feof(%struct.__sFILE*) - -declare i8* @fgets(i8*, i32, %struct.__sFILE*) - -declare i32 @remove(i8*) - -declare i32 @__tolower(i32) - -declare i32 @clock() - -declare void @OptionPerft(i32, i32, i32) - -declare void @Phase() - -declare i32 @ReadNextMove(i8*, i32, i32) - -declare i32 @time(i32*) - -declare %struct.tm* @localtime(i32*) - -declare i8* @gets(i8*) - -declare i32 @OutputGood(i8*, i32, i32) - -declare i32 @CheckInput() - -declare void @ClearHashTables() - -declare i32 @Quiesce(i32, i32, i32, i32) - -declare void @SearchTrace(i32, i32, i32, i32, i32, i8*, i32) - -declare i32 @RepetitionCheck(i32, i32) - -declare void @ResignOrDraw(i32, i32) - -declare i32 @Search(i32, i32, i32, i32, i32, i32) - -declare void @StoreRefutation(i32, i32, i32, i32) - -declare void @StoreBest(i32, i32, i32, i32, i32) - -declare void @SearchOutput(i32, i32) - -declare i32 @strspn(i8*, i8*) - -declare i32 @isatty(i32) - -declare i32 @fileno(%struct.__sFILE*) - -declare void @llvm.memset(i8*, i8, i32, i32) - -declare i32 @select(i32, %struct.fd_set*, %struct.fd_set*, %struct.fd_set*, %struct.timeval*) - -declare void @DisplayBitBoard(i64) - -declare i8* @DisplayEvaluationWhisper(i32) - -declare i8* @DisplayTimeWhisper(i32) - -declare void @Display64bitWord(i64) - -declare void @Display2BitBoards(i64, i64) - -declare void @DisplayChessMove(i8*, i32) - -declare void @llvm.memmove(i8*, i8*, i32, i32) - -declare void @ReadClear() - -declare i8* @strtok(i8*, i8*) - -declare i32 @SpecReadRaw() - -declare i32 @read(i32, i8*, i32) - -declare i32* @__error() - -declare i32 @ReadChessMove(%struct.__sFILE*, i32, i32) - -declare i64 @ValidateComputeBishopAttacks(i32) - -declare i64 @ValidateComputeRookAttacks(i32) - -declare i8* @memchr(i8*, i32, i32) - -declare i32 @fwrite(i8*, i32, i32, %struct.__sFILE*) Removed: llvm/trunk/test/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll?rev=95053&view=auto ============================================================================== --- llvm/trunk/test/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll (original) +++ llvm/trunk/test/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll (removed) @@ -1,32 +0,0 @@ -; RUN: opt < %s -loop-unswitch -disable-output - -define void @sort_Eq(i32* %S2) { -entry: - br i1 false, label %list_Length.exit, label %cond_true.i -cond_true.i: ; preds = %entry - ret void -list_Length.exit: ; preds = %entry - br i1 false, label %list_Length.exit9, label %cond_true.i5 -cond_true.i5: ; preds = %list_Length.exit - ret void -list_Length.exit9: ; preds = %list_Length.exit - br i1 false, label %bb78, label %return -bb44: ; preds = %bb78, %cond_next68 - br i1 %tmp49.not, label %bb62, label %bb62.loopexit -bb62.loopexit: ; preds = %bb44 - br label %bb62 -bb62: ; preds = %bb62.loopexit, %bb44 - br i1 false, label %return.loopexit, label %cond_next68 -cond_next68: ; preds = %bb62 - br i1 false, label %return.loopexit, label %bb44 -bb78: ; preds = %list_Length.exit9 - %tmp49.not = icmp eq i32* %S2, null ; [#uses=1] - br label %bb44 -return.loopexit: ; preds = %cond_next68, %bb62 - %retval.0.ph = phi i32 [ 1, %cond_next68 ], [ 0, %bb62 ] ; [#uses=1] - br label %return -return: ; preds = %return.loopexit, %list_Length.exit9 - %retval.0 = phi i32 [ 0, %list_Length.exit9 ], [ %retval.0.ph, %return.loopexit ] ; [#uses=0] - ret void -} - From sabre at nondot.org Mon Feb 1 20:26:55 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 02:26:55 -0000 Subject: [llvm-commits] [llvm] r95055 - in /llvm/trunk: lib/Transforms/Scalar/LoopUnswitch.cpp test/Transforms/LoopUnswitch/crash.ll Message-ID: <201002020226.o122Qt2x021412@zion.cs.uiuc.edu> Author: lattner Date: Mon Feb 1 20:26:54 2010 New Revision: 95055 URL: http://llvm.org/viewvc/llvm-project?rev=95055&view=rev Log: fix a crash in loop unswitch on a loop invariant vector condition. Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp llvm/trunk/test/Transforms/LoopUnswitch/crash.ll Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=95055&r1=95054&r2=95055&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Mon Feb 1 20:26:54 2010 @@ -169,6 +169,10 @@ /// invariant in the loop, or has an invariant piece, return the invariant. /// Otherwise, return null. static Value *FindLIVLoopCondition(Value *Cond, Loop *L, bool &Changed) { + // We can never unswitch on vector conditions. + if (isa(Cond->getType())) + return 0; + // Constants should be folded, not unswitched on! if (isa(Cond)) return 0; @@ -401,7 +405,7 @@ /// UnswitchIfProfitable - We have found that we can unswitch currentLoop when /// LoopCond == Val to simplify the loop. If we decide that this is profitable, /// unswitch the loop, reprocess the pieces, then return true. -bool LoopUnswitch::UnswitchIfProfitable(Value *LoopCond, Constant *Val){ +bool LoopUnswitch::UnswitchIfProfitable(Value *LoopCond, Constant *Val) { initLoopData(); Modified: llvm/trunk/test/Transforms/LoopUnswitch/crash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopUnswitch/crash.ll?rev=95055&r1=95054&r2=95055&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopUnswitch/crash.ll (original) +++ llvm/trunk/test/Transforms/LoopUnswitch/crash.ll Mon Feb 1 20:26:54 2010 @@ -1,6 +1,6 @@ ; RUN: opt < %s -loop-unswitch -disable-output -define void @sort_Eq(i32* %S2) { +define void @test1(i32* %S2) { entry: br i1 false, label %list_Length.exit, label %cond_true.i cond_true.i: ; preds = %entry @@ -30,3 +30,18 @@ ret void } +define void @test2(i32 %x1, i32 %y1, i32 %z1, i32 %r1) nounwind { +entry: + br label %bb.nph + +bb.nph: ; preds = %entry + %and.i13521 = and <4 x i1> undef, undef ; <<4 x i1>> [#uses=1] + br label %for.body + +for.body: ; preds = %for.body, %bb.nph + %or.i = select <4 x i1> %and.i13521, <4 x i32> undef, <4 x i32> undef ; <<4 x i32>> [#uses=0] + br i1 false, label %for.body, label %for.end + +for.end: ; preds = %for.body, %entry + ret void +} From xuzhongxing at gmail.com Mon Feb 1 20:40:56 2010 From: xuzhongxing at gmail.com (Zhongxing Xu) Date: Tue, 02 Feb 2010 02:40:56 -0000 Subject: [llvm-commits] [llvm] r95056 - /llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Message-ID: <201002020240.o122euYg021957@zion.cs.uiuc.edu> Author: zhongxingxu Date: Mon Feb 1 20:40:56 2010 New Revision: 95056 URL: http://llvm.org/viewvc/llvm-project?rev=95056&view=rev Log: Fix a bunch of errors in the old logic. Modified: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Modified: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h?rev=95056&r1=95055&r2=95056&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h (original) +++ llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Mon Feb 1 20:40:56 2010 @@ -93,16 +93,15 @@ private: TreeTy *Add_internal(value_type_ref V, TreeTy *T) { + key_type_ref K = ImutInfo::KeyOfValue(V); + T = RemoveAllOverlaps(T, K); if (isEmpty(T)) return CreateNode(NULL, V, NULL); assert(!T->isMutable()); - key_type_ref K = ImutInfo::KeyOfValue(V); key_type_ref KCurrent = ImutInfo::KeyOfValue(Value(T)); - T = RemoveAllOverlaps(T, K); - if (ImutInfo::isLess(K, KCurrent)) return Balance(Add_internal(V, Left(T)), Value(T), Right(T)); else @@ -113,14 +112,19 @@ TreeTy *RemoveAllOverlaps(TreeTy *T, key_type_ref K) { TreeTy *OldTree, *NewTree; NewTree = T; + do { OldTree = NewTree; NewTree = RemoveOverlap(OldTree, K); } while (NewTree != OldTree); + + return NewTree; } // Remove one overlap from T. TreeTy *RemoveOverlap(TreeTy *T, key_type_ref K) { + if (!T) + return NULL; Interval CurrentK = ImutInfo::KeyOfValue(Value(T)); // If current key does not overlap the inserted key. @@ -131,27 +135,28 @@ // Current key overlaps with the inserted key. // Remove the current key. + TreeTy *OldNode = T; T = Remove_internal(CurrentK, T); // Add back the unoverlapped part of the current key. if (CurrentK.getStart() < K.getStart()) { if (CurrentK.getEnd() <= K.getEnd()) { Interval NewK(CurrentK.getStart(), K.getStart()-1); return Add_internal(std::make_pair(NewK, - ImutInfo::DataOfValue(Value(T))), T); + ImutInfo::DataOfValue(Value(OldNode))), T); } else { Interval NewK1(CurrentK.getStart(), K.getStart()-1); T = Add_internal(std::make_pair(NewK1, - ImutInfo::DataOfValue(Value(T))), T); + ImutInfo::DataOfValue(Value(OldNode))), T); Interval NewK2(K.getEnd()+1, CurrentK.getEnd()); return Add_internal(std::make_pair(NewK2, - ImutInfo::DataOfValue(Value(T))), T); + ImutInfo::DataOfValue(Value(OldNode))), T); } } else { if (CurrentK.getEnd() > K.getEnd()) { Interval NewK(K.getEnd()+1, CurrentK.getEnd()); return Add_internal(std::make_pair(NewK, - ImutInfo::DataOfValue(Value(T))), T); + ImutInfo::DataOfValue(Value(OldNode))), T); } } } From sabre at nondot.org Mon Feb 1 20:43:51 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 02:43:51 -0000 Subject: [llvm-commits] [llvm] r95058 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineAndOrXor.cpp test/Transforms/InstCombine/or.ll Message-ID: <201002020243.o122hpha022076@zion.cs.uiuc.edu> Author: lattner Date: Mon Feb 1 20:43:51 2010 New Revision: 95058 URL: http://llvm.org/viewvc/llvm-project?rev=95058&view=rev Log: don't turn (A & (C0?-1:0)) | (B & ~(C0?-1:0)) -> C0 ? A : B for vectors. Codegen is generating awful code or segfaulting in various cases (e.g. PR6204). Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp llvm/trunk/test/Transforms/InstCombine/or.ll Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp?rev=95058&r1=95057&r2=95058&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp Mon Feb 1 20:43:51 2010 @@ -1591,15 +1591,19 @@ } } - // (A & (C0?-1:0)) | (B & ~(C0?-1:0)) -> C0 ? A : B, and commuted variants - if (Instruction *Match = MatchSelectFromAndOr(A, B, C, D)) - return Match; - if (Instruction *Match = MatchSelectFromAndOr(B, A, D, C)) - return Match; - if (Instruction *Match = MatchSelectFromAndOr(C, B, A, D)) - return Match; - if (Instruction *Match = MatchSelectFromAndOr(D, A, B, C)) - return Match; + // (A & (C0?-1:0)) | (B & ~(C0?-1:0)) -> C0 ? A : B, and commuted variants. + // Don't do this for vector select idioms, the code generator doesn't handle + // them well yet. + if (!isa(I.getType())) { + if (Instruction *Match = MatchSelectFromAndOr(A, B, C, D)) + return Match; + if (Instruction *Match = MatchSelectFromAndOr(B, A, D, C)) + return Match; + if (Instruction *Match = MatchSelectFromAndOr(C, B, A, D)) + return Match; + if (Instruction *Match = MatchSelectFromAndOr(D, A, B, C)) + return Match; + } // ((A&~B)|(~A&B)) -> A^B if ((match(C, m_Not(m_Specific(D))) && Modified: llvm/trunk/test/Transforms/InstCombine/or.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/or.ll?rev=95058&r1=95057&r2=95058&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/or.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/or.ll Mon Feb 1 20:43:51 2010 @@ -336,3 +336,17 @@ ; CHECK-NEXT: %F = and i64 %bitfield, 4294941946 ; CHECK-NEXT: ret i64 %F } + +define <4 x i32> @test32(<4 x i1> %and.i1352, <4 x i32> %vecinit6.i176, <4 x i32> %vecinit6.i191) { + %and.i135 = sext <4 x i1> %and.i1352 to <4 x i32> ; <<4 x i32>> [#uses=2] + %and.i129 = and <4 x i32> %vecinit6.i176, %and.i135 ; <<4 x i32>> [#uses=1] + %neg.i = xor <4 x i32> %and.i135, ; <<4 x i32>> [#uses=1] + %and.i = and <4 x i32> %vecinit6.i191, %neg.i ; <<4 x i32>> [#uses=1] + %or.i = or <4 x i32> %and.i, %and.i129 ; <<4 x i32>> [#uses=1] + ret <4 x i32> %or.i +; Don't turn this into a vector select until codegen matures to handle them +; better. +; CHECK: @test32 +; CHECK: or <4 x i32> %and.i, %and.i129 +} + From dpatel at apple.com Mon Feb 1 21:37:04 2010 From: dpatel at apple.com (Devang Patel) Date: Tue, 02 Feb 2010 03:37:04 -0000 Subject: [llvm-commits] [llvm] r95062 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Message-ID: <201002020337.o123b46w024185@zion.cs.uiuc.edu> Author: dpatel Date: Mon Feb 1 21:37:03 2010 New Revision: 95062 URL: http://llvm.org/viewvc/llvm-project?rev=95062&view=rev Log: NULL terminate name in pubtypes sections. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=95062&r1=95061&r2=95062&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Feb 1 21:37:03 2010 @@ -2800,7 +2800,7 @@ Asm->EmitInt32(Entity->getOffset()); EOL("DIE offset"); if (Asm->VerboseAsm) Asm->OutStreamer.AddComment("External Name"); - Asm->OutStreamer.EmitBytes(StringRef(Name, strlen(Name)), 0); + Asm->OutStreamer.EmitBytes(StringRef(Name, GI->getKeyLength()+1), 0); } Asm->EmitInt32(0); EOL("End Mark"); From dpatel at apple.com Mon Feb 1 21:47:28 2010 From: dpatel at apple.com (Devang Patel) Date: Tue, 02 Feb 2010 03:47:28 -0000 Subject: [llvm-commits] [llvm] r95064 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Message-ID: <201002020347.o123lSUR024489@zion.cs.uiuc.edu> Author: dpatel Date: Mon Feb 1 21:47:27 2010 New Revision: 95064 URL: http://llvm.org/viewvc/llvm-project?rev=95064&view=rev Log: Apparently gdb is not amused by empty lines in pubtypes section. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=95064&r1=95063&r2=95064&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Feb 1 21:47:27 2010 @@ -2781,7 +2781,8 @@ EmitLabel("pubtypes_begin", ModuleCU->getID()); - Asm->EmitInt16(dwarf::DWARF_VERSION); EOL("DWARF Version"); + if (Asm->VerboseAsm) Asm->OutStreamer.AddComment("DWARF Version"); + Asm->EmitInt16(dwarf::DWARF_VERSION); EmitSectionOffset("info_begin", "section_info", ModuleCU->getID(), 0, true, false); @@ -2797,7 +2798,8 @@ const char *Name = GI->getKeyData(); DIE * Entity = GI->second; - Asm->EmitInt32(Entity->getOffset()); EOL("DIE offset"); + if (Asm->VerboseAsm) Asm->OutStreamer.AddComment("DIE offset"); + Asm->EmitInt32(Entity->getOffset()); if (Asm->VerboseAsm) Asm->OutStreamer.AddComment("External Name"); Asm->OutStreamer.EmitBytes(StringRef(Name, GI->getKeyLength()+1), 0); From clattner at apple.com Mon Feb 1 22:33:06 2010 From: clattner at apple.com (Chris Lattner) Date: Mon, 1 Feb 2010 20:33:06 -0800 Subject: [llvm-commits] [llvm] r95046 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp In-Reply-To: References: <201002020144.o121i3iH019659@zion.cs.uiuc.edu> <2029AE14-22F9-4FBF-AC9E-0BE50E2A5DB5@apple.com> Message-ID: <9CF7F537-2884-413C-A546-E1D0AF3ECBBE@apple.com> >>> URL: http://llvm.org/viewvc/llvm-project?rev=95046&view=rev >>> Log: >>> LangRef.html says that inttoptr and ptrtoint always use zero-extension >>> when the cast is extending. >> >> Just to verify, does codegen agree? > > Yes. Thanks! From jyasskin at google.com Mon Feb 1 23:15:12 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Mon, 1 Feb 2010 21:15:12 -0800 Subject: [llvm-commits] [llvm] r94535 [1/3] - in /llvm/trunk: configure include/llvm/Config/config.h.in In-Reply-To: <4B5EAF5F.6020003@gmail.com> References: <201001260850.o0Q8opdw005294@zion.cs.uiuc.edu> <4B5EAF5F.6020003@gmail.com> Message-ID: On Tue, Jan 26, 2010 at 1:01 AM, T?r?k Edwin wrote: > On 01/26/2010 10:50 AM, Torok Edwin wrote: >> Author: edwin >> Date: Tue Jan 26 02:50:50 2010 >> New Revision: 94535 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=94535&view=rev >> Log: >> Regenerate configure. >> >> With the previous cleanup to configure.ac, configure is now only 393k, instead of 1.1M! >> > > configure can be regenerated with both autoconf 2.60 and 2.65 now. Could you update autoconf/AutoRegen.sh to reflect this? Also, do we want to allow two versions of autoconf, given that it produces rather large diffs in configure? From xuzhongxing at gmail.com Mon Feb 1 23:23:25 2010 From: xuzhongxing at gmail.com (Zhongxing Xu) Date: Tue, 02 Feb 2010 05:23:25 -0000 Subject: [llvm-commits] [llvm] r95070 - /llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Message-ID: <201002020523.o125NPio028208@zion.cs.uiuc.edu> Author: zhongxingxu Date: Mon Feb 1 23:23:23 2010 New Revision: 95070 URL: http://llvm.org/viewvc/llvm-project?rev=95070&view=rev Log: Add a lookup method to the IntervalMap. The difference from the original lookup is that if the lookup key is contained in the key, we return the data. Modified: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Modified: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h?rev=95070&r1=95069&r2=95070&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h (original) +++ llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Mon Feb 1 23:23:23 2010 @@ -65,6 +65,13 @@ } } + static bool isContainedIn(key_type_ref K, key_type_ref L) { + if (K.getStart() >= L.getStart() && K.getEnd() <= L.getEnd()) + return true; + else + return false; + } + static void Profile(FoldingSetNodeID &ID, value_type_ref V) { ID.AddInteger(V.first.getStart()); ID.AddInteger(V.first.getEnd()); @@ -85,12 +92,26 @@ typedef typename ImutInfo::data_type_ref data_type_ref; public: - TreeTy *Add(TreeTy* T, value_type_ref V) { + TreeTy *Add(TreeTy *T, value_type_ref V) { T = Add_internal(V,T); MarkImmutable(T); return T; } + TreeTy *Find(TreeTy *T, key_type_ref K) { + if (!T) + return NULL; + + key_type_ref CurrentKey = ImutInfo::KeyOfValue(Value(T)); + + if (ImutInfo::isContainedIn(K, CurrentKey)) + return T; + else if (ImutInfo::isLess(K, CurrentKey)) + return Find(Left(T), K); + else + return Find(Right(T), K); + } + private: TreeTy *Add_internal(value_type_ref V, TreeTy *T) { key_type_ref K = ImutInfo::KeyOfValue(V); @@ -198,7 +219,21 @@ TreeTy *T = F.Remove(Old.Root, K); return ImmutableIntervalMap(F.GetCanonicalTree(T)); } + + data_type *Lookup(ImmutableIntervalMap M, key_type_ref K) { + TreeTy *T = F.Find(M.getRoot(), K); + if (T) + return &T->getValue().second; + else + return 0; + } + }; + +private: + // For ImmutableIntervalMap, the lookup operation has to be done by the + // factory. + data_type* lookup(key_type_ref K) const; }; } // end namespace llvm From clattner at apple.com Mon Feb 1 23:36:32 2010 From: clattner at apple.com (Chris Lattner) Date: Mon, 1 Feb 2010 21:36:32 -0800 Subject: [llvm-commits] [llvm] r94937 - in /llvm/trunk: lib/Transforms/Scalar/TailRecursionElimination.cpp test/Transforms/TailCallElim/no-return-calls.ll In-Reply-To: <201001310059.o0V0xWep021750@zion.cs.uiuc.edu> References: <201001310059.o0V0xWep021750@zion.cs.uiuc.edu> Message-ID: <5F10954E-92C5-4B8F-BDBC-ACAC5ADD3538@apple.com> On Jan 30, 2010, at 4:59 PM, Evan Cheng wrote: > Author: evancheng > Date: Sat Jan 30 18:59:31 2010 > New Revision: 94937 > > URL: http://llvm.org/viewvc/llvm-project?rev=94937&view=rev > Log: > Do not mark no-return calls tail calls. It'll screw up special calls like longjmp and it doesn't make much sense for performance reason. If my logic is faulty, please let me know. Hey Evan, This isn't the right patch. The 'tail' flag means that the callee doesn't access the caller's stack, not that it satisfies all the arbitrary requirements that codegen has for tailcalls. If codegen doesn't handling this form of tailcall, it should be the one that avoids transforming it. -Chris > > Added: > llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll > Modified: > llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp > > Modified: llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp?rev=94937&r1=94936&r2=94937&view=diff > > ============================================================================== > --- llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp (original) > +++ llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp Sat Jan 30 18:59:31 2010 > @@ -184,10 +184,11 @@ > if (!FunctionContainsEscapingAllocas) > for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) > for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) > - if (CallInst *CI = dyn_cast(I)) { > - CI->setTailCall(); > - MadeChange = true; > - } > + if (CallInst *CI = dyn_cast(I)) > + if (!CI->doesNotReturn()) { > + CI->setTailCall(); > + MadeChange = true; > + } > > return MadeChange; > } > > Added: llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll?rev=94937&view=auto > > ============================================================================== > --- llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll (added) > +++ llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll Sat Jan 30 18:59:31 2010 > @@ -0,0 +1,12 @@ > +; RUN: opt < %s -tailcallelim -S | FileCheck %s > + > +define void @t() nounwind ssp { > +entry: > +; CHECK: entry: > +; CHECK: %0 = call i32 @foo() > +; CHECK: ret void > + %0 = call i32 @foo() nounwind noreturn > + ret void > +} > + > +declare i32 @foo() > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From xuzhongxing at gmail.com Tue Feb 2 00:22:09 2010 From: xuzhongxing at gmail.com (Zhongxing Xu) Date: Tue, 02 Feb 2010 06:22:09 -0000 Subject: [llvm-commits] [llvm] r95073 - /llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Message-ID: <201002020622.o126M96s030149@zion.cs.uiuc.edu> Author: zhongxingxu Date: Tue Feb 2 00:22:08 2010 New Revision: 95073 URL: http://llvm.org/viewvc/llvm-project?rev=95073&view=rev Log: More logic correction: RemoveOverlap should always create new tree. Add a parameter to record whether changes actually happened. Modified: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Modified: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h?rev=95073&r1=95072&r2=95073&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h (original) +++ llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Tue Feb 2 00:22:08 2010 @@ -131,31 +131,31 @@ // Remove all overlaps from T. TreeTy *RemoveAllOverlaps(TreeTy *T, key_type_ref K) { - TreeTy *OldTree, *NewTree; - NewTree = T; - + bool Changed; do { - OldTree = NewTree; - NewTree = RemoveOverlap(OldTree, K); - } while (NewTree != OldTree); + Changed = false; + T = RemoveOverlap(T, K, Changed); + MarkImmutable(T); + } while (Changed); - return NewTree; + return T; } // Remove one overlap from T. - TreeTy *RemoveOverlap(TreeTy *T, key_type_ref K) { + TreeTy *RemoveOverlap(TreeTy *T, key_type_ref K, bool &Changed) { if (!T) return NULL; Interval CurrentK = ImutInfo::KeyOfValue(Value(T)); // If current key does not overlap the inserted key. if (CurrentK.getStart() > K.getEnd()) - return RemoveOverlap(Left(T), K); + return Balance(RemoveOverlap(Left(T), K, Changed), Value(T), Right(T)); else if (CurrentK.getEnd() < K.getStart()) - return RemoveOverlap(Right(T), K); + return Balance(Left(T), Value(T), RemoveOverlap(Right(T), K, Changed)); // Current key overlaps with the inserted key. // Remove the current key. + Changed = true; TreeTy *OldNode = T; T = Remove_internal(CurrentK, T); // Add back the unoverlapped part of the current key. From xuzhongxing at gmail.com Tue Feb 2 00:33:32 2010 From: xuzhongxing at gmail.com (Zhongxing Xu) Date: Tue, 02 Feb 2010 06:33:32 -0000 Subject: [llvm-commits] [llvm] r95074 - /llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Message-ID: <201002020633.o126XWJC030597@zion.cs.uiuc.edu> Author: zhongxingxu Date: Tue Feb 2 00:33:32 2010 New Revision: 95074 URL: http://llvm.org/viewvc/llvm-project?rev=95074&view=rev Log: simplify code. Modified: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Modified: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h?rev=95074&r1=95073&r2=95074&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h (original) +++ llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Tue Feb 2 00:33:32 2010 @@ -156,28 +156,25 @@ // Current key overlaps with the inserted key. // Remove the current key. Changed = true; - TreeTy *OldNode = T; + data_type_ref OldData = ImutInfo::DataOfValue(Value(T)); T = Remove_internal(CurrentK, T); // Add back the unoverlapped part of the current key. if (CurrentK.getStart() < K.getStart()) { if (CurrentK.getEnd() <= K.getEnd()) { Interval NewK(CurrentK.getStart(), K.getStart()-1); - return Add_internal(std::make_pair(NewK, - ImutInfo::DataOfValue(Value(OldNode))), T); + return Add_internal(std::make_pair(NewK, OldData), T); } else { Interval NewK1(CurrentK.getStart(), K.getStart()-1); - T = Add_internal(std::make_pair(NewK1, - ImutInfo::DataOfValue(Value(OldNode))), T); + T = Add_internal(std::make_pair(NewK1, OldData), T); + Interval NewK2(K.getEnd()+1, CurrentK.getEnd()); - return Add_internal(std::make_pair(NewK2, - ImutInfo::DataOfValue(Value(OldNode))), T); + return Add_internal(std::make_pair(NewK2, OldData), T); } } else { if (CurrentK.getEnd() > K.getEnd()) { Interval NewK(K.getEnd()+1, CurrentK.getEnd()); - return Add_internal(std::make_pair(NewK, - ImutInfo::DataOfValue(Value(OldNode))), T); + return Add_internal(std::make_pair(NewK, OldData), T); } } } From xuzhongxing at gmail.com Tue Feb 2 01:05:31 2010 From: xuzhongxing at gmail.com (Zhongxing Xu) Date: Tue, 02 Feb 2010 07:05:31 -0000 Subject: [llvm-commits] [llvm] r95075 - /llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Message-ID: <201002020705.o1275VWk031773@zion.cs.uiuc.edu> Author: zhongxingxu Date: Tue Feb 2 01:05:31 2010 New Revision: 95075 URL: http://llvm.org/viewvc/llvm-project?rev=95075&view=rev Log: Return value on every path. Modified: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Modified: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h?rev=95075&r1=95074&r2=95075&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h (original) +++ llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Tue Feb 2 01:05:31 2010 @@ -167,7 +167,6 @@ Interval NewK1(CurrentK.getStart(), K.getStart()-1); T = Add_internal(std::make_pair(NewK1, OldData), T); - Interval NewK2(K.getEnd()+1, CurrentK.getEnd()); return Add_internal(std::make_pair(NewK2, OldData), T); } @@ -175,7 +174,8 @@ if (CurrentK.getEnd() > K.getEnd()) { Interval NewK(K.getEnd()+1, CurrentK.getEnd()); return Add_internal(std::make_pair(NewK, OldData), T); - } + } else + return T; } } }; @@ -224,7 +224,6 @@ else return 0; } - }; private: From edwintorok at gmail.com Tue Feb 2 02:42:31 2010 From: edwintorok at gmail.com (=?ISO-8859-1?Q?T=F6r=F6k_Edwin?=) Date: Tue, 02 Feb 2010 10:42:31 +0200 Subject: [llvm-commits] [llvm] r94535 [1/3] - in /llvm/trunk: configure include/llvm/Config/config.h.in In-Reply-To: References: <201001260850.o0Q8opdw005294@zion.cs.uiuc.edu> <4B5EAF5F.6020003@gmail.com> Message-ID: <4B67E577.7040007@gmail.com> On 02/02/2010 07:15 AM, Jeffrey Yasskin wrote: > On Tue, Jan 26, 2010 at 1:01 AM, T?r?k Edwin wrote: > >> On 01/26/2010 10:50 AM, Torok Edwin wrote: >> >>> Author: edwin >>> Date: Tue Jan 26 02:50:50 2010 >>> New Revision: 94535 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=94535&view=rev >>> Log: >>> Regenerate configure. >>> >>> With the previous cleanup to configure.ac, configure is now only 393k, instead of 1.1M! >>> >>> >> configure can be regenerated with both autoconf 2.60 and 2.65 now. >> > > Could you update autoconf/AutoRegen.sh to reflect this? > > Also, do we want to allow two versions of autoconf, given that it > produces rather large diffs in configure? > I think it is a matter of what autoconf people have installed: I don't have, and can't install 2.60 in Debian sid (it only has 2.13, 2.59, 2.61, 2.64, 2.65). If we'd make autoconf 2.65 a requirement then people who were using/regenerating configure with autoconf 2.60 wouldn't have 2.65 installed. Thus I think we should allow both autoconf versions to be used (locally at least). As for what version is used when comitting to the repository, I agree that it should be the same to reduce diffs, but I'd rather leave it to someone else to decide which version that should be. Best regards, --Edwin From baldrick at free.fr Tue Feb 2 04:05:34 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 02 Feb 2010 11:05:34 +0100 Subject: [llvm-commits] [llvm] r94987 - in /llvm/trunk: include/llvm/Analysis/ScalarEvolution.h include/llvm/Analysis/ScalarEvolutionExpressions.h lib/Analysis/ConstantFolding.cpp lib/Analysis/ScalarEvolution.cpp lib/Analysis/ScalarEvolutionExpander.cpp lib/VMCore/ConstantFold.cpp test/Other/constant-fold-gep.ll test/Transforms/InstCombine/getelementptr.ll In-Reply-To: <201002011827.o11IRduW001062@zion.cs.uiuc.edu> References: <201002011827.o11IRduW001062@zion.cs.uiuc.edu> Message-ID: <4B67F8EE.8060309@free.fr> Hi Dan, > + /// getSizeOfExpr - Return an expression for alignof on the given type. > + /// > + const SCEV *getAlignOfExpr(const Type *AllocTy); > + > + /// getSizeOfExpr - Return an expression for offsetof on the given field. > + /// > + const SCEV *getOffsetOfExpr(const StructType *STy, unsigned FieldNo); > + > + /// getSizeOfExpr - Return an expression for offsetof on the given field. > + /// > + const SCEV *getOffsetOfExpr(const Type *CTy, Constant *FieldNo); > + > /// getNegativeSCEV - Return the SCEV object corresponding to -V. > /// > const SCEV *getNegativeSCEV(const SCEV *V); the method names in the comments do not match the real method names. > + if (!Any) return 0; > + > + Constant *C = > + ConstantExpr::getGetElementPtr(Ops[0], &NewIdxs[0], NewIdxs.size()); > + if (ConstantExpr *CE = dyn_cast(C)) > + if (Constant *Folded = ConstantFoldConstantExpression(CE, TD)) > + C = Folded; You could just return Folded here. > + return C; > +} Ciao, Duncan. From baldrick at free.fr Tue Feb 2 04:33:07 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 02 Feb 2010 10:33:07 -0000 Subject: [llvm-commits] [dragonegg] r95080 - in /dragonegg/trunk: llvm-convert.cpp llvm-internal.h Message-ID: <201002021033.o12AX8oD022486@zion.cs.uiuc.edu> Author: baldrick Date: Tue Feb 2 04:33:07 2010 New Revision: 95080 URL: http://llvm.org/viewvc/llvm-project?rev=95080&view=rev Log: More deBinOpfuscation: handle TRUNC_MOD_EXPR directly. Modified: dragonegg/trunk/llvm-convert.cpp dragonegg/trunk/llvm-internal.h Modified: dragonegg/trunk/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=95080&r1=95079&r2=95080&view=diff ============================================================================== --- dragonegg/trunk/llvm-convert.cpp (original) +++ dragonegg/trunk/llvm-convert.cpp Tue Feb 2 04:33:07 2010 @@ -6304,20 +6304,20 @@ Value *TreeToLLVM::EmitReg_FLOOR_MOD_EXPR(tree type, tree op0, tree op1) { // Notation: FLOOR_MOD_EXPR <-> Mod, TRUNC_MOD_EXPR <-> Rem. + Value *LHS = EmitRegister(op0); + Value *RHS = EmitRegister(op1); + // We express Mod in terms of Rem as follows: if RHS exactly divides LHS, // or the values of LHS and RHS have the same sign, then Mod equals Rem. // Otherwise Mod equals Rem + RHS. This means that LHS Mod RHS traps iff // LHS Rem RHS traps. if (TYPE_UNSIGNED(type)) // LHS and RHS values must have the same sign if their type is unsigned. - return EmitReg_BinOp(type, FLOOR_MOD_EXPR, op0, op1, Instruction::URem); + return Builder.CreateURem(LHS, RHS); const Type *Ty = GetRegType(type); Constant *Zero = ConstantInt::get(Ty, 0); - Value *LHS = EmitRegister(op0); - Value *RHS = EmitRegister(op1); - // The two possible values for Mod. Value *Rem = Builder.CreateSRem(LHS, RHS, "rem"); Value *RemPlusRHS = Builder.CreateAdd(Rem, RHS); @@ -6596,6 +6596,13 @@ } } +Value *TreeToLLVM::EmitReg_TRUNC_MOD_EXPR(tree op0, tree op1) { + Value *LHS = EmitRegister(op0); + Value *RHS = EmitRegister(op1); + return TYPE_UNSIGNED(TREE_TYPE(op0)) ? + Builder.CreateURem(LHS, RHS) : Builder.CreateSRem(LHS, RHS); +} + //===----------------------------------------------------------------------===// // ... Exception Handling ... @@ -7349,9 +7356,7 @@ case TRUNC_DIV_EXPR: RHS = EmitReg_TRUNC_DIV_EXPR(rhs1, rhs2, /*isExact*/false); break; case TRUNC_MOD_EXPR: - RHS = EmitReg_BinOp(type, code, rhs1, rhs2, TYPE_UNSIGNED(type) ? - Instruction::URem : Instruction::SRem); - break; + RHS = EmitReg_TRUNC_MOD_EXPR(rhs1, rhs2); break; case TRUTH_AND_EXPR: RHS = EmitReg_TruthOp(type, rhs1, rhs2, Instruction::And); break; case TRUTH_OR_EXPR: Modified: dragonegg/trunk/llvm-internal.h URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-internal.h?rev=95080&r1=95079&r2=95080&view=diff ============================================================================== --- dragonegg/trunk/llvm-internal.h (original) +++ dragonegg/trunk/llvm-internal.h Tue Feb 2 04:33:07 2010 @@ -665,7 +665,7 @@ Value *EmitReg_ROUND_DIV_EXPR(tree_node *type, tree_node *op0, tree_node *op1); Value *EmitReg_TRUNC_DIV_EXPR(tree_node *op0, tree_node *op1, bool isExact); - + Value *EmitReg_TRUNC_MOD_EXPR(tree_node *op0, tree_node *op1); Value *EmitLoadOfLValue(tree_node *exp); Value *EmitOBJ_TYPE_REF(tree_node *exp); From baldrick at free.fr Tue Feb 2 05:25:08 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 02 Feb 2010 11:25:08 -0000 Subject: [llvm-commits] [dragonegg] r95084 - in /dragonegg/trunk: llvm-convert.cpp llvm-internal.h Message-ID: <201002021125.o12BP8Zu024748@zion.cs.uiuc.edu> Author: baldrick Date: Tue Feb 2 05:25:08 2010 New Revision: 95084 URL: http://llvm.org/viewvc/llvm-project?rev=95084&view=rev Log: Logical operations can no longer be performed on floats. Handle the last remaining users of EmitReg_BinOp directly, and remove this method. Modified: dragonegg/trunk/llvm-convert.cpp dragonegg/trunk/llvm-internal.h Modified: dragonegg/trunk/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=95084&r1=95083&r2=95084&view=diff ============================================================================== --- dragonegg/trunk/llvm-convert.cpp (original) +++ dragonegg/trunk/llvm-convert.cpp Tue Feb 2 05:25:08 2010 @@ -2786,19 +2786,6 @@ return 0; } -/// getSuitableBitCastIntType - Given Ty is a floating point type or a vector -/// type with floating point elements, return an integer type to bitcast to. -/// e.g. 4 x float -> 4 x i32 -static const Type *getSuitableBitCastIntType(const Type *Ty) { - if (const VectorType *VTy = dyn_cast(Ty)) { - unsigned NumElements = VTy->getNumElements(); - const Type *EltTy = VTy->getElementType(); - return VectorType::get( - IntegerType::get(Context, EltTy->getPrimitiveSizeInBits()), NumElements); - } - return IntegerType::get(Context, Ty->getPrimitiveSizeInBits()); -} - /// EmitEXC_PTR_EXPR - Handle EXC_PTR_EXPR. Value *TreeToLLVM::EmitEXC_PTR_EXPR(tree exp) { abort(); @@ -6063,45 +6050,6 @@ return Builder.CreateICmp(pred, LHS, RHS); } -// Binary expressions. -/// EmitReg_BinOp - 'exp' is a binary operator. -Value *TreeToLLVM::EmitReg_BinOp(tree type, tree_code code, tree op0, tree op1, - unsigned Opc) { - assert(TREE_CODE(type) != COMPLEX_TYPE && "Unexpected complex binop!"); - - Value *LHS = EmitRegister(op0); - Value *RHS = EmitRegister(op1); - - // GCC has no problem with things like "xor uint X, int 17", and X-Y, where - // X and Y are pointer types, but the result is an integer. As such, convert - // everything to the result type. - bool LHSIsSigned = !TYPE_UNSIGNED(TREE_TYPE(op0)); - bool RHSIsSigned = !TYPE_UNSIGNED(TREE_TYPE(op1)); - bool TyIsSigned = !TYPE_UNSIGNED(type); - - const Type *Ty = GetRegType(type); - LHS = CastToAnyType(LHS, LHSIsSigned, Ty, TyIsSigned); - RHS = CastToAnyType(RHS, RHSIsSigned, Ty, TyIsSigned); - - // If it's And, Or, or Xor, make sure the operands are casted to the right - // integer types first. - bool isLogicalOp = Opc == Instruction::And || Opc == Instruction::Or || - Opc == Instruction::Xor; - const Type *ResTy = Ty; - if (isLogicalOp && - (Ty->isFloatingPoint() || - (isa(Ty) && - cast(Ty)->getElementType()->isFloatingPoint()))) { - Ty = getSuitableBitCastIntType(Ty); - LHS = UselesslyTypeConvert(LHS, Ty); - RHS = UselesslyTypeConvert(RHS, Ty); - } - - Value *V = Builder.CreateBinOp((Instruction::BinaryOps)Opc, LHS, RHS); - - return UselesslyTypeConvert(V, ResTy); -} - Value *TreeToLLVM::EmitReg_MinMaxExpr(tree type, tree op0, tree op1, unsigned UIPred, unsigned SIPred, unsigned FPPred, bool isMax) { @@ -6248,6 +6196,18 @@ return Builder.CreateAdd(CDiv, Offset, "cdiv"); } +Value *TreeToLLVM::EmitReg_BIT_AND_EXPR(tree op0, tree op1) { + return Builder.CreateAnd(EmitRegister(op0), EmitRegister(op1)); +} + +Value *TreeToLLVM::EmitReg_BIT_IOR_EXPR(tree op0, tree op1) { + return Builder.CreateOr(EmitRegister(op0), EmitRegister(op1)); +} + +Value *TreeToLLVM::EmitReg_BIT_XOR_EXPR(tree op0, tree op1) { + return Builder.CreateXor(EmitRegister(op0), EmitRegister(op1)); +} + Value *TreeToLLVM::EmitReg_COMPLEX_EXPR(tree op0, tree op1) { return CreateComplex(EmitRegister(op0), EmitRegister(op1), TREE_TYPE(op1)); } @@ -7304,11 +7264,11 @@ // Binary expressions. case BIT_AND_EXPR: - RHS = EmitReg_BinOp(type, code, rhs1, rhs2, Instruction::And); break; + RHS = EmitReg_BIT_AND_EXPR(rhs1, rhs2); break; case BIT_IOR_EXPR: - RHS = EmitReg_BinOp(type, code, rhs1, rhs2, Instruction::Or); break; + RHS = EmitReg_BIT_IOR_EXPR(rhs1, rhs2); break; case BIT_XOR_EXPR: - RHS = EmitReg_BinOp(type, code, rhs1, rhs2, Instruction::Xor); break; + RHS = EmitReg_BIT_XOR_EXPR(rhs1, rhs2); break; case CEIL_DIV_EXPR: RHS = EmitReg_CEIL_DIV_EXPR(type, rhs1, rhs2); break; case COMPLEX_EXPR: Modified: dragonegg/trunk/llvm-internal.h URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-internal.h?rev=95084&r1=95083&r2=95084&view=diff ============================================================================== --- dragonegg/trunk/llvm-internal.h (original) +++ dragonegg/trunk/llvm-internal.h Tue Feb 2 05:25:08 2010 @@ -640,8 +640,6 @@ Value *EmitCompare(tree_node *lhs, tree_node *rhs, tree_code code); // Binary expressions. - Value *EmitReg_BinOp(tree_node *type, tree_code code, tree_node *op0, - tree_node *op1, unsigned Opc); Value *EmitReg_MinMaxExpr(tree_node *type, tree_node *op0, tree_node* op1, unsigned UIPred, unsigned SIPred, unsigned Opc, bool isMax); @@ -650,6 +648,9 @@ Value *EmitReg_ShiftOp(tree_node *op0, tree_node* op1, unsigned Opc); Value *EmitReg_TruthOp(tree_node *type, tree_node *op0, tree_node *op1, unsigned Opc); + Value *EmitReg_BIT_AND_EXPR(tree_node *op0, tree_node *op1); + Value *EmitReg_BIT_IOR_EXPR(tree_node *op0, tree_node *op1); + Value *EmitReg_BIT_XOR_EXPR(tree_node *op0, tree_node *op1); Value *EmitReg_CEIL_DIV_EXPR(tree_node *type, tree_node *op0, tree_node *op1); Value *EmitReg_COMPLEX_EXPR(tree_node *op0, tree_node *op1); Value *EmitReg_FLOOR_DIV_EXPR(tree_node *type, tree_node *op0, From espindola at google.com Tue Feb 2 06:37:02 2010 From: espindola at google.com (Rafael Espindola) Date: Tue, 2 Feb 2010 07:37:02 -0500 Subject: [llvm-commits] [patch][llvm-gcc] Merge bits from llvm-abi-default.cpp into llvm-abi-linux-ppc.cpp In-Reply-To: <38a0d8451002011513h36ea40f8l41336d6fe6621cde@mail.gmail.com> References: <38a0d8451002011513h36ea40f8l41336d6fe6621cde@mail.gmail.com> Message-ID: <38a0d8451002020437m5800fa1bpc02402895e9ea8d9@mail.gmail.com> On 1 February 2010 18:13, Rafael Espindola wrote: > The attached patch copies bits ?from llvm-abi-default.cpp to > llvm-abi-linux-ppc.cpp. These are most likely features added to the > default implementation after the linux ppc forked and were never > copied over. > > Tested by compiling llvm-gcc and running the test-suite under qemu's > system emulation. Should be done tomorrow morning. OK if there are no > regressions? Tests are done. No regressions. Is the patch OK? > Next step: replace the "inreg" ppc hack with pad arguments. > > Cheers. > -- > Rafael ?vila de Esp?ndola > Cheers. -- Rafael ?vila de Esp?ndola From baldrick at free.fr Tue Feb 2 06:53:04 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 02 Feb 2010 12:53:04 -0000 Subject: [llvm-commits] [llvm] r95086 - in /llvm/trunk: include/llvm/Constants.h include/llvm/InstrTypes.h include/llvm/Support/ConstantFolder.h include/llvm/Support/IRBuilder.h include/llvm/Support/NoFolder.h include/llvm/Support/TargetFolder.h lib/VMCore/Constants.cpp lib/VMCore/Instructions.cpp Message-ID: <201002021253.o12Cr5FD028233@zion.cs.uiuc.edu> Author: baldrick Date: Tue Feb 2 06:53:04 2010 New Revision: 95086 URL: http://llvm.org/viewvc/llvm-project?rev=95086&view=rev Log: Adding missing methods for creating Add, Mul, Neg and Sub with NUW. Modified: llvm/trunk/include/llvm/Constants.h llvm/trunk/include/llvm/InstrTypes.h llvm/trunk/include/llvm/Support/ConstantFolder.h llvm/trunk/include/llvm/Support/IRBuilder.h llvm/trunk/include/llvm/Support/NoFolder.h llvm/trunk/include/llvm/Support/TargetFolder.h llvm/trunk/lib/VMCore/Constants.cpp llvm/trunk/lib/VMCore/Instructions.cpp Modified: llvm/trunk/include/llvm/Constants.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=95086&r1=95085&r2=95086&view=diff ============================================================================== --- llvm/trunk/include/llvm/Constants.h (original) +++ llvm/trunk/include/llvm/Constants.h Tue Feb 2 06:53:04 2010 @@ -697,10 +697,13 @@ static Constant *getBitCast (Constant *C, const Type *Ty); static Constant *getNSWNeg(Constant *C); + static Constant *getNUWNeg(Constant *C); static Constant *getNSWAdd(Constant *C1, Constant *C2); + static Constant *getNUWAdd(Constant *C1, Constant *C2); static Constant *getNSWSub(Constant *C1, Constant *C2); - static Constant *getNUWMul(Constant *C1, Constant *C2); + static Constant *getNUWSub(Constant *C1, Constant *C2); static Constant *getNSWMul(Constant *C1, Constant *C2); + static Constant *getNUWMul(Constant *C1, Constant *C2); static Constant *getExactSDiv(Constant *C1, Constant *C2); /// Transparently provide more efficient getOperand methods. Modified: llvm/trunk/include/llvm/InstrTypes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InstrTypes.h?rev=95086&r1=95085&r2=95086&view=diff ============================================================================== --- llvm/trunk/include/llvm/InstrTypes.h (original) +++ llvm/trunk/include/llvm/InstrTypes.h Tue Feb 2 06:53:04 2010 @@ -299,6 +299,27 @@ return BO; } + /// CreateNUWMul - Create a Mul operator with the NUW flag set. + /// + static BinaryOperator *CreateNUWMul(Value *V1, Value *V2, + const Twine &Name = "") { + BinaryOperator *BO = CreateMul(V1, V2, Name); + BO->setHasNoUnsignedWrap(true); + return BO; + } + static BinaryOperator *CreateNUWMul(Value *V1, Value *V2, + const Twine &Name, BasicBlock *BB) { + BinaryOperator *BO = CreateMul(V1, V2, Name, BB); + BO->setHasNoUnsignedWrap(true); + return BO; + } + static BinaryOperator *CreateNUWMul(Value *V1, Value *V2, + const Twine &Name, Instruction *I) { + BinaryOperator *BO = CreateMul(V1, V2, Name, I); + BO->setHasNoUnsignedWrap(true); + return BO; + } + /// CreateExactSDiv - Create an SDiv operator with the exact flag set. /// static BinaryOperator *CreateExactSDiv(Value *V1, Value *V2, @@ -334,6 +355,10 @@ Instruction *InsertBefore = 0); static BinaryOperator *CreateNSWNeg(Value *Op, const Twine &Name, BasicBlock *InsertAtEnd); + static BinaryOperator *CreateNUWNeg(Value *Op, const Twine &Name = "", + Instruction *InsertBefore = 0); + static BinaryOperator *CreateNUWNeg(Value *Op, const Twine &Name, + BasicBlock *InsertAtEnd); static BinaryOperator *CreateFNeg(Value *Op, const Twine &Name = "", Instruction *InsertBefore = 0); static BinaryOperator *CreateFNeg(Value *Op, const Twine &Name, Modified: llvm/trunk/include/llvm/Support/ConstantFolder.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ConstantFolder.h?rev=95086&r1=95085&r2=95086&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/ConstantFolder.h (original) +++ llvm/trunk/include/llvm/Support/ConstantFolder.h Tue Feb 2 06:53:04 2010 @@ -39,6 +39,9 @@ Constant *CreateNSWAdd(Constant *LHS, Constant *RHS) const { return ConstantExpr::getNSWAdd(LHS, RHS); } + Constant *CreateNUWAdd(Constant *LHS, Constant *RHS) const { + return ConstantExpr::getNUWAdd(LHS, RHS); + } Constant *CreateFAdd(Constant *LHS, Constant *RHS) const { return ConstantExpr::getFAdd(LHS, RHS); } @@ -48,6 +51,9 @@ Constant *CreateNSWSub(Constant *LHS, Constant *RHS) const { return ConstantExpr::getNSWSub(LHS, RHS); } + Constant *CreateNUWSub(Constant *LHS, Constant *RHS) const { + return ConstantExpr::getNUWSub(LHS, RHS); + } Constant *CreateFSub(Constant *LHS, Constant *RHS) const { return ConstantExpr::getFSub(LHS, RHS); } @@ -57,6 +63,9 @@ Constant *CreateNSWMul(Constant *LHS, Constant *RHS) const { return ConstantExpr::getNSWMul(LHS, RHS); } + Constant *CreateNUWMul(Constant *LHS, Constant *RHS) const { + return ConstantExpr::getNUWMul(LHS, RHS); + } Constant *CreateFMul(Constant *LHS, Constant *RHS) const { return ConstantExpr::getFMul(LHS, RHS); } @@ -115,6 +124,9 @@ Constant *CreateNSWNeg(Constant *C) const { return ConstantExpr::getNSWNeg(C); } + Constant *CreateNUWNeg(Constant *C) const { + return ConstantExpr::getNUWNeg(C); + } Constant *CreateFNeg(Constant *C) const { return ConstantExpr::getFNeg(C); } Modified: llvm/trunk/include/llvm/Support/IRBuilder.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IRBuilder.h?rev=95086&r1=95085&r2=95086&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/IRBuilder.h (original) +++ llvm/trunk/include/llvm/Support/IRBuilder.h Tue Feb 2 06:53:04 2010 @@ -318,6 +318,12 @@ return Folder.CreateNSWAdd(LC, RC); return Insert(BinaryOperator::CreateNSWAdd(LHS, RHS), Name); } + Value *CreateNUWAdd(Value *LHS, Value *RHS, const Twine &Name = "") { + if (Constant *LC = dyn_cast(LHS)) + if (Constant *RC = dyn_cast(RHS)) + return Folder.CreateNUWAdd(LC, RC); + return Insert(BinaryOperator::CreateNUWAdd(LHS, RHS), Name); + } Value *CreateFAdd(Value *LHS, Value *RHS, const Twine &Name = "") { if (Constant *LC = dyn_cast(LHS)) if (Constant *RC = dyn_cast(RHS)) @@ -336,6 +342,12 @@ return Folder.CreateNSWSub(LC, RC); return Insert(BinaryOperator::CreateNSWSub(LHS, RHS), Name); } + Value *CreateNUWSub(Value *LHS, Value *RHS, const Twine &Name = "") { + if (Constant *LC = dyn_cast(LHS)) + if (Constant *RC = dyn_cast(RHS)) + return Folder.CreateNUWSub(LC, RC); + return Insert(BinaryOperator::CreateNUWSub(LHS, RHS), Name); + } Value *CreateFSub(Value *LHS, Value *RHS, const Twine &Name = "") { if (Constant *LC = dyn_cast(LHS)) if (Constant *RC = dyn_cast(RHS)) @@ -354,6 +366,12 @@ return Folder.CreateNSWMul(LC, RC); return Insert(BinaryOperator::CreateNSWMul(LHS, RHS), Name); } + Value *CreateNUWMul(Value *LHS, Value *RHS, const Twine &Name = "") { + if (Constant *LC = dyn_cast(LHS)) + if (Constant *RC = dyn_cast(RHS)) + return Folder.CreateNUWMul(LC, RC); + return Insert(BinaryOperator::CreateNUWMul(LHS, RHS), Name); + } Value *CreateFMul(Value *LHS, Value *RHS, const Twine &Name = "") { if (Constant *LC = dyn_cast(LHS)) if (Constant *RC = dyn_cast(RHS)) @@ -484,6 +502,11 @@ return Folder.CreateNSWNeg(VC); return Insert(BinaryOperator::CreateNSWNeg(V), Name); } + Value *CreateNUWNeg(Value *V, const Twine &Name = "") { + if (Constant *VC = dyn_cast(V)) + return Folder.CreateNUWNeg(VC); + return Insert(BinaryOperator::CreateNUWNeg(V), Name); + } Value *CreateFNeg(Value *V, const Twine &Name = "") { if (Constant *VC = dyn_cast(V)) return Folder.CreateFNeg(VC); Modified: llvm/trunk/include/llvm/Support/NoFolder.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/NoFolder.h?rev=95086&r1=95085&r2=95086&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/NoFolder.h (original) +++ llvm/trunk/include/llvm/Support/NoFolder.h Tue Feb 2 06:53:04 2010 @@ -45,6 +45,9 @@ Value *CreateNSWAdd(Constant *LHS, Constant *RHS) const { return BinaryOperator::CreateNSWAdd(LHS, RHS); } + Value *CreateNUWAdd(Constant *LHS, Constant *RHS) const { + return BinaryOperator::CreateNUWAdd(LHS, RHS); + } Value *CreateFAdd(Constant *LHS, Constant *RHS) const { return BinaryOperator::CreateFAdd(LHS, RHS); } @@ -54,6 +57,9 @@ Value *CreateNSWSub(Constant *LHS, Constant *RHS) const { return BinaryOperator::CreateNSWSub(LHS, RHS); } + Value *CreateNUWSub(Constant *LHS, Constant *RHS) const { + return BinaryOperator::CreateNUWSub(LHS, RHS); + } Value *CreateFSub(Constant *LHS, Constant *RHS) const { return BinaryOperator::CreateFSub(LHS, RHS); } @@ -63,6 +69,9 @@ Value *CreateNSWMul(Constant *LHS, Constant *RHS) const { return BinaryOperator::CreateNSWMul(LHS, RHS); } + Value *CreateNUWMul(Constant *LHS, Constant *RHS) const { + return BinaryOperator::CreateNUWMul(LHS, RHS); + } Value *CreateFMul(Constant *LHS, Constant *RHS) const { return BinaryOperator::CreateFMul(LHS, RHS); } @@ -121,6 +130,9 @@ Value *CreateNSWNeg(Constant *C) const { return BinaryOperator::CreateNSWNeg(C); } + Value *CreateNUWNeg(Constant *C) const { + return BinaryOperator::CreateNUWNeg(C); + } Value *CreateNot(Constant *C) const { return BinaryOperator::CreateNot(C); } Modified: llvm/trunk/include/llvm/Support/TargetFolder.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/TargetFolder.h?rev=95086&r1=95085&r2=95086&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/TargetFolder.h (original) +++ llvm/trunk/include/llvm/Support/TargetFolder.h Tue Feb 2 06:53:04 2010 @@ -52,6 +52,9 @@ Constant *CreateNSWAdd(Constant *LHS, Constant *RHS) const { return Fold(ConstantExpr::getNSWAdd(LHS, RHS)); } + Constant *CreateNUWAdd(Constant *LHS, Constant *RHS) const { + return Fold(ConstantExpr::getNUWAdd(LHS, RHS)); + } Constant *CreateFAdd(Constant *LHS, Constant *RHS) const { return Fold(ConstantExpr::getFAdd(LHS, RHS)); } @@ -61,6 +64,9 @@ Constant *CreateNSWSub(Constant *LHS, Constant *RHS) const { return Fold(ConstantExpr::getNSWSub(LHS, RHS)); } + Constant *CreateNUWSub(Constant *LHS, Constant *RHS) const { + return Fold(ConstantExpr::getNUWSub(LHS, RHS)); + } Constant *CreateFSub(Constant *LHS, Constant *RHS) const { return Fold(ConstantExpr::getFSub(LHS, RHS)); } @@ -70,6 +76,9 @@ Constant *CreateNSWMul(Constant *LHS, Constant *RHS) const { return Fold(ConstantExpr::getNSWMul(LHS, RHS)); } + Constant *CreateNUWMul(Constant *LHS, Constant *RHS) const { + return Fold(ConstantExpr::getNUWMul(LHS, RHS)); + } Constant *CreateFMul(Constant *LHS, Constant *RHS) const { return Fold(ConstantExpr::getFMul(LHS, RHS)); } @@ -128,6 +137,9 @@ Constant *CreateNSWNeg(Constant *C) const { return Fold(ConstantExpr::getNSWNeg(C)); } + Constant *CreateNUWNeg(Constant *C) const { + return Fold(ConstantExpr::getNUWNeg(C)); + } Constant *CreateFNeg(Constant *C) const { return Fold(ConstantExpr::getFNeg(C)); } Modified: llvm/trunk/lib/VMCore/Constants.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Constants.cpp?rev=95086&r1=95085&r2=95086&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Constants.cpp (original) +++ llvm/trunk/lib/VMCore/Constants.cpp Tue Feb 2 06:53:04 2010 @@ -645,18 +645,29 @@ return getNSWSub(ConstantFP::getZeroValueForNegation(C->getType()), C); } +Constant* ConstantExpr::getNUWNeg(Constant* C) { + assert(C->getType()->isIntOrIntVector() && + "Cannot NEG a nonintegral value!"); + return getNUWSub(ConstantFP::getZeroValueForNegation(C->getType()), C); +} + Constant* ConstantExpr::getNSWAdd(Constant* C1, Constant* C2) { return getTy(C1->getType(), Instruction::Add, C1, C2, OverflowingBinaryOperator::NoSignedWrap); } +Constant* ConstantExpr::getNUWAdd(Constant* C1, Constant* C2) { + return getTy(C1->getType(), Instruction::Add, C1, C2, + OverflowingBinaryOperator::NoUnsignedWrap); +} + Constant* ConstantExpr::getNSWSub(Constant* C1, Constant* C2) { return getTy(C1->getType(), Instruction::Sub, C1, C2, OverflowingBinaryOperator::NoSignedWrap); } -Constant* ConstantExpr::getNUWMul(Constant* C1, Constant* C2) { - return getTy(C1->getType(), Instruction::Mul, C1, C2, +Constant* ConstantExpr::getNUWSub(Constant* C1, Constant* C2) { + return getTy(C1->getType(), Instruction::Sub, C1, C2, OverflowingBinaryOperator::NoUnsignedWrap); } @@ -665,6 +676,11 @@ OverflowingBinaryOperator::NoSignedWrap); } +Constant* ConstantExpr::getNUWMul(Constant* C1, Constant* C2) { + return getTy(C1->getType(), Instruction::Mul, C1, C2, + OverflowingBinaryOperator::NoUnsignedWrap); +} + Constant* ConstantExpr::getExactSDiv(Constant* C1, Constant* C2) { return getTy(C1->getType(), Instruction::SDiv, C1, C2, SDivOperator::IsExact); Modified: llvm/trunk/lib/VMCore/Instructions.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=95086&r1=95085&r2=95086&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Instructions.cpp (original) +++ llvm/trunk/lib/VMCore/Instructions.cpp Tue Feb 2 06:53:04 2010 @@ -1786,6 +1786,18 @@ return BinaryOperator::CreateNSWSub(zero, Op, Name, InsertAtEnd); } +BinaryOperator *BinaryOperator::CreateNUWNeg(Value *Op, const Twine &Name, + Instruction *InsertBefore) { + Value *zero = ConstantFP::getZeroValueForNegation(Op->getType()); + return BinaryOperator::CreateNUWSub(zero, Op, Name, InsertBefore); +} + +BinaryOperator *BinaryOperator::CreateNUWNeg(Value *Op, const Twine &Name, + BasicBlock *InsertAtEnd) { + Value *zero = ConstantFP::getZeroValueForNegation(Op->getType()); + return BinaryOperator::CreateNUWSub(zero, Op, Name, InsertAtEnd); +} + BinaryOperator *BinaryOperator::CreateFNeg(Value *Op, const Twine &Name, Instruction *InsertBefore) { Value *zero = ConstantFP::getZeroValueForNegation(Op->getType()); From baldrick at free.fr Tue Feb 2 06:56:16 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 02 Feb 2010 12:56:16 -0000 Subject: [llvm-commits] [dragonegg] r95087 - /dragonegg/trunk/llvm-convert.cpp Message-ID: <201002021256.o12CuGFS028341@zion.cs.uiuc.edu> Author: baldrick Date: Tue Feb 2 06:56:16 2010 New Revision: 95087 URL: http://llvm.org/viewvc/llvm-project?rev=95087&view=rev Log: Create NUW operations if an unsigned type does not wrap. This actually never happens, because TYPE_OVERFLOW_WRAPS only returns false for signed types, but is more logically correct (and future proof). Modified: dragonegg/trunk/llvm-convert.cpp Modified: dragonegg/trunk/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=95087&r1=95086&r2=95087&view=diff ============================================================================== --- dragonegg/trunk/llvm-convert.cpp (original) +++ dragonegg/trunk/llvm-convert.cpp Tue Feb 2 06:56:16 2010 @@ -1343,8 +1343,8 @@ return Builder.CreateFAdd(LHS, RHS); if (TYPE_OVERFLOW_WRAPS(type)) return Builder.CreateAdd(LHS, RHS); -// if (TYPE_UNSIGNED(type)) -// return Builder.CreateNUWAdd(LHS, RHS); + if (TYPE_UNSIGNED(type)) + return Builder.CreateNUWAdd(LHS, RHS); return Builder.CreateNSWAdd(LHS, RHS); } @@ -1355,8 +1355,8 @@ return Builder.CreateFMul(LHS, RHS); if (TYPE_OVERFLOW_WRAPS(type)) return Builder.CreateMul(LHS, RHS); -// if (TYPE_UNSIGNED(type)) -// return Builder.CreateNUWMul(LHS, RHS); + if (TYPE_UNSIGNED(type)) + return Builder.CreateNUWMul(LHS, RHS); return Builder.CreateNSWMul(LHS, RHS); } @@ -1367,8 +1367,8 @@ return Builder.CreateFSub(LHS, RHS); if (TYPE_OVERFLOW_WRAPS(type)) return Builder.CreateSub(LHS, RHS); -// if (TYPE_UNSIGNED(type)) -// return Builder.CreateNUWSub(LHS, RHS); + if (TYPE_UNSIGNED(type)) + return Builder.CreateNUWSub(LHS, RHS); return Builder.CreateNSWSub(LHS, RHS); } From baldrick at free.fr Tue Feb 2 08:22:10 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 02 Feb 2010 14:22:10 -0000 Subject: [llvm-commits] [dragonegg] r95088 - /dragonegg/trunk/llvm-backend.cpp Message-ID: <201002021422.o12EMBxm032291@zion.cs.uiuc.edu> Author: baldrick Date: Tue Feb 2 08:22:08 2010 New Revision: 95088 URL: http://llvm.org/viewvc/llvm-project?rev=95088&view=rev Log: Emit static variables even if they are not public and appear not to be used: they might be the target of an alias. Modified: dragonegg/trunk/llvm-backend.cpp Modified: dragonegg/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=95088&r1=95087&r2=95088&view=diff ============================================================================== --- dragonegg/trunk/llvm-backend.cpp (original) +++ dragonegg/trunk/llvm-backend.cpp Tue Feb 2 08:22:08 2010 @@ -1854,7 +1854,7 @@ struct varpool_node *vnode; FOR_EACH_STATIC_VARIABLE (vnode) { tree var = vnode->decl; - if (TREE_CODE(var) == VAR_DECL && TREE_PUBLIC(var)) + if (TREE_CODE(var) == VAR_DECL) emit_global(var); } From baldrick at free.fr Tue Feb 2 08:43:44 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 02 Feb 2010 14:43:44 -0000 Subject: [llvm-commits] [dragonegg] r95089 - /dragonegg/trunk/llvm-backend.cpp Message-ID: <201002021443.o12Ehins000638@zion.cs.uiuc.edu> Author: baldrick Date: Tue Feb 2 08:43:43 2010 New Revision: 95089 URL: http://llvm.org/viewvc/llvm-project?rev=95089&view=rev Log: Revert the previous commit - it causes problems with block labels (static variables containing label addresses being output too early). Modified: dragonegg/trunk/llvm-backend.cpp Modified: dragonegg/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=95089&r1=95088&r2=95089&view=diff ============================================================================== --- dragonegg/trunk/llvm-backend.cpp (original) +++ dragonegg/trunk/llvm-backend.cpp Tue Feb 2 08:43:43 2010 @@ -1854,7 +1854,7 @@ struct varpool_node *vnode; FOR_EACH_STATIC_VARIABLE (vnode) { tree var = vnode->decl; - if (TREE_CODE(var) == VAR_DECL) + if (TREE_CODE(var) == VAR_DECL && TREE_PUBLIC(var)) emit_global(var); } From baldrick at free.fr Tue Feb 2 08:51:02 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 02 Feb 2010 14:51:02 -0000 Subject: [llvm-commits] [dragonegg] r95090 - /dragonegg/trunk/llvm-backend.cpp Message-ID: <201002021451.o12Ep2tb001013@zion.cs.uiuc.edu> Author: baldrick Date: Tue Feb 2 08:51:01 2010 New Revision: 95090 URL: http://llvm.org/viewvc/llvm-project?rev=95090&view=rev Log: In some cases we may reuse an existing global variable here, in which case it could in theory have an initial value already. Modified: dragonegg/trunk/llvm-backend.cpp Modified: dragonegg/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=95090&r1=95089&r2=95090&view=diff ============================================================================== --- dragonegg/trunk/llvm-backend.cpp (original) +++ dragonegg/trunk/llvm-backend.cpp Tue Feb 2 08:51:01 2010 @@ -1358,11 +1358,8 @@ if (TREE_CODE(decl) == VAR_DECL && DECL_THREAD_LOCAL_P(decl)) GV->setThreadLocal(true); - // At this point the global variable is a declaration rather than a - // definition, so it may have the wrong size (for example, the GCC - // type might have variable size, in which case the size will be set - // later by the initial value). Do not check the size here. - assert(GV->isDeclaration() && "Global has unexpected initializer!"); + assert((GV->isDeclaration() || SizeOfGlobalMatchesDecl(GV, decl)) && + "Global has unexpected initializer!"); return SET_DECL_LLVM(decl, GV); } From baldrick at free.fr Tue Feb 2 08:51:42 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 02 Feb 2010 14:51:42 -0000 Subject: [llvm-commits] [dragonegg] r95091 - /dragonegg/trunk/TODO Message-ID: <201002021451.o12Epgnm001054@zion.cs.uiuc.edu> Author: baldrick Date: Tue Feb 2 08:51:42 2010 New Revision: 95091 URL: http://llvm.org/viewvc/llvm-project?rev=95091&view=rev Log: Add a TODO about linkage types (currently quite a mess). Modified: dragonegg/trunk/TODO Modified: dragonegg/trunk/TODO URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/TODO?rev=95091&r1=95090&r2=95091&view=diff ============================================================================== --- dragonegg/trunk/TODO (original) +++ dragonegg/trunk/TODO Tue Feb 2 08:51:42 2010 @@ -44,6 +44,10 @@ and the "register type" used for passing about in register (i1 in this case). This should tie in nicely with gimple registers versus references. +Unify the code that determines which LLVM linkage type to use. Need to do +a bunch of experimenting to work out how the mapping should really be done. + + Code quality ------------ From rafael.espindola at gmail.com Tue Feb 2 08:59:00 2010 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Tue, 02 Feb 2010 14:59:00 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r95092 - /llvm-gcc-4.2/trunk/gcc/llvm-abi-linux-ppc.cpp Message-ID: <201002021459.o12Ex1Eh001354@zion.cs.uiuc.edu> Author: rafael Date: Tue Feb 2 08:59:00 2010 New Revision: 95092 URL: http://llvm.org/viewvc/llvm-project?rev=95092&view=rev Log: Merge bits from llvm-abi-default.cpp into llvm-abi-linux-ppc.cpp. Tested with the test-suite and qemu ppc system emulation. Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi-linux-ppc.cpp Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi-linux-ppc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-abi-linux-ppc.cpp?rev=95092&r1=95091&r2=95092&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-abi-linux-ppc.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-abi-linux-ppc.cpp Tue Feb 2 08:59:00 2010 @@ -77,13 +77,20 @@ /// issue, except for calls which involve _Complex types. void SVR4ABI::HandleArgument(tree type, std::vector &ScalarElts, Attributes *Attributes) { + unsigned Size = 0; + bool DontCheckAlignment = false; // Eight GPR's are availabe for parameter passing. const unsigned NumArgRegs = 8; const Type *Ty = ConvertType(type); // Figure out if this field is zero bits wide, e.g. {} or [0 x int]. Do // not include variable sized fields here. std::vector Elts; - if (isPassedByInvisibleReference(type)) { // variable size -> by-ref. + if (Ty->isVoidTy()) { + // Handle void explicitly as an opaque type. + const Type *OpTy = OpaqueType::get(getGlobalContext()); + C.HandleScalarArgument(OpTy, type); + ScalarElts.push_back(OpTy); + } else if (isPassedByInvisibleReference(type)) { // variable size -> by-ref. const Type *PtrTy = Ty->getPointerTo(); C.HandleByInvisibleReferenceArgument(PtrTy, type); ScalarElts.push_back(PtrTy); @@ -153,6 +160,8 @@ if (Attributes) { *Attributes |= Attr; } + } else if (LLVM_SHOULD_PASS_AGGREGATE_AS_FCA(type, Ty)) { + C.HandleFCAArgument(Ty, type); } else if (LLVM_SHOULD_PASS_AGGREGATE_IN_MIXED_REGS(type, Ty, C.getCallingConv(), Elts)) { @@ -241,9 +250,49 @@ if (Attributes) { *Attributes |= Attr; } + } else if (LLVM_SHOULD_PASS_AGGREGATE_IN_INTEGER_REGS(type, &Size, + &DontCheckAlignment)) { + PassInIntegerRegisters(type, ScalarElts, Size, DontCheckAlignment); } else if (isZeroSizedStructOrUnion(type)) { // Zero sized struct or union, just drop it! ; + } else if (TREE_CODE(type) == RECORD_TYPE) { + for (tree Field = TYPE_FIELDS(type); Field; Field = TREE_CHAIN(Field)) + if (TREE_CODE(Field) == FIELD_DECL) { + const tree Ftype = getDeclaredType(Field); + const Type *FTy = ConvertType(Ftype); + unsigned FNo = GET_LLVM_FIELD_INDEX(Field); + assert(FNo != ~0U && "Case not handled yet!"); + + // Currently, a bvyal type inside a non-byval struct is a zero-length + // object inside a bigger object on x86-64. This type should be + // skipped (but only when it is inside a bigger object). + // (We know there currently are no other such cases active because + // they would hit the assert in FunctionPrologArgumentConversion:: + // HandleByValArgument.) + if (!LLVM_SHOULD_PASS_AGGREGATE_USING_BYVAL_ATTR(Ftype, FTy)) { + C.EnterField(FNo, Ty); + HandleArgument(getDeclaredType(Field), ScalarElts); + C.ExitField(); + } + } + } else if (TREE_CODE(type) == COMPLEX_TYPE) { + C.EnterField(0, Ty); + HandleArgument(TREE_TYPE(type), ScalarElts); + C.ExitField(); + C.EnterField(1, Ty); + HandleArgument(TREE_TYPE(type), ScalarElts); + C.ExitField(); + } else if ((TREE_CODE(type) == UNION_TYPE) || + (TREE_CODE(type) == QUAL_UNION_TYPE)) { + HandleUnion(type, ScalarElts); + } else if (TREE_CODE(type) == ARRAY_TYPE) { + const ArrayType *ATy = cast(Ty); + for (unsigned i = 0, e = ATy->getNumElements(); i != e; ++i) { + C.EnterField(i, Ty); + HandleArgument(TREE_TYPE(type), ScalarElts); + C.ExitField(); + } } else { assert(0 && "unknown aggregate type!"); abort(); From espindola at google.com Tue Feb 2 09:31:21 2010 From: espindola at google.com (Rafael Espindola) Date: Tue, 2 Feb 2010 10:31:21 -0500 Subject: [llvm-commits] [dragonegg] r95091 - /dragonegg/trunk/TODO In-Reply-To: <201002021451.o12Epgnm001054@zion.cs.uiuc.edu> References: <201002021451.o12Epgnm001054@zion.cs.uiuc.edu> Message-ID: <38a0d8451002020731o6f74ba06g98aa45977ca6dda0@mail.gmail.com> On 2 February 2010 09:51, Duncan Sands wrote: > Author: baldrick > Date: Tue Feb ?2 08:51:42 2010 > New Revision: 95091 > > URL: http://llvm.org/viewvc/llvm-project?rev=95091&view=rev > Log: > Add a TODO about linkage types (currently quite a mess). Note that llvm's linkage support in currently incomplete when it comes to ELF. It lacks proper support for ELF's default visibility model. Your options are to use llvm's default visibility and have the optimizers assume they know the callee or you can use weak and have it marked as weak in the .o. > Modified: > ? ?dragonegg/trunk/TODO > > Modified: dragonegg/trunk/TODO > URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/TODO?rev=95091&r1=95090&r2=95091&view=diff > > ============================================================================== > --- dragonegg/trunk/TODO (original) > +++ dragonegg/trunk/TODO Tue Feb ?2 08:51:42 2010 > @@ -44,6 +44,10 @@ > ?and the "register type" used for passing about in register (i1 in this case). > ?This should tie in nicely with gimple registers versus references. > > +Unify the code that determines which LLVM linkage type to use. ?Need to do > +a bunch of experimenting to work out how the mapping should really be done. > + > + > ?Code quality > ?------------ > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > -- Rafael ?vila de Esp?ndola From nicholas at mxc.ca Tue Feb 2 10:53:35 2010 From: nicholas at mxc.ca (Nick Lewycky) Date: Tue, 02 Feb 2010 08:53:35 -0800 Subject: [llvm-commits] patch: moving unreachable elimination to codegenprep Message-ID: <4B68588F.7070906@mxc.ca> This is a resurrection of the patch first discussed back in October 2009 to change the way unreachable is handled to make it live in the IR for as long as possible. The goal is to implement http://nondot.org/sabre/LLVMNotes/BuiltinUnreachable.txt in time for the LLVM 2.7 freeze so that python can make use of it when they land unladen-swallow. This patch does most of the work of just moving the time unreachables are eliminated at late as possible, currently CodeGenPrep, and updates InlineCost and SCEV to handle it. Most of the patch is just updating codegen unit tests that use the unreachable instruction. The primary concern from last time was the side-effects of keeping the chain of computation that fed into a dead branch. The 'extra' instructions could have effects on everything from inlining to loop analysis, but any approach short of cramming the entire expression into metadata attached to the branch would have the same problem. I'd like to land this patch as soon as possible so that we have the best chance of dealing with any performance problems it causes before the code freeze! Nick -------------- next part -------------- A non-text attachment was scrubbed... Name: preserve-unreachable2.patch Type: text/x-patch Size: 22724 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100202/6b923bf7/attachment.bin From baldrick at free.fr Tue Feb 2 11:19:31 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 02 Feb 2010 18:19:31 +0100 Subject: [llvm-commits] [dragonegg] r95091 - /dragonegg/trunk/TODO In-Reply-To: <38a0d8451002020731o6f74ba06g98aa45977ca6dda0@mail.gmail.com> References: <201002021451.o12Epgnm001054@zion.cs.uiuc.edu> <38a0d8451002020731o6f74ba06g98aa45977ca6dda0@mail.gmail.com> Message-ID: <4B685EA3.4080008@free.fr> Hi Rafael, >> Add a TODO about linkage types (currently quite a mess). > > Note that llvm's linkage support in currently incomplete when it comes > to ELF. It lacks proper support for ELF's default visibility model. > Your options are to use llvm's default visibility and have the > optimizers assume they know the callee or you can use weak and have it > marked as weak in the .o. thanks for your comments. My current goal is to do at least as well as llvm-gcc - true correctness can wait for later! Ciao, Duncan. From clattner at apple.com Tue Feb 2 11:59:05 2010 From: clattner at apple.com (Chris Lattner) Date: Tue, 2 Feb 2010 09:59:05 -0800 Subject: [llvm-commits] [patch][llvm-gcc] Merge bits from llvm-abi-default.cpp into llvm-abi-linux-ppc.cpp In-Reply-To: <38a0d8451002020437m5800fa1bpc02402895e9ea8d9@mail.gmail.com> References: <38a0d8451002011513h36ea40f8l41336d6fe6621cde@mail.gmail.com> <38a0d8451002020437m5800fa1bpc02402895e9ea8d9@mail.gmail.com> Message-ID: On Feb 2, 2010, at 4:37 AM, Rafael Espindola wrote: > On 1 February 2010 18:13, Rafael Espindola > wrote: >> The attached patch copies bits from llvm-abi-default.cpp to >> llvm-abi-linux-ppc.cpp. These are most likely features added to the >> default implementation after the linux ppc forked and were never >> copied over. >> >> Tested by compiling llvm-gcc and running the test-suite under qemu's >> system emulation. Should be done tomorrow morning. OK if there are no >> regressions? > > Tests are done. No regressions. Is the patch OK? Yep, go for it. Thanks Rafael, -Chris From evan.cheng at apple.com Tue Feb 2 12:07:56 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 2 Feb 2010 10:07:56 -0800 Subject: [llvm-commits] [llvm] r94937 - in /llvm/trunk: lib/Transforms/Scalar/TailRecursionElimination.cpp test/Transforms/TailCallElim/no-return-calls.ll In-Reply-To: <5F10954E-92C5-4B8F-BDBC-ACAC5ADD3538@apple.com> References: <201001310059.o0V0xWep021750@zion.cs.uiuc.edu> <5F10954E-92C5-4B8F-BDBC-ACAC5ADD3538@apple.com> Message-ID: I'll deal with this later. To me if the call isn't before a proper function epilogue I don't see it as a "tail call". But if that's the definition, I'll move the check elsewhere. Evan On Feb 1, 2010, at 9:36 PM, Chris Lattner wrote: > > On Jan 30, 2010, at 4:59 PM, Evan Cheng wrote: > >> Author: evancheng >> Date: Sat Jan 30 18:59:31 2010 >> New Revision: 94937 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=94937&view=rev >> Log: >> Do not mark no-return calls tail calls. It'll screw up special calls like longjmp and it doesn't make much sense for performance reason. If my logic is faulty, please let me know. > > Hey Evan, > > This isn't the right patch. The 'tail' flag means that the callee doesn't access the caller's stack, not that it satisfies all the arbitrary requirements that codegen has for tailcalls. If codegen doesn't handling this form of tailcall, it should be the one that avoids transforming it. > > -Chris > >> >> Added: >> llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll >> Modified: >> llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp >> >> Modified: llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp?rev=94937&r1=94936&r2=94937&view=diff >> >> ============================================================================== >> --- llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp (original) >> +++ llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp Sat Jan 30 18:59:31 2010 >> @@ -184,10 +184,11 @@ >> if (!FunctionContainsEscapingAllocas) >> for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) >> for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) >> - if (CallInst *CI = dyn_cast(I)) { >> - CI->setTailCall(); >> - MadeChange = true; >> - } >> + if (CallInst *CI = dyn_cast(I)) >> + if (!CI->doesNotReturn()) { >> + CI->setTailCall(); >> + MadeChange = true; >> + } >> >> return MadeChange; >> } >> >> Added: llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll?rev=94937&view=auto >> >> ============================================================================== >> --- llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll (added) >> +++ llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll Sat Jan 30 18:59:31 2010 >> @@ -0,0 +1,12 @@ >> +; RUN: opt < %s -tailcallelim -S | FileCheck %s >> + >> +define void @t() nounwind ssp { >> +entry: >> +; CHECK: entry: >> +; CHECK: %0 = call i32 @foo() >> +; CHECK: ret void >> + %0 = call i32 @foo() nounwind noreturn >> + ret void >> +} >> + >> +declare i32 @foo() >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From clattner at apple.com Tue Feb 2 12:19:53 2010 From: clattner at apple.com (Chris Lattner) Date: Tue, 2 Feb 2010 10:19:53 -0800 Subject: [llvm-commits] [llvm] r94937 - in /llvm/trunk: lib/Transforms/Scalar/TailRecursionElimination.cpp test/Transforms/TailCallElim/no-return-calls.ll In-Reply-To: References: <201001310059.o0V0xWep021750@zion.cs.uiuc.edu> <5F10954E-92C5-4B8F-BDBC-ACAC5ADD3538@apple.com> Message-ID: On Feb 2, 2010, at 10:07 AM, Evan Cheng wrote: > I'll deal with this later. To me if the call isn't before a proper > function epilogue I don't see it as a "tail call". But if that's the > definition, I'll move the check elsewhere. It seems legal and profitable (though potentially not worth the trouble to implement) to turn: void bar(int a) { call foo(a) unreachable } into: bar: jmp foo instead of handling the prolog and call shuffling. Please do revert the middle end change when possible, codegen should decide whether it is possible to do these sorts of things based on its constraints. -Chris > > Evan > > On Feb 1, 2010, at 9:36 PM, Chris Lattner wrote: > >> >> On Jan 30, 2010, at 4:59 PM, Evan Cheng wrote: >> >>> Author: evancheng >>> Date: Sat Jan 30 18:59:31 2010 >>> New Revision: 94937 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=94937&view=rev >>> Log: >>> Do not mark no-return calls tail calls. It'll screw up special >>> calls like longjmp and it doesn't make much sense for performance >>> reason. If my logic is faulty, please let me know. >> >> Hey Evan, >> >> This isn't the right patch. The 'tail' flag means that the callee >> doesn't access the caller's stack, not that it satisfies all the >> arbitrary requirements that codegen has for tailcalls. If codegen >> doesn't handling this form of tailcall, it should be the one that >> avoids transforming it. >> >> -Chris >> >>> >>> Added: >>> llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll >>> Modified: >>> llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp >>> >>> Modified: llvm/trunk/lib/Transforms/Scalar/ >>> TailRecursionElimination.cpp >>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp?rev=94937&r1=94936&r2=94937&view=diff >>> >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> ==================================================================== >>> --- llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp >>> (original) >>> +++ llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp >>> Sat Jan 30 18:59:31 2010 >>> @@ -184,10 +184,11 @@ >>> if (!FunctionContainsEscapingAllocas) >>> for (Function::iterator BB = F.begin(), E = F.end(); BB != E; + >>> +BB) >>> for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != >>> E; ++I) >>> - if (CallInst *CI = dyn_cast(I)) { >>> - CI->setTailCall(); >>> - MadeChange = true; >>> - } >>> + if (CallInst *CI = dyn_cast(I)) >>> + if (!CI->doesNotReturn()) { >>> + CI->setTailCall(); >>> + MadeChange = true; >>> + } >>> >>> return MadeChange; >>> } >>> >>> Added: llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll >>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll?rev=94937&view=auto >>> >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> ==================================================================== >>> --- llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll >>> (added) >>> +++ llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll Sat >>> Jan 30 18:59:31 2010 >>> @@ -0,0 +1,12 @@ >>> +; RUN: opt < %s -tailcallelim -S | FileCheck %s >>> + >>> +define void @t() nounwind ssp { >>> +entry: >>> +; CHECK: entry: >>> +; CHECK: %0 = call i32 @foo() >>> +; CHECK: ret void >>> + %0 = call i32 @foo() nounwind noreturn >>> + ret void >>> +} >>> + >>> +declare i32 @foo() >>> >>> >>> _______________________________________________ >>> llvm-commits mailing list >>> llvm-commits at cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >> > From edwintorok at gmail.com Tue Feb 2 12:41:22 2010 From: edwintorok at gmail.com (=?ISO-8859-1?Q?T=F6r=F6k_Edwin?=) Date: Tue, 02 Feb 2010 20:41:22 +0200 Subject: [llvm-commits] [llvm] r94937 - in /llvm/trunk: lib/Transforms/Scalar/TailRecursionElimination.cpp test/Transforms/TailCallElim/no-return-calls.ll In-Reply-To: References: <201001310059.o0V0xWep021750@zion.cs.uiuc.edu> <5F10954E-92C5-4B8F-BDBC-ACAC5ADD3538@apple.com> Message-ID: <4B6871D2.7010808@gmail.com> On 2010-02-02 20:19, Chris Lattner wrote: > On Feb 2, 2010, at 10:07 AM, Evan Cheng wrote: > > >> I'll deal with this later. To me if the call isn't before a proper >> function epilogue I don't see it as a "tail call". But if that's the >> definition, I'll move the check elsewhere. >> > > It seems legal and profitable (though potentially not worth the > trouble to implement) to turn: > > void bar(int a) { > call foo(a) > unreachable > } > > into: > > bar: > jmp foo > This should be turned into 'jmp foo' if the call is followed by a 'ret void', or 'ret %call' to. Best regards, --Edwin From sabre at nondot.org Tue Feb 2 12:44:12 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 18:44:12 -0000 Subject: [llvm-commits] [llvm] r95100 - in /llvm/trunk: docs/WritingAnLLVMBackend.html include/llvm/Target/TargetMachine.h lib/CodeGen/LLVMTargetMachine.cpp Message-ID: <201002021844.o12IiCT1011812@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 12:44:12 2010 New Revision: 95100 URL: http://llvm.org/viewvc/llvm-project?rev=95100&view=rev Log: Inline addAssemblyEmitter into its one real caller and delete the -print-emitted-asm option. The JIT shouldn't have to pull in the asmprinter. Modified: llvm/trunk/docs/WritingAnLLVMBackend.html llvm/trunk/include/llvm/Target/TargetMachine.h llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Modified: llvm/trunk/docs/WritingAnLLVMBackend.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/WritingAnLLVMBackend.html?rev=95100&r1=95099&r2=95100&view=diff ============================================================================== --- llvm/trunk/docs/WritingAnLLVMBackend.html (original) +++ llvm/trunk/docs/WritingAnLLVMBackend.html Tue Feb 2 12:44:12 2010 @@ -354,8 +354,6 @@ // Pass Pipeline Configuration virtual bool addInstSelector(PassManagerBase &PM, bool Fast); virtual bool addPreEmitPass(PassManagerBase &PM, bool Fast); - virtual bool addAssemblyEmitter(PassManagerBase &PM, bool Fast, - std::ostream &Out); }; } // end namespace llvm Modified: llvm/trunk/include/llvm/Target/TargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=95100&r1=95099&r2=95100&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetMachine.h (original) +++ llvm/trunk/include/llvm/Target/TargetMachine.h Tue Feb 2 12:44:12 2010 @@ -463,14 +463,6 @@ /// getEnableTailMergeDefault - the default setting for -enable-tail-merge /// on this target. User flag overrides. virtual bool getEnableTailMergeDefault() const { return true; } - - /// addAssemblyEmitter - Helper function which creates a target specific - /// assembly printer, if available. - /// - /// \return Returns 'false' on success. - bool addAssemblyEmitter(PassManagerBase &, CodeGenOpt::Level, - bool /* VerboseAsmDefault */, - formatted_raw_ostream &); }; } // End llvm namespace Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=95100&r1=95099&r2=95100&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Feb 2 12:44:12 2010 @@ -57,8 +57,6 @@ cl::desc("Print LLVM IR produced by the loop-reduce pass")); static cl::opt PrintISelInput("print-isel-input", cl::Hidden, cl::desc("Print LLVM IR input to isel pass")); -static cl::opt PrintEmittedAsm("print-emitted-asm", cl::Hidden, - cl::desc("Dump emitter generated instructions as assembly")); static cl::opt PrintGCInfo("print-gc", cl::Hidden, cl::desc("Dump garbage collector data")); static cl::opt VerifyMachineCode("verify-machineinstrs", cl::Hidden, @@ -110,29 +108,20 @@ switch (FileType) { default: break; - case TargetMachine::AssemblyFile: - if (addAssemblyEmitter(PM, OptLevel, getAsmVerbosityDefault(), Out)) - return FileModel::Error; + case TargetMachine::AssemblyFile: { + FunctionPass *Printer = + getTarget().createAsmPrinter(Out, *this, getMCAsmInfo(), + getAsmVerbosityDefault()); + if (Printer == 0) break; + PM.add(Printer); return FileModel::AsmFile; + } case TargetMachine::ObjectFile: return FileModel::Error; } return FileModel::Error; } -bool LLVMTargetMachine::addAssemblyEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - bool Verbose, - formatted_raw_ostream &Out) { - FunctionPass *Printer = - getTarget().createAsmPrinter(Out, *this, getMCAsmInfo(), Verbose); - if (!Printer) - return true; - - PM.add(Printer); - return false; -} - /// addPassesToEmitFileFinish - If the passes to emit the specified file had to /// be split up (e.g., to add an object writer pass), this method can be used to /// finish up adding passes to emit the file, if necessary. @@ -144,8 +133,6 @@ if (MCE) addSimpleCodeEmitter(PM, OptLevel, *MCE); - if (PrintEmittedAsm) - addAssemblyEmitter(PM, OptLevel, true, ferrs()); PM.add(createGCInfoDeleter()); @@ -163,8 +150,6 @@ if (JCE) addSimpleCodeEmitter(PM, OptLevel, *JCE); - if (PrintEmittedAsm) - addAssemblyEmitter(PM, OptLevel, true, ferrs()); PM.add(createGCInfoDeleter()); @@ -180,9 +165,6 @@ // Make sure the code model is set. setCodeModelForStatic(); - if (PrintEmittedAsm) - addAssemblyEmitter(PM, OptLevel, true, ferrs()); - PM.add(createGCInfoDeleter()); return false; // success! @@ -205,9 +187,6 @@ return true; addCodeEmitter(PM, OptLevel, MCE); - if (PrintEmittedAsm) - addAssemblyEmitter(PM, OptLevel, true, ferrs()); - PM.add(createGCInfoDeleter()); return false; // success! @@ -230,9 +209,6 @@ return true; addCodeEmitter(PM, OptLevel, JCE); - if (PrintEmittedAsm) - addAssemblyEmitter(PM, OptLevel, true, ferrs()); - PM.add(createGCInfoDeleter()); return false; // success! From dalej at apple.com Tue Feb 2 12:52:56 2010 From: dalej at apple.com (Dale Johannesen) Date: Tue, 02 Feb 2010 18:52:56 -0000 Subject: [llvm-commits] [llvm] r95103 - in /llvm/trunk: lib/CodeGen/RegAllocLocal.cpp test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll test/CodeGen/X86/phys-reg-local-regalloc.ll Message-ID: <201002021852.o12Iqu66012255@zion.cs.uiuc.edu> Author: johannes Date: Tue Feb 2 12:52:56 2010 New Revision: 95103 URL: http://llvm.org/viewvc/llvm-project?rev=95103&view=rev Log: Test revert 95050; there's a good chance it's causing buildbot failure. Modified: llvm/trunk/lib/CodeGen/RegAllocLocal.cpp llvm/trunk/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll llvm/trunk/test/CodeGen/X86/phys-reg-local-regalloc.ll Modified: llvm/trunk/lib/CodeGen/RegAllocLocal.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLocal.cpp?rev=95103&r1=95102&r2=95103&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocLocal.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocLocal.cpp Tue Feb 2 12:52:56 2010 @@ -764,11 +764,8 @@ // Determine whether this is a copy instruction. The cases where the // source or destination are phys regs are handled specially. unsigned SrcCopyReg, DstCopyReg, SrcCopySubReg, DstCopySubReg; - unsigned SrcCopyPhysReg = 0U; bool isCopy = TII->isMoveInstr(*MI, SrcCopyReg, DstCopyReg, SrcCopySubReg, DstCopySubReg); - if (isCopy && TargetRegisterInfo::isVirtualRegister(SrcCopyReg)) - SrcCopyPhysReg = getVirt2PhysRegMapSlot(SrcCopyReg); // Loop over the implicit uses, making sure that they are at the head of the // use order list, so they don't get reallocated. @@ -980,24 +977,13 @@ // If DestVirtReg already has a value, use it. if (!(DestPhysReg = getVirt2PhysRegMapSlot(DestVirtReg))) { - // If this is a copy try to reuse the input as the output; - // that will make the copy go away. // If this is a copy, the source reg is a phys reg, and // that reg is available, use that phys reg for DestPhysReg. - // If this is a copy, the source reg is a virtual reg, and - // the phys reg that was assigned to that virtual reg is now - // available, use that phys reg for DestPhysReg. (If it's now - // available that means this was the last use of the source.) if (isCopy && TargetRegisterInfo::isPhysicalRegister(SrcCopyReg) && isPhysRegAvailable(SrcCopyReg)) { DestPhysReg = SrcCopyReg; assignVirtToPhysReg(DestVirtReg, DestPhysReg); - } else if (isCopy && - TargetRegisterInfo::isVirtualRegister(SrcCopyReg) && - SrcCopyPhysReg && isPhysRegAvailable(SrcCopyPhysReg)) { - DestPhysReg = SrcCopyPhysReg; - assignVirtToPhysReg(DestVirtReg, DestPhysReg); } else DestPhysReg = getReg(MBB, MI, DestVirtReg); } Modified: llvm/trunk/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll?rev=95103&r1=95102&r2=95103&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll (original) +++ llvm/trunk/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll Tue Feb 2 12:52:56 2010 @@ -1,7 +1,7 @@ ; RUN: llc < %s | grep {subfc r3,r5,r4} ; RUN: llc < %s | grep {subfze r4,r2} -; RUN: llc < %s -regalloc=local | grep {subfc r2,r5,r4} -; RUN: llc < %s -regalloc=local | grep {subfze r3,r3} +; RUN: llc < %s -regalloc=local | grep {subfc r5,r4,r3} +; RUN: llc < %s -regalloc=local | grep {subfze r2,r2} ; The first argument of subfc must not be the same as any other register. ; PR1357 Modified: llvm/trunk/test/CodeGen/X86/phys-reg-local-regalloc.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/phys-reg-local-regalloc.ll?rev=95103&r1=95102&r2=95103&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/phys-reg-local-regalloc.ll (original) +++ llvm/trunk/test/CodeGen/X86/phys-reg-local-regalloc.ll Tue Feb 2 12:52:56 2010 @@ -1,6 +1,4 @@ ; RUN: llc < %s -march=x86 -mtriple=i386-apple-darwin9 -regalloc=local | FileCheck %s -; RUN: llc -O0 < %s -march=x86 -mtriple=i386-apple-darwin9 -regalloc=local | FileCheck %s -; CHECKed instructions should be the same with or without -O0. @.str = private constant [12 x i8] c"x + y = %i\0A\00", align 1 ; <[12 x i8]*> [#uses=1] From sabre at nondot.org Tue Feb 2 13:03:39 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 19:03:39 -0000 Subject: [llvm-commits] [llvm] r95105 - /llvm/trunk/tools/lto/LTOCodeGenerator.cpp Message-ID: <201002021903.o12J3djt012784@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 13:03:39 2010 New Revision: 95105 URL: http://llvm.org/viewvc/llvm-project?rev=95105&view=rev Log: remove dead code, we're requesting TargetMachine::AssemblyFile here. Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOCodeGenerator.cpp?rev=95105&r1=95104&r2=95105&view=diff ============================================================================== --- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original) +++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Tue Feb 2 13:03:39 2010 @@ -395,24 +395,17 @@ codeGenPasses->add(new TargetData(*_target->getTargetData())); - ObjectCodeEmitter* oce = NULL; - switch (_target->addPassesToEmitFile(*codeGenPasses, out, TargetMachine::AssemblyFile, CodeGenOpt::Aggressive)) { - case FileModel::ElfFile: - oce = AddELFWriter(*codeGenPasses, out, *_target); - break; case FileModel::AsmFile: break; - case FileModel::MachOFile: - case FileModel::Error: - case FileModel::None: + default: errMsg = "target file type not supported"; return true; } - if (_target->addPassesToEmitFileFinish(*codeGenPasses, oce, + if (_target->addPassesToEmitFileFinish(*codeGenPasses,(ObjectCodeEmitter*)0, CodeGenOpt::Aggressive)) { errMsg = "target does not support generation of this file type"; return true; From enderby at apple.com Tue Feb 2 13:05:57 2010 From: enderby at apple.com (Kevin Enderby) Date: Tue, 02 Feb 2010 19:05:57 -0000 Subject: [llvm-commits] [llvm] r95107 - /llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s Message-ID: <201002021905.o12J5vl0012887@zion.cs.uiuc.edu> Author: enderby Date: Tue Feb 2 13:05:57 2010 New Revision: 95107 URL: http://llvm.org/viewvc/llvm-project?rev=95107&view=rev Log: Added another version of the X86 assembler matcher test case. This test case is different subset of the full auto generated test case, and a larger subset that is in x86_32-bit.s (that set will encode correctly). These instructions can pass though llvm-mc as it were a logical cat(1) and then reassemble to the same instruction. It is useful as we bring up the parser and matcher so we don't break things that currently work. Added: llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s Added: llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s?rev=95107&view=auto ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s (added) +++ llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s Tue Feb 2 13:05:57 2010 @@ -0,0 +1,7653 @@ +// This is the current set of tests that can pass though llvm-mc as it were a +// logical cat(1) and then reassemble to the same instruction. All of these +// will not yet encode correctly. The subset that will encode correctly are in +// the file x86_32-bit.s . + +// RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s + +// CHECK: movb $127, 3735928559(%ebx,%ecx,8) + movb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movb $127, 69 + movb $0x7f,0x45 + +// CHECK: movb $127, 32493 + movb $0x7f,0x7eed + +// CHECK: movb $127, 3133065982 + movb $0x7f,0xbabecafe + +// CHECK: movb $127, 305419896 + movb $0x7f,0x12345678 + +// CHECK: movw $31438, 3735928559(%ebx,%ecx,8) + movw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movw $31438, 69 + movw $0x7ace,0x45 + +// CHECK: movw $31438, 32493 + movw $0x7ace,0x7eed + +// CHECK: movw $31438, 3133065982 + movw $0x7ace,0xbabecafe + +// CHECK: movw $31438, 305419896 + movw $0x7ace,0x12345678 + +// CHECK: movl $2063514302, 3735928559(%ebx,%ecx,8) + movl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movl $2063514302, 69 + movl $0x7afebabe,0x45 + +// CHECK: movl $2063514302, 32493 + movl $0x7afebabe,0x7eed + +// CHECK: movl $2063514302, 3133065982 + movl $0x7afebabe,0xbabecafe + +// CHECK: movl $2063514302, 305419896 + movl $0x7afebabe,0x12345678 + +// CHECK: movl $324478056, 3735928559(%ebx,%ecx,8) + movl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movl $324478056, 69 + movl $0x13572468,0x45 + +// CHECK: movl $324478056, 32493 + movl $0x13572468,0x7eed + +// CHECK: movl $324478056, 3133065982 + movl $0x13572468,0xbabecafe + +// CHECK: movl $324478056, 305419896 + movl $0x13572468,0x12345678 + +// CHECK: movsbl 3735928559(%ebx,%ecx,8), %ecx + movsbl 0xdeadbeef(%ebx,%ecx,8),%ecx + +// CHECK: movsbl 69, %ecx + movsbl 0x45,%ecx + +// CHECK: movsbl 32493, %ecx + movsbl 0x7eed,%ecx + +// CHECK: movsbl 3133065982, %ecx + movsbl 0xbabecafe,%ecx + +// CHECK: movsbl 305419896, %ecx + movsbl 0x12345678,%ecx + +// CHECK: movsbw 3735928559(%ebx,%ecx,8), %bx + movsbw 0xdeadbeef(%ebx,%ecx,8),%bx + +// CHECK: movsbw 69, %bx + movsbw 0x45,%bx + +// CHECK: movsbw 32493, %bx + movsbw 0x7eed,%bx + +// CHECK: movsbw 3133065982, %bx + movsbw 0xbabecafe,%bx + +// CHECK: movsbw 305419896, %bx + movsbw 0x12345678,%bx + +// CHECK: movswl 3735928559(%ebx,%ecx,8), %ecx + movswl 0xdeadbeef(%ebx,%ecx,8),%ecx + +// CHECK: movswl 69, %ecx + movswl 0x45,%ecx + +// CHECK: movswl 32493, %ecx + movswl 0x7eed,%ecx + +// CHECK: movswl 3133065982, %ecx + movswl 0xbabecafe,%ecx + +// CHECK: movswl 305419896, %ecx + movswl 0x12345678,%ecx + +// CHECK: movzbl 3735928559(%ebx,%ecx,8), %ecx # NOREX + movzbl 0xdeadbeef(%ebx,%ecx,8),%ecx + +// CHECK: movzbl 69, %ecx # NOREX + movzbl 0x45,%ecx + +// CHECK: movzbl 32493, %ecx # NOREX + movzbl 0x7eed,%ecx + +// CHECK: movzbl 3133065982, %ecx # NOREX + movzbl 0xbabecafe,%ecx + +// CHECK: movzbl 305419896, %ecx # NOREX + movzbl 0x12345678,%ecx + +// CHECK: movzbw 3735928559(%ebx,%ecx,8), %bx + movzbw 0xdeadbeef(%ebx,%ecx,8),%bx + +// CHECK: movzbw 69, %bx + movzbw 0x45,%bx + +// CHECK: movzbw 32493, %bx + movzbw 0x7eed,%bx + +// CHECK: movzbw 3133065982, %bx + movzbw 0xbabecafe,%bx + +// CHECK: movzbw 305419896, %bx + movzbw 0x12345678,%bx + +// CHECK: movzwl 3735928559(%ebx,%ecx,8), %ecx + movzwl 0xdeadbeef(%ebx,%ecx,8),%ecx + +// CHECK: movzwl 69, %ecx + movzwl 0x45,%ecx + +// CHECK: movzwl 32493, %ecx + movzwl 0x7eed,%ecx + +// CHECK: movzwl 3133065982, %ecx + movzwl 0xbabecafe,%ecx + +// CHECK: movzwl 305419896, %ecx + movzwl 0x12345678,%ecx + +// CHECK: pushw 32493 + pushw 0x7eed + +// CHECK: popw 32493 + popw 0x7eed + +// CHECK: clc + clc + +// CHECK: cld + cld + +// CHECK: cli + cli + +// CHECK: clts + clts + +// CHECK: cmc + cmc + +// CHECK: lahf + lahf + +// CHECK: sahf + sahf + +// CHECK: stc + stc + +// CHECK: std + std + +// CHECK: sti + sti + +// CHECK: addb $254, 3735928559(%ebx,%ecx,8) + addb $0xfe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: addb $254, 69 + addb $0xfe,0x45 + +// CHECK: addb $254, 32493 + addb $0xfe,0x7eed + +// CHECK: addb $254, 3133065982 + addb $0xfe,0xbabecafe + +// CHECK: addb $254, 305419896 + addb $0xfe,0x12345678 + +// CHECK: addb $127, 3735928559(%ebx,%ecx,8) + addb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: addb $127, 69 + addb $0x7f,0x45 + +// CHECK: addb $127, 32493 + addb $0x7f,0x7eed + +// CHECK: addb $127, 3133065982 + addb $0x7f,0xbabecafe + +// CHECK: addb $127, 305419896 + addb $0x7f,0x12345678 + +// CHECK: addw $31438, 3735928559(%ebx,%ecx,8) + addw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: addw $31438, 69 + addw $0x7ace,0x45 + +// CHECK: addw $31438, 32493 + addw $0x7ace,0x7eed + +// CHECK: addw $31438, 3133065982 + addw $0x7ace,0xbabecafe + +// CHECK: addw $31438, 305419896 + addw $0x7ace,0x12345678 + +// CHECK: addl $2063514302, 3735928559(%ebx,%ecx,8) + addl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: addl $2063514302, 69 + addl $0x7afebabe,0x45 + +// CHECK: addl $2063514302, 32493 + addl $0x7afebabe,0x7eed + +// CHECK: addl $2063514302, 3133065982 + addl $0x7afebabe,0xbabecafe + +// CHECK: addl $2063514302, 305419896 + addl $0x7afebabe,0x12345678 + +// CHECK: addl $324478056, 3735928559(%ebx,%ecx,8) + addl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: addl $324478056, 69 + addl $0x13572468,0x45 + +// CHECK: addl $324478056, 32493 + addl $0x13572468,0x7eed + +// CHECK: addl $324478056, 3133065982 + addl $0x13572468,0xbabecafe + +// CHECK: addl $324478056, 305419896 + addl $0x13572468,0x12345678 + +// CHECK: incl 3735928559(%ebx,%ecx,8) + incl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: incw 32493 + incw 0x7eed + +// CHECK: incl 3133065982 + incl 0xbabecafe + +// CHECK: incl 305419896 + incl 0x12345678 + +// CHECK: subb $254, 3735928559(%ebx,%ecx,8) + subb $0xfe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: subb $254, 69 + subb $0xfe,0x45 + +// CHECK: subb $254, 32493 + subb $0xfe,0x7eed + +// CHECK: subb $254, 3133065982 + subb $0xfe,0xbabecafe + +// CHECK: subb $254, 305419896 + subb $0xfe,0x12345678 + +// CHECK: subb $127, 3735928559(%ebx,%ecx,8) + subb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: subb $127, 69 + subb $0x7f,0x45 + +// CHECK: subb $127, 32493 + subb $0x7f,0x7eed + +// CHECK: subb $127, 3133065982 + subb $0x7f,0xbabecafe + +// CHECK: subb $127, 305419896 + subb $0x7f,0x12345678 + +// CHECK: subw $31438, 3735928559(%ebx,%ecx,8) + subw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: subw $31438, 69 + subw $0x7ace,0x45 + +// CHECK: subw $31438, 32493 + subw $0x7ace,0x7eed + +// CHECK: subw $31438, 3133065982 + subw $0x7ace,0xbabecafe + +// CHECK: subw $31438, 305419896 + subw $0x7ace,0x12345678 + +// CHECK: subl $2063514302, 3735928559(%ebx,%ecx,8) + subl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: subl $2063514302, 69 + subl $0x7afebabe,0x45 + +// CHECK: subl $2063514302, 32493 + subl $0x7afebabe,0x7eed + +// CHECK: subl $2063514302, 3133065982 + subl $0x7afebabe,0xbabecafe + +// CHECK: subl $2063514302, 305419896 + subl $0x7afebabe,0x12345678 + +// CHECK: subl $324478056, 3735928559(%ebx,%ecx,8) + subl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: subl $324478056, 69 + subl $0x13572468,0x45 + +// CHECK: subl $324478056, 32493 + subl $0x13572468,0x7eed + +// CHECK: subl $324478056, 3133065982 + subl $0x13572468,0xbabecafe + +// CHECK: subl $324478056, 305419896 + subl $0x13572468,0x12345678 + +// CHECK: decl 3735928559(%ebx,%ecx,8) + decl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: decw 32493 + decw 0x7eed + +// CHECK: decl 3133065982 + decl 0xbabecafe + +// CHECK: decl 305419896 + decl 0x12345678 + +// CHECK: sbbb $254, 3735928559(%ebx,%ecx,8) + sbbb $0xfe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: sbbb $254, 69 + sbbb $0xfe,0x45 + +// CHECK: sbbb $254, 32493 + sbbb $0xfe,0x7eed + +// CHECK: sbbb $254, 3133065982 + sbbb $0xfe,0xbabecafe + +// CHECK: sbbb $254, 305419896 + sbbb $0xfe,0x12345678 + +// CHECK: sbbb $127, 3735928559(%ebx,%ecx,8) + sbbb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: sbbb $127, 69 + sbbb $0x7f,0x45 + +// CHECK: sbbb $127, 32493 + sbbb $0x7f,0x7eed + +// CHECK: sbbb $127, 3133065982 + sbbb $0x7f,0xbabecafe + +// CHECK: sbbb $127, 305419896 + sbbb $0x7f,0x12345678 + +// CHECK: sbbw $31438, 3735928559(%ebx,%ecx,8) + sbbw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: sbbw $31438, 69 + sbbw $0x7ace,0x45 + +// CHECK: sbbw $31438, 32493 + sbbw $0x7ace,0x7eed + +// CHECK: sbbw $31438, 3133065982 + sbbw $0x7ace,0xbabecafe + +// CHECK: sbbw $31438, 305419896 + sbbw $0x7ace,0x12345678 + +// CHECK: sbbl $2063514302, 3735928559(%ebx,%ecx,8) + sbbl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: sbbl $2063514302, 69 + sbbl $0x7afebabe,0x45 + +// CHECK: sbbl $2063514302, 32493 + sbbl $0x7afebabe,0x7eed + +// CHECK: sbbl $2063514302, 3133065982 + sbbl $0x7afebabe,0xbabecafe + +// CHECK: sbbl $2063514302, 305419896 + sbbl $0x7afebabe,0x12345678 + +// CHECK: sbbl $324478056, 3735928559(%ebx,%ecx,8) + sbbl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: sbbl $324478056, 69 + sbbl $0x13572468,0x45 + +// CHECK: sbbl $324478056, 32493 + sbbl $0x13572468,0x7eed + +// CHECK: sbbl $324478056, 3133065982 + sbbl $0x13572468,0xbabecafe + +// CHECK: sbbl $324478056, 305419896 + sbbl $0x13572468,0x12345678 + +// CHECK: cmpb $254, 3735928559(%ebx,%ecx,8) + cmpb $0xfe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: cmpb $254, 69 + cmpb $0xfe,0x45 + +// CHECK: cmpb $254, 32493 + cmpb $0xfe,0x7eed + +// CHECK: cmpb $254, 3133065982 + cmpb $0xfe,0xbabecafe + +// CHECK: cmpb $254, 305419896 + cmpb $0xfe,0x12345678 + +// CHECK: cmpb $127, 3735928559(%ebx,%ecx,8) + cmpb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: cmpb $127, 69 + cmpb $0x7f,0x45 + +// CHECK: cmpb $127, 32493 + cmpb $0x7f,0x7eed + +// CHECK: cmpb $127, 3133065982 + cmpb $0x7f,0xbabecafe + +// CHECK: cmpb $127, 305419896 + cmpb $0x7f,0x12345678 + +// CHECK: cmpw $31438, 3735928559(%ebx,%ecx,8) + cmpw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: cmpw $31438, 69 + cmpw $0x7ace,0x45 + +// CHECK: cmpw $31438, 32493 + cmpw $0x7ace,0x7eed + +// CHECK: cmpw $31438, 3133065982 + cmpw $0x7ace,0xbabecafe + +// CHECK: cmpw $31438, 305419896 + cmpw $0x7ace,0x12345678 + +// CHECK: cmpl $2063514302, 3735928559(%ebx,%ecx,8) + cmpl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: cmpl $2063514302, 69 + cmpl $0x7afebabe,0x45 + +// CHECK: cmpl $2063514302, 32493 + cmpl $0x7afebabe,0x7eed + +// CHECK: cmpl $2063514302, 3133065982 + cmpl $0x7afebabe,0xbabecafe + +// CHECK: cmpl $2063514302, 305419896 + cmpl $0x7afebabe,0x12345678 + +// CHECK: cmpl $324478056, 3735928559(%ebx,%ecx,8) + cmpl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: cmpl $324478056, 69 + cmpl $0x13572468,0x45 + +// CHECK: cmpl $324478056, 32493 + cmpl $0x13572468,0x7eed + +// CHECK: cmpl $324478056, 3133065982 + cmpl $0x13572468,0xbabecafe + +// CHECK: cmpl $324478056, 305419896 + cmpl $0x13572468,0x12345678 + +// CHECK: testb $127, 3735928559(%ebx,%ecx,8) + testb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: testb $127, 69 + testb $0x7f,0x45 + +// CHECK: testb $127, 32493 + testb $0x7f,0x7eed + +// CHECK: testb $127, 3133065982 + testb $0x7f,0xbabecafe + +// CHECK: testb $127, 305419896 + testb $0x7f,0x12345678 + +// CHECK: testw $31438, 3735928559(%ebx,%ecx,8) + testw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: testw $31438, 69 + testw $0x7ace,0x45 + +// CHECK: testw $31438, 32493 + testw $0x7ace,0x7eed + +// CHECK: testw $31438, 3133065982 + testw $0x7ace,0xbabecafe + +// CHECK: testw $31438, 305419896 + testw $0x7ace,0x12345678 + +// CHECK: testl $2063514302, 3735928559(%ebx,%ecx,8) + testl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: testl $2063514302, 69 + testl $0x7afebabe,0x45 + +// CHECK: testl $2063514302, 32493 + testl $0x7afebabe,0x7eed + +// CHECK: testl $2063514302, 3133065982 + testl $0x7afebabe,0xbabecafe + +// CHECK: testl $2063514302, 305419896 + testl $0x7afebabe,0x12345678 + +// CHECK: testl $324478056, 3735928559(%ebx,%ecx,8) + testl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: testl $324478056, 69 + testl $0x13572468,0x45 + +// CHECK: testl $324478056, 32493 + testl $0x13572468,0x7eed + +// CHECK: testl $324478056, 3133065982 + testl $0x13572468,0xbabecafe + +// CHECK: testl $324478056, 305419896 + testl $0x13572468,0x12345678 + +// CHECK: andb $254, 3735928559(%ebx,%ecx,8) + andb $0xfe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: andb $254, 69 + andb $0xfe,0x45 + +// CHECK: andb $254, 32493 + andb $0xfe,0x7eed + +// CHECK: andb $254, 3133065982 + andb $0xfe,0xbabecafe + +// CHECK: andb $254, 305419896 + andb $0xfe,0x12345678 + +// CHECK: andb $127, 3735928559(%ebx,%ecx,8) + andb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: andb $127, 69 + andb $0x7f,0x45 + +// CHECK: andb $127, 32493 + andb $0x7f,0x7eed + +// CHECK: andb $127, 3133065982 + andb $0x7f,0xbabecafe + +// CHECK: andb $127, 305419896 + andb $0x7f,0x12345678 + +// CHECK: andw $31438, 3735928559(%ebx,%ecx,8) + andw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: andw $31438, 69 + andw $0x7ace,0x45 + +// CHECK: andw $31438, 32493 + andw $0x7ace,0x7eed + +// CHECK: andw $31438, 3133065982 + andw $0x7ace,0xbabecafe + +// CHECK: andw $31438, 305419896 + andw $0x7ace,0x12345678 + +// CHECK: andl $2063514302, 3735928559(%ebx,%ecx,8) + andl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: andl $2063514302, 69 + andl $0x7afebabe,0x45 + +// CHECK: andl $2063514302, 32493 + andl $0x7afebabe,0x7eed + +// CHECK: andl $2063514302, 3133065982 + andl $0x7afebabe,0xbabecafe + +// CHECK: andl $2063514302, 305419896 + andl $0x7afebabe,0x12345678 + +// CHECK: andl $324478056, 3735928559(%ebx,%ecx,8) + andl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: andl $324478056, 69 + andl $0x13572468,0x45 + +// CHECK: andl $324478056, 32493 + andl $0x13572468,0x7eed + +// CHECK: andl $324478056, 3133065982 + andl $0x13572468,0xbabecafe + +// CHECK: andl $324478056, 305419896 + andl $0x13572468,0x12345678 + +// CHECK: orb $254, 3735928559(%ebx,%ecx,8) + orb $0xfe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: orb $254, 69 + orb $0xfe,0x45 + +// CHECK: orb $254, 32493 + orb $0xfe,0x7eed + +// CHECK: orb $254, 3133065982 + orb $0xfe,0xbabecafe + +// CHECK: orb $254, 305419896 + orb $0xfe,0x12345678 + +// CHECK: orb $127, 3735928559(%ebx,%ecx,8) + orb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: orb $127, 69 + orb $0x7f,0x45 + +// CHECK: orb $127, 32493 + orb $0x7f,0x7eed + +// CHECK: orb $127, 3133065982 + orb $0x7f,0xbabecafe + +// CHECK: orb $127, 305419896 + orb $0x7f,0x12345678 + +// CHECK: orw $31438, 3735928559(%ebx,%ecx,8) + orw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: orw $31438, 69 + orw $0x7ace,0x45 + +// CHECK: orw $31438, 32493 + orw $0x7ace,0x7eed + +// CHECK: orw $31438, 3133065982 + orw $0x7ace,0xbabecafe + +// CHECK: orw $31438, 305419896 + orw $0x7ace,0x12345678 + +// CHECK: orl $2063514302, 3735928559(%ebx,%ecx,8) + orl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: orl $2063514302, 69 + orl $0x7afebabe,0x45 + +// CHECK: orl $2063514302, 32493 + orl $0x7afebabe,0x7eed + +// CHECK: orl $2063514302, 3133065982 + orl $0x7afebabe,0xbabecafe + +// CHECK: orl $2063514302, 305419896 + orl $0x7afebabe,0x12345678 + +// CHECK: orl $324478056, 3735928559(%ebx,%ecx,8) + orl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: orl $324478056, 69 + orl $0x13572468,0x45 + +// CHECK: orl $324478056, 32493 + orl $0x13572468,0x7eed + +// CHECK: orl $324478056, 3133065982 + orl $0x13572468,0xbabecafe + +// CHECK: orl $324478056, 305419896 + orl $0x13572468,0x12345678 + +// CHECK: xorb $254, 3735928559(%ebx,%ecx,8) + xorb $0xfe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: xorb $254, 69 + xorb $0xfe,0x45 + +// CHECK: xorb $254, 32493 + xorb $0xfe,0x7eed + +// CHECK: xorb $254, 3133065982 + xorb $0xfe,0xbabecafe + +// CHECK: xorb $254, 305419896 + xorb $0xfe,0x12345678 + +// CHECK: xorb $127, 3735928559(%ebx,%ecx,8) + xorb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: xorb $127, 69 + xorb $0x7f,0x45 + +// CHECK: xorb $127, 32493 + xorb $0x7f,0x7eed + +// CHECK: xorb $127, 3133065982 + xorb $0x7f,0xbabecafe + +// CHECK: xorb $127, 305419896 + xorb $0x7f,0x12345678 + +// CHECK: xorw $31438, 3735928559(%ebx,%ecx,8) + xorw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: xorw $31438, 69 + xorw $0x7ace,0x45 + +// CHECK: xorw $31438, 32493 + xorw $0x7ace,0x7eed + +// CHECK: xorw $31438, 3133065982 + xorw $0x7ace,0xbabecafe + +// CHECK: xorw $31438, 305419896 + xorw $0x7ace,0x12345678 + +// CHECK: xorl $2063514302, 3735928559(%ebx,%ecx,8) + xorl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: xorl $2063514302, 69 + xorl $0x7afebabe,0x45 + +// CHECK: xorl $2063514302, 32493 + xorl $0x7afebabe,0x7eed + +// CHECK: xorl $2063514302, 3133065982 + xorl $0x7afebabe,0xbabecafe + +// CHECK: xorl $2063514302, 305419896 + xorl $0x7afebabe,0x12345678 + +// CHECK: xorl $324478056, 3735928559(%ebx,%ecx,8) + xorl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: xorl $324478056, 69 + xorl $0x13572468,0x45 + +// CHECK: xorl $324478056, 32493 + xorl $0x13572468,0x7eed + +// CHECK: xorl $324478056, 3133065982 + xorl $0x13572468,0xbabecafe + +// CHECK: xorl $324478056, 305419896 + xorl $0x13572468,0x12345678 + +// CHECK: adcb $254, 3735928559(%ebx,%ecx,8) + adcb $0xfe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: adcb $254, 69 + adcb $0xfe,0x45 + +// CHECK: adcb $254, 32493 + adcb $0xfe,0x7eed + +// CHECK: adcb $254, 3133065982 + adcb $0xfe,0xbabecafe + +// CHECK: adcb $254, 305419896 + adcb $0xfe,0x12345678 + +// CHECK: adcb $127, 3735928559(%ebx,%ecx,8) + adcb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: adcb $127, 69 + adcb $0x7f,0x45 + +// CHECK: adcb $127, 32493 + adcb $0x7f,0x7eed + +// CHECK: adcb $127, 3133065982 + adcb $0x7f,0xbabecafe + +// CHECK: adcb $127, 305419896 + adcb $0x7f,0x12345678 + +// CHECK: adcw $31438, 3735928559(%ebx,%ecx,8) + adcw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: adcw $31438, 69 + adcw $0x7ace,0x45 + +// CHECK: adcw $31438, 32493 + adcw $0x7ace,0x7eed + +// CHECK: adcw $31438, 3133065982 + adcw $0x7ace,0xbabecafe + +// CHECK: adcw $31438, 305419896 + adcw $0x7ace,0x12345678 + +// CHECK: adcl $2063514302, 3735928559(%ebx,%ecx,8) + adcl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: adcl $2063514302, 69 + adcl $0x7afebabe,0x45 + +// CHECK: adcl $2063514302, 32493 + adcl $0x7afebabe,0x7eed + +// CHECK: adcl $2063514302, 3133065982 + adcl $0x7afebabe,0xbabecafe + +// CHECK: adcl $2063514302, 305419896 + adcl $0x7afebabe,0x12345678 + +// CHECK: adcl $324478056, 3735928559(%ebx,%ecx,8) + adcl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: adcl $324478056, 69 + adcl $0x13572468,0x45 + +// CHECK: adcl $324478056, 32493 + adcl $0x13572468,0x7eed + +// CHECK: adcl $324478056, 3133065982 + adcl $0x13572468,0xbabecafe + +// CHECK: adcl $324478056, 305419896 + adcl $0x13572468,0x12345678 + +// CHECK: negl 3735928559(%ebx,%ecx,8) + negl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: negw 32493 + negw 0x7eed + +// CHECK: negl 3133065982 + negl 0xbabecafe + +// CHECK: negl 305419896 + negl 0x12345678 + +// CHECK: notl 3735928559(%ebx,%ecx,8) + notl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: notw 32493 + notw 0x7eed + +// CHECK: notl 3133065982 + notl 0xbabecafe + +// CHECK: notl 305419896 + notl 0x12345678 + +// CHECK: cbtw + cbtw + +// CHECK: cwtl + cwtl + +// CHECK: cwtd + cwtd + +// CHECK: cltd + cltd + +// CHECK: mull 3735928559(%ebx,%ecx,8) + mull 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: mulw 32493 + mulw 0x7eed + +// CHECK: mull 3133065982 + mull 0xbabecafe + +// CHECK: mull 305419896 + mull 0x12345678 + +// CHECK: imull 3735928559(%ebx,%ecx,8) + imull 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: imulw 32493 + imulw 0x7eed + +// CHECK: imull 3133065982 + imull 0xbabecafe + +// CHECK: imull 305419896 + imull 0x12345678 + +// CHECK: divl 3735928559(%ebx,%ecx,8) + divl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: divw 32493 + divw 0x7eed + +// CHECK: divl 3133065982 + divl 0xbabecafe + +// CHECK: divl 305419896 + divl 0x12345678 + +// CHECK: idivl 3735928559(%ebx,%ecx,8) + idivl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: idivw 32493 + idivw 0x7eed + +// CHECK: idivl 3133065982 + idivl 0xbabecafe + +// CHECK: idivl 305419896 + idivl 0x12345678 + +// CHECK: roll $0, 3735928559(%ebx,%ecx,8) + roll $0,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: roll $0, 69 + roll $0,0x45 + +// CHECK: roll $0, 32493 + roll $0,0x7eed + +// CHECK: roll $0, 3133065982 + roll $0,0xbabecafe + +// CHECK: roll $0, 305419896 + roll $0,0x12345678 + +// CHECK: rolb $127, 3735928559(%ebx,%ecx,8) + rolb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: rolb $127, 69 + rolb $0x7f,0x45 + +// CHECK: rolb $127, 32493 + rolb $0x7f,0x7eed + +// CHECK: rolb $127, 3133065982 + rolb $0x7f,0xbabecafe + +// CHECK: rolb $127, 305419896 + rolb $0x7f,0x12345678 + +// CHECK: roll 3735928559(%ebx,%ecx,8) + roll 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: rolw 32493 + rolw 0x7eed + +// CHECK: roll 3133065982 + roll 0xbabecafe + +// CHECK: roll 305419896 + roll 0x12345678 + +// CHECK: rorl $0, 3735928559(%ebx,%ecx,8) + rorl $0,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: rorl $0, 69 + rorl $0,0x45 + +// CHECK: rorl $0, 32493 + rorl $0,0x7eed + +// CHECK: rorl $0, 3133065982 + rorl $0,0xbabecafe + +// CHECK: rorl $0, 305419896 + rorl $0,0x12345678 + +// CHECK: rorb $127, 3735928559(%ebx,%ecx,8) + rorb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: rorb $127, 69 + rorb $0x7f,0x45 + +// CHECK: rorb $127, 32493 + rorb $0x7f,0x7eed + +// CHECK: rorb $127, 3133065982 + rorb $0x7f,0xbabecafe + +// CHECK: rorb $127, 305419896 + rorb $0x7f,0x12345678 + +// CHECK: rorl 3735928559(%ebx,%ecx,8) + rorl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: rorw 32493 + rorw 0x7eed + +// CHECK: rorl 3133065982 + rorl 0xbabecafe + +// CHECK: rorl 305419896 + rorl 0x12345678 + +// CHECK: rcll $0, 3735928559(%ebx,%ecx,8) + rcll $0,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: rcll $0, 69 + rcll $0,0x45 + +// CHECK: rcll $0, 32493 + rcll $0,0x7eed + +// CHECK: rcll $0, 3133065982 + rcll $0,0xbabecafe + +// CHECK: rcll $0, 305419896 + rcll $0,0x12345678 + +// CHECK: rclb $127, 3735928559(%ebx,%ecx,8) + rclb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: rclb $127, 69 + rclb $0x7f,0x45 + +// CHECK: rclb $127, 32493 + rclb $0x7f,0x7eed + +// CHECK: rclb $127, 3133065982 + rclb $0x7f,0xbabecafe + +// CHECK: rclb $127, 305419896 + rclb $0x7f,0x12345678 + +// CHECK: rcrl $0, 3735928559(%ebx,%ecx,8) + rcrl $0,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: rcrl $0, 69 + rcrl $0,0x45 + +// CHECK: rcrl $0, 32493 + rcrl $0,0x7eed + +// CHECK: rcrl $0, 3133065982 + rcrl $0,0xbabecafe + +// CHECK: rcrl $0, 305419896 + rcrl $0,0x12345678 + +// CHECK: rcrb $127, 3735928559(%ebx,%ecx,8) + rcrb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: rcrb $127, 69 + rcrb $0x7f,0x45 + +// CHECK: rcrb $127, 32493 + rcrb $0x7f,0x7eed + +// CHECK: rcrb $127, 3133065982 + rcrb $0x7f,0xbabecafe + +// CHECK: rcrb $127, 305419896 + rcrb $0x7f,0x12345678 + +// CHECK: shll $0, 3735928559(%ebx,%ecx,8) + shll $0,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: shll $0, 69 + shll $0,0x45 + +// CHECK: shll $0, 32493 + shll $0,0x7eed + +// CHECK: shll $0, 3133065982 + shll $0,0xbabecafe + +// CHECK: shll $0, 305419896 + shll $0,0x12345678 + +// CHECK: shlb $127, 3735928559(%ebx,%ecx,8) + shlb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: shlb $127, 69 + shlb $0x7f,0x45 + +// CHECK: shlb $127, 32493 + shlb $0x7f,0x7eed + +// CHECK: shlb $127, 3133065982 + shlb $0x7f,0xbabecafe + +// CHECK: shlb $127, 305419896 + shlb $0x7f,0x12345678 + +// CHECK: shll 3735928559(%ebx,%ecx,8) + shll 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: shlw 32493 + shlw 0x7eed + +// CHECK: shll 3133065982 + shll 0xbabecafe + +// CHECK: shll 305419896 + shll 0x12345678 + +// CHECK: shrl $0, 3735928559(%ebx,%ecx,8) + shrl $0,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: shrl $0, 69 + shrl $0,0x45 + +// CHECK: shrl $0, 32493 + shrl $0,0x7eed + +// CHECK: shrl $0, 3133065982 + shrl $0,0xbabecafe + +// CHECK: shrl $0, 305419896 + shrl $0,0x12345678 + +// CHECK: shrb $127, 3735928559(%ebx,%ecx,8) + shrb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: shrb $127, 69 + shrb $0x7f,0x45 + +// CHECK: shrb $127, 32493 + shrb $0x7f,0x7eed + +// CHECK: shrb $127, 3133065982 + shrb $0x7f,0xbabecafe + +// CHECK: shrb $127, 305419896 + shrb $0x7f,0x12345678 + +// CHECK: shrl 3735928559(%ebx,%ecx,8) + shrl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: shrw 32493 + shrw 0x7eed + +// CHECK: shrl 3133065982 + shrl 0xbabecafe + +// CHECK: shrl 305419896 + shrl 0x12345678 + +// CHECK: sarl $0, 3735928559(%ebx,%ecx,8) + sarl $0,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: sarl $0, 69 + sarl $0,0x45 + +// CHECK: sarl $0, 32493 + sarl $0,0x7eed + +// CHECK: sarl $0, 3133065982 + sarl $0,0xbabecafe + +// CHECK: sarl $0, 305419896 + sarl $0,0x12345678 + +// CHECK: sarb $127, 3735928559(%ebx,%ecx,8) + sarb $0x7f,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: sarb $127, 69 + sarb $0x7f,0x45 + +// CHECK: sarb $127, 32493 + sarb $0x7f,0x7eed + +// CHECK: sarb $127, 3133065982 + sarb $0x7f,0xbabecafe + +// CHECK: sarb $127, 305419896 + sarb $0x7f,0x12345678 + +// CHECK: sarl 3735928559(%ebx,%ecx,8) + sarl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: sarw 32493 + sarw 0x7eed + +// CHECK: sarl 3133065982 + sarl 0xbabecafe + +// CHECK: sarl 305419896 + sarl 0x12345678 + +// CHECK: call 3133065982 + call 0xbabecafe + +// CHECK: call *3735928559(%ebx,%ecx,8) + call *0xdeadbeef(%ebx,%ecx,8) + +// CHECK: call 3133065982 + call 0xbabecafe + +// CHECK: call 305419896 + call 0x12345678 + +// CHECK: call *3135175374 + call *0xbadeface + +// CHECK: call *3735928559(%ebx,%ecx,8) + call *0xdeadbeef(%ebx,%ecx,8) + +// CHECK: call 32493 + call 0x7eed + +// CHECK: call 3133065982 + call 0xbabecafe + +// CHECK: call 305419896 + call 0x12345678 + +// CHECK: call *3135175374 + call *0xbadeface + +// CHECK: lcallw *32493 + lcallw *0x7eed + +// CHECK: jmp 32493 # TAILCALL + jmp 0x7eed + +// CHECK: jmp 3133065982 # TAILCALL + jmp 0xbabecafe + +// CHECK: jmp 305419896 # TAILCALL + jmp 0x12345678 + +// CHECK: jmp -77129852792157442 # TAILCALL + jmp 0xfeedfacebabecafe + +// CHECK: jmp *3735928559(%ebx,%ecx,8) # TAILCALL + jmp *0xdeadbeef(%ebx,%ecx,8) + +// CHECK: jmp 32493 # TAILCALL + jmp 0x7eed + +// CHECK: jmp 3133065982 # TAILCALL + jmp 0xbabecafe + +// CHECK: jmp 305419896 # TAILCALL + jmp 0x12345678 + +// CHECK: jmp *3135175374 # TAILCALL + jmp *0xbadeface + +// CHECK: jmp *3735928559(%ebx,%ecx,8) # TAILCALL + jmp *0xdeadbeef(%ebx,%ecx,8) + +// CHECK: jmp 32493 # TAILCALL + jmp 0x7eed + +// CHECK: jmp 3133065982 # TAILCALL + jmp 0xbabecafe + +// CHECK: jmp 305419896 # TAILCALL + jmp 0x12345678 + +// CHECK: jmp *3135175374 # TAILCALL + jmp *0xbadeface + +// CHECK: ljmpl *3735928559(%ebx,%ecx,8) + ljmpl *0xdeadbeef(%ebx,%ecx,8) + +// CHECK: ljmpw *32493 + ljmpw *0x7eed + +// CHECK: ljmpl *3133065982 + ljmpl *0xbabecafe + +// CHECK: ljmpl *305419896 + ljmpl *0x12345678 + +// CHECK: ret + ret + +// CHECK: lret + lret + +// CHECK: enter $31438, $127 + enter $0x7ace,$0x7f + +// CHECK: leave + leave + +// CHECK: jo 32493 + jo 0x7eed + +// CHECK: jo 3133065982 + jo 0xbabecafe + +// CHECK: jo 305419896 + jo 0x12345678 + +// CHECK: jo -77129852792157442 + jo 0xfeedfacebabecafe + +// CHECK: jno 32493 + jno 0x7eed + +// CHECK: jno 3133065982 + jno 0xbabecafe + +// CHECK: jno 305419896 + jno 0x12345678 + +// CHECK: jno -77129852792157442 + jno 0xfeedfacebabecafe + +// CHECK: jb 32493 + jb 0x7eed + +// CHECK: jb 3133065982 + jb 0xbabecafe + +// CHECK: jb 305419896 + jb 0x12345678 + +// CHECK: jb -77129852792157442 + jb 0xfeedfacebabecafe + +// CHECK: jae 32493 + jae 0x7eed + +// CHECK: jae 3133065982 + jae 0xbabecafe + +// CHECK: jae 305419896 + jae 0x12345678 + +// CHECK: jae -77129852792157442 + jae 0xfeedfacebabecafe + +// CHECK: je 32493 + je 0x7eed + +// CHECK: je 3133065982 + je 0xbabecafe + +// CHECK: je 305419896 + je 0x12345678 + +// CHECK: je -77129852792157442 + je 0xfeedfacebabecafe + +// CHECK: jne 32493 + jne 0x7eed + +// CHECK: jne 3133065982 + jne 0xbabecafe + +// CHECK: jne 305419896 + jne 0x12345678 + +// CHECK: jne -77129852792157442 + jne 0xfeedfacebabecafe + +// CHECK: jbe 32493 + jbe 0x7eed + +// CHECK: jbe 3133065982 + jbe 0xbabecafe + +// CHECK: jbe 305419896 + jbe 0x12345678 + +// CHECK: jbe -77129852792157442 + jbe 0xfeedfacebabecafe + +// CHECK: ja 32493 + ja 0x7eed + +// CHECK: ja 3133065982 + ja 0xbabecafe + +// CHECK: ja 305419896 + ja 0x12345678 + +// CHECK: ja -77129852792157442 + ja 0xfeedfacebabecafe + +// CHECK: js 32493 + js 0x7eed + +// CHECK: js 3133065982 + js 0xbabecafe + +// CHECK: js 305419896 + js 0x12345678 + +// CHECK: js -77129852792157442 + js 0xfeedfacebabecafe + +// CHECK: jns 32493 + jns 0x7eed + +// CHECK: jns 3133065982 + jns 0xbabecafe + +// CHECK: jns 305419896 + jns 0x12345678 + +// CHECK: jns -77129852792157442 + jns 0xfeedfacebabecafe + +// CHECK: jp 32493 + jp 0x7eed + +// CHECK: jp 3133065982 + jp 0xbabecafe + +// CHECK: jp 305419896 + jp 0x12345678 + +// CHECK: jp -77129852792157442 + jp 0xfeedfacebabecafe + +// CHECK: jnp 32493 + jnp 0x7eed + +// CHECK: jnp 3133065982 + jnp 0xbabecafe + +// CHECK: jnp 305419896 + jnp 0x12345678 + +// CHECK: jnp -77129852792157442 + jnp 0xfeedfacebabecafe + +// CHECK: jl 32493 + jl 0x7eed + +// CHECK: jl 3133065982 + jl 0xbabecafe + +// CHECK: jl 305419896 + jl 0x12345678 + +// CHECK: jl -77129852792157442 + jl 0xfeedfacebabecafe + +// CHECK: jge 32493 + jge 0x7eed + +// CHECK: jge 3133065982 + jge 0xbabecafe + +// CHECK: jge 305419896 + jge 0x12345678 + +// CHECK: jge -77129852792157442 + jge 0xfeedfacebabecafe + +// CHECK: jle 32493 + jle 0x7eed + +// CHECK: jle 3133065982 + jle 0xbabecafe + +// CHECK: jle 305419896 + jle 0x12345678 + +// CHECK: jle -77129852792157442 + jle 0xfeedfacebabecafe + +// CHECK: jg 32493 + jg 0x7eed + +// CHECK: jg 3133065982 + jg 0xbabecafe + +// CHECK: jg 305419896 + jg 0x12345678 + +// CHECK: jg -77129852792157442 + jg 0xfeedfacebabecafe + +// CHECK: seto %bl + seto %bl + +// CHECK: seto 3735928559(%ebx,%ecx,8) + seto 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: seto 32493 + seto 0x7eed + +// CHECK: seto 3133065982 + seto 0xbabecafe + +// CHECK: seto 305419896 + seto 0x12345678 + +// CHECK: setno %bl + setno %bl + +// CHECK: setno 3735928559(%ebx,%ecx,8) + setno 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: setno 32493 + setno 0x7eed + +// CHECK: setno 3133065982 + setno 0xbabecafe + +// CHECK: setno 305419896 + setno 0x12345678 + +// CHECK: setb %bl + setb %bl + +// CHECK: setb 3735928559(%ebx,%ecx,8) + setb 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: setb 32493 + setb 0x7eed + +// CHECK: setb 3133065982 + setb 0xbabecafe + +// CHECK: setb 305419896 + setb 0x12345678 + +// CHECK: setae %bl + setae %bl + +// CHECK: setae 3735928559(%ebx,%ecx,8) + setae 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: setae 32493 + setae 0x7eed + +// CHECK: setae 3133065982 + setae 0xbabecafe + +// CHECK: setae 305419896 + setae 0x12345678 + +// CHECK: sete %bl + sete %bl + +// CHECK: sete 3735928559(%ebx,%ecx,8) + sete 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: sete 32493 + sete 0x7eed + +// CHECK: sete 3133065982 + sete 0xbabecafe + +// CHECK: sete 305419896 + sete 0x12345678 + +// CHECK: setne %bl + setne %bl + +// CHECK: setne 3735928559(%ebx,%ecx,8) + setne 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: setne 32493 + setne 0x7eed + +// CHECK: setne 3133065982 + setne 0xbabecafe + +// CHECK: setne 305419896 + setne 0x12345678 + +// CHECK: setbe %bl + setbe %bl + +// CHECK: setbe 3735928559(%ebx,%ecx,8) + setbe 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: setbe 32493 + setbe 0x7eed + +// CHECK: setbe 3133065982 + setbe 0xbabecafe + +// CHECK: setbe 305419896 + setbe 0x12345678 + +// CHECK: seta %bl + seta %bl + +// CHECK: seta 3735928559(%ebx,%ecx,8) + seta 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: seta 32493 + seta 0x7eed + +// CHECK: seta 3133065982 + seta 0xbabecafe + +// CHECK: seta 305419896 + seta 0x12345678 + +// CHECK: sets %bl + sets %bl + +// CHECK: sets 3735928559(%ebx,%ecx,8) + sets 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: sets 32493 + sets 0x7eed + +// CHECK: sets 3133065982 + sets 0xbabecafe + +// CHECK: sets 305419896 + sets 0x12345678 + +// CHECK: setns %bl + setns %bl + +// CHECK: setns 3735928559(%ebx,%ecx,8) + setns 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: setns 32493 + setns 0x7eed + +// CHECK: setns 3133065982 + setns 0xbabecafe + +// CHECK: setns 305419896 + setns 0x12345678 + +// CHECK: setp %bl + setp %bl + +// CHECK: setp 3735928559(%ebx,%ecx,8) + setp 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: setp 32493 + setp 0x7eed + +// CHECK: setp 3133065982 + setp 0xbabecafe + +// CHECK: setp 305419896 + setp 0x12345678 + +// CHECK: setnp %bl + setnp %bl + +// CHECK: setnp 3735928559(%ebx,%ecx,8) + setnp 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: setnp 32493 + setnp 0x7eed + +// CHECK: setnp 3133065982 + setnp 0xbabecafe + +// CHECK: setnp 305419896 + setnp 0x12345678 + +// CHECK: setl %bl + setl %bl + +// CHECK: setl 3735928559(%ebx,%ecx,8) + setl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: setl 32493 + setl 0x7eed + +// CHECK: setl 3133065982 + setl 0xbabecafe + +// CHECK: setl 305419896 + setl 0x12345678 + +// CHECK: setge %bl + setge %bl + +// CHECK: setge 3735928559(%ebx,%ecx,8) + setge 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: setge 32493 + setge 0x7eed + +// CHECK: setge 3133065982 + setge 0xbabecafe + +// CHECK: setge 305419896 + setge 0x12345678 + +// CHECK: setle %bl + setle %bl + +// CHECK: setle 3735928559(%ebx,%ecx,8) + setle 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: setle 32493 + setle 0x7eed + +// CHECK: setle 3133065982 + setle 0xbabecafe + +// CHECK: setle 305419896 + setle 0x12345678 + +// CHECK: setg %bl + setg %bl + +// CHECK: setg 3735928559(%ebx,%ecx,8) + setg 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: setg 32493 + setg 0x7eed + +// CHECK: setg 3133065982 + setg 0xbabecafe + +// CHECK: setg 305419896 + setg 0x12345678 + +// CHECK: int $127 + int $0x7f + +// CHECK: rsm + rsm + +// CHECK: hlt + hlt + +// CHECK: nopl 3735928559(%ebx,%ecx,8) + nopl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: nopw 32493 + nopw 0x7eed + +// CHECK: nopl 3133065982 + nopl 0xbabecafe + +// CHECK: nopl 305419896 + nopl 0x12345678 + +// CHECK: nop + nop + +// CHECK: lldtw 32493 + lldtw 0x7eed + +// CHECK: lmsww 32493 + lmsww 0x7eed + +// CHECK: ltrw 32493 + ltrw 0x7eed + +// CHECK: sldtw 32493 + sldtw 0x7eed + +// CHECK: smsww 32493 + smsww 0x7eed + +// CHECK: strw 32493 + strw 0x7eed + +// CHECK: verr %bx + verr %bx + +// CHECK: verr 3735928559(%ebx,%ecx,8) + verr 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: verr 3133065982 + verr 0xbabecafe + +// CHECK: verr 305419896 + verr 0x12345678 + +// CHECK: verw %bx + verw %bx + +// CHECK: verw 3735928559(%ebx,%ecx,8) + verw 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: verw 3133065982 + verw 0xbabecafe + +// CHECK: verw 305419896 + verw 0x12345678 + +// CHECK: fldl 3735928559(%ebx,%ecx,8) + fldl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fldl 3133065982 + fldl 0xbabecafe + +// CHECK: fldl 305419896 + fldl 0x12345678 + +// CHECK: fildl 3735928559(%ebx,%ecx,8) + fildl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fildl 3133065982 + fildl 0xbabecafe + +// CHECK: fildl 305419896 + fildl 0x12345678 + +// CHECK: fildll 3735928559(%ebx,%ecx,8) + fildll 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fildll 32493 + fildll 0x7eed + +// CHECK: fildll 3133065982 + fildll 0xbabecafe + +// CHECK: fildll 305419896 + fildll 0x12345678 + +// CHECK: fldt 3735928559(%ebx,%ecx,8) + fldt 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fldt 32493 + fldt 0x7eed + +// CHECK: fldt 3133065982 + fldt 0xbabecafe + +// CHECK: fldt 305419896 + fldt 0x12345678 + +// CHECK: fbld 3735928559(%ebx,%ecx,8) + fbld 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fbld 32493 + fbld 0x7eed + +// CHECK: fbld 3133065982 + fbld 0xbabecafe + +// CHECK: fbld 305419896 + fbld 0x12345678 + +// CHECK: fstl 3735928559(%ebx,%ecx,8) + fstl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fstl 3133065982 + fstl 0xbabecafe + +// CHECK: fstl 305419896 + fstl 0x12345678 + +// CHECK: fistl 3735928559(%ebx,%ecx,8) + fistl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fistl 3133065982 + fistl 0xbabecafe + +// CHECK: fistl 305419896 + fistl 0x12345678 + +// CHECK: fstpl 3735928559(%ebx,%ecx,8) + fstpl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fstpl 3133065982 + fstpl 0xbabecafe + +// CHECK: fstpl 305419896 + fstpl 0x12345678 + +// CHECK: fistpl 3735928559(%ebx,%ecx,8) + fistpl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fistpl 3133065982 + fistpl 0xbabecafe + +// CHECK: fistpl 305419896 + fistpl 0x12345678 + +// CHECK: fistpll 3735928559(%ebx,%ecx,8) + fistpll 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fistpll 32493 + fistpll 0x7eed + +// CHECK: fistpll 3133065982 + fistpll 0xbabecafe + +// CHECK: fistpll 305419896 + fistpll 0x12345678 + +// CHECK: fstpt 3735928559(%ebx,%ecx,8) + fstpt 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fstpt 32493 + fstpt 0x7eed + +// CHECK: fstpt 3133065982 + fstpt 0xbabecafe + +// CHECK: fstpt 305419896 + fstpt 0x12345678 + +// CHECK: fbstp 3735928559(%ebx,%ecx,8) + fbstp 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fbstp 32493 + fbstp 0x7eed + +// CHECK: fbstp 3133065982 + fbstp 0xbabecafe + +// CHECK: fbstp 305419896 + fbstp 0x12345678 + +// CHECK: fcoml 3735928559(%ebx,%ecx,8) + fcoml 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fcoml 3133065982 + fcoml 0xbabecafe + +// CHECK: fcoml 305419896 + fcoml 0x12345678 + +// CHECK: ficoml 3735928559(%ebx,%ecx,8) + ficoml 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: ficoml 3133065982 + ficoml 0xbabecafe + +// CHECK: ficoml 305419896 + ficoml 0x12345678 + +// CHECK: fcompl 3735928559(%ebx,%ecx,8) + fcompl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fcompl 3133065982 + fcompl 0xbabecafe + +// CHECK: fcompl 305419896 + fcompl 0x12345678 + +// CHECK: ficompl 3735928559(%ebx,%ecx,8) + ficompl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: ficompl 3133065982 + ficompl 0xbabecafe + +// CHECK: ficompl 305419896 + ficompl 0x12345678 + +// CHECK: fcompp + fcompp + +// CHECK: fucompp + fucompp + +// CHECK: ftst + ftst + +// CHECK: fxam + fxam + +// CHECK: fld1 + fld1 + +// CHECK: fldl2t + fldl2t + +// CHECK: fldl2e + fldl2e + +// CHECK: fldpi + fldpi + +// CHECK: fldlg2 + fldlg2 + +// CHECK: fldln2 + fldln2 + +// CHECK: fldz + fldz + +// CHECK: faddl 3735928559(%ebx,%ecx,8) + faddl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: faddl 3133065982 + faddl 0xbabecafe + +// CHECK: faddl 305419896 + faddl 0x12345678 + +// CHECK: fiaddl 3735928559(%ebx,%ecx,8) + fiaddl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fiaddl 3133065982 + fiaddl 0xbabecafe + +// CHECK: fiaddl 305419896 + fiaddl 0x12345678 + +// CHECK: fsubl 3735928559(%ebx,%ecx,8) + fsubl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fsubl 3133065982 + fsubl 0xbabecafe + +// CHECK: fsubl 305419896 + fsubl 0x12345678 + +// CHECK: fisubl 3735928559(%ebx,%ecx,8) + fisubl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fisubl 3133065982 + fisubl 0xbabecafe + +// CHECK: fisubl 305419896 + fisubl 0x12345678 + +// CHECK: fsubrl 3735928559(%ebx,%ecx,8) + fsubrl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fsubrl 3133065982 + fsubrl 0xbabecafe + +// CHECK: fsubrl 305419896 + fsubrl 0x12345678 + +// CHECK: fisubrl 3735928559(%ebx,%ecx,8) + fisubrl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fisubrl 3133065982 + fisubrl 0xbabecafe + +// CHECK: fisubrl 305419896 + fisubrl 0x12345678 + +// CHECK: fmull 3735928559(%ebx,%ecx,8) + fmull 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fmull 3133065982 + fmull 0xbabecafe + +// CHECK: fmull 305419896 + fmull 0x12345678 + +// CHECK: fimull 3735928559(%ebx,%ecx,8) + fimull 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fimull 3133065982 + fimull 0xbabecafe + +// CHECK: fimull 305419896 + fimull 0x12345678 + +// CHECK: fdivl 3735928559(%ebx,%ecx,8) + fdivl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fdivl 3133065982 + fdivl 0xbabecafe + +// CHECK: fdivl 305419896 + fdivl 0x12345678 + +// CHECK: fidivl 3735928559(%ebx,%ecx,8) + fidivl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fidivl 3133065982 + fidivl 0xbabecafe + +// CHECK: fidivl 305419896 + fidivl 0x12345678 + +// CHECK: fdivrl 3735928559(%ebx,%ecx,8) + fdivrl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fdivrl 3133065982 + fdivrl 0xbabecafe + +// CHECK: fdivrl 305419896 + fdivrl 0x12345678 + +// CHECK: fidivrl 3735928559(%ebx,%ecx,8) + fidivrl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fidivrl 3133065982 + fidivrl 0xbabecafe + +// CHECK: fidivrl 305419896 + fidivrl 0x12345678 + +// CHECK: f2xm1 + f2xm1 + +// CHECK: fyl2x + fyl2x + +// CHECK: fptan + fptan + +// CHECK: fpatan + fpatan + +// CHECK: fxtract + fxtract + +// CHECK: fprem1 + fprem1 + +// CHECK: fdecstp + fdecstp + +// CHECK: fincstp + fincstp + +// CHECK: fprem + fprem + +// CHECK: fyl2xp1 + fyl2xp1 + +// CHECK: fsqrt + fsqrt + +// CHECK: fsincos + fsincos + +// CHECK: frndint + frndint + +// CHECK: fscale + fscale + +// CHECK: fsin + fsin + +// CHECK: fcos + fcos + +// CHECK: fchs + fchs + +// CHECK: fabs + fabs + +// CHECK: fninit + fninit + +// CHECK: fldcw 3735928559(%ebx,%ecx,8) + fldcw 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fldcw 3133065982 + fldcw 0xbabecafe + +// CHECK: fldcw 305419896 + fldcw 0x12345678 + +// CHECK: fnstcw 3735928559(%ebx,%ecx,8) + fnstcw 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fnstcw 3133065982 + fnstcw 0xbabecafe + +// CHECK: fnstcw 305419896 + fnstcw 0x12345678 + +// CHECK: fnstsw 3735928559(%ebx,%ecx,8) + fnstsw 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fnstsw 3133065982 + fnstsw 0xbabecafe + +// CHECK: fnstsw 305419896 + fnstsw 0x12345678 + +// CHECK: fnclex + fnclex + +// CHECK: fnstenv 32493 + fnstenv 0x7eed + +// CHECK: fldenv 32493 + fldenv 0x7eed + +// CHECK: fnsave 32493 + fnsave 0x7eed + +// CHECK: frstor 32493 + frstor 0x7eed + +// CHECK: fnop + fnop + +// CHECK: invd + invd + +// CHECK: wbinvd + wbinvd + +// CHECK: cpuid + cpuid + +// CHECK: wrmsr + wrmsr + +// CHECK: rdtsc + rdtsc + +// CHECK: rdmsr + rdmsr + +// CHECK: cmpxchg8b 3735928559(%ebx,%ecx,8) + cmpxchg8b 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: cmpxchg8b 32493 + cmpxchg8b 0x7eed + +// CHECK: cmpxchg8b 3133065982 + cmpxchg8b 0xbabecafe + +// CHECK: cmpxchg8b 305419896 + cmpxchg8b 0x12345678 + +// CHECK: sysenter + sysenter + +// CHECK: sysexit + sysexit + +// CHECK: fxsave 3735928559(%ebx,%ecx,8) + fxsave 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fxsave 32493 + fxsave 0x7eed + +// CHECK: fxsave 3133065982 + fxsave 0xbabecafe + +// CHECK: fxsave 305419896 + fxsave 0x12345678 + +// CHECK: fxrstor 3735928559(%ebx,%ecx,8) + fxrstor 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fxrstor 32493 + fxrstor 0x7eed + +// CHECK: fxrstor 3133065982 + fxrstor 0xbabecafe + +// CHECK: fxrstor 305419896 + fxrstor 0x12345678 + +// CHECK: rdpmc + rdpmc + +// CHECK: ud2 + ud2 + +// CHECK: movnti %ecx, 3735928559(%ebx,%ecx,8) + movnti %ecx,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movnti %ecx, 69 + movnti %ecx,0x45 + +// CHECK: movnti %ecx, 32493 + movnti %ecx,0x7eed + +// CHECK: movnti %ecx, 3133065982 + movnti %ecx,0xbabecafe + +// CHECK: movnti %ecx, 305419896 + movnti %ecx,0x12345678 + +// CHECK: clflush 3735928559(%ebx,%ecx,8) + clflush 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: clflush 32493 + clflush 0x7eed + +// CHECK: clflush 3133065982 + clflush 0xbabecafe + +// CHECK: clflush 305419896 + clflush 0x12345678 + +// CHECK: lfence + lfence + +// CHECK: mfence + mfence + +// CHECK: emms + emms + +// CHECK: movd %ecx, %mm3 + movd %ecx,%mm3 + +// CHECK: movd 3735928559(%ebx,%ecx,8), %mm3 + movd 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: movd 69, %mm3 + movd 0x45,%mm3 + +// CHECK: movd 32493, %mm3 + movd 0x7eed,%mm3 + +// CHECK: movd 3133065982, %mm3 + movd 0xbabecafe,%mm3 + +// CHECK: movd 305419896, %mm3 + movd 0x12345678,%mm3 + +// CHECK: movd %mm3, %ecx + movd %mm3,%ecx + +// CHECK: movd %mm3, 3735928559(%ebx,%ecx,8) + movd %mm3,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movd %mm3, 69 + movd %mm3,0x45 + +// CHECK: movd %mm3, 32493 + movd %mm3,0x7eed + +// CHECK: movd %mm3, 3133065982 + movd %mm3,0xbabecafe + +// CHECK: movd %mm3, 305419896 + movd %mm3,0x12345678 + +// CHECK: movd %ecx, %xmm5 + movd %ecx,%xmm5 + +// CHECK: movd 3735928559(%ebx,%ecx,8), %xmm5 + movd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movd 69, %xmm5 + movd 0x45,%xmm5 + +// CHECK: movd 32493, %xmm5 + movd 0x7eed,%xmm5 + +// CHECK: movd 3133065982, %xmm5 + movd 0xbabecafe,%xmm5 + +// CHECK: movd 305419896, %xmm5 + movd 0x12345678,%xmm5 + +// CHECK: movd %xmm5, %ecx + movd %xmm5,%ecx + +// CHECK: movd %xmm5, 3735928559(%ebx,%ecx,8) + movd %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movd %xmm5, 69 + movd %xmm5,0x45 + +// CHECK: movd %xmm5, 32493 + movd %xmm5,0x7eed + +// CHECK: movd %xmm5, 3133065982 + movd %xmm5,0xbabecafe + +// CHECK: movd %xmm5, 305419896 + movd %xmm5,0x12345678 + +// CHECK: movq 3735928559(%ebx,%ecx,8), %mm3 + movq 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: movq 69, %mm3 + movq 0x45,%mm3 + +// CHECK: movq 32493, %mm3 + movq 0x7eed,%mm3 + +// CHECK: movq 3133065982, %mm3 + movq 0xbabecafe,%mm3 + +// CHECK: movq 305419896, %mm3 + movq 0x12345678,%mm3 + +// CHECK: movq %mm3, %mm3 + movq %mm3,%mm3 + +// CHECK: movq %mm3, 3735928559(%ebx,%ecx,8) + movq %mm3,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movq %mm3, 69 + movq %mm3,0x45 + +// CHECK: movq %mm3, 32493 + movq %mm3,0x7eed + +// CHECK: movq %mm3, 3133065982 + movq %mm3,0xbabecafe + +// CHECK: movq %mm3, 305419896 + movq %mm3,0x12345678 + +// CHECK: movq %mm3, %mm3 + movq %mm3,%mm3 + +// CHECK: movq 3735928559(%ebx,%ecx,8), %xmm5 + movq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movq 69, %xmm5 + movq 0x45,%xmm5 + +// CHECK: movq 32493, %xmm5 + movq 0x7eed,%xmm5 + +// CHECK: movq 3133065982, %xmm5 + movq 0xbabecafe,%xmm5 + +// CHECK: movq 305419896, %xmm5 + movq 0x12345678,%xmm5 + +// CHECK: movq %xmm5, %xmm5 + movq %xmm5,%xmm5 + +// CHECK: movq %xmm5, 3735928559(%ebx,%ecx,8) + movq %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movq %xmm5, 69 + movq %xmm5,0x45 + +// CHECK: movq %xmm5, 32493 + movq %xmm5,0x7eed + +// CHECK: movq %xmm5, 3133065982 + movq %xmm5,0xbabecafe + +// CHECK: movq %xmm5, 305419896 + movq %xmm5,0x12345678 + +// CHECK: movq %xmm5, %xmm5 + movq %xmm5,%xmm5 + +// CHECK: packssdw 3735928559(%ebx,%ecx,8), %mm3 + packssdw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: packssdw 69, %mm3 + packssdw 0x45,%mm3 + +// CHECK: packssdw 32493, %mm3 + packssdw 0x7eed,%mm3 + +// CHECK: packssdw 3133065982, %mm3 + packssdw 0xbabecafe,%mm3 + +// CHECK: packssdw 305419896, %mm3 + packssdw 0x12345678,%mm3 + +// CHECK: packssdw %mm3, %mm3 + packssdw %mm3,%mm3 + +// CHECK: packssdw 3735928559(%ebx,%ecx,8), %xmm5 + packssdw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: packssdw 69, %xmm5 + packssdw 0x45,%xmm5 + +// CHECK: packssdw 32493, %xmm5 + packssdw 0x7eed,%xmm5 + +// CHECK: packssdw 3133065982, %xmm5 + packssdw 0xbabecafe,%xmm5 + +// CHECK: packssdw 305419896, %xmm5 + packssdw 0x12345678,%xmm5 + +// CHECK: packssdw %xmm5, %xmm5 + packssdw %xmm5,%xmm5 + +// CHECK: packsswb 3735928559(%ebx,%ecx,8), %mm3 + packsswb 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: packsswb 69, %mm3 + packsswb 0x45,%mm3 + +// CHECK: packsswb 32493, %mm3 + packsswb 0x7eed,%mm3 + +// CHECK: packsswb 3133065982, %mm3 + packsswb 0xbabecafe,%mm3 + +// CHECK: packsswb 305419896, %mm3 + packsswb 0x12345678,%mm3 + +// CHECK: packsswb %mm3, %mm3 + packsswb %mm3,%mm3 + +// CHECK: packsswb 3735928559(%ebx,%ecx,8), %xmm5 + packsswb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: packsswb 69, %xmm5 + packsswb 0x45,%xmm5 + +// CHECK: packsswb 32493, %xmm5 + packsswb 0x7eed,%xmm5 + +// CHECK: packsswb 3133065982, %xmm5 + packsswb 0xbabecafe,%xmm5 + +// CHECK: packsswb 305419896, %xmm5 + packsswb 0x12345678,%xmm5 + +// CHECK: packsswb %xmm5, %xmm5 + packsswb %xmm5,%xmm5 + +// CHECK: packuswb 3735928559(%ebx,%ecx,8), %mm3 + packuswb 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: packuswb 69, %mm3 + packuswb 0x45,%mm3 + +// CHECK: packuswb 32493, %mm3 + packuswb 0x7eed,%mm3 + +// CHECK: packuswb 3133065982, %mm3 + packuswb 0xbabecafe,%mm3 + +// CHECK: packuswb 305419896, %mm3 + packuswb 0x12345678,%mm3 + +// CHECK: packuswb %mm3, %mm3 + packuswb %mm3,%mm3 + +// CHECK: packuswb 3735928559(%ebx,%ecx,8), %xmm5 + packuswb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: packuswb 69, %xmm5 + packuswb 0x45,%xmm5 + +// CHECK: packuswb 32493, %xmm5 + packuswb 0x7eed,%xmm5 + +// CHECK: packuswb 3133065982, %xmm5 + packuswb 0xbabecafe,%xmm5 + +// CHECK: packuswb 305419896, %xmm5 + packuswb 0x12345678,%xmm5 + +// CHECK: packuswb %xmm5, %xmm5 + packuswb %xmm5,%xmm5 + +// CHECK: paddb 3735928559(%ebx,%ecx,8), %mm3 + paddb 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: paddb 69, %mm3 + paddb 0x45,%mm3 + +// CHECK: paddb 32493, %mm3 + paddb 0x7eed,%mm3 + +// CHECK: paddb 3133065982, %mm3 + paddb 0xbabecafe,%mm3 + +// CHECK: paddb 305419896, %mm3 + paddb 0x12345678,%mm3 + +// CHECK: paddb %mm3, %mm3 + paddb %mm3,%mm3 + +// CHECK: paddb 3735928559(%ebx,%ecx,8), %xmm5 + paddb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: paddb 69, %xmm5 + paddb 0x45,%xmm5 + +// CHECK: paddb 32493, %xmm5 + paddb 0x7eed,%xmm5 + +// CHECK: paddb 3133065982, %xmm5 + paddb 0xbabecafe,%xmm5 + +// CHECK: paddb 305419896, %xmm5 + paddb 0x12345678,%xmm5 + +// CHECK: paddb %xmm5, %xmm5 + paddb %xmm5,%xmm5 + +// CHECK: paddw 3735928559(%ebx,%ecx,8), %mm3 + paddw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: paddw 69, %mm3 + paddw 0x45,%mm3 + +// CHECK: paddw 32493, %mm3 + paddw 0x7eed,%mm3 + +// CHECK: paddw 3133065982, %mm3 + paddw 0xbabecafe,%mm3 + +// CHECK: paddw 305419896, %mm3 + paddw 0x12345678,%mm3 + +// CHECK: paddw %mm3, %mm3 + paddw %mm3,%mm3 + +// CHECK: paddw 3735928559(%ebx,%ecx,8), %xmm5 + paddw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: paddw 69, %xmm5 + paddw 0x45,%xmm5 + +// CHECK: paddw 32493, %xmm5 + paddw 0x7eed,%xmm5 + +// CHECK: paddw 3133065982, %xmm5 + paddw 0xbabecafe,%xmm5 + +// CHECK: paddw 305419896, %xmm5 + paddw 0x12345678,%xmm5 + +// CHECK: paddw %xmm5, %xmm5 + paddw %xmm5,%xmm5 + +// CHECK: paddd 3735928559(%ebx,%ecx,8), %mm3 + paddd 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: paddd 69, %mm3 + paddd 0x45,%mm3 + +// CHECK: paddd 32493, %mm3 + paddd 0x7eed,%mm3 + +// CHECK: paddd 3133065982, %mm3 + paddd 0xbabecafe,%mm3 + +// CHECK: paddd 305419896, %mm3 + paddd 0x12345678,%mm3 + +// CHECK: paddd %mm3, %mm3 + paddd %mm3,%mm3 + +// CHECK: paddd 3735928559(%ebx,%ecx,8), %xmm5 + paddd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: paddd 69, %xmm5 + paddd 0x45,%xmm5 + +// CHECK: paddd 32493, %xmm5 + paddd 0x7eed,%xmm5 + +// CHECK: paddd 3133065982, %xmm5 + paddd 0xbabecafe,%xmm5 + +// CHECK: paddd 305419896, %xmm5 + paddd 0x12345678,%xmm5 + +// CHECK: paddd %xmm5, %xmm5 + paddd %xmm5,%xmm5 + +// CHECK: paddq 3735928559(%ebx,%ecx,8), %mm3 + paddq 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: paddq 69, %mm3 + paddq 0x45,%mm3 + +// CHECK: paddq 32493, %mm3 + paddq 0x7eed,%mm3 + +// CHECK: paddq 3133065982, %mm3 + paddq 0xbabecafe,%mm3 + +// CHECK: paddq 305419896, %mm3 + paddq 0x12345678,%mm3 + +// CHECK: paddq %mm3, %mm3 + paddq %mm3,%mm3 + +// CHECK: paddq 3735928559(%ebx,%ecx,8), %xmm5 + paddq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: paddq 69, %xmm5 + paddq 0x45,%xmm5 + +// CHECK: paddq 32493, %xmm5 + paddq 0x7eed,%xmm5 + +// CHECK: paddq 3133065982, %xmm5 + paddq 0xbabecafe,%xmm5 + +// CHECK: paddq 305419896, %xmm5 + paddq 0x12345678,%xmm5 + +// CHECK: paddq %xmm5, %xmm5 + paddq %xmm5,%xmm5 + +// CHECK: paddsb 3735928559(%ebx,%ecx,8), %mm3 + paddsb 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: paddsb 69, %mm3 + paddsb 0x45,%mm3 + +// CHECK: paddsb 32493, %mm3 + paddsb 0x7eed,%mm3 + +// CHECK: paddsb 3133065982, %mm3 + paddsb 0xbabecafe,%mm3 + +// CHECK: paddsb 305419896, %mm3 + paddsb 0x12345678,%mm3 + +// CHECK: paddsb %mm3, %mm3 + paddsb %mm3,%mm3 + +// CHECK: paddsb 3735928559(%ebx,%ecx,8), %xmm5 + paddsb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: paddsb 69, %xmm5 + paddsb 0x45,%xmm5 + +// CHECK: paddsb 32493, %xmm5 + paddsb 0x7eed,%xmm5 + +// CHECK: paddsb 3133065982, %xmm5 + paddsb 0xbabecafe,%xmm5 + +// CHECK: paddsb 305419896, %xmm5 + paddsb 0x12345678,%xmm5 + +// CHECK: paddsb %xmm5, %xmm5 + paddsb %xmm5,%xmm5 + +// CHECK: paddsw 3735928559(%ebx,%ecx,8), %mm3 + paddsw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: paddsw 69, %mm3 + paddsw 0x45,%mm3 + +// CHECK: paddsw 32493, %mm3 + paddsw 0x7eed,%mm3 + +// CHECK: paddsw 3133065982, %mm3 + paddsw 0xbabecafe,%mm3 + +// CHECK: paddsw 305419896, %mm3 + paddsw 0x12345678,%mm3 + +// CHECK: paddsw %mm3, %mm3 + paddsw %mm3,%mm3 + +// CHECK: paddsw 3735928559(%ebx,%ecx,8), %xmm5 + paddsw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: paddsw 69, %xmm5 + paddsw 0x45,%xmm5 + +// CHECK: paddsw 32493, %xmm5 + paddsw 0x7eed,%xmm5 + +// CHECK: paddsw 3133065982, %xmm5 + paddsw 0xbabecafe,%xmm5 + +// CHECK: paddsw 305419896, %xmm5 + paddsw 0x12345678,%xmm5 + +// CHECK: paddsw %xmm5, %xmm5 + paddsw %xmm5,%xmm5 + +// CHECK: paddusb 3735928559(%ebx,%ecx,8), %mm3 + paddusb 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: paddusb 69, %mm3 + paddusb 0x45,%mm3 + +// CHECK: paddusb 32493, %mm3 + paddusb 0x7eed,%mm3 + +// CHECK: paddusb 3133065982, %mm3 + paddusb 0xbabecafe,%mm3 + +// CHECK: paddusb 305419896, %mm3 + paddusb 0x12345678,%mm3 + +// CHECK: paddusb %mm3, %mm3 + paddusb %mm3,%mm3 + +// CHECK: paddusb 3735928559(%ebx,%ecx,8), %xmm5 + paddusb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: paddusb 69, %xmm5 + paddusb 0x45,%xmm5 + +// CHECK: paddusb 32493, %xmm5 + paddusb 0x7eed,%xmm5 + +// CHECK: paddusb 3133065982, %xmm5 + paddusb 0xbabecafe,%xmm5 + +// CHECK: paddusb 305419896, %xmm5 + paddusb 0x12345678,%xmm5 + +// CHECK: paddusb %xmm5, %xmm5 + paddusb %xmm5,%xmm5 + +// CHECK: paddusw 3735928559(%ebx,%ecx,8), %mm3 + paddusw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: paddusw 69, %mm3 + paddusw 0x45,%mm3 + +// CHECK: paddusw 32493, %mm3 + paddusw 0x7eed,%mm3 + +// CHECK: paddusw 3133065982, %mm3 + paddusw 0xbabecafe,%mm3 + +// CHECK: paddusw 305419896, %mm3 + paddusw 0x12345678,%mm3 + +// CHECK: paddusw %mm3, %mm3 + paddusw %mm3,%mm3 + +// CHECK: paddusw 3735928559(%ebx,%ecx,8), %xmm5 + paddusw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: paddusw 69, %xmm5 + paddusw 0x45,%xmm5 + +// CHECK: paddusw 32493, %xmm5 + paddusw 0x7eed,%xmm5 + +// CHECK: paddusw 3133065982, %xmm5 + paddusw 0xbabecafe,%xmm5 + +// CHECK: paddusw 305419896, %xmm5 + paddusw 0x12345678,%xmm5 + +// CHECK: paddusw %xmm5, %xmm5 + paddusw %xmm5,%xmm5 + +// CHECK: pand 3735928559(%ebx,%ecx,8), %mm3 + pand 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pand 69, %mm3 + pand 0x45,%mm3 + +// CHECK: pand 32493, %mm3 + pand 0x7eed,%mm3 + +// CHECK: pand 3133065982, %mm3 + pand 0xbabecafe,%mm3 + +// CHECK: pand 305419896, %mm3 + pand 0x12345678,%mm3 + +// CHECK: pand %mm3, %mm3 + pand %mm3,%mm3 + +// CHECK: pand 3735928559(%ebx,%ecx,8), %xmm5 + pand 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pand 69, %xmm5 + pand 0x45,%xmm5 + +// CHECK: pand 32493, %xmm5 + pand 0x7eed,%xmm5 + +// CHECK: pand 3133065982, %xmm5 + pand 0xbabecafe,%xmm5 + +// CHECK: pand 305419896, %xmm5 + pand 0x12345678,%xmm5 + +// CHECK: pand %xmm5, %xmm5 + pand %xmm5,%xmm5 + +// CHECK: pandn 3735928559(%ebx,%ecx,8), %mm3 + pandn 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pandn 69, %mm3 + pandn 0x45,%mm3 + +// CHECK: pandn 32493, %mm3 + pandn 0x7eed,%mm3 + +// CHECK: pandn 3133065982, %mm3 + pandn 0xbabecafe,%mm3 + +// CHECK: pandn 305419896, %mm3 + pandn 0x12345678,%mm3 + +// CHECK: pandn %mm3, %mm3 + pandn %mm3,%mm3 + +// CHECK: pandn 3735928559(%ebx,%ecx,8), %xmm5 + pandn 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pandn 69, %xmm5 + pandn 0x45,%xmm5 + +// CHECK: pandn 32493, %xmm5 + pandn 0x7eed,%xmm5 + +// CHECK: pandn 3133065982, %xmm5 + pandn 0xbabecafe,%xmm5 + +// CHECK: pandn 305419896, %xmm5 + pandn 0x12345678,%xmm5 + +// CHECK: pandn %xmm5, %xmm5 + pandn %xmm5,%xmm5 + +// CHECK: pcmpeqb 3735928559(%ebx,%ecx,8), %mm3 + pcmpeqb 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pcmpeqb 69, %mm3 + pcmpeqb 0x45,%mm3 + +// CHECK: pcmpeqb 32493, %mm3 + pcmpeqb 0x7eed,%mm3 + +// CHECK: pcmpeqb 3133065982, %mm3 + pcmpeqb 0xbabecafe,%mm3 + +// CHECK: pcmpeqb 305419896, %mm3 + pcmpeqb 0x12345678,%mm3 + +// CHECK: pcmpeqb %mm3, %mm3 + pcmpeqb %mm3,%mm3 + +// CHECK: pcmpeqb 3735928559(%ebx,%ecx,8), %xmm5 + pcmpeqb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pcmpeqb 69, %xmm5 + pcmpeqb 0x45,%xmm5 + +// CHECK: pcmpeqb 32493, %xmm5 + pcmpeqb 0x7eed,%xmm5 + +// CHECK: pcmpeqb 3133065982, %xmm5 + pcmpeqb 0xbabecafe,%xmm5 + +// CHECK: pcmpeqb 305419896, %xmm5 + pcmpeqb 0x12345678,%xmm5 + +// CHECK: pcmpeqb %xmm5, %xmm5 + pcmpeqb %xmm5,%xmm5 + +// CHECK: pcmpeqw 3735928559(%ebx,%ecx,8), %mm3 + pcmpeqw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pcmpeqw 69, %mm3 + pcmpeqw 0x45,%mm3 + +// CHECK: pcmpeqw 32493, %mm3 + pcmpeqw 0x7eed,%mm3 + +// CHECK: pcmpeqw 3133065982, %mm3 + pcmpeqw 0xbabecafe,%mm3 + +// CHECK: pcmpeqw 305419896, %mm3 + pcmpeqw 0x12345678,%mm3 + +// CHECK: pcmpeqw %mm3, %mm3 + pcmpeqw %mm3,%mm3 + +// CHECK: pcmpeqw 3735928559(%ebx,%ecx,8), %xmm5 + pcmpeqw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pcmpeqw 69, %xmm5 + pcmpeqw 0x45,%xmm5 + +// CHECK: pcmpeqw 32493, %xmm5 + pcmpeqw 0x7eed,%xmm5 + +// CHECK: pcmpeqw 3133065982, %xmm5 + pcmpeqw 0xbabecafe,%xmm5 + +// CHECK: pcmpeqw 305419896, %xmm5 + pcmpeqw 0x12345678,%xmm5 + +// CHECK: pcmpeqw %xmm5, %xmm5 + pcmpeqw %xmm5,%xmm5 + +// CHECK: pcmpeqd 3735928559(%ebx,%ecx,8), %mm3 + pcmpeqd 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pcmpeqd 69, %mm3 + pcmpeqd 0x45,%mm3 + +// CHECK: pcmpeqd 32493, %mm3 + pcmpeqd 0x7eed,%mm3 + +// CHECK: pcmpeqd 3133065982, %mm3 + pcmpeqd 0xbabecafe,%mm3 + +// CHECK: pcmpeqd 305419896, %mm3 + pcmpeqd 0x12345678,%mm3 + +// CHECK: pcmpeqd %mm3, %mm3 + pcmpeqd %mm3,%mm3 + +// CHECK: pcmpeqd 3735928559(%ebx,%ecx,8), %xmm5 + pcmpeqd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pcmpeqd 69, %xmm5 + pcmpeqd 0x45,%xmm5 + +// CHECK: pcmpeqd 32493, %xmm5 + pcmpeqd 0x7eed,%xmm5 + +// CHECK: pcmpeqd 3133065982, %xmm5 + pcmpeqd 0xbabecafe,%xmm5 + +// CHECK: pcmpeqd 305419896, %xmm5 + pcmpeqd 0x12345678,%xmm5 + +// CHECK: pcmpeqd %xmm5, %xmm5 + pcmpeqd %xmm5,%xmm5 + +// CHECK: pcmpgtb 3735928559(%ebx,%ecx,8), %mm3 + pcmpgtb 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pcmpgtb 69, %mm3 + pcmpgtb 0x45,%mm3 + +// CHECK: pcmpgtb 32493, %mm3 + pcmpgtb 0x7eed,%mm3 + +// CHECK: pcmpgtb 3133065982, %mm3 + pcmpgtb 0xbabecafe,%mm3 + +// CHECK: pcmpgtb 305419896, %mm3 + pcmpgtb 0x12345678,%mm3 + +// CHECK: pcmpgtb %mm3, %mm3 + pcmpgtb %mm3,%mm3 + +// CHECK: pcmpgtb 3735928559(%ebx,%ecx,8), %xmm5 + pcmpgtb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pcmpgtb 69, %xmm5 + pcmpgtb 0x45,%xmm5 + +// CHECK: pcmpgtb 32493, %xmm5 + pcmpgtb 0x7eed,%xmm5 + +// CHECK: pcmpgtb 3133065982, %xmm5 + pcmpgtb 0xbabecafe,%xmm5 + +// CHECK: pcmpgtb 305419896, %xmm5 + pcmpgtb 0x12345678,%xmm5 + +// CHECK: pcmpgtb %xmm5, %xmm5 + pcmpgtb %xmm5,%xmm5 + +// CHECK: pcmpgtw 3735928559(%ebx,%ecx,8), %mm3 + pcmpgtw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pcmpgtw 69, %mm3 + pcmpgtw 0x45,%mm3 + +// CHECK: pcmpgtw 32493, %mm3 + pcmpgtw 0x7eed,%mm3 + +// CHECK: pcmpgtw 3133065982, %mm3 + pcmpgtw 0xbabecafe,%mm3 + +// CHECK: pcmpgtw 305419896, %mm3 + pcmpgtw 0x12345678,%mm3 + +// CHECK: pcmpgtw %mm3, %mm3 + pcmpgtw %mm3,%mm3 + +// CHECK: pcmpgtw 3735928559(%ebx,%ecx,8), %xmm5 + pcmpgtw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pcmpgtw 69, %xmm5 + pcmpgtw 0x45,%xmm5 + +// CHECK: pcmpgtw 32493, %xmm5 + pcmpgtw 0x7eed,%xmm5 + +// CHECK: pcmpgtw 3133065982, %xmm5 + pcmpgtw 0xbabecafe,%xmm5 + +// CHECK: pcmpgtw 305419896, %xmm5 + pcmpgtw 0x12345678,%xmm5 + +// CHECK: pcmpgtw %xmm5, %xmm5 + pcmpgtw %xmm5,%xmm5 + +// CHECK: pcmpgtd 3735928559(%ebx,%ecx,8), %mm3 + pcmpgtd 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pcmpgtd 69, %mm3 + pcmpgtd 0x45,%mm3 + +// CHECK: pcmpgtd 32493, %mm3 + pcmpgtd 0x7eed,%mm3 + +// CHECK: pcmpgtd 3133065982, %mm3 + pcmpgtd 0xbabecafe,%mm3 + +// CHECK: pcmpgtd 305419896, %mm3 + pcmpgtd 0x12345678,%mm3 + +// CHECK: pcmpgtd %mm3, %mm3 + pcmpgtd %mm3,%mm3 + +// CHECK: pcmpgtd 3735928559(%ebx,%ecx,8), %xmm5 + pcmpgtd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pcmpgtd 69, %xmm5 + pcmpgtd 0x45,%xmm5 + +// CHECK: pcmpgtd 32493, %xmm5 + pcmpgtd 0x7eed,%xmm5 + +// CHECK: pcmpgtd 3133065982, %xmm5 + pcmpgtd 0xbabecafe,%xmm5 + +// CHECK: pcmpgtd 305419896, %xmm5 + pcmpgtd 0x12345678,%xmm5 + +// CHECK: pcmpgtd %xmm5, %xmm5 + pcmpgtd %xmm5,%xmm5 + +// CHECK: pmaddwd 3735928559(%ebx,%ecx,8), %mm3 + pmaddwd 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pmaddwd 69, %mm3 + pmaddwd 0x45,%mm3 + +// CHECK: pmaddwd 32493, %mm3 + pmaddwd 0x7eed,%mm3 + +// CHECK: pmaddwd 3133065982, %mm3 + pmaddwd 0xbabecafe,%mm3 + +// CHECK: pmaddwd 305419896, %mm3 + pmaddwd 0x12345678,%mm3 + +// CHECK: pmaddwd %mm3, %mm3 + pmaddwd %mm3,%mm3 + +// CHECK: pmaddwd 3735928559(%ebx,%ecx,8), %xmm5 + pmaddwd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmaddwd 69, %xmm5 + pmaddwd 0x45,%xmm5 + +// CHECK: pmaddwd 32493, %xmm5 + pmaddwd 0x7eed,%xmm5 + +// CHECK: pmaddwd 3133065982, %xmm5 + pmaddwd 0xbabecafe,%xmm5 + +// CHECK: pmaddwd 305419896, %xmm5 + pmaddwd 0x12345678,%xmm5 + +// CHECK: pmaddwd %xmm5, %xmm5 + pmaddwd %xmm5,%xmm5 + +// CHECK: pmulhw 3735928559(%ebx,%ecx,8), %mm3 + pmulhw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pmulhw 69, %mm3 + pmulhw 0x45,%mm3 + +// CHECK: pmulhw 32493, %mm3 + pmulhw 0x7eed,%mm3 + +// CHECK: pmulhw 3133065982, %mm3 + pmulhw 0xbabecafe,%mm3 + +// CHECK: pmulhw 305419896, %mm3 + pmulhw 0x12345678,%mm3 + +// CHECK: pmulhw %mm3, %mm3 + pmulhw %mm3,%mm3 + +// CHECK: pmulhw 3735928559(%ebx,%ecx,8), %xmm5 + pmulhw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmulhw 69, %xmm5 + pmulhw 0x45,%xmm5 + +// CHECK: pmulhw 32493, %xmm5 + pmulhw 0x7eed,%xmm5 + +// CHECK: pmulhw 3133065982, %xmm5 + pmulhw 0xbabecafe,%xmm5 + +// CHECK: pmulhw 305419896, %xmm5 + pmulhw 0x12345678,%xmm5 + +// CHECK: pmulhw %xmm5, %xmm5 + pmulhw %xmm5,%xmm5 + +// CHECK: pmullw 3735928559(%ebx,%ecx,8), %mm3 + pmullw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pmullw 69, %mm3 + pmullw 0x45,%mm3 + +// CHECK: pmullw 32493, %mm3 + pmullw 0x7eed,%mm3 + +// CHECK: pmullw 3133065982, %mm3 + pmullw 0xbabecafe,%mm3 + +// CHECK: pmullw 305419896, %mm3 + pmullw 0x12345678,%mm3 + +// CHECK: pmullw %mm3, %mm3 + pmullw %mm3,%mm3 + +// CHECK: pmullw 3735928559(%ebx,%ecx,8), %xmm5 + pmullw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmullw 69, %xmm5 + pmullw 0x45,%xmm5 + +// CHECK: pmullw 32493, %xmm5 + pmullw 0x7eed,%xmm5 + +// CHECK: pmullw 3133065982, %xmm5 + pmullw 0xbabecafe,%xmm5 + +// CHECK: pmullw 305419896, %xmm5 + pmullw 0x12345678,%xmm5 + +// CHECK: pmullw %xmm5, %xmm5 + pmullw %xmm5,%xmm5 + +// CHECK: por 3735928559(%ebx,%ecx,8), %mm3 + por 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: por 69, %mm3 + por 0x45,%mm3 + +// CHECK: por 32493, %mm3 + por 0x7eed,%mm3 + +// CHECK: por 3133065982, %mm3 + por 0xbabecafe,%mm3 + +// CHECK: por 305419896, %mm3 + por 0x12345678,%mm3 + +// CHECK: por %mm3, %mm3 + por %mm3,%mm3 + +// CHECK: por 3735928559(%ebx,%ecx,8), %xmm5 + por 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: por 69, %xmm5 + por 0x45,%xmm5 + +// CHECK: por 32493, %xmm5 + por 0x7eed,%xmm5 + +// CHECK: por 3133065982, %xmm5 + por 0xbabecafe,%xmm5 + +// CHECK: por 305419896, %xmm5 + por 0x12345678,%xmm5 + +// CHECK: por %xmm5, %xmm5 + por %xmm5,%xmm5 + +// CHECK: psllw 3735928559(%ebx,%ecx,8), %mm3 + psllw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psllw 69, %mm3 + psllw 0x45,%mm3 + +// CHECK: psllw 32493, %mm3 + psllw 0x7eed,%mm3 + +// CHECK: psllw 3133065982, %mm3 + psllw 0xbabecafe,%mm3 + +// CHECK: psllw 305419896, %mm3 + psllw 0x12345678,%mm3 + +// CHECK: psllw %mm3, %mm3 + psllw %mm3,%mm3 + +// CHECK: psllw 3735928559(%ebx,%ecx,8), %xmm5 + psllw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psllw 69, %xmm5 + psllw 0x45,%xmm5 + +// CHECK: psllw 32493, %xmm5 + psllw 0x7eed,%xmm5 + +// CHECK: psllw 3133065982, %xmm5 + psllw 0xbabecafe,%xmm5 + +// CHECK: psllw 305419896, %xmm5 + psllw 0x12345678,%xmm5 + +// CHECK: psllw %xmm5, %xmm5 + psllw %xmm5,%xmm5 + +// CHECK: psllw $127, %mm3 + psllw $0x7f,%mm3 + +// CHECK: psllw $127, %xmm5 + psllw $0x7f,%xmm5 + +// CHECK: pslld 3735928559(%ebx,%ecx,8), %mm3 + pslld 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pslld 69, %mm3 + pslld 0x45,%mm3 + +// CHECK: pslld 32493, %mm3 + pslld 0x7eed,%mm3 + +// CHECK: pslld 3133065982, %mm3 + pslld 0xbabecafe,%mm3 + +// CHECK: pslld 305419896, %mm3 + pslld 0x12345678,%mm3 + +// CHECK: pslld %mm3, %mm3 + pslld %mm3,%mm3 + +// CHECK: pslld 3735928559(%ebx,%ecx,8), %xmm5 + pslld 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pslld 69, %xmm5 + pslld 0x45,%xmm5 + +// CHECK: pslld 32493, %xmm5 + pslld 0x7eed,%xmm5 + +// CHECK: pslld 3133065982, %xmm5 + pslld 0xbabecafe,%xmm5 + +// CHECK: pslld 305419896, %xmm5 + pslld 0x12345678,%xmm5 + +// CHECK: pslld %xmm5, %xmm5 + pslld %xmm5,%xmm5 + +// CHECK: pslld $127, %mm3 + pslld $0x7f,%mm3 + +// CHECK: pslld $127, %xmm5 + pslld $0x7f,%xmm5 + +// CHECK: psllq 3735928559(%ebx,%ecx,8), %mm3 + psllq 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psllq 69, %mm3 + psllq 0x45,%mm3 + +// CHECK: psllq 32493, %mm3 + psllq 0x7eed,%mm3 + +// CHECK: psllq 3133065982, %mm3 + psllq 0xbabecafe,%mm3 + +// CHECK: psllq 305419896, %mm3 + psllq 0x12345678,%mm3 + +// CHECK: psllq %mm3, %mm3 + psllq %mm3,%mm3 + +// CHECK: psllq 3735928559(%ebx,%ecx,8), %xmm5 + psllq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psllq 69, %xmm5 + psllq 0x45,%xmm5 + +// CHECK: psllq 32493, %xmm5 + psllq 0x7eed,%xmm5 + +// CHECK: psllq 3133065982, %xmm5 + psllq 0xbabecafe,%xmm5 + +// CHECK: psllq 305419896, %xmm5 + psllq 0x12345678,%xmm5 + +// CHECK: psllq %xmm5, %xmm5 + psllq %xmm5,%xmm5 + +// CHECK: psllq $127, %mm3 + psllq $0x7f,%mm3 + +// CHECK: psllq $127, %xmm5 + psllq $0x7f,%xmm5 + +// CHECK: psraw 3735928559(%ebx,%ecx,8), %mm3 + psraw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psraw 69, %mm3 + psraw 0x45,%mm3 + +// CHECK: psraw 32493, %mm3 + psraw 0x7eed,%mm3 + +// CHECK: psraw 3133065982, %mm3 + psraw 0xbabecafe,%mm3 + +// CHECK: psraw 305419896, %mm3 + psraw 0x12345678,%mm3 + +// CHECK: psraw %mm3, %mm3 + psraw %mm3,%mm3 + +// CHECK: psraw 3735928559(%ebx,%ecx,8), %xmm5 + psraw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psraw 69, %xmm5 + psraw 0x45,%xmm5 + +// CHECK: psraw 32493, %xmm5 + psraw 0x7eed,%xmm5 + +// CHECK: psraw 3133065982, %xmm5 + psraw 0xbabecafe,%xmm5 + +// CHECK: psraw 305419896, %xmm5 + psraw 0x12345678,%xmm5 + +// CHECK: psraw %xmm5, %xmm5 + psraw %xmm5,%xmm5 + +// CHECK: psraw $127, %mm3 + psraw $0x7f,%mm3 + +// CHECK: psraw $127, %xmm5 + psraw $0x7f,%xmm5 + +// CHECK: psrad 3735928559(%ebx,%ecx,8), %mm3 + psrad 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psrad 69, %mm3 + psrad 0x45,%mm3 + +// CHECK: psrad 32493, %mm3 + psrad 0x7eed,%mm3 + +// CHECK: psrad 3133065982, %mm3 + psrad 0xbabecafe,%mm3 + +// CHECK: psrad 305419896, %mm3 + psrad 0x12345678,%mm3 + +// CHECK: psrad %mm3, %mm3 + psrad %mm3,%mm3 + +// CHECK: psrad 3735928559(%ebx,%ecx,8), %xmm5 + psrad 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psrad 69, %xmm5 + psrad 0x45,%xmm5 + +// CHECK: psrad 32493, %xmm5 + psrad 0x7eed,%xmm5 + +// CHECK: psrad 3133065982, %xmm5 + psrad 0xbabecafe,%xmm5 + +// CHECK: psrad 305419896, %xmm5 + psrad 0x12345678,%xmm5 + +// CHECK: psrad %xmm5, %xmm5 + psrad %xmm5,%xmm5 + +// CHECK: psrad $127, %mm3 + psrad $0x7f,%mm3 + +// CHECK: psrad $127, %xmm5 + psrad $0x7f,%xmm5 + +// CHECK: psrlw 3735928559(%ebx,%ecx,8), %mm3 + psrlw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psrlw 69, %mm3 + psrlw 0x45,%mm3 + +// CHECK: psrlw 32493, %mm3 + psrlw 0x7eed,%mm3 + +// CHECK: psrlw 3133065982, %mm3 + psrlw 0xbabecafe,%mm3 + +// CHECK: psrlw 305419896, %mm3 + psrlw 0x12345678,%mm3 + +// CHECK: psrlw %mm3, %mm3 + psrlw %mm3,%mm3 + +// CHECK: psrlw 3735928559(%ebx,%ecx,8), %xmm5 + psrlw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psrlw 69, %xmm5 + psrlw 0x45,%xmm5 + +// CHECK: psrlw 32493, %xmm5 + psrlw 0x7eed,%xmm5 + +// CHECK: psrlw 3133065982, %xmm5 + psrlw 0xbabecafe,%xmm5 + +// CHECK: psrlw 305419896, %xmm5 + psrlw 0x12345678,%xmm5 + +// CHECK: psrlw %xmm5, %xmm5 + psrlw %xmm5,%xmm5 + +// CHECK: psrlw $127, %mm3 + psrlw $0x7f,%mm3 + +// CHECK: psrlw $127, %xmm5 + psrlw $0x7f,%xmm5 + +// CHECK: psrld 3735928559(%ebx,%ecx,8), %mm3 + psrld 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psrld 69, %mm3 + psrld 0x45,%mm3 + +// CHECK: psrld 32493, %mm3 + psrld 0x7eed,%mm3 + +// CHECK: psrld 3133065982, %mm3 + psrld 0xbabecafe,%mm3 + +// CHECK: psrld 305419896, %mm3 + psrld 0x12345678,%mm3 + +// CHECK: psrld %mm3, %mm3 + psrld %mm3,%mm3 + +// CHECK: psrld 3735928559(%ebx,%ecx,8), %xmm5 + psrld 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psrld 69, %xmm5 + psrld 0x45,%xmm5 + +// CHECK: psrld 32493, %xmm5 + psrld 0x7eed,%xmm5 + +// CHECK: psrld 3133065982, %xmm5 + psrld 0xbabecafe,%xmm5 + +// CHECK: psrld 305419896, %xmm5 + psrld 0x12345678,%xmm5 + +// CHECK: psrld %xmm5, %xmm5 + psrld %xmm5,%xmm5 + +// CHECK: psrld $127, %mm3 + psrld $0x7f,%mm3 + +// CHECK: psrld $127, %xmm5 + psrld $0x7f,%xmm5 + +// CHECK: psrlq 3735928559(%ebx,%ecx,8), %mm3 + psrlq 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psrlq 69, %mm3 + psrlq 0x45,%mm3 + +// CHECK: psrlq 32493, %mm3 + psrlq 0x7eed,%mm3 + +// CHECK: psrlq 3133065982, %mm3 + psrlq 0xbabecafe,%mm3 + +// CHECK: psrlq 305419896, %mm3 + psrlq 0x12345678,%mm3 + +// CHECK: psrlq %mm3, %mm3 + psrlq %mm3,%mm3 + +// CHECK: psrlq 3735928559(%ebx,%ecx,8), %xmm5 + psrlq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psrlq 69, %xmm5 + psrlq 0x45,%xmm5 + +// CHECK: psrlq 32493, %xmm5 + psrlq 0x7eed,%xmm5 + +// CHECK: psrlq 3133065982, %xmm5 + psrlq 0xbabecafe,%xmm5 + +// CHECK: psrlq 305419896, %xmm5 + psrlq 0x12345678,%xmm5 + +// CHECK: psrlq %xmm5, %xmm5 + psrlq %xmm5,%xmm5 + +// CHECK: psrlq $127, %mm3 + psrlq $0x7f,%mm3 + +// CHECK: psrlq $127, %xmm5 + psrlq $0x7f,%xmm5 + +// CHECK: psubb 3735928559(%ebx,%ecx,8), %mm3 + psubb 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psubb 69, %mm3 + psubb 0x45,%mm3 + +// CHECK: psubb 32493, %mm3 + psubb 0x7eed,%mm3 + +// CHECK: psubb 3133065982, %mm3 + psubb 0xbabecafe,%mm3 + +// CHECK: psubb 305419896, %mm3 + psubb 0x12345678,%mm3 + +// CHECK: psubb %mm3, %mm3 + psubb %mm3,%mm3 + +// CHECK: psubb 3735928559(%ebx,%ecx,8), %xmm5 + psubb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psubb 69, %xmm5 + psubb 0x45,%xmm5 + +// CHECK: psubb 32493, %xmm5 + psubb 0x7eed,%xmm5 + +// CHECK: psubb 3133065982, %xmm5 + psubb 0xbabecafe,%xmm5 + +// CHECK: psubb 305419896, %xmm5 + psubb 0x12345678,%xmm5 + +// CHECK: psubb %xmm5, %xmm5 + psubb %xmm5,%xmm5 + +// CHECK: psubw 3735928559(%ebx,%ecx,8), %mm3 + psubw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psubw 69, %mm3 + psubw 0x45,%mm3 + +// CHECK: psubw 32493, %mm3 + psubw 0x7eed,%mm3 + +// CHECK: psubw 3133065982, %mm3 + psubw 0xbabecafe,%mm3 + +// CHECK: psubw 305419896, %mm3 + psubw 0x12345678,%mm3 + +// CHECK: psubw %mm3, %mm3 + psubw %mm3,%mm3 + +// CHECK: psubw 3735928559(%ebx,%ecx,8), %xmm5 + psubw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psubw 69, %xmm5 + psubw 0x45,%xmm5 + +// CHECK: psubw 32493, %xmm5 + psubw 0x7eed,%xmm5 + +// CHECK: psubw 3133065982, %xmm5 + psubw 0xbabecafe,%xmm5 + +// CHECK: psubw 305419896, %xmm5 + psubw 0x12345678,%xmm5 + +// CHECK: psubw %xmm5, %xmm5 + psubw %xmm5,%xmm5 + +// CHECK: psubd 3735928559(%ebx,%ecx,8), %mm3 + psubd 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psubd 69, %mm3 + psubd 0x45,%mm3 + +// CHECK: psubd 32493, %mm3 + psubd 0x7eed,%mm3 + +// CHECK: psubd 3133065982, %mm3 + psubd 0xbabecafe,%mm3 + +// CHECK: psubd 305419896, %mm3 + psubd 0x12345678,%mm3 + +// CHECK: psubd %mm3, %mm3 + psubd %mm3,%mm3 + +// CHECK: psubd 3735928559(%ebx,%ecx,8), %xmm5 + psubd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psubd 69, %xmm5 + psubd 0x45,%xmm5 + +// CHECK: psubd 32493, %xmm5 + psubd 0x7eed,%xmm5 + +// CHECK: psubd 3133065982, %xmm5 + psubd 0xbabecafe,%xmm5 + +// CHECK: psubd 305419896, %xmm5 + psubd 0x12345678,%xmm5 + +// CHECK: psubd %xmm5, %xmm5 + psubd %xmm5,%xmm5 + +// CHECK: psubq 3735928559(%ebx,%ecx,8), %mm3 + psubq 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psubq 69, %mm3 + psubq 0x45,%mm3 + +// CHECK: psubq 32493, %mm3 + psubq 0x7eed,%mm3 + +// CHECK: psubq 3133065982, %mm3 + psubq 0xbabecafe,%mm3 + +// CHECK: psubq 305419896, %mm3 + psubq 0x12345678,%mm3 + +// CHECK: psubq %mm3, %mm3 + psubq %mm3,%mm3 + +// CHECK: psubq 3735928559(%ebx,%ecx,8), %xmm5 + psubq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psubq 69, %xmm5 + psubq 0x45,%xmm5 + +// CHECK: psubq 32493, %xmm5 + psubq 0x7eed,%xmm5 + +// CHECK: psubq 3133065982, %xmm5 + psubq 0xbabecafe,%xmm5 + +// CHECK: psubq 305419896, %xmm5 + psubq 0x12345678,%xmm5 + +// CHECK: psubq %xmm5, %xmm5 + psubq %xmm5,%xmm5 + +// CHECK: psubsb 3735928559(%ebx,%ecx,8), %mm3 + psubsb 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psubsb 69, %mm3 + psubsb 0x45,%mm3 + +// CHECK: psubsb 32493, %mm3 + psubsb 0x7eed,%mm3 + +// CHECK: psubsb 3133065982, %mm3 + psubsb 0xbabecafe,%mm3 + +// CHECK: psubsb 305419896, %mm3 + psubsb 0x12345678,%mm3 + +// CHECK: psubsb %mm3, %mm3 + psubsb %mm3,%mm3 + +// CHECK: psubsb 3735928559(%ebx,%ecx,8), %xmm5 + psubsb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psubsb 69, %xmm5 + psubsb 0x45,%xmm5 + +// CHECK: psubsb 32493, %xmm5 + psubsb 0x7eed,%xmm5 + +// CHECK: psubsb 3133065982, %xmm5 + psubsb 0xbabecafe,%xmm5 + +// CHECK: psubsb 305419896, %xmm5 + psubsb 0x12345678,%xmm5 + +// CHECK: psubsb %xmm5, %xmm5 + psubsb %xmm5,%xmm5 + +// CHECK: psubsw 3735928559(%ebx,%ecx,8), %mm3 + psubsw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psubsw 69, %mm3 + psubsw 0x45,%mm3 + +// CHECK: psubsw 32493, %mm3 + psubsw 0x7eed,%mm3 + +// CHECK: psubsw 3133065982, %mm3 + psubsw 0xbabecafe,%mm3 + +// CHECK: psubsw 305419896, %mm3 + psubsw 0x12345678,%mm3 + +// CHECK: psubsw %mm3, %mm3 + psubsw %mm3,%mm3 + +// CHECK: psubsw 3735928559(%ebx,%ecx,8), %xmm5 + psubsw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psubsw 69, %xmm5 + psubsw 0x45,%xmm5 + +// CHECK: psubsw 32493, %xmm5 + psubsw 0x7eed,%xmm5 + +// CHECK: psubsw 3133065982, %xmm5 + psubsw 0xbabecafe,%xmm5 + +// CHECK: psubsw 305419896, %xmm5 + psubsw 0x12345678,%xmm5 + +// CHECK: psubsw %xmm5, %xmm5 + psubsw %xmm5,%xmm5 + +// CHECK: psubusb 3735928559(%ebx,%ecx,8), %mm3 + psubusb 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psubusb 69, %mm3 + psubusb 0x45,%mm3 + +// CHECK: psubusb 32493, %mm3 + psubusb 0x7eed,%mm3 + +// CHECK: psubusb 3133065982, %mm3 + psubusb 0xbabecafe,%mm3 + +// CHECK: psubusb 305419896, %mm3 + psubusb 0x12345678,%mm3 + +// CHECK: psubusb %mm3, %mm3 + psubusb %mm3,%mm3 + +// CHECK: psubusb 3735928559(%ebx,%ecx,8), %xmm5 + psubusb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psubusb 69, %xmm5 + psubusb 0x45,%xmm5 + +// CHECK: psubusb 32493, %xmm5 + psubusb 0x7eed,%xmm5 + +// CHECK: psubusb 3133065982, %xmm5 + psubusb 0xbabecafe,%xmm5 + +// CHECK: psubusb 305419896, %xmm5 + psubusb 0x12345678,%xmm5 + +// CHECK: psubusb %xmm5, %xmm5 + psubusb %xmm5,%xmm5 + +// CHECK: psubusw 3735928559(%ebx,%ecx,8), %mm3 + psubusw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psubusw 69, %mm3 + psubusw 0x45,%mm3 + +// CHECK: psubusw 32493, %mm3 + psubusw 0x7eed,%mm3 + +// CHECK: psubusw 3133065982, %mm3 + psubusw 0xbabecafe,%mm3 + +// CHECK: psubusw 305419896, %mm3 + psubusw 0x12345678,%mm3 + +// CHECK: psubusw %mm3, %mm3 + psubusw %mm3,%mm3 + +// CHECK: psubusw 3735928559(%ebx,%ecx,8), %xmm5 + psubusw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psubusw 69, %xmm5 + psubusw 0x45,%xmm5 + +// CHECK: psubusw 32493, %xmm5 + psubusw 0x7eed,%xmm5 + +// CHECK: psubusw 3133065982, %xmm5 + psubusw 0xbabecafe,%xmm5 + +// CHECK: psubusw 305419896, %xmm5 + psubusw 0x12345678,%xmm5 + +// CHECK: psubusw %xmm5, %xmm5 + psubusw %xmm5,%xmm5 + +// CHECK: punpckhbw 3735928559(%ebx,%ecx,8), %mm3 + punpckhbw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: punpckhbw 69, %mm3 + punpckhbw 0x45,%mm3 + +// CHECK: punpckhbw 32493, %mm3 + punpckhbw 0x7eed,%mm3 + +// CHECK: punpckhbw 3133065982, %mm3 + punpckhbw 0xbabecafe,%mm3 + +// CHECK: punpckhbw 305419896, %mm3 + punpckhbw 0x12345678,%mm3 + +// CHECK: punpckhbw %mm3, %mm3 + punpckhbw %mm3,%mm3 + +// CHECK: punpckhbw 3735928559(%ebx,%ecx,8), %xmm5 + punpckhbw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: punpckhbw 69, %xmm5 + punpckhbw 0x45,%xmm5 + +// CHECK: punpckhbw 32493, %xmm5 + punpckhbw 0x7eed,%xmm5 + +// CHECK: punpckhbw 3133065982, %xmm5 + punpckhbw 0xbabecafe,%xmm5 + +// CHECK: punpckhbw 305419896, %xmm5 + punpckhbw 0x12345678,%xmm5 + +// CHECK: punpckhbw %xmm5, %xmm5 + punpckhbw %xmm5,%xmm5 + +// CHECK: punpckhwd 3735928559(%ebx,%ecx,8), %mm3 + punpckhwd 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: punpckhwd 69, %mm3 + punpckhwd 0x45,%mm3 + +// CHECK: punpckhwd 32493, %mm3 + punpckhwd 0x7eed,%mm3 + +// CHECK: punpckhwd 3133065982, %mm3 + punpckhwd 0xbabecafe,%mm3 + +// CHECK: punpckhwd 305419896, %mm3 + punpckhwd 0x12345678,%mm3 + +// CHECK: punpckhwd %mm3, %mm3 + punpckhwd %mm3,%mm3 + +// CHECK: punpckhwd 3735928559(%ebx,%ecx,8), %xmm5 + punpckhwd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: punpckhwd 69, %xmm5 + punpckhwd 0x45,%xmm5 + +// CHECK: punpckhwd 32493, %xmm5 + punpckhwd 0x7eed,%xmm5 + +// CHECK: punpckhwd 3133065982, %xmm5 + punpckhwd 0xbabecafe,%xmm5 + +// CHECK: punpckhwd 305419896, %xmm5 + punpckhwd 0x12345678,%xmm5 + +// CHECK: punpckhwd %xmm5, %xmm5 + punpckhwd %xmm5,%xmm5 + +// CHECK: punpckhdq 3735928559(%ebx,%ecx,8), %mm3 + punpckhdq 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: punpckhdq 69, %mm3 + punpckhdq 0x45,%mm3 + +// CHECK: punpckhdq 32493, %mm3 + punpckhdq 0x7eed,%mm3 + +// CHECK: punpckhdq 3133065982, %mm3 + punpckhdq 0xbabecafe,%mm3 + +// CHECK: punpckhdq 305419896, %mm3 + punpckhdq 0x12345678,%mm3 + +// CHECK: punpckhdq %mm3, %mm3 + punpckhdq %mm3,%mm3 + +// CHECK: punpckhdq 3735928559(%ebx,%ecx,8), %xmm5 + punpckhdq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: punpckhdq 69, %xmm5 + punpckhdq 0x45,%xmm5 + +// CHECK: punpckhdq 32493, %xmm5 + punpckhdq 0x7eed,%xmm5 + +// CHECK: punpckhdq 3133065982, %xmm5 + punpckhdq 0xbabecafe,%xmm5 + +// CHECK: punpckhdq 305419896, %xmm5 + punpckhdq 0x12345678,%xmm5 + +// CHECK: punpckhdq %xmm5, %xmm5 + punpckhdq %xmm5,%xmm5 + +// CHECK: punpcklbw 3735928559(%ebx,%ecx,8), %mm3 + punpcklbw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: punpcklbw 69, %mm3 + punpcklbw 0x45,%mm3 + +// CHECK: punpcklbw 32493, %mm3 + punpcklbw 0x7eed,%mm3 + +// CHECK: punpcklbw 3133065982, %mm3 + punpcklbw 0xbabecafe,%mm3 + +// CHECK: punpcklbw 305419896, %mm3 + punpcklbw 0x12345678,%mm3 + +// CHECK: punpcklbw %mm3, %mm3 + punpcklbw %mm3,%mm3 + +// CHECK: punpcklbw 3735928559(%ebx,%ecx,8), %xmm5 + punpcklbw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: punpcklbw 69, %xmm5 + punpcklbw 0x45,%xmm5 + +// CHECK: punpcklbw 32493, %xmm5 + punpcklbw 0x7eed,%xmm5 + +// CHECK: punpcklbw 3133065982, %xmm5 + punpcklbw 0xbabecafe,%xmm5 + +// CHECK: punpcklbw 305419896, %xmm5 + punpcklbw 0x12345678,%xmm5 + +// CHECK: punpcklbw %xmm5, %xmm5 + punpcklbw %xmm5,%xmm5 + +// CHECK: punpcklwd 3735928559(%ebx,%ecx,8), %mm3 + punpcklwd 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: punpcklwd 69, %mm3 + punpcklwd 0x45,%mm3 + +// CHECK: punpcklwd 32493, %mm3 + punpcklwd 0x7eed,%mm3 + +// CHECK: punpcklwd 3133065982, %mm3 + punpcklwd 0xbabecafe,%mm3 + +// CHECK: punpcklwd 305419896, %mm3 + punpcklwd 0x12345678,%mm3 + +// CHECK: punpcklwd %mm3, %mm3 + punpcklwd %mm3,%mm3 + +// CHECK: punpcklwd 3735928559(%ebx,%ecx,8), %xmm5 + punpcklwd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: punpcklwd 69, %xmm5 + punpcklwd 0x45,%xmm5 + +// CHECK: punpcklwd 32493, %xmm5 + punpcklwd 0x7eed,%xmm5 + +// CHECK: punpcklwd 3133065982, %xmm5 + punpcklwd 0xbabecafe,%xmm5 + +// CHECK: punpcklwd 305419896, %xmm5 + punpcklwd 0x12345678,%xmm5 + +// CHECK: punpcklwd %xmm5, %xmm5 + punpcklwd %xmm5,%xmm5 + +// CHECK: punpckldq 3735928559(%ebx,%ecx,8), %mm3 + punpckldq 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: punpckldq 69, %mm3 + punpckldq 0x45,%mm3 + +// CHECK: punpckldq 32493, %mm3 + punpckldq 0x7eed,%mm3 + +// CHECK: punpckldq 3133065982, %mm3 + punpckldq 0xbabecafe,%mm3 + +// CHECK: punpckldq 305419896, %mm3 + punpckldq 0x12345678,%mm3 + +// CHECK: punpckldq %mm3, %mm3 + punpckldq %mm3,%mm3 + +// CHECK: punpckldq 3735928559(%ebx,%ecx,8), %xmm5 + punpckldq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: punpckldq 69, %xmm5 + punpckldq 0x45,%xmm5 + +// CHECK: punpckldq 32493, %xmm5 + punpckldq 0x7eed,%xmm5 + +// CHECK: punpckldq 3133065982, %xmm5 + punpckldq 0xbabecafe,%xmm5 + +// CHECK: punpckldq 305419896, %xmm5 + punpckldq 0x12345678,%xmm5 + +// CHECK: punpckldq %xmm5, %xmm5 + punpckldq %xmm5,%xmm5 + +// CHECK: pxor 3735928559(%ebx,%ecx,8), %mm3 + pxor 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pxor 69, %mm3 + pxor 0x45,%mm3 + +// CHECK: pxor 32493, %mm3 + pxor 0x7eed,%mm3 + +// CHECK: pxor 3133065982, %mm3 + pxor 0xbabecafe,%mm3 + +// CHECK: pxor 305419896, %mm3 + pxor 0x12345678,%mm3 + +// CHECK: pxor %mm3, %mm3 + pxor %mm3,%mm3 + +// CHECK: pxor 3735928559(%ebx,%ecx,8), %xmm5 + pxor 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pxor 69, %xmm5 + pxor 0x45,%xmm5 + +// CHECK: pxor 32493, %xmm5 + pxor 0x7eed,%xmm5 + +// CHECK: pxor 3133065982, %xmm5 + pxor 0xbabecafe,%xmm5 + +// CHECK: pxor 305419896, %xmm5 + pxor 0x12345678,%xmm5 + +// CHECK: pxor %xmm5, %xmm5 + pxor %xmm5,%xmm5 + +// CHECK: addps 3735928559(%ebx,%ecx,8), %xmm5 + addps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: addps 69, %xmm5 + addps 0x45,%xmm5 + +// CHECK: addps 32493, %xmm5 + addps 0x7eed,%xmm5 + +// CHECK: addps 3133065982, %xmm5 + addps 0xbabecafe,%xmm5 + +// CHECK: addps 305419896, %xmm5 + addps 0x12345678,%xmm5 + +// CHECK: addps %xmm5, %xmm5 + addps %xmm5,%xmm5 + +// CHECK: addss 3735928559(%ebx,%ecx,8), %xmm5 + addss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: addss 69, %xmm5 + addss 0x45,%xmm5 + +// CHECK: addss 32493, %xmm5 + addss 0x7eed,%xmm5 + +// CHECK: addss 3133065982, %xmm5 + addss 0xbabecafe,%xmm5 + +// CHECK: addss 305419896, %xmm5 + addss 0x12345678,%xmm5 + +// CHECK: addss %xmm5, %xmm5 + addss %xmm5,%xmm5 + +// CHECK: andnps 3735928559(%ebx,%ecx,8), %xmm5 + andnps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: andnps 69, %xmm5 + andnps 0x45,%xmm5 + +// CHECK: andnps 32493, %xmm5 + andnps 0x7eed,%xmm5 + +// CHECK: andnps 3133065982, %xmm5 + andnps 0xbabecafe,%xmm5 + +// CHECK: andnps 305419896, %xmm5 + andnps 0x12345678,%xmm5 + +// CHECK: andnps %xmm5, %xmm5 + andnps %xmm5,%xmm5 + +// CHECK: andps 3735928559(%ebx,%ecx,8), %xmm5 + andps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: andps 69, %xmm5 + andps 0x45,%xmm5 + +// CHECK: andps 32493, %xmm5 + andps 0x7eed,%xmm5 + +// CHECK: andps 3133065982, %xmm5 + andps 0xbabecafe,%xmm5 + +// CHECK: andps 305419896, %xmm5 + andps 0x12345678,%xmm5 + +// CHECK: andps %xmm5, %xmm5 + andps %xmm5,%xmm5 + +// CHECK: comiss 3735928559(%ebx,%ecx,8), %xmm5 + comiss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: comiss 69, %xmm5 + comiss 0x45,%xmm5 + +// CHECK: comiss 32493, %xmm5 + comiss 0x7eed,%xmm5 + +// CHECK: comiss 3133065982, %xmm5 + comiss 0xbabecafe,%xmm5 + +// CHECK: comiss 305419896, %xmm5 + comiss 0x12345678,%xmm5 + +// CHECK: comiss %xmm5, %xmm5 + comiss %xmm5,%xmm5 + +// CHECK: cvtpi2ps 3735928559(%ebx,%ecx,8), %xmm5 + cvtpi2ps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: cvtpi2ps 69, %xmm5 + cvtpi2ps 0x45,%xmm5 + +// CHECK: cvtpi2ps 32493, %xmm5 + cvtpi2ps 0x7eed,%xmm5 + +// CHECK: cvtpi2ps 3133065982, %xmm5 + cvtpi2ps 0xbabecafe,%xmm5 + +// CHECK: cvtpi2ps 305419896, %xmm5 + cvtpi2ps 0x12345678,%xmm5 + +// CHECK: cvtpi2ps %mm3, %xmm5 + cvtpi2ps %mm3,%xmm5 + +// CHECK: cvtps2pi 3735928559(%ebx,%ecx,8), %mm3 + cvtps2pi 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: cvtps2pi 69, %mm3 + cvtps2pi 0x45,%mm3 + +// CHECK: cvtps2pi 32493, %mm3 + cvtps2pi 0x7eed,%mm3 + +// CHECK: cvtps2pi 3133065982, %mm3 + cvtps2pi 0xbabecafe,%mm3 + +// CHECK: cvtps2pi 305419896, %mm3 + cvtps2pi 0x12345678,%mm3 + +// CHECK: cvtps2pi %xmm5, %mm3 + cvtps2pi %xmm5,%mm3 + +// CHECK: cvtsi2ss %ecx, %xmm5 + cvtsi2ss %ecx,%xmm5 + +// CHECK: cvtsi2ss 3735928559(%ebx,%ecx,8), %xmm5 + cvtsi2ss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: cvtsi2ss 69, %xmm5 + cvtsi2ss 0x45,%xmm5 + +// CHECK: cvtsi2ss 32493, %xmm5 + cvtsi2ss 0x7eed,%xmm5 + +// CHECK: cvtsi2ss 3133065982, %xmm5 + cvtsi2ss 0xbabecafe,%xmm5 + +// CHECK: cvtsi2ss 305419896, %xmm5 + cvtsi2ss 0x12345678,%xmm5 + +// CHECK: cvttps2pi 3735928559(%ebx,%ecx,8), %mm3 + cvttps2pi 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: cvttps2pi 69, %mm3 + cvttps2pi 0x45,%mm3 + +// CHECK: cvttps2pi 32493, %mm3 + cvttps2pi 0x7eed,%mm3 + +// CHECK: cvttps2pi 3133065982, %mm3 + cvttps2pi 0xbabecafe,%mm3 + +// CHECK: cvttps2pi 305419896, %mm3 + cvttps2pi 0x12345678,%mm3 + +// CHECK: cvttps2pi %xmm5, %mm3 + cvttps2pi %xmm5,%mm3 + +// CHECK: cvttss2si 3735928559(%ebx,%ecx,8), %ecx + cvttss2si 0xdeadbeef(%ebx,%ecx,8),%ecx + +// CHECK: cvttss2si 69, %ecx + cvttss2si 0x45,%ecx + +// CHECK: cvttss2si 32493, %ecx + cvttss2si 0x7eed,%ecx + +// CHECK: cvttss2si 3133065982, %ecx + cvttss2si 0xbabecafe,%ecx + +// CHECK: cvttss2si 305419896, %ecx + cvttss2si 0x12345678,%ecx + +// CHECK: cvttss2si %xmm5, %ecx + cvttss2si %xmm5,%ecx + +// CHECK: divps 3735928559(%ebx,%ecx,8), %xmm5 + divps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: divps 69, %xmm5 + divps 0x45,%xmm5 + +// CHECK: divps 32493, %xmm5 + divps 0x7eed,%xmm5 + +// CHECK: divps 3133065982, %xmm5 + divps 0xbabecafe,%xmm5 + +// CHECK: divps 305419896, %xmm5 + divps 0x12345678,%xmm5 + +// CHECK: divps %xmm5, %xmm5 + divps %xmm5,%xmm5 + +// CHECK: divss 3735928559(%ebx,%ecx,8), %xmm5 + divss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: divss 69, %xmm5 + divss 0x45,%xmm5 + +// CHECK: divss 32493, %xmm5 + divss 0x7eed,%xmm5 + +// CHECK: divss 3133065982, %xmm5 + divss 0xbabecafe,%xmm5 + +// CHECK: divss 305419896, %xmm5 + divss 0x12345678,%xmm5 + +// CHECK: divss %xmm5, %xmm5 + divss %xmm5,%xmm5 + +// CHECK: ldmxcsr 3735928559(%ebx,%ecx,8) + ldmxcsr 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: ldmxcsr 32493 + ldmxcsr 0x7eed + +// CHECK: ldmxcsr 3133065982 + ldmxcsr 0xbabecafe + +// CHECK: ldmxcsr 305419896 + ldmxcsr 0x12345678 + +// CHECK: maskmovq %mm3, %mm3 + maskmovq %mm3,%mm3 + +// CHECK: maxps 3735928559(%ebx,%ecx,8), %xmm5 + maxps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: maxps 69, %xmm5 + maxps 0x45,%xmm5 + +// CHECK: maxps 32493, %xmm5 + maxps 0x7eed,%xmm5 + +// CHECK: maxps 3133065982, %xmm5 + maxps 0xbabecafe,%xmm5 + +// CHECK: maxps 305419896, %xmm5 + maxps 0x12345678,%xmm5 + +// CHECK: maxps %xmm5, %xmm5 + maxps %xmm5,%xmm5 + +// CHECK: maxss 3735928559(%ebx,%ecx,8), %xmm5 + maxss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: maxss 69, %xmm5 + maxss 0x45,%xmm5 + +// CHECK: maxss 32493, %xmm5 + maxss 0x7eed,%xmm5 + +// CHECK: maxss 3133065982, %xmm5 + maxss 0xbabecafe,%xmm5 + +// CHECK: maxss 305419896, %xmm5 + maxss 0x12345678,%xmm5 + +// CHECK: maxss %xmm5, %xmm5 + maxss %xmm5,%xmm5 + +// CHECK: minps 3735928559(%ebx,%ecx,8), %xmm5 + minps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: minps 69, %xmm5 + minps 0x45,%xmm5 + +// CHECK: minps 32493, %xmm5 + minps 0x7eed,%xmm5 + +// CHECK: minps 3133065982, %xmm5 + minps 0xbabecafe,%xmm5 + +// CHECK: minps 305419896, %xmm5 + minps 0x12345678,%xmm5 + +// CHECK: minps %xmm5, %xmm5 + minps %xmm5,%xmm5 + +// CHECK: minss 3735928559(%ebx,%ecx,8), %xmm5 + minss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: minss 69, %xmm5 + minss 0x45,%xmm5 + +// CHECK: minss 32493, %xmm5 + minss 0x7eed,%xmm5 + +// CHECK: minss 3133065982, %xmm5 + minss 0xbabecafe,%xmm5 + +// CHECK: minss 305419896, %xmm5 + minss 0x12345678,%xmm5 + +// CHECK: minss %xmm5, %xmm5 + minss %xmm5,%xmm5 + +// CHECK: movaps 3735928559(%ebx,%ecx,8), %xmm5 + movaps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movaps 69, %xmm5 + movaps 0x45,%xmm5 + +// CHECK: movaps 32493, %xmm5 + movaps 0x7eed,%xmm5 + +// CHECK: movaps 3133065982, %xmm5 + movaps 0xbabecafe,%xmm5 + +// CHECK: movaps 305419896, %xmm5 + movaps 0x12345678,%xmm5 + +// CHECK: movaps %xmm5, %xmm5 + movaps %xmm5,%xmm5 + +// CHECK: movaps %xmm5, 3735928559(%ebx,%ecx,8) + movaps %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movaps %xmm5, 69 + movaps %xmm5,0x45 + +// CHECK: movaps %xmm5, 32493 + movaps %xmm5,0x7eed + +// CHECK: movaps %xmm5, 3133065982 + movaps %xmm5,0xbabecafe + +// CHECK: movaps %xmm5, 305419896 + movaps %xmm5,0x12345678 + +// CHECK: movaps %xmm5, %xmm5 + movaps %xmm5,%xmm5 + +// CHECK: movhlps %xmm5, %xmm5 + movhlps %xmm5,%xmm5 + +// CHECK: movhps 3735928559(%ebx,%ecx,8), %xmm5 + movhps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movhps 69, %xmm5 + movhps 0x45,%xmm5 + +// CHECK: movhps 32493, %xmm5 + movhps 0x7eed,%xmm5 + +// CHECK: movhps 3133065982, %xmm5 + movhps 0xbabecafe,%xmm5 + +// CHECK: movhps 305419896, %xmm5 + movhps 0x12345678,%xmm5 + +// CHECK: movhps %xmm5, 3735928559(%ebx,%ecx,8) + movhps %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movhps %xmm5, 69 + movhps %xmm5,0x45 + +// CHECK: movhps %xmm5, 32493 + movhps %xmm5,0x7eed + +// CHECK: movhps %xmm5, 3133065982 + movhps %xmm5,0xbabecafe + +// CHECK: movhps %xmm5, 305419896 + movhps %xmm5,0x12345678 + +// CHECK: movlhps %xmm5, %xmm5 + movlhps %xmm5,%xmm5 + +// CHECK: movlps 3735928559(%ebx,%ecx,8), %xmm5 + movlps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movlps 69, %xmm5 + movlps 0x45,%xmm5 + +// CHECK: movlps 32493, %xmm5 + movlps 0x7eed,%xmm5 + +// CHECK: movlps 3133065982, %xmm5 + movlps 0xbabecafe,%xmm5 + +// CHECK: movlps 305419896, %xmm5 + movlps 0x12345678,%xmm5 + +// CHECK: movlps %xmm5, 3735928559(%ebx,%ecx,8) + movlps %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movlps %xmm5, 69 + movlps %xmm5,0x45 + +// CHECK: movlps %xmm5, 32493 + movlps %xmm5,0x7eed + +// CHECK: movlps %xmm5, 3133065982 + movlps %xmm5,0xbabecafe + +// CHECK: movlps %xmm5, 305419896 + movlps %xmm5,0x12345678 + +// CHECK: movmskps %xmm5, %ecx + movmskps %xmm5,%ecx + +// CHECK: movntps %xmm5, 3735928559(%ebx,%ecx,8) + movntps %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movntps %xmm5, 69 + movntps %xmm5,0x45 + +// CHECK: movntps %xmm5, 32493 + movntps %xmm5,0x7eed + +// CHECK: movntps %xmm5, 3133065982 + movntps %xmm5,0xbabecafe + +// CHECK: movntps %xmm5, 305419896 + movntps %xmm5,0x12345678 + +// CHECK: movntq %mm3, 3735928559(%ebx,%ecx,8) + movntq %mm3,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movntq %mm3, 69 + movntq %mm3,0x45 + +// CHECK: movntq %mm3, 32493 + movntq %mm3,0x7eed + +// CHECK: movntq %mm3, 3133065982 + movntq %mm3,0xbabecafe + +// CHECK: movntq %mm3, 305419896 + movntq %mm3,0x12345678 + +// CHECK: movntdq %xmm5, 3735928559(%ebx,%ecx,8) + movntdq %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movntdq %xmm5, 69 + movntdq %xmm5,0x45 + +// CHECK: movntdq %xmm5, 32493 + movntdq %xmm5,0x7eed + +// CHECK: movntdq %xmm5, 3133065982 + movntdq %xmm5,0xbabecafe + +// CHECK: movntdq %xmm5, 305419896 + movntdq %xmm5,0x12345678 + +// CHECK: movss 3735928559(%ebx,%ecx,8), %xmm5 + movss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movss 69, %xmm5 + movss 0x45,%xmm5 + +// CHECK: movss 32493, %xmm5 + movss 0x7eed,%xmm5 + +// CHECK: movss 3133065982, %xmm5 + movss 0xbabecafe,%xmm5 + +// CHECK: movss 305419896, %xmm5 + movss 0x12345678,%xmm5 + +// CHECK: movss %xmm5, %xmm5 + movss %xmm5,%xmm5 + +// CHECK: movss %xmm5, 3735928559(%ebx,%ecx,8) + movss %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movss %xmm5, 69 + movss %xmm5,0x45 + +// CHECK: movss %xmm5, 32493 + movss %xmm5,0x7eed + +// CHECK: movss %xmm5, 3133065982 + movss %xmm5,0xbabecafe + +// CHECK: movss %xmm5, 305419896 + movss %xmm5,0x12345678 + +// CHECK: movss %xmm5, %xmm5 + movss %xmm5,%xmm5 + +// CHECK: movups 3735928559(%ebx,%ecx,8), %xmm5 + movups 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movups 69, %xmm5 + movups 0x45,%xmm5 + +// CHECK: movups 32493, %xmm5 + movups 0x7eed,%xmm5 + +// CHECK: movups 3133065982, %xmm5 + movups 0xbabecafe,%xmm5 + +// CHECK: movups 305419896, %xmm5 + movups 0x12345678,%xmm5 + +// CHECK: movups %xmm5, %xmm5 + movups %xmm5,%xmm5 + +// CHECK: movups %xmm5, 3735928559(%ebx,%ecx,8) + movups %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movups %xmm5, 69 + movups %xmm5,0x45 + +// CHECK: movups %xmm5, 32493 + movups %xmm5,0x7eed + +// CHECK: movups %xmm5, 3133065982 + movups %xmm5,0xbabecafe + +// CHECK: movups %xmm5, 305419896 + movups %xmm5,0x12345678 + +// CHECK: movups %xmm5, %xmm5 + movups %xmm5,%xmm5 + +// CHECK: mulps 3735928559(%ebx,%ecx,8), %xmm5 + mulps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: mulps 69, %xmm5 + mulps 0x45,%xmm5 + +// CHECK: mulps 32493, %xmm5 + mulps 0x7eed,%xmm5 + +// CHECK: mulps 3133065982, %xmm5 + mulps 0xbabecafe,%xmm5 + +// CHECK: mulps 305419896, %xmm5 + mulps 0x12345678,%xmm5 + +// CHECK: mulps %xmm5, %xmm5 + mulps %xmm5,%xmm5 + +// CHECK: mulss 3735928559(%ebx,%ecx,8), %xmm5 + mulss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: mulss 69, %xmm5 + mulss 0x45,%xmm5 + +// CHECK: mulss 32493, %xmm5 + mulss 0x7eed,%xmm5 + +// CHECK: mulss 3133065982, %xmm5 + mulss 0xbabecafe,%xmm5 + +// CHECK: mulss 305419896, %xmm5 + mulss 0x12345678,%xmm5 + +// CHECK: mulss %xmm5, %xmm5 + mulss %xmm5,%xmm5 + +// CHECK: orps 3735928559(%ebx,%ecx,8), %xmm5 + orps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: orps 69, %xmm5 + orps 0x45,%xmm5 + +// CHECK: orps 32493, %xmm5 + orps 0x7eed,%xmm5 + +// CHECK: orps 3133065982, %xmm5 + orps 0xbabecafe,%xmm5 + +// CHECK: orps 305419896, %xmm5 + orps 0x12345678,%xmm5 + +// CHECK: orps %xmm5, %xmm5 + orps %xmm5,%xmm5 + +// CHECK: pavgb 3735928559(%ebx,%ecx,8), %mm3 + pavgb 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pavgb 69, %mm3 + pavgb 0x45,%mm3 + +// CHECK: pavgb 32493, %mm3 + pavgb 0x7eed,%mm3 + +// CHECK: pavgb 3133065982, %mm3 + pavgb 0xbabecafe,%mm3 + +// CHECK: pavgb 305419896, %mm3 + pavgb 0x12345678,%mm3 + +// CHECK: pavgb %mm3, %mm3 + pavgb %mm3,%mm3 + +// CHECK: pavgb 3735928559(%ebx,%ecx,8), %xmm5 + pavgb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pavgb 69, %xmm5 + pavgb 0x45,%xmm5 + +// CHECK: pavgb 32493, %xmm5 + pavgb 0x7eed,%xmm5 + +// CHECK: pavgb 3133065982, %xmm5 + pavgb 0xbabecafe,%xmm5 + +// CHECK: pavgb 305419896, %xmm5 + pavgb 0x12345678,%xmm5 + +// CHECK: pavgb %xmm5, %xmm5 + pavgb %xmm5,%xmm5 + +// CHECK: pavgw 3735928559(%ebx,%ecx,8), %mm3 + pavgw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pavgw 69, %mm3 + pavgw 0x45,%mm3 + +// CHECK: pavgw 32493, %mm3 + pavgw 0x7eed,%mm3 + +// CHECK: pavgw 3133065982, %mm3 + pavgw 0xbabecafe,%mm3 + +// CHECK: pavgw 305419896, %mm3 + pavgw 0x12345678,%mm3 + +// CHECK: pavgw %mm3, %mm3 + pavgw %mm3,%mm3 + +// CHECK: pavgw 3735928559(%ebx,%ecx,8), %xmm5 + pavgw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pavgw 69, %xmm5 + pavgw 0x45,%xmm5 + +// CHECK: pavgw 32493, %xmm5 + pavgw 0x7eed,%xmm5 + +// CHECK: pavgw 3133065982, %xmm5 + pavgw 0xbabecafe,%xmm5 + +// CHECK: pavgw 305419896, %xmm5 + pavgw 0x12345678,%xmm5 + +// CHECK: pavgw %xmm5, %xmm5 + pavgw %xmm5,%xmm5 + +// CHECK: pmaxsw 3735928559(%ebx,%ecx,8), %mm3 + pmaxsw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pmaxsw 69, %mm3 + pmaxsw 0x45,%mm3 + +// CHECK: pmaxsw 32493, %mm3 + pmaxsw 0x7eed,%mm3 + +// CHECK: pmaxsw 3133065982, %mm3 + pmaxsw 0xbabecafe,%mm3 + +// CHECK: pmaxsw 305419896, %mm3 + pmaxsw 0x12345678,%mm3 + +// CHECK: pmaxsw %mm3, %mm3 + pmaxsw %mm3,%mm3 + +// CHECK: pmaxsw 3735928559(%ebx,%ecx,8), %xmm5 + pmaxsw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmaxsw 69, %xmm5 + pmaxsw 0x45,%xmm5 + +// CHECK: pmaxsw 32493, %xmm5 + pmaxsw 0x7eed,%xmm5 + +// CHECK: pmaxsw 3133065982, %xmm5 + pmaxsw 0xbabecafe,%xmm5 + +// CHECK: pmaxsw 305419896, %xmm5 + pmaxsw 0x12345678,%xmm5 + +// CHECK: pmaxsw %xmm5, %xmm5 + pmaxsw %xmm5,%xmm5 + +// CHECK: pmaxub 3735928559(%ebx,%ecx,8), %mm3 + pmaxub 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pmaxub 69, %mm3 + pmaxub 0x45,%mm3 + +// CHECK: pmaxub 32493, %mm3 + pmaxub 0x7eed,%mm3 + +// CHECK: pmaxub 3133065982, %mm3 + pmaxub 0xbabecafe,%mm3 + +// CHECK: pmaxub 305419896, %mm3 + pmaxub 0x12345678,%mm3 + +// CHECK: pmaxub %mm3, %mm3 + pmaxub %mm3,%mm3 + +// CHECK: pmaxub 3735928559(%ebx,%ecx,8), %xmm5 + pmaxub 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmaxub 69, %xmm5 + pmaxub 0x45,%xmm5 + +// CHECK: pmaxub 32493, %xmm5 + pmaxub 0x7eed,%xmm5 + +// CHECK: pmaxub 3133065982, %xmm5 + pmaxub 0xbabecafe,%xmm5 + +// CHECK: pmaxub 305419896, %xmm5 + pmaxub 0x12345678,%xmm5 + +// CHECK: pmaxub %xmm5, %xmm5 + pmaxub %xmm5,%xmm5 + +// CHECK: pminsw 3735928559(%ebx,%ecx,8), %mm3 + pminsw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pminsw 69, %mm3 + pminsw 0x45,%mm3 + +// CHECK: pminsw 32493, %mm3 + pminsw 0x7eed,%mm3 + +// CHECK: pminsw 3133065982, %mm3 + pminsw 0xbabecafe,%mm3 + +// CHECK: pminsw 305419896, %mm3 + pminsw 0x12345678,%mm3 + +// CHECK: pminsw %mm3, %mm3 + pminsw %mm3,%mm3 + +// CHECK: pminsw 3735928559(%ebx,%ecx,8), %xmm5 + pminsw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pminsw 69, %xmm5 + pminsw 0x45,%xmm5 + +// CHECK: pminsw 32493, %xmm5 + pminsw 0x7eed,%xmm5 + +// CHECK: pminsw 3133065982, %xmm5 + pminsw 0xbabecafe,%xmm5 + +// CHECK: pminsw 305419896, %xmm5 + pminsw 0x12345678,%xmm5 + +// CHECK: pminsw %xmm5, %xmm5 + pminsw %xmm5,%xmm5 + +// CHECK: pminub 3735928559(%ebx,%ecx,8), %mm3 + pminub 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pminub 69, %mm3 + pminub 0x45,%mm3 + +// CHECK: pminub 32493, %mm3 + pminub 0x7eed,%mm3 + +// CHECK: pminub 3133065982, %mm3 + pminub 0xbabecafe,%mm3 + +// CHECK: pminub 305419896, %mm3 + pminub 0x12345678,%mm3 + +// CHECK: pminub %mm3, %mm3 + pminub %mm3,%mm3 + +// CHECK: pminub 3735928559(%ebx,%ecx,8), %xmm5 + pminub 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pminub 69, %xmm5 + pminub 0x45,%xmm5 + +// CHECK: pminub 32493, %xmm5 + pminub 0x7eed,%xmm5 + +// CHECK: pminub 3133065982, %xmm5 + pminub 0xbabecafe,%xmm5 + +// CHECK: pminub 305419896, %xmm5 + pminub 0x12345678,%xmm5 + +// CHECK: pminub %xmm5, %xmm5 + pminub %xmm5,%xmm5 + +// CHECK: pmovmskb %mm3, %ecx + pmovmskb %mm3,%ecx + +// CHECK: pmovmskb %xmm5, %ecx + pmovmskb %xmm5,%ecx + +// CHECK: pmulhuw 3735928559(%ebx,%ecx,8), %mm3 + pmulhuw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pmulhuw 69, %mm3 + pmulhuw 0x45,%mm3 + +// CHECK: pmulhuw 32493, %mm3 + pmulhuw 0x7eed,%mm3 + +// CHECK: pmulhuw 3133065982, %mm3 + pmulhuw 0xbabecafe,%mm3 + +// CHECK: pmulhuw 305419896, %mm3 + pmulhuw 0x12345678,%mm3 + +// CHECK: pmulhuw %mm3, %mm3 + pmulhuw %mm3,%mm3 + +// CHECK: pmulhuw 3735928559(%ebx,%ecx,8), %xmm5 + pmulhuw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmulhuw 69, %xmm5 + pmulhuw 0x45,%xmm5 + +// CHECK: pmulhuw 32493, %xmm5 + pmulhuw 0x7eed,%xmm5 + +// CHECK: pmulhuw 3133065982, %xmm5 + pmulhuw 0xbabecafe,%xmm5 + +// CHECK: pmulhuw 305419896, %xmm5 + pmulhuw 0x12345678,%xmm5 + +// CHECK: pmulhuw %xmm5, %xmm5 + pmulhuw %xmm5,%xmm5 + +// CHECK: prefetchnta 3735928559(%ebx,%ecx,8) + prefetchnta 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: prefetchnta 32493 + prefetchnta 0x7eed + +// CHECK: prefetchnta 3133065982 + prefetchnta 0xbabecafe + +// CHECK: prefetchnta 305419896 + prefetchnta 0x12345678 + +// CHECK: prefetcht0 3735928559(%ebx,%ecx,8) + prefetcht0 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: prefetcht0 32493 + prefetcht0 0x7eed + +// CHECK: prefetcht0 3133065982 + prefetcht0 0xbabecafe + +// CHECK: prefetcht0 305419896 + prefetcht0 0x12345678 + +// CHECK: prefetcht1 3735928559(%ebx,%ecx,8) + prefetcht1 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: prefetcht1 32493 + prefetcht1 0x7eed + +// CHECK: prefetcht1 3133065982 + prefetcht1 0xbabecafe + +// CHECK: prefetcht1 305419896 + prefetcht1 0x12345678 + +// CHECK: prefetcht2 3735928559(%ebx,%ecx,8) + prefetcht2 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: prefetcht2 32493 + prefetcht2 0x7eed + +// CHECK: prefetcht2 3133065982 + prefetcht2 0xbabecafe + +// CHECK: prefetcht2 305419896 + prefetcht2 0x12345678 + +// CHECK: psadbw 3735928559(%ebx,%ecx,8), %mm3 + psadbw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psadbw 69, %mm3 + psadbw 0x45,%mm3 + +// CHECK: psadbw 32493, %mm3 + psadbw 0x7eed,%mm3 + +// CHECK: psadbw 3133065982, %mm3 + psadbw 0xbabecafe,%mm3 + +// CHECK: psadbw 305419896, %mm3 + psadbw 0x12345678,%mm3 + +// CHECK: psadbw %mm3, %mm3 + psadbw %mm3,%mm3 + +// CHECK: psadbw 3735928559(%ebx,%ecx,8), %xmm5 + psadbw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psadbw 69, %xmm5 + psadbw 0x45,%xmm5 + +// CHECK: psadbw 32493, %xmm5 + psadbw 0x7eed,%xmm5 + +// CHECK: psadbw 3133065982, %xmm5 + psadbw 0xbabecafe,%xmm5 + +// CHECK: psadbw 305419896, %xmm5 + psadbw 0x12345678,%xmm5 + +// CHECK: psadbw %xmm5, %xmm5 + psadbw %xmm5,%xmm5 + +// CHECK: rcpps 3735928559(%ebx,%ecx,8), %xmm5 + rcpps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: rcpps 69, %xmm5 + rcpps 0x45,%xmm5 + +// CHECK: rcpps 32493, %xmm5 + rcpps 0x7eed,%xmm5 + +// CHECK: rcpps 3133065982, %xmm5 + rcpps 0xbabecafe,%xmm5 + +// CHECK: rcpps 305419896, %xmm5 + rcpps 0x12345678,%xmm5 + +// CHECK: rcpps %xmm5, %xmm5 + rcpps %xmm5,%xmm5 + +// CHECK: rcpss 3735928559(%ebx,%ecx,8), %xmm5 + rcpss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: rcpss 69, %xmm5 + rcpss 0x45,%xmm5 + +// CHECK: rcpss 32493, %xmm5 + rcpss 0x7eed,%xmm5 + +// CHECK: rcpss 3133065982, %xmm5 + rcpss 0xbabecafe,%xmm5 + +// CHECK: rcpss 305419896, %xmm5 + rcpss 0x12345678,%xmm5 + +// CHECK: rcpss %xmm5, %xmm5 + rcpss %xmm5,%xmm5 + +// CHECK: rsqrtps 3735928559(%ebx,%ecx,8), %xmm5 + rsqrtps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: rsqrtps 69, %xmm5 + rsqrtps 0x45,%xmm5 + +// CHECK: rsqrtps 32493, %xmm5 + rsqrtps 0x7eed,%xmm5 + +// CHECK: rsqrtps 3133065982, %xmm5 + rsqrtps 0xbabecafe,%xmm5 + +// CHECK: rsqrtps 305419896, %xmm5 + rsqrtps 0x12345678,%xmm5 + +// CHECK: rsqrtps %xmm5, %xmm5 + rsqrtps %xmm5,%xmm5 + +// CHECK: rsqrtss 3735928559(%ebx,%ecx,8), %xmm5 + rsqrtss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: rsqrtss 69, %xmm5 + rsqrtss 0x45,%xmm5 + +// CHECK: rsqrtss 32493, %xmm5 + rsqrtss 0x7eed,%xmm5 + +// CHECK: rsqrtss 3133065982, %xmm5 + rsqrtss 0xbabecafe,%xmm5 + +// CHECK: rsqrtss 305419896, %xmm5 + rsqrtss 0x12345678,%xmm5 + +// CHECK: rsqrtss %xmm5, %xmm5 + rsqrtss %xmm5,%xmm5 + +// CHECK: sfence + sfence + +// CHECK: sqrtps 3735928559(%ebx,%ecx,8), %xmm5 + sqrtps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: sqrtps 69, %xmm5 + sqrtps 0x45,%xmm5 + +// CHECK: sqrtps 32493, %xmm5 + sqrtps 0x7eed,%xmm5 + +// CHECK: sqrtps 3133065982, %xmm5 + sqrtps 0xbabecafe,%xmm5 + +// CHECK: sqrtps 305419896, %xmm5 + sqrtps 0x12345678,%xmm5 + +// CHECK: sqrtps %xmm5, %xmm5 + sqrtps %xmm5,%xmm5 + +// CHECK: sqrtss 3735928559(%ebx,%ecx,8), %xmm5 + sqrtss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: sqrtss 69, %xmm5 + sqrtss 0x45,%xmm5 + +// CHECK: sqrtss 32493, %xmm5 + sqrtss 0x7eed,%xmm5 + +// CHECK: sqrtss 3133065982, %xmm5 + sqrtss 0xbabecafe,%xmm5 + +// CHECK: sqrtss 305419896, %xmm5 + sqrtss 0x12345678,%xmm5 + +// CHECK: sqrtss %xmm5, %xmm5 + sqrtss %xmm5,%xmm5 + +// CHECK: stmxcsr 3735928559(%ebx,%ecx,8) + stmxcsr 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: stmxcsr 32493 + stmxcsr 0x7eed + +// CHECK: stmxcsr 3133065982 + stmxcsr 0xbabecafe + +// CHECK: stmxcsr 305419896 + stmxcsr 0x12345678 + +// CHECK: subps 3735928559(%ebx,%ecx,8), %xmm5 + subps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: subps 69, %xmm5 + subps 0x45,%xmm5 + +// CHECK: subps 32493, %xmm5 + subps 0x7eed,%xmm5 + +// CHECK: subps 3133065982, %xmm5 + subps 0xbabecafe,%xmm5 + +// CHECK: subps 305419896, %xmm5 + subps 0x12345678,%xmm5 + +// CHECK: subps %xmm5, %xmm5 + subps %xmm5,%xmm5 + +// CHECK: subss 3735928559(%ebx,%ecx,8), %xmm5 + subss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: subss 69, %xmm5 + subss 0x45,%xmm5 + +// CHECK: subss 32493, %xmm5 + subss 0x7eed,%xmm5 + +// CHECK: subss 3133065982, %xmm5 + subss 0xbabecafe,%xmm5 + +// CHECK: subss 305419896, %xmm5 + subss 0x12345678,%xmm5 + +// CHECK: subss %xmm5, %xmm5 + subss %xmm5,%xmm5 + +// CHECK: ucomiss 3735928559(%ebx,%ecx,8), %xmm5 + ucomiss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: ucomiss 69, %xmm5 + ucomiss 0x45,%xmm5 + +// CHECK: ucomiss 32493, %xmm5 + ucomiss 0x7eed,%xmm5 + +// CHECK: ucomiss 3133065982, %xmm5 + ucomiss 0xbabecafe,%xmm5 + +// CHECK: ucomiss 305419896, %xmm5 + ucomiss 0x12345678,%xmm5 + +// CHECK: ucomiss %xmm5, %xmm5 + ucomiss %xmm5,%xmm5 + +// CHECK: unpckhps 3735928559(%ebx,%ecx,8), %xmm5 + unpckhps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: unpckhps 69, %xmm5 + unpckhps 0x45,%xmm5 + +// CHECK: unpckhps 32493, %xmm5 + unpckhps 0x7eed,%xmm5 + +// CHECK: unpckhps 3133065982, %xmm5 + unpckhps 0xbabecafe,%xmm5 + +// CHECK: unpckhps 305419896, %xmm5 + unpckhps 0x12345678,%xmm5 + +// CHECK: unpckhps %xmm5, %xmm5 + unpckhps %xmm5,%xmm5 + +// CHECK: unpcklps 3735928559(%ebx,%ecx,8), %xmm5 + unpcklps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: unpcklps 69, %xmm5 + unpcklps 0x45,%xmm5 + +// CHECK: unpcklps 32493, %xmm5 + unpcklps 0x7eed,%xmm5 + +// CHECK: unpcklps 3133065982, %xmm5 + unpcklps 0xbabecafe,%xmm5 + +// CHECK: unpcklps 305419896, %xmm5 + unpcklps 0x12345678,%xmm5 + +// CHECK: unpcklps %xmm5, %xmm5 + unpcklps %xmm5,%xmm5 + +// CHECK: xorps 3735928559(%ebx,%ecx,8), %xmm5 + xorps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: xorps 69, %xmm5 + xorps 0x45,%xmm5 + +// CHECK: xorps 32493, %xmm5 + xorps 0x7eed,%xmm5 + +// CHECK: xorps 3133065982, %xmm5 + xorps 0xbabecafe,%xmm5 + +// CHECK: xorps 305419896, %xmm5 + xorps 0x12345678,%xmm5 + +// CHECK: xorps %xmm5, %xmm5 + xorps %xmm5,%xmm5 + +// CHECK: addpd 3735928559(%ebx,%ecx,8), %xmm5 + addpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: addpd 69, %xmm5 + addpd 0x45,%xmm5 + +// CHECK: addpd 32493, %xmm5 + addpd 0x7eed,%xmm5 + +// CHECK: addpd 3133065982, %xmm5 + addpd 0xbabecafe,%xmm5 + +// CHECK: addpd 305419896, %xmm5 + addpd 0x12345678,%xmm5 + +// CHECK: addpd %xmm5, %xmm5 + addpd %xmm5,%xmm5 + +// CHECK: addsd 3735928559(%ebx,%ecx,8), %xmm5 + addsd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: addsd 69, %xmm5 + addsd 0x45,%xmm5 + +// CHECK: addsd 32493, %xmm5 + addsd 0x7eed,%xmm5 + +// CHECK: addsd 3133065982, %xmm5 + addsd 0xbabecafe,%xmm5 + +// CHECK: addsd 305419896, %xmm5 + addsd 0x12345678,%xmm5 + +// CHECK: addsd %xmm5, %xmm5 + addsd %xmm5,%xmm5 + +// CHECK: andnpd 3735928559(%ebx,%ecx,8), %xmm5 + andnpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: andnpd 69, %xmm5 + andnpd 0x45,%xmm5 + +// CHECK: andnpd 32493, %xmm5 + andnpd 0x7eed,%xmm5 + +// CHECK: andnpd 3133065982, %xmm5 + andnpd 0xbabecafe,%xmm5 + +// CHECK: andnpd 305419896, %xmm5 + andnpd 0x12345678,%xmm5 + +// CHECK: andnpd %xmm5, %xmm5 + andnpd %xmm5,%xmm5 + +// CHECK: andpd 3735928559(%ebx,%ecx,8), %xmm5 + andpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: andpd 69, %xmm5 + andpd 0x45,%xmm5 + +// CHECK: andpd 32493, %xmm5 + andpd 0x7eed,%xmm5 + +// CHECK: andpd 3133065982, %xmm5 + andpd 0xbabecafe,%xmm5 + +// CHECK: andpd 305419896, %xmm5 + andpd 0x12345678,%xmm5 + +// CHECK: andpd %xmm5, %xmm5 + andpd %xmm5,%xmm5 + +// CHECK: comisd 3735928559(%ebx,%ecx,8), %xmm5 + comisd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: comisd 69, %xmm5 + comisd 0x45,%xmm5 + +// CHECK: comisd 32493, %xmm5 + comisd 0x7eed,%xmm5 + +// CHECK: comisd 3133065982, %xmm5 + comisd 0xbabecafe,%xmm5 + +// CHECK: comisd 305419896, %xmm5 + comisd 0x12345678,%xmm5 + +// CHECK: comisd %xmm5, %xmm5 + comisd %xmm5,%xmm5 + +// CHECK: cvtpi2pd 3735928559(%ebx,%ecx,8), %xmm5 + cvtpi2pd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: cvtpi2pd 69, %xmm5 + cvtpi2pd 0x45,%xmm5 + +// CHECK: cvtpi2pd 32493, %xmm5 + cvtpi2pd 0x7eed,%xmm5 + +// CHECK: cvtpi2pd 3133065982, %xmm5 + cvtpi2pd 0xbabecafe,%xmm5 + +// CHECK: cvtpi2pd 305419896, %xmm5 + cvtpi2pd 0x12345678,%xmm5 + +// CHECK: cvtpi2pd %mm3, %xmm5 + cvtpi2pd %mm3,%xmm5 + +// CHECK: cvtsi2sd %ecx, %xmm5 + cvtsi2sd %ecx,%xmm5 + +// CHECK: cvtsi2sd 3735928559(%ebx,%ecx,8), %xmm5 + cvtsi2sd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: cvtsi2sd 69, %xmm5 + cvtsi2sd 0x45,%xmm5 + +// CHECK: cvtsi2sd 32493, %xmm5 + cvtsi2sd 0x7eed,%xmm5 + +// CHECK: cvtsi2sd 3133065982, %xmm5 + cvtsi2sd 0xbabecafe,%xmm5 + +// CHECK: cvtsi2sd 305419896, %xmm5 + cvtsi2sd 0x12345678,%xmm5 + +// CHECK: divpd 3735928559(%ebx,%ecx,8), %xmm5 + divpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: divpd 69, %xmm5 + divpd 0x45,%xmm5 + +// CHECK: divpd 32493, %xmm5 + divpd 0x7eed,%xmm5 + +// CHECK: divpd 3133065982, %xmm5 + divpd 0xbabecafe,%xmm5 + +// CHECK: divpd 305419896, %xmm5 + divpd 0x12345678,%xmm5 + +// CHECK: divpd %xmm5, %xmm5 + divpd %xmm5,%xmm5 + +// CHECK: divsd 3735928559(%ebx,%ecx,8), %xmm5 + divsd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: divsd 69, %xmm5 + divsd 0x45,%xmm5 + +// CHECK: divsd 32493, %xmm5 + divsd 0x7eed,%xmm5 + +// CHECK: divsd 3133065982, %xmm5 + divsd 0xbabecafe,%xmm5 + +// CHECK: divsd 305419896, %xmm5 + divsd 0x12345678,%xmm5 + +// CHECK: divsd %xmm5, %xmm5 + divsd %xmm5,%xmm5 + +// CHECK: maxpd 3735928559(%ebx,%ecx,8), %xmm5 + maxpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: maxpd 69, %xmm5 + maxpd 0x45,%xmm5 + +// CHECK: maxpd 32493, %xmm5 + maxpd 0x7eed,%xmm5 + +// CHECK: maxpd 3133065982, %xmm5 + maxpd 0xbabecafe,%xmm5 + +// CHECK: maxpd 305419896, %xmm5 + maxpd 0x12345678,%xmm5 + +// CHECK: maxpd %xmm5, %xmm5 + maxpd %xmm5,%xmm5 + +// CHECK: maxsd 3735928559(%ebx,%ecx,8), %xmm5 + maxsd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: maxsd 69, %xmm5 + maxsd 0x45,%xmm5 + +// CHECK: maxsd 32493, %xmm5 + maxsd 0x7eed,%xmm5 + +// CHECK: maxsd 3133065982, %xmm5 + maxsd 0xbabecafe,%xmm5 + +// CHECK: maxsd 305419896, %xmm5 + maxsd 0x12345678,%xmm5 + +// CHECK: maxsd %xmm5, %xmm5 + maxsd %xmm5,%xmm5 + +// CHECK: minpd 3735928559(%ebx,%ecx,8), %xmm5 + minpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: minpd 69, %xmm5 + minpd 0x45,%xmm5 + +// CHECK: minpd 32493, %xmm5 + minpd 0x7eed,%xmm5 + +// CHECK: minpd 3133065982, %xmm5 + minpd 0xbabecafe,%xmm5 + +// CHECK: minpd 305419896, %xmm5 + minpd 0x12345678,%xmm5 + +// CHECK: minpd %xmm5, %xmm5 + minpd %xmm5,%xmm5 + +// CHECK: minsd 3735928559(%ebx,%ecx,8), %xmm5 + minsd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: minsd 69, %xmm5 + minsd 0x45,%xmm5 + +// CHECK: minsd 32493, %xmm5 + minsd 0x7eed,%xmm5 + +// CHECK: minsd 3133065982, %xmm5 + minsd 0xbabecafe,%xmm5 + +// CHECK: minsd 305419896, %xmm5 + minsd 0x12345678,%xmm5 + +// CHECK: minsd %xmm5, %xmm5 + minsd %xmm5,%xmm5 + +// CHECK: movapd 3735928559(%ebx,%ecx,8), %xmm5 + movapd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movapd 69, %xmm5 + movapd 0x45,%xmm5 + +// CHECK: movapd 32493, %xmm5 + movapd 0x7eed,%xmm5 + +// CHECK: movapd 3133065982, %xmm5 + movapd 0xbabecafe,%xmm5 + +// CHECK: movapd 305419896, %xmm5 + movapd 0x12345678,%xmm5 + +// CHECK: movapd %xmm5, %xmm5 + movapd %xmm5,%xmm5 + +// CHECK: movapd %xmm5, 3735928559(%ebx,%ecx,8) + movapd %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movapd %xmm5, 69 + movapd %xmm5,0x45 + +// CHECK: movapd %xmm5, 32493 + movapd %xmm5,0x7eed + +// CHECK: movapd %xmm5, 3133065982 + movapd %xmm5,0xbabecafe + +// CHECK: movapd %xmm5, 305419896 + movapd %xmm5,0x12345678 + +// CHECK: movapd %xmm5, %xmm5 + movapd %xmm5,%xmm5 + +// CHECK: movhpd 3735928559(%ebx,%ecx,8), %xmm5 + movhpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movhpd 69, %xmm5 + movhpd 0x45,%xmm5 + +// CHECK: movhpd 32493, %xmm5 + movhpd 0x7eed,%xmm5 + +// CHECK: movhpd 3133065982, %xmm5 + movhpd 0xbabecafe,%xmm5 + +// CHECK: movhpd 305419896, %xmm5 + movhpd 0x12345678,%xmm5 + +// CHECK: movhpd %xmm5, 3735928559(%ebx,%ecx,8) + movhpd %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movhpd %xmm5, 69 + movhpd %xmm5,0x45 + +// CHECK: movhpd %xmm5, 32493 + movhpd %xmm5,0x7eed + +// CHECK: movhpd %xmm5, 3133065982 + movhpd %xmm5,0xbabecafe + +// CHECK: movhpd %xmm5, 305419896 + movhpd %xmm5,0x12345678 + +// CHECK: movlpd 3735928559(%ebx,%ecx,8), %xmm5 + movlpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movlpd 69, %xmm5 + movlpd 0x45,%xmm5 + +// CHECK: movlpd 32493, %xmm5 + movlpd 0x7eed,%xmm5 + +// CHECK: movlpd 3133065982, %xmm5 + movlpd 0xbabecafe,%xmm5 + +// CHECK: movlpd 305419896, %xmm5 + movlpd 0x12345678,%xmm5 + +// CHECK: movlpd %xmm5, 3735928559(%ebx,%ecx,8) + movlpd %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movlpd %xmm5, 69 + movlpd %xmm5,0x45 + +// CHECK: movlpd %xmm5, 32493 + movlpd %xmm5,0x7eed + +// CHECK: movlpd %xmm5, 3133065982 + movlpd %xmm5,0xbabecafe + +// CHECK: movlpd %xmm5, 305419896 + movlpd %xmm5,0x12345678 + +// CHECK: movmskpd %xmm5, %ecx + movmskpd %xmm5,%ecx + +// CHECK: movntpd %xmm5, 3735928559(%ebx,%ecx,8) + movntpd %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movntpd %xmm5, 69 + movntpd %xmm5,0x45 + +// CHECK: movntpd %xmm5, 32493 + movntpd %xmm5,0x7eed + +// CHECK: movntpd %xmm5, 3133065982 + movntpd %xmm5,0xbabecafe + +// CHECK: movntpd %xmm5, 305419896 + movntpd %xmm5,0x12345678 + +// CHECK: movsd 3735928559(%ebx,%ecx,8), %xmm5 + movsd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movsd 69, %xmm5 + movsd 0x45,%xmm5 + +// CHECK: movsd 32493, %xmm5 + movsd 0x7eed,%xmm5 + +// CHECK: movsd 3133065982, %xmm5 + movsd 0xbabecafe,%xmm5 + +// CHECK: movsd 305419896, %xmm5 + movsd 0x12345678,%xmm5 + +// CHECK: movsd %xmm5, %xmm5 + movsd %xmm5,%xmm5 + +// CHECK: movsd %xmm5, 3735928559(%ebx,%ecx,8) + movsd %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movsd %xmm5, 69 + movsd %xmm5,0x45 + +// CHECK: movsd %xmm5, 32493 + movsd %xmm5,0x7eed + +// CHECK: movsd %xmm5, 3133065982 + movsd %xmm5,0xbabecafe + +// CHECK: movsd %xmm5, 305419896 + movsd %xmm5,0x12345678 + +// CHECK: movsd %xmm5, %xmm5 + movsd %xmm5,%xmm5 + +// CHECK: movupd 3735928559(%ebx,%ecx,8), %xmm5 + movupd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movupd 69, %xmm5 + movupd 0x45,%xmm5 + +// CHECK: movupd 32493, %xmm5 + movupd 0x7eed,%xmm5 + +// CHECK: movupd 3133065982, %xmm5 + movupd 0xbabecafe,%xmm5 + +// CHECK: movupd 305419896, %xmm5 + movupd 0x12345678,%xmm5 + +// CHECK: movupd %xmm5, %xmm5 + movupd %xmm5,%xmm5 + +// CHECK: movupd %xmm5, 3735928559(%ebx,%ecx,8) + movupd %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movupd %xmm5, 69 + movupd %xmm5,0x45 + +// CHECK: movupd %xmm5, 32493 + movupd %xmm5,0x7eed + +// CHECK: movupd %xmm5, 3133065982 + movupd %xmm5,0xbabecafe + +// CHECK: movupd %xmm5, 305419896 + movupd %xmm5,0x12345678 + +// CHECK: movupd %xmm5, %xmm5 + movupd %xmm5,%xmm5 + +// CHECK: mulpd 3735928559(%ebx,%ecx,8), %xmm5 + mulpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: mulpd 69, %xmm5 + mulpd 0x45,%xmm5 + +// CHECK: mulpd 32493, %xmm5 + mulpd 0x7eed,%xmm5 + +// CHECK: mulpd 3133065982, %xmm5 + mulpd 0xbabecafe,%xmm5 + +// CHECK: mulpd 305419896, %xmm5 + mulpd 0x12345678,%xmm5 + +// CHECK: mulpd %xmm5, %xmm5 + mulpd %xmm5,%xmm5 + +// CHECK: mulsd 3735928559(%ebx,%ecx,8), %xmm5 + mulsd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: mulsd 69, %xmm5 + mulsd 0x45,%xmm5 + +// CHECK: mulsd 32493, %xmm5 + mulsd 0x7eed,%xmm5 + +// CHECK: mulsd 3133065982, %xmm5 + mulsd 0xbabecafe,%xmm5 + +// CHECK: mulsd 305419896, %xmm5 + mulsd 0x12345678,%xmm5 + +// CHECK: mulsd %xmm5, %xmm5 + mulsd %xmm5,%xmm5 + +// CHECK: orpd 3735928559(%ebx,%ecx,8), %xmm5 + orpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: orpd 69, %xmm5 + orpd 0x45,%xmm5 + +// CHECK: orpd 32493, %xmm5 + orpd 0x7eed,%xmm5 + +// CHECK: orpd 3133065982, %xmm5 + orpd 0xbabecafe,%xmm5 + +// CHECK: orpd 305419896, %xmm5 + orpd 0x12345678,%xmm5 + +// CHECK: orpd %xmm5, %xmm5 + orpd %xmm5,%xmm5 + +// CHECK: sqrtpd 3735928559(%ebx,%ecx,8), %xmm5 + sqrtpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: sqrtpd 69, %xmm5 + sqrtpd 0x45,%xmm5 + +// CHECK: sqrtpd 32493, %xmm5 + sqrtpd 0x7eed,%xmm5 + +// CHECK: sqrtpd 3133065982, %xmm5 + sqrtpd 0xbabecafe,%xmm5 + +// CHECK: sqrtpd 305419896, %xmm5 + sqrtpd 0x12345678,%xmm5 + +// CHECK: sqrtpd %xmm5, %xmm5 + sqrtpd %xmm5,%xmm5 + +// CHECK: sqrtsd 3735928559(%ebx,%ecx,8), %xmm5 + sqrtsd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: sqrtsd 69, %xmm5 + sqrtsd 0x45,%xmm5 + +// CHECK: sqrtsd 32493, %xmm5 + sqrtsd 0x7eed,%xmm5 + +// CHECK: sqrtsd 3133065982, %xmm5 + sqrtsd 0xbabecafe,%xmm5 + +// CHECK: sqrtsd 305419896, %xmm5 + sqrtsd 0x12345678,%xmm5 + +// CHECK: sqrtsd %xmm5, %xmm5 + sqrtsd %xmm5,%xmm5 + +// CHECK: subpd 3735928559(%ebx,%ecx,8), %xmm5 + subpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: subpd 69, %xmm5 + subpd 0x45,%xmm5 + +// CHECK: subpd 32493, %xmm5 + subpd 0x7eed,%xmm5 + +// CHECK: subpd 3133065982, %xmm5 + subpd 0xbabecafe,%xmm5 + +// CHECK: subpd 305419896, %xmm5 + subpd 0x12345678,%xmm5 + +// CHECK: subpd %xmm5, %xmm5 + subpd %xmm5,%xmm5 + +// CHECK: subsd 3735928559(%ebx,%ecx,8), %xmm5 + subsd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: subsd 69, %xmm5 + subsd 0x45,%xmm5 + +// CHECK: subsd 32493, %xmm5 + subsd 0x7eed,%xmm5 + +// CHECK: subsd 3133065982, %xmm5 + subsd 0xbabecafe,%xmm5 + +// CHECK: subsd 305419896, %xmm5 + subsd 0x12345678,%xmm5 + +// CHECK: subsd %xmm5, %xmm5 + subsd %xmm5,%xmm5 + +// CHECK: ucomisd 3735928559(%ebx,%ecx,8), %xmm5 + ucomisd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: ucomisd 69, %xmm5 + ucomisd 0x45,%xmm5 + +// CHECK: ucomisd 32493, %xmm5 + ucomisd 0x7eed,%xmm5 + +// CHECK: ucomisd 3133065982, %xmm5 + ucomisd 0xbabecafe,%xmm5 + +// CHECK: ucomisd 305419896, %xmm5 + ucomisd 0x12345678,%xmm5 + +// CHECK: ucomisd %xmm5, %xmm5 + ucomisd %xmm5,%xmm5 + +// CHECK: unpckhpd 3735928559(%ebx,%ecx,8), %xmm5 + unpckhpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: unpckhpd 69, %xmm5 + unpckhpd 0x45,%xmm5 + +// CHECK: unpckhpd 32493, %xmm5 + unpckhpd 0x7eed,%xmm5 + +// CHECK: unpckhpd 3133065982, %xmm5 + unpckhpd 0xbabecafe,%xmm5 + +// CHECK: unpckhpd 305419896, %xmm5 + unpckhpd 0x12345678,%xmm5 + +// CHECK: unpckhpd %xmm5, %xmm5 + unpckhpd %xmm5,%xmm5 + +// CHECK: unpcklpd 3735928559(%ebx,%ecx,8), %xmm5 + unpcklpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: unpcklpd 69, %xmm5 + unpcklpd 0x45,%xmm5 + +// CHECK: unpcklpd 32493, %xmm5 + unpcklpd 0x7eed,%xmm5 + +// CHECK: unpcklpd 3133065982, %xmm5 + unpcklpd 0xbabecafe,%xmm5 + +// CHECK: unpcklpd 305419896, %xmm5 + unpcklpd 0x12345678,%xmm5 + +// CHECK: unpcklpd %xmm5, %xmm5 + unpcklpd %xmm5,%xmm5 + +// CHECK: xorpd 3735928559(%ebx,%ecx,8), %xmm5 + xorpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: xorpd 69, %xmm5 + xorpd 0x45,%xmm5 + +// CHECK: xorpd 32493, %xmm5 + xorpd 0x7eed,%xmm5 + +// CHECK: xorpd 3133065982, %xmm5 + xorpd 0xbabecafe,%xmm5 + +// CHECK: xorpd 305419896, %xmm5 + xorpd 0x12345678,%xmm5 + +// CHECK: xorpd %xmm5, %xmm5 + xorpd %xmm5,%xmm5 + +// CHECK: cvtdq2pd 3735928559(%ebx,%ecx,8), %xmm5 + cvtdq2pd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: cvtdq2pd 69, %xmm5 + cvtdq2pd 0x45,%xmm5 + +// CHECK: cvtdq2pd 32493, %xmm5 + cvtdq2pd 0x7eed,%xmm5 + +// CHECK: cvtdq2pd 3133065982, %xmm5 + cvtdq2pd 0xbabecafe,%xmm5 + +// CHECK: cvtdq2pd 305419896, %xmm5 + cvtdq2pd 0x12345678,%xmm5 + +// CHECK: cvtdq2pd %xmm5, %xmm5 + cvtdq2pd %xmm5,%xmm5 + +// CHECK: cvtpd2dq 3735928559(%ebx,%ecx,8), %xmm5 + cvtpd2dq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: cvtpd2dq 69, %xmm5 + cvtpd2dq 0x45,%xmm5 + +// CHECK: cvtpd2dq 32493, %xmm5 + cvtpd2dq 0x7eed,%xmm5 + +// CHECK: cvtpd2dq 3133065982, %xmm5 + cvtpd2dq 0xbabecafe,%xmm5 + +// CHECK: cvtpd2dq 305419896, %xmm5 + cvtpd2dq 0x12345678,%xmm5 + +// CHECK: cvtpd2dq %xmm5, %xmm5 + cvtpd2dq %xmm5,%xmm5 + +// CHECK: cvtdq2ps 3735928559(%ebx,%ecx,8), %xmm5 + cvtdq2ps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: cvtdq2ps 69, %xmm5 + cvtdq2ps 0x45,%xmm5 + +// CHECK: cvtdq2ps 32493, %xmm5 + cvtdq2ps 0x7eed,%xmm5 + +// CHECK: cvtdq2ps 3133065982, %xmm5 + cvtdq2ps 0xbabecafe,%xmm5 + +// CHECK: cvtdq2ps 305419896, %xmm5 + cvtdq2ps 0x12345678,%xmm5 + +// CHECK: cvtdq2ps %xmm5, %xmm5 + cvtdq2ps %xmm5,%xmm5 + +// CHECK: cvtpd2pi 3735928559(%ebx,%ecx,8), %mm3 + cvtpd2pi 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: cvtpd2pi 69, %mm3 + cvtpd2pi 0x45,%mm3 + +// CHECK: cvtpd2pi 32493, %mm3 + cvtpd2pi 0x7eed,%mm3 + +// CHECK: cvtpd2pi 3133065982, %mm3 + cvtpd2pi 0xbabecafe,%mm3 + +// CHECK: cvtpd2pi 305419896, %mm3 + cvtpd2pi 0x12345678,%mm3 + +// CHECK: cvtpd2pi %xmm5, %mm3 + cvtpd2pi %xmm5,%mm3 + +// CHECK: cvtpd2ps 3735928559(%ebx,%ecx,8), %xmm5 + cvtpd2ps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: cvtpd2ps 69, %xmm5 + cvtpd2ps 0x45,%xmm5 + +// CHECK: cvtpd2ps 32493, %xmm5 + cvtpd2ps 0x7eed,%xmm5 + +// CHECK: cvtpd2ps 3133065982, %xmm5 + cvtpd2ps 0xbabecafe,%xmm5 + +// CHECK: cvtpd2ps 305419896, %xmm5 + cvtpd2ps 0x12345678,%xmm5 + +// CHECK: cvtpd2ps %xmm5, %xmm5 + cvtpd2ps %xmm5,%xmm5 + +// CHECK: cvtps2pd 3735928559(%ebx,%ecx,8), %xmm5 + cvtps2pd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: cvtps2pd 69, %xmm5 + cvtps2pd 0x45,%xmm5 + +// CHECK: cvtps2pd 32493, %xmm5 + cvtps2pd 0x7eed,%xmm5 + +// CHECK: cvtps2pd 3133065982, %xmm5 + cvtps2pd 0xbabecafe,%xmm5 + +// CHECK: cvtps2pd 305419896, %xmm5 + cvtps2pd 0x12345678,%xmm5 + +// CHECK: cvtps2pd %xmm5, %xmm5 + cvtps2pd %xmm5,%xmm5 + +// CHECK: cvtps2dq 3735928559(%ebx,%ecx,8), %xmm5 + cvtps2dq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: cvtps2dq 69, %xmm5 + cvtps2dq 0x45,%xmm5 + +// CHECK: cvtps2dq 32493, %xmm5 + cvtps2dq 0x7eed,%xmm5 + +// CHECK: cvtps2dq 3133065982, %xmm5 + cvtps2dq 0xbabecafe,%xmm5 + +// CHECK: cvtps2dq 305419896, %xmm5 + cvtps2dq 0x12345678,%xmm5 + +// CHECK: cvtps2dq %xmm5, %xmm5 + cvtps2dq %xmm5,%xmm5 + +// CHECK: cvtsd2ss 3735928559(%ebx,%ecx,8), %xmm5 + cvtsd2ss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: cvtsd2ss 69, %xmm5 + cvtsd2ss 0x45,%xmm5 + +// CHECK: cvtsd2ss 32493, %xmm5 + cvtsd2ss 0x7eed,%xmm5 + +// CHECK: cvtsd2ss 3133065982, %xmm5 + cvtsd2ss 0xbabecafe,%xmm5 + +// CHECK: cvtsd2ss 305419896, %xmm5 + cvtsd2ss 0x12345678,%xmm5 + +// CHECK: cvtsd2ss %xmm5, %xmm5 + cvtsd2ss %xmm5,%xmm5 + +// CHECK: cvtss2sd 3735928559(%ebx,%ecx,8), %xmm5 + cvtss2sd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: cvtss2sd 69, %xmm5 + cvtss2sd 0x45,%xmm5 + +// CHECK: cvtss2sd 32493, %xmm5 + cvtss2sd 0x7eed,%xmm5 + +// CHECK: cvtss2sd 3133065982, %xmm5 + cvtss2sd 0xbabecafe,%xmm5 + +// CHECK: cvtss2sd 305419896, %xmm5 + cvtss2sd 0x12345678,%xmm5 + +// CHECK: cvtss2sd %xmm5, %xmm5 + cvtss2sd %xmm5,%xmm5 + +// CHECK: cvttpd2pi 3735928559(%ebx,%ecx,8), %mm3 + cvttpd2pi 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: cvttpd2pi 69, %mm3 + cvttpd2pi 0x45,%mm3 + +// CHECK: cvttpd2pi 32493, %mm3 + cvttpd2pi 0x7eed,%mm3 + +// CHECK: cvttpd2pi 3133065982, %mm3 + cvttpd2pi 0xbabecafe,%mm3 + +// CHECK: cvttpd2pi 305419896, %mm3 + cvttpd2pi 0x12345678,%mm3 + +// CHECK: cvttpd2pi %xmm5, %mm3 + cvttpd2pi %xmm5,%mm3 + +// CHECK: cvttsd2si 3735928559(%ebx,%ecx,8), %ecx + cvttsd2si 0xdeadbeef(%ebx,%ecx,8),%ecx + +// CHECK: cvttsd2si 69, %ecx + cvttsd2si 0x45,%ecx + +// CHECK: cvttsd2si 32493, %ecx + cvttsd2si 0x7eed,%ecx + +// CHECK: cvttsd2si 3133065982, %ecx + cvttsd2si 0xbabecafe,%ecx + +// CHECK: cvttsd2si 305419896, %ecx + cvttsd2si 0x12345678,%ecx + +// CHECK: cvttsd2si %xmm5, %ecx + cvttsd2si %xmm5,%ecx + +// CHECK: cvttps2dq 3735928559(%ebx,%ecx,8), %xmm5 + cvttps2dq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: cvttps2dq 69, %xmm5 + cvttps2dq 0x45,%xmm5 + +// CHECK: cvttps2dq 32493, %xmm5 + cvttps2dq 0x7eed,%xmm5 + +// CHECK: cvttps2dq 3133065982, %xmm5 + cvttps2dq 0xbabecafe,%xmm5 + +// CHECK: cvttps2dq 305419896, %xmm5 + cvttps2dq 0x12345678,%xmm5 + +// CHECK: cvttps2dq %xmm5, %xmm5 + cvttps2dq %xmm5,%xmm5 + +// CHECK: maskmovdqu %xmm5, %xmm5 + maskmovdqu %xmm5,%xmm5 + +// CHECK: movdqa 3735928559(%ebx,%ecx,8), %xmm5 + movdqa 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movdqa 69, %xmm5 + movdqa 0x45,%xmm5 + +// CHECK: movdqa 32493, %xmm5 + movdqa 0x7eed,%xmm5 + +// CHECK: movdqa 3133065982, %xmm5 + movdqa 0xbabecafe,%xmm5 + +// CHECK: movdqa 305419896, %xmm5 + movdqa 0x12345678,%xmm5 + +// CHECK: movdqa %xmm5, %xmm5 + movdqa %xmm5,%xmm5 + +// CHECK: movdqa %xmm5, 3735928559(%ebx,%ecx,8) + movdqa %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movdqa %xmm5, 69 + movdqa %xmm5,0x45 + +// CHECK: movdqa %xmm5, 32493 + movdqa %xmm5,0x7eed + +// CHECK: movdqa %xmm5, 3133065982 + movdqa %xmm5,0xbabecafe + +// CHECK: movdqa %xmm5, 305419896 + movdqa %xmm5,0x12345678 + +// CHECK: movdqa %xmm5, %xmm5 + movdqa %xmm5,%xmm5 + +// CHECK: movdqu 3735928559(%ebx,%ecx,8), %xmm5 + movdqu 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movdqu 69, %xmm5 + movdqu 0x45,%xmm5 + +// CHECK: movdqu 32493, %xmm5 + movdqu 0x7eed,%xmm5 + +// CHECK: movdqu 3133065982, %xmm5 + movdqu 0xbabecafe,%xmm5 + +// CHECK: movdqu 305419896, %xmm5 + movdqu 0x12345678,%xmm5 + +// CHECK: movdqu %xmm5, 3735928559(%ebx,%ecx,8) + movdqu %xmm5,0xdeadbeef(%ebx,%ecx,8) + +// CHECK: movdqu %xmm5, 69 + movdqu %xmm5,0x45 + +// CHECK: movdqu %xmm5, 32493 + movdqu %xmm5,0x7eed + +// CHECK: movdqu %xmm5, 3133065982 + movdqu %xmm5,0xbabecafe + +// CHECK: movdqu %xmm5, 305419896 + movdqu %xmm5,0x12345678 + +// CHECK: movdq2q %xmm5, %mm3 + movdq2q %xmm5,%mm3 + +// CHECK: movq2dq %mm3, %xmm5 + movq2dq %mm3,%xmm5 + +// CHECK: pmuludq 3735928559(%ebx,%ecx,8), %mm3 + pmuludq 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pmuludq 69, %mm3 + pmuludq 0x45,%mm3 + +// CHECK: pmuludq 32493, %mm3 + pmuludq 0x7eed,%mm3 + +// CHECK: pmuludq 3133065982, %mm3 + pmuludq 0xbabecafe,%mm3 + +// CHECK: pmuludq 305419896, %mm3 + pmuludq 0x12345678,%mm3 + +// CHECK: pmuludq %mm3, %mm3 + pmuludq %mm3,%mm3 + +// CHECK: pmuludq 3735928559(%ebx,%ecx,8), %xmm5 + pmuludq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmuludq 69, %xmm5 + pmuludq 0x45,%xmm5 + +// CHECK: pmuludq 32493, %xmm5 + pmuludq 0x7eed,%xmm5 + +// CHECK: pmuludq 3133065982, %xmm5 + pmuludq 0xbabecafe,%xmm5 + +// CHECK: pmuludq 305419896, %xmm5 + pmuludq 0x12345678,%xmm5 + +// CHECK: pmuludq %xmm5, %xmm5 + pmuludq %xmm5,%xmm5 + +// CHECK: pslldq $127, %xmm5 + pslldq $0x7f,%xmm5 + +// CHECK: psrldq $127, %xmm5 + psrldq $0x7f,%xmm5 + +// CHECK: punpckhqdq 3735928559(%ebx,%ecx,8), %xmm5 + punpckhqdq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: punpckhqdq 69, %xmm5 + punpckhqdq 0x45,%xmm5 + +// CHECK: punpckhqdq 32493, %xmm5 + punpckhqdq 0x7eed,%xmm5 + +// CHECK: punpckhqdq 3133065982, %xmm5 + punpckhqdq 0xbabecafe,%xmm5 + +// CHECK: punpckhqdq 305419896, %xmm5 + punpckhqdq 0x12345678,%xmm5 + +// CHECK: punpckhqdq %xmm5, %xmm5 + punpckhqdq %xmm5,%xmm5 + +// CHECK: punpcklqdq 3735928559(%ebx,%ecx,8), %xmm5 + punpcklqdq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: punpcklqdq 69, %xmm5 + punpcklqdq 0x45,%xmm5 + +// CHECK: punpcklqdq 32493, %xmm5 + punpcklqdq 0x7eed,%xmm5 + +// CHECK: punpcklqdq 3133065982, %xmm5 + punpcklqdq 0xbabecafe,%xmm5 + +// CHECK: punpcklqdq 305419896, %xmm5 + punpcklqdq 0x12345678,%xmm5 + +// CHECK: punpcklqdq %xmm5, %xmm5 + punpcklqdq %xmm5,%xmm5 + +// CHECK: addsubpd 3735928559(%ebx,%ecx,8), %xmm5 + addsubpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: addsubpd 69, %xmm5 + addsubpd 0x45,%xmm5 + +// CHECK: addsubpd 32493, %xmm5 + addsubpd 0x7eed,%xmm5 + +// CHECK: addsubpd 3133065982, %xmm5 + addsubpd 0xbabecafe,%xmm5 + +// CHECK: addsubpd 305419896, %xmm5 + addsubpd 0x12345678,%xmm5 + +// CHECK: addsubpd %xmm5, %xmm5 + addsubpd %xmm5,%xmm5 + +// CHECK: addsubps 3735928559(%ebx,%ecx,8), %xmm5 + addsubps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: addsubps 69, %xmm5 + addsubps 0x45,%xmm5 + +// CHECK: addsubps 32493, %xmm5 + addsubps 0x7eed,%xmm5 + +// CHECK: addsubps 3133065982, %xmm5 + addsubps 0xbabecafe,%xmm5 + +// CHECK: addsubps 305419896, %xmm5 + addsubps 0x12345678,%xmm5 + +// CHECK: addsubps %xmm5, %xmm5 + addsubps %xmm5,%xmm5 + +// CHECK: fisttpl 3735928559(%ebx,%ecx,8) + fisttpl 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: fisttpl 3133065982 + fisttpl 0xbabecafe + +// CHECK: fisttpl 305419896 + fisttpl 0x12345678 + +// CHECK: haddpd 3735928559(%ebx,%ecx,8), %xmm5 + haddpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: haddpd 69, %xmm5 + haddpd 0x45,%xmm5 + +// CHECK: haddpd 32493, %xmm5 + haddpd 0x7eed,%xmm5 + +// CHECK: haddpd 3133065982, %xmm5 + haddpd 0xbabecafe,%xmm5 + +// CHECK: haddpd 305419896, %xmm5 + haddpd 0x12345678,%xmm5 + +// CHECK: haddpd %xmm5, %xmm5 + haddpd %xmm5,%xmm5 + +// CHECK: haddps 3735928559(%ebx,%ecx,8), %xmm5 + haddps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: haddps 69, %xmm5 + haddps 0x45,%xmm5 + +// CHECK: haddps 32493, %xmm5 + haddps 0x7eed,%xmm5 + +// CHECK: haddps 3133065982, %xmm5 + haddps 0xbabecafe,%xmm5 + +// CHECK: haddps 305419896, %xmm5 + haddps 0x12345678,%xmm5 + +// CHECK: haddps %xmm5, %xmm5 + haddps %xmm5,%xmm5 + +// CHECK: hsubpd 3735928559(%ebx,%ecx,8), %xmm5 + hsubpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: hsubpd 69, %xmm5 + hsubpd 0x45,%xmm5 + +// CHECK: hsubpd 32493, %xmm5 + hsubpd 0x7eed,%xmm5 + +// CHECK: hsubpd 3133065982, %xmm5 + hsubpd 0xbabecafe,%xmm5 + +// CHECK: hsubpd 305419896, %xmm5 + hsubpd 0x12345678,%xmm5 + +// CHECK: hsubpd %xmm5, %xmm5 + hsubpd %xmm5,%xmm5 + +// CHECK: hsubps 3735928559(%ebx,%ecx,8), %xmm5 + hsubps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: hsubps 69, %xmm5 + hsubps 0x45,%xmm5 + +// CHECK: hsubps 32493, %xmm5 + hsubps 0x7eed,%xmm5 + +// CHECK: hsubps 3133065982, %xmm5 + hsubps 0xbabecafe,%xmm5 + +// CHECK: hsubps 305419896, %xmm5 + hsubps 0x12345678,%xmm5 + +// CHECK: hsubps %xmm5, %xmm5 + hsubps %xmm5,%xmm5 + +// CHECK: lddqu 3735928559(%ebx,%ecx,8), %xmm5 + lddqu 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: lddqu 69, %xmm5 + lddqu 0x45,%xmm5 + +// CHECK: lddqu 32493, %xmm5 + lddqu 0x7eed,%xmm5 + +// CHECK: lddqu 3133065982, %xmm5 + lddqu 0xbabecafe,%xmm5 + +// CHECK: lddqu 305419896, %xmm5 + lddqu 0x12345678,%xmm5 + +// CHECK: monitor + monitor + +// CHECK: movddup 3735928559(%ebx,%ecx,8), %xmm5 + movddup 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movddup 69, %xmm5 + movddup 0x45,%xmm5 + +// CHECK: movddup 32493, %xmm5 + movddup 0x7eed,%xmm5 + +// CHECK: movddup 3133065982, %xmm5 + movddup 0xbabecafe,%xmm5 + +// CHECK: movddup 305419896, %xmm5 + movddup 0x12345678,%xmm5 + +// CHECK: movddup %xmm5, %xmm5 + movddup %xmm5,%xmm5 + +// CHECK: movshdup 3735928559(%ebx,%ecx,8), %xmm5 + movshdup 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movshdup 69, %xmm5 + movshdup 0x45,%xmm5 + +// CHECK: movshdup 32493, %xmm5 + movshdup 0x7eed,%xmm5 + +// CHECK: movshdup 3133065982, %xmm5 + movshdup 0xbabecafe,%xmm5 + +// CHECK: movshdup 305419896, %xmm5 + movshdup 0x12345678,%xmm5 + +// CHECK: movshdup %xmm5, %xmm5 + movshdup %xmm5,%xmm5 + +// CHECK: movsldup 3735928559(%ebx,%ecx,8), %xmm5 + movsldup 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movsldup 69, %xmm5 + movsldup 0x45,%xmm5 + +// CHECK: movsldup 32493, %xmm5 + movsldup 0x7eed,%xmm5 + +// CHECK: movsldup 3133065982, %xmm5 + movsldup 0xbabecafe,%xmm5 + +// CHECK: movsldup 305419896, %xmm5 + movsldup 0x12345678,%xmm5 + +// CHECK: movsldup %xmm5, %xmm5 + movsldup %xmm5,%xmm5 + +// CHECK: mwait + mwait + +// CHECK: vmcall + vmcall + +// CHECK: vmclear 3735928559(%ebx,%ecx,8) + vmclear 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: vmclear 32493 + vmclear 0x7eed + +// CHECK: vmclear 3133065982 + vmclear 0xbabecafe + +// CHECK: vmclear 305419896 + vmclear 0x12345678 + +// CHECK: vmlaunch + vmlaunch + +// CHECK: vmresume + vmresume + +// CHECK: vmptrld 3735928559(%ebx,%ecx,8) + vmptrld 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: vmptrld 32493 + vmptrld 0x7eed + +// CHECK: vmptrld 3133065982 + vmptrld 0xbabecafe + +// CHECK: vmptrld 305419896 + vmptrld 0x12345678 + +// CHECK: vmptrst 3735928559(%ebx,%ecx,8) + vmptrst 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: vmptrst 32493 + vmptrst 0x7eed + +// CHECK: vmptrst 3133065982 + vmptrst 0xbabecafe + +// CHECK: vmptrst 305419896 + vmptrst 0x12345678 + +// CHECK: vmxoff + vmxoff + +// CHECK: vmxon 3735928559(%ebx,%ecx,8) + vmxon 0xdeadbeef(%ebx,%ecx,8) + +// CHECK: vmxon 32493 + vmxon 0x7eed + +// CHECK: vmxon 3133065982 + vmxon 0xbabecafe + +// CHECK: vmxon 305419896 + vmxon 0x12345678 + +// CHECK: phaddw 3735928559(%ebx,%ecx,8), %mm3 + phaddw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: phaddw 69, %mm3 + phaddw 0x45,%mm3 + +// CHECK: phaddw 32493, %mm3 + phaddw 0x7eed,%mm3 + +// CHECK: phaddw 3133065982, %mm3 + phaddw 0xbabecafe,%mm3 + +// CHECK: phaddw 305419896, %mm3 + phaddw 0x12345678,%mm3 + +// CHECK: phaddw %mm3, %mm3 + phaddw %mm3,%mm3 + +// CHECK: phaddw 3735928559(%ebx,%ecx,8), %xmm5 + phaddw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: phaddw 69, %xmm5 + phaddw 0x45,%xmm5 + +// CHECK: phaddw 32493, %xmm5 + phaddw 0x7eed,%xmm5 + +// CHECK: phaddw 3133065982, %xmm5 + phaddw 0xbabecafe,%xmm5 + +// CHECK: phaddw 305419896, %xmm5 + phaddw 0x12345678,%xmm5 + +// CHECK: phaddw %xmm5, %xmm5 + phaddw %xmm5,%xmm5 + +// CHECK: phaddd 3735928559(%ebx,%ecx,8), %mm3 + phaddd 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: phaddd 69, %mm3 + phaddd 0x45,%mm3 + +// CHECK: phaddd 32493, %mm3 + phaddd 0x7eed,%mm3 + +// CHECK: phaddd 3133065982, %mm3 + phaddd 0xbabecafe,%mm3 + +// CHECK: phaddd 305419896, %mm3 + phaddd 0x12345678,%mm3 + +// CHECK: phaddd %mm3, %mm3 + phaddd %mm3,%mm3 + +// CHECK: phaddd 3735928559(%ebx,%ecx,8), %xmm5 + phaddd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: phaddd 69, %xmm5 + phaddd 0x45,%xmm5 + +// CHECK: phaddd 32493, %xmm5 + phaddd 0x7eed,%xmm5 + +// CHECK: phaddd 3133065982, %xmm5 + phaddd 0xbabecafe,%xmm5 + +// CHECK: phaddd 305419896, %xmm5 + phaddd 0x12345678,%xmm5 + +// CHECK: phaddd %xmm5, %xmm5 + phaddd %xmm5,%xmm5 + +// CHECK: phaddsw 3735928559(%ebx,%ecx,8), %mm3 + phaddsw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: phaddsw 69, %mm3 + phaddsw 0x45,%mm3 + +// CHECK: phaddsw 32493, %mm3 + phaddsw 0x7eed,%mm3 + +// CHECK: phaddsw 3133065982, %mm3 + phaddsw 0xbabecafe,%mm3 + +// CHECK: phaddsw 305419896, %mm3 + phaddsw 0x12345678,%mm3 + +// CHECK: phaddsw %mm3, %mm3 + phaddsw %mm3,%mm3 + +// CHECK: phaddsw 3735928559(%ebx,%ecx,8), %xmm5 + phaddsw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: phaddsw 69, %xmm5 + phaddsw 0x45,%xmm5 + +// CHECK: phaddsw 32493, %xmm5 + phaddsw 0x7eed,%xmm5 + +// CHECK: phaddsw 3133065982, %xmm5 + phaddsw 0xbabecafe,%xmm5 + +// CHECK: phaddsw 305419896, %xmm5 + phaddsw 0x12345678,%xmm5 + +// CHECK: phaddsw %xmm5, %xmm5 + phaddsw %xmm5,%xmm5 + +// CHECK: phsubw 3735928559(%ebx,%ecx,8), %mm3 + phsubw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: phsubw 69, %mm3 + phsubw 0x45,%mm3 + +// CHECK: phsubw 32493, %mm3 + phsubw 0x7eed,%mm3 + +// CHECK: phsubw 3133065982, %mm3 + phsubw 0xbabecafe,%mm3 + +// CHECK: phsubw 305419896, %mm3 + phsubw 0x12345678,%mm3 + +// CHECK: phsubw %mm3, %mm3 + phsubw %mm3,%mm3 + +// CHECK: phsubw 3735928559(%ebx,%ecx,8), %xmm5 + phsubw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: phsubw 69, %xmm5 + phsubw 0x45,%xmm5 + +// CHECK: phsubw 32493, %xmm5 + phsubw 0x7eed,%xmm5 + +// CHECK: phsubw 3133065982, %xmm5 + phsubw 0xbabecafe,%xmm5 + +// CHECK: phsubw 305419896, %xmm5 + phsubw 0x12345678,%xmm5 + +// CHECK: phsubw %xmm5, %xmm5 + phsubw %xmm5,%xmm5 + +// CHECK: phsubd 3735928559(%ebx,%ecx,8), %mm3 + phsubd 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: phsubd 69, %mm3 + phsubd 0x45,%mm3 + +// CHECK: phsubd 32493, %mm3 + phsubd 0x7eed,%mm3 + +// CHECK: phsubd 3133065982, %mm3 + phsubd 0xbabecafe,%mm3 + +// CHECK: phsubd 305419896, %mm3 + phsubd 0x12345678,%mm3 + +// CHECK: phsubd %mm3, %mm3 + phsubd %mm3,%mm3 + +// CHECK: phsubd 3735928559(%ebx,%ecx,8), %xmm5 + phsubd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: phsubd 69, %xmm5 + phsubd 0x45,%xmm5 + +// CHECK: phsubd 32493, %xmm5 + phsubd 0x7eed,%xmm5 + +// CHECK: phsubd 3133065982, %xmm5 + phsubd 0xbabecafe,%xmm5 + +// CHECK: phsubd 305419896, %xmm5 + phsubd 0x12345678,%xmm5 + +// CHECK: phsubd %xmm5, %xmm5 + phsubd %xmm5,%xmm5 + +// CHECK: phsubsw 3735928559(%ebx,%ecx,8), %mm3 + phsubsw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: phsubsw 69, %mm3 + phsubsw 0x45,%mm3 + +// CHECK: phsubsw 32493, %mm3 + phsubsw 0x7eed,%mm3 + +// CHECK: phsubsw 3133065982, %mm3 + phsubsw 0xbabecafe,%mm3 + +// CHECK: phsubsw 305419896, %mm3 + phsubsw 0x12345678,%mm3 + +// CHECK: phsubsw %mm3, %mm3 + phsubsw %mm3,%mm3 + +// CHECK: phsubsw 3735928559(%ebx,%ecx,8), %xmm5 + phsubsw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: phsubsw 69, %xmm5 + phsubsw 0x45,%xmm5 + +// CHECK: phsubsw 32493, %xmm5 + phsubsw 0x7eed,%xmm5 + +// CHECK: phsubsw 3133065982, %xmm5 + phsubsw 0xbabecafe,%xmm5 + +// CHECK: phsubsw 305419896, %xmm5 + phsubsw 0x12345678,%xmm5 + +// CHECK: phsubsw %xmm5, %xmm5 + phsubsw %xmm5,%xmm5 + +// CHECK: pmaddubsw 3735928559(%ebx,%ecx,8), %mm3 + pmaddubsw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pmaddubsw 69, %mm3 + pmaddubsw 0x45,%mm3 + +// CHECK: pmaddubsw 32493, %mm3 + pmaddubsw 0x7eed,%mm3 + +// CHECK: pmaddubsw 3133065982, %mm3 + pmaddubsw 0xbabecafe,%mm3 + +// CHECK: pmaddubsw 305419896, %mm3 + pmaddubsw 0x12345678,%mm3 + +// CHECK: pmaddubsw %mm3, %mm3 + pmaddubsw %mm3,%mm3 + +// CHECK: pmaddubsw 3735928559(%ebx,%ecx,8), %xmm5 + pmaddubsw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmaddubsw 69, %xmm5 + pmaddubsw 0x45,%xmm5 + +// CHECK: pmaddubsw 32493, %xmm5 + pmaddubsw 0x7eed,%xmm5 + +// CHECK: pmaddubsw 3133065982, %xmm5 + pmaddubsw 0xbabecafe,%xmm5 + +// CHECK: pmaddubsw 305419896, %xmm5 + pmaddubsw 0x12345678,%xmm5 + +// CHECK: pmaddubsw %xmm5, %xmm5 + pmaddubsw %xmm5,%xmm5 + +// CHECK: pmulhrsw 3735928559(%ebx,%ecx,8), %mm3 + pmulhrsw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pmulhrsw 69, %mm3 + pmulhrsw 0x45,%mm3 + +// CHECK: pmulhrsw 32493, %mm3 + pmulhrsw 0x7eed,%mm3 + +// CHECK: pmulhrsw 3133065982, %mm3 + pmulhrsw 0xbabecafe,%mm3 + +// CHECK: pmulhrsw 305419896, %mm3 + pmulhrsw 0x12345678,%mm3 + +// CHECK: pmulhrsw %mm3, %mm3 + pmulhrsw %mm3,%mm3 + +// CHECK: pmulhrsw 3735928559(%ebx,%ecx,8), %xmm5 + pmulhrsw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmulhrsw 69, %xmm5 + pmulhrsw 0x45,%xmm5 + +// CHECK: pmulhrsw 32493, %xmm5 + pmulhrsw 0x7eed,%xmm5 + +// CHECK: pmulhrsw 3133065982, %xmm5 + pmulhrsw 0xbabecafe,%xmm5 + +// CHECK: pmulhrsw 305419896, %xmm5 + pmulhrsw 0x12345678,%xmm5 + +// CHECK: pmulhrsw %xmm5, %xmm5 + pmulhrsw %xmm5,%xmm5 + +// CHECK: pshufb 3735928559(%ebx,%ecx,8), %mm3 + pshufb 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pshufb 69, %mm3 + pshufb 0x45,%mm3 + +// CHECK: pshufb 32493, %mm3 + pshufb 0x7eed,%mm3 + +// CHECK: pshufb 3133065982, %mm3 + pshufb 0xbabecafe,%mm3 + +// CHECK: pshufb 305419896, %mm3 + pshufb 0x12345678,%mm3 + +// CHECK: pshufb %mm3, %mm3 + pshufb %mm3,%mm3 + +// CHECK: pshufb 3735928559(%ebx,%ecx,8), %xmm5 + pshufb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pshufb 69, %xmm5 + pshufb 0x45,%xmm5 + +// CHECK: pshufb 32493, %xmm5 + pshufb 0x7eed,%xmm5 + +// CHECK: pshufb 3133065982, %xmm5 + pshufb 0xbabecafe,%xmm5 + +// CHECK: pshufb 305419896, %xmm5 + pshufb 0x12345678,%xmm5 + +// CHECK: pshufb %xmm5, %xmm5 + pshufb %xmm5,%xmm5 + +// CHECK: psignb 3735928559(%ebx,%ecx,8), %mm3 + psignb 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psignb 69, %mm3 + psignb 0x45,%mm3 + +// CHECK: psignb 32493, %mm3 + psignb 0x7eed,%mm3 + +// CHECK: psignb 3133065982, %mm3 + psignb 0xbabecafe,%mm3 + +// CHECK: psignb 305419896, %mm3 + psignb 0x12345678,%mm3 + +// CHECK: psignb %mm3, %mm3 + psignb %mm3,%mm3 + +// CHECK: psignb 3735928559(%ebx,%ecx,8), %xmm5 + psignb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psignb 69, %xmm5 + psignb 0x45,%xmm5 + +// CHECK: psignb 32493, %xmm5 + psignb 0x7eed,%xmm5 + +// CHECK: psignb 3133065982, %xmm5 + psignb 0xbabecafe,%xmm5 + +// CHECK: psignb 305419896, %xmm5 + psignb 0x12345678,%xmm5 + +// CHECK: psignb %xmm5, %xmm5 + psignb %xmm5,%xmm5 + +// CHECK: psignw 3735928559(%ebx,%ecx,8), %mm3 + psignw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psignw 69, %mm3 + psignw 0x45,%mm3 + +// CHECK: psignw 32493, %mm3 + psignw 0x7eed,%mm3 + +// CHECK: psignw 3133065982, %mm3 + psignw 0xbabecafe,%mm3 + +// CHECK: psignw 305419896, %mm3 + psignw 0x12345678,%mm3 + +// CHECK: psignw %mm3, %mm3 + psignw %mm3,%mm3 + +// CHECK: psignw 3735928559(%ebx,%ecx,8), %xmm5 + psignw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psignw 69, %xmm5 + psignw 0x45,%xmm5 + +// CHECK: psignw 32493, %xmm5 + psignw 0x7eed,%xmm5 + +// CHECK: psignw 3133065982, %xmm5 + psignw 0xbabecafe,%xmm5 + +// CHECK: psignw 305419896, %xmm5 + psignw 0x12345678,%xmm5 + +// CHECK: psignw %xmm5, %xmm5 + psignw %xmm5,%xmm5 + +// CHECK: psignd 3735928559(%ebx,%ecx,8), %mm3 + psignd 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: psignd 69, %mm3 + psignd 0x45,%mm3 + +// CHECK: psignd 32493, %mm3 + psignd 0x7eed,%mm3 + +// CHECK: psignd 3133065982, %mm3 + psignd 0xbabecafe,%mm3 + +// CHECK: psignd 305419896, %mm3 + psignd 0x12345678,%mm3 + +// CHECK: psignd %mm3, %mm3 + psignd %mm3,%mm3 + +// CHECK: psignd 3735928559(%ebx,%ecx,8), %xmm5 + psignd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: psignd 69, %xmm5 + psignd 0x45,%xmm5 + +// CHECK: psignd 32493, %xmm5 + psignd 0x7eed,%xmm5 + +// CHECK: psignd 3133065982, %xmm5 + psignd 0xbabecafe,%xmm5 + +// CHECK: psignd 305419896, %xmm5 + psignd 0x12345678,%xmm5 + +// CHECK: psignd %xmm5, %xmm5 + psignd %xmm5,%xmm5 + +// CHECK: pabsb 3735928559(%ebx,%ecx,8), %mm3 + pabsb 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pabsb 69, %mm3 + pabsb 0x45,%mm3 + +// CHECK: pabsb 32493, %mm3 + pabsb 0x7eed,%mm3 + +// CHECK: pabsb 3133065982, %mm3 + pabsb 0xbabecafe,%mm3 + +// CHECK: pabsb 305419896, %mm3 + pabsb 0x12345678,%mm3 + +// CHECK: pabsb %mm3, %mm3 + pabsb %mm3,%mm3 + +// CHECK: pabsb 3735928559(%ebx,%ecx,8), %xmm5 + pabsb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pabsb 69, %xmm5 + pabsb 0x45,%xmm5 + +// CHECK: pabsb 32493, %xmm5 + pabsb 0x7eed,%xmm5 + +// CHECK: pabsb 3133065982, %xmm5 + pabsb 0xbabecafe,%xmm5 + +// CHECK: pabsb 305419896, %xmm5 + pabsb 0x12345678,%xmm5 + +// CHECK: pabsb %xmm5, %xmm5 + pabsb %xmm5,%xmm5 + +// CHECK: pabsw 3735928559(%ebx,%ecx,8), %mm3 + pabsw 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pabsw 69, %mm3 + pabsw 0x45,%mm3 + +// CHECK: pabsw 32493, %mm3 + pabsw 0x7eed,%mm3 + +// CHECK: pabsw 3133065982, %mm3 + pabsw 0xbabecafe,%mm3 + +// CHECK: pabsw 305419896, %mm3 + pabsw 0x12345678,%mm3 + +// CHECK: pabsw %mm3, %mm3 + pabsw %mm3,%mm3 + +// CHECK: pabsw 3735928559(%ebx,%ecx,8), %xmm5 + pabsw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pabsw 69, %xmm5 + pabsw 0x45,%xmm5 + +// CHECK: pabsw 32493, %xmm5 + pabsw 0x7eed,%xmm5 + +// CHECK: pabsw 3133065982, %xmm5 + pabsw 0xbabecafe,%xmm5 + +// CHECK: pabsw 305419896, %xmm5 + pabsw 0x12345678,%xmm5 + +// CHECK: pabsw %xmm5, %xmm5 + pabsw %xmm5,%xmm5 + +// CHECK: pabsd 3735928559(%ebx,%ecx,8), %mm3 + pabsd 0xdeadbeef(%ebx,%ecx,8),%mm3 + +// CHECK: pabsd 69, %mm3 + pabsd 0x45,%mm3 + +// CHECK: pabsd 32493, %mm3 + pabsd 0x7eed,%mm3 + +// CHECK: pabsd 3133065982, %mm3 + pabsd 0xbabecafe,%mm3 + +// CHECK: pabsd 305419896, %mm3 + pabsd 0x12345678,%mm3 + +// CHECK: pabsd %mm3, %mm3 + pabsd %mm3,%mm3 + +// CHECK: pabsd 3735928559(%ebx,%ecx,8), %xmm5 + pabsd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pabsd 69, %xmm5 + pabsd 0x45,%xmm5 + +// CHECK: pabsd 32493, %xmm5 + pabsd 0x7eed,%xmm5 + +// CHECK: pabsd 3133065982, %xmm5 + pabsd 0xbabecafe,%xmm5 + +// CHECK: pabsd 305419896, %xmm5 + pabsd 0x12345678,%xmm5 + +// CHECK: pabsd %xmm5, %xmm5 + pabsd %xmm5,%xmm5 + +// CHECK: femms + femms + +// CHECK: movntdqa 3735928559(%ebx,%ecx,8), %xmm5 + movntdqa 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: movntdqa 69, %xmm5 + movntdqa 0x45,%xmm5 + +// CHECK: movntdqa 32493, %xmm5 + movntdqa 0x7eed,%xmm5 + +// CHECK: movntdqa 3133065982, %xmm5 + movntdqa 0xbabecafe,%xmm5 + +// CHECK: movntdqa 305419896, %xmm5 + movntdqa 0x12345678,%xmm5 + +// CHECK: packusdw 3735928559(%ebx,%ecx,8), %xmm5 + packusdw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: packusdw 69, %xmm5 + packusdw 0x45,%xmm5 + +// CHECK: packusdw 32493, %xmm5 + packusdw 0x7eed,%xmm5 + +// CHECK: packusdw 3133065982, %xmm5 + packusdw 0xbabecafe,%xmm5 + +// CHECK: packusdw 305419896, %xmm5 + packusdw 0x12345678,%xmm5 + +// CHECK: packusdw %xmm5, %xmm5 + packusdw %xmm5,%xmm5 + +// CHECK: pcmpeqq 3735928559(%ebx,%ecx,8), %xmm5 + pcmpeqq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pcmpeqq 69, %xmm5 + pcmpeqq 0x45,%xmm5 + +// CHECK: pcmpeqq 32493, %xmm5 + pcmpeqq 0x7eed,%xmm5 + +// CHECK: pcmpeqq 3133065982, %xmm5 + pcmpeqq 0xbabecafe,%xmm5 + +// CHECK: pcmpeqq 305419896, %xmm5 + pcmpeqq 0x12345678,%xmm5 + +// CHECK: pcmpeqq %xmm5, %xmm5 + pcmpeqq %xmm5,%xmm5 + +// CHECK: phminposuw 3735928559(%ebx,%ecx,8), %xmm5 + phminposuw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: phminposuw 69, %xmm5 + phminposuw 0x45,%xmm5 + +// CHECK: phminposuw 32493, %xmm5 + phminposuw 0x7eed,%xmm5 + +// CHECK: phminposuw 3133065982, %xmm5 + phminposuw 0xbabecafe,%xmm5 + +// CHECK: phminposuw 305419896, %xmm5 + phminposuw 0x12345678,%xmm5 + +// CHECK: phminposuw %xmm5, %xmm5 + phminposuw %xmm5,%xmm5 + +// CHECK: pmaxsb 3735928559(%ebx,%ecx,8), %xmm5 + pmaxsb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmaxsb 69, %xmm5 + pmaxsb 0x45,%xmm5 + +// CHECK: pmaxsb 32493, %xmm5 + pmaxsb 0x7eed,%xmm5 + +// CHECK: pmaxsb 3133065982, %xmm5 + pmaxsb 0xbabecafe,%xmm5 + +// CHECK: pmaxsb 305419896, %xmm5 + pmaxsb 0x12345678,%xmm5 + +// CHECK: pmaxsb %xmm5, %xmm5 + pmaxsb %xmm5,%xmm5 + +// CHECK: pmaxsd 3735928559(%ebx,%ecx,8), %xmm5 + pmaxsd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmaxsd 69, %xmm5 + pmaxsd 0x45,%xmm5 + +// CHECK: pmaxsd 32493, %xmm5 + pmaxsd 0x7eed,%xmm5 + +// CHECK: pmaxsd 3133065982, %xmm5 + pmaxsd 0xbabecafe,%xmm5 + +// CHECK: pmaxsd 305419896, %xmm5 + pmaxsd 0x12345678,%xmm5 + +// CHECK: pmaxsd %xmm5, %xmm5 + pmaxsd %xmm5,%xmm5 + +// CHECK: pmaxud 3735928559(%ebx,%ecx,8), %xmm5 + pmaxud 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmaxud 69, %xmm5 + pmaxud 0x45,%xmm5 + +// CHECK: pmaxud 32493, %xmm5 + pmaxud 0x7eed,%xmm5 + +// CHECK: pmaxud 3133065982, %xmm5 + pmaxud 0xbabecafe,%xmm5 + +// CHECK: pmaxud 305419896, %xmm5 + pmaxud 0x12345678,%xmm5 + +// CHECK: pmaxud %xmm5, %xmm5 + pmaxud %xmm5,%xmm5 + +// CHECK: pmaxuw 3735928559(%ebx,%ecx,8), %xmm5 + pmaxuw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmaxuw 69, %xmm5 + pmaxuw 0x45,%xmm5 + +// CHECK: pmaxuw 32493, %xmm5 + pmaxuw 0x7eed,%xmm5 + +// CHECK: pmaxuw 3133065982, %xmm5 + pmaxuw 0xbabecafe,%xmm5 + +// CHECK: pmaxuw 305419896, %xmm5 + pmaxuw 0x12345678,%xmm5 + +// CHECK: pmaxuw %xmm5, %xmm5 + pmaxuw %xmm5,%xmm5 + +// CHECK: pminsb 3735928559(%ebx,%ecx,8), %xmm5 + pminsb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pminsb 69, %xmm5 + pminsb 0x45,%xmm5 + +// CHECK: pminsb 32493, %xmm5 + pminsb 0x7eed,%xmm5 + +// CHECK: pminsb 3133065982, %xmm5 + pminsb 0xbabecafe,%xmm5 + +// CHECK: pminsb 305419896, %xmm5 + pminsb 0x12345678,%xmm5 + +// CHECK: pminsb %xmm5, %xmm5 + pminsb %xmm5,%xmm5 + +// CHECK: pminsd 3735928559(%ebx,%ecx,8), %xmm5 + pminsd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pminsd 69, %xmm5 + pminsd 0x45,%xmm5 + +// CHECK: pminsd 32493, %xmm5 + pminsd 0x7eed,%xmm5 + +// CHECK: pminsd 3133065982, %xmm5 + pminsd 0xbabecafe,%xmm5 + +// CHECK: pminsd 305419896, %xmm5 + pminsd 0x12345678,%xmm5 + +// CHECK: pminsd %xmm5, %xmm5 + pminsd %xmm5,%xmm5 + +// CHECK: pminud 3735928559(%ebx,%ecx,8), %xmm5 + pminud 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pminud 69, %xmm5 + pminud 0x45,%xmm5 + +// CHECK: pminud 32493, %xmm5 + pminud 0x7eed,%xmm5 + +// CHECK: pminud 3133065982, %xmm5 + pminud 0xbabecafe,%xmm5 + +// CHECK: pminud 305419896, %xmm5 + pminud 0x12345678,%xmm5 + +// CHECK: pminud %xmm5, %xmm5 + pminud %xmm5,%xmm5 + +// CHECK: pminuw 3735928559(%ebx,%ecx,8), %xmm5 + pminuw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pminuw 69, %xmm5 + pminuw 0x45,%xmm5 + +// CHECK: pminuw 32493, %xmm5 + pminuw 0x7eed,%xmm5 + +// CHECK: pminuw 3133065982, %xmm5 + pminuw 0xbabecafe,%xmm5 + +// CHECK: pminuw 305419896, %xmm5 + pminuw 0x12345678,%xmm5 + +// CHECK: pminuw %xmm5, %xmm5 + pminuw %xmm5,%xmm5 + +// CHECK: pmovsxbw 3735928559(%ebx,%ecx,8), %xmm5 + pmovsxbw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmovsxbw 69, %xmm5 + pmovsxbw 0x45,%xmm5 + +// CHECK: pmovsxbw 32493, %xmm5 + pmovsxbw 0x7eed,%xmm5 + +// CHECK: pmovsxbw 3133065982, %xmm5 + pmovsxbw 0xbabecafe,%xmm5 + +// CHECK: pmovsxbw 305419896, %xmm5 + pmovsxbw 0x12345678,%xmm5 + +// CHECK: pmovsxbw %xmm5, %xmm5 + pmovsxbw %xmm5,%xmm5 + +// CHECK: pmovsxbd 3735928559(%ebx,%ecx,8), %xmm5 + pmovsxbd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmovsxbd 69, %xmm5 + pmovsxbd 0x45,%xmm5 + +// CHECK: pmovsxbd 32493, %xmm5 + pmovsxbd 0x7eed,%xmm5 + +// CHECK: pmovsxbd 3133065982, %xmm5 + pmovsxbd 0xbabecafe,%xmm5 + +// CHECK: pmovsxbd 305419896, %xmm5 + pmovsxbd 0x12345678,%xmm5 + +// CHECK: pmovsxbd %xmm5, %xmm5 + pmovsxbd %xmm5,%xmm5 + +// CHECK: pmovsxbq 3735928559(%ebx,%ecx,8), %xmm5 + pmovsxbq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmovsxbq 69, %xmm5 + pmovsxbq 0x45,%xmm5 + +// CHECK: pmovsxbq 32493, %xmm5 + pmovsxbq 0x7eed,%xmm5 + +// CHECK: pmovsxbq 3133065982, %xmm5 + pmovsxbq 0xbabecafe,%xmm5 + +// CHECK: pmovsxbq 305419896, %xmm5 + pmovsxbq 0x12345678,%xmm5 + +// CHECK: pmovsxbq %xmm5, %xmm5 + pmovsxbq %xmm5,%xmm5 + +// CHECK: pmovsxwd 3735928559(%ebx,%ecx,8), %xmm5 + pmovsxwd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmovsxwd 69, %xmm5 + pmovsxwd 0x45,%xmm5 + +// CHECK: pmovsxwd 32493, %xmm5 + pmovsxwd 0x7eed,%xmm5 + +// CHECK: pmovsxwd 3133065982, %xmm5 + pmovsxwd 0xbabecafe,%xmm5 + +// CHECK: pmovsxwd 305419896, %xmm5 + pmovsxwd 0x12345678,%xmm5 + +// CHECK: pmovsxwd %xmm5, %xmm5 + pmovsxwd %xmm5,%xmm5 + +// CHECK: pmovsxwq 3735928559(%ebx,%ecx,8), %xmm5 + pmovsxwq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmovsxwq 69, %xmm5 + pmovsxwq 0x45,%xmm5 + +// CHECK: pmovsxwq 32493, %xmm5 + pmovsxwq 0x7eed,%xmm5 + +// CHECK: pmovsxwq 3133065982, %xmm5 + pmovsxwq 0xbabecafe,%xmm5 + +// CHECK: pmovsxwq 305419896, %xmm5 + pmovsxwq 0x12345678,%xmm5 + +// CHECK: pmovsxwq %xmm5, %xmm5 + pmovsxwq %xmm5,%xmm5 + +// CHECK: pmovsxdq 3735928559(%ebx,%ecx,8), %xmm5 + pmovsxdq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmovsxdq 69, %xmm5 + pmovsxdq 0x45,%xmm5 + +// CHECK: pmovsxdq 32493, %xmm5 + pmovsxdq 0x7eed,%xmm5 + +// CHECK: pmovsxdq 3133065982, %xmm5 + pmovsxdq 0xbabecafe,%xmm5 + +// CHECK: pmovsxdq 305419896, %xmm5 + pmovsxdq 0x12345678,%xmm5 + +// CHECK: pmovsxdq %xmm5, %xmm5 + pmovsxdq %xmm5,%xmm5 + +// CHECK: pmovzxbw 3735928559(%ebx,%ecx,8), %xmm5 + pmovzxbw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmovzxbw 69, %xmm5 + pmovzxbw 0x45,%xmm5 + +// CHECK: pmovzxbw 32493, %xmm5 + pmovzxbw 0x7eed,%xmm5 + +// CHECK: pmovzxbw 3133065982, %xmm5 + pmovzxbw 0xbabecafe,%xmm5 + +// CHECK: pmovzxbw 305419896, %xmm5 + pmovzxbw 0x12345678,%xmm5 + +// CHECK: pmovzxbw %xmm5, %xmm5 + pmovzxbw %xmm5,%xmm5 + +// CHECK: pmovzxbd 3735928559(%ebx,%ecx,8), %xmm5 + pmovzxbd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmovzxbd 69, %xmm5 + pmovzxbd 0x45,%xmm5 + +// CHECK: pmovzxbd 32493, %xmm5 + pmovzxbd 0x7eed,%xmm5 + +// CHECK: pmovzxbd 3133065982, %xmm5 + pmovzxbd 0xbabecafe,%xmm5 + +// CHECK: pmovzxbd 305419896, %xmm5 + pmovzxbd 0x12345678,%xmm5 + +// CHECK: pmovzxbd %xmm5, %xmm5 + pmovzxbd %xmm5,%xmm5 + +// CHECK: pmovzxbq 3735928559(%ebx,%ecx,8), %xmm5 + pmovzxbq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmovzxbq 69, %xmm5 + pmovzxbq 0x45,%xmm5 + +// CHECK: pmovzxbq 32493, %xmm5 + pmovzxbq 0x7eed,%xmm5 + +// CHECK: pmovzxbq 3133065982, %xmm5 + pmovzxbq 0xbabecafe,%xmm5 + +// CHECK: pmovzxbq 305419896, %xmm5 + pmovzxbq 0x12345678,%xmm5 + +// CHECK: pmovzxbq %xmm5, %xmm5 + pmovzxbq %xmm5,%xmm5 + +// CHECK: pmovzxwd 3735928559(%ebx,%ecx,8), %xmm5 + pmovzxwd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmovzxwd 69, %xmm5 + pmovzxwd 0x45,%xmm5 + +// CHECK: pmovzxwd 32493, %xmm5 + pmovzxwd 0x7eed,%xmm5 + +// CHECK: pmovzxwd 3133065982, %xmm5 + pmovzxwd 0xbabecafe,%xmm5 + +// CHECK: pmovzxwd 305419896, %xmm5 + pmovzxwd 0x12345678,%xmm5 + +// CHECK: pmovzxwd %xmm5, %xmm5 + pmovzxwd %xmm5,%xmm5 + +// CHECK: pmovzxwq 3735928559(%ebx,%ecx,8), %xmm5 + pmovzxwq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmovzxwq 69, %xmm5 + pmovzxwq 0x45,%xmm5 + +// CHECK: pmovzxwq 32493, %xmm5 + pmovzxwq 0x7eed,%xmm5 + +// CHECK: pmovzxwq 3133065982, %xmm5 + pmovzxwq 0xbabecafe,%xmm5 + +// CHECK: pmovzxwq 305419896, %xmm5 + pmovzxwq 0x12345678,%xmm5 + +// CHECK: pmovzxwq %xmm5, %xmm5 + pmovzxwq %xmm5,%xmm5 + +// CHECK: pmovzxdq 3735928559(%ebx,%ecx,8), %xmm5 + pmovzxdq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmovzxdq 69, %xmm5 + pmovzxdq 0x45,%xmm5 + +// CHECK: pmovzxdq 32493, %xmm5 + pmovzxdq 0x7eed,%xmm5 + +// CHECK: pmovzxdq 3133065982, %xmm5 + pmovzxdq 0xbabecafe,%xmm5 + +// CHECK: pmovzxdq 305419896, %xmm5 + pmovzxdq 0x12345678,%xmm5 + +// CHECK: pmovzxdq %xmm5, %xmm5 + pmovzxdq %xmm5,%xmm5 + +// CHECK: pmuldq 3735928559(%ebx,%ecx,8), %xmm5 + pmuldq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmuldq 69, %xmm5 + pmuldq 0x45,%xmm5 + +// CHECK: pmuldq 32493, %xmm5 + pmuldq 0x7eed,%xmm5 + +// CHECK: pmuldq 3133065982, %xmm5 + pmuldq 0xbabecafe,%xmm5 + +// CHECK: pmuldq 305419896, %xmm5 + pmuldq 0x12345678,%xmm5 + +// CHECK: pmuldq %xmm5, %xmm5 + pmuldq %xmm5,%xmm5 + +// CHECK: pmulld 3735928559(%ebx,%ecx,8), %xmm5 + pmulld 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pmulld 69, %xmm5 + pmulld 0x45,%xmm5 + +// CHECK: pmulld 32493, %xmm5 + pmulld 0x7eed,%xmm5 + +// CHECK: pmulld 3133065982, %xmm5 + pmulld 0xbabecafe,%xmm5 + +// CHECK: pmulld 305419896, %xmm5 + pmulld 0x12345678,%xmm5 + +// CHECK: pmulld %xmm5, %xmm5 + pmulld %xmm5,%xmm5 + +// CHECK: ptest 3735928559(%ebx,%ecx,8), %xmm5 + ptest 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: ptest 69, %xmm5 + ptest 0x45,%xmm5 + +// CHECK: ptest 32493, %xmm5 + ptest 0x7eed,%xmm5 + +// CHECK: ptest 3133065982, %xmm5 + ptest 0xbabecafe,%xmm5 + +// CHECK: ptest 305419896, %xmm5 + ptest 0x12345678,%xmm5 + +// CHECK: ptest %xmm5, %xmm5 + ptest %xmm5,%xmm5 + +// CHECK: crc32 3735928559(%ebx,%ecx,8), %ecx + crc32 0xdeadbeef(%ebx,%ecx,8),%ecx + +// CHECK: crc32 69, %ecx + crc32 0x45,%ecx + +// CHECK: crc32 32493, %ecx + crc32 0x7eed,%ecx + +// CHECK: crc32 3133065982, %ecx + crc32 0xbabecafe,%ecx + +// CHECK: crc32 305419896, %ecx + crc32 0x12345678,%ecx + +// CHECK: crc32 %ecx, %ecx + crc32 %ecx,%ecx + +// CHECK: crc32 %ecx, %ecx + crc32 %ecx,%ecx + +// CHECK: crc32 3735928559(%ebx,%ecx,8), %ecx + crc32 0xdeadbeef(%ebx,%ecx,8),%ecx + +// CHECK: crc32 69, %ecx + crc32 0x45,%ecx + +// CHECK: crc32 32493, %ecx + crc32 0x7eed,%ecx + +// CHECK: crc32 3133065982, %ecx + crc32 0xbabecafe,%ecx + +// CHECK: crc32 305419896, %ecx + crc32 0x12345678,%ecx + +// CHECK: pcmpgtq 3735928559(%ebx,%ecx,8), %xmm5 + pcmpgtq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + +// CHECK: pcmpgtq 69, %xmm5 + pcmpgtq 0x45,%xmm5 + +// CHECK: pcmpgtq 32493, %xmm5 + pcmpgtq 0x7eed,%xmm5 + +// CHECK: pcmpgtq 3133065982, %xmm5 + pcmpgtq 0xbabecafe,%xmm5 + +// CHECK: pcmpgtq 305419896, %xmm5 + pcmpgtq 0x12345678,%xmm5 + +// CHECK: pcmpgtq %xmm5, %xmm5 + pcmpgtq %xmm5,%xmm5 From stoklund at 2pi.dk Tue Feb 2 13:10:29 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Tue, 2 Feb 2010 11:10:29 -0800 Subject: [llvm-commits] patch: moving unreachable elimination to codegenprep In-Reply-To: <4B68588F.7070906@mxc.ca> References: <4B68588F.7070906@mxc.ca> Message-ID: On Feb 2, 2010, at 8:53 AM, Nick Lewycky wrote: > This is a resurrection of the patch first discussed back in October 2009 to change the way unreachable is handled to make it live in the IR for as long as possible. The goal is to implement http://nondot.org/sabre/LLVMNotes/BuiltinUnreachable.txt in time for the LLVM 2.7 freeze so that python can make use of it when they land unladen-swallow. Nick, I couldn't find that discussion in the archives. Do you have any pointers? > This patch does most of the work of just moving the time unreachables are eliminated at late as possible, currently CodeGenPrep, and updates InlineCost and SCEV to handle it. Most of the patch is just updating codegen unit tests that use the unreachable instruction. I can only comment on the InlineCost changes. It seems to me you would need to avoid unreachable instructions in the CountCodeReductionFor* methods as well. Is unreachable only found at the beginning of a block? What about all the undead code driving a switch or br to unreachable? That should not be counted in the inline cost since it will eventually be eliminated. > The primary concern from last time was the side-effects of keeping the chain of computation that fed into a dead branch. The 'extra' instructions could have effects on everything from inlining to loop analysis, but any approach short of cramming the entire expression into metadata attached to the branch would have the same problem. It seems that a lot of optimizations could be sabotaged by undead code. Do we have any measurements that show this to be a good idea in the first place? /jakob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1929 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100202/12c48778/attachment.bin From sabre at nondot.org Tue Feb 2 13:14:27 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 19:14:27 -0000 Subject: [llvm-commits] [llvm] r95109 - in /llvm/trunk: include/llvm/Target/TargetMachine.h lib/CodeGen/LLVMTargetMachine.cpp tools/llc/llc.cpp tools/lto/LTOCodeGenerator.cpp Message-ID: <201002021914.o12JESrx013274@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 13:14:27 2010 New Revision: 95109 URL: http://llvm.org/viewvc/llvm-project?rev=95109&view=rev Log: eliminate all forms of addPassesToEmitMachineCode except the one used by the JIT. Remove all forms of addPassesToEmitFileFinish except the one used by the static code generator. Inline the remaining version of addPassesToEmitFileFinish into its only caller. Modified: llvm/trunk/include/llvm/Target/TargetMachine.h llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp llvm/trunk/tools/llc/llc.cpp llvm/trunk/tools/lto/LTOCodeGenerator.cpp Modified: llvm/trunk/include/llvm/Target/TargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=95109&r1=95108&r2=95109&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetMachine.h (original) +++ llvm/trunk/include/llvm/Target/TargetMachine.h Tue Feb 2 13:14:27 2010 @@ -234,48 +234,6 @@ return FileModel::None; } - /// addPassesToEmitFileFinish - If the passes to emit the specified file had - /// to be split up (e.g., to add an object writer pass), this method can be - /// used to finish up adding passes to emit the file, if necessary. - /// - virtual bool addPassesToEmitFileFinish(PassManagerBase &, - MachineCodeEmitter *, - CodeGenOpt::Level) { - return true; - } - - /// addPassesToEmitFileFinish - If the passes to emit the specified file had - /// to be split up (e.g., to add an object writer pass), this method can be - /// used to finish up adding passes to emit the file, if necessary. - /// - virtual bool addPassesToEmitFileFinish(PassManagerBase &, - JITCodeEmitter *, - CodeGenOpt::Level) { - return true; - } - - /// addPassesToEmitFileFinish - If the passes to emit the specified file had - /// to be split up (e.g., to add an object writer pass), this method can be - /// used to finish up adding passes to emit the file, if necessary. - /// - virtual bool addPassesToEmitFileFinish(PassManagerBase &, - ObjectCodeEmitter *, - CodeGenOpt::Level) { - return true; - } - - /// addPassesToEmitMachineCode - Add passes to the specified pass manager to - /// get machine code emitted. This uses a MachineCodeEmitter object to handle - /// actually outputting the machine code and resolving things like the address - /// of functions. This method returns true if machine code emission is - /// not supported. - /// - virtual bool addPassesToEmitMachineCode(PassManagerBase &, - MachineCodeEmitter &, - CodeGenOpt::Level) { - return true; - } - /// addPassesToEmitMachineCode - Add passes to the specified pass manager to /// get machine code emitted. This uses a MachineCodeEmitter object to handle /// actually outputting the machine code and resolving things like the address @@ -312,9 +270,6 @@ bool addCommonCodeGenPasses(PassManagerBase &, CodeGenOpt::Level); private: - // These routines are used by addPassesToEmitFileFinish and - // addPassesToEmitMachineCode to set the CodeModel if it's still marked - // as default. virtual void setCodeModelForJIT(); virtual void setCodeModelForStatic(); @@ -336,40 +291,6 @@ CodeGenFileType FileType, CodeGenOpt::Level); - /// addPassesToEmitFileFinish - If the passes to emit the specified file had - /// to be split up (e.g., to add an object writer pass), this method can be - /// used to finish up adding passes to emit the file, if necessary. - /// - virtual bool addPassesToEmitFileFinish(PassManagerBase &PM, - MachineCodeEmitter *MCE, - CodeGenOpt::Level); - - /// addPassesToEmitFileFinish - If the passes to emit the specified file had - /// to be split up (e.g., to add an object writer pass), this method can be - /// used to finish up adding passes to emit the file, if necessary. - /// - virtual bool addPassesToEmitFileFinish(PassManagerBase &PM, - JITCodeEmitter *JCE, - CodeGenOpt::Level); - - /// addPassesToEmitFileFinish - If the passes to emit the specified file had - /// to be split up (e.g., to add an object writer pass), this method can be - /// used to finish up adding passes to emit the file, if necessary. - /// - virtual bool addPassesToEmitFileFinish(PassManagerBase &PM, - ObjectCodeEmitter *OCE, - CodeGenOpt::Level); - - /// addPassesToEmitMachineCode - Add passes to the specified pass manager to - /// get machine code emitted. This uses a MachineCodeEmitter object to handle - /// actually outputting the machine code and resolving things like the address - /// of functions. This method returns true if machine code emission is - /// not supported. - /// - virtual bool addPassesToEmitMachineCode(PassManagerBase &PM, - MachineCodeEmitter &MCE, - CodeGenOpt::Level); - /// addPassesToEmitMachineCode - Add passes to the specified pass manager to /// get machine code emitted. This uses a MachineCodeEmitter object to handle /// actually outputting the machine code and resolving things like the address Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=95109&r1=95108&r2=95109&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Feb 2 13:14:27 2010 @@ -105,91 +105,27 @@ if (addCommonCodeGenPasses(PM, OptLevel)) return FileModel::Error; + FileModel::Model ResultTy; switch (FileType) { default: - break; + return FileModel::Error; + case TargetMachine::ObjectFile: + return FileModel::Error; case TargetMachine::AssemblyFile: { FunctionPass *Printer = getTarget().createAsmPrinter(Out, *this, getMCAsmInfo(), getAsmVerbosityDefault()); - if (Printer == 0) break; + if (Printer == 0) return FileModel::Error; PM.add(Printer); - return FileModel::AsmFile; + ResultTy = FileModel::AsmFile; + break; } - case TargetMachine::ObjectFile: - return FileModel::Error; } - return FileModel::Error; -} - -/// addPassesToEmitFileFinish - If the passes to emit the specified file had to -/// be split up (e.g., to add an object writer pass), this method can be used to -/// finish up adding passes to emit the file, if necessary. -bool LLVMTargetMachine::addPassesToEmitFileFinish(PassManagerBase &PM, - MachineCodeEmitter *MCE, - CodeGenOpt::Level OptLevel) { - // Make sure the code model is set. - setCodeModelForStatic(); - if (MCE) - addSimpleCodeEmitter(PM, OptLevel, *MCE); - - PM.add(createGCInfoDeleter()); - - return false; // success! -} - -/// addPassesToEmitFileFinish - If the passes to emit the specified file had to -/// be split up (e.g., to add an object writer pass), this method can be used to -/// finish up adding passes to emit the file, if necessary. -bool LLVMTargetMachine::addPassesToEmitFileFinish(PassManagerBase &PM, - JITCodeEmitter *JCE, - CodeGenOpt::Level OptLevel) { - // Make sure the code model is set. - setCodeModelForJIT(); - - if (JCE) - addSimpleCodeEmitter(PM, OptLevel, *JCE); - - PM.add(createGCInfoDeleter()); - - return false; // success! -} - -/// addPassesToEmitFileFinish - If the passes to emit the specified file had to -/// be split up (e.g., to add an object writer pass), this method can be used to -/// finish up adding passes to emit the file, if necessary. -bool LLVMTargetMachine::addPassesToEmitFileFinish(PassManagerBase &PM, - ObjectCodeEmitter *OCE, - CodeGenOpt::Level OptLevel) { // Make sure the code model is set. setCodeModelForStatic(); - - PM.add(createGCInfoDeleter()); - - return false; // success! -} - -/// addPassesToEmitMachineCode - Add passes to the specified pass manager to -/// get machine code emitted. This uses a MachineCodeEmitter object to handle -/// actually outputting the machine code and resolving things like the address -/// of functions. This method should returns true if machine code emission is -/// not supported. -/// -bool LLVMTargetMachine::addPassesToEmitMachineCode(PassManagerBase &PM, - MachineCodeEmitter &MCE, - CodeGenOpt::Level OptLevel) { - // Make sure the code model is set. - setCodeModelForJIT(); - - // Add common CodeGen passes. - if (addCommonCodeGenPasses(PM, OptLevel)) - return true; - - addCodeEmitter(PM, OptLevel, MCE); PM.add(createGCInfoDeleter()); - - return false; // success! + return ResultTy; } /// addPassesToEmitMachineCode - Add passes to the specified pass manager to Modified: llvm/trunk/tools/llc/llc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=95109&r1=95108&r2=95109&view=diff ============================================================================== --- llvm/trunk/tools/llc/llc.cpp (original) +++ llvm/trunk/tools/llc/llc.cpp Tue Feb 2 13:14:27 2010 @@ -363,15 +363,6 @@ break; } - if (Target.addPassesToEmitFileFinish(Passes, (ObjectCodeEmitter *)0, OLvl)){ - errs() << argv[0] << ": target does not support generation of this" - << " file type!\n"; - if (Out != &fouts()) delete Out; - // And the Out file is empty and useless, so remove it now. - sys::Path(OutputFilename).eraseFromDisk(); - return 1; - } - Passes.doInitialization(); // Run our queue of passes all at once now, efficiently. Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOCodeGenerator.cpp?rev=95109&r1=95108&r2=95109&view=diff ============================================================================== --- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original) +++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Tue Feb 2 13:14:27 2010 @@ -405,12 +405,6 @@ return true; } - if (_target->addPassesToEmitFileFinish(*codeGenPasses,(ObjectCodeEmitter*)0, - CodeGenOpt::Aggressive)) { - errMsg = "target does not support generation of this file type"; - return true; - } - // Run our queue of passes all at once now, efficiently. passes.run(*mergedModule); From sabre at nondot.org Tue Feb 2 13:23:55 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 19:23:55 -0000 Subject: [llvm-commits] [llvm] r95111 - in /llvm/trunk/lib/Target/PowerPC: CMakeLists.txt PPCMachOWriterInfo.cpp PPCMachOWriterInfo.h PPCTargetMachine.cpp PPCTargetMachine.h Message-ID: <201002021923.o12JNuA2013724@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 13:23:55 2010 New Revision: 95111 URL: http://llvm.org/viewvc/llvm-project?rev=95111&view=rev Log: remove PPCMachOWriterInfo. Removed: llvm/trunk/lib/Target/PowerPC/PPCMachOWriterInfo.cpp llvm/trunk/lib/Target/PowerPC/PPCMachOWriterInfo.h Modified: llvm/trunk/lib/Target/PowerPC/CMakeLists.txt llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h Modified: llvm/trunk/lib/Target/PowerPC/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/CMakeLists.txt?rev=95111&r1=95110&r2=95111&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/PowerPC/CMakeLists.txt Tue Feb 2 13:23:55 2010 @@ -19,7 +19,6 @@ PPCISelDAGToDAG.cpp PPCISelLowering.cpp PPCJITInfo.cpp - PPCMachOWriterInfo.cpp PPCMCAsmInfo.cpp PPCPredicates.cpp PPCRegisterInfo.cpp Removed: llvm/trunk/lib/Target/PowerPC/PPCMachOWriterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCMachOWriterInfo.cpp?rev=95110&view=auto ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCMachOWriterInfo.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCMachOWriterInfo.cpp (removed) @@ -1,152 +0,0 @@ -//===-- PPCMachOWriterInfo.cpp - Mach-O Writer Info for the PowerPC -------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements Mach-O writer information for the PowerPC backend. -// -//===----------------------------------------------------------------------===// - -#include "PPCMachOWriterInfo.h" -#include "PPCRelocations.h" -#include "PPCTargetMachine.h" -#include "llvm/CodeGen/MachORelocation.h" -#include "llvm/Support/OutputBuffer.h" -#include "llvm/Support/ErrorHandling.h" -#include -using namespace llvm; - -PPCMachOWriterInfo::PPCMachOWriterInfo(const PPCTargetMachine &TM) - : TargetMachOWriterInfo(TM.getTargetData()->getPointerSizeInBits() == 64 ? - HDR_CPU_TYPE_POWERPC64 : - HDR_CPU_TYPE_POWERPC, - HDR_CPU_SUBTYPE_POWERPC_ALL) {} -PPCMachOWriterInfo::~PPCMachOWriterInfo() {} - -/// GetTargetRelocation - For the MachineRelocation MR, convert it to one or -/// more PowerPC MachORelocation(s), add the new relocations to the -/// MachOSection, and rewrite the instruction at the section offset if required -/// by that relocation type. -unsigned PPCMachOWriterInfo::GetTargetRelocation(MachineRelocation &MR, - unsigned FromIdx, - unsigned ToAddr, - unsigned ToIdx, - OutputBuffer &RelocOut, - OutputBuffer &SecOut, - bool Scattered, - bool isExtern) const { - unsigned NumRelocs = 0; - uint64_t Addr = 0; - - // Get the address of whatever it is we're relocating, if possible. - if (!isExtern) - Addr = (uintptr_t)MR.getResultPointer() + ToAddr; - - switch ((PPC::RelocationType)MR.getRelocationType()) { - default: llvm_unreachable("Unknown PPC relocation type!"); - case PPC::reloc_absolute_low_ix: - llvm_unreachable("Unhandled PPC relocation type!"); - break; - case PPC::reloc_vanilla: - { - // FIXME: need to handle 64 bit vanilla relocs - MachORelocation VANILLA(MR.getMachineCodeOffset(), ToIdx, - false, 2, isExtern, - PPC_RELOC_VANILLA, - Scattered, (intptr_t)MR.getResultPointer()); - ++NumRelocs; - - if (Scattered) { - RelocOut.outword(VANILLA.getPackedFields()); - RelocOut.outword(VANILLA.getAddress()); - } else { - RelocOut.outword(VANILLA.getAddress()); - RelocOut.outword(VANILLA.getPackedFields()); - } - - intptr_t SymbolOffset; - - if (Scattered) - SymbolOffset = Addr + MR.getConstantVal(); - else - SymbolOffset = Addr; - - printf("vanilla fixup: sec_%x[%x] = %x\n", FromIdx, - unsigned(MR.getMachineCodeOffset()), - unsigned(SymbolOffset)); - SecOut.fixword(SymbolOffset, MR.getMachineCodeOffset()); - } - break; - case PPC::reloc_pcrel_bx: - { - // FIXME: Presumably someday we will need to branch to other, non-extern - // functions too. Need to figure out some way to distinguish between - // target is BB and target is function. - if (isExtern) { - MachORelocation BR24(MR.getMachineCodeOffset(), ToIdx, true, 2, - isExtern, PPC_RELOC_BR24, Scattered, - (intptr_t)MR.getMachineCodeOffset()); - RelocOut.outword(BR24.getAddress()); - RelocOut.outword(BR24.getPackedFields()); - ++NumRelocs; - } - - Addr -= MR.getMachineCodeOffset(); - Addr >>= 2; - Addr &= 0xFFFFFF; - Addr <<= 2; - Addr |= (SecOut[MR.getMachineCodeOffset()] << 24); - Addr |= (SecOut[MR.getMachineCodeOffset()+3] & 0x3); - SecOut.fixword(Addr, MR.getMachineCodeOffset()); - break; - } - case PPC::reloc_pcrel_bcx: - { - Addr -= MR.getMachineCodeOffset(); - Addr &= 0xFFFC; - - SecOut.fixhalf(Addr, MR.getMachineCodeOffset() + 2); - break; - } - case PPC::reloc_absolute_high: - { - MachORelocation HA16(MR.getMachineCodeOffset(), ToIdx, false, 2, - isExtern, PPC_RELOC_HA16); - MachORelocation PAIR(Addr & 0xFFFF, 0xFFFFFF, false, 2, isExtern, - PPC_RELOC_PAIR); - NumRelocs = 2; - - RelocOut.outword(HA16.getRawAddress()); - RelocOut.outword(HA16.getPackedFields()); - RelocOut.outword(PAIR.getRawAddress()); - RelocOut.outword(PAIR.getPackedFields()); - - Addr += 0x8000; - - SecOut.fixhalf(Addr >> 16, MR.getMachineCodeOffset() + 2); - break; - } - case PPC::reloc_absolute_low: - { - MachORelocation LO16(MR.getMachineCodeOffset(), ToIdx, false, 2, - isExtern, PPC_RELOC_LO16); - MachORelocation PAIR(Addr >> 16, 0xFFFFFF, false, 2, isExtern, - PPC_RELOC_PAIR); - NumRelocs = 2; - - RelocOut.outword(LO16.getRawAddress()); - RelocOut.outword(LO16.getPackedFields()); - RelocOut.outword(PAIR.getRawAddress()); - RelocOut.outword(PAIR.getPackedFields()); - - SecOut.fixhalf(Addr, MR.getMachineCodeOffset() + 2); - break; - } - } - - return NumRelocs; -} Removed: llvm/trunk/lib/Target/PowerPC/PPCMachOWriterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCMachOWriterInfo.h?rev=95110&view=auto ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCMachOWriterInfo.h (original) +++ llvm/trunk/lib/Target/PowerPC/PPCMachOWriterInfo.h (removed) @@ -1,55 +0,0 @@ -//===-- PPCMachOWriterInfo.h - Mach-O Writer Info for PowerPC ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements Mach-O writer information for the PowerPC backend. -// -//===----------------------------------------------------------------------===// - -#ifndef PPC_MACHO_WRITER_INFO_H -#define PPC_MACHO_WRITER_INFO_H - -#include "llvm/Target/TargetMachOWriterInfo.h" - -namespace llvm { - - // Forward declarations - class MachineRelocation; - class OutputBuffer; - class PPCTargetMachine; - - class PPCMachOWriterInfo : public TargetMachOWriterInfo { - public: - PPCMachOWriterInfo(const PPCTargetMachine &TM); - virtual ~PPCMachOWriterInfo(); - - virtual unsigned GetTargetRelocation(MachineRelocation &MR, - unsigned FromIdx, - unsigned ToAddr, - unsigned ToIdx, - OutputBuffer &RelocOut, - OutputBuffer &SecOut, - bool Scattered, bool Extern) const; - - // Constants for the relocation r_type field. - // See - enum { - PPC_RELOC_VANILLA, // generic relocation - PPC_RELOC_PAIR, // the second relocation entry of a pair - PPC_RELOC_BR14, // 14 bit branch displacement to word address - PPC_RELOC_BR24, // 24 bit branch displacement to word address - PPC_RELOC_HI16, // a PAIR follows with the low 16 bits - PPC_RELOC_LO16, // a PAIR follows with the high 16 bits - PPC_RELOC_HA16, // a PAIR follows, which is sign extended to 32b - PPC_RELOC_LO14 // LO16 with low 2 bits implicitly zero - }; - }; - -} // end llvm namespace - -#endif // PPC_MACHO_WRITER_INFO_H Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp?rev=95111&r1=95110&r2=95111&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Tue Feb 2 13:23:55 2010 @@ -45,7 +45,7 @@ Subtarget(TT, FS, is64Bit), DataLayout(Subtarget.getTargetDataString()), InstrInfo(*this), FrameInfo(*this, is64Bit), JITInfo(*this, is64Bit), TLInfo(*this), - InstrItins(Subtarget.getInstrItineraryData()), MachOWriterInfo(*this) { + InstrItins(Subtarget.getInstrItineraryData()) { if (getRelocationModel() == Reloc::Default) { if (Subtarget.isDarwin()) Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h?rev=95111&r1=95110&r2=95111&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h (original) +++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h Tue Feb 2 13:23:55 2010 @@ -19,7 +19,6 @@ #include "PPCJITInfo.h" #include "PPCInstrInfo.h" #include "PPCISelLowering.h" -#include "PPCMachOWriterInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetData.h" @@ -37,7 +36,6 @@ PPCJITInfo JITInfo; PPCTargetLowering TLInfo; InstrItineraryData InstrItins; - PPCMachOWriterInfo MachOWriterInfo; public: PPCTargetMachine(const Target &T, const std::string &TT, @@ -58,9 +56,6 @@ virtual const InstrItineraryData getInstrItineraryData() const { return InstrItins; } - virtual const PPCMachOWriterInfo *getMachOWriterInfo() const { - return &MachOWriterInfo; - } /// getLSDAEncoding - Returns the LSDA pointer encoding. The choices are /// 4-byte, 8-byte, and target default. The CIE is hard-coded to indicate that From johnny.chen at apple.com Tue Feb 2 13:31:58 2010 From: johnny.chen at apple.com (Johnny Chen) Date: Tue, 02 Feb 2010 19:31:58 -0000 Subject: [llvm-commits] [llvm] r95112 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Message-ID: <201002021931.o12JVw8d014053@zion.cs.uiuc.edu> Author: johnny Date: Tue Feb 2 13:31:58 2010 New Revision: 95112 URL: http://llvm.org/viewvc/llvm-project?rev=95112&view=rev Log: Added t2BFI (Bitfield Insert) entry for disassembler, with blank pattern field. Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td?rev=95112&r1=95111&r2=95112&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrThumb2.td Tue Feb 2 13:31:58 2010 @@ -1232,7 +1232,16 @@ let Inst{15} = 0; } -// FIXME: A8.6.18 BFI - Bitfield insert (Encoding T1) +// A8.6.18 BFI - Bitfield insert (Encoding T1) +// Added for disassembler with the pattern field purposely left blank. +// FIXME: Utilize this instruction in codgen. +def t2BFI : T2I<(outs GPR:$dst), (ins GPR:$src, imm0_31:$lsb, imm0_31:$width), + IIC_iALUi, "bfi", "\t$dst, $src, $lsb, $width", []> { + let Inst{31-27} = 0b11110; + let Inst{25} = 1; + let Inst{24-20} = 0b10110; + let Inst{15} = 0; +} defm t2ORN : T2I_bin_irs<0b0011, "orn", BinOpFrag<(or node:$LHS, (not node:$RHS))>>; From sabre at nondot.org Tue Feb 2 13:38:15 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 19:38:15 -0000 Subject: [llvm-commits] [llvm] r95113 - in /llvm/trunk: include/llvm/Support/MachO.h lib/MC/MCAssembler.cpp Message-ID: <201002021938.o12JcFoi014277@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 13:38:14 2010 New Revision: 95113 URL: http://llvm.org/viewvc/llvm-project?rev=95113&view=rev Log: Add a new top-level MachO.h file for manifest constants, fixing a layering violation from MC -> Target. Added: llvm/trunk/include/llvm/Support/MachO.h Modified: llvm/trunk/lib/MC/MCAssembler.cpp Added: llvm/trunk/include/llvm/Support/MachO.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/MachO.h?rev=95113&view=auto ============================================================================== --- llvm/trunk/include/llvm/Support/MachO.h (added) +++ llvm/trunk/include/llvm/Support/MachO.h Tue Feb 2 13:38:14 2010 @@ -0,0 +1,56 @@ +//===-- llvm/Support/MachO.h - The MachO file format ------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines manifest constants for the MachO object file format. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_SUPPORT_MACHO_H +#define LLVM_SUPPORT_MACHO_H + +// NOTE: The enums in this file are intentially named to be different than those +// in the headers in /usr/include/mach (on darwin systems) to avoid conflicts +// with those macros. +namespace llvm { + namespace MachO { + // Enums from + enum { + // Capability bits used in the definition of cpu_type. + CPUArchMask = 0xff000000, // Mask for architecture bits + CPUArchABI64 = 0x01000000, // 64 bit ABI + + // Constants for the cputype field. + CPUTypeI386 = 7, + CPUTypeX86_64 = CPUTypeI386 | CPUArchABI64, + CPUTypeARM = 12, + CPUTypeSPARC = 14, + CPUTypePowerPC = 18, + CPUTypePowerPC64 = CPUTypePowerPC | CPUArchABI64, + + + // Constants for the cpusubtype field. + + // X86 + CPUSubType_I386_ALL = 3, + CPUSubType_X86_64_ALL = 3, + + // ARM + CPUSubType_ARM_ALL = 0, + CPUSubType_ARM_V4T = 5, + CPUSubType_ARM_V6 = 6, + + // PowerPC + CPUSubType_POWERPC_ALL = 0, + + CPUSubType_SPARC_ALL = 0 + }; + } // end namespace MachO +} // end namespace llvm + +#endif Modified: llvm/trunk/lib/MC/MCAssembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAssembler.cpp?rev=95113&r1=95112&r2=95113&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCAssembler.cpp (original) +++ llvm/trunk/lib/MC/MCAssembler.cpp Tue Feb 2 13:38:14 2010 @@ -13,13 +13,13 @@ #include "llvm/MC/MCSectionMachO.h" #include "llvm/MC/MCSymbol.h" #include "llvm/MC/MCValue.h" -#include "llvm/Target/TargetMachOWriterInfo.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/MachO.h" #include "llvm/Support/raw_ostream.h" #include using namespace llvm; @@ -203,9 +203,9 @@ Write32(Header_Magic32); // FIXME: Support cputype. - Write32(TargetMachOWriterInfo::HDR_CPU_TYPE_I386); + Write32(MachO::CPUTypeI386); // FIXME: Support cpusubtype. - Write32(TargetMachOWriterInfo::HDR_CPU_SUBTYPE_I386_ALL); + Write32(MachO::CPUSubType_I386_ALL); Write32(HFT_Object); Write32(NumLoadCommands); // Object files have a single load command, the // segment. From sabre at nondot.org Tue Feb 2 13:41:23 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 19:41:23 -0000 Subject: [llvm-commits] [llvm] r95114 - in /llvm/trunk: include/llvm/Target/TargetMachOWriterInfo.h include/llvm/Target/TargetMachine.h lib/Target/CMakeLists.txt lib/Target/TargetMachOWriterInfo.cpp Message-ID: <201002021941.o12JfNvx014385@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 13:41:23 2010 New Revision: 95114 URL: http://llvm.org/viewvc/llvm-project?rev=95114&view=rev Log: remove the remnants of TargetMachOWriterInfo. Removed: llvm/trunk/include/llvm/Target/TargetMachOWriterInfo.h llvm/trunk/lib/Target/TargetMachOWriterInfo.cpp Modified: llvm/trunk/include/llvm/Target/TargetMachine.h llvm/trunk/lib/Target/CMakeLists.txt Removed: llvm/trunk/include/llvm/Target/TargetMachOWriterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachOWriterInfo.h?rev=95113&view=auto ============================================================================== --- llvm/trunk/include/llvm/Target/TargetMachOWriterInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetMachOWriterInfo.h (removed) @@ -1,112 +0,0 @@ -//===-- llvm/Target/TargetMachOWriterInfo.h - MachO Writer Info--*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the TargetMachOWriterInfo class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_TARGET_TARGETMACHOWRITERINFO_H -#define LLVM_TARGET_TARGETMACHOWRITERINFO_H - -#include "llvm/CodeGen/MachineRelocation.h" - -namespace llvm { - - class MachineBasicBlock; - class OutputBuffer; - - //===--------------------------------------------------------------------===// - // TargetMachOWriterInfo - //===--------------------------------------------------------------------===// - - class TargetMachOWriterInfo { - uint32_t CPUType; // CPU specifier - uint32_t CPUSubType; // Machine specifier - public: - // The various CPU_TYPE_* constants are already defined by at least one - // system header file and create compilation errors if not respected. -#if !defined(CPU_TYPE_I386) -#define CPU_TYPE_I386 7 -#endif -#if !defined(CPU_TYPE_X86_64) -#define CPU_TYPE_X86_64 (CPU_TYPE_I386 | 0x1000000) -#endif -#if !defined(CPU_TYPE_ARM) -#define CPU_TYPE_ARM 12 -#endif -#if !defined(CPU_TYPE_SPARC) -#define CPU_TYPE_SPARC 14 -#endif -#if !defined(CPU_TYPE_POWERPC) -#define CPU_TYPE_POWERPC 18 -#endif -#if !defined(CPU_TYPE_POWERPC64) -#define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | 0x1000000) -#endif - - // Constants for the cputype field - // see - enum { - HDR_CPU_TYPE_I386 = CPU_TYPE_I386, - HDR_CPU_TYPE_X86_64 = CPU_TYPE_X86_64, - HDR_CPU_TYPE_ARM = CPU_TYPE_ARM, - HDR_CPU_TYPE_SPARC = CPU_TYPE_SPARC, - HDR_CPU_TYPE_POWERPC = CPU_TYPE_POWERPC, - HDR_CPU_TYPE_POWERPC64 = CPU_TYPE_POWERPC64 - }; - -#if !defined(CPU_SUBTYPE_I386_ALL) -#define CPU_SUBTYPE_I386_ALL 3 -#endif -#if !defined(CPU_SUBTYPE_X86_64_ALL) -#define CPU_SUBTYPE_X86_64_ALL 3 -#endif -#if !defined(CPU_SUBTYPE_ARM_ALL) -#define CPU_SUBTYPE_ARM_ALL 0 -#endif -#if !defined(CPU_SUBTYPE_SPARC_ALL) -#define CPU_SUBTYPE_SPARC_ALL 0 -#endif -#if !defined(CPU_SUBTYPE_POWERPC_ALL) -#define CPU_SUBTYPE_POWERPC_ALL 0 -#endif - - // Constants for the cpusubtype field - // see - enum { - HDR_CPU_SUBTYPE_I386_ALL = CPU_SUBTYPE_I386_ALL, - HDR_CPU_SUBTYPE_X86_64_ALL = CPU_SUBTYPE_X86_64_ALL, - HDR_CPU_SUBTYPE_ARM_ALL = CPU_SUBTYPE_ARM_ALL, - HDR_CPU_SUBTYPE_SPARC_ALL = CPU_SUBTYPE_SPARC_ALL, - HDR_CPU_SUBTYPE_POWERPC_ALL = CPU_SUBTYPE_POWERPC_ALL - }; - - TargetMachOWriterInfo(uint32_t cputype, uint32_t cpusubtype) - : CPUType(cputype), CPUSubType(cpusubtype) {} - virtual ~TargetMachOWriterInfo(); - - virtual MachineRelocation GetJTRelocation(unsigned Offset, - MachineBasicBlock *MBB) const; - - virtual unsigned GetTargetRelocation(MachineRelocation &MR, - unsigned FromIdx, - unsigned ToAddr, - unsigned ToIdx, - OutputBuffer &RelocOut, - OutputBuffer &SecOut, - bool Scattered, - bool Extern) const { return 0; } - - uint32_t getCPUType() const { return CPUType; } - uint32_t getCPUSubType() const { return CPUSubType; } - }; - -} // end llvm namespace - -#endif // LLVM_TARGET_TARGETMACHOWRITERINFO_H Modified: llvm/trunk/include/llvm/Target/TargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=95114&r1=95113&r2=95114&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetMachine.h (original) +++ llvm/trunk/include/llvm/Target/TargetMachine.h Tue Feb 2 13:41:23 2010 @@ -36,7 +36,6 @@ class PassManagerBase; class PassManager; class Pass; -class TargetMachOWriterInfo; class TargetELFWriterInfo; class formatted_raw_ostream; @@ -163,11 +162,6 @@ return InstrItineraryData(); } - /// getMachOWriterInfo - If this target supports a Mach-O writer, return - /// information for it, otherwise return null. - /// - virtual const TargetMachOWriterInfo *getMachOWriterInfo() const { return 0; } - /// getELFWriterInfo - If this target supports an ELF writer, return /// information for it, otherwise return null. /// Modified: llvm/trunk/lib/Target/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CMakeLists.txt?rev=95114&r1=95113&r2=95114&view=diff ============================================================================== --- llvm/trunk/lib/Target/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/CMakeLists.txt Tue Feb 2 13:41:23 2010 @@ -9,7 +9,6 @@ TargetInstrInfo.cpp TargetIntrinsicInfo.cpp TargetLoweringObjectFile.cpp - TargetMachOWriterInfo.cpp TargetMachine.cpp TargetRegisterInfo.cpp TargetSubtarget.cpp Removed: llvm/trunk/lib/Target/TargetMachOWriterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachOWriterInfo.cpp?rev=95113&view=auto ============================================================================== --- llvm/trunk/lib/Target/TargetMachOWriterInfo.cpp (original) +++ llvm/trunk/lib/Target/TargetMachOWriterInfo.cpp (removed) @@ -1,25 +0,0 @@ -//===-- llvm/Target/TargetMachOWriterInfo.h - MachO Writer Info -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the TargetMachOWriterInfo class. -// -//===----------------------------------------------------------------------===// - -#include "llvm/Target/TargetMachOWriterInfo.h" -#include "llvm/CodeGen/MachineRelocation.h" -using namespace llvm; - -TargetMachOWriterInfo::~TargetMachOWriterInfo() {} - -MachineRelocation -TargetMachOWriterInfo::GetJTRelocation(unsigned Offset, - MachineBasicBlock *MBB) const { - // FIXME: do something about PIC - return MachineRelocation::getBB(Offset, MachineRelocation::VANILLA, MBB); -} From baldrick at free.fr Tue Feb 2 13:53:12 2010 From: baldrick at free.fr (Duncan Sands) Date: Tue, 02 Feb 2010 19:53:12 -0000 Subject: [llvm-commits] [dragonegg] r95115 - /dragonegg/trunk/llvm-backend.cpp Message-ID: <201002021953.o12JrCgN014887@zion.cs.uiuc.edu> Author: baldrick Date: Tue Feb 2 13:53:12 2010 New Revision: 95115 URL: http://llvm.org/viewvc/llvm-project?rev=95115&view=rev Log: Look for alias targets for which we only have an indentifier node using cgraph_node_for_asm and varpool_node_for_asm. I'm pretty sure that this will always work except for weakref to an external symbol. Modified: dragonegg/trunk/llvm-backend.cpp Modified: dragonegg/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=95115&r1=95114&r2=95115&view=diff ============================================================================== --- dragonegg/trunk/llvm-backend.cpp (original) +++ dragonegg/trunk/llvm-backend.cpp Tue Feb 2 13:53:12 2010 @@ -1669,47 +1669,35 @@ // Get or create LLVM global for our alias. GlobalValue *V = cast(DECL_LLVM(decl)); - GlobalValue *Aliasee; - bool weakref = lookup_attribute ("weakref", DECL_ATTRIBUTES (decl)); + bool weakref = lookup_attribute("weakref", DECL_ATTRIBUTES(decl)); if (weakref) while (IDENTIFIER_TRANSPARENT_ALIAS(target)) - target = TREE_CHAIN (target); + target = TREE_CHAIN(target); + GlobalValue *Aliasee = 0; if (TREE_CODE(target) == IDENTIFIER_NODE) { - // This is something insane. Probably only LTHUNKs can be here - // Try to grab decl from IDENTIFIER_NODE - - // Query SymTab for aliasee - const char* AliaseeName = IDENTIFIER_POINTER(target); - Aliasee = - dyn_cast_or_null(TheModule-> - getValueSymbolTable().lookup(AliaseeName)); - - // Last resort. Query for name set via __asm__ - if (!Aliasee) { - std::string starred = std::string("\001") + AliaseeName; - Aliasee = - dyn_cast_or_null(TheModule-> - getValueSymbolTable().lookup(starred)); - } - - if (!Aliasee) { - if (weakref) { - if (GlobalVariable *GV = dyn_cast(V)) - Aliasee = new GlobalVariable(*TheModule, GV->getType(), - GV->isConstant(), - GlobalVariable::ExternalWeakLinkage, - NULL, AliaseeName); - else if (Function *F = dyn_cast(V)) - Aliasee = Function::Create(F->getFunctionType(), - Function::ExternalWeakLinkage, - AliaseeName, TheModule); - else - assert(0 && "Unsuported global value"); - } else { - error ("%q+D aliased to undefined symbol %qs", decl, AliaseeName); - return; - } + if (struct cgraph_node *fnode = cgraph_node_for_asm(target)) { + Aliasee = cast(DECL_LLVM(fnode->decl)); + } else if (struct varpool_node *vnode = varpool_node_for_asm(target)) { + Aliasee = cast(DECL_LLVM(vnode->decl)); + } else if (weakref) { + // weakref to external symbol. + if (GlobalVariable *GV = dyn_cast(V)) + Aliasee = new GlobalVariable(*TheModule, GV->getType(), + GV->isConstant(), + GlobalVariable::ExternalWeakLinkage, NULL, + IDENTIFIER_POINTER(target)); + else if (Function *F = dyn_cast(V)) + Aliasee = Function::Create(F->getFunctionType(), + Function::ExternalWeakLinkage, + IDENTIFIER_POINTER(target), + TheModule); + else + assert(0 && "Unsuported global value"); + } else { + error("%q+D aliased to undefined symbol %qs", decl, + IDENTIFIER_POINTER(target)); + return; } } else { Aliasee = cast(DECL_LLVM(target)); From scallanan at apple.com Tue Feb 2 14:11:23 2010 From: scallanan at apple.com (Sean Callanan) Date: Tue, 02 Feb 2010 20:11:23 -0000 Subject: [llvm-commits] [llvm] r95118 - in /llvm/trunk/tools: ed/ edis/ Message-ID: <201002022011.o12KBN2b015724@zion.cs.uiuc.edu> Author: spyffe Date: Tue Feb 2 14:11:23 2010 New Revision: 95118 URL: http://llvm.org/viewvc/llvm-project?rev=95118&view=rev Log: Renamed the ed directory to edis, as suggested yesterday. This eliminates possible confusion about what exactly in this directory; the name is still short, though. Added: llvm/trunk/tools/edis/ - copied from r95116, llvm/trunk/tools/ed/ Removed: llvm/trunk/tools/ed/ From scallanan at apple.com Tue Feb 2 14:20:30 2010 From: scallanan at apple.com (Sean Callanan) Date: Tue, 02 Feb 2010 20:20:30 -0000 Subject: [llvm-commits] [llvm] r95119 - /llvm/trunk/tools/Makefile Message-ID: <201002022020.o12KKUNU016135@zion.cs.uiuc.edu> Author: spyffe Date: Tue Feb 2 14:20:30 2010 New Revision: 95119 URL: http://llvm.org/viewvc/llvm-project?rev=95119&view=rev Log: ..and fixed the Makefile. Modified: llvm/trunk/tools/Makefile Modified: llvm/trunk/tools/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/Makefile?rev=95119&r1=95118&r2=95119&view=diff ============================================================================== --- llvm/trunk/tools/Makefile (original) +++ llvm/trunk/tools/Makefile Tue Feb 2 14:20:30 2010 @@ -22,7 +22,7 @@ lli llvm-extract \ bugpoint llvm-bcanalyzer llvm-stub \ llvm-mc llvmc \ - ed + edis # Let users override the set of tools to build from the command line. ifdef ONLY_TOOLS From sabre at nondot.org Tue Feb 2 14:41:39 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 20:41:39 -0000 Subject: [llvm-commits] [llvm] r95120 - /llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s Message-ID: <201002022041.o12KfdFS017021@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 14:41:39 2010 New Revision: 95120 URL: http://llvm.org/viewvc/llvm-project?rev=95120&view=rev Log: disable this test for now. Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s?rev=95120&r1=95119&r2=95120&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s Tue Feb 2 14:41:39 2010 @@ -5,6 +5,8 @@ // RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s +// XFAIL: * + // CHECK: movb $127, 3735928559(%ebx,%ecx,8) movb $0x7f,0xdeadbeef(%ebx,%ecx,8) From clattner at apple.com Tue Feb 2 14:42:22 2010 From: clattner at apple.com (Chris Lattner) Date: Tue, 2 Feb 2010 12:42:22 -0800 Subject: [llvm-commits] [llvm] r95107 - /llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s In-Reply-To: <201002021905.o12J5vl0012887@zion.cs.uiuc.edu> References: <201002021905.o12J5vl0012887@zion.cs.uiuc.edu> Message-ID: <895D2388-97F1-4A90-912E-4E04BED643A7@apple.com> On Feb 2, 2010, at 11:05 AM, Kevin Enderby wrote: > Author: enderby > Date: Tue Feb 2 13:05:57 2010 > New Revision: 95107 > > URL: http://llvm.org/viewvc/llvm-project?rev=95107&view=rev > Log: > Added another version of the X86 assembler matcher test case. > This test case is different subset of the full auto generated test > case, and a > larger subset that is in x86_32-bit.s (that set will encode > correctly). These > instructions can pass though llvm-mc as it were a logical cat(1) and > then > reassemble to the same instruction. It is useful as we bring up the > parser and > matcher so we don't break things that currently work. Hey Kevin, This test is failing with this error message: AsmParser/X86/x86_32-bit_cat.s:1265:11: error: expected string not found in input // CHECK: jmp 32493 # TAILCALL ^ :421:2: note: scanning from here jmp 32493 ^ :429:10: note: possible intended match here jmp *3135175374 # TAILCALL ^ I'm not sure exactly what's happening here, so I just disabled the test temporarily in r95120. -Chris From isanbard at gmail.com Tue Feb 2 14:56:02 2010 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 02 Feb 2010 20:56:02 -0000 Subject: [llvm-commits] [llvm] r95121 - /llvm/trunk/test/LLVMC/MultiplePluginPriorities.td Message-ID: <201002022056.o12Ku2Ie017826@zion.cs.uiuc.edu> Author: void Date: Tue Feb 2 14:56:02 2010 New Revision: 95121 URL: http://llvm.org/viewvc/llvm-project?rev=95121&view=rev Log: XFAIL for PPC Darwin. Modified: llvm/trunk/test/LLVMC/MultiplePluginPriorities.td Modified: llvm/trunk/test/LLVMC/MultiplePluginPriorities.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/MultiplePluginPriorities.td?rev=95121&r1=95120&r2=95121&view=diff ============================================================================== --- llvm/trunk/test/LLVMC/MultiplePluginPriorities.td (original) +++ llvm/trunk/test/LLVMC/MultiplePluginPriorities.td Tue Feb 2 14:56:02 2010 @@ -1,6 +1,9 @@ // Check that multiple plugin priorities are not allowed. // RUN: ignore tblgen -I %p/../../include --gen-llvmc %s |& grep "More than one 'PluginPriority' instance found" +// Disable for Darwin PPC: +// XFAIL: powerpc-apple-darwin + include "llvm/CompilerDriver/Common.td" def Graph : CompilationGraph<[]>; From dalej at apple.com Tue Feb 2 14:56:48 2010 From: dalej at apple.com (Dale Johannesen) Date: Tue, 2 Feb 2010 12:56:48 -0800 Subject: [llvm-commits] [llvm] r95109 - in /llvm/trunk: include/llvm/Target/TargetMachine.h lib/CodeGen/LLVMTargetMachine.cpp tools/llc/llc.cpp tools/lto/LTOCodeGenerator.cpp In-Reply-To: <201002021914.o12JESrx013274@zion.cs.uiuc.edu> References: <201002021914.o12JESrx013274@zion.cs.uiuc.edu> Message-ID: <585C9B7F-1101-481E-806B-5FA35A9584CB@apple.com> On Feb 2, 2010, at 11:14 AMPST, Chris Lattner wrote: > Author: lattner > Date: Tue Feb 2 13:14:27 2010 > New Revision: 95109 > > URL: http://llvm.org/viewvc/llvm-project?rev=95109&view=rev > Log: > eliminate all forms of addPassesToEmitMachineCode except > the one used by the JIT. Remove all forms of > addPassesToEmitFileFinish except the one used by the static > code generator. Inline the remaining version of > addPassesToEmitFileFinish into its only caller. llvm-gcc still uses addPassesToEmitFileFinish, so bootstrap fails. Is it right just to remove the call there as you did elsewhere? From sabre at nondot.org Tue Feb 2 14:57:28 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 20:57:28 -0000 Subject: [llvm-commits] [llvm] r95122 - /llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s Message-ID: <201002022057.o12KvTHq017895@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 14:57:28 2010 New Revision: 95122 URL: http://llvm.org/viewvc/llvm-project?rev=95122&view=rev Log: this apparently depends on the host somehow. Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s?rev=95122&r1=95121&r2=95122&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s Tue Feb 2 14:57:28 2010 @@ -3,9 +3,8 @@ // will not yet encode correctly. The subset that will encode correctly are in // the file x86_32-bit.s . -// RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s - -// XFAIL: * +// RUN: true +// llvm-mc -triple i386-unknown-unknown %s | FileCheck %s // CHECK: movb $127, 3735928559(%ebx,%ecx,8) movb $0x7f,0xdeadbeef(%ebx,%ecx,8) From kledzik at apple.com Tue Feb 2 15:03:34 2010 From: kledzik at apple.com (Nick Kledzik) Date: Tue, 02 Feb 2010 21:03:34 -0000 Subject: [llvm-commits] [compiler-rt] r95123 - /compiler-rt/trunk/make/platform/darwin_bni.mk Message-ID: <201002022103.o12L3YCV018157@zion.cs.uiuc.edu> Author: kledzik Date: Tue Feb 2 15:03:34 2010 New Revision: 95123 URL: http://llvm.org/viewvc/llvm-project?rev=95123&view=rev Log: add compiler options for B&I builds Modified: compiler-rt/trunk/make/platform/darwin_bni.mk Modified: compiler-rt/trunk/make/platform/darwin_bni.mk URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/platform/darwin_bni.mk?rev=95123&r1=95122&r2=95123&view=diff ============================================================================== --- compiler-rt/trunk/make/platform/darwin_bni.mk (original) +++ compiler-rt/trunk/make/platform/darwin_bni.mk Tue Feb 2 15:03:34 2010 @@ -8,6 +8,10 @@ # and the resulting lib will just have generic versions for anything unknown. UniversalArchs := $(RC_ARCHS) + +CFLAGS := -Wall -O3 -fomit-frame-pointer + + FUNCTIONS := absvdi2 absvsi2 addvdi3 addvsi3 ashldi3 ashrdi3 \ clzdi2 clzsi2 cmpdi2 ctzdi2 ctzsi2 \ divdc3 divdi3 divsc3 ffsdi2 \ From sabre at nondot.org Tue Feb 2 15:06:45 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 21:06:45 -0000 Subject: [llvm-commits] [llvm] r95124 - in /llvm/trunk: include/llvm/Target/TargetMachine.h lib/CodeGen/LLVMTargetMachine.cpp lib/Target/CBackend/CBackend.cpp lib/Target/CppBackend/CPPBackend.cpp lib/Target/MSIL/MSILWriter.cpp tools/llc/llc.cpp tools/lto/LTOCodeGenerator.cpp Message-ID: <201002022106.o12L6kXM018281@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 15:06:45 2010 New Revision: 95124 URL: http://llvm.org/viewvc/llvm-project?rev=95124&view=rev Log: eliminate FileModel::Model, just use CodeGenFileType. The client of the code generator shouldn't care what object format a target uses. Modified: llvm/trunk/include/llvm/Target/TargetMachine.h llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp llvm/trunk/lib/Target/CBackend/CBackend.cpp llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp llvm/trunk/lib/Target/MSIL/MSILWriter.cpp llvm/trunk/tools/llc/llc.cpp llvm/trunk/tools/lto/LTOCodeGenerator.cpp Modified: llvm/trunk/include/llvm/Target/TargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=95124&r1=95123&r2=95124&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetMachine.h (original) +++ llvm/trunk/include/llvm/Target/TargetMachine.h Tue Feb 2 15:06:45 2010 @@ -60,16 +60,6 @@ }; } -namespace FileModel { - enum Model { - Error, - None, - AsmFile, - MachOFile, - ElfFile - }; -} - // Code generation optimization level. namespace CodeGenOpt { enum Level { @@ -206,9 +196,13 @@ } /// CodeGenFileType - These enums are meant to be passed into - /// addPassesToEmitFile to indicate what type of file to emit. + /// addPassesToEmitFile to indicate what type of file to emit, and returned by + /// it to indicate what type of file could actually be made. enum CodeGenFileType { - AssemblyFile, ObjectFile, DynamicLibrary + CGFT_AssemblyFile, + CGFT_ObjectFile, + CGFT_DynamicLibrary, + CGFT_ErrorOccurred }; /// getEnableTailMergeDefault - the default setting for -enable-tail-merge @@ -218,14 +212,14 @@ /// addPassesToEmitFile - Add passes to the specified pass manager to get the /// specified file emitted. Typically this will involve several steps of code /// generation. - /// This method should return FileModel::Error if emission of this file type + /// This method should return InvalidFile if emission of this file type /// is not supported. /// - virtual FileModel::Model addPassesToEmitFile(PassManagerBase &, - formatted_raw_ostream &, - CodeGenFileType, - CodeGenOpt::Level) { - return FileModel::None; + virtual CodeGenFileType addPassesToEmitFile(PassManagerBase &, + formatted_raw_ostream &, + CodeGenFileType Filetype, + CodeGenOpt::Level) { + return CGFT_ErrorOccurred; } /// addPassesToEmitMachineCode - Add passes to the specified pass manager to @@ -271,19 +265,19 @@ /// addPassesToEmitFile - Add passes to the specified pass manager to get the /// specified file emitted. Typically this will involve several steps of code - /// generation. If OptLevel is None, the code generator should emit code as fast - /// as possible, though the generated code may be less efficient. This method - /// should return FileModel::Error if emission of this file type is not - /// supported. + /// generation. If OptLevel is None, the code generator should emit code as + /// fast as possible, though the generated code may be less efficient. This + /// method should return CGFT_ErrorOccurred if emission of this file type is + /// not supported. /// /// The default implementation of this method adds components from the /// LLVM retargetable code generator, invoking the methods below to get /// target-specific passes in standard locations. /// - virtual FileModel::Model addPassesToEmitFile(PassManagerBase &PM, - formatted_raw_ostream &Out, - CodeGenFileType FileType, - CodeGenOpt::Level); + virtual CodeGenFileType addPassesToEmitFile(PassManagerBase &PM, + formatted_raw_ostream &Out, + CodeGenFileType FileType, + CodeGenOpt::Level); /// addPassesToEmitMachineCode - Add passes to the specified pass manager to /// get machine code emitted. This uses a MachineCodeEmitter object to handle Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=95124&r1=95123&r2=95124&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Feb 2 15:06:45 2010 @@ -96,28 +96,25 @@ setCodeModel(CodeModel::Small); } -FileModel::Model +TargetMachine::CodeGenFileType LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM, formatted_raw_ostream &Out, CodeGenFileType FileType, CodeGenOpt::Level OptLevel) { // Add common CodeGen passes. if (addCommonCodeGenPasses(PM, OptLevel)) - return FileModel::Error; + return CGFT_ErrorOccurred; - FileModel::Model ResultTy; switch (FileType) { default: - return FileModel::Error; - case TargetMachine::ObjectFile: - return FileModel::Error; - case TargetMachine::AssemblyFile: { + case CGFT_ObjectFile: + return CGFT_ErrorOccurred; + case CGFT_AssemblyFile: { FunctionPass *Printer = getTarget().createAsmPrinter(Out, *this, getMCAsmInfo(), getAsmVerbosityDefault()); - if (Printer == 0) return FileModel::Error; + if (Printer == 0) return CGFT_ErrorOccurred; PM.add(Printer); - ResultTy = FileModel::AsmFile; break; } } @@ -125,7 +122,7 @@ // Make sure the code model is set. setCodeModelForStatic(); PM.add(createGCInfoDeleter()); - return ResultTy; + return FileType; } /// addPassesToEmitMachineCode - Add passes to the specified pass manager to Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=95124&r1=95123&r2=95124&view=diff ============================================================================== --- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original) +++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Tue Feb 2 15:06:45 2010 @@ -3706,7 +3706,7 @@ formatted_raw_ostream &o, CodeGenFileType FileType, CodeGenOpt::Level OptLevel) { - if (FileType != TargetMachine::AssemblyFile) return true; + if (FileType != TargetMachine::CGFT_AssemblyFile) return true; PM.add(createGCLoweringPass()); PM.add(createLowerInvokePass()); Modified: llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp?rev=95124&r1=95123&r2=95124&view=diff ============================================================================== --- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original) +++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Tue Feb 2 15:06:45 2010 @@ -2009,7 +2009,7 @@ formatted_raw_ostream &o, CodeGenFileType FileType, CodeGenOpt::Level OptLevel) { - if (FileType != TargetMachine::AssemblyFile) return true; + if (FileType != TargetMachine::CGFT_AssemblyFile) return true; PM.add(new CppWriter(o)); return false; } Modified: llvm/trunk/lib/Target/MSIL/MSILWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSIL/MSILWriter.cpp?rev=95124&r1=95123&r2=95124&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSIL/MSILWriter.cpp (original) +++ llvm/trunk/lib/Target/MSIL/MSILWriter.cpp Tue Feb 2 15:06:45 2010 @@ -1690,7 +1690,7 @@ CodeGenFileType FileType, CodeGenOpt::Level OptLevel) { - if (FileType != TargetMachine::AssemblyFile) return true; + if (FileType != TargetMachine::CGFT_AssemblyFile) return true; MSILWriter* Writer = new MSILWriter(o); PM.add(createGCLoweringPass()); // FIXME: Handle switch through native IL instruction "switch" Modified: llvm/trunk/tools/llc/llc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=95124&r1=95123&r2=95124&view=diff ============================================================================== --- llvm/trunk/tools/llc/llc.cpp (original) +++ llvm/trunk/tools/llc/llc.cpp Tue Feb 2 15:06:45 2010 @@ -85,14 +85,14 @@ cl::value_desc("a1,+a2,-a3,...")); cl::opt -FileType("filetype", cl::init(TargetMachine::AssemblyFile), +FileType("filetype", cl::init(TargetMachine::CGFT_AssemblyFile), cl::desc("Choose a file type (not all types are supported by all targets):"), cl::values( - clEnumValN(TargetMachine::AssemblyFile, "asm", + clEnumValN(TargetMachine::CGFT_AssemblyFile, "asm", "Emit an assembly ('.s') file"), - clEnumValN(TargetMachine::ObjectFile, "obj", + clEnumValN(TargetMachine::CGFT_ObjectFile, "obj", "Emit a native object ('.o') file [experimental]"), - clEnumValN(TargetMachine::DynamicLibrary, "dynlib", + clEnumValN(TargetMachine::CGFT_DynamicLibrary, "dynlib", "Emit a native dynamic library ('.so') file" " [experimental]"), clEnumValEnd)); @@ -162,7 +162,8 @@ bool Binary = false; switch (FileType) { - case TargetMachine::AssemblyFile: + default: assert(0 && "Unknown file type"); + case TargetMachine::CGFT_AssemblyFile: if (TargetName[0] == 'c') { if (TargetName[1] == 0) OutputFilename += ".cbe.c"; @@ -173,11 +174,11 @@ } else OutputFilename += ".s"; break; - case TargetMachine::ObjectFile: + case TargetMachine::CGFT_ObjectFile: OutputFilename += ".o"; Binary = true; break; - case TargetMachine::DynamicLibrary: + case TargetMachine::CGFT_DynamicLibrary: OutputFilename += LTDL_SHLIB_EXT; Binary = true; break; @@ -352,14 +353,14 @@ default: assert(0 && "Invalid file model!"); return 1; - case FileModel::Error: + case TargetMachine::CGFT_ErrorOccurred: errs() << argv[0] << ": target does not support generation of this" << " file type!\n"; if (Out != &fouts()) delete Out; // And the Out file is empty and useless, so remove it now. sys::Path(OutputFilename).eraseFromDisk(); return 1; - case FileModel::AsmFile: + case TargetMachine::CGFT_AssemblyFile: break; } Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOCodeGenerator.cpp?rev=95124&r1=95123&r2=95124&view=diff ============================================================================== --- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original) +++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Tue Feb 2 15:06:45 2010 @@ -396,9 +396,9 @@ codeGenPasses->add(new TargetData(*_target->getTargetData())); switch (_target->addPassesToEmitFile(*codeGenPasses, out, - TargetMachine::AssemblyFile, + TargetMachine::CGFT_AssemblyFile, CodeGenOpt::Aggressive)) { - case FileModel::AsmFile: + case TargetMachine::CGFT_AssemblyFile: break; default: errMsg = "target file type not supported"; From edwintorok at gmail.com Tue Feb 2 15:07:40 2010 From: edwintorok at gmail.com (=?ISO-8859-1?Q?T=F6r=F6k_Edwin?=) Date: Tue, 02 Feb 2010 23:07:40 +0200 Subject: [llvm-commits] llvm-config: explicit sourcefile deps for components Message-ID: <4B68941C.6080505@gmail.com> Hi, Attached is a patch I've been using for some time to output explicit source file deps for a particular component. It is a new flag for llvm-config. This info could also be used to see how to best split up existing llvm libs, remove unneeded dependencies, etc. I've also attached an example of how I use the new llvm-config flag (GenList.pl) in ClamAV. Best regards, --Edwin -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm-config.patch Type: text/x-diff Size: 10467 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100202/6c93989e/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: GenList.pl Type: text/x-perl Size: 2822 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100202/6c93989e/attachment-0001.bin From clattner at apple.com Tue Feb 2 15:09:56 2010 From: clattner at apple.com (Chris Lattner) Date: Tue, 2 Feb 2010 13:09:56 -0800 Subject: [llvm-commits] [llvm] r95109 - in /llvm/trunk: include/llvm/Target/TargetMachine.h lib/CodeGen/LLVMTargetMachine.cpp tools/llc/llc.cpp tools/lto/LTOCodeGenerator.cpp In-Reply-To: <585C9B7F-1101-481E-806B-5FA35A9584CB@apple.com> References: <201002021914.o12JESrx013274@zion.cs.uiuc.edu> <585C9B7F-1101-481E-806B-5FA35A9584CB@apple.com> Message-ID: <4F66BEA2-E452-4DD8-AF42-F48FD759DF06@apple.com> On Feb 2, 2010, at 12:56 PM, Dale Johannesen wrote: > > On Feb 2, 2010, at 11:14 AMPST, Chris Lattner wrote: > >> Author: lattner >> Date: Tue Feb 2 13:14:27 2010 >> New Revision: 95109 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=95109&view=rev >> Log: >> eliminate all forms of addPassesToEmitMachineCode except >> the one used by the JIT. Remove all forms of >> addPassesToEmitFileFinish except the one used by the static >> code generator. Inline the remaining version of >> addPassesToEmitFileFinish into its only caller. > > llvm-gcc still uses addPassesToEmitFileFinish, so bootstrap fails. Is > it right just to remove the call there as you did elsewhere? Doh, yes, I'll update llvm-gcc now. Sorry. -Chris From gohman at apple.com Tue Feb 2 15:10:27 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 02 Feb 2010 21:10:27 -0000 Subject: [llvm-commits] [llvm] r95126 - /llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Message-ID: <201002022110.o12LAR6e018417@zion.cs.uiuc.edu> Author: djg Date: Tue Feb 2 15:10:27 2010 New Revision: 95126 URL: http://llvm.org/viewvc/llvm-project?rev=95126&view=rev Log: Fix function names in comments. Thanks Duncan! Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=95126&r1=95125&r2=95126&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original) +++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Tue Feb 2 15:10:27 2010 @@ -459,15 +459,15 @@ /// const SCEV *getSizeOfExpr(const Type *AllocTy); - /// getSizeOfExpr - Return an expression for alignof on the given type. + /// getAlignOfExpr - Return an expression for alignof on the given type. /// const SCEV *getAlignOfExpr(const Type *AllocTy); - /// getSizeOfExpr - Return an expression for offsetof on the given field. + /// getOffsetOfExpr - Return an expression for offsetof on the given field. /// const SCEV *getOffsetOfExpr(const StructType *STy, unsigned FieldNo); - /// getSizeOfExpr - Return an expression for offsetof on the given field. + /// getOffsetOfExpr - Return an expression for offsetof on the given field. /// const SCEV *getOffsetOfExpr(const Type *CTy, Constant *FieldNo); From gohman at apple.com Tue Feb 2 15:11:22 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 02 Feb 2010 21:11:22 -0000 Subject: [llvm-commits] [llvm] r95127 - /llvm/trunk/include/llvm/ADT/DenseSet.h Message-ID: <201002022111.o12LBMmM018456@zion.cs.uiuc.edu> Author: djg Date: Tue Feb 2 15:11:22 2010 New Revision: 95127 URL: http://llvm.org/viewvc/llvm-project?rev=95127&view=rev Log: Make DenseSet's erase pass on the return value rather than swallowing it. Modified: llvm/trunk/include/llvm/ADT/DenseSet.h Modified: llvm/trunk/include/llvm/ADT/DenseSet.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseSet.h?rev=95127&r1=95126&r2=95127&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/DenseSet.h (original) +++ llvm/trunk/include/llvm/ADT/DenseSet.h Tue Feb 2 15:11:22 2010 @@ -41,8 +41,8 @@ return TheMap.count(V); } - void erase(const ValueT &V) { - TheMap.erase(V); + bool erase(const ValueT &V) { + return TheMap.erase(V); } DenseSet &operator=(const DenseSet &RHS) { From sabre at nondot.org Tue Feb 2 15:14:01 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 21:14:01 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r95129 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Message-ID: <201002022114.o12LE1ne018560@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 15:14:01 2010 New Revision: 95129 URL: http://llvm.org/viewvc/llvm-project?rev=95129&view=rev Log: update for recent api changes. Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=95129&r1=95128&r2=95129&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Tue Feb 2 15:14:01 2010 @@ -673,21 +673,14 @@ // Normal mode, emit a .s file by running the code generator. // Note, this also adds codegenerator level optimization passes. switch (TheTarget->addPassesToEmitFile(*PM, *AsmOutRawStream, - TargetMachine::AssemblyFile, + TargetMachine::CGFT_AssemblyFile, OptLevel)) { default: - case FileModel::Error: errs() << "Error interfacing to target machine!\n"; exit(1); - case FileModel::AsmFile: + case TargetMachine::CGFT_AssemblyFile: break; } - - if (TheTarget->addPassesToEmitFileFinish(*PM, (MachineCodeEmitter *)0, - OptLevel)) { - errs() << "Error interfacing to target machine!\n"; - exit(1); - } } if (HasPerFunctionPasses) { @@ -768,21 +761,14 @@ // Normal mode, emit a .s file by running the code generator. // Note, this also adds codegenerator level optimization passes. switch (TheTarget->addPassesToEmitFile(*PM, *AsmOutRawStream, - TargetMachine::AssemblyFile, + TargetMachine::CGFT_AssemblyFile, OptLevel)) { default: - case FileModel::Error: errs() << "Error interfacing to target machine!\n"; exit(1); - case FileModel::AsmFile: + case TargetMachine::CGFT_AssemblyFile: break; } - - if (TheTarget->addPassesToEmitFileFinish(*PM, (MachineCodeEmitter *)0, - OptLevel)) { - errs() << "Error interfacing to target machine!\n"; - exit(1); - } } } From evan.cheng at apple.com Tue Feb 2 15:29:11 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 02 Feb 2010 21:29:11 -0000 Subject: [llvm-commits] [llvm] r95130 - in /llvm/trunk: include/llvm/Target/ lib/CodeGen/SelectionDAG/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/Blackfin/ lib/Target/CellSPU/ lib/Target/MSP430/ lib/Target/Mips/ lib/Target/PIC16/ lib/Target/PowerPC/ lib/Target/Sparc/ lib/Target/SystemZ/ lib/Target/X86/ lib/Target/XCore/ Message-ID: <201002022129.o12LTC1l019128@zion.cs.uiuc.edu> Author: evancheng Date: Tue Feb 2 15:29:10 2010 New Revision: 95130 URL: http://llvm.org/viewvc/llvm-project?rev=95130&view=rev Log: Pass callsite return type to TargetLowering::LowerCall and use that to check sibcall eligibility. Modified: llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.h llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.cpp llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.h llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.cpp llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.h llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp llvm/trunk/lib/Target/Mips/MipsISelLowering.h llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp llvm/trunk/lib/Target/PowerPC/PPCISelLowering.h llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp llvm/trunk/lib/Target/Sparc/SparcISelLowering.h llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.h llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.h llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp llvm/trunk/lib/Target/XCore/XCoreISelLowering.h Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Tue Feb 2 15:29:10 2010 @@ -1168,7 +1168,7 @@ /// InVals array with legal-type return values from the call, and return /// the resulting token chain value. virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, + LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Tue Feb 2 15:29:10 2010 @@ -5735,7 +5735,7 @@ } SmallVector InVals; - Chain = LowerCall(Chain, Callee, CallConv, isVarArg, isTailCall, + Chain = LowerCall(Chain, Callee, RetTy, CallConv, isVarArg, isTailCall, Outs, Ins, dl, DAG, InVals); // Verify that the target's LowerCall behaved as expected. Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Feb 2 15:29:10 2010 @@ -895,7 +895,7 @@ /// ARMISD:CALL <- callseq_end chain. Also add input and output parameter /// nodes. SDValue -ARMTargetLowering::LowerCall(SDValue Chain, SDValue Callee, +ARMTargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Tue Feb 2 15:29:10 2010 @@ -317,7 +317,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, + LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp Tue Feb 2 15:29:10 2010 @@ -219,7 +219,7 @@ #include "AlphaGenCallingConv.inc" SDValue -AlphaTargetLowering::LowerCall(SDValue Chain, SDValue Callee, +AlphaTargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h (original) +++ llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h Tue Feb 2 15:29:10 2010 @@ -120,7 +120,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, + LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.cpp?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.cpp Tue Feb 2 15:29:10 2010 @@ -272,6 +272,7 @@ SDValue BlackfinTargetLowering::LowerCall(SDValue Chain, SDValue Callee, + const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.h?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.h (original) +++ llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.h Tue Feb 2 15:29:10 2010 @@ -63,7 +63,7 @@ DebugLoc dl, SelectionDAG &DAG, SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, + LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp Tue Feb 2 15:29:10 2010 @@ -1138,7 +1138,7 @@ } SDValue -SPUTargetLowering::LowerCall(SDValue Chain, SDValue Callee, +SPUTargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h Tue Feb 2 15:29:10 2010 @@ -156,7 +156,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, + LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.cpp?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.cpp Tue Feb 2 15:29:10 2010 @@ -271,7 +271,7 @@ } SDValue -MSP430TargetLowering::LowerCall(SDValue Chain, SDValue Callee, +MSP430TargetLowering::LowerCall(SDValue Chain, SDValue Callee,const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.h?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.h (original) +++ llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.h Tue Feb 2 15:29:10 2010 @@ -153,7 +153,7 @@ DebugLoc dl, SelectionDAG &DAG, SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, + LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Tue Feb 2 15:29:10 2010 @@ -684,7 +684,7 @@ /// (physical regs)/(stack frame), CALLSEQ_START and CALLSEQ_END are emitted. /// TODO: isVarArg, isTailCall. SDValue -MipsTargetLowering::LowerCall(SDValue Chain, SDValue Callee, +MipsTargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.h?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelLowering.h (original) +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.h Tue Feb 2 15:29:10 2010 @@ -116,7 +116,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, + LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp Tue Feb 2 15:29:10 2010 @@ -1353,7 +1353,7 @@ } SDValue -PIC16TargetLowering::LowerCall(SDValue Chain, SDValue Callee, +PIC16TargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h Tue Feb 2 15:29:10 2010 @@ -142,7 +142,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, + LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Tue Feb 2 15:29:10 2010 @@ -2674,7 +2674,7 @@ } SDValue -PPCTargetLowering::LowerCall(SDValue Chain, SDValue Callee, +PPCTargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.h?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.h (original) +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.h Tue Feb 2 15:29:10 2010 @@ -430,7 +430,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, + LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp Tue Feb 2 15:29:10 2010 @@ -250,7 +250,7 @@ } SDValue -SparcTargetLowering::LowerCall(SDValue Chain, SDValue Callee, +SparcTargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/Sparc/SparcISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcISelLowering.h?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcISelLowering.h (original) +++ llvm/trunk/lib/Target/Sparc/SparcISelLowering.h Tue Feb 2 15:29:10 2010 @@ -85,7 +85,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, + LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp (original) +++ llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp Tue Feb 2 15:29:10 2010 @@ -249,6 +249,7 @@ SDValue SystemZTargetLowering::LowerCall(SDValue Chain, SDValue Callee, + const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.h?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.h (original) +++ llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.h Tue Feb 2 15:29:10 2010 @@ -124,7 +124,7 @@ DebugLoc dl, SelectionDAG &DAG, SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, + LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Feb 2 15:29:10 2010 @@ -1778,7 +1778,7 @@ } SDValue -X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee, +X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, @@ -1791,8 +1791,8 @@ if (isTailCall) // Check if it's really possible to do a tail call. - isTailCall = IsEligibleForTailCallOptimization(Callee, CallConv, isVarArg, - Outs, Ins, DAG); + isTailCall = IsEligibleForTailCallOptimization(Callee, RetTy, CallConv, + isVarArg, Outs, Ins, DAG); assert(!(isVarArg && CallConv == CallingConv::Fast) && "Var args not supported with calling convention fastcc"); @@ -2247,6 +2247,7 @@ /// optimization should implement this function. bool X86TargetLowering::IsEligibleForTailCallOptimization(SDValue Callee, + const Type *RetTy, CallingConv::ID CalleeCC, bool isVarArg, const SmallVectorImpl &Outs, @@ -2328,14 +2329,7 @@ return true; // If the return types match, then it's safe. - // Don't tail call optimize recursive call. - GlobalAddressSDNode *G = dyn_cast(Callee); - if (!G) return false; // FIXME: common external symbols? - if (const Function *CalleeF = dyn_cast(G->getGlobal())) { - const Type *CalleeRetTy = CalleeF->getReturnType(); - return CallerRetTy == CalleeRetTy; - } - return false; + return CallerRetTy == RetTy; } FastISel * Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Tue Feb 2 15:29:10 2010 @@ -627,7 +627,7 @@ /// IsEligibleForTailCallOptimization - Check whether the call is eligible /// for tail call optimization. Targets which want to do tail call /// optimization should implement this function. - bool IsEligibleForTailCallOptimization(SDValue Callee, + bool IsEligibleForTailCallOptimization(SDValue Callee, const Type *RetTy, CallingConv::ID CalleeCC, bool isVarArg, const SmallVectorImpl &Outs, @@ -707,7 +707,7 @@ DebugLoc dl, SelectionDAG &DAG, SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, + LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp Tue Feb 2 15:29:10 2010 @@ -609,7 +609,7 @@ /// XCore call implementation SDValue -XCoreTargetLowering::LowerCall(SDValue Chain, SDValue Callee, +XCoreTargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/XCore/XCoreISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelLowering.h?rev=95130&r1=95129&r2=95130&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreISelLowering.h (original) +++ llvm/trunk/lib/Target/XCore/XCoreISelLowering.h Tue Feb 2 15:29:10 2010 @@ -147,7 +147,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, + LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, From sabre at nondot.org Tue Feb 2 15:31:48 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 21:31:48 -0000 Subject: [llvm-commits] [llvm] r95131 - in /llvm/trunk: include/llvm/Target/TargetMachine.h lib/Target/ARM/ARMTargetMachine.cpp lib/Target/ARM/ARMTargetMachine.h lib/Target/Alpha/Alpha.h lib/Target/Alpha/AlphaCodeEmitter.cpp lib/Target/Alpha/AlphaTargetMachine.cpp lib/Target/Alpha/AlphaTargetMachine.h lib/Target/PowerPC/PPCTargetMachine.cpp lib/Target/PowerPC/PPCTargetMachine.h lib/Target/X86/X86TargetMachine.cpp lib/Target/X86/X86TargetMachine.h Message-ID: <201002022131.o12LVm8N019300@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 15:31:47 2010 New Revision: 95131 URL: http://llvm.org/viewvc/llvm-project?rev=95131&view=rev Log: eliminate all the dead addSimpleCodeEmitter implementations. eliminate random "code emitter" stuff in Alpha, except for the JIT path. Next up, remove the template cruft. Modified: llvm/trunk/include/llvm/Target/TargetMachine.h llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp llvm/trunk/lib/Target/ARM/ARMTargetMachine.h llvm/trunk/lib/Target/Alpha/Alpha.h llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.h llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h llvm/trunk/lib/Target/X86/X86TargetMachine.cpp llvm/trunk/lib/Target/X86/X86TargetMachine.h Modified: llvm/trunk/include/llvm/Target/TargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=95131&r1=95130&r2=95131&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetMachine.h (original) +++ llvm/trunk/include/llvm/Target/TargetMachine.h Tue Feb 2 15:31:47 2010 @@ -333,42 +333,10 @@ /// code emitter, if supported. If this is not supported, 'true' should be /// returned. virtual bool addCodeEmitter(PassManagerBase &, CodeGenOpt::Level, - MachineCodeEmitter &) { - return true; - } - - /// addCodeEmitter - This pass should be overridden by the target to add a - /// code emitter, if supported. If this is not supported, 'true' should be - /// returned. - virtual bool addCodeEmitter(PassManagerBase &, CodeGenOpt::Level, JITCodeEmitter &) { return true; } - /// addSimpleCodeEmitter - This pass should be overridden by the target to add - /// a code emitter (without setting flags), if supported. If this is not - /// supported, 'true' should be returned. - virtual bool addSimpleCodeEmitter(PassManagerBase &, CodeGenOpt::Level, - MachineCodeEmitter &) { - return true; - } - - /// addSimpleCodeEmitter - This pass should be overridden by the target to add - /// a code emitter (without setting flags), if supported. If this is not - /// supported, 'true' should be returned. - virtual bool addSimpleCodeEmitter(PassManagerBase &, CodeGenOpt::Level, - JITCodeEmitter &) { - return true; - } - - /// addSimpleCodeEmitter - This pass should be overridden by the target to add - /// a code emitter (without setting flags), if supported. If this is not - /// supported, 'true' should be returned. - virtual bool addSimpleCodeEmitter(PassManagerBase &, CodeGenOpt::Level, - ObjectCodeEmitter &) { - return true; - } - /// getEnableTailMergeDefault - the default setting for -enable-tail-merge /// on this target. User flag overrides. virtual bool getEnableTailMergeDefault() const { return true; } Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp?rev=95131&r1=95130&r2=95131&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp Tue Feb 2 15:31:47 2010 @@ -166,28 +166,3 @@ PM.add(createARMObjectCodeEmitterPass(*this, OCE)); return false; } - -bool ARMBaseTargetMachine::addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE) { - // Machine code emitter pass for ARM. - PM.add(createARMCodeEmitterPass(*this, MCE)); - return false; -} - -bool ARMBaseTargetMachine::addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - JITCodeEmitter &JCE) { - // Machine code emitter pass for ARM. - PM.add(createARMJITCodeEmitterPass(*this, JCE)); - return false; -} - -bool ARMBaseTargetMachine::addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &OCE) { - // Machine code emitter pass for ARM. - PM.add(createARMObjectCodeEmitterPass(*this, OCE)); - return false; -} - Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.h?rev=95131&r1=95130&r2=95131&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMTargetMachine.h (original) +++ llvm/trunk/lib/Target/ARM/ARMTargetMachine.h Tue Feb 2 15:31:47 2010 @@ -58,15 +58,6 @@ JITCodeEmitter &MCE); virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, ObjectCodeEmitter &OCE); - virtual bool addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE); - virtual bool addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - JITCodeEmitter &MCE); - virtual bool addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &OCE); }; /// ARMTargetMachine - ARM target machine. Modified: llvm/trunk/lib/Target/Alpha/Alpha.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/Alpha.h?rev=95131&r1=95130&r2=95131&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/Alpha.h (original) +++ llvm/trunk/lib/Target/Alpha/Alpha.h Tue Feb 2 15:31:47 2010 @@ -21,18 +21,12 @@ class AlphaTargetMachine; class FunctionPass; - class MachineCodeEmitter; - class ObjectCodeEmitter; class formatted_raw_ostream; FunctionPass *createAlphaISelDag(AlphaTargetMachine &TM); FunctionPass *createAlphaPatternInstructionSelector(TargetMachine &TM); - FunctionPass *createAlphaCodeEmitterPass(AlphaTargetMachine &TM, - MachineCodeEmitter &MCE); FunctionPass *createAlphaJITCodeEmitterPass(AlphaTargetMachine &TM, JITCodeEmitter &JCE); - FunctionPass *createAlphaObjectCodeEmitterPass(AlphaTargetMachine &TM, - ObjectCodeEmitter &OCE); FunctionPass *createAlphaLLRPPass(AlphaTargetMachine &tm); FunctionPass *createAlphaBranchSelectionPass(); Modified: llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp?rev=95131&r1=95130&r2=95131&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp Tue Feb 2 15:31:47 2010 @@ -17,9 +17,7 @@ #include "AlphaRelocations.h" #include "Alpha.h" #include "llvm/PassManager.h" -#include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/CodeGen/JITCodeEmitter.h" -#include "llvm/CodeGen/ObjectCodeEmitter.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/Passes.h" @@ -81,19 +79,10 @@ /// createAlphaCodeEmitterPass - Return a pass that emits the collected Alpha /// code to the specified MCE object. -FunctionPass *llvm::createAlphaCodeEmitterPass(AlphaTargetMachine &TM, - MachineCodeEmitter &MCE) { - return new Emitter(TM, MCE); -} - FunctionPass *llvm::createAlphaJITCodeEmitterPass(AlphaTargetMachine &TM, JITCodeEmitter &JCE) { return new Emitter(TM, JCE); } -FunctionPass *llvm::createAlphaObjectCodeEmitterPass(AlphaTargetMachine &TM, - ObjectCodeEmitter &OCE) { - return new Emitter(TM, OCE); -} template bool Emitter::runOnMachineFunction(MachineFunction &MF) { Modified: llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp?rev=95131&r1=95130&r2=95131&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp Tue Feb 2 15:31:47 2010 @@ -55,35 +55,7 @@ } bool AlphaTargetMachine::addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE) { - PM.add(createAlphaCodeEmitterPass(*this, MCE)); - return false; -} -bool AlphaTargetMachine::addCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, JITCodeEmitter &JCE) { PM.add(createAlphaJITCodeEmitterPass(*this, JCE)); return false; } -bool AlphaTargetMachine::addCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &OCE) { - PM.add(createAlphaObjectCodeEmitterPass(*this, OCE)); - return false; -} -bool AlphaTargetMachine::addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE) { - return addCodeEmitter(PM, OptLevel, MCE); -} -bool AlphaTargetMachine::addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - JITCodeEmitter &JCE) { - return addCodeEmitter(PM, OptLevel, JCE); -} -bool AlphaTargetMachine::addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &OCE) { - return addCodeEmitter(PM, OptLevel, OCE); -} - Modified: llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.h?rev=95131&r1=95130&r2=95131&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.h (original) +++ llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.h Tue Feb 2 15:31:47 2010 @@ -56,20 +56,7 @@ virtual bool addInstSelector(PassManagerBase &PM, CodeGenOpt::Level OptLevel); virtual bool addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel); virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE); - virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, JITCodeEmitter &JCE); - virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &JCE); - virtual bool addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE); - virtual bool addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - JITCodeEmitter &JCE); - virtual bool addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &OCE); }; } // end namespace llvm Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp?rev=95131&r1=95130&r2=95131&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Tue Feb 2 15:31:47 2010 @@ -170,30 +170,6 @@ return false; } -bool PPCTargetMachine::addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE) { - // Machine code emitter pass for PowerPC. - PM.add(createPPCCodeEmitterPass(*this, MCE)); - return false; -} - -bool PPCTargetMachine::addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - JITCodeEmitter &JCE) { - // Machine code emitter pass for PowerPC. - PM.add(createPPCJITCodeEmitterPass(*this, JCE)); - return false; -} - -bool PPCTargetMachine::addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &OCE) { - // Machine code emitter pass for PowerPC. - PM.add(createPPCObjectCodeEmitterPass(*this, OCE)); - return false; -} - /// getLSDAEncoding - Returns the LSDA pointer encoding. The choices are 4-byte, /// 8-byte, and target default. The CIE is hard-coded to indicate that the LSDA /// pointer in the FDE section is an "sdata4", and should be encoded as a 4-byte Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h?rev=95131&r1=95130&r2=95131&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h (original) +++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h Tue Feb 2 15:31:47 2010 @@ -78,15 +78,6 @@ JITCodeEmitter &JCE); virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, ObjectCodeEmitter &OCE); - virtual bool addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE); - virtual bool addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - JITCodeEmitter &JCE); - virtual bool addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &OCE); virtual bool getEnableTailMergeDefault() const; }; Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=95131&r1=95130&r2=95131&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original) +++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Tue Feb 2 15:31:47 2010 @@ -206,27 +206,6 @@ return false; } -bool X86TargetMachine::addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE) { - PM.add(createX86CodeEmitterPass(*this, MCE)); - return false; -} - -bool X86TargetMachine::addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - JITCodeEmitter &JCE) { - PM.add(createX86JITCodeEmitterPass(*this, JCE)); - return false; -} - -bool X86TargetMachine::addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &OCE) { - PM.add(createX86ObjectCodeEmitterPass(*this, OCE)); - return false; -} - void X86TargetMachine::setCodeModelForStatic() { if (getCodeModel() != CodeModel::Default) return; Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.h?rev=95131&r1=95130&r2=95131&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86TargetMachine.h (original) +++ llvm/trunk/lib/Target/X86/X86TargetMachine.h Tue Feb 2 15:31:47 2010 @@ -84,15 +84,6 @@ JITCodeEmitter &JCE); virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, ObjectCodeEmitter &OCE); - virtual bool addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE); - virtual bool addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - JITCodeEmitter &JCE); - virtual bool addSimpleCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &OCE); }; /// X86_32TargetMachine - X86 32-bit target machine. From kledzik at apple.com Tue Feb 2 15:34:04 2010 From: kledzik at apple.com (Nick Kledzik) Date: Tue, 02 Feb 2010 21:34:04 -0000 Subject: [llvm-commits] [compiler-rt] r95132 - in /compiler-rt/trunk: lib/arm/sync_synchronize.S make/platform/darwin_bni.mk Message-ID: <201002022134.o12LY4JO019389@zion.cs.uiuc.edu> Author: kledzik Date: Tue Feb 2 15:34:04 2010 New Revision: 95132 URL: http://llvm.org/viewvc/llvm-project?rev=95132&view=rev Log: add __sync_synchronize. Needed by compiler when emitting thumb1 with -fno-builtin Added: compiler-rt/trunk/lib/arm/sync_synchronize.S Modified: compiler-rt/trunk/make/platform/darwin_bni.mk Added: compiler-rt/trunk/lib/arm/sync_synchronize.S URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/arm/sync_synchronize.S?rev=95132&view=auto ============================================================================== --- compiler-rt/trunk/lib/arm/sync_synchronize.S (added) +++ compiler-rt/trunk/lib/arm/sync_synchronize.S Tue Feb 2 15:34:04 2010 @@ -0,0 +1,33 @@ +//===-- sync_synchronize - Implement memory barrier * ----------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "../assembly.h" + +// +// When compiling a use of the gcc built-in __sync_synchronize() in thumb1 mode +// the compiler may emit a call to __sync_synchronize. +// On Darwin the implementation jumps to an OS supplied function named +// OSMemoryBarrier +// + + .text + .syntax unified + +#if __APPLE__ + +DEFINE_COMPILERRT_PRIVATE_FUNCTION(__sync_synchronize) + stmfd sp!, {r7, lr} + add r7, sp, #0 + bl _OSMemoryBarrier + ldmfd sp!, {r7, pc} + + // tell linker it can break up file at label boundaries + .subsections_via_symbols + +#endif Modified: compiler-rt/trunk/make/platform/darwin_bni.mk URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/platform/darwin_bni.mk?rev=95132&r1=95131&r2=95132&view=diff ============================================================================== --- compiler-rt/trunk/make/platform/darwin_bni.mk (original) +++ compiler-rt/trunk/make/platform/darwin_bni.mk Tue Feb 2 15:34:04 2010 @@ -54,6 +54,7 @@ subdf3vfp subsf3vfp truncdfsf2vfp unorddf2vfp unordsf2vfp \ modsi3 umodsi3 udivsi3 divsi3 \ switch8 switchu8 switch16 switch32 \ - restore_vfp_d8_d15_regs save_vfp_d8_d15_regs + restore_vfp_d8_d15_regs save_vfp_d8_d15_regs \ + sync_synchronize VISIBILITY_HIDDEN := 0 From gohman at apple.com Tue Feb 2 15:34:55 2010 From: gohman at apple.com (Dan Gohman) Date: Tue, 2 Feb 2010 13:34:55 -0800 Subject: [llvm-commits] [llvm] r95130 - in /llvm/trunk: include/llvm/Target/ lib/CodeGen/SelectionDAG/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/Blackfin/ lib/Target/CellSPU/ lib/Target/MSP430/ lib/Target/Mips/ lib/Target/PIC16/ lib/Target/PowerPC/ lib/Target/Sparc/ lib/Target/SystemZ/ lib/Target/X86/ lib/Target/XCore/ In-Reply-To: <201002022129.o12LTC1l019128@zion.cs.uiuc.edu> References: <201002022129.o12LTC1l019128@zion.cs.uiuc.edu> Message-ID: On Feb 2, 2010, at 1:29 PM, Evan Cheng wrote: > > return true; > > // If the return types match, then it's safe. > - // Don't tail call optimize recursive call. > - GlobalAddressSDNode *G = dyn_cast(Callee); > - if (!G) return false; // FIXME: common external symbols? > - if (const Function *CalleeF = dyn_cast(G->getGlobal())) { > - const Type *CalleeRetTy = CalleeF->getReturnType(); > - return CallerRetTy == CalleeRetTy; > - } > - return false; > + return CallerRetTy == RetTy; Hi Evan, This condition is already checked by target-independent code -- see isInTailCallPosition in SelectionDAGBuilder.cpp -- so target-specific code shouldn't need to worry about it. Dan From sabre at nondot.org Tue Feb 2 15:35:47 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 21:35:47 -0000 Subject: [llvm-commits] [llvm] r95133 - /llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp Message-ID: <201002022135.o12LZl5g019459@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 15:35:47 2010 New Revision: 95133 URL: http://llvm.org/viewvc/llvm-project?rev=95133&view=rev Log: detemplatize alpha code emission, it is now JIT specific. Modified: llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp Modified: llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp?rev=95133&r1=95132&r2=95133&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp Tue Feb 2 15:35:47 2010 @@ -28,11 +28,14 @@ using namespace llvm; namespace { - - class AlphaCodeEmitter { - MachineCodeEmitter &MCE; + class AlphaCodeEmitter : public MachineFunctionPass { + JITCodeEmitter &MCE; + const AlphaInstrInfo *II; public: - AlphaCodeEmitter(MachineCodeEmitter &mce) : MCE(mce) {} + static char ID; + + AlphaCodeEmitter(JITCodeEmitter &mce) : MachineFunctionPass(&ID), + MCE(mce) {} /// getBinaryCodeForInstr - This function, generated by the /// CodeEmitterGenerator using TableGen, produces the binary encoding for @@ -44,36 +47,16 @@ unsigned getMachineOpValue(const MachineInstr &MI, const MachineOperand &MO); - }; - - template - class Emitter : public MachineFunctionPass, public AlphaCodeEmitter - { - const AlphaInstrInfo *II; - TargetMachine &TM; - CodeEmitter &MCE; - - public: - static char ID; - explicit Emitter(TargetMachine &tm, CodeEmitter &mce) - : MachineFunctionPass(&ID), AlphaCodeEmitter(mce), - II(0), TM(tm), MCE(mce) {} - Emitter(TargetMachine &tm, CodeEmitter &mce, const AlphaInstrInfo& ii) - : MachineFunctionPass(&ID), AlphaCodeEmitter(mce), - II(&ii), TM(tm), MCE(mce) {} - + bool runOnMachineFunction(MachineFunction &MF); - + virtual const char *getPassName() const { return "Alpha Machine Code Emitter"; } - + private: void emitBasicBlock(MachineBasicBlock &MBB); }; - - template - char Emitter::ID = 0; } /// createAlphaCodeEmitterPass - Return a pass that emits the collected Alpha @@ -81,11 +64,10 @@ FunctionPass *llvm::createAlphaJITCodeEmitterPass(AlphaTargetMachine &TM, JITCodeEmitter &JCE) { - return new Emitter(TM, JCE); + return new AlphaCodeEmitter(JCE); } -template -bool Emitter::runOnMachineFunction(MachineFunction &MF) { +bool AlphaCodeEmitter::runOnMachineFunction(MachineFunction &MF) { II = ((AlphaTargetMachine&)MF.getTarget()).getInstrInfo(); do { @@ -97,8 +79,7 @@ return false; } -template -void Emitter::emitBasicBlock(MachineBasicBlock &MBB) { +void AlphaCodeEmitter::emitBasicBlock(MachineBasicBlock &MBB) { MCE.StartMachineBasicBlock(&MBB); for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); I != E; ++I) { From sabre at nondot.org Tue Feb 2 15:38:59 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 21:38:59 -0000 Subject: [llvm-commits] [llvm] r95134 - in /llvm/trunk/lib/Target/ARM: ARM.h ARMCodeEmitter.cpp ARMTargetMachine.cpp ARMTargetMachine.h Message-ID: <201002022139.o12Ld0Mr019587@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 15:38:59 2010 New Revision: 95134 URL: http://llvm.org/viewvc/llvm-project?rev=95134&view=rev Log: remove dead code. Modified: llvm/trunk/lib/Target/ARM/ARM.h llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp llvm/trunk/lib/Target/ARM/ARMTargetMachine.h Modified: llvm/trunk/lib/Target/ARM/ARM.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARM.h?rev=95134&r1=95133&r2=95134&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARM.h (original) +++ llvm/trunk/lib/Target/ARM/ARM.h Tue Feb 2 15:38:59 2010 @@ -95,12 +95,8 @@ FunctionPass *createARMISelDag(ARMBaseTargetMachine &TM, CodeGenOpt::Level OptLevel); -FunctionPass *createARMCodeEmitterPass(ARMBaseTargetMachine &TM, - MachineCodeEmitter &MCE); FunctionPass *createARMJITCodeEmitterPass(ARMBaseTargetMachine &TM, JITCodeEmitter &JCE); -FunctionPass *createARMObjectCodeEmitterPass(ARMBaseTargetMachine &TM, - ObjectCodeEmitter &OCE); FunctionPass *createARMLoadStoreOptimizationPass(bool PreAlloc = false); FunctionPass *createARMExpandPseudoPass(); Modified: llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp?rev=95134&r1=95133&r2=95134&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp Tue Feb 2 15:38:59 2010 @@ -180,21 +180,12 @@ char Emitter::ID = 0; } -/// createARMCodeEmitterPass - Return a pass that emits the collected ARM code -/// to the specified MCE object. - -FunctionPass *llvm::createARMCodeEmitterPass(ARMBaseTargetMachine &TM, - MachineCodeEmitter &MCE) { - return new Emitter(TM, MCE); -} +/// createARMJITCodeEmitterPass - Return a pass that emits the collected ARM +/// code to the specified MCE object. FunctionPass *llvm::createARMJITCodeEmitterPass(ARMBaseTargetMachine &TM, JITCodeEmitter &JCE) { return new Emitter(TM, JCE); } -FunctionPass *llvm::createARMObjectCodeEmitterPass(ARMBaseTargetMachine &TM, - ObjectCodeEmitter &OCE) { - return new Emitter(TM, OCE); -} template bool Emitter::runOnMachineFunction(MachineFunction &MF) { Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp?rev=95134&r1=95133&r2=95134&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp Tue Feb 2 15:38:59 2010 @@ -133,18 +133,6 @@ bool ARMBaseTargetMachine::addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE) { - // FIXME: Move this to TargetJITInfo! - if (DefRelocModel == Reloc::Default) - setRelocationModel(Reloc::Static); - - // Machine code emitter pass for ARM. - PM.add(createARMCodeEmitterPass(*this, MCE)); - return false; -} - -bool ARMBaseTargetMachine::addCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, JITCodeEmitter &JCE) { // FIXME: Move this to TargetJITInfo! if (DefRelocModel == Reloc::Default) @@ -154,15 +142,3 @@ PM.add(createARMJITCodeEmitterPass(*this, JCE)); return false; } - -bool ARMBaseTargetMachine::addCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &OCE) { - // FIXME: Move this to TargetJITInfo! - if (DefRelocModel == Reloc::Default) - setRelocationModel(Reloc::Static); - - // Machine code emitter pass for ARM. - PM.add(createARMObjectCodeEmitterPass(*this, OCE)); - return false; -} Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.h?rev=95134&r1=95133&r2=95134&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMTargetMachine.h (original) +++ llvm/trunk/lib/Target/ARM/ARMTargetMachine.h Tue Feb 2 15:38:59 2010 @@ -53,11 +53,7 @@ virtual bool addPreSched2(PassManagerBase &PM, CodeGenOpt::Level OptLevel); virtual bool addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel); virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE); - virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, JITCodeEmitter &MCE); - virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &OCE); }; /// ARMTargetMachine - ARM target machine. From daniel at zuster.org Tue Feb 2 15:44:02 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 02 Feb 2010 21:44:02 -0000 Subject: [llvm-commits] [llvm] r95135 - in /llvm/trunk: include/llvm/MC/MCAssembler.h lib/MC/MCAssembler.cpp lib/MC/MCMachOStreamer.cpp test/MC/MachO/section-flags.s Message-ID: <201002022144.o12Li2ht019776@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Feb 2 15:44:01 2010 New Revision: 95135 URL: http://llvm.org/viewvc/llvm-project?rev=95135&view=rev Log: MC/Mach-O: Set SOME_INSTRUCTIONS bit for sections. Added: llvm/trunk/test/MC/MachO/section-flags.s Modified: llvm/trunk/include/llvm/MC/MCAssembler.h llvm/trunk/lib/MC/MCAssembler.cpp llvm/trunk/lib/MC/MCMachOStreamer.cpp Modified: llvm/trunk/include/llvm/MC/MCAssembler.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAssembler.h?rev=95135&r1=95134&r2=95135&view=diff ============================================================================== --- llvm/trunk/include/llvm/MC/MCAssembler.h (original) +++ llvm/trunk/include/llvm/MC/MCAssembler.h Tue Feb 2 15:44:01 2010 @@ -348,7 +348,11 @@ /// Fixups - The list of fixups in this section. std::vector Fixups; - + + /// HasInstructions - Whether this section has had instructions emitted into + /// it. + unsigned HasInstructions : 1; + /// @} public: @@ -429,6 +433,9 @@ } void setFileSize(uint64_t Value) { FileSize = Value; } + bool hasInstructions() const { return HasInstructions; } + void setHasInstructions(bool Value) { HasInstructions = Value; } + /// @} }; Modified: llvm/trunk/lib/MC/MCAssembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAssembler.cpp?rev=95135&r1=95134&r2=95135&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCAssembler.cpp (original) +++ llvm/trunk/lib/MC/MCAssembler.cpp Tue Feb 2 15:44:01 2010 @@ -266,11 +266,15 @@ Write32(SD.getSize()); // size Write32(FileOffset); + unsigned Flags = Section.getTypeAndAttributes(); + if (SD.hasInstructions()) + Flags |= MCSectionMachO::S_ATTR_SOME_INSTRUCTIONS; + assert(isPowerOf2_32(SD.getAlignment()) && "Invalid alignment!"); Write32(Log2_32(SD.getAlignment())); Write32(NumRelocations ? RelocationsStart : 0); Write32(NumRelocations); - Write32(Section.getTypeAndAttributes()); + Write32(Flags); Write32(0); // reserved1 Write32(Section.getStubSize()); // reserved2 @@ -901,7 +905,8 @@ Address(~UINT64_C(0)), Size(~UINT64_C(0)), FileSize(~UINT64_C(0)), - LastFixupLookup(~0) + LastFixupLookup(~0), + HasInstructions(false) { if (A) A->getSectionList().push_back(this); Modified: llvm/trunk/lib/MC/MCMachOStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCMachOStreamer.cpp?rev=95135&r1=95134&r2=95135&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCMachOStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCMachOStreamer.cpp Tue Feb 2 15:44:01 2010 @@ -362,8 +362,8 @@ if (!Emitter) llvm_unreachable("no code emitter available!"); - // FIXME: Emitting an instruction should cause S_ATTR_SOME_INSTRUCTIONS to - // be set for the current section. + CurSectionData->setHasInstructions(true); + // FIXME: Relocations! SmallString<256> Code; raw_svector_ostream VecOS(Code); Added: llvm/trunk/test/MC/MachO/section-flags.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/section-flags.s?rev=95135&view=auto ============================================================================== --- llvm/trunk/test/MC/MachO/section-flags.s (added) +++ llvm/trunk/test/MC/MachO/section-flags.s Tue Feb 2 15:44:01 2010 @@ -0,0 +1,14 @@ +// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s +// +// CHECK: # Section 0 +// CHECK: 'section_name', '__text +// CHECK: 'flags', 0x80000000 +// CHECK: # Section 1 +// CHECK: 'section_name', '__data +// CHECK: 'flags', 0x400 + + .text + + .data +f0: + movl $0, %eax From daniel at zuster.org Tue Feb 2 15:44:10 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 02 Feb 2010 21:44:10 -0000 Subject: [llvm-commits] [llvm] r95136 - /llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Message-ID: <201002022144.o12LiALh019799@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Feb 2 15:44:10 2010 New Revision: 95136 URL: http://llvm.org/viewvc/llvm-project?rev=95136&view=rev Log: MCCodeEmitter/X86: Handle tied registers better when converting MCInst -> MCMachineInstr. This also fixes handling of tied registers for MRMSrcMem instructions. Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp?rev=95136&r1=95135&r2=95136&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Tue Feb 2 15:44:10 2010 @@ -1002,10 +1002,10 @@ unsigned Opcode = MI.getOpcode(); unsigned NumOps = MI.getNumOperands(); unsigned CurOp = 0; - if (NumOps > 1 && Desc.getOperandConstraint(1, TOI::TIED_TO) != -1) { - Instr->addOperand(MachineOperand::CreateReg(0, false)); - ++CurOp; - } else if (NumOps > 2 && + bool AddTied = false; + if (NumOps > 1 && Desc.getOperandConstraint(1, TOI::TIED_TO) != -1) + AddTied = true; + else if (NumOps > 2 && Desc.getOperandConstraint(NumOps-1, TOI::TIED_TO)== 0) // Skip the last source operand that is tied_to the dest reg. e.g. LXADD32 --NumOps; @@ -1016,7 +1016,9 @@ case X86II::MRMSrcReg: // Matching doesn't fill this in completely, we have to choose operand 0 // for a tied register. - OK &= AddRegToInstr(MI, Instr, 0); CurOp++; + OK &= AddRegToInstr(MI, Instr, CurOp++); + if (AddTied) + OK &= AddRegToInstr(MI, Instr, CurOp++ - 1); OK &= AddRegToInstr(MI, Instr, CurOp++); if (CurOp < NumOps) OK &= AddImmToInstr(MI, Instr, CurOp); @@ -1035,7 +1037,11 @@ break; case X86II::AddRegFrm: + // Matching doesn't fill this in completely, we have to choose operand 0 + // for a tied register. OK &= AddRegToInstr(MI, Instr, CurOp++); + if (AddTied) + OK &= AddRegToInstr(MI, Instr, CurOp++ - 1); if (CurOp < NumOps) OK &= AddImmToInstr(MI, Instr, CurOp); break; @@ -1046,7 +1052,9 @@ case X86II::MRM6r: case X86II::MRM7r: // Matching doesn't fill this in completely, we have to choose operand 0 // for a tied register. - OK &= AddRegToInstr(MI, Instr, 0); CurOp++; + OK &= AddRegToInstr(MI, Instr, CurOp++); + if (AddTied) + OK &= AddRegToInstr(MI, Instr, CurOp++ - 1); if (CurOp < NumOps) OK &= AddImmToInstr(MI, Instr, CurOp); break; @@ -1061,7 +1069,11 @@ break; case X86II::MRMSrcMem: + // Matching doesn't fill this in completely, we have to choose operand 0 + // for a tied register. OK &= AddRegToInstr(MI, Instr, CurOp++); + if (AddTied) + OK &= AddRegToInstr(MI, Instr, CurOp++ - 1); if (Opcode == X86::LEA64r || Opcode == X86::LEA64_32r || Opcode == X86::LEA16r || Opcode == X86::LEA32r) OK &= AddLMemToInstr(MI, Instr, CurOp); From daniel at zuster.org Tue Feb 2 15:44:17 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 02 Feb 2010 21:44:17 -0000 Subject: [llvm-commits] [llvm] r95137 - /llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Message-ID: <201002022144.o12LiH7d019813@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Feb 2 15:44:16 2010 New Revision: 95137 URL: http://llvm.org/viewvc/llvm-project?rev=95137&view=rev Log: MCAsmParser/X86: Represent absolute memory operands as CodeGen does, with scale == 1. Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=95137&r1=95136&r2=95137&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Tue Feb 2 15:44:16 2010 @@ -174,7 +174,7 @@ bool isAbsMem() const { return Kind == Memory && !getMemSegReg() && !getMemBaseReg() && - !getMemIndexReg() && !getMemScale(); + !getMemIndexReg() && getMemScale() == 1; } bool isNoSegMem() const { @@ -248,7 +248,7 @@ Res->Mem.Disp = Disp; Res->Mem.BaseReg = 0; Res->Mem.IndexReg = 0; - Res->Mem.Scale = 0; + Res->Mem.Scale = 1; return Res; } From sabre at nondot.org Tue Feb 2 15:48:51 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 21:48:51 -0000 Subject: [llvm-commits] [llvm] r95138 - /llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp Message-ID: <201002022148.o12LmpNO020043@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 15:48:51 2010 New Revision: 95138 URL: http://llvm.org/viewvc/llvm-project?rev=95138&view=rev Log: detemplatize ARM code emitter. Modified: llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp Modified: llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp?rev=95138&r1=95137&r2=95138&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp Tue Feb 2 15:48:51 2010 @@ -46,42 +46,34 @@ namespace { - class ARMCodeEmitter { - public: - /// getBinaryCodeForInstr - This function, generated by the - /// CodeEmitterGenerator using TableGen, produces the binary encoding for - /// machine instructions. - unsigned getBinaryCodeForInstr(const MachineInstr &MI); - }; - - template - class Emitter : public MachineFunctionPass, public ARMCodeEmitter { + class ARMCodeEmitter : public MachineFunctionPass { ARMJITInfo *JTI; const ARMInstrInfo *II; const TargetData *TD; const ARMSubtarget *Subtarget; TargetMachine &TM; - CodeEmitter &MCE; + JITCodeEmitter &MCE; const std::vector *MCPEs; const std::vector *MJTEs; bool IsPIC; - + void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); MachineFunctionPass::getAnalysisUsage(AU); } - - public: + static char ID; - explicit Emitter(TargetMachine &tm, CodeEmitter &mce) - : MachineFunctionPass(&ID), JTI(0), II(0), TD(0), TM(tm), - MCE(mce), MCPEs(0), MJTEs(0), - IsPIC(TM.getRelocationModel() == Reloc::PIC_) {} - Emitter(TargetMachine &tm, CodeEmitter &mce, - const ARMInstrInfo &ii, const TargetData &td) - : MachineFunctionPass(&ID), JTI(0), II(&ii), TD(&td), TM(tm), - MCE(mce), MCPEs(0), MJTEs(0), - IsPIC(TM.getRelocationModel() == Reloc::PIC_) {} + public: + ARMCodeEmitter(TargetMachine &tm, JITCodeEmitter &mce) + : MachineFunctionPass(&ID), JTI(0), II((ARMInstrInfo*)tm.getInstrInfo()), + TD(tm.getTargetData()), TM(tm), + MCE(mce), MCPEs(0), MJTEs(0), + IsPIC(TM.getRelocationModel() == Reloc::PIC_) {} + + /// getBinaryCodeForInstr - This function, generated by the + /// CodeEmitterGenerator using TableGen, produces the binary encoding for + /// machine instructions. + unsigned getBinaryCodeForInstr(const MachineInstr &MI); bool runOnMachineFunction(MachineFunction &MF); @@ -94,21 +86,13 @@ private: void emitWordLE(unsigned Binary); - void emitDWordLE(uint64_t Binary); - void emitConstPoolInstruction(const MachineInstr &MI); - void emitMOVi2piecesInstruction(const MachineInstr &MI); - void emitLEApcrelJTInstruction(const MachineInstr &MI); - void emitPseudoMoveInstruction(const MachineInstr &MI); - void addPCLabel(unsigned LabelID); - void emitPseudoInstruction(const MachineInstr &MI); - unsigned getMachineSoRegOpValue(const MachineInstr &MI, const TargetInstrDesc &TID, const MachineOperand &MO, @@ -176,19 +160,18 @@ void emitMachineBasicBlock(MachineBasicBlock *BB, unsigned Reloc, intptr_t JTBase = 0); }; - template - char Emitter::ID = 0; } +char ARMCodeEmitter::ID = 0; + /// createARMJITCodeEmitterPass - Return a pass that emits the collected ARM /// code to the specified MCE object. FunctionPass *llvm::createARMJITCodeEmitterPass(ARMBaseTargetMachine &TM, JITCodeEmitter &JCE) { - return new Emitter(TM, JCE); + return new ARMCodeEmitter(TM, JCE); } -template -bool Emitter::runOnMachineFunction(MachineFunction &MF) { +bool ARMCodeEmitter::runOnMachineFunction(MachineFunction &MF) { assert((MF.getTarget().getRelocationModel() != Reloc::Default || MF.getTarget().getRelocationModel() != Reloc::Static) && "JIT relocation model must be set to static or default!"); @@ -221,8 +204,7 @@ /// getShiftOp - Return the shift opcode (bit[6:5]) of the immediate value. /// -template -unsigned Emitter::getShiftOp(unsigned Imm) const { +unsigned ARMCodeEmitter::getShiftOp(unsigned Imm) const { switch (ARM_AM::getAM2ShiftOpc(Imm)) { default: llvm_unreachable("Unknown shift opc!"); case ARM_AM::asr: return 2; @@ -236,9 +218,8 @@ /// getMachineOpValue - Return binary encoding of operand. If the machine /// operand requires relocation, record the relocation and return zero. -template -unsigned Emitter::getMachineOpValue(const MachineInstr &MI, - const MachineOperand &MO) { +unsigned ARMCodeEmitter::getMachineOpValue(const MachineInstr &MI, + const MachineOperand &MO) { if (MO.isReg()) return ARMRegisterInfo::getRegisterNumbering(MO.getReg()); else if (MO.isImm()) @@ -268,10 +249,9 @@ /// emitGlobalAddress - Emit the specified address to the code stream. /// -template -void Emitter::emitGlobalAddress(GlobalValue *GV, unsigned Reloc, - bool MayNeedFarStub, bool Indirect, - intptr_t ACPV) { +void ARMCodeEmitter::emitGlobalAddress(GlobalValue *GV, unsigned Reloc, + bool MayNeedFarStub, bool Indirect, + intptr_t ACPV) { MachineRelocation MR = Indirect ? MachineRelocation::getIndirectSymbol(MCE.getCurrentPCOffset(), Reloc, GV, ACPV, MayNeedFarStub) @@ -283,9 +263,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. -template -void Emitter::emitExternalSymbolAddress(const char *ES, - unsigned Reloc) { +void ARMCodeEmitter::emitExternalSymbolAddress(const char *ES, unsigned Reloc) { MCE.addRelocation(MachineRelocation::getExtSym(MCE.getCurrentPCOffset(), Reloc, ES)); } @@ -293,9 +271,7 @@ /// emitConstPoolAddress - Arrange for the address of an constant pool /// to be emitted to the current location in the function, and allow it to be PC /// relative. -template -void Emitter::emitConstPoolAddress(unsigned CPI, - unsigned Reloc) { +void ARMCodeEmitter::emitConstPoolAddress(unsigned CPI, unsigned Reloc) { // Tell JIT emitter we'll resolve the address. MCE.addRelocation(MachineRelocation::getConstPool(MCE.getCurrentPCOffset(), Reloc, CPI, 0, true)); @@ -304,37 +280,31 @@ /// emitJumpTableAddress - Arrange for the address of a jump table to /// be emitted to the current location in the function, and allow it to be PC /// relative. -template -void Emitter::emitJumpTableAddress(unsigned JTIndex, - unsigned Reloc) { +void ARMCodeEmitter::emitJumpTableAddress(unsigned JTIndex, unsigned Reloc) { MCE.addRelocation(MachineRelocation::getJumpTable(MCE.getCurrentPCOffset(), Reloc, JTIndex, 0, true)); } /// emitMachineBasicBlock - Emit the specified address basic block. -template -void Emitter::emitMachineBasicBlock(MachineBasicBlock *BB, - unsigned Reloc, intptr_t JTBase) { +void ARMCodeEmitter::emitMachineBasicBlock(MachineBasicBlock *BB, + unsigned Reloc, intptr_t JTBase) { MCE.addRelocation(MachineRelocation::getBB(MCE.getCurrentPCOffset(), Reloc, BB, JTBase)); } -template -void Emitter::emitWordLE(unsigned Binary) { +void ARMCodeEmitter::emitWordLE(unsigned Binary) { DEBUG(errs() << " 0x"; errs().write_hex(Binary) << "\n"); MCE.emitWordLE(Binary); } -template -void Emitter::emitDWordLE(uint64_t Binary) { +void ARMCodeEmitter::emitDWordLE(uint64_t Binary) { DEBUG(errs() << " 0x"; errs().write_hex(Binary) << "\n"); MCE.emitDWordLE(Binary); } -template -void Emitter::emitInstruction(const MachineInstr &MI) { +void ARMCodeEmitter::emitInstruction(const MachineInstr &MI) { DEBUG(errs() << "JIT: " << (void*)MCE.getCurrentPCValue() << ":\t" << MI); MCE.processDebugLoc(MI.getDebugLoc(), true); @@ -403,8 +373,7 @@ MCE.processDebugLoc(MI.getDebugLoc(), false); } -template -void Emitter::emitConstPoolInstruction(const MachineInstr &MI) { +void ARMCodeEmitter::emitConstPoolInstruction(const MachineInstr &MI) { unsigned CPI = MI.getOperand(0).getImm(); // CP instruction index. unsigned CPIndex = MI.getOperand(1).getIndex(); // Actual cp entry index. const MachineConstantPoolEntry &MCPE = (*MCPEs)[CPIndex]; @@ -466,8 +435,7 @@ } } -template -void Emitter::emitMOVi2piecesInstruction(const MachineInstr &MI) { +void ARMCodeEmitter::emitMOVi2piecesInstruction(const MachineInstr &MI) { const MachineOperand &MO0 = MI.getOperand(0); const MachineOperand &MO1 = MI.getOperand(1); assert(MO1.isImm() && ARM_AM::getSOImmVal(MO1.isImm()) != -1 && @@ -509,8 +477,7 @@ emitWordLE(Binary); } -template -void Emitter::emitLEApcrelJTInstruction(const MachineInstr &MI) { +void ARMCodeEmitter::emitLEApcrelJTInstruction(const MachineInstr &MI) { // It's basically add r, pc, (LJTI - $+8) const TargetInstrDesc &TID = MI.getDesc(); @@ -537,8 +504,7 @@ emitWordLE(Binary); } -template -void Emitter::emitPseudoMoveInstruction(const MachineInstr &MI) { +void ARMCodeEmitter::emitPseudoMoveInstruction(const MachineInstr &MI) { unsigned Opcode = MI.getDesc().Opcode; // Part of binary is determined by TableGn. @@ -577,15 +543,13 @@ emitWordLE(Binary); } -template -void Emitter::addPCLabel(unsigned LabelID) { +void ARMCodeEmitter::addPCLabel(unsigned LabelID) { DEBUG(errs() << " ** LPC" << LabelID << " @ " << (void*)MCE.getCurrentPCValue() << '\n'); JTI->addPCLabelAddr(LabelID, MCE.getCurrentPCValue()); } -template -void Emitter::emitPseudoInstruction(const MachineInstr &MI) { +void ARMCodeEmitter::emitPseudoInstruction(const MachineInstr &MI) { unsigned Opcode = MI.getDesc().Opcode; switch (Opcode) { default: @@ -653,8 +617,7 @@ } } -template -unsigned Emitter::getMachineSoRegOpValue( +unsigned ARMCodeEmitter::getMachineSoRegOpValue( const MachineInstr &MI, const TargetInstrDesc &TID, const MachineOperand &MO, @@ -713,8 +676,7 @@ return Binary | ARM_AM::getSORegOffset(MO2.getImm()) << 7; } -template -unsigned Emitter::getMachineSoImmOpValue(unsigned SoImm) { +unsigned ARMCodeEmitter::getMachineSoImmOpValue(unsigned SoImm) { int SoImmVal = ARM_AM::getSOImmVal(SoImm); assert(SoImmVal != -1 && "Not a valid so_imm value!"); @@ -727,8 +689,7 @@ return Binary; } -template -unsigned Emitter::getAddrModeSBit(const MachineInstr &MI, +unsigned ARMCodeEmitter::getAddrModeSBit(const MachineInstr &MI, const TargetInstrDesc &TID) const { for (unsigned i = MI.getNumOperands(), e = TID.getNumOperands(); i != e; --i){ const MachineOperand &MO = MI.getOperand(i-1); @@ -738,8 +699,7 @@ return 0; } -template -void Emitter::emitDataProcessingInstruction( +void ARMCodeEmitter::emitDataProcessingInstruction( const MachineInstr &MI, unsigned ImplicitRd, unsigned ImplicitRn) { @@ -805,8 +765,7 @@ emitWordLE(Binary); } -template -void Emitter::emitLoadStoreInstruction( +void ARMCodeEmitter::emitLoadStoreInstruction( const MachineInstr &MI, unsigned ImplicitRd, unsigned ImplicitRn) { @@ -881,8 +840,7 @@ emitWordLE(Binary); } -template -void Emitter::emitMiscLoadStoreInstruction(const MachineInstr &MI, +void ARMCodeEmitter::emitMiscLoadStoreInstruction(const MachineInstr &MI, unsigned ImplicitRn) { const TargetInstrDesc &TID = MI.getDesc(); unsigned Form = TID.TSFlags & ARMII::FormMask; @@ -969,8 +927,7 @@ return Binary; } -template -void Emitter::emitLoadStoreMultipleInstruction( +void ARMCodeEmitter::emitLoadStoreMultipleInstruction( const MachineInstr &MI) { // Part of binary is determined by TableGn. unsigned Binary = getBinaryCodeForInstr(MI); @@ -1003,8 +960,7 @@ emitWordLE(Binary); } -template -void Emitter::emitMulFrmInstruction(const MachineInstr &MI) { +void ARMCodeEmitter::emitMulFrmInstruction(const MachineInstr &MI) { const TargetInstrDesc &TID = MI.getDesc(); // Part of binary is determined by TableGn. @@ -1041,8 +997,7 @@ emitWordLE(Binary); } -template -void Emitter::emitExtendInstruction(const MachineInstr &MI) { +void ARMCodeEmitter::emitExtendInstruction(const MachineInstr &MI) { const TargetInstrDesc &TID = MI.getDesc(); // Part of binary is determined by TableGn. @@ -1079,8 +1034,7 @@ emitWordLE(Binary); } -template -void Emitter::emitMiscArithInstruction(const MachineInstr &MI) { +void ARMCodeEmitter::emitMiscArithInstruction(const MachineInstr &MI) { const TargetInstrDesc &TID = MI.getDesc(); // Part of binary is determined by TableGn. @@ -1118,8 +1072,7 @@ emitWordLE(Binary); } -template -void Emitter::emitBranchInstruction(const MachineInstr &MI) { +void ARMCodeEmitter::emitBranchInstruction(const MachineInstr &MI) { const TargetInstrDesc &TID = MI.getDesc(); if (TID.Opcode == ARM::TPsoft) { @@ -1138,8 +1091,7 @@ emitWordLE(Binary); } -template -void Emitter::emitInlineJumpTable(unsigned JTIndex) { +void ARMCodeEmitter::emitInlineJumpTable(unsigned JTIndex) { // Remember the base address of the inline jump table. uintptr_t JTBase = MCE.getCurrentPCValue(); JTI->addJumpTableBaseAddr(JTIndex, JTBase); @@ -1159,8 +1111,7 @@ } } -template -void Emitter::emitMiscBranchInstruction(const MachineInstr &MI) { +void ARMCodeEmitter::emitMiscBranchInstruction(const MachineInstr &MI) { const TargetInstrDesc &TID = MI.getDesc(); // Handle jump tables. @@ -1241,8 +1192,7 @@ return Binary; } -template -void Emitter::emitVFPArithInstruction(const MachineInstr &MI) { +void ARMCodeEmitter::emitVFPArithInstruction(const MachineInstr &MI) { const TargetInstrDesc &TID = MI.getDesc(); // Part of binary is determined by TableGn. @@ -1281,8 +1231,7 @@ emitWordLE(Binary); } -template -void Emitter::emitVFPConversionInstruction( +void ARMCodeEmitter::emitVFPConversionInstruction( const MachineInstr &MI) { const TargetInstrDesc &TID = MI.getDesc(); unsigned Form = TID.TSFlags & ARMII::FormMask; @@ -1339,8 +1288,7 @@ emitWordLE(Binary); } -template -void Emitter::emitVFPLoadStoreInstruction(const MachineInstr &MI) { +void ARMCodeEmitter::emitVFPLoadStoreInstruction(const MachineInstr &MI) { // Part of binary is determined by TableGn. unsigned Binary = getBinaryCodeForInstr(MI); @@ -1374,8 +1322,7 @@ emitWordLE(Binary); } -template -void Emitter::emitVFPLoadStoreMultipleInstruction( +void ARMCodeEmitter::emitVFPLoadStoreMultipleInstruction( const MachineInstr &MI) { // Part of binary is determined by TableGn. unsigned Binary = getBinaryCodeForInstr(MI); @@ -1410,8 +1357,7 @@ emitWordLE(Binary); } -template -void Emitter::emitMiscInstruction(const MachineInstr &MI) { +void ARMCodeEmitter::emitMiscInstruction(const MachineInstr &MI) { // Part of binary is determined by TableGn. unsigned Binary = getBinaryCodeForInstr(MI); From kledzik at apple.com Tue Feb 2 15:48:53 2010 From: kledzik at apple.com (Nick Kledzik) Date: Tue, 02 Feb 2010 21:48:53 -0000 Subject: [llvm-commits] [compiler-rt] r95139 - /compiler-rt/tags/Apple/Libcompiler_rt-5/ Message-ID: <201002022148.o12Lmrb4020057@zion.cs.uiuc.edu> Author: kledzik Date: Tue Feb 2 15:48:53 2010 New Revision: 95139 URL: http://llvm.org/viewvc/llvm-project?rev=95139&view=rev Log: Libcompiler_rt-5 Added: compiler-rt/tags/Apple/Libcompiler_rt-5/ - copied from r95137, compiler-rt/trunk/ From sabre at nondot.org Tue Feb 2 15:49:30 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 21:49:30 -0000 Subject: [llvm-commits] [llvm] r95140 - /llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp Message-ID: <201002022149.o12LnUFe020088@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 15:49:29 2010 New Revision: 95140 URL: http://llvm.org/viewvc/llvm-project?rev=95140&view=rev Log: add a definition for ID. Modified: llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp Modified: llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp?rev=95140&r1=95139&r2=95140&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaCodeEmitter.cpp Tue Feb 2 15:49:29 2010 @@ -59,6 +59,9 @@ }; } +char AlphaCodeEmitter::ID = 0; + + /// createAlphaCodeEmitterPass - Return a pass that emits the collected Alpha /// code to the specified MCE object. From sabre at nondot.org Tue Feb 2 15:52:04 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 21:52:04 -0000 Subject: [llvm-commits] [llvm] r95141 - in /llvm/trunk/lib/Target/PowerPC: PPC.h PPCCodeEmitter.cpp PPCTargetMachine.cpp PPCTargetMachine.h Message-ID: <201002022152.o12Lq4qc020242@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 15:52:03 2010 New Revision: 95141 URL: http://llvm.org/viewvc/llvm-project?rev=95141&view=rev Log: remove dead code. Modified: llvm/trunk/lib/Target/PowerPC/PPC.h llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h Modified: llvm/trunk/lib/Target/PowerPC/PPC.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPC.h?rev=95141&r1=95140&r2=95141&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPC.h (original) +++ llvm/trunk/lib/Target/PowerPC/PPC.h Tue Feb 2 15:52:03 2010 @@ -29,12 +29,8 @@ FunctionPass *createPPCBranchSelectionPass(); FunctionPass *createPPCISelDag(PPCTargetMachine &TM); -FunctionPass *createPPCCodeEmitterPass(PPCTargetMachine &TM, - MachineCodeEmitter &MCE); FunctionPass *createPPCJITCodeEmitterPass(PPCTargetMachine &TM, JITCodeEmitter &MCE); -FunctionPass *createPPCObjectCodeEmitterPass(PPCTargetMachine &TM, - ObjectCodeEmitter &OCE); extern Target ThePPC32Target; extern Target ThePPC64Target; Modified: llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp?rev=95141&r1=95140&r2=95141&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp Tue Feb 2 15:52:03 2010 @@ -91,22 +91,11 @@ /// createPPCCodeEmitterPass - Return a pass that emits the collected PPC code /// to the specified MCE object. - -FunctionPass *llvm::createPPCCodeEmitterPass(PPCTargetMachine &TM, - MachineCodeEmitter &MCE) { - return new Emitter(TM, MCE); -} - FunctionPass *llvm::createPPCJITCodeEmitterPass(PPCTargetMachine &TM, JITCodeEmitter &JCE) { return new Emitter(TM, JCE); } -FunctionPass *llvm::createPPCObjectCodeEmitterPass(PPCTargetMachine &TM, - ObjectCodeEmitter &OCE) { - return new Emitter(TM, OCE); -} - template bool Emitter::runOnMachineFunction(MachineFunction &MF) { assert((MF.getTarget().getRelocationModel() != Reloc::Default || Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp?rev=95141&r1=95140&r2=95141&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Tue Feb 2 15:52:03 2010 @@ -91,33 +91,6 @@ bool PPCTargetMachine::addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE) { - // The JIT should use the static relocation model in ppc32 mode, PIC in ppc64. - // FIXME: This should be moved to TargetJITInfo!! - if (Subtarget.isPPC64()) { - // We use PIC codegen in ppc64 mode, because otherwise we'd have to use many - // instructions to materialize arbitrary global variable + function + - // constant pool addresses. - setRelocationModel(Reloc::PIC_); - // Temporary workaround for the inability of PPC64 JIT to handle jump - // tables. - DisableJumpTables = true; - } else { - setRelocationModel(Reloc::Static); - } - - // Inform the subtarget that we are in JIT mode. FIXME: does this break macho - // writing? - Subtarget.SetJITMode(); - - // Machine code emitter pass for PowerPC. - PM.add(createPPCCodeEmitterPass(*this, MCE)); - - return false; -} - -bool PPCTargetMachine::addCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, JITCodeEmitter &JCE) { // The JIT should use the static relocation model in ppc32 mode, PIC in ppc64. // FIXME: This should be moved to TargetJITInfo!! @@ -143,33 +116,6 @@ return false; } -bool PPCTargetMachine::addCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &OCE) { - // The JIT should use the static relocation model in ppc32 mode, PIC in ppc64. - // FIXME: This should be moved to TargetJITInfo!! - if (Subtarget.isPPC64()) { - // We use PIC codegen in ppc64 mode, because otherwise we'd have to use many - // instructions to materialize arbitrary global variable + function + - // constant pool addresses. - setRelocationModel(Reloc::PIC_); - // Temporary workaround for the inability of PPC64 JIT to handle jump - // tables. - DisableJumpTables = true; - } else { - setRelocationModel(Reloc::Static); - } - - // Inform the subtarget that we are in JIT mode. FIXME: does this break macho - // writing? - Subtarget.SetJITMode(); - - // Machine code emitter pass for PowerPC. - PM.add(createPPCObjectCodeEmitterPass(*this, OCE)); - - return false; -} - /// getLSDAEncoding - Returns the LSDA pointer encoding. The choices are 4-byte, /// 8-byte, and target default. The CIE is hard-coded to indicate that the LSDA /// pointer in the FDE section is an "sdata4", and should be encoded as a 4-byte Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h?rev=95141&r1=95140&r2=95141&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h (original) +++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.h Tue Feb 2 15:52:03 2010 @@ -73,11 +73,7 @@ virtual bool addInstSelector(PassManagerBase &PM, CodeGenOpt::Level OptLevel); virtual bool addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel); virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE); - virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, JITCodeEmitter &JCE); - virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &OCE); virtual bool getEnableTailMergeDefault() const; }; From sabre at nondot.org Tue Feb 2 15:55:58 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 21:55:58 -0000 Subject: [llvm-commits] [llvm] r95142 - /llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp Message-ID: <201002022155.o12LtwpA020405@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 15:55:58 2010 New Revision: 95142 URL: http://llvm.org/viewvc/llvm-project?rev=95142&view=rev Log: detemplatize the ppc code emitter. Modified: llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp Modified: llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp?rev=95142&r1=95141&r2=95142&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCCodeEmitter.cpp Tue Feb 2 15:55:58 2010 @@ -17,26 +17,34 @@ #include "PPC.h" #include "llvm/Module.h" #include "llvm/PassManager.h" -#include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/CodeGen/JITCodeEmitter.h" -#include "llvm/CodeGen/ObjectCodeEmitter.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineModuleInfo.h" -#include "llvm/CodeGen/Passes.h" -#include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetOptions.h" using namespace llvm; namespace { - class PPCCodeEmitter { + class PPCCodeEmitter : public MachineFunctionPass { TargetMachine &TM; - MachineCodeEmitter &MCE; + JITCodeEmitter &MCE; + + void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequired(); + MachineFunctionPass::getAnalysisUsage(AU); + } + + static char ID; + + /// MovePCtoLROffset - When/if we see a MovePCtoLR instruction, we record + /// its address in the function into this pointer. + void *MovePCtoLROffset; public: - PPCCodeEmitter(TargetMachine &tm, MachineCodeEmitter &mce): - TM(tm), MCE(mce) {} + + PPCCodeEmitter(TargetMachine &tm, JITCodeEmitter &mce) + : MachineFunctionPass(&ID), TM(tm), MCE(mce) {} /// getBinaryCodeForInstr - This function, generated by the /// CodeEmitterGenerator using TableGen, produces the binary encoding for @@ -49,27 +57,6 @@ unsigned getMachineOpValue(const MachineInstr &MI, const MachineOperand &MO); - /// MovePCtoLROffset - When/if we see a MovePCtoLR instruction, we record - /// its address in the function into this pointer. - - void *MovePCtoLROffset; - }; - - template - class Emitter : public MachineFunctionPass, public PPCCodeEmitter { - TargetMachine &TM; - CodeEmitter &MCE; - - void getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired(); - MachineFunctionPass::getAnalysisUsage(AU); - } - - public: - static char ID; - Emitter(TargetMachine &tm, CodeEmitter &mce) - : MachineFunctionPass(&ID), PPCCodeEmitter(tm, mce), TM(tm), MCE(mce) {} - const char *getPassName() const { return "PowerPC Machine Code Emitter"; } /// runOnMachineFunction - emits the given MachineFunction to memory @@ -84,20 +71,18 @@ /// unsigned getValueBit(int64_t Val, unsigned bit) { return (Val >> bit) & 1; } }; - - template - char Emitter::ID = 0; } +char PPCCodeEmitter::ID = 0; + /// createPPCCodeEmitterPass - Return a pass that emits the collected PPC code /// to the specified MCE object. FunctionPass *llvm::createPPCJITCodeEmitterPass(PPCTargetMachine &TM, JITCodeEmitter &JCE) { - return new Emitter(TM, JCE); + return new PPCCodeEmitter(TM, JCE); } -template -bool Emitter::runOnMachineFunction(MachineFunction &MF) { +bool PPCCodeEmitter::runOnMachineFunction(MachineFunction &MF) { assert((MF.getTarget().getRelocationModel() != Reloc::Default || MF.getTarget().getRelocationModel() != Reloc::Static) && "JIT relocation model must be set to static or default!"); @@ -113,8 +98,7 @@ return false; } -template -void Emitter::emitBasicBlock(MachineBasicBlock &MBB) { +void PPCCodeEmitter::emitBasicBlock(MachineBasicBlock &MBB) { MCE.StartMachineBasicBlock(&MBB); for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); I != E; ++I){ From daniel at zuster.org Tue Feb 2 16:00:15 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 02 Feb 2010 22:00:15 -0000 Subject: [llvm-commits] [llvm] r95143 - in /llvm/trunk/test: MC/MachO/Darwin/ MC/MachO/Darwin/dg.exp MC/MachO/Darwin/x86_32_diff_as.s lit.cfg Message-ID: <201002022200.o12M0Fi4020639@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Feb 2 16:00:15 2010 New Revision: 95143 URL: http://llvm.org/viewvc/llvm-project?rev=95143&view=rev Log: MCAssembler/Darwin: Add a test (on Darwin) that we assemble a bunch of instructions exactly like 'as', and produce equivalent .o files. Added: llvm/trunk/test/MC/MachO/Darwin/ llvm/trunk/test/MC/MachO/Darwin/dg.exp llvm/trunk/test/MC/MachO/Darwin/x86_32_diff_as.s Modified: llvm/trunk/test/lit.cfg Added: llvm/trunk/test/MC/MachO/Darwin/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/Darwin/dg.exp?rev=95143&view=auto ============================================================================== --- llvm/trunk/test/MC/MachO/Darwin/dg.exp (added) +++ llvm/trunk/test/MC/MachO/Darwin/dg.exp Tue Feb 2 16:00:15 2010 @@ -0,0 +1,5 @@ +load_lib llvm.exp + +if { [llvm_supports_darwin_and_target X86] } { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{s}]] +} Added: llvm/trunk/test/MC/MachO/Darwin/x86_32_diff_as.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/MachO/Darwin/x86_32_diff_as.s?rev=95143&view=auto ============================================================================== --- llvm/trunk/test/MC/MachO/Darwin/x86_32_diff_as.s (added) +++ llvm/trunk/test/MC/MachO/Darwin/x86_32_diff_as.s Tue Feb 2 16:00:15 2010 @@ -0,0 +1,550 @@ +// Validate that we can assemble this file exactly like the platform +// assembler. +// +// RUN: llvm-mc -filetype=obj -triple i386-unknown-unknown -o %t.mc.o %s +// RUN: as -arch i386 -o %t.as.o %s +// RUN: diff %t.mc.o %t.as.o + + movb $0x7f,0xdeadbeef(%ebx,%ecx,8) + movw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + movl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + movl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + movsbl 0xdeadbeef(%ebx,%ecx,8),%ecx + movswl 0xdeadbeef(%ebx,%ecx,8),%ecx + movzbl 0xdeadbeef(%ebx,%ecx,8),%ecx + movzwl 0xdeadbeef(%ebx,%ecx,8),%ecx + pushl 0xdeadbeef(%ebx,%ecx,8) + popl 0xdeadbeef(%ebx,%ecx,8) + lahf + sahf + addb $0xfe,0xdeadbeef(%ebx,%ecx,8) + addb $0x7f,0xdeadbeef(%ebx,%ecx,8) + addw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + addl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + addl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + incl 0xdeadbeef(%ebx,%ecx,8) + subb $0xfe,0xdeadbeef(%ebx,%ecx,8) + subb $0x7f,0xdeadbeef(%ebx,%ecx,8) + subw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + subl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + subl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + decl 0xdeadbeef(%ebx,%ecx,8) + sbbw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + sbbl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + sbbl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + cmpb $0xfe,0xdeadbeef(%ebx,%ecx,8) + cmpb $0x7f,0xdeadbeef(%ebx,%ecx,8) + cmpw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + cmpl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + cmpl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + testb $0x7f,0xdeadbeef(%ebx,%ecx,8) + testw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + testl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + testl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + andb $0xfe,0xdeadbeef(%ebx,%ecx,8) + andb $0x7f,0xdeadbeef(%ebx,%ecx,8) + andw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + andl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + andl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + orb $0xfe,0xdeadbeef(%ebx,%ecx,8) + orb $0x7f,0xdeadbeef(%ebx,%ecx,8) + orw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + orl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + orl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + xorb $0xfe,0xdeadbeef(%ebx,%ecx,8) + xorb $0x7f,0xdeadbeef(%ebx,%ecx,8) + xorw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + xorl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + xorl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + adcb $0xfe,0xdeadbeef(%ebx,%ecx,8) + adcb $0x7f,0xdeadbeef(%ebx,%ecx,8) + adcw $0x7ace,0xdeadbeef(%ebx,%ecx,8) + adcl $0x7afebabe,0xdeadbeef(%ebx,%ecx,8) + adcl $0x13572468,0xdeadbeef(%ebx,%ecx,8) + negl 0xdeadbeef(%ebx,%ecx,8) + notl 0xdeadbeef(%ebx,%ecx,8) + cbtw + cwtl + cwtd + cltd + mull 0xdeadbeef(%ebx,%ecx,8) + imull 0xdeadbeef(%ebx,%ecx,8) + divl 0xdeadbeef(%ebx,%ecx,8) + idivl 0xdeadbeef(%ebx,%ecx,8) + roll $0,0xdeadbeef(%ebx,%ecx,8) + rolb $0x7f,0xdeadbeef(%ebx,%ecx,8) + roll 0xdeadbeef(%ebx,%ecx,8) + rorl $0,0xdeadbeef(%ebx,%ecx,8) + rorb $0x7f,0xdeadbeef(%ebx,%ecx,8) + rorl 0xdeadbeef(%ebx,%ecx,8) + shll $0,0xdeadbeef(%ebx,%ecx,8) + shlb $0x7f,0xdeadbeef(%ebx,%ecx,8) + shll 0xdeadbeef(%ebx,%ecx,8) + shrl $0,0xdeadbeef(%ebx,%ecx,8) + shrb $0x7f,0xdeadbeef(%ebx,%ecx,8) + shrl 0xdeadbeef(%ebx,%ecx,8) + sarl $0,0xdeadbeef(%ebx,%ecx,8) + sarb $0x7f,0xdeadbeef(%ebx,%ecx,8) + sarl 0xdeadbeef(%ebx,%ecx,8) + call *%ecx + call *0xdeadbeef(%ebx,%ecx,8) + call *0xdeadbeef(%ebx,%ecx,8) + jmp *0xdeadbeef(%ebx,%ecx,8) + jmp *0xdeadbeef(%ebx,%ecx,8) + ljmpl *0xdeadbeef(%ebx,%ecx,8) + lret + leave + seto %bl + seto 0xdeadbeef(%ebx,%ecx,8) + setno %bl + setno 0xdeadbeef(%ebx,%ecx,8) + setb %bl + setb 0xdeadbeef(%ebx,%ecx,8) + setae %bl + setae 0xdeadbeef(%ebx,%ecx,8) + sete %bl + sete 0xdeadbeef(%ebx,%ecx,8) + setne %bl + setne 0xdeadbeef(%ebx,%ecx,8) + setbe %bl + setbe 0xdeadbeef(%ebx,%ecx,8) + seta %bl + seta 0xdeadbeef(%ebx,%ecx,8) + sets %bl + sets 0xdeadbeef(%ebx,%ecx,8) + setns %bl + setns 0xdeadbeef(%ebx,%ecx,8) + setp %bl + setp 0xdeadbeef(%ebx,%ecx,8) + setnp %bl + setnp 0xdeadbeef(%ebx,%ecx,8) + setl %bl + setl 0xdeadbeef(%ebx,%ecx,8) + setge %bl + setge 0xdeadbeef(%ebx,%ecx,8) + setle %bl + setle 0xdeadbeef(%ebx,%ecx,8) + setg %bl + setg 0xdeadbeef(%ebx,%ecx,8) + nopl 0xdeadbeef(%ebx,%ecx,8) + nop + fldl 0xdeadbeef(%ebx,%ecx,8) + fildl 0xdeadbeef(%ebx,%ecx,8) + fildll 0xdeadbeef(%ebx,%ecx,8) + fldt 0xdeadbeef(%ebx,%ecx,8) + fbld 0xdeadbeef(%ebx,%ecx,8) + fstl 0xdeadbeef(%ebx,%ecx,8) + fistl 0xdeadbeef(%ebx,%ecx,8) + fstpl 0xdeadbeef(%ebx,%ecx,8) + fistpl 0xdeadbeef(%ebx,%ecx,8) + fistpll 0xdeadbeef(%ebx,%ecx,8) + fstpt 0xdeadbeef(%ebx,%ecx,8) + fbstp 0xdeadbeef(%ebx,%ecx,8) + ficoml 0xdeadbeef(%ebx,%ecx,8) + ficompl 0xdeadbeef(%ebx,%ecx,8) + fucompp + ftst + fld1 + fldz + faddl 0xdeadbeef(%ebx,%ecx,8) + fiaddl 0xdeadbeef(%ebx,%ecx,8) + fsubl 0xdeadbeef(%ebx,%ecx,8) + fisubl 0xdeadbeef(%ebx,%ecx,8) + fsubrl 0xdeadbeef(%ebx,%ecx,8) + fisubrl 0xdeadbeef(%ebx,%ecx,8) + fmull 0xdeadbeef(%ebx,%ecx,8) + fimull 0xdeadbeef(%ebx,%ecx,8) + fdivl 0xdeadbeef(%ebx,%ecx,8) + fidivl 0xdeadbeef(%ebx,%ecx,8) + fdivrl 0xdeadbeef(%ebx,%ecx,8) + fidivrl 0xdeadbeef(%ebx,%ecx,8) + fsqrt + fsin + fcos + fchs + fabs + fldcw 0xdeadbeef(%ebx,%ecx,8) + fnstcw 0xdeadbeef(%ebx,%ecx,8) + rdtsc + sysenter + sysexit + ud2 + movnti %ecx,0xdeadbeef(%ebx,%ecx,8) + clflush 0xdeadbeef(%ebx,%ecx,8) + emms + movd %ecx,%mm3 + movd 0xdeadbeef(%ebx,%ecx,8),%mm3 + movd %ecx,%xmm5 + movd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + movd %xmm5,%ecx + movd %xmm5,0xdeadbeef(%ebx,%ecx,8) + movq 0xdeadbeef(%ebx,%ecx,8),%mm3 + movq %mm3,%mm3 + movq %mm3,%mm3 + movq %xmm5,%xmm5 + movq %xmm5,%xmm5 + packssdw %mm3,%mm3 + packssdw %xmm5,%xmm5 + packsswb %mm3,%mm3 + packsswb %xmm5,%xmm5 + packuswb %mm3,%mm3 + packuswb %xmm5,%xmm5 + paddb %mm3,%mm3 + paddb %xmm5,%xmm5 + paddw %mm3,%mm3 + paddw %xmm5,%xmm5 + paddd %mm3,%mm3 + paddd %xmm5,%xmm5 + paddq %mm3,%mm3 + paddq %xmm5,%xmm5 + paddsb %mm3,%mm3 + paddsb %xmm5,%xmm5 + paddsw %mm3,%mm3 + paddsw %xmm5,%xmm5 + paddusb %mm3,%mm3 + paddusb %xmm5,%xmm5 + paddusw %mm3,%mm3 + paddusw %xmm5,%xmm5 + pand %mm3,%mm3 + pand %xmm5,%xmm5 + pandn %mm3,%mm3 + pandn %xmm5,%xmm5 + pcmpeqb %mm3,%mm3 + pcmpeqb %xmm5,%xmm5 + pcmpeqw %mm3,%mm3 + pcmpeqw %xmm5,%xmm5 + pcmpeqd %mm3,%mm3 + pcmpeqd %xmm5,%xmm5 + pcmpgtb %mm3,%mm3 + pcmpgtb %xmm5,%xmm5 + pcmpgtw %mm3,%mm3 + pcmpgtw %xmm5,%xmm5 + pcmpgtd %mm3,%mm3 + pcmpgtd %xmm5,%xmm5 + pmaddwd %mm3,%mm3 + pmaddwd %xmm5,%xmm5 + pmulhw %mm3,%mm3 + pmulhw %xmm5,%xmm5 + pmullw %mm3,%mm3 + pmullw %xmm5,%xmm5 + por %mm3,%mm3 + por %xmm5,%xmm5 + psllw %mm3,%mm3 + psllw %xmm5,%xmm5 + psllw $0x7f,%mm3 + psllw $0x7f,%xmm5 + pslld %mm3,%mm3 + pslld %xmm5,%xmm5 + pslld $0x7f,%mm3 + pslld $0x7f,%xmm5 + psllq %mm3,%mm3 + psllq %xmm5,%xmm5 + psllq $0x7f,%mm3 + psllq $0x7f,%xmm5 + psraw %mm3,%mm3 + psraw %xmm5,%xmm5 + psraw $0x7f,%mm3 + psraw $0x7f,%xmm5 + psrad %mm3,%mm3 + psrad %xmm5,%xmm5 + psrad $0x7f,%mm3 + psrad $0x7f,%xmm5 + psrlw %mm3,%mm3 + psrlw %xmm5,%xmm5 + psrlw $0x7f,%mm3 + psrlw $0x7f,%xmm5 + psrld %mm3,%mm3 + psrld %xmm5,%xmm5 + psrld $0x7f,%mm3 + psrld $0x7f,%xmm5 + psrlq %mm3,%mm3 + psrlq %xmm5,%xmm5 + psrlq $0x7f,%mm3 + psrlq $0x7f,%xmm5 + psubb %mm3,%mm3 + psubb %xmm5,%xmm5 + psubw %mm3,%mm3 + psubw %xmm5,%xmm5 + psubd %mm3,%mm3 + psubd %xmm5,%xmm5 + psubq %mm3,%mm3 + psubq %xmm5,%xmm5 + psubsb %mm3,%mm3 + psubsb %xmm5,%xmm5 + psubsw %mm3,%mm3 + psubsw %xmm5,%xmm5 + psubusb %mm3,%mm3 + psubusb %xmm5,%xmm5 + psubusw %mm3,%mm3 + psubusw %xmm5,%xmm5 + punpckhbw %mm3,%mm3 + punpckhbw %xmm5,%xmm5 + punpckhwd %mm3,%mm3 + punpckhwd %xmm5,%xmm5 + punpckhdq %mm3,%mm3 + punpckhdq %xmm5,%xmm5 + punpcklbw %mm3,%mm3 + punpcklbw %xmm5,%xmm5 + punpcklwd %mm3,%mm3 + punpcklwd %xmm5,%xmm5 + punpckldq %mm3,%mm3 + punpckldq %xmm5,%xmm5 + pxor %mm3,%mm3 + pxor %xmm5,%xmm5 + addps %xmm5,%xmm5 + addss %xmm5,%xmm5 + andnps %xmm5,%xmm5 + andps %xmm5,%xmm5 + cvtpi2ps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + cvtpi2ps %mm3,%xmm5 + cvtps2pi 0xdeadbeef(%ebx,%ecx,8),%mm3 + cvtps2pi %xmm5,%mm3 + cvtsi2ss %ecx,%xmm5 + cvtsi2ss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + cvttps2pi 0xdeadbeef(%ebx,%ecx,8),%mm3 + cvttps2pi %xmm5,%mm3 + cvttss2si 0xdeadbeef(%ebx,%ecx,8),%ecx + cvttss2si %xmm5,%ecx + divps %xmm5,%xmm5 + divss %xmm5,%xmm5 + ldmxcsr 0xdeadbeef(%ebx,%ecx,8) + maskmovq %mm3,%mm3 + maxps %xmm5,%xmm5 + maxss %xmm5,%xmm5 + minps %xmm5,%xmm5 + minss %xmm5,%xmm5 + movaps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + movaps %xmm5,%xmm5 + movaps %xmm5,0xdeadbeef(%ebx,%ecx,8) + movaps %xmm5,%xmm5 + movhlps %xmm5,%xmm5 + movhps %xmm5,0xdeadbeef(%ebx,%ecx,8) + movlhps %xmm5,%xmm5 + movlps %xmm5,0xdeadbeef(%ebx,%ecx,8) + movmskps %xmm5,%ecx + movntps %xmm5,0xdeadbeef(%ebx,%ecx,8) + movntq %mm3,0xdeadbeef(%ebx,%ecx,8) + movntdq %xmm5,0xdeadbeef(%ebx,%ecx,8) + movss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + movss %xmm5,%xmm5 + movss %xmm5,0xdeadbeef(%ebx,%ecx,8) + movss %xmm5,%xmm5 + movups 0xdeadbeef(%ebx,%ecx,8),%xmm5 + movups %xmm5,%xmm5 + movups %xmm5,0xdeadbeef(%ebx,%ecx,8) + movups %xmm5,%xmm5 + mulps %xmm5,%xmm5 + mulss %xmm5,%xmm5 + orps %xmm5,%xmm5 + pavgb %mm3,%mm3 + pavgb %xmm5,%xmm5 + pavgw %mm3,%mm3 + pavgw %xmm5,%xmm5 + pmaxsw %mm3,%mm3 + pmaxsw %xmm5,%xmm5 + pmaxub %mm3,%mm3 + pmaxub %xmm5,%xmm5 + pminsw %mm3,%mm3 + pminsw %xmm5,%xmm5 + pminub %mm3,%mm3 + pminub %xmm5,%xmm5 + pmovmskb %mm3,%ecx + pmovmskb %xmm5,%ecx + pmulhuw %mm3,%mm3 + pmulhuw %xmm5,%xmm5 + prefetchnta 0xdeadbeef(%ebx,%ecx,8) + prefetcht0 0xdeadbeef(%ebx,%ecx,8) + prefetcht1 0xdeadbeef(%ebx,%ecx,8) + prefetcht2 0xdeadbeef(%ebx,%ecx,8) + psadbw %mm3,%mm3 + psadbw %xmm5,%xmm5 + rcpps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + rcpps %xmm5,%xmm5 + rcpss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + rcpss %xmm5,%xmm5 + rsqrtps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + rsqrtps %xmm5,%xmm5 + rsqrtss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + rsqrtss %xmm5,%xmm5 + sqrtps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + sqrtps %xmm5,%xmm5 + sqrtss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + sqrtss %xmm5,%xmm5 + stmxcsr 0xdeadbeef(%ebx,%ecx,8) + subps %xmm5,%xmm5 + subss %xmm5,%xmm5 + ucomiss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + ucomiss %xmm5,%xmm5 + unpckhps %xmm5,%xmm5 + unpcklps %xmm5,%xmm5 + xorps %xmm5,%xmm5 + addpd %xmm5,%xmm5 + addsd %xmm5,%xmm5 + andnpd %xmm5,%xmm5 + andpd %xmm5,%xmm5 + comisd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + comisd %xmm5,%xmm5 + cvtpi2pd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + cvtpi2pd %mm3,%xmm5 + cvtsi2sd %ecx,%xmm5 + cvtsi2sd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + divpd %xmm5,%xmm5 + divsd %xmm5,%xmm5 + maxpd %xmm5,%xmm5 + maxsd %xmm5,%xmm5 + minpd %xmm5,%xmm5 + minsd %xmm5,%xmm5 + movapd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + movapd %xmm5,%xmm5 + movapd %xmm5,0xdeadbeef(%ebx,%ecx,8) + movapd %xmm5,%xmm5 + movhpd %xmm5,0xdeadbeef(%ebx,%ecx,8) + movlpd %xmm5,0xdeadbeef(%ebx,%ecx,8) + movmskpd %xmm5,%ecx + movntpd %xmm5,0xdeadbeef(%ebx,%ecx,8) + movsd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + movsd %xmm5,%xmm5 + movsd %xmm5,0xdeadbeef(%ebx,%ecx,8) + movsd %xmm5,%xmm5 + movupd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + movupd %xmm5,%xmm5 + movupd %xmm5,0xdeadbeef(%ebx,%ecx,8) + movupd %xmm5,%xmm5 + mulpd %xmm5,%xmm5 + mulsd %xmm5,%xmm5 + orpd %xmm5,%xmm5 + sqrtpd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + sqrtpd %xmm5,%xmm5 + sqrtsd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + sqrtsd %xmm5,%xmm5 + subpd %xmm5,%xmm5 + subsd %xmm5,%xmm5 + ucomisd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + ucomisd %xmm5,%xmm5 + unpckhpd %xmm5,%xmm5 + unpcklpd %xmm5,%xmm5 + xorpd %xmm5,%xmm5 + cvtdq2pd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + cvtdq2pd %xmm5,%xmm5 + cvtpd2dq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + cvtpd2dq %xmm5,%xmm5 + cvtdq2ps 0xdeadbeef(%ebx,%ecx,8),%xmm5 + cvtdq2ps %xmm5,%xmm5 + cvtpd2pi 0xdeadbeef(%ebx,%ecx,8),%mm3 + cvtpd2pi %xmm5,%mm3 + cvtps2dq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + cvtps2dq %xmm5,%xmm5 + cvtsd2ss 0xdeadbeef(%ebx,%ecx,8),%xmm5 + cvtsd2ss %xmm5,%xmm5 + cvtss2sd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + cvtss2sd %xmm5,%xmm5 + cvttpd2pi 0xdeadbeef(%ebx,%ecx,8),%mm3 + cvttpd2pi %xmm5,%mm3 + cvttsd2si 0xdeadbeef(%ebx,%ecx,8),%ecx + cvttsd2si %xmm5,%ecx + maskmovdqu %xmm5,%xmm5 + movdqa 0xdeadbeef(%ebx,%ecx,8),%xmm5 + movdqa %xmm5,%xmm5 + movdqa %xmm5,0xdeadbeef(%ebx,%ecx,8) + movdqa %xmm5,%xmm5 + movdqu 0xdeadbeef(%ebx,%ecx,8),%xmm5 + movdqu %xmm5,0xdeadbeef(%ebx,%ecx,8) + movdq2q %xmm5,%mm3 + movq2dq %mm3,%xmm5 + pmuludq %mm3,%mm3 + pmuludq %xmm5,%xmm5 + pslldq $0x7f,%xmm5 + psrldq $0x7f,%xmm5 + punpckhqdq %xmm5,%xmm5 + punpcklqdq %xmm5,%xmm5 + addsubpd %xmm5,%xmm5 + addsubps %xmm5,%xmm5 + haddpd %xmm5,%xmm5 + haddps %xmm5,%xmm5 + hsubpd %xmm5,%xmm5 + hsubps %xmm5,%xmm5 + lddqu 0xdeadbeef(%ebx,%ecx,8),%xmm5 + movddup 0xdeadbeef(%ebx,%ecx,8),%xmm5 + movddup %xmm5,%xmm5 + movshdup 0xdeadbeef(%ebx,%ecx,8),%xmm5 + movshdup %xmm5,%xmm5 + movsldup 0xdeadbeef(%ebx,%ecx,8),%xmm5 + movsldup %xmm5,%xmm5 + phaddw %mm3,%mm3 + phaddw %xmm5,%xmm5 + phaddd %mm3,%mm3 + phaddd %xmm5,%xmm5 + phaddsw %mm3,%mm3 + phaddsw %xmm5,%xmm5 + phsubw %mm3,%mm3 + phsubw %xmm5,%xmm5 + phsubd %mm3,%mm3 + phsubd %xmm5,%xmm5 + phsubsw %mm3,%mm3 + phsubsw %xmm5,%xmm5 + pmaddubsw %mm3,%mm3 + pmaddubsw %xmm5,%xmm5 + pmulhrsw %mm3,%mm3 + pmulhrsw %xmm5,%xmm5 + pshufb %mm3,%mm3 + pshufb %xmm5,%xmm5 + psignb %mm3,%mm3 + psignb %xmm5,%xmm5 + psignw %mm3,%mm3 + psignw %xmm5,%xmm5 + psignd %mm3,%mm3 + psignd %xmm5,%xmm5 + pabsb 0xdeadbeef(%ebx,%ecx,8),%mm3 + pabsb %mm3,%mm3 + pabsb 0xdeadbeef(%ebx,%ecx,8),%xmm5 + pabsb %xmm5,%xmm5 + pabsw 0xdeadbeef(%ebx,%ecx,8),%mm3 + pabsw %mm3,%mm3 + pabsw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + pabsw %xmm5,%xmm5 + pabsd 0xdeadbeef(%ebx,%ecx,8),%mm3 + pabsd %mm3,%mm3 + pabsd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + pabsd %xmm5,%xmm5 + femms + packusdw %xmm5,%xmm5 + pcmpeqq %xmm5,%xmm5 + phminposuw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + phminposuw %xmm5,%xmm5 + pmaxsb %xmm5,%xmm5 + pmaxsd %xmm5,%xmm5 + pmaxud %xmm5,%xmm5 + pmaxuw %xmm5,%xmm5 + pminsb %xmm5,%xmm5 + pminsd %xmm5,%xmm5 + pminud %xmm5,%xmm5 + pminuw %xmm5,%xmm5 + pmovsxbw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + pmovsxbw %xmm5,%xmm5 + pmovsxbd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + pmovsxbd %xmm5,%xmm5 + pmovsxbq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + pmovsxbq %xmm5,%xmm5 + pmovsxwd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + pmovsxwd %xmm5,%xmm5 + pmovsxwq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + pmovsxwq %xmm5,%xmm5 + pmovsxdq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + pmovsxdq %xmm5,%xmm5 + pmovzxbw 0xdeadbeef(%ebx,%ecx,8),%xmm5 + pmovzxbw %xmm5,%xmm5 + pmovzxbd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + pmovzxbd %xmm5,%xmm5 + pmovzxbq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + pmovzxbq %xmm5,%xmm5 + pmovzxwd 0xdeadbeef(%ebx,%ecx,8),%xmm5 + pmovzxwd %xmm5,%xmm5 + pmovzxwq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + pmovzxwq %xmm5,%xmm5 + pmovzxdq 0xdeadbeef(%ebx,%ecx,8),%xmm5 + pmovzxdq %xmm5,%xmm5 + pmuldq %xmm5,%xmm5 + pmulld %xmm5,%xmm5 + ptest 0xdeadbeef(%ebx,%ecx,8),%xmm5 + ptest %xmm5,%xmm5 + pcmpgtq %xmm5,%xmm5 Modified: llvm/trunk/test/lit.cfg URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=95143&r1=95142&r2=95143&view=diff ============================================================================== --- llvm/trunk/test/lit.cfg (original) +++ llvm/trunk/test/lit.cfg Tue Feb 2 16:00:15 2010 @@ -127,6 +127,9 @@ def llvm_supports_target(name): return name in targets +def llvm_supports_darwin_and_target(name): + return 'darwin' in config.target_triple and llvm_supports_target(name) + langs = set(site_exp['llvmgcc_langs'].split(',')) def llvm_gcc_supports(name): return name in langs From evan.cheng at apple.com Tue Feb 2 16:02:26 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 2 Feb 2010 14:02:26 -0800 Subject: [llvm-commits] [compiler-rt] r95132 - in /compiler-rt/trunk: lib/arm/sync_synchronize.S make/platform/darwin_bni.mk In-Reply-To: <201002022134.o12LY4JO019389@zion.cs.uiuc.edu> References: <201002022134.o12LY4JO019389@zion.cs.uiuc.edu> Message-ID: Hi Nick, It actually has nothing to do with -fno-builtin, which only turns off codegen for functions which with __builtin_ prefix. Evan On Feb 2, 2010, at 1:34 PM, Nick Kledzik wrote: > Author: kledzik > Date: Tue Feb 2 15:34:04 2010 > New Revision: 95132 > > URL: http://llvm.org/viewvc/llvm-project?rev=95132&view=rev > Log: > add __sync_synchronize. Needed by compiler when emitting thumb1 with -fno-builtin > > Added: > compiler-rt/trunk/lib/arm/sync_synchronize.S > Modified: > compiler-rt/trunk/make/platform/darwin_bni.mk > > Added: compiler-rt/trunk/lib/arm/sync_synchronize.S > URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/arm/sync_synchronize.S?rev=95132&view=auto > > ============================================================================== > --- compiler-rt/trunk/lib/arm/sync_synchronize.S (added) > +++ compiler-rt/trunk/lib/arm/sync_synchronize.S Tue Feb 2 15:34:04 2010 > @@ -0,0 +1,33 @@ > +//===-- sync_synchronize - Implement memory barrier * ----------------------===// > +// > +// The LLVM Compiler Infrastructure > +// > +// This file is distributed under the University of Illinois Open Source > +// License. See LICENSE.TXT for details. > +// > +//===----------------------------------------------------------------------===// > + > +#include "../assembly.h" > + > +// > +// When compiling a use of the gcc built-in __sync_synchronize() in thumb1 mode > +// the compiler may emit a call to __sync_synchronize. > +// On Darwin the implementation jumps to an OS supplied function named > +// OSMemoryBarrier > +// > + > + .text > + .syntax unified > + > +#if __APPLE__ > + > +DEFINE_COMPILERRT_PRIVATE_FUNCTION(__sync_synchronize) > + stmfd sp!, {r7, lr} > + add r7, sp, #0 > + bl _OSMemoryBarrier > + ldmfd sp!, {r7, pc} > + > + // tell linker it can break up file at label boundaries > + .subsections_via_symbols > + > +#endif > > Modified: compiler-rt/trunk/make/platform/darwin_bni.mk > URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/platform/darwin_bni.mk?rev=95132&r1=95131&r2=95132&view=diff > > ============================================================================== > --- compiler-rt/trunk/make/platform/darwin_bni.mk (original) > +++ compiler-rt/trunk/make/platform/darwin_bni.mk Tue Feb 2 15:34:04 2010 > @@ -54,6 +54,7 @@ > subdf3vfp subsf3vfp truncdfsf2vfp unorddf2vfp unordsf2vfp \ > modsi3 umodsi3 udivsi3 divsi3 \ > switch8 switchu8 switch16 switch32 \ > - restore_vfp_d8_d15_regs save_vfp_d8_d15_regs > + restore_vfp_d8_d15_regs save_vfp_d8_d15_regs \ > + sync_synchronize > > VISIBILITY_HIDDEN := 0 > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From sabre at nondot.org Tue Feb 2 16:03:00 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 22:03:00 -0000 Subject: [llvm-commits] [llvm] r95144 - in /llvm/trunk/lib/Target/X86: X86.h X86CodeEmitter.cpp X86TargetMachine.cpp X86TargetMachine.h Message-ID: <201002022203.o12M30Qo020833@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 16:03:00 2010 New Revision: 95144 URL: http://llvm.org/viewvc/llvm-project?rev=95144&view=rev Log: remove dead code. Modified: llvm/trunk/lib/Target/X86/X86.h llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp llvm/trunk/lib/Target/X86/X86TargetMachine.cpp llvm/trunk/lib/Target/X86/X86TargetMachine.h Modified: llvm/trunk/lib/Target/X86/X86.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86.h?rev=95144&r1=95143&r2=95144&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86.h (original) +++ llvm/trunk/lib/Target/X86/X86.h Tue Feb 2 16:03:00 2010 @@ -46,13 +46,8 @@ /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code /// to the specified MCE object. - -FunctionPass *createX86CodeEmitterPass(X86TargetMachine &TM, - MachineCodeEmitter &MCE); FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM, JITCodeEmitter &JCE); -FunctionPass *createX86ObjectCodeEmitterPass(X86TargetMachine &TM, - ObjectCodeEmitter &OCE); MCCodeEmitter *createX86MCCodeEmitter(const Target &, TargetMachine &TM); Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp?rev=95144&r1=95143&r2=95144&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Tue Feb 2 16:03:00 2010 @@ -21,9 +21,7 @@ #include "X86.h" #include "llvm/LLVMContext.h" #include "llvm/PassManager.h" -#include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/CodeGen/JITCodeEmitter.h" -#include "llvm/CodeGen/ObjectCodeEmitter.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineModuleInfo.h" @@ -110,19 +108,10 @@ /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code /// to the specified templated MachineCodeEmitter object. - -FunctionPass *llvm::createX86CodeEmitterPass(X86TargetMachine &TM, - MachineCodeEmitter &MCE) { - return new Emitter(TM, MCE); -} FunctionPass *llvm::createX86JITCodeEmitterPass(X86TargetMachine &TM, JITCodeEmitter &JCE) { return new Emitter(TM, JCE); } -FunctionPass *llvm::createX86ObjectCodeEmitterPass(X86TargetMachine &TM, - ObjectCodeEmitter &OCE) { - return new Emitter(TM, OCE); -} template bool Emitter::runOnMachineFunction(MachineFunction &MF) { Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=95144&r1=95143&r2=95144&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original) +++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Tue Feb 2 16:03:00 2010 @@ -168,22 +168,6 @@ bool X86TargetMachine::addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE) { - // FIXME: Move this to TargetJITInfo! - // On Darwin, do not override 64-bit setting made in X86TargetMachine(). - if (DefRelocModel == Reloc::Default && - (!Subtarget.isTargetDarwin() || !Subtarget.is64Bit())) { - setRelocationModel(Reloc::Static); - Subtarget.setPICStyle(PICStyles::None); - } - - PM.add(createX86CodeEmitterPass(*this, MCE)); - - return false; -} - -bool X86TargetMachine::addCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, JITCodeEmitter &JCE) { // FIXME: Move this to TargetJITInfo! // On Darwin, do not override 64-bit setting made in X86TargetMachine(). @@ -199,13 +183,6 @@ return false; } -bool X86TargetMachine::addCodeEmitter(PassManagerBase &PM, - CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &OCE) { - PM.add(createX86ObjectCodeEmitterPass(*this, OCE)); - return false; -} - void X86TargetMachine::setCodeModelForStatic() { if (getCodeModel() != CodeModel::Default) return; Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.h?rev=95144&r1=95143&r2=95144&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86TargetMachine.h (original) +++ llvm/trunk/lib/Target/X86/X86TargetMachine.h Tue Feb 2 16:03:00 2010 @@ -79,11 +79,7 @@ virtual bool addPreRegAlloc(PassManagerBase &PM, CodeGenOpt::Level OptLevel); virtual bool addPostRegAlloc(PassManagerBase &PM, CodeGenOpt::Level OptLevel); virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, - MachineCodeEmitter &MCE); - virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, JITCodeEmitter &JCE); - virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel, - ObjectCodeEmitter &OCE); }; /// X86_32TargetMachine - X86 32-bit target machine. From echristo at apple.com Tue Feb 2 16:10:44 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 02 Feb 2010 22:10:44 -0000 Subject: [llvm-commits] [llvm] r95145 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineCalls.cpp lib/Transforms/Scalar/SimplifyLibCalls.cpp test/Transforms/InstCombine/objsize.ll test/Transforms/SimplifyLibCalls/strcpy_chk.ll Message-ID: <201002022210.o12MAiFp021149@zion.cs.uiuc.edu> Author: echristo Date: Tue Feb 2 16:10:43 2010 New Revision: 95145 URL: http://llvm.org/viewvc/llvm-project?rev=95145&view=rev Log: Re-add strcmp and known size object size checking optimization. Passed bootstrap and nightly test run here. Added: llvm/trunk/test/Transforms/InstCombine/objsize.ll llvm/trunk/test/Transforms/SimplifyLibCalls/strcpy_chk.ll Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=95145&r1=95144&r2=95145&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Tue Feb 2 16:10:43 2010 @@ -633,16 +633,40 @@ break; } case Intrinsic::objectsize: { - ConstantInt *Const = cast(II->getOperand(2)); - const Type *Ty = CI.getType(); + const Type *ReturnTy = CI.getType(); + Value *Op1 = II->getOperand(1); - // 0 is maximum number of bytes left, 1 is minimum number of bytes left. - // TODO: actually add these values, the current return values are "don't - // know". - if (Const->getZExtValue() == 0) - return ReplaceInstUsesWith(CI, Constant::getAllOnesValue(Ty)); - else - return ReplaceInstUsesWith(CI, ConstantInt::get(Ty, 0)); + // If we're a constant expr then we just return the number of bytes + // left in whatever we're indexing. Since it's constant there's no + // need for maximum or minimum bytes. + if (ConstantExpr *CE = dyn_cast(Op1)) { + // If this isn't a GEP give up. + if (CE->getOpcode() != Instruction::GetElementPtr) return 0; + + const PointerType *ObjTy = + reinterpret_cast(CE->getOperand(0)->getType()); + + if (const ArrayType *AT = dyn_cast(ObjTy->getElementType())) { + + // Deal with multi-dimensional arrays + const ArrayType *SAT = AT; + while ((AT = dyn_cast(AT->getElementType()))) + SAT = AT; + + size_t numElems = SAT->getNumElements(); + // We return the remaining bytes, so grab the size of an element + // in bytes. + size_t sizeofElem = SAT->getElementType()->getPrimitiveSizeInBits() / 8; + + ConstantInt *Const = + cast(CE->getOperand(CE->getNumOperands() - 1)); + size_t indx = Const->getZExtValue(); + return ReplaceInstUsesWith(CI, + ConstantInt::get(ReturnTy, + ((numElems - indx) * sizeofElem))); + } + } + // TODO: Add more types here. } } Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=95145&r1=95144&r2=95145&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Tue Feb 2 16:10:43 2010 @@ -1213,8 +1213,13 @@ if (!SizeCI) return 0; - // We don't have any length information, just lower to a plain strcpy. - if (SizeCI->isAllOnesValue()) + // If a) we don't have any length information, or b) we know this will + // fit then just lower to a plain strcpy. Otherwise we'll keep our + // strcpy_chk call which may fail at runtime if the size is too long. + // TODO: It might be nice to get a maximum length out of the possible + // string lengths for varying. + if (SizeCI->isAllOnesValue() || + SizeCI->getZExtValue() >= GetStringLength(CI->getOperand(2))) return EmitStrCpy(CI->getOperand(1), CI->getOperand(2), B); return 0; Added: llvm/trunk/test/Transforms/InstCombine/objsize.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/objsize.ll?rev=95145&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/objsize.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/objsize.ll Tue Feb 2 16:10:43 2010 @@ -0,0 +1,30 @@ +; RUN: opt < %s -instcombine -S | FileCheck %s + at a = common global [60 x i8] zeroinitializer, align 1 ; <[60 x i8]*> + at .str = private constant [8 x i8] c"abcdefg\00" ; <[8 x i8]*> + +define i32 @foo() nounwind { +; CHECK: @foo +; CHECK-NEXT: ret i32 60 + %1 = call i32 @llvm.objectsize.i32(i8* getelementptr inbounds ([60 x i8]* @a, i32 0, i32 0), i1 false) + ret i32 %1 +} + +define i8* @bar() nounwind { +; CHECK: @bar +entry: + %retval = alloca i8* + %0 = call i32 @llvm.objectsize.i32(i8* getelementptr inbounds ([60 x i8]* @a, i32 0, i32 0), i1 false) + %cmp = icmp ne i32 %0, -1 +; CHECK: br i1 true + br i1 %cmp, label %cond.true, label %cond.false + +cond.true: + %1 = load i8** %retval; + ret i8* %1; + +cond.false: + %2 = load i8** %retval; + ret i8* %2; +} + +declare i32 @llvm.objectsize.i32(i8*, i1) nounwind readonly \ No newline at end of file Added: llvm/trunk/test/Transforms/SimplifyLibCalls/strcpy_chk.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyLibCalls/strcpy_chk.ll?rev=95145&view=auto ============================================================================== --- llvm/trunk/test/Transforms/SimplifyLibCalls/strcpy_chk.ll (added) +++ llvm/trunk/test/Transforms/SimplifyLibCalls/strcpy_chk.ll Tue Feb 2 16:10:43 2010 @@ -0,0 +1,12 @@ +; RUN: opt < %s -simplify-libcalls -S | FileCheck %s + at a = common global [60 x i8] zeroinitializer, align 1 ; <[60 x i8]*> [#uses=1] + at .str = private constant [8 x i8] c"abcdefg\00" ; <[8 x i8]*> [#uses=1] + +define i8* @foo() nounwind { +; CHECK: @foo +; CHECK-NEXT: call i8* @strcpy + %call = call i8* @__strcpy_chk(i8* getelementptr inbounds ([60 x i8]* @a, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8]* @.str, i32 0, i32 0), i32 60) ; [#uses=1] + ret i8* %call +} + +declare i8* @__strcpy_chk(i8*, i8*, i32) nounwind From sabre at nondot.org Tue Feb 2 16:13:22 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 22:13:22 -0000 Subject: [llvm-commits] [llvm] r95146 - in /llvm/trunk/lib/Target: ARM/ARM.h ARM/ARMCodeEmitter.cpp PowerPC/PPC.h Message-ID: <201002022213.o12MDMXo021327@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 16:13:21 2010 New Revision: 95146 URL: http://llvm.org/viewvc/llvm-project?rev=95146&view=rev Log: tidy some targets. Modified: llvm/trunk/lib/Target/ARM/ARM.h llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp llvm/trunk/lib/Target/PowerPC/PPC.h Modified: llvm/trunk/lib/Target/ARM/ARM.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARM.h?rev=95146&r1=95145&r2=95146&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARM.h (original) +++ llvm/trunk/lib/Target/ARM/ARM.h Tue Feb 2 16:13:21 2010 @@ -23,9 +23,7 @@ class ARMBaseTargetMachine; class FunctionPass; -class MachineCodeEmitter; class JITCodeEmitter; -class ObjectCodeEmitter; class formatted_raw_ostream; // Enums corresponding to ARM condition codes Modified: llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp?rev=95146&r1=95145&r2=95146&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp Tue Feb 2 16:13:21 2010 @@ -24,9 +24,7 @@ #include "llvm/DerivedTypes.h" #include "llvm/Function.h" #include "llvm/PassManager.h" -#include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/CodeGen/JITCodeEmitter.h" -#include "llvm/CodeGen/ObjectCodeEmitter.h" #include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" Modified: llvm/trunk/lib/Target/PowerPC/PPC.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPC.h?rev=95146&r1=95145&r2=95146&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPC.h (original) +++ llvm/trunk/lib/Target/PowerPC/PPC.h Tue Feb 2 16:13:21 2010 @@ -23,8 +23,6 @@ namespace llvm { class PPCTargetMachine; class FunctionPass; - class MachineCodeEmitter; - class ObjectCodeEmitter; class formatted_raw_ostream; FunctionPass *createPPCBranchSelectionPass(); From echristo at apple.com Tue Feb 2 16:29:26 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 02 Feb 2010 22:29:26 -0000 Subject: [llvm-commits] [llvm] r95147 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Message-ID: <201002022229.o12MTQ2p022081@zion.cs.uiuc.edu> Author: echristo Date: Tue Feb 2 16:29:26 2010 New Revision: 95147 URL: http://llvm.org/viewvc/llvm-project?rev=95147&view=rev Log: Reformat my last patch slightly. Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=95147&r1=95146&r2=95147&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Tue Feb 2 16:29:26 2010 @@ -636,9 +636,9 @@ const Type *ReturnTy = CI.getType(); Value *Op1 = II->getOperand(1); - // If we're a constant expr then we just return the number of bytes - // left in whatever we're indexing. Since it's constant there's no - // need for maximum or minimum bytes. + // If we're a constant expr then we just return the number of bytes + // left in whatever we're indexing. Since it's constant there's no + // need for maximum or minimum bytes. if (ConstantExpr *CE = dyn_cast(Op1)) { // If this isn't a GEP give up. if (CE->getOpcode() != Instruction::GetElementPtr) return 0; @@ -665,7 +665,7 @@ ConstantInt::get(ReturnTy, ((numElems - indx) * sizeofElem))); } - } + } // TODO: Add more types here. } } From sabre at nondot.org Tue Feb 2 16:31:11 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 22:31:11 -0000 Subject: [llvm-commits] [llvm] r95148 - in /llvm/trunk: include/llvm/CodeGen/FileWriters.h include/llvm/Target/TargetMachine.h lib/CodeGen/ELFWriter.cpp lib/CodeGen/LLVMTargetMachine.cpp tools/llc/llc.cpp tools/lto/LTOCodeGenerator.cpp Message-ID: <201002022231.o12MVB8A022188@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 16:31:11 2010 New Revision: 95148 URL: http://llvm.org/viewvc/llvm-project?rev=95148&view=rev Log: Remove a bunch of stuff around the edges of the ELF writer. Now the only use of the ELF writer is the JIT, which won't be easy to fix in the short term. :( :( Removed: llvm/trunk/include/llvm/CodeGen/FileWriters.h Modified: llvm/trunk/include/llvm/Target/TargetMachine.h llvm/trunk/lib/CodeGen/ELFWriter.cpp llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp llvm/trunk/tools/llc/llc.cpp llvm/trunk/tools/lto/LTOCodeGenerator.cpp Removed: llvm/trunk/include/llvm/CodeGen/FileWriters.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/FileWriters.h?rev=95147&view=auto ============================================================================== --- llvm/trunk/include/llvm/CodeGen/FileWriters.h (original) +++ llvm/trunk/include/llvm/CodeGen/FileWriters.h (removed) @@ -1,28 +0,0 @@ -//===-- FileWriters.h - File Writers Creation Functions ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Functions to add the various file writer passes. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_FILEWRITERS_H -#define LLVM_CODEGEN_FILEWRITERS_H - -namespace llvm { - - class PassManagerBase; - class ObjectCodeEmitter; - class TargetMachine; - class raw_ostream; - - ObjectCodeEmitter *AddELFWriter(PassManagerBase &FPM, raw_ostream &O, - TargetMachine &TM); -} // end llvm namespace - -#endif // LLVM_CODEGEN_FILEWRITERS_H Modified: llvm/trunk/include/llvm/Target/TargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=95148&r1=95147&r2=95148&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetMachine.h (original) +++ llvm/trunk/include/llvm/Target/TargetMachine.h Tue Feb 2 16:31:11 2010 @@ -29,9 +29,7 @@ class TargetJITInfo; class TargetLowering; class TargetFrameInfo; -class MachineCodeEmitter; class JITCodeEmitter; -class ObjectCodeEmitter; class TargetRegisterInfo; class PassManagerBase; class PassManager; @@ -223,7 +221,7 @@ } /// addPassesToEmitMachineCode - Add passes to the specified pass manager to - /// get machine code emitted. This uses a MachineCodeEmitter object to handle + /// get machine code emitted. This uses a JITCodeEmitter object to handle /// actually outputting the machine code and resolving things like the address /// of functions. This method returns true if machine code emission is /// not supported. @@ -280,7 +278,7 @@ CodeGenOpt::Level); /// addPassesToEmitMachineCode - Add passes to the specified pass manager to - /// get machine code emitted. This uses a MachineCodeEmitter object to handle + /// get machine code emitted. This uses a JITCodeEmitter object to handle /// actually outputting the machine code and resolving things like the address /// of functions. This method returns true if machine code emission is /// not supported. Modified: llvm/trunk/lib/CodeGen/ELFWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ELFWriter.cpp?rev=95148&r1=95147&r2=95148&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/ELFWriter.cpp (original) +++ llvm/trunk/lib/CodeGen/ELFWriter.cpp Tue Feb 2 16:31:11 2010 @@ -59,15 +59,6 @@ char ELFWriter::ID = 0; -/// AddELFWriter - Add the ELF writer to the function pass manager -ObjectCodeEmitter *llvm::AddELFWriter(PassManagerBase &PM, - raw_ostream &O, - TargetMachine &TM) { - ELFWriter *EW = new ELFWriter(O, TM); - PM.add(EW); - return EW->getObjectCodeEmitter(); -} - //===----------------------------------------------------------------------===// // ELFWriter Implementation //===----------------------------------------------------------------------===// Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=95148&r1=95147&r2=95148&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Feb 2 16:31:11 2010 @@ -17,7 +17,6 @@ #include "llvm/Assembly/PrintModulePass.h" #include "llvm/CodeGen/AsmPrinter.h" #include "llvm/CodeGen/Passes.h" -#include "llvm/CodeGen/FileWriters.h" #include "llvm/CodeGen/GCStrategy.h" #include "llvm/CodeGen/MachineFunctionAnalysis.h" #include "llvm/Target/TargetOptions.h" @@ -126,7 +125,7 @@ } /// addPassesToEmitMachineCode - Add passes to the specified pass manager to -/// get machine code emitted. This uses a MachineCodeEmitter object to handle +/// get machine code emitted. This uses a JITCodeEmitter object to handle /// actually outputting the machine code and resolving things like the address /// of functions. This method should returns true if machine code emission is /// not supported. Modified: llvm/trunk/tools/llc/llc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=95148&r1=95147&r2=95148&view=diff ============================================================================== --- llvm/trunk/tools/llc/llc.cpp (original) +++ llvm/trunk/tools/llc/llc.cpp Tue Feb 2 16:31:11 2010 @@ -20,7 +20,6 @@ #include "llvm/ADT/Triple.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Support/IRReader.h" -#include "llvm/CodeGen/FileWriters.h" #include "llvm/CodeGen/LinkAllAsmWriterComponents.h" #include "llvm/CodeGen/LinkAllCodegenComponents.h" #include "llvm/Config/config.h" Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOCodeGenerator.cpp?rev=95148&r1=95147&r2=95148&view=diff ============================================================================== --- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original) +++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Tue Feb 2 16:31:11 2010 @@ -15,7 +15,6 @@ #include "LTOModule.h" #include "LTOCodeGenerator.h" - #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Linker.h" @@ -28,7 +27,6 @@ #include "llvm/Analysis/LoopPass.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Bitcode/ReaderWriter.h" -#include "llvm/CodeGen/FileWriters.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/FormattedStream.h" #include "llvm/Support/MemoryBuffer.h" From sabre at nondot.org Tue Feb 2 16:36:30 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 22:36:30 -0000 Subject: [llvm-commits] [llvm] r95149 - /llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s Message-ID: <201002022236.o12MaUc6022409@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 16:36:29 2010 New Revision: 95149 URL: http://llvm.org/viewvc/llvm-project?rev=95149&view=rev Log: remove the # TAILCALL markers, which was causing the to fail. It's unclear if the matcher is nondeterminstic of what here, but I'm getting matches without TAILCALL and some other hosts are getting matches with it. Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s?rev=95149&r1=95148&r2=95149&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_32-bit_cat.s Tue Feb 2 16:36:29 2010 @@ -3,8 +3,7 @@ // will not yet encode correctly. The subset that will encode correctly are in // the file x86_32-bit.s . -// RUN: true -// llvm-mc -triple i386-unknown-unknown %s | FileCheck %s +// RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s // CHECK: movb $127, 3735928559(%ebx,%ecx,8) movb $0x7f,0xdeadbeef(%ebx,%ecx,8) @@ -1263,46 +1262,46 @@ // CHECK: lcallw *32493 lcallw *0x7eed -// CHECK: jmp 32493 # TAILCALL +// CHECK: jmp 32493 jmp 0x7eed -// CHECK: jmp 3133065982 # TAILCALL +// CHECK: jmp 3133065982 jmp 0xbabecafe -// CHECK: jmp 305419896 # TAILCALL +// CHECK: jmp 305419896 jmp 0x12345678 -// CHECK: jmp -77129852792157442 # TAILCALL +// CHECK: jmp -77129852792157442 jmp 0xfeedfacebabecafe -// CHECK: jmp *3735928559(%ebx,%ecx,8) # TAILCALL +// CHECK: jmp *3735928559(%ebx,%ecx,8) jmp *0xdeadbeef(%ebx,%ecx,8) -// CHECK: jmp 32493 # TAILCALL +// CHECK: jmp 32493 jmp 0x7eed -// CHECK: jmp 3133065982 # TAILCALL +// CHECK: jmp 3133065982 jmp 0xbabecafe -// CHECK: jmp 305419896 # TAILCALL +// CHECK: jmp 305419896 jmp 0x12345678 -// CHECK: jmp *3135175374 # TAILCALL +// CHECK: jmp *3135175374 jmp *0xbadeface -// CHECK: jmp *3735928559(%ebx,%ecx,8) # TAILCALL +// CHECK: jmp *3735928559(%ebx,%ecx,8) jmp *0xdeadbeef(%ebx,%ecx,8) -// CHECK: jmp 32493 # TAILCALL +// CHECK: jmp 32493 jmp 0x7eed -// CHECK: jmp 3133065982 # TAILCALL +// CHECK: jmp 3133065982 jmp 0xbabecafe -// CHECK: jmp 305419896 # TAILCALL +// CHECK: jmp 305419896 jmp 0x12345678 -// CHECK: jmp *3135175374 # TAILCALL +// CHECK: jmp *3135175374 jmp *0xbadeface // CHECK: ljmpl *3735928559(%ebx,%ecx,8) From sabre at nondot.org Tue Feb 2 16:37:42 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 22:37:42 -0000 Subject: [llvm-commits] [llvm] r95150 - /llvm/trunk/lib/CodeGen/ELFWriter.cpp Message-ID: <201002022237.o12Mbg3s022469@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 16:37:42 2010 New Revision: 95150 URL: http://llvm.org/viewvc/llvm-project?rev=95150&view=rev Log: remove dead #include, stupid symlinks. Modified: llvm/trunk/lib/CodeGen/ELFWriter.cpp Modified: llvm/trunk/lib/CodeGen/ELFWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ELFWriter.cpp?rev=95150&r1=95149&r2=95150&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/ELFWriter.cpp (original) +++ llvm/trunk/lib/CodeGen/ELFWriter.cpp Tue Feb 2 16:37:42 2010 @@ -37,7 +37,6 @@ #include "llvm/PassManager.h" #include "llvm/DerivedTypes.h" #include "llvm/CodeGen/BinaryObject.h" -#include "llvm/CodeGen/FileWriters.h" #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/CodeGen/ObjectCodeEmitter.h" #include "llvm/CodeGen/MachineCodeEmitter.h" From sabre at nondot.org Tue Feb 2 16:54:51 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 22:54:51 -0000 Subject: [llvm-commits] [llvm] r95152 - in /llvm/trunk/lib/CodeGen: AsmPrinter/AsmPrinter.cpp LLVMTargetMachine.cpp Message-ID: <201002022254.o12MspED023144@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 16:54:51 2010 New Revision: 95152 URL: http://llvm.org/viewvc/llvm-project?rev=95152&view=rev Log: move handling of asm-verbose out of AsmPrinter.cpp into LLVMTargetMachine.cpp with the rest of the command line options. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=95152&r1=95151&r2=95152&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Feb 2 16:54:51 2010 @@ -53,22 +53,9 @@ STATISTIC(EmittedInsts, "Number of machine instrs printed"); -static cl::opt -AsmVerbose("asm-verbose", cl::desc("Add comments to directives."), - cl::init(cl::BOU_UNSET)); - -static bool getVerboseAsm(bool VDef) { - switch (AsmVerbose) { - default: - case cl::BOU_UNSET: return VDef; - case cl::BOU_TRUE: return true; - case cl::BOU_FALSE: return false; - } -} - char AsmPrinter::ID = 0; AsmPrinter::AsmPrinter(formatted_raw_ostream &o, TargetMachine &tm, - const MCAsmInfo *T, bool VDef) + const MCAsmInfo *T, bool VerboseAsm) : MachineFunctionPass(&ID), O(o), TM(tm), MAI(T), TRI(tm.getRegisterInfo()), @@ -76,11 +63,11 @@ // FIXME: Pass instprinter to streamer. OutStreamer(*createAsmStreamer(OutContext, O, *T, TM.getTargetData()->isLittleEndian(), - getVerboseAsm(VDef), 0)), + VerboseAsm, 0)), LastMI(0), LastFn(0), Counter(~0U), PrevDLT(NULL) { DW = 0; MMI = 0; - VerboseAsm = getVerboseAsm(VDef); + this->VerboseAsm = VerboseAsm; } AsmPrinter::~AsmPrinter() { Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=95152&r1=95151&r2=95152&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Feb 2 16:54:51 2010 @@ -62,6 +62,18 @@ cl::desc("Verify generated machine code"), cl::init(getenv("LLVM_VERIFY_MACHINEINSTRS")!=NULL)); +static cl::opt +AsmVerbose("asm-verbose", cl::desc("Add comments to directives."), + cl::init(cl::BOU_UNSET)); + +static bool getVerboseAsm(bool VDef) { + switch (AsmVerbose) { + default: + case cl::BOU_UNSET: return VDef; + case cl::BOU_TRUE: return true; + case cl::BOU_FALSE: return false; + } +} // Enable or disable FastISel. Both options are needed, because // FastISel is enabled by default with -fast, and we wish to be @@ -111,7 +123,7 @@ case CGFT_AssemblyFile: { FunctionPass *Printer = getTarget().createAsmPrinter(Out, *this, getMCAsmInfo(), - getAsmVerbosityDefault()); + getVerboseAsm(getAsmVerbosityDefault())); if (Printer == 0) return CGFT_ErrorOccurred; PM.add(Printer); break; From sabre at nondot.org Tue Feb 2 16:58:13 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 22:58:13 -0000 Subject: [llvm-commits] [llvm] r95153 - /llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Message-ID: <201002022258.o12MwDaU023367@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 16:58:13 2010 New Revision: 95153 URL: http://llvm.org/viewvc/llvm-project?rev=95153&view=rev Log: simplify getVerboseAsm Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=95153&r1=95152&r2=95153&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Feb 2 16:58:13 2010 @@ -66,12 +66,12 @@ AsmVerbose("asm-verbose", cl::desc("Add comments to directives."), cl::init(cl::BOU_UNSET)); -static bool getVerboseAsm(bool VDef) { +static bool getVerboseAsm() { switch (AsmVerbose) { - default: - case cl::BOU_UNSET: return VDef; - case cl::BOU_TRUE: return true; - case cl::BOU_FALSE: return false; + default: + case cl::BOU_UNSET: return TargetMachine::getAsmVerbosityDefault(); + case cl::BOU_TRUE: return true; + case cl::BOU_FALSE: return false; } } @@ -123,7 +123,7 @@ case CGFT_AssemblyFile: { FunctionPass *Printer = getTarget().createAsmPrinter(Out, *this, getMCAsmInfo(), - getVerboseAsm(getAsmVerbosityDefault())); + getVerboseAsm()); if (Printer == 0) return CGFT_ErrorOccurred; PM.add(Printer); break; From echristo at apple.com Tue Feb 2 17:01:32 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 02 Feb 2010 23:01:32 -0000 Subject: [llvm-commits] [llvm] r95154 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineCalls.cpp lib/Transforms/Scalar/SimplifyLibCalls.cpp test/Transforms/InstCombine/objsize.ll test/Transforms/SimplifyLibCalls/strcpy_chk.ll Message-ID: <201002022301.o12N1WQF023633@zion.cs.uiuc.edu> Author: echristo Date: Tue Feb 2 17:01:31 2010 New Revision: 95154 URL: http://llvm.org/viewvc/llvm-project?rev=95154&view=rev Log: Hopefully temporarily revert this. Removed: llvm/trunk/test/Transforms/InstCombine/objsize.ll llvm/trunk/test/Transforms/SimplifyLibCalls/strcpy_chk.ll Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=95154&r1=95153&r2=95154&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Tue Feb 2 17:01:31 2010 @@ -102,7 +102,7 @@ if (PrefAlign > Align) Align = EnforceKnownAlignment(V, Align, PrefAlign); - + // We don't need to make any adjustment. return Align; } @@ -114,30 +114,30 @@ unsigned CopyAlign = MI->getAlignment(); if (CopyAlign < MinAlign) { - MI->setAlignment(ConstantInt::get(MI->getAlignmentType(), + MI->setAlignment(ConstantInt::get(MI->getAlignmentType(), MinAlign, false)); return MI; } - + // If MemCpyInst length is 1/2/4/8 bytes then replace memcpy with // load/store. ConstantInt *MemOpLength = dyn_cast(MI->getOperand(3)); if (MemOpLength == 0) return 0; - + // Source and destination pointer types are always "i8*" for intrinsic. See // if the size is something we can handle with a single primitive load/store. // A single load+store correctly handles overlapping memory in the memmove // case. unsigned Size = MemOpLength->getZExtValue(); if (Size == 0) return MI; // Delete this mem transfer. - + if (Size > 8 || (Size&(Size-1))) return 0; // If not 1/2/4/8 bytes, exit. - + // Use an integer load+store unless we can find something better. Type *NewPtrTy = PointerType::getUnqual(IntegerType::get(MI->getContext(), Size<<3)); - + // Memcpy forces the use of i8* for the source and destination. That means // that if you're using memcpy to move one double around, you'll get a cast // from double* to i8*. We'd much rather use a double load+store rather than @@ -165,18 +165,18 @@ } else break; } - + if (SrcETy->isSingleValueType()) NewPtrTy = PointerType::getUnqual(SrcETy); } } - - + + // If the memcpy/memmove provides better alignment info than we can // infer, use it. SrcAlign = std::max(SrcAlign, CopyAlign); DstAlign = std::max(DstAlign, CopyAlign); - + Value *Src = Builder->CreateBitCast(MI->getOperand(2), NewPtrTy); Value *Dest = Builder->CreateBitCast(MI->getOperand(1), NewPtrTy); Instruction *L = new LoadInst(Src, "tmp", false, SrcAlign); @@ -195,7 +195,7 @@ Alignment, false)); return MI; } - + // Extract the length and alignment and fill if they are constant. ConstantInt *LenC = dyn_cast(MI->getLength()); ConstantInt *FillC = dyn_cast(MI->getValue()); @@ -203,25 +203,25 @@ return 0; uint64_t Len = LenC->getZExtValue(); Alignment = MI->getAlignment(); - + // If the length is zero, this is a no-op if (Len == 0) return MI; // memset(d,c,0,a) -> noop - + // memset(s,c,n) -> store s, c (for n=1,2,4,8) if (Len <= 8 && isPowerOf2_32((uint32_t)Len)) { const Type *ITy = IntegerType::get(MI->getContext(), Len*8); // n=1 -> i8. - + Value *Dest = MI->getDest(); Dest = Builder->CreateBitCast(Dest, PointerType::getUnqual(ITy)); // Alignment 0 is identity for alignment 1 for memset, but not store. if (Alignment == 0) Alignment = 1; - + // Extract the fill value and store. uint64_t Fill = FillC->getZExtValue()*0x0101010101010101ULL; InsertNewInstBefore(new StoreInst(ConstantInt::get(ITy, Fill), Dest, false, Alignment), *MI); - + // Set the size of the copy to 0, it will be deleted on the next iteration. MI->setLength(Constant::getNullValue(LenC->getType())); return MI; @@ -231,7 +231,7 @@ } -/// visitCallInst - CallInst simplification. This mostly only handles folding +/// visitCallInst - CallInst simplification. This mostly only handles folding /// of intrinsic instructions. For normal calls, it allows visitCallSite to do /// the heavy lifting. /// @@ -246,10 +246,10 @@ CI.setDoesNotThrow(); return &CI; } - + IntrinsicInst *II = dyn_cast(&CI); if (!II) return visitCallSite(&CI); - + // Intrinsics cannot occur in an invoke, so handle them here instead of in // visitCallSite. if (MemIntrinsic *MI = dyn_cast(II)) { @@ -277,7 +277,7 @@ Intrinsic::ID MemCpyID = Intrinsic::memcpy; const Type *Tys[1]; Tys[0] = CI.getOperand(3)->getType(); - CI.setOperand(0, + CI.setOperand(0, Intrinsic::getDeclaration(M, MemCpyID, Tys, 1)); Changed = true; } @@ -298,10 +298,10 @@ if (Instruction *I = SimplifyMemSet(MSI)) return I; } - + if (Changed) return II; } - + switch (II->getIntrinsicID()) { default: break; case Intrinsic::bswap: @@ -309,7 +309,7 @@ if (IntrinsicInst *Operand = dyn_cast(II->getOperand(1))) if (Operand->getIntrinsicID() == Intrinsic::bswap) return ReplaceInstUsesWith(CI, Operand->getOperand(1)); - + // bswap(trunc(bswap(x))) -> trunc(lshr(x, c)) if (TruncInst *TI = dyn_cast(II->getOperand(1))) { if (IntrinsicInst *Operand = dyn_cast(TI->getOperand(0))) @@ -321,7 +321,7 @@ return new TruncInst(V, TI->getType()); } } - + break; case Intrinsic::powi: if (ConstantInt *Power = dyn_cast(II->getOperand(2))) { @@ -351,7 +351,7 @@ if ((Mask & KnownZero) == Mask) return ReplaceInstUsesWith(CI, ConstantInt::get(IT, APInt(BitWidth, TrailingZeros))); - + } break; case Intrinsic::ctlz: { @@ -368,7 +368,7 @@ if ((Mask & KnownZero) == Mask) return ReplaceInstUsesWith(CI, ConstantInt::get(IT, APInt(BitWidth, LeadingZeros))); - + } break; case Intrinsic::uadd_with_overflow: { @@ -399,7 +399,7 @@ Constant *Struct = ConstantStruct::get(II->getContext(), V, 2, false); return InsertValueInst::Create(Struct, Add, 0); } - + if (LHSKnownPositive && RHSKnownPositive) { // The sign bit is clear in both cases: this CANNOT overflow. // Create a simple add instruction, and insert it into the struct. @@ -428,7 +428,7 @@ // X + undef -> undef if (isa(II->getOperand(2))) return ReplaceInstUsesWith(CI, UndefValue::get(II->getType())); - + if (ConstantInt *RHS = dyn_cast(II->getOperand(2))) { // X + 0 -> {X, false} if (RHS->isZero()) { @@ -448,7 +448,7 @@ if (isa(II->getOperand(1)) || isa(II->getOperand(2))) return ReplaceInstUsesWith(CI, UndefValue::get(II->getType())); - + if (ConstantInt *RHS = dyn_cast(II->getOperand(2))) { // X - 0 -> {X, false} if (RHS->isZero()) { @@ -475,12 +475,12 @@ // X * undef -> undef if (isa(II->getOperand(2))) return ReplaceInstUsesWith(CI, UndefValue::get(II->getType())); - + if (ConstantInt *RHSI = dyn_cast(II->getOperand(2))) { // X*0 -> {0, false} if (RHSI->isZero()) return ReplaceInstUsesWith(CI, Constant::getNullValue(II->getType())); - + // X * 1 -> {X, false} if (RHSI->equalsInt(1)) { Constant *V[] = { @@ -509,7 +509,7 @@ case Intrinsic::ppc_altivec_stvxl: // Turn stvx -> store if the pointer is known aligned. if (GetOrEnforceKnownAlignment(II->getOperand(2), 16) >= 16) { - const Type *OpPtrTy = + const Type *OpPtrTy = PointerType::getUnqual(II->getOperand(1)->getType()); Value *Ptr = Builder->CreateBitCast(II->getOperand(2), OpPtrTy); return new StoreInst(II->getOperand(1), Ptr); @@ -520,13 +520,13 @@ case Intrinsic::x86_sse2_storeu_dq: // Turn X86 storeu -> store if the pointer is known aligned. if (GetOrEnforceKnownAlignment(II->getOperand(1), 16) >= 16) { - const Type *OpPtrTy = + const Type *OpPtrTy = PointerType::getUnqual(II->getOperand(2)->getType()); Value *Ptr = Builder->CreateBitCast(II->getOperand(1), OpPtrTy); return new StoreInst(II->getOperand(2), Ptr); } break; - + case Intrinsic::x86_sse_cvttss2si: { // These intrinsics only demands the 0th element of its input vector. If // we can simplify the input based on that, do so now. @@ -541,45 +541,45 @@ } break; } - + case Intrinsic::ppc_altivec_vperm: // Turn vperm(V1,V2,mask) -> shuffle(V1,V2,mask) if mask is a constant. if (ConstantVector *Mask = dyn_cast(II->getOperand(3))) { assert(Mask->getNumOperands() == 16 && "Bad type for intrinsic!"); - + // Check that all of the elements are integer constants or undefs. bool AllEltsOk = true; for (unsigned i = 0; i != 16; ++i) { - if (!isa(Mask->getOperand(i)) && + if (!isa(Mask->getOperand(i)) && !isa(Mask->getOperand(i))) { AllEltsOk = false; break; } } - + if (AllEltsOk) { // Cast the input vectors to byte vectors. Value *Op0 = Builder->CreateBitCast(II->getOperand(1), Mask->getType()); Value *Op1 = Builder->CreateBitCast(II->getOperand(2), Mask->getType()); Value *Result = UndefValue::get(Op0->getType()); - + // Only extract each element once. Value *ExtractedElts[32]; memset(ExtractedElts, 0, sizeof(ExtractedElts)); - + for (unsigned i = 0; i != 16; ++i) { if (isa(Mask->getOperand(i))) continue; unsigned Idx=cast(Mask->getOperand(i))->getZExtValue(); Idx &= 31; // Match the hardware behavior. - + if (ExtractedElts[Idx] == 0) { - ExtractedElts[Idx] = - Builder->CreateExtractElement(Idx < 16 ? Op0 : Op1, + ExtractedElts[Idx] = + Builder->CreateExtractElement(Idx < 16 ? Op0 : Op1, ConstantInt::get(Type::getInt32Ty(II->getContext()), Idx&15, false), "tmp"); } - + // Insert this value into the result vector. Result = Builder->CreateInsertElement(Result, ExtractedElts[Idx], ConstantInt::get(Type::getInt32Ty(II->getContext()), @@ -600,7 +600,7 @@ return EraseInstFromFunction(CI); } } - + // Scan down this block to see if there is another stack restore in the // same block without an intervening call/alloca. BasicBlock::iterator BI = II; @@ -625,7 +625,7 @@ } } } - + // If the stack restore is in a return/unwind block and if there are no // allocas or calls between the restore and the return, nuke the restore. if (!CannotRemove && (isa(TI) || isa(TI))) @@ -633,40 +633,16 @@ break; } case Intrinsic::objectsize: { - const Type *ReturnTy = CI.getType(); - Value *Op1 = II->getOperand(1); + ConstantInt *Const = cast(II->getOperand(2)); + const Type *Ty = CI.getType(); - // If we're a constant expr then we just return the number of bytes - // left in whatever we're indexing. Since it's constant there's no - // need for maximum or minimum bytes. - if (ConstantExpr *CE = dyn_cast(Op1)) { - // If this isn't a GEP give up. - if (CE->getOpcode() != Instruction::GetElementPtr) return 0; - - const PointerType *ObjTy = - reinterpret_cast(CE->getOperand(0)->getType()); - - if (const ArrayType *AT = dyn_cast(ObjTy->getElementType())) { - - // Deal with multi-dimensional arrays - const ArrayType *SAT = AT; - while ((AT = dyn_cast(AT->getElementType()))) - SAT = AT; - - size_t numElems = SAT->getNumElements(); - // We return the remaining bytes, so grab the size of an element - // in bytes. - size_t sizeofElem = SAT->getElementType()->getPrimitiveSizeInBits() / 8; - - ConstantInt *Const = - cast(CE->getOperand(CE->getNumOperands() - 1)); - size_t indx = Const->getZExtValue(); - return ReplaceInstUsesWith(CI, - ConstantInt::get(ReturnTy, - ((numElems - indx) * sizeofElem))); - } - } - // TODO: Add more types here. + // 0 is maximum number of bytes left, 1 is minimum number of bytes left. + // TODO: actually add these values, the current return values are "don't + // know". + if (Const->getZExtValue() == 0) + return ReplaceInstUsesWith(CI, Constant::getAllOnesValue(Ty)); + else + return ReplaceInstUsesWith(CI, ConstantInt::get(Ty, 0)); } } @@ -679,7 +655,7 @@ return visitCallSite(&II); } -/// isSafeToEliminateVarargsCast - If this cast does not affect the value +/// isSafeToEliminateVarargsCast - If this cast does not affect the value /// passed through the varargs area, we can eliminate the use of the cast. static bool isSafeToEliminateVarargsCast(const CallSite CS, const CastInst * const CI, @@ -694,7 +670,7 @@ if (!CS.paramHasAttr(ix, Attribute::ByVal)) return true; - const Type* SrcTy = + const Type* SrcTy = cast(CI->getOperand(0)->getType())->getElementType(); const Type* DstTy = cast(CI->getType())->getElementType(); if (!SrcTy->isSized() || !DstTy->isSized()) @@ -725,7 +701,7 @@ !CalleeF->isDeclaration()) { Instruction *OldCall = CS.getInstruction(); new StoreInst(ConstantInt::getTrue(Callee->getContext()), - UndefValue::get(Type::getInt1PtrTy(Callee->getContext())), + UndefValue::get(Type::getInt1PtrTy(Callee->getContext())), OldCall); // If OldCall dues not return void then replaceAllUsesWith undef. // This allows ValueHandlers and custom metadata to adjust itself. @@ -733,7 +709,7 @@ OldCall->replaceAllUsesWith(UndefValue::get(OldCall->getType())); if (isa(OldCall)) return EraseInstFromFunction(*OldCall); - + // We cannot remove an invoke, because it would change the CFG, just // change the callee to a null pointer. cast(OldCall)->setOperand(0, @@ -799,7 +775,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { if (!isa(CS.getCalledValue())) return false; ConstantExpr *CE = cast(CS.getCalledValue()); - if (CE->getOpcode() != Instruction::BitCast || + if (CE->getOpcode() != Instruction::BitCast || !isa(CE->getOperand(0))) return false; Function *Callee = cast(CE->getOperand(0)); @@ -864,7 +840,7 @@ if (!CastInst::isCastable(ActTy, ParamTy)) return false; // Cannot transform this parameter value. - if (CallerPAL.getParamAttributes(i + 1) + if (CallerPAL.getParamAttributes(i + 1) & Attribute::typeIncompatible(ParamTy)) return false; // Attribute not compatible with transformed value. @@ -989,7 +965,7 @@ Value *NV = NC; if (OldRetTy != NV->getType() && !Caller->use_empty()) { if (!NV->getType()->isVoidTy()) { - Instruction::CastOps opcode = CastInst::getCastOpcode(NC, false, + Instruction::CastOps opcode = CastInst::getCastOpcode(NC, false, OldRetTy, false); NV = NC = CastInst::Create(opcode, NC, OldRetTy, "tmp"); @@ -1011,7 +987,7 @@ if (!Caller->use_empty()) Caller->replaceAllUsesWith(NV); - + EraseInstFromFunction(*Caller); return true; } @@ -1129,11 +1105,11 @@ // Replace the trampoline call with a direct call. Let the generic // code sort out any function type mismatches. - FunctionType *NewFTy = FunctionType::get(FTy->getReturnType(), NewTypes, + FunctionType *NewFTy = FunctionType::get(FTy->getReturnType(), NewTypes, FTy->isVarArg()); Constant *NewCallee = NestF->getType() == PointerType::getUnqual(NewFTy) ? - NestF : ConstantExpr::getBitCast(NestF, + NestF : ConstantExpr::getBitCast(NestF, PointerType::getUnqual(NewFTy)); const AttrListPtr &NewPAL = AttrListPtr::get(NewAttrs.begin(), NewAttrs.end()); @@ -1167,9 +1143,8 @@ // parameter, there is no need to adjust the argument list. Let the generic // code sort out any function type mismatches. Constant *NewCallee = - NestF->getType() == PTy ? NestF : + NestF->getType() == PTy ? NestF : ConstantExpr::getBitCast(NestF, PTy); CS.setCalledFunction(NewCallee); return CS.getInstruction(); } - Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=95154&r1=95153&r2=95154&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Tue Feb 2 17:01:31 2010 @@ -1213,13 +1213,8 @@ if (!SizeCI) return 0; - // If a) we don't have any length information, or b) we know this will - // fit then just lower to a plain strcpy. Otherwise we'll keep our - // strcpy_chk call which may fail at runtime if the size is too long. - // TODO: It might be nice to get a maximum length out of the possible - // string lengths for varying. - if (SizeCI->isAllOnesValue() || - SizeCI->getZExtValue() >= GetStringLength(CI->getOperand(2))) + // We don't have any length information, just lower to a plain strcpy. + if (SizeCI->isAllOnesValue()) return EmitStrCpy(CI->getOperand(1), CI->getOperand(2), B); return 0; Removed: llvm/trunk/test/Transforms/InstCombine/objsize.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/objsize.ll?rev=95153&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/objsize.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/objsize.ll (removed) @@ -1,30 +0,0 @@ -; RUN: opt < %s -instcombine -S | FileCheck %s - at a = common global [60 x i8] zeroinitializer, align 1 ; <[60 x i8]*> - at .str = private constant [8 x i8] c"abcdefg\00" ; <[8 x i8]*> - -define i32 @foo() nounwind { -; CHECK: @foo -; CHECK-NEXT: ret i32 60 - %1 = call i32 @llvm.objectsize.i32(i8* getelementptr inbounds ([60 x i8]* @a, i32 0, i32 0), i1 false) - ret i32 %1 -} - -define i8* @bar() nounwind { -; CHECK: @bar -entry: - %retval = alloca i8* - %0 = call i32 @llvm.objectsize.i32(i8* getelementptr inbounds ([60 x i8]* @a, i32 0, i32 0), i1 false) - %cmp = icmp ne i32 %0, -1 -; CHECK: br i1 true - br i1 %cmp, label %cond.true, label %cond.false - -cond.true: - %1 = load i8** %retval; - ret i8* %1; - -cond.false: - %2 = load i8** %retval; - ret i8* %2; -} - -declare i32 @llvm.objectsize.i32(i8*, i1) nounwind readonly \ No newline at end of file Removed: llvm/trunk/test/Transforms/SimplifyLibCalls/strcpy_chk.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyLibCalls/strcpy_chk.ll?rev=95153&view=auto ============================================================================== --- llvm/trunk/test/Transforms/SimplifyLibCalls/strcpy_chk.ll (original) +++ llvm/trunk/test/Transforms/SimplifyLibCalls/strcpy_chk.ll (removed) @@ -1,12 +0,0 @@ -; RUN: opt < %s -simplify-libcalls -S | FileCheck %s - at a = common global [60 x i8] zeroinitializer, align 1 ; <[60 x i8]*> [#uses=1] - at .str = private constant [8 x i8] c"abcdefg\00" ; <[8 x i8]*> [#uses=1] - -define i8* @foo() nounwind { -; CHECK: @foo -; CHECK-NEXT: call i8* @strcpy - %call = call i8* @__strcpy_chk(i8* getelementptr inbounds ([60 x i8]* @a, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8]* @.str, i32 0, i32 0), i32 60) ; [#uses=1] - ret i8* %call -} - -declare i8* @__strcpy_chk(i8*, i8*, i32) nounwind From echristo at apple.com Tue Feb 2 17:02:41 2010 From: echristo at apple.com (Eric Christopher) Date: Tue, 2 Feb 2010 15:02:41 -0800 Subject: [llvm-commits] [llvm] r95154 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineCalls.cpp lib/Transforms/Scalar/SimplifyLibCalls.cpp test/Transforms/InstCombine/objsize.ll test/Transforms/SimplifyLibCalls/strcpy_chk.ll In-Reply-To: <201002022301.o12N1WQF023633@zion.cs.uiuc.edu> References: <201002022301.o12N1WQF023633@zion.cs.uiuc.edu> Message-ID: On Feb 2, 2010, at 3:01 PM, Eric Christopher wrote: > Log: > Hopefully temporarily revert this. and accidentally apply lots of whitespace changes... -eric From sabre at nondot.org Tue Feb 2 17:37:42 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 23:37:42 -0000 Subject: [llvm-commits] [llvm] r95155 - in /llvm/trunk: include/llvm/CodeGen/ include/llvm/MC/ include/llvm/Target/ lib/CodeGen/ lib/CodeGen/AsmPrinter/ lib/MC/ lib/Target/ARM/AsmPrinter/ lib/Target/Alpha/AsmPrinter/ lib/Target/Blackfin/AsmPrinter/ lib/Target/CellSPU/AsmPrinter/ lib/Target/MSP430/AsmPrinter/ lib/Target/Mips/AsmPrinter/ lib/Target/PIC16/AsmPrinter/ lib/Target/PowerPC/AsmPrinter/ lib/Target/Sparc/AsmPrinter/ lib/Target/SystemZ/AsmPrinter/ lib/Target/X86/AsmPrinter/ lib/Target/XCore/AsmPrinter/ Message-ID: <201002022337.o12NbhvB025899@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 17:37:42 2010 New Revision: 95155 URL: http://llvm.org/viewvc/llvm-project?rev=95155&view=rev Log: refactor code so that LLVMTargetMachine creates the asmstreamer and mccontext instead of having AsmPrinter do it. This allows other types of MCStreamer's to be passed in. Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h llvm/trunk/include/llvm/MC/MCStreamer.h llvm/trunk/include/llvm/Target/TargetRegistry.h llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp llvm/trunk/lib/MC/MCAsmStreamer.cpp llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp llvm/trunk/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original) +++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Tue Feb 2 17:37:42 2010 @@ -149,7 +149,8 @@ protected: explicit AsmPrinter(formatted_raw_ostream &o, TargetMachine &TM, - const MCAsmInfo *T, bool V); + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T); public: virtual ~AsmPrinter(); Modified: llvm/trunk/include/llvm/MC/MCStreamer.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/include/llvm/MC/MCStreamer.h (original) +++ llvm/trunk/include/llvm/MC/MCStreamer.h Tue Feb 2 17:37:42 2010 @@ -60,6 +60,10 @@ /// @name Assembly File Formatting. /// @{ + + /// isVerboseAsm - Return true if this streamer supports verbose assembly at + /// all. + virtual bool isVerboseAsm() const { return false; } /// AddComment - Add a comment that can be emitted to the generated .s /// file if applicable as a QoI issue to make the output of the compiler Modified: llvm/trunk/include/llvm/Target/TargetRegistry.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetRegistry.h?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetRegistry.h (original) +++ llvm/trunk/include/llvm/Target/TargetRegistry.h Tue Feb 2 17:37:42 2010 @@ -25,12 +25,14 @@ namespace llvm { class AsmPrinter; - class MCAsmParser; - class MCCodeEmitter; class Module; class MCAsmInfo; + class MCAsmParser; + class MCCodeEmitter; + class MCContext; class MCDisassembler; class MCInstPrinter; + class MCStreamer; class TargetAsmLexer; class TargetAsmParser; class TargetMachine; @@ -58,8 +60,9 @@ const std::string &Features); typedef AsmPrinter *(*AsmPrinterCtorTy)(formatted_raw_ostream &OS, TargetMachine &TM, - const MCAsmInfo *MAI, - bool VerboseAsm); + MCContext &Ctx, + MCStreamer &Streamer, + const MCAsmInfo *MAI); typedef TargetAsmLexer *(*AsmLexerCtorTy)(const Target &T, const MCAsmInfo &MAI); typedef TargetAsmParser *(*AsmParserCtorTy)(const Target &T,MCAsmParser &P); @@ -189,12 +192,14 @@ return TargetMachineCtorFn(*this, Triple, Features); } - /// createAsmPrinter - Create a target specific assembly printer pass. + /// createAsmPrinter - Create a target specific assembly printer pass. This + /// takes ownership of the MCContext and MCStreamer objects but not the MAI. AsmPrinter *createAsmPrinter(formatted_raw_ostream &OS, TargetMachine &TM, - const MCAsmInfo *MAI, bool Verbose) const { + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *MAI) const { if (!AsmPrinterCtorFn) return 0; - return AsmPrinterCtorFn(OS, TM, MAI, Verbose); + return AsmPrinterCtorFn(OS, TM, Ctx, Streamer, MAI); } /// createAsmLexer - Create a target specific assembly lexer. @@ -547,8 +552,9 @@ private: static AsmPrinter *Allocator(formatted_raw_ostream &OS, TargetMachine &TM, - const MCAsmInfo *MAI, bool Verbose) { - return new AsmPrinterImpl(OS, TM, MAI, Verbose); + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *MAI) { + return new AsmPrinterImpl(OS, TM, Ctx, Streamer, MAI); } }; Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Feb 2 17:37:42 2010 @@ -55,19 +55,14 @@ char AsmPrinter::ID = 0; AsmPrinter::AsmPrinter(formatted_raw_ostream &o, TargetMachine &tm, - const MCAsmInfo *T, bool VerboseAsm) + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T) : MachineFunctionPass(&ID), O(o), TM(tm), MAI(T), TRI(tm.getRegisterInfo()), - - OutContext(*new MCContext()), - // FIXME: Pass instprinter to streamer. - OutStreamer(*createAsmStreamer(OutContext, O, *T, - TM.getTargetData()->isLittleEndian(), - VerboseAsm, 0)), - + OutContext(Ctx), OutStreamer(Streamer), LastMI(0), LastFn(0), Counter(~0U), PrevDLT(NULL) { DW = 0; MMI = 0; - this->VerboseAsm = VerboseAsm; + VerboseAsm = Streamer.isVerboseAsm(); } AsmPrinter::~AsmPrinter() { Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Feb 2 17:37:42 2010 @@ -21,6 +21,9 @@ #include "llvm/CodeGen/MachineFunctionAnalysis.h" #include "llvm/Target/TargetOptions.h" #include "llvm/MC/MCAsmInfo.h" +#include "llvm/MC/MCContext.h" +#include "llvm/MC/MCStreamer.h" +#include "llvm/Target/TargetData.h" #include "llvm/Target/TargetRegistry.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Support/CommandLine.h" @@ -121,10 +124,24 @@ case CGFT_ObjectFile: return CGFT_ErrorOccurred; case CGFT_AssemblyFile: { + MCContext *Context = new MCContext(); + MCStreamer *AsmStreamer = + createAsmStreamer(*Context, Out, *getMCAsmInfo(), + getTargetData()->isLittleEndian(), + getVerboseAsm(), + /*instprinter*/0, + /*codeemitter*/0); + + // Create the AsmPrinter, which takes ownership of Context and AsmStreamer + // if successful. FunctionPass *Printer = - getTarget().createAsmPrinter(Out, *this, getMCAsmInfo(), - getVerboseAsm()); - if (Printer == 0) return CGFT_ErrorOccurred; + getTarget().createAsmPrinter(Out, *this, *Context, *AsmStreamer, + getMCAsmInfo()); + if (Printer == 0) { + delete AsmStreamer; + delete Context; + return CGFT_ErrorOccurred; + } PM.add(Printer); break; } Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Tue Feb 2 17:37:42 2010 @@ -47,7 +47,6 @@ bool isLittleEndian() const { return IsLittleEndian; } - inline void EmitEOL() { // If we don't have any comments, just emit a \n. if (!IsVerboseAsm) { @@ -57,6 +56,10 @@ EmitCommentsAndEOL(); } void EmitCommentsAndEOL(); + + /// isVerboseAsm - Return true if this streamer supports verbose assembly at + /// all. + virtual bool isVerboseAsm() const { return IsVerboseAsm; } /// AddComment - Add a comment that can be emitted to the generated .s /// file if applicable as a QoI issue to make the output of the compiler Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Tue Feb 2 17:37:42 2010 @@ -73,8 +73,9 @@ public: explicit ARMAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, - const MCAsmInfo *T, bool V) - : AsmPrinter(O, TM, T, V), AFI(NULL), MCP(NULL) { + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T) + : AsmPrinter(O, TM, Ctx, Streamer, T), AFI(NULL), MCP(NULL) { Subtarget = &TM.getSubtarget(); } Modified: llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp Tue Feb 2 17:37:42 2010 @@ -37,8 +37,9 @@ /// explicit AlphaAsmPrinter(formatted_raw_ostream &o, TargetMachine &tm, - const MCAsmInfo *T, bool V) - : AsmPrinter(o, tm, T, V) {} + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T) + : AsmPrinter(o, tm, Ctx, Streamer, T) {} virtual const char *getPassName() const { return "Alpha Assembly Printer"; Modified: llvm/trunk/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp Tue Feb 2 17:37:42 2010 @@ -39,8 +39,9 @@ class BlackfinAsmPrinter : public AsmPrinter { public: BlackfinAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, - const MCAsmInfo *MAI, bool V) - : AsmPrinter(O, TM, MAI, V) {} + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *MAI) + : AsmPrinter(O, TM, Ctx, Streamer, MAI) {} virtual const char *getPassName() const { return "Blackfin Assembly Printer"; Modified: llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp Tue Feb 2 17:37:42 2010 @@ -38,8 +38,9 @@ class SPUAsmPrinter : public AsmPrinter { public: explicit SPUAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, - const MCAsmInfo *T, bool V) : - AsmPrinter(O, TM, T, V) {} + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T) : + AsmPrinter(O, TM, Ctx, Streamer, T) {} virtual const char *getPassName() const { return "STI CBEA SPU Assembly Printer"; Modified: llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp Tue Feb 2 17:37:42 2010 @@ -42,8 +42,9 @@ class MSP430AsmPrinter : public AsmPrinter { public: MSP430AsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, - const MCAsmInfo *MAI, bool V) - : AsmPrinter(O, TM, MAI, V) {} + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *MAI) + : AsmPrinter(O, TM, Ctx, Streamer, MAI) {} virtual const char *getPassName() const { return "MSP430 Assembly Printer"; Modified: llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp Tue Feb 2 17:37:42 2010 @@ -50,8 +50,9 @@ const MipsSubtarget *Subtarget; public: explicit MipsAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, - const MCAsmInfo *T, bool V) - : AsmPrinter(O, TM, T, V) { + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T) + : AsmPrinter(O, TM, Ctx, Streamer, T) { Subtarget = &TM.getSubtarget(); } Modified: llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp Tue Feb 2 17:37:42 2010 @@ -35,8 +35,9 @@ #include "PIC16GenAsmWriter.inc" PIC16AsmPrinter::PIC16AsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, - const MCAsmInfo *T, bool V) -: AsmPrinter(O, TM, T, V), DbgInfo(O, T) { + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T) +: AsmPrinter(O, TM, Ctx, Streamer, T), DbgInfo(O, T) { PTLI = static_cast(TM.getTargetLowering()); PMAI = static_cast(T); PTOF = (PIC16TargetObjectFile *)&PTLI->getObjFileLowering(); Modified: llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h (original) +++ llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h Tue Feb 2 17:37:42 2010 @@ -31,7 +31,8 @@ class VISIBILITY_HIDDEN PIC16AsmPrinter : public AsmPrinter { public: explicit PIC16AsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, - const MCAsmInfo *T, bool V); + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T); private: virtual const char *getPassName() const { return "PIC16 Assembly Printer"; Modified: llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp Tue Feb 2 17:37:42 2010 @@ -60,8 +60,9 @@ uint64_t LabelID; public: explicit PPCAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, - const MCAsmInfo *T, bool V) - : AsmPrinter(O, TM, T, V), + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T) + : AsmPrinter(O, TM, Ctx, Streamer, T), Subtarget(TM.getSubtarget()), LabelID(0) {} virtual const char *getPassName() const { @@ -322,8 +323,9 @@ class PPCLinuxAsmPrinter : public PPCAsmPrinter { public: explicit PPCLinuxAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, - const MCAsmInfo *T, bool V) - : PPCAsmPrinter(O, TM, T, V){} + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T) + : PPCAsmPrinter(O, TM, Ctx, Streamer, T) {} virtual const char *getPassName() const { return "Linux PPC Assembly Printer"; @@ -347,8 +349,9 @@ formatted_raw_ostream &OS; public: explicit PPCDarwinAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, - const MCAsmInfo *T, bool V) - : PPCAsmPrinter(O, TM, T, V), OS(O) {} + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T) + : PPCAsmPrinter(O, TM, Ctx, Streamer, T), OS(O) {} virtual const char *getPassName() const { return "Darwin PPC Assembly Printer"; @@ -826,13 +829,13 @@ /// static AsmPrinter *createPPCAsmPrinterPass(formatted_raw_ostream &o, TargetMachine &tm, - const MCAsmInfo *tai, - bool verbose) { + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *tai) { const PPCSubtarget *Subtarget = &tm.getSubtarget(); if (Subtarget->isDarwin()) - return new PPCDarwinAsmPrinter(o, tm, tai, verbose); - return new PPCLinuxAsmPrinter(o, tm, tai, verbose); + return new PPCDarwinAsmPrinter(o, tm, Ctx, Streamer, tai); + return new PPCLinuxAsmPrinter(o, tm, Ctx, Streamer, tai); } // Force static initialization. Modified: llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp Tue Feb 2 17:37:42 2010 @@ -29,8 +29,9 @@ class SparcAsmPrinter : public AsmPrinter { public: explicit SparcAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, - const MCAsmInfo *T, bool V) - : AsmPrinter(O, TM, T, V) {} + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T) + : AsmPrinter(O, TM, Ctx, Streamer, T) {} virtual const char *getPassName() const { return "Sparc Assembly Printer"; Modified: llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp Tue Feb 2 17:37:42 2010 @@ -40,8 +40,9 @@ class SystemZAsmPrinter : public AsmPrinter { public: SystemZAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, - const MCAsmInfo *MAI, bool V) - : AsmPrinter(O, TM, MAI, V) {} + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *MAI) + : AsmPrinter(O, TM, Ctx, Streamer, MAI) {} virtual const char *getPassName() const { return "SystemZ Assembly Printer"; Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h Tue Feb 2 17:37:42 2010 @@ -36,8 +36,9 @@ const X86Subtarget *Subtarget; public: explicit X86AsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, - const MCAsmInfo *T, bool V) - : AsmPrinter(O, TM, T, V) { + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T) + : AsmPrinter(O, TM, Ctx, Streamer, T) { Subtarget = &TM.getSubtarget(); } Modified: llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp?rev=95155&r1=95154&r2=95155&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp Tue Feb 2 17:37:42 2010 @@ -52,8 +52,9 @@ const XCoreSubtarget &Subtarget; public: explicit XCoreAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, - const MCAsmInfo *T, bool V) - : AsmPrinter(O, TM, T, V), + MCContext &Ctx, MCStreamer &Streamer, + const MCAsmInfo *T) + : AsmPrinter(O, TM, Ctx, Streamer, T), Subtarget(TM.getSubtarget()) {} virtual const char *getPassName() const { From sabre at nondot.org Tue Feb 2 17:45:18 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 23:45:18 -0000 Subject: [llvm-commits] [llvm] r95156 - /llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Message-ID: <201002022345.o12NjIrt026352@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 17:45:17 2010 New Revision: 95156 URL: http://llvm.org/viewvc/llvm-project?rev=95156&view=rev Log: use OwningPtr and factor code better. Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=95156&r1=95155&r2=95156&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Feb 2 17:45:17 2010 @@ -26,6 +26,7 @@ #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetRegistry.h" #include "llvm/Transforms/Scalar.h" +#include "llvm/ADT/OwningPtr.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/FormattedStream.h" @@ -119,34 +120,35 @@ if (addCommonCodeGenPasses(PM, OptLevel)) return CGFT_ErrorOccurred; + OwningPtr Context(new MCContext()); + OwningPtr AsmStreamer; + switch (FileType) { default: case CGFT_ObjectFile: return CGFT_ErrorOccurred; case CGFT_AssemblyFile: { - MCContext *Context = new MCContext(); - MCStreamer *AsmStreamer = - createAsmStreamer(*Context, Out, *getMCAsmInfo(), - getTargetData()->isLittleEndian(), - getVerboseAsm(), - /*instprinter*/0, - /*codeemitter*/0); - - // Create the AsmPrinter, which takes ownership of Context and AsmStreamer - // if successful. - FunctionPass *Printer = - getTarget().createAsmPrinter(Out, *this, *Context, *AsmStreamer, - getMCAsmInfo()); - if (Printer == 0) { - delete AsmStreamer; - delete Context; - return CGFT_ErrorOccurred; - } - PM.add(Printer); + AsmStreamer.reset(createAsmStreamer(*Context, Out, *getMCAsmInfo(), + getTargetData()->isLittleEndian(), + getVerboseAsm(), /*instprinter*/0, + /*codeemitter*/0)); break; } } + // Create the AsmPrinter, which takes ownership of Context and AsmStreamer + // if successful. + FunctionPass *Printer = + getTarget().createAsmPrinter(Out, *this, *Context, *AsmStreamer, + getMCAsmInfo()); + if (Printer == 0) + return CGFT_ErrorOccurred; + + // If successful, createAsmPrinter took ownership of AsmStreamer and Context. + Context.take(); AsmStreamer.take(); + + PM.add(Printer); + // Make sure the code model is set. setCodeModelForStatic(); PM.add(createGCInfoDeleter()); From daniel at zuster.org Tue Feb 2 17:46:36 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 02 Feb 2010 23:46:36 -0000 Subject: [llvm-commits] [llvm] r95157 - /llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Message-ID: <201002022346.o12NkbiZ026430@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Feb 2 17:46:36 2010 New Revision: 95157 URL: http://llvm.org/viewvc/llvm-project?rev=95157&view=rev Log: AsmMatcherEmitter: Use stable_sort when reordering instructions, so that order is still deterministic even amongst ambiguous instructions (eventually ambiguous match orders will be a hard error, but we aren't there yet). Modified: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Modified: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp?rev=95157&r1=95156&r2=95157&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Tue Feb 2 17:46:36 2010 @@ -1413,9 +1413,11 @@ AsmMatcherInfo Info(AsmParser); Info.BuildInfo(Target); - // Sort the instruction table using the partial order on classes. - std::sort(Info.Instructions.begin(), Info.Instructions.end(), - less_ptr()); + // Sort the instruction table using the partial order on classes. We use + // stable_sort to ensure that ambiguous instructions are still + // deterministically ordered. + std::stable_sort(Info.Instructions.begin(), Info.Instructions.end(), + less_ptr()); DEBUG_WITH_TYPE("instruction_info", { for (std::vector::iterator From daniel at zuster.org Tue Feb 2 17:46:47 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 02 Feb 2010 23:46:47 -0000 Subject: [llvm-commits] [llvm] r95158 - in /llvm/trunk: lib/Target/X86/AsmParser/X86AsmParser.cpp test/MC/AsmParser/X86/x86_instructions.s Message-ID: <201002022346.o12Nkll7026455@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Feb 2 17:46:47 2010 New Revision: 95158 URL: http://llvm.org/viewvc/llvm-project?rev=95158&view=rev Log: AsmParser/X86: Add temporary hack to allow parsing "sal". Eventually we need some mechanism for specifying alternative syntaxes, but I'm not sure what form that should take yet. Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=95158&r1=95157&r2=95158&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Tue Feb 2 17:46:47 2010 @@ -456,8 +456,14 @@ bool X86ATTAsmParser:: ParseInstruction(const StringRef &Name, SMLoc NameLoc, SmallVectorImpl &Operands) { - - Operands.push_back(X86Operand::CreateToken(Name, NameLoc)); + // FIXME: Hack to recognize "sal..." for now. We need a way to represent + // alternative syntaxes in the .td file, without requiring instruction + // duplication. + if (Name.startswith("sal")) { + std::string Tmp = "shl" + Name.substr(3).str(); + Operands.push_back(X86Operand::CreateToken(Tmp, NameLoc)); + } else + Operands.push_back(X86Operand::CreateToken(Name, NameLoc)); if (getLexer().isNot(AsmToken::EndOfStatement)) { Modified: llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s?rev=95158&r1=95157&r2=95158&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s Tue Feb 2 17:46:47 2010 @@ -64,3 +64,9 @@ // FIXME: Check that this matches the correct instruction. // CHECK: shldl %cl, %eax, %ebx shldl %cl, %eax, %ebx + +// CHECK: shll $2, %eax + shll $2, %eax + +// CHECK: shll $2, %eax + sall $2, %eax From dalej at apple.com Tue Feb 2 17:54:23 2010 From: dalej at apple.com (Dale Johannesen) Date: Tue, 02 Feb 2010 23:54:23 -0000 Subject: [llvm-commits] [llvm] r95159 - /llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Message-ID: <201002022354.o12NsNY3026768@zion.cs.uiuc.edu> Author: johannes Date: Tue Feb 2 17:54:23 2010 New Revision: 95159 URL: http://llvm.org/viewvc/llvm-project?rev=95159&view=rev Log: Accept floating point immediates in DEBUG_VALUE. Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp?rev=95159&r1=95158&r2=95159&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Tue Feb 2 17:54:23 2010 @@ -430,12 +430,22 @@ if (NOps==3) { // Register or immediate value. Register 0 means undef. assert(MI->getOperand(0).getType()==MachineOperand::MO_Register || - MI->getOperand(0).getType()==MachineOperand::MO_Immediate); + MI->getOperand(0).getType()==MachineOperand::MO_Immediate || + MI->getOperand(0).getType()==MachineOperand::MO_FPImmediate); if (MI->getOperand(0).getType()==MachineOperand::MO_Register && MI->getOperand(0).getReg()==0) { // Suppress offset in this case, it is not meaningful. O << "undef"; return; + } else if (MI->getOperand(0).getType()==MachineOperand::MO_FPImmediate) { + // This is more naturally done in printOperand, but since the only use + // of such an operand is in this comment and that is temporary, we + // prefer to keep this mess localized. + SmallVectorImpl Str(20); + APFloat APF = MI->getOperand(0).getFPImm()->getValueAPF(); + APF.toString(Str, 0, 0); + for (unsigned i=0; i Author: evancheng Date: Tue Feb 2 17:55:14 2010 New Revision: 95160 URL: http://llvm.org/viewvc/llvm-project?rev=95160&view=rev Log: Revert 95130. Modified: llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.h llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.cpp llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.h llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.cpp llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.h llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp llvm/trunk/lib/Target/Mips/MipsISelLowering.h llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp llvm/trunk/lib/Target/PowerPC/PPCISelLowering.h llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp llvm/trunk/lib/Target/Sparc/SparcISelLowering.h llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.h llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.h llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp llvm/trunk/lib/Target/XCore/XCoreISelLowering.h Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Tue Feb 2 17:55:14 2010 @@ -1168,7 +1168,7 @@ /// InVals array with legal-type return values from the call, and return /// the resulting token chain value. virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, + LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Tue Feb 2 17:55:14 2010 @@ -5735,7 +5735,7 @@ } SmallVector InVals; - Chain = LowerCall(Chain, Callee, RetTy, CallConv, isVarArg, isTailCall, + Chain = LowerCall(Chain, Callee, CallConv, isVarArg, isTailCall, Outs, Ins, dl, DAG, InVals); // Verify that the target's LowerCall behaved as expected. Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Feb 2 17:55:14 2010 @@ -895,7 +895,7 @@ /// ARMISD:CALL <- callseq_end chain. Also add input and output parameter /// nodes. SDValue -ARMTargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, +ARMTargetLowering::LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Tue Feb 2 17:55:14 2010 @@ -317,7 +317,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, + LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp Tue Feb 2 17:55:14 2010 @@ -219,7 +219,7 @@ #include "AlphaGenCallingConv.inc" SDValue -AlphaTargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, +AlphaTargetLowering::LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h (original) +++ llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h Tue Feb 2 17:55:14 2010 @@ -120,7 +120,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, + LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.cpp?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.cpp Tue Feb 2 17:55:14 2010 @@ -272,7 +272,6 @@ SDValue BlackfinTargetLowering::LowerCall(SDValue Chain, SDValue Callee, - const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.h?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.h (original) +++ llvm/trunk/lib/Target/Blackfin/BlackfinISelLowering.h Tue Feb 2 17:55:14 2010 @@ -63,7 +63,7 @@ DebugLoc dl, SelectionDAG &DAG, SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, + LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp Tue Feb 2 17:55:14 2010 @@ -1138,7 +1138,7 @@ } SDValue -SPUTargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, +SPUTargetLowering::LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h Tue Feb 2 17:55:14 2010 @@ -156,7 +156,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, + LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.cpp?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.cpp Tue Feb 2 17:55:14 2010 @@ -271,7 +271,7 @@ } SDValue -MSP430TargetLowering::LowerCall(SDValue Chain, SDValue Callee,const Type *RetTy, +MSP430TargetLowering::LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.h?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.h (original) +++ llvm/trunk/lib/Target/MSP430/MSP430ISelLowering.h Tue Feb 2 17:55:14 2010 @@ -153,7 +153,7 @@ DebugLoc dl, SelectionDAG &DAG, SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, + LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Tue Feb 2 17:55:14 2010 @@ -684,7 +684,7 @@ /// (physical regs)/(stack frame), CALLSEQ_START and CALLSEQ_END are emitted. /// TODO: isVarArg, isTailCall. SDValue -MipsTargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, +MipsTargetLowering::LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.h?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelLowering.h (original) +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.h Tue Feb 2 17:55:14 2010 @@ -116,7 +116,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, + LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp Tue Feb 2 17:55:14 2010 @@ -1353,7 +1353,7 @@ } SDValue -PIC16TargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, +PIC16TargetLowering::LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.h Tue Feb 2 17:55:14 2010 @@ -142,7 +142,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, + LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Tue Feb 2 17:55:14 2010 @@ -2674,7 +2674,7 @@ } SDValue -PPCTargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, +PPCTargetLowering::LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.h?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.h (original) +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.h Tue Feb 2 17:55:14 2010 @@ -430,7 +430,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, + LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp Tue Feb 2 17:55:14 2010 @@ -250,7 +250,7 @@ } SDValue -SparcTargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, +SparcTargetLowering::LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/Sparc/SparcISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcISelLowering.h?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcISelLowering.h (original) +++ llvm/trunk/lib/Target/Sparc/SparcISelLowering.h Tue Feb 2 17:55:14 2010 @@ -85,7 +85,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, + LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp (original) +++ llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp Tue Feb 2 17:55:14 2010 @@ -249,7 +249,6 @@ SDValue SystemZTargetLowering::LowerCall(SDValue Chain, SDValue Callee, - const Type *RetTy, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.h?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.h (original) +++ llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.h Tue Feb 2 17:55:14 2010 @@ -124,7 +124,7 @@ DebugLoc dl, SelectionDAG &DAG, SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, + LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Feb 2 17:55:14 2010 @@ -1778,7 +1778,7 @@ } SDValue -X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, +X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, @@ -1791,8 +1791,8 @@ if (isTailCall) // Check if it's really possible to do a tail call. - isTailCall = IsEligibleForTailCallOptimization(Callee, RetTy, CallConv, - isVarArg, Outs, Ins, DAG); + isTailCall = IsEligibleForTailCallOptimization(Callee, CallConv, isVarArg, + Outs, Ins, DAG); assert(!(isVarArg && CallConv == CallingConv::Fast) && "Var args not supported with calling convention fastcc"); @@ -2247,7 +2247,6 @@ /// optimization should implement this function. bool X86TargetLowering::IsEligibleForTailCallOptimization(SDValue Callee, - const Type *RetTy, CallingConv::ID CalleeCC, bool isVarArg, const SmallVectorImpl &Outs, @@ -2329,7 +2328,14 @@ return true; // If the return types match, then it's safe. - return CallerRetTy == RetTy; + // Don't tail call optimize recursive call. + GlobalAddressSDNode *G = dyn_cast(Callee); + if (!G) return false; // FIXME: common external symbols? + if (const Function *CalleeF = dyn_cast(G->getGlobal())) { + const Type *CalleeRetTy = CalleeF->getReturnType(); + return CallerRetTy == CalleeRetTy; + } + return false; } FastISel * Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Tue Feb 2 17:55:14 2010 @@ -627,7 +627,7 @@ /// IsEligibleForTailCallOptimization - Check whether the call is eligible /// for tail call optimization. Targets which want to do tail call /// optimization should implement this function. - bool IsEligibleForTailCallOptimization(SDValue Callee, const Type *RetTy, + bool IsEligibleForTailCallOptimization(SDValue Callee, CallingConv::ID CalleeCC, bool isVarArg, const SmallVectorImpl &Outs, @@ -707,7 +707,7 @@ DebugLoc dl, SelectionDAG &DAG, SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, + LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, const SmallVectorImpl &Ins, Modified: llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp (original) +++ llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp Tue Feb 2 17:55:14 2010 @@ -609,7 +609,7 @@ /// XCore call implementation SDValue -XCoreTargetLowering::LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, +XCoreTargetLowering::LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, Modified: llvm/trunk/lib/Target/XCore/XCoreISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelLowering.h?rev=95160&r1=95159&r2=95160&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/XCoreISelLowering.h (original) +++ llvm/trunk/lib/Target/XCore/XCoreISelLowering.h Tue Feb 2 17:55:14 2010 @@ -147,7 +147,7 @@ SmallVectorImpl &InVals); virtual SDValue - LowerCall(SDValue Chain, SDValue Callee, const Type *RetTy, + LowerCall(SDValue Chain, SDValue Callee, CallingConv::ID CallConv, bool isVarArg, bool &isTailCall, const SmallVectorImpl &Outs, From grosbach at apple.com Tue Feb 2 17:56:14 2010 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 02 Feb 2010 23:56:14 -0000 Subject: [llvm-commits] [llvm] r95161 - /llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Message-ID: <201002022356.o12NuE4F026889@zion.cs.uiuc.edu> Author: grosbach Date: Tue Feb 2 17:56:14 2010 New Revision: 95161 URL: http://llvm.org/viewvc/llvm-project?rev=95161&view=rev Log: As of r79039, we still try to eliminate the frame pointer on leaf functions, even when -disable-fp-elim is specified. Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Modified: llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp?rev=95161&r1=95160&r2=95161&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMBaseRegisterInfo.cpp Tue Feb 2 17:56:14 2010 @@ -478,7 +478,7 @@ /// bool ARMBaseRegisterInfo::hasFP(const MachineFunction &MF) const { const MachineFrameInfo *MFI = MF.getFrameInfo(); - return (NoFramePointerElim || + return ((NoFramePointerElim && MFI->hasCalls())|| needsStackRealignment(MF) || MFI->hasVarSizedObjects() || MFI->isFrameAddressTaken()); From sabre at nondot.org Tue Feb 2 17:57:42 2010 From: sabre at nondot.org (Chris Lattner) Date: Tue, 02 Feb 2010 23:57:42 -0000 Subject: [llvm-commits] [llvm] r95162 - in /llvm/trunk: include/llvm/MC/MCStreamer.h lib/CodeGen/LLVMTargetMachine.cpp tools/llc/llc.cpp Message-ID: <201002022357.o12NvhmO026992@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 17:57:42 2010 New Revision: 95162 URL: http://llvm.org/viewvc/llvm-project?rev=95162&view=rev Log: Hook up -filetype=obj through the MachO streamer. Here's a demo: $ cat t.ll @g = global i32 42 $ llc t.ll -o t.o -filetype=obj $ nm t.o 00000000 D _g There is still a ton of work left. Instructions are not being encoded yet apparently. Modified: llvm/trunk/include/llvm/MC/MCStreamer.h llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp llvm/trunk/tools/llc/llc.cpp Modified: llvm/trunk/include/llvm/MC/MCStreamer.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=95162&r1=95161&r2=95162&view=diff ============================================================================== --- llvm/trunk/include/llvm/MC/MCStreamer.h (original) +++ llvm/trunk/include/llvm/MC/MCStreamer.h Tue Feb 2 17:57:42 2010 @@ -282,7 +282,7 @@ /// createMachOStream - Create a machine code streamer which will generative /// Mach-O format object files. MCStreamer *createMachOStreamer(MCContext &Ctx, raw_ostream &OS, - MCCodeEmitter *CE = 0); + MCCodeEmitter *CE); /// createELFStreamer - Create a machine code streamer which will generative /// ELF format object files. Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=95162&r1=95161&r2=95162&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Feb 2 17:57:42 2010 @@ -124,23 +124,30 @@ OwningPtr AsmStreamer; switch (FileType) { - default: - case CGFT_ObjectFile: - return CGFT_ErrorOccurred; - case CGFT_AssemblyFile: { + default: return CGFT_ErrorOccurred; + case CGFT_AssemblyFile: AsmStreamer.reset(createAsmStreamer(*Context, Out, *getMCAsmInfo(), getTargetData()->isLittleEndian(), getVerboseAsm(), /*instprinter*/0, /*codeemitter*/0)); break; + case CGFT_ObjectFile: { + // Create the code emitter for the target if it exists. If not, .o file + // emission fails. + MCCodeEmitter *MCE = getTarget().createCodeEmitter(*this); + if (MCE == 0) + return CGFT_ErrorOccurred; + + AsmStreamer.reset(createMachOStreamer(*Context, Out, MCE)); + break; } } // Create the AsmPrinter, which takes ownership of Context and AsmStreamer // if successful. FunctionPass *Printer = - getTarget().createAsmPrinter(Out, *this, *Context, *AsmStreamer, - getMCAsmInfo()); + getTarget().createAsmPrinter(Out, *this, *Context, *AsmStreamer, + getMCAsmInfo()); if (Printer == 0) return CGFT_ErrorOccurred; Modified: llvm/trunk/tools/llc/llc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=95162&r1=95161&r2=95162&view=diff ============================================================================== --- llvm/trunk/tools/llc/llc.cpp (original) +++ llvm/trunk/tools/llc/llc.cpp Tue Feb 2 17:57:42 2010 @@ -360,6 +360,7 @@ sys::Path(OutputFilename).eraseFromDisk(); return 1; case TargetMachine::CGFT_AssemblyFile: + case TargetMachine::CGFT_ObjectFile: break; } From evan.cheng at apple.com Tue Feb 2 17:58:13 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 02 Feb 2010 23:58:13 -0000 Subject: [llvm-commits] [llvm] r95163 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Message-ID: <201002022358.o12NwDtM027015@zion.cs.uiuc.edu> Author: evancheng Date: Tue Feb 2 17:58:13 2010 New Revision: 95163 URL: http://llvm.org/viewvc/llvm-project?rev=95163&view=rev Log: ByVal frame object size should be that of the byval argument, not the size of the type which is just a pointer. This is not known to break stuff but is wrong nevertheless. Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=95163&r1=95162&r2=95163&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Feb 2 17:58:13 2010 @@ -1471,13 +1471,17 @@ // changed with more analysis. // In case of tail call optimization mark all arguments mutable. Since they // could be overwritten by lowering of arguments in case of a tail call. - int FI = MFI->CreateFixedObject(ValVT.getSizeInBits()/8, - VA.getLocMemOffset(), isImmutable, false); - SDValue FIN = DAG.getFrameIndex(FI, getPointerTy()); - if (Flags.isByVal()) - return FIN; - return DAG.getLoad(ValVT, dl, Chain, FIN, - PseudoSourceValue::getFixedStack(FI), 0); + if (Flags.isByVal()) { + int FI = MFI->CreateFixedObject(Flags.getByValSize(), + VA.getLocMemOffset(), isImmutable, false); + return DAG.getFrameIndex(FI, getPointerTy()); + } else { + int FI = MFI->CreateFixedObject(ValVT.getSizeInBits()/8, + VA.getLocMemOffset(), isImmutable, false); + SDValue FIN = DAG.getFrameIndex(FI, getPointerTy()); + return DAG.getLoad(ValVT, dl, Chain, FIN, + PseudoSourceValue::getFixedStack(FI), 0); + } } SDValue From echristo at apple.com Tue Feb 2 18:21:58 2010 From: echristo at apple.com (Eric Christopher) Date: Wed, 03 Feb 2010 00:21:58 -0000 Subject: [llvm-commits] [llvm] r95165 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineCalls.cpp lib/Transforms/Scalar/SimplifyLibCalls.cpp test/Transforms/InstCombine/objsize.ll test/Transforms/SimplifyLibCalls/strcpy_chk.ll Message-ID: <201002030021.o130LxTB027923@zion.cs.uiuc.edu> Author: echristo Date: Tue Feb 2 18:21:58 2010 New Revision: 95165 URL: http://llvm.org/viewvc/llvm-project?rev=95165&view=rev Log: Recommit this, looks like it wasn't the cause. Added: llvm/trunk/test/Transforms/InstCombine/objsize.ll - copied unchanged from r95153, llvm/trunk/test/Transforms/InstCombine/objsize.ll llvm/trunk/test/Transforms/SimplifyLibCalls/strcpy_chk.ll - copied unchanged from r95153, llvm/trunk/test/Transforms/SimplifyLibCalls/strcpy_chk.ll Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=95165&r1=95164&r2=95165&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Tue Feb 2 18:21:58 2010 @@ -102,7 +102,7 @@ if (PrefAlign > Align) Align = EnforceKnownAlignment(V, Align, PrefAlign); - + // We don't need to make any adjustment. return Align; } @@ -114,30 +114,30 @@ unsigned CopyAlign = MI->getAlignment(); if (CopyAlign < MinAlign) { - MI->setAlignment(ConstantInt::get(MI->getAlignmentType(), + MI->setAlignment(ConstantInt::get(MI->getAlignmentType(), MinAlign, false)); return MI; } - + // If MemCpyInst length is 1/2/4/8 bytes then replace memcpy with // load/store. ConstantInt *MemOpLength = dyn_cast(MI->getOperand(3)); if (MemOpLength == 0) return 0; - + // Source and destination pointer types are always "i8*" for intrinsic. See // if the size is something we can handle with a single primitive load/store. // A single load+store correctly handles overlapping memory in the memmove // case. unsigned Size = MemOpLength->getZExtValue(); if (Size == 0) return MI; // Delete this mem transfer. - + if (Size > 8 || (Size&(Size-1))) return 0; // If not 1/2/4/8 bytes, exit. - + // Use an integer load+store unless we can find something better. Type *NewPtrTy = PointerType::getUnqual(IntegerType::get(MI->getContext(), Size<<3)); - + // Memcpy forces the use of i8* for the source and destination. That means // that if you're using memcpy to move one double around, you'll get a cast // from double* to i8*. We'd much rather use a double load+store rather than @@ -165,18 +165,18 @@ } else break; } - + if (SrcETy->isSingleValueType()) NewPtrTy = PointerType::getUnqual(SrcETy); } } - - + + // If the memcpy/memmove provides better alignment info than we can // infer, use it. SrcAlign = std::max(SrcAlign, CopyAlign); DstAlign = std::max(DstAlign, CopyAlign); - + Value *Src = Builder->CreateBitCast(MI->getOperand(2), NewPtrTy); Value *Dest = Builder->CreateBitCast(MI->getOperand(1), NewPtrTy); Instruction *L = new LoadInst(Src, "tmp", false, SrcAlign); @@ -195,7 +195,7 @@ Alignment, false)); return MI; } - + // Extract the length and alignment and fill if they are constant. ConstantInt *LenC = dyn_cast(MI->getLength()); ConstantInt *FillC = dyn_cast(MI->getValue()); @@ -203,25 +203,25 @@ return 0; uint64_t Len = LenC->getZExtValue(); Alignment = MI->getAlignment(); - + // If the length is zero, this is a no-op if (Len == 0) return MI; // memset(d,c,0,a) -> noop - + // memset(s,c,n) -> store s, c (for n=1,2,4,8) if (Len <= 8 && isPowerOf2_32((uint32_t)Len)) { const Type *ITy = IntegerType::get(MI->getContext(), Len*8); // n=1 -> i8. - + Value *Dest = MI->getDest(); Dest = Builder->CreateBitCast(Dest, PointerType::getUnqual(ITy)); // Alignment 0 is identity for alignment 1 for memset, but not store. if (Alignment == 0) Alignment = 1; - + // Extract the fill value and store. uint64_t Fill = FillC->getZExtValue()*0x0101010101010101ULL; InsertNewInstBefore(new StoreInst(ConstantInt::get(ITy, Fill), Dest, false, Alignment), *MI); - + // Set the size of the copy to 0, it will be deleted on the next iteration. MI->setLength(Constant::getNullValue(LenC->getType())); return MI; @@ -231,7 +231,7 @@ } -/// visitCallInst - CallInst simplification. This mostly only handles folding +/// visitCallInst - CallInst simplification. This mostly only handles folding /// of intrinsic instructions. For normal calls, it allows visitCallSite to do /// the heavy lifting. /// @@ -246,10 +246,10 @@ CI.setDoesNotThrow(); return &CI; } - + IntrinsicInst *II = dyn_cast(&CI); if (!II) return visitCallSite(&CI); - + // Intrinsics cannot occur in an invoke, so handle them here instead of in // visitCallSite. if (MemIntrinsic *MI = dyn_cast(II)) { @@ -277,7 +277,7 @@ Intrinsic::ID MemCpyID = Intrinsic::memcpy; const Type *Tys[1]; Tys[0] = CI.getOperand(3)->getType(); - CI.setOperand(0, + CI.setOperand(0, Intrinsic::getDeclaration(M, MemCpyID, Tys, 1)); Changed = true; } @@ -298,10 +298,10 @@ if (Instruction *I = SimplifyMemSet(MSI)) return I; } - + if (Changed) return II; } - + switch (II->getIntrinsicID()) { default: break; case Intrinsic::bswap: @@ -309,7 +309,7 @@ if (IntrinsicInst *Operand = dyn_cast(II->getOperand(1))) if (Operand->getIntrinsicID() == Intrinsic::bswap) return ReplaceInstUsesWith(CI, Operand->getOperand(1)); - + // bswap(trunc(bswap(x))) -> trunc(lshr(x, c)) if (TruncInst *TI = dyn_cast(II->getOperand(1))) { if (IntrinsicInst *Operand = dyn_cast(TI->getOperand(0))) @@ -321,7 +321,7 @@ return new TruncInst(V, TI->getType()); } } - + break; case Intrinsic::powi: if (ConstantInt *Power = dyn_cast(II->getOperand(2))) { @@ -351,7 +351,7 @@ if ((Mask & KnownZero) == Mask) return ReplaceInstUsesWith(CI, ConstantInt::get(IT, APInt(BitWidth, TrailingZeros))); - + } break; case Intrinsic::ctlz: { @@ -368,7 +368,7 @@ if ((Mask & KnownZero) == Mask) return ReplaceInstUsesWith(CI, ConstantInt::get(IT, APInt(BitWidth, LeadingZeros))); - + } break; case Intrinsic::uadd_with_overflow: { @@ -399,7 +399,7 @@ Constant *Struct = ConstantStruct::get(II->getContext(), V, 2, false); return InsertValueInst::Create(Struct, Add, 0); } - + if (LHSKnownPositive && RHSKnownPositive) { // The sign bit is clear in both cases: this CANNOT overflow. // Create a simple add instruction, and insert it into the struct. @@ -428,7 +428,7 @@ // X + undef -> undef if (isa(II->getOperand(2))) return ReplaceInstUsesWith(CI, UndefValue::get(II->getType())); - + if (ConstantInt *RHS = dyn_cast(II->getOperand(2))) { // X + 0 -> {X, false} if (RHS->isZero()) { @@ -448,7 +448,7 @@ if (isa(II->getOperand(1)) || isa(II->getOperand(2))) return ReplaceInstUsesWith(CI, UndefValue::get(II->getType())); - + if (ConstantInt *RHS = dyn_cast(II->getOperand(2))) { // X - 0 -> {X, false} if (RHS->isZero()) { @@ -475,12 +475,12 @@ // X * undef -> undef if (isa(II->getOperand(2))) return ReplaceInstUsesWith(CI, UndefValue::get(II->getType())); - + if (ConstantInt *RHSI = dyn_cast(II->getOperand(2))) { // X*0 -> {0, false} if (RHSI->isZero()) return ReplaceInstUsesWith(CI, Constant::getNullValue(II->getType())); - + // X * 1 -> {X, false} if (RHSI->equalsInt(1)) { Constant *V[] = { @@ -509,7 +509,7 @@ case Intrinsic::ppc_altivec_stvxl: // Turn stvx -> store if the pointer is known aligned. if (GetOrEnforceKnownAlignment(II->getOperand(2), 16) >= 16) { - const Type *OpPtrTy = + const Type *OpPtrTy = PointerType::getUnqual(II->getOperand(1)->getType()); Value *Ptr = Builder->CreateBitCast(II->getOperand(2), OpPtrTy); return new StoreInst(II->getOperand(1), Ptr); @@ -520,13 +520,13 @@ case Intrinsic::x86_sse2_storeu_dq: // Turn X86 storeu -> store if the pointer is known aligned. if (GetOrEnforceKnownAlignment(II->getOperand(1), 16) >= 16) { - const Type *OpPtrTy = + const Type *OpPtrTy = PointerType::getUnqual(II->getOperand(2)->getType()); Value *Ptr = Builder->CreateBitCast(II->getOperand(1), OpPtrTy); return new StoreInst(II->getOperand(2), Ptr); } break; - + case Intrinsic::x86_sse_cvttss2si: { // These intrinsics only demands the 0th element of its input vector. If // we can simplify the input based on that, do so now. @@ -541,45 +541,45 @@ } break; } - + case Intrinsic::ppc_altivec_vperm: // Turn vperm(V1,V2,mask) -> shuffle(V1,V2,mask) if mask is a constant. if (ConstantVector *Mask = dyn_cast(II->getOperand(3))) { assert(Mask->getNumOperands() == 16 && "Bad type for intrinsic!"); - + // Check that all of the elements are integer constants or undefs. bool AllEltsOk = true; for (unsigned i = 0; i != 16; ++i) { - if (!isa(Mask->getOperand(i)) && + if (!isa(Mask->getOperand(i)) && !isa(Mask->getOperand(i))) { AllEltsOk = false; break; } } - + if (AllEltsOk) { // Cast the input vectors to byte vectors. Value *Op0 = Builder->CreateBitCast(II->getOperand(1), Mask->getType()); Value *Op1 = Builder->CreateBitCast(II->getOperand(2), Mask->getType()); Value *Result = UndefValue::get(Op0->getType()); - + // Only extract each element once. Value *ExtractedElts[32]; memset(ExtractedElts, 0, sizeof(ExtractedElts)); - + for (unsigned i = 0; i != 16; ++i) { if (isa(Mask->getOperand(i))) continue; unsigned Idx=cast(Mask->getOperand(i))->getZExtValue(); Idx &= 31; // Match the hardware behavior. - + if (ExtractedElts[Idx] == 0) { - ExtractedElts[Idx] = - Builder->CreateExtractElement(Idx < 16 ? Op0 : Op1, + ExtractedElts[Idx] = + Builder->CreateExtractElement(Idx < 16 ? Op0 : Op1, ConstantInt::get(Type::getInt32Ty(II->getContext()), Idx&15, false), "tmp"); } - + // Insert this value into the result vector. Result = Builder->CreateInsertElement(Result, ExtractedElts[Idx], ConstantInt::get(Type::getInt32Ty(II->getContext()), @@ -600,7 +600,7 @@ return EraseInstFromFunction(CI); } } - + // Scan down this block to see if there is another stack restore in the // same block without an intervening call/alloca. BasicBlock::iterator BI = II; @@ -625,7 +625,7 @@ } } } - + // If the stack restore is in a return/unwind block and if there are no // allocas or calls between the restore and the return, nuke the restore. if (!CannotRemove && (isa(TI) || isa(TI))) @@ -633,16 +633,40 @@ break; } case Intrinsic::objectsize: { - ConstantInt *Const = cast(II->getOperand(2)); - const Type *Ty = CI.getType(); + const Type *ReturnTy = CI.getType(); + Value *Op1 = II->getOperand(1); - // 0 is maximum number of bytes left, 1 is minimum number of bytes left. - // TODO: actually add these values, the current return values are "don't - // know". - if (Const->getZExtValue() == 0) - return ReplaceInstUsesWith(CI, Constant::getAllOnesValue(Ty)); - else - return ReplaceInstUsesWith(CI, ConstantInt::get(Ty, 0)); + // If we're a constant expr then we just return the number of bytes + // left in whatever we're indexing. Since it's constant there's no + // need for maximum or minimum bytes. + if (ConstantExpr *CE = dyn_cast(Op1)) { + // If this isn't a GEP give up. + if (CE->getOpcode() != Instruction::GetElementPtr) return 0; + + const PointerType *ObjTy = + reinterpret_cast(CE->getOperand(0)->getType()); + + if (const ArrayType *AT = dyn_cast(ObjTy->getElementType())) { + + // Deal with multi-dimensional arrays + const ArrayType *SAT = AT; + while ((AT = dyn_cast(AT->getElementType()))) + SAT = AT; + + size_t numElems = SAT->getNumElements(); + // We return the remaining bytes, so grab the size of an element + // in bytes. + size_t sizeofElem = SAT->getElementType()->getPrimitiveSizeInBits() / 8; + + ConstantInt *Const = + cast(CE->getOperand(CE->getNumOperands() - 1)); + size_t indx = Const->getZExtValue(); + return ReplaceInstUsesWith(CI, + ConstantInt::get(ReturnTy, + ((numElems - indx) * sizeofElem))); + } + } + // TODO: Add more types here. } } @@ -655,7 +679,7 @@ return visitCallSite(&II); } -/// isSafeToEliminateVarargsCast - If this cast does not affect the value +/// isSafeToEliminateVarargsCast - If this cast does not affect the value /// passed through the varargs area, we can eliminate the use of the cast. static bool isSafeToEliminateVarargsCast(const CallSite CS, const CastInst * const CI, @@ -670,7 +694,7 @@ if (!CS.paramHasAttr(ix, Attribute::ByVal)) return true; - const Type* SrcTy = + const Type* SrcTy = cast(CI->getOperand(0)->getType())->getElementType(); const Type* DstTy = cast(CI->getType())->getElementType(); if (!SrcTy->isSized() || !DstTy->isSized()) @@ -701,7 +725,7 @@ !CalleeF->isDeclaration()) { Instruction *OldCall = CS.getInstruction(); new StoreInst(ConstantInt::getTrue(Callee->getContext()), - UndefValue::get(Type::getInt1PtrTy(Callee->getContext())), + UndefValue::get(Type::getInt1PtrTy(Callee->getContext())), OldCall); // If OldCall dues not return void then replaceAllUsesWith undef. // This allows ValueHandlers and custom metadata to adjust itself. @@ -709,7 +733,7 @@ OldCall->replaceAllUsesWith(UndefValue::get(OldCall->getType())); if (isa(OldCall)) return EraseInstFromFunction(*OldCall); - + // We cannot remove an invoke, because it would change the CFG, just // change the callee to a null pointer. cast(OldCall)->setOperand(0, @@ -775,7 +799,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { if (!isa(CS.getCalledValue())) return false; ConstantExpr *CE = cast(CS.getCalledValue()); - if (CE->getOpcode() != Instruction::BitCast || + if (CE->getOpcode() != Instruction::BitCast || !isa(CE->getOperand(0))) return false; Function *Callee = cast(CE->getOperand(0)); @@ -840,7 +864,7 @@ if (!CastInst::isCastable(ActTy, ParamTy)) return false; // Cannot transform this parameter value. - if (CallerPAL.getParamAttributes(i + 1) + if (CallerPAL.getParamAttributes(i + 1) & Attribute::typeIncompatible(ParamTy)) return false; // Attribute not compatible with transformed value. @@ -965,7 +989,7 @@ Value *NV = NC; if (OldRetTy != NV->getType() && !Caller->use_empty()) { if (!NV->getType()->isVoidTy()) { - Instruction::CastOps opcode = CastInst::getCastOpcode(NC, false, + Instruction::CastOps opcode = CastInst::getCastOpcode(NC, false, OldRetTy, false); NV = NC = CastInst::Create(opcode, NC, OldRetTy, "tmp"); @@ -987,7 +1011,7 @@ if (!Caller->use_empty()) Caller->replaceAllUsesWith(NV); - + EraseInstFromFunction(*Caller); return true; } @@ -1105,11 +1129,11 @@ // Replace the trampoline call with a direct call. Let the generic // code sort out any function type mismatches. - FunctionType *NewFTy = FunctionType::get(FTy->getReturnType(), NewTypes, + FunctionType *NewFTy = FunctionType::get(FTy->getReturnType(), NewTypes, FTy->isVarArg()); Constant *NewCallee = NestF->getType() == PointerType::getUnqual(NewFTy) ? - NestF : ConstantExpr::getBitCast(NestF, + NestF : ConstantExpr::getBitCast(NestF, PointerType::getUnqual(NewFTy)); const AttrListPtr &NewPAL = AttrListPtr::get(NewAttrs.begin(), NewAttrs.end()); @@ -1143,8 +1167,9 @@ // parameter, there is no need to adjust the argument list. Let the generic // code sort out any function type mismatches. Constant *NewCallee = - NestF->getType() == PTy ? NestF : + NestF->getType() == PTy ? NestF : ConstantExpr::getBitCast(NestF, PTy); CS.setCalledFunction(NewCallee); return CS.getInstruction(); } + Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=95165&r1=95164&r2=95165&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Tue Feb 2 18:21:58 2010 @@ -1213,8 +1213,13 @@ if (!SizeCI) return 0; - // We don't have any length information, just lower to a plain strcpy. - if (SizeCI->isAllOnesValue()) + // If a) we don't have any length information, or b) we know this will + // fit then just lower to a plain strcpy. Otherwise we'll keep our + // strcpy_chk call which may fail at runtime if the size is too long. + // TODO: It might be nice to get a maximum length out of the possible + // string lengths for varying. + if (SizeCI->isAllOnesValue() || + SizeCI->getZExtValue() >= GetStringLength(CI->getOperand(2))) return EmitStrCpy(CI->getOperand(1), CI->getOperand(2), B); return 0; From sabre at nondot.org Tue Feb 2 18:22:03 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 00:22:03 -0000 Subject: [llvm-commits] [llvm] r95166 - /llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Message-ID: <201002030022.o130M36E027940@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 18:22:02 2010 New Revision: 95166 URL: http://llvm.org/viewvc/llvm-project?rev=95166&view=rev Log: make any use of the "O" stream in asmprinter print to stderr if in filetype=obj mode. This is a hack, and will live until dwarf emission and other random stuff that is not yet going through MCStreamer is upgraded. It only impacts filetype=obj mode. Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=95166&r1=95165&r2=95166&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Feb 2 18:22:02 2010 @@ -123,6 +123,7 @@ OwningPtr Context(new MCContext()); OwningPtr AsmStreamer; + formatted_raw_ostream *LegacyOutput; switch (FileType) { default: return CGFT_ErrorOccurred; case CGFT_AssemblyFile: @@ -130,6 +131,8 @@ getTargetData()->isLittleEndian(), getVerboseAsm(), /*instprinter*/0, /*codeemitter*/0)); + // Set the AsmPrinter's "O" to the output file. + LegacyOutput = &Out; break; case CGFT_ObjectFile: { // Create the code emitter for the target if it exists. If not, .o file @@ -139,6 +142,12 @@ return CGFT_ErrorOccurred; AsmStreamer.reset(createMachOStreamer(*Context, Out, MCE)); + + // Any output to the asmprinter's "O" stream is bad and needs to be fixed, + // force it to come out stderr. + // FIXME: this is horrible and leaks, eventually remove the raw_ostream from + // asmprinter. + LegacyOutput = new formatted_raw_ostream(errs()); break; } } @@ -146,7 +155,7 @@ // Create the AsmPrinter, which takes ownership of Context and AsmStreamer // if successful. FunctionPass *Printer = - getTarget().createAsmPrinter(Out, *this, *Context, *AsmStreamer, + getTarget().createAsmPrinter(*LegacyOutput, *this, *Context, *AsmStreamer, getMCAsmInfo()); if (Printer == 0) return CGFT_ErrorOccurred; From sabre at nondot.org Tue Feb 2 18:29:56 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 00:29:56 -0000 Subject: [llvm-commits] [llvm] r95168 - /llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Message-ID: <201002030029.o130Tu2x028209@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 18:29:55 2010 New Revision: 95168 URL: http://llvm.org/viewvc/llvm-project?rev=95168&view=rev Log: pass an instprinter into the AsmPrinter if it is available. Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=95168&r1=95167&r2=95168&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Feb 2 18:29:55 2010 @@ -126,14 +126,18 @@ formatted_raw_ostream *LegacyOutput; switch (FileType) { default: return CGFT_ErrorOccurred; - case CGFT_AssemblyFile: - AsmStreamer.reset(createAsmStreamer(*Context, Out, *getMCAsmInfo(), + case CGFT_AssemblyFile: { + const MCAsmInfo &MAI = *getMCAsmInfo(); + MCInstPrinter *InstPrinter = + getTarget().createMCInstPrinter(MAI.getAssemblerDialect(), MAI, Out); + AsmStreamer.reset(createAsmStreamer(*Context, Out, MAI, getTargetData()->isLittleEndian(), - getVerboseAsm(), /*instprinter*/0, + getVerboseAsm(), InstPrinter, /*codeemitter*/0)); // Set the AsmPrinter's "O" to the output file. LegacyOutput = &Out; break; + } case CGFT_ObjectFile: { // Create the code emitter for the target if it exists. If not, .o file // emission fails. From bob.wilson at apple.com Tue Feb 2 18:33:21 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Wed, 03 Feb 2010 00:33:21 -0000 Subject: [llvm-commits] [llvm] r95170 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp Message-ID: <201002030033.o130XMlO028474@zion.cs.uiuc.edu> Author: bwilson Date: Tue Feb 2 18:33:21 2010 New Revision: 95170 URL: http://llvm.org/viewvc/llvm-project?rev=95170&view=rev Log: Fix some comment typos. Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=95170&r1=95169&r2=95170&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Tue Feb 2 18:33:21 2010 @@ -2102,7 +2102,7 @@ for (pred_iterator PI = pred_begin(CurrentBlock), PE = pred_end(CurrentBlock); PI != PE; ++PI) { // We're not interested in PRE where the block is its - // own predecessor, on in blocks with predecessors + // own predecessor, or in blocks with predecessors // that are not reachable. if (*PI == CurrentBlock) { NumWithout = 2; @@ -2150,10 +2150,10 @@ continue; } - // Instantiate the expression the in predecessor that lacked it. + // Instantiate the expression in the predecessor that lacked it. // Because we are going top-down through the block, all value numbers // will be available in the predecessor by the time we need them. Any - // that weren't original present will have been instantiated earlier + // that weren't originally present will have been instantiated earlier // in this loop. Instruction *PREInstr = CurInst->clone(); bool success = true; From dalej at apple.com Tue Feb 2 18:36:41 2010 From: dalej at apple.com (Dale Johannesen) Date: Wed, 03 Feb 2010 00:36:41 -0000 Subject: [llvm-commits] [llvm] r95171 - /llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Message-ID: <201002030036.o130afSX028637@zion.cs.uiuc.edu> Author: johannes Date: Tue Feb 2 18:36:40 2010 New Revision: 95171 URL: http://llvm.org/viewvc/llvm-project?rev=95171&view=rev Log: Print FPImm a less kludgy way; APFloat.toString seems to have some problems anyway. Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp?rev=95171&r1=95170&r2=95171&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Tue Feb 2 18:36:40 2010 @@ -440,12 +440,9 @@ } else if (MI->getOperand(0).getType()==MachineOperand::MO_FPImmediate) { // This is more naturally done in printOperand, but since the only use // of such an operand is in this comment and that is temporary, we - // prefer to keep this mess localized. - SmallVectorImpl Str(20); - APFloat APF = MI->getOperand(0).getFPImm()->getValueAPF(); - APF.toString(Str, 0, 0); - for (unsigned i=0; igetOperand(0).print(O, &TM); } else printOperand(MI, 0); } else { From rjmccall at apple.com Tue Feb 2 18:48:17 2010 From: rjmccall at apple.com (John McCall) Date: Tue, 2 Feb 2010 16:48:17 -0800 Subject: [llvm-commits] [llvm] r95171 - /llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp In-Reply-To: <201002030036.o130afSX028637@zion.cs.uiuc.edu> References: <201002030036.o130afSX028637@zion.cs.uiuc.edu> Message-ID: <6045388C-FFBA-459A-9966-ED68083F9A25@apple.com> On Feb 2, 2010, at 4:36 PM, Dale Johannesen wrote: > Author: johannes > Date: Tue Feb 2 18:36:40 2010 > New Revision: 95171 > > URL: http://llvm.org/viewvc/llvm-project?rev=95171&view=rev > Log: > Print FPImm a less kludgy way; APFloat.toString seems > to have some problems anyway. Can you elaborate? I mean, I think you're better off staying in hex anyway, but if there are obvious problems in APFloat::toString I'd be happy to fix them. John. From sabre at nondot.org Tue Feb 2 18:48:53 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 00:48:53 -0000 Subject: [llvm-commits] [llvm] r95175 - in /llvm/trunk/test/CodeGen/X86: 2008-07-11-SpillerBug.ll 2009-04-21-NoReloadImpDef.ll Message-ID: <201002030048.o130mrtu029110@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 18:48:53 2010 New Revision: 95175 URL: http://llvm.org/viewvc/llvm-project?rev=95175&view=rev Log: make these less sensitive to asm verbose changes by disabling it for them. Modified: llvm/trunk/test/CodeGen/X86/2008-07-11-SpillerBug.ll llvm/trunk/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll Modified: llvm/trunk/test/CodeGen/X86/2008-07-11-SpillerBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-07-11-SpillerBug.ll?rev=95175&r1=95174&r2=95175&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2008-07-11-SpillerBug.ll (original) +++ llvm/trunk/test/CodeGen/X86/2008-07-11-SpillerBug.ll Tue Feb 2 18:48:53 2010 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -relocation-model=static -disable-fp-elim -post-RA-scheduler=false | FileCheck %s +; RUN: llc < %s -march=x86 -relocation-model=static -disable-fp-elim -post-RA-scheduler=false -asm-verbose=0 | FileCheck %s ; PR2536 Modified: llvm/trunk/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll?rev=95175&r1=95174&r2=95175&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll (original) +++ llvm/trunk/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll Tue Feb 2 18:48:53 2010 @@ -1,4 +1,4 @@ -; RUN: llc -mtriple=i386-apple-darwin10.0 -relocation-model=pic \ +; RUN: llc -mtriple=i386-apple-darwin10.0 -relocation-model=pic -asm-verbose=false \ ; RUN: -disable-fp-elim -mattr=-sse41,-sse3,+sse2 -post-RA-scheduler=false < %s | \ ; RUN: FileCheck %s ; rdar://6808032 From dalej at apple.com Tue Feb 2 18:56:44 2010 From: dalej at apple.com (Dale Johannesen) Date: Tue, 2 Feb 2010 16:56:44 -0800 Subject: [llvm-commits] [llvm] r95171 - /llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp In-Reply-To: <6045388C-FFBA-459A-9966-ED68083F9A25@apple.com> References: <201002030036.o130afSX028637@zion.cs.uiuc.edu> <6045388C-FFBA-459A-9966-ED68083F9A25@apple.com> Message-ID: On Feb 2, 2010, at 4:48 PMPST, John McCall wrote: > On Feb 2, 2010, at 4:36 PM, Dale Johannesen wrote: >> Author: johannes >> Date: Tue Feb 2 18:36:40 2010 >> New Revision: 95171 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=95171&view=rev >> Log: >> Print FPImm a less kludgy way; APFloat.toString seems >> to have some problems anyway. > > Can you elaborate? I mean, I think you're better off staying in hex > anyway, but if there are obvious problems in APFloat::toString I'd > be happy to fix them. It hit the assertion at line 3417 when converting a number which was double 873.1834 in the source, and appeared to be represented correctly as an APFloat. The 2nd and 3rd parameters to toString were 0. I didn't investigate it farther than that. If all the bits matter, e.g. when generating assembly code, hex is better and almost necessary. This is a comment. From sabre at nondot.org Tue Feb 2 19:00:52 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 01:00:52 -0000 Subject: [llvm-commits] [llvm] r95177 - in /llvm/trunk: lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp lib/Target/MSP430/AsmPrinter/MSP430InstPrinter.cpp lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp lib/Target/X86/AsmPrinter/X86MCInstLower.cpp utils/TableGen/AsmWriterEmitter.cpp Message-ID: <201002030100.o1310r9r029554@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 19:00:52 2010 New Revision: 95177 URL: http://llvm.org/viewvc/llvm-project?rev=95177&view=rev Log: sink handling of target-independent machine instrs (other than DEBUG_VALUE :( ) into the target indep AsmPrinter.cpp file. This allows elimination of the NO_ASM_WRITER_BOILERPLATE hack among other things. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430InstPrinter.cpp llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=95177&r1=95176&r2=95177&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Feb 2 19:00:52 2010 @@ -346,8 +346,25 @@ // FIXME: Clean up processDebugLoc. processDebugLoc(II, true); - EmitInstruction(II); - + switch (II->getOpcode()) { + case TargetInstrInfo::DBG_LABEL: + case TargetInstrInfo::EH_LABEL: + case TargetInstrInfo::GC_LABEL: + printLabel(II); + break; + case TargetInstrInfo::INLINEASM: + printInlineAsm(II); + break; + case TargetInstrInfo::IMPLICIT_DEF: + printImplicitDef(II); + break; + case TargetInstrInfo::KILL: + printKill(II); + break; + default: + EmitInstruction(II); + break; + } if (VerboseAsm) EmitComments(*II); O << '\n'; Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=95177&r1=95176&r2=95177&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Tue Feb 2 19:00:52 2010 @@ -1154,20 +1154,6 @@ case ARM::t2MOVi32imm: assert(0 && "Should be lowered by thumb2it pass"); default: break; - case TargetInstrInfo::DBG_LABEL: - case TargetInstrInfo::EH_LABEL: - case TargetInstrInfo::GC_LABEL: - printLabel(MI); - return; - case TargetInstrInfo::KILL: - printKill(MI); - return; - case TargetInstrInfo::INLINEASM: - printInlineAsm(MI); - return; - case TargetInstrInfo::IMPLICIT_DEF: - printImplicitDef(MI); - return; case ARM::PICADD: { // FIXME: Remove asm string from td file. // This is a pseudo op for a label + instruction sequence, which looks like: // LPC0: Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp?rev=95177&r1=95176&r2=95177&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp Tue Feb 2 19:00:52 2010 @@ -24,7 +24,6 @@ // Include the auto-generated portion of the assembly writer. #define MachineInstr MCInst #define ARMAsmPrinter ARMInstPrinter // FIXME: REMOVE. -#define NO_ASM_WRITER_BOILERPLATE #include "ARMGenAsmWriter.inc" #undef MachineInstr #undef ARMAsmPrinter Modified: llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp?rev=95177&r1=95176&r2=95177&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp Tue Feb 2 19:00:52 2010 @@ -181,27 +181,8 @@ void MSP430AsmPrinter::EmitInstruction(const MachineInstr *MI) { MSP430MCInstLower MCInstLowering(OutContext, *Mang, *this); - switch (MI->getOpcode()) { - case TargetInstrInfo::DBG_LABEL: - case TargetInstrInfo::EH_LABEL: - case TargetInstrInfo::GC_LABEL: - printLabel(MI); - return; - case TargetInstrInfo::KILL: - printKill(MI); - return; - case TargetInstrInfo::INLINEASM: - printInlineAsm(MI); - return; - case TargetInstrInfo::IMPLICIT_DEF: - printImplicitDef(MI); - return; - default: break; - } - MCInst TmpInst; MCInstLowering.Lower(MI, TmpInst); - printMCInst(&TmpInst); } Modified: llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430InstPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430InstPrinter.cpp?rev=95177&r1=95176&r2=95177&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430InstPrinter.cpp (original) +++ llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430InstPrinter.cpp Tue Feb 2 19:00:52 2010 @@ -25,7 +25,6 @@ // Include the auto-generated portion of the assembly writer. #define MachineInstr MCInst -#define NO_ASM_WRITER_BOILERPLATE #include "MSP430GenAsmWriter.inc" #undef MachineInstr Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp?rev=95177&r1=95176&r2=95177&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp Tue Feb 2 19:00:52 2010 @@ -24,7 +24,6 @@ // Include the auto-generated portion of the assembly writer. #define MachineInstr MCInst -#define NO_ASM_WRITER_BOILERPLATE #include "X86GenAsmWriter.inc" #undef MachineInstr Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp?rev=95177&r1=95176&r2=95177&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp Tue Feb 2 19:00:52 2010 @@ -24,7 +24,6 @@ // Include the auto-generated portion of the assembly writer. #define MachineInstr MCInst -#define NO_ASM_WRITER_BOILERPLATE #include "X86GenAsmWriter1.inc" #undef MachineInstr Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp?rev=95177&r1=95176&r2=95177&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Tue Feb 2 19:00:52 2010 @@ -411,11 +411,6 @@ void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) { X86MCInstLower MCInstLowering(OutContext, Mang, *this); switch (MI->getOpcode()) { - case TargetInstrInfo::DBG_LABEL: - case TargetInstrInfo::EH_LABEL: - case TargetInstrInfo::GC_LABEL: - printLabel(MI); - return; case TargetInstrInfo::DEBUG_VALUE: { // FIXME: if this is implemented for another target before it goes // away completely, the common part should be moved into AsmPrinter. @@ -455,15 +450,6 @@ printOperand(MI, NOps-2); return; } - case TargetInstrInfo::INLINEASM: - printInlineAsm(MI); - return; - case TargetInstrInfo::IMPLICIT_DEF: - printImplicitDef(MI); - return; - case TargetInstrInfo::KILL: - printKill(MI); - return; case X86::MOVPC32r: { MCInst TmpInst; // This is a pseudo op for a two instruction sequence with a label, which Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=95177&r1=95176&r2=95177&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Tue Feb 2 19:00:52 2010 @@ -692,24 +692,6 @@ StringTable.EmitString(O); O << ";\n\n"; - O << "\n#ifndef NO_ASM_WRITER_BOILERPLATE\n"; - - O << " if (MI->getOpcode() == TargetInstrInfo::INLINEASM) {\n" - << " printInlineAsm(MI);\n" - << " return;\n" - << " } else if (MI->isLabel()) {\n" - << " printLabel(MI);\n" - << " return;\n" - << " } else if (MI->getOpcode() == TargetInstrInfo::IMPLICIT_DEF) {\n" - << " printImplicitDef(MI);\n" - << " return;\n" - << " } else if (MI->getOpcode() == TargetInstrInfo::KILL) {\n" - << " printKill(MI);\n" - << " return;\n" - << " }\n\n"; - - O << "\n#endif\n"; - O << " O << \"\\t\";\n\n"; O << " // Emit the opcode for the instruction.\n" From sabre at nondot.org Tue Feb 2 19:09:55 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 01:09:55 -0000 Subject: [llvm-commits] [llvm] r95178 - in /llvm/trunk/lib: CodeGen/AsmPrinter/ Target/ARM/AsmPrinter/ Target/Alpha/AsmPrinter/ Target/Blackfin/AsmPrinter/ Target/CellSPU/AsmPrinter/ Target/MSP430/AsmPrinter/ Target/Mips/AsmPrinter/ Target/PowerPC/AsmPrinter/ Target/Sparc/AsmPrinter/ Target/SystemZ/AsmPrinter/ Target/X86/AsmPrinter/ Target/XCore/AsmPrinter/ Message-ID: <201002030109.o1319tLX029878@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 19:09:55 2010 New Revision: 95178 URL: http://llvm.org/viewvc/llvm-project?rev=95178&view=rev Log: rejigger the world so that EmitInstruction prints the \n at the end of the instruction instead of expecting the caller to do it. This currently causes the asm-verbose instruction comments to be on the next line. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp llvm/trunk/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=95178&r1=95177&r2=95178&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Feb 2 19:09:55 2010 @@ -351,15 +351,19 @@ case TargetInstrInfo::EH_LABEL: case TargetInstrInfo::GC_LABEL: printLabel(II); + O << '\n'; break; case TargetInstrInfo::INLINEASM: printInlineAsm(II); + O << '\n'; break; case TargetInstrInfo::IMPLICIT_DEF: printImplicitDef(II); + O << '\n'; break; case TargetInstrInfo::KILL: printKill(II); + O << '\n'; break; default: EmitInstruction(II); @@ -367,7 +371,6 @@ } if (VerboseAsm) EmitComments(*II); - O << '\n'; // FIXME: Clean up processDebugLoc. processDebugLoc(II, false); @@ -1580,7 +1583,7 @@ } } -/// EmitComments - Pretty-print comments for basic blocks. +/// PrintBasicBlockLoopComments - Pretty-print comments for basic blocks. static void PrintBasicBlockLoopComments(const MachineBasicBlock &MBB, const MachineLoopInfo *LI, const AsmPrinter &AP) { @@ -1716,8 +1719,6 @@ if (!VerboseAsm) return; - bool Newline = false; - if (!MI.getDebugLoc().isUnknown()) { DILocation DLT = MF->getDILocation(MI.getDebugLoc()); @@ -1733,7 +1734,7 @@ O << ':' << DLT.getLineNumber(); if (DLT.getColumnNumber() != 0) O << ':' << DLT.getColumnNumber(); - Newline = true; + O << '\n'; } // Check for spills and reloads @@ -1748,37 +1749,29 @@ if (TM.getInstrInfo()->isLoadFromStackSlotPostFE(&MI, FI)) { if (FrameInfo->isSpillSlotObjectIndex(FI)) { MMO = *MI.memoperands_begin(); - if (Newline) O << '\n'; O.PadToColumn(MAI->getCommentColumn()); - O << MAI->getCommentString() << ' ' << MMO->getSize() << "-byte Reload"; - Newline = true; + O << MAI->getCommentString() << ' ' << MMO->getSize() << "-byte Reload\n"; } } else if (TM.getInstrInfo()->hasLoadFromStackSlot(&MI, MMO, FI)) { if (FrameInfo->isSpillSlotObjectIndex(FI)) { - if (Newline) O << '\n'; O.PadToColumn(MAI->getCommentColumn()); O << MAI->getCommentString() << ' ' - << MMO->getSize() << "-byte Folded Reload"; - Newline = true; + << MMO->getSize() << "-byte Folded Reload\n"; } } else if (TM.getInstrInfo()->isStoreToStackSlotPostFE(&MI, FI)) { if (FrameInfo->isSpillSlotObjectIndex(FI)) { MMO = *MI.memoperands_begin(); - if (Newline) O << '\n'; O.PadToColumn(MAI->getCommentColumn()); - O << MAI->getCommentString() << ' ' << MMO->getSize() << "-byte Spill"; - Newline = true; + O << MAI->getCommentString() << ' ' << MMO->getSize() << "-byte Spill\n"; } } else if (TM.getInstrInfo()->hasStoreToStackSlot(&MI, MMO, FI)) { if (FrameInfo->isSpillSlotObjectIndex(FI)) { - if (Newline) O << '\n'; O.PadToColumn(MAI->getCommentColumn()); O << MAI->getCommentString() << ' ' - << MMO->getSize() << "-byte Folded Spill"; - Newline = true; + << MMO->getSize() << "-byte Folded Spill\n"; } } @@ -1787,9 +1780,8 @@ if (TM.getInstrInfo()->isMoveInstr(MI, SrcReg, DstReg, SrcSubIdx, DstSubIdx)) { if (MI.getAsmPrinterFlag(ReloadReuse)) { - if (Newline) O << '\n'; O.PadToColumn(MAI->getCommentColumn()); - O << MAI->getCommentString() << " Reload Reuse"; + O << MAI->getCommentString() << " Reload Reuse\n"; } } } Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=95178&r1=95177&r2=95178&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Tue Feb 2 19:09:55 2010 @@ -1034,6 +1034,7 @@ EmitAlignment(2); printInstruction(MI); + O << '\n'; } } Modified: llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp?rev=95178&r1=95177&r2=95178&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp Tue Feb 2 19:09:55 2010 @@ -45,7 +45,10 @@ return "Alpha Assembly Printer"; } void printInstruction(const MachineInstr *MI); - void EmitInstruction(const MachineInstr *MI) { printInstruction(MI); } + void EmitInstruction(const MachineInstr *MI) { + printInstruction(MI); + O << '\n'; + } static const char *getRegisterName(unsigned RegNo); void printOp(const MachineOperand &MO, bool IsCallOp = false); Modified: llvm/trunk/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp?rev=95178&r1=95177&r2=95178&view=diff ============================================================================== --- llvm/trunk/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp Tue Feb 2 19:09:55 2010 @@ -52,7 +52,10 @@ void printInstruction(const MachineInstr *MI); // autogenerated. static const char *getRegisterName(unsigned RegNo); - void EmitInstruction(const MachineInstr *MI) { printInstruction(MI); } + void EmitInstruction(const MachineInstr *MI) { + printInstruction(MI); + O << '\n'; + } bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, unsigned AsmVariant, const char *ExtraCode); bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, Modified: llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp?rev=95178&r1=95177&r2=95178&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp Tue Feb 2 19:09:55 2010 @@ -58,6 +58,7 @@ void EmitInstruction(const MachineInstr *MI) { printInstruction(MI); + O << '\n'; } void printOp(const MachineOperand &MO); Modified: llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp?rev=95178&r1=95177&r2=95178&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp Tue Feb 2 19:09:55 2010 @@ -184,6 +184,7 @@ MCInst TmpInst; MCInstLowering.Lower(MI, TmpInst); printMCInst(&TmpInst); + O << '\n'; } static MCInstPrinter *createMSP430MCInstPrinter(const Target &T, Modified: llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp?rev=95178&r1=95177&r2=95178&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp Tue Feb 2 19:09:55 2010 @@ -75,7 +75,10 @@ void emitFrameDirective(); void printInstruction(const MachineInstr *MI); // autogenerated. - void EmitInstruction(const MachineInstr *MI) { printInstruction(MI); } + void EmitInstruction(const MachineInstr *MI) { + printInstruction(MI); + O << '\n'; + } virtual void EmitFunctionBodyStart(); virtual void EmitFunctionBodyEnd(); static const char *getRegisterName(unsigned RegNo); Modified: llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp?rev=95178&r1=95177&r2=95178&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp Tue Feb 2 19:09:55 2010 @@ -555,6 +555,7 @@ O << ", "; printOperand(MI, 1); O << ", " << (unsigned int)SH; + O << '\n'; return; } } @@ -565,6 +566,7 @@ printOperand(MI, 0); O << ", "; printOperand(MI, 1); + O << '\n'; return; } @@ -578,11 +580,13 @@ O << ", "; printOperand(MI, 1); O << ", " << (unsigned int)SH; + O << '\n'; return; } } printInstruction(MI); + O << '\n'; } void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() { Modified: llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp?rev=95178&r1=95177&r2=95178&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp Tue Feb 2 19:09:55 2010 @@ -44,6 +44,7 @@ virtual void EmitInstruction(const MachineInstr *MI) { printInstruction(MI); + O << '\n'; } void printInstruction(const MachineInstr *MI); // autogenerated. static const char *getRegisterName(unsigned RegNo); Modified: llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp?rev=95178&r1=95177&r2=95178&view=diff ============================================================================== --- llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp Tue Feb 2 19:09:55 2010 @@ -79,6 +79,7 @@ void SystemZAsmPrinter::EmitInstruction(const MachineInstr *MI) { // Call the autogenerated instruction printer routines. printInstruction(MI); + O << '\n'; } void SystemZAsmPrinter::printPCRelImmOperand(const MachineInstr *MI, int OpNum){ Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp?rev=95178&r1=95177&r2=95178&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Tue Feb 2 19:09:55 2010 @@ -448,6 +448,7 @@ } O << "+"; printOperand(MI, NOps-2); + O << '\n'; return; } case X86::MOVPC32r: { @@ -475,6 +476,7 @@ TmpInst.setOpcode(X86::POP32r); TmpInst.getOperand(0) = MCOperand::CreateReg(MI->getOperand(0).getReg()); printMCInst(&TmpInst); + O << '\n'; return; } @@ -512,6 +514,7 @@ TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(1).getReg())); TmpInst.addOperand(MCOperand::CreateExpr(DotExpr)); printMCInst(&TmpInst); + O << '\n'; return; } } @@ -521,5 +524,6 @@ printMCInst(&TmpInst); + O << '\n'; } Modified: llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp?rev=95178&r1=95177&r2=95178&view=diff ============================================================================== --- llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp Tue Feb 2 19:09:55 2010 @@ -309,6 +309,7 @@ return; } printInstruction(MI); + O << '\n'; } // Force static initialization. From sabre at nondot.org Tue Feb 2 19:13:25 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 01:13:25 -0000 Subject: [llvm-commits] [llvm] r95179 - in /llvm/trunk/lib/Target/X86/AsmPrinter: X86AsmPrinter.cpp X86AsmPrinter.h X86MCInstLower.cpp Message-ID: <201002030113.o131DQRu030022@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 19:13:25 2010 New Revision: 95179 URL: http://llvm.org/viewvc/llvm-project?rev=95179&view=rev Log: Finally eliminate printMCInst and send instructions through the streamer. Demo: $ cat t.ll define i32 @test() nounwind { ret i32 42 } $ llc t.ll -o - .. _test: movl $42, %eax ret $ llc t.ll -o t.o -filetype=obj $ otool -tv t.o t.o: (__TEXT,__text) section _test: 00000000 movl $0x0000002a,%eax 00000005 ret Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp?rev=95179&r1=95178&r2=95179&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Tue Feb 2 19:13:25 2010 @@ -45,13 +45,6 @@ // Primitive Helper Functions. //===----------------------------------------------------------------------===// -void X86AsmPrinter::printMCInst(const MCInst *MI) { - if (MAI->getAssemblerDialect() == 0) - X86ATTInstPrinter(O, *MAI).printInstruction(MI); - else - X86IntelInstPrinter(O, *MAI).printInstruction(MI); -} - void X86AsmPrinter::PrintPICBaseSymbol() const { const TargetLowering *TLI = TM.getTargetLowering(); O << *static_cast(TLI)->getPICBaseSymbol(MF, Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h?rev=95179&r1=95178&r2=95179&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h Tue Feb 2 19:13:25 2010 @@ -60,8 +60,6 @@ virtual void EmitInstruction(const MachineInstr *MI); - void printMCInst(const MCInst *MI); - void printSymbolOperand(const MachineOperand &MO); Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp?rev=95179&r1=95178&r2=95179&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Tue Feb 2 19:13:25 2010 @@ -466,8 +466,7 @@ // lot of extra uniquing. TmpInst.addOperand(MCOperand::CreateExpr(MCSymbolRefExpr::Create(PICBase, OutContext))); - printMCInst(&TmpInst); - O << '\n'; + OutStreamer.EmitInstruction(TmpInst); // Emit the label. OutStreamer.EmitLabel(PICBase); @@ -475,8 +474,7 @@ // popl $reg TmpInst.setOpcode(X86::POP32r); TmpInst.getOperand(0) = MCOperand::CreateReg(MI->getOperand(0).getReg()); - printMCInst(&TmpInst); - O << '\n'; + OutStreamer.EmitInstruction(TmpInst); return; } @@ -513,8 +511,7 @@ TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(0).getReg())); TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(1).getReg())); TmpInst.addOperand(MCOperand::CreateExpr(DotExpr)); - printMCInst(&TmpInst); - O << '\n'; + OutStreamer.EmitInstruction(TmpInst); return; } } @@ -523,7 +520,6 @@ MCInstLowering.Lower(MI, TmpInst); - printMCInst(&TmpInst); - O << '\n'; + OutStreamer.EmitInstruction(TmpInst); } From sabre at nondot.org Tue Feb 2 19:15:03 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 01:15:03 -0000 Subject: [llvm-commits] [llvm] r95180 - /llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp Message-ID: <201002030115.o131F3xw030083@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 19:15:03 2010 New Revision: 95180 URL: http://llvm.org/viewvc/llvm-project?rev=95180&view=rev Log: emit instructions through the streamer. Modified: llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp Modified: llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp?rev=95180&r1=95179&r2=95180&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp Tue Feb 2 19:15:03 2010 @@ -183,8 +183,7 @@ MCInst TmpInst; MCInstLowering.Lower(MI, TmpInst); - printMCInst(&TmpInst); - O << '\n'; + OutStreamer.EmitInstruction(TmpInst); } static MCInstPrinter *createMSP430MCInstPrinter(const Target &T, From sabre at nondot.org Tue Feb 2 19:16:29 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 01:16:29 -0000 Subject: [llvm-commits] [llvm] r95181 - /llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Message-ID: <201002030116.o131GTQA030144@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 19:16:28 2010 New Revision: 95181 URL: http://llvm.org/viewvc/llvm-project?rev=95181&view=rev Log: print instructions through the mcstreamer. Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=95181&r1=95180&r2=95181&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Tue Feb 2 19:16:28 2010 @@ -83,10 +83,6 @@ return "ARM Assembly Printer"; } - void printMCInst(const MCInst *MI) { - ARMInstPrinter(O, *MAI, VerboseAsm).printInstruction(MI); - } - void printInstructionThroughMCStreamer(const MachineInstr *MI); @@ -1176,7 +1172,7 @@ AddInst.addOperand(MCOperand::CreateReg(MI->getOperand(0).getReg())); AddInst.addOperand(MCOperand::CreateReg(ARM::PC)); AddInst.addOperand(MCOperand::CreateReg(MI->getOperand(1).getReg())); - printMCInst(&AddInst); + OutStreamer.EmitInstruction(AddInst); return; } case ARM::CONSTPOOL_ENTRY: { // FIXME: Remove asm string from td file. @@ -1217,8 +1213,7 @@ TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg())); TmpInst.addOperand(MCOperand::CreateReg(0)); // cc_out - printMCInst(&TmpInst); - O << '\n'; + OutStreamer.EmitInstruction(TmpInst); } { @@ -1232,7 +1227,7 @@ TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg())); TmpInst.addOperand(MCOperand::CreateReg(0)); // cc_out - printMCInst(&TmpInst); + OutStreamer.EmitInstruction(TmpInst); } return; } @@ -1251,8 +1246,7 @@ TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(2).getImm())); TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg())); - printMCInst(&TmpInst); - O << '\n'; + OutStreamer.EmitInstruction(TmpInst); } { @@ -1266,7 +1260,7 @@ TmpInst.addOperand(MCOperand::CreateImm(MI->getOperand(2).getImm())); TmpInst.addOperand(MCOperand::CreateReg(MI->getOperand(3).getReg())); - printMCInst(&TmpInst); + OutStreamer.EmitInstruction(TmpInst); } return; @@ -1275,8 +1269,7 @@ MCInst TmpInst; MCInstLowering.Lower(MI, TmpInst); - - printMCInst(&TmpInst); + OutStreamer.EmitInstruction(TmpInst); } //===----------------------------------------------------------------------===// From dalej at apple.com Tue Feb 2 19:40:33 2010 From: dalej at apple.com (Dale Johannesen) Date: Wed, 03 Feb 2010 01:40:33 -0000 Subject: [llvm-commits] [llvm] r95183 - in /llvm/trunk: lib/CodeGen/RegAllocLocal.cpp test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll test/CodeGen/X86/phys-reg-local-regalloc.ll Message-ID: <201002030140.o131eYuO031147@zion.cs.uiuc.edu> Author: johannes Date: Tue Feb 2 19:40:33 2010 New Revision: 95183 URL: http://llvm.org/viewvc/llvm-project?rev=95183&view=rev Log: Reapply 95050 with a tweak to check the register class. Modified: llvm/trunk/lib/CodeGen/RegAllocLocal.cpp llvm/trunk/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll llvm/trunk/test/CodeGen/X86/phys-reg-local-regalloc.ll Modified: llvm/trunk/lib/CodeGen/RegAllocLocal.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLocal.cpp?rev=95183&r1=95182&r2=95183&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocLocal.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocLocal.cpp Tue Feb 2 19:40:33 2010 @@ -764,8 +764,11 @@ // Determine whether this is a copy instruction. The cases where the // source or destination are phys regs are handled specially. unsigned SrcCopyReg, DstCopyReg, SrcCopySubReg, DstCopySubReg; + unsigned SrcCopyPhysReg = 0U; bool isCopy = TII->isMoveInstr(*MI, SrcCopyReg, DstCopyReg, SrcCopySubReg, DstCopySubReg); + if (isCopy && TargetRegisterInfo::isVirtualRegister(SrcCopyReg)) + SrcCopyPhysReg = getVirt2PhysRegMapSlot(SrcCopyReg); // Loop over the implicit uses, making sure that they are at the head of the // use order list, so they don't get reallocated. @@ -977,13 +980,26 @@ // If DestVirtReg already has a value, use it. if (!(DestPhysReg = getVirt2PhysRegMapSlot(DestVirtReg))) { + // If this is a copy try to reuse the input as the output; + // that will make the copy go away. // If this is a copy, the source reg is a phys reg, and // that reg is available, use that phys reg for DestPhysReg. + // If this is a copy, the source reg is a virtual reg, and + // the phys reg that was assigned to that virtual reg is now + // available, use that phys reg for DestPhysReg. (If it's now + // available that means this was the last use of the source.) if (isCopy && TargetRegisterInfo::isPhysicalRegister(SrcCopyReg) && isPhysRegAvailable(SrcCopyReg)) { DestPhysReg = SrcCopyReg; assignVirtToPhysReg(DestVirtReg, DestPhysReg); + } else if (isCopy && + TargetRegisterInfo::isVirtualRegister(SrcCopyReg) && + SrcCopyPhysReg && isPhysRegAvailable(SrcCopyPhysReg) && + MF->getRegInfo().getRegClass(DestVirtReg)-> + contains(SrcCopyPhysReg)) { + DestPhysReg = SrcCopyPhysReg; + assignVirtToPhysReg(DestVirtReg, DestPhysReg); } else DestPhysReg = getReg(MBB, MI, DestVirtReg); } Modified: llvm/trunk/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll?rev=95183&r1=95182&r2=95183&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll (original) +++ llvm/trunk/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll Tue Feb 2 19:40:33 2010 @@ -1,7 +1,7 @@ ; RUN: llc < %s | grep {subfc r3,r5,r4} ; RUN: llc < %s | grep {subfze r4,r2} -; RUN: llc < %s -regalloc=local | grep {subfc r5,r4,r3} -; RUN: llc < %s -regalloc=local | grep {subfze r2,r2} +; RUN: llc < %s -regalloc=local | grep {subfc r2,r5,r4} +; RUN: llc < %s -regalloc=local | grep {subfze r3,r3} ; The first argument of subfc must not be the same as any other register. ; PR1357 Modified: llvm/trunk/test/CodeGen/X86/phys-reg-local-regalloc.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/phys-reg-local-regalloc.ll?rev=95183&r1=95182&r2=95183&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/phys-reg-local-regalloc.ll (original) +++ llvm/trunk/test/CodeGen/X86/phys-reg-local-regalloc.ll Tue Feb 2 19:40:33 2010 @@ -1,4 +1,6 @@ ; RUN: llc < %s -march=x86 -mtriple=i386-apple-darwin9 -regalloc=local | FileCheck %s +; RUN: llc -O0 < %s -march=x86 -mtriple=i386-apple-darwin9 -regalloc=local | FileCheck %s +; CHECKed instructions should be the same with or without -O0. @.str = private constant [12 x i8] c"x + y = %i\0A\00", align 1 ; <[12 x i8]*> [#uses=1] From sabre at nondot.org Tue Feb 2 19:41:04 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 01:41:04 -0000 Subject: [llvm-commits] [llvm] r95184 - in /llvm/trunk/lib/Target/PIC16/AsmPrinter: PIC16AsmPrinter.cpp PIC16AsmPrinter.h Message-ID: <201002030141.o131f4kN031176@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 19:41:03 2010 New Revision: 95184 URL: http://llvm.org/viewvc/llvm-project?rev=95184&view=rev Log: rename printMachineInstruction -> EmitInstruction Modified: llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h Modified: llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp?rev=95184&r1=95183&r2=95184&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp Tue Feb 2 19:41:03 2010 @@ -43,14 +43,9 @@ PTOF = (PIC16TargetObjectFile *)&PTLI->getObjFileLowering(); } -bool PIC16AsmPrinter::printMachineInstruction(const MachineInstr *MI) { - processDebugLoc(MI, true); +void PIC16AsmPrinter::EmitInstruction(const MachineInstr *MI) { printInstruction(MI); - if (VerboseAsm) - EmitComments(*MI); O << '\n'; - processDebugLoc(MI, false); - return true; } static int getFunctionColor(const Function *F) { @@ -148,7 +143,7 @@ } // Print the assembly for the instruction. - printMachineInstruction(II); + EmitInstruction(II); } } Modified: llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h?rev=95184&r1=95183&r2=95184&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h (original) +++ llvm/trunk/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h Tue Feb 2 19:41:03 2010 @@ -48,7 +48,7 @@ void printInstruction(const MachineInstr *MI); // definition autogenerated. static const char *getRegisterName(unsigned RegNo); - bool printMachineInstruction(const MachineInstr *MI); + void EmitInstruction(const MachineInstr *MI); void EmitFunctionDecls (Module &M); void EmitUndefinedVars (Module &M); void EmitDefinedVars (Module &M); From sabre at nondot.org Tue Feb 2 19:46:06 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 01:46:06 -0000 Subject: [llvm-commits] [llvm] r95186 - in /llvm/trunk: include/llvm/CodeGen/AsmPrinter.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp Message-ID: <201002030146.o131k6so031391@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 19:46:05 2010 New Revision: 95186 URL: http://llvm.org/viewvc/llvm-project?rev=95186&view=rev Log: privatize a bunch of methods and move \n printing into them. Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=95186&r1=95185&r2=95186&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original) +++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Tue Feb 2 19:46:05 2010 @@ -307,7 +307,6 @@ /// printLabel - This method prints a local label used by debug and /// exception handling tables. - void printLabel(const MachineInstr *MI) const; void printLabel(unsigned Id) const; /// printDeclare - This method prints a local variable declaration used by @@ -366,10 +365,17 @@ virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV); + /// printOffset - This is just convenient handler for printing offsets. + void printOffset(int64_t Offset) const; + + private: + /// processDebugLoc - Processes the debug information of each machine /// instruction's DebugLoc. void processDebugLoc(const MachineInstr *MI, bool BeforePrintingInsn); + void printLabelInst(const MachineInstr *MI) const; + /// printInlineAsm - This method formats and prints the specified machine /// instruction that is an inline asm. void printInlineAsm(const MachineInstr *MI) const; @@ -381,10 +387,6 @@ /// printKill - This method prints the specified kill machine instruction. void printKill(const MachineInstr *MI) const; - /// printOffset - This is just convenient handler for printing offsets. - void printOffset(int64_t Offset) const; - - private: /// EmitVisibility - This emits visibility information about symbol, if /// this is suported by the target. void EmitVisibility(MCSymbol *Sym, unsigned Visibility) const; Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=95186&r1=95185&r2=95186&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Feb 2 19:46:05 2010 @@ -350,20 +350,16 @@ case TargetInstrInfo::DBG_LABEL: case TargetInstrInfo::EH_LABEL: case TargetInstrInfo::GC_LABEL: - printLabel(II); - O << '\n'; + printLabelInst(II); break; case TargetInstrInfo::INLINEASM: printInlineAsm(II); - O << '\n'; break; case TargetInstrInfo::IMPLICIT_DEF: printImplicitDef(II); - O << '\n'; break; case TargetInstrInfo::KILL: printKill(II); - O << '\n'; break; default: EmitInstruction(II); @@ -1429,7 +1425,7 @@ } } } - O << "\n\t" << MAI->getCommentString() << MAI->getInlineAsmEnd(); + O << "\n\t" << MAI->getCommentString() << MAI->getInlineAsmEnd() << '\n'; } /// printImplicitDef - This method prints the specified machine instruction @@ -1438,7 +1434,7 @@ if (!VerboseAsm) return; O.PadToColumn(MAI->getCommentColumn()); O << MAI->getCommentString() << " implicit-def: " - << TRI->getName(MI->getOperand(0).getReg()); + << TRI->getName(MI->getOperand(0).getReg()) << '\n'; } void AsmPrinter::printKill(const MachineInstr *MI) const { @@ -1450,12 +1446,14 @@ assert(op.isReg() && "KILL instruction must have only register operands"); O << ' ' << TRI->getName(op.getReg()) << (op.isDef() ? "" : ""); } + O << '\n'; } /// printLabel - This method prints a local label used by debug and /// exception handling tables. -void AsmPrinter::printLabel(const MachineInstr *MI) const { +void AsmPrinter::printLabelInst(const MachineInstr *MI) const { printLabel(MI->getOperand(0).getImm()); + O << '\n'; } void AsmPrinter::printLabel(unsigned Id) const { From sabre at nondot.org Tue Feb 2 19:49:49 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 01:49:49 -0000 Subject: [llvm-commits] [llvm] r95187 - in /llvm/trunk/lib: CodeGen/AsmPrinter/AsmPrinter.cpp Target/X86/AsmPrinter/X86AsmPrinter.cpp Message-ID: <201002030149.o131nnca031535@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 19:49:49 2010 New Revision: 95187 URL: http://llvm.org/viewvc/llvm-project?rev=95187&view=rev Log: don't emit \n's at the start of X86AsmPrinter::runOnMachineFunction, .o files don't like that. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=95187&r1=95186&r2=95187&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Feb 2 19:49:49 2010 @@ -391,6 +391,8 @@ // Print out jump tables referenced by the function. EmitJumpTableInfo(); + + OutStreamer.AddBlankLine(); } Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp?rev=95187&r1=95186&r2=95187&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Tue Feb 2 19:49:49 2010 @@ -55,7 +55,6 @@ /// bool X86AsmPrinter::runOnMachineFunction(MachineFunction &MF) { SetupMachineFunction(MF); - O << "\n\n"; // COFF and Cygwin specific mangling stuff. This should be moved out to the // mangler or handled some other way? From jyasskin at google.com Tue Feb 2 20:09:41 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Tue, 2 Feb 2010 18:09:41 -0800 Subject: [llvm-commits] [llvm] r94535 [1/3] - in /llvm/trunk: configure include/llvm/Config/config.h.in In-Reply-To: <4B67E577.7040007@gmail.com> References: <201001260850.o0Q8opdw005294@zion.cs.uiuc.edu> <4B5EAF5F.6020003@gmail.com> <4B67E577.7040007@gmail.com> Message-ID: On Tue, Feb 2, 2010 at 12:42 AM, T?r?k Edwin wrote: > On 02/02/2010 07:15 AM, Jeffrey Yasskin wrote: >> On Tue, Jan 26, 2010 at 1:01 AM, T?r?k Edwin wrote: >> >>> On 01/26/2010 10:50 AM, Torok Edwin wrote: >>> >>>> Author: edwin >>>> Date: Tue Jan 26 02:50:50 2010 >>>> New Revision: 94535 >>>> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=94535&view=rev >>>> Log: >>>> Regenerate configure. >>>> >>>> With the previous cleanup to configure.ac, configure is now only 393k, instead of 1.1M! >>>> >>>> >>> configure can be regenerated with both autoconf 2.60 and 2.65 now. >>> >> >> Could you update autoconf/AutoRegen.sh to reflect this? >> >> Also, do we want to allow two versions of autoconf, given that it >> produces rather large diffs in configure? >> > > I think it is a matter of what autoconf people have installed: > I don't have, and can't install 2.60 in Debian sid (it only has 2.13, > 2.59, 2.61, 2.64, 2.65). > If we'd make autoconf 2.65 a requirement then people who were > using/regenerating configure with autoconf 2.60 > wouldn't have 2.65 installed. > > Thus I think we should allow both autoconf versions to be used (locally > at least). > > As for what version is used when comitting to the repository, I agree > that it should be the same to reduce diffs, > but I'd rather leave it to someone else to decide which version that > should be. I'm going to reconfigure back to autoconf-2.60 since that seems least likely to break people's existing setups. Edwin, you can install autoconf-2.60 from source even if your package manager doesn't provide it. I've set up a ~/bin/llvm_autotools prefix specifically to deal with AutoRegen.sh's odd version requirements. If we do want to upgrade to autoconf-2.65, I'd have no objections, but whoever reconfigures to it should update AutoRegen.sh and the GettingStarted.html at the same time. From jyasskin at google.com Tue Feb 2 20:11:49 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Wed, 03 Feb 2010 02:11:49 -0000 Subject: [llvm-commits] [llvm] r95191 - in /llvm/trunk: autoconf/configure.ac configure include/llvm/Config/config.h.in Message-ID: <201002030211.o132Boiv032600@zion.cs.uiuc.edu> Author: jyasskin Date: Tue Feb 2 20:11:49 2010 New Revision: 95191 URL: http://llvm.org/viewvc/llvm-project?rev=95191&view=rev Log: Reconfigure with autoconf-2.60, and fix autoconf.ac to work with that version. Modified: llvm/trunk/autoconf/configure.ac llvm/trunk/configure llvm/trunk/include/llvm/Config/config.h.in Modified: llvm/trunk/autoconf/configure.ac URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=95191&r1=95190&r2=95191&view=diff ============================================================================== --- llvm/trunk/autoconf/configure.ac (original) +++ llvm/trunk/autoconf/configure.ac Tue Feb 2 20:11:49 2010 @@ -49,7 +49,6 @@ dnl Place all of the extra autoconf files into the config subdirectory. Tell dnl various tools where the m4 autoconf macros are. AC_CONFIG_AUX_DIR([autoconf]) -AC_CONFIG_MACRO_DIR([m4]) dnl Quit if the source directory has already been configured. dnl NOTE: This relies upon undocumented autoconf behavior. Modified: llvm/trunk/configure URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=95191&r1=95190&r2=95191&view=diff ============================================================================== --- llvm/trunk/configure (original) +++ llvm/trunk/configure Tue Feb 2 20:11:49 2010 @@ -1,87 +1,60 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for llvm 2.7svn. +# Generated by GNU Autoconf 2.60 for llvm 2.7svn. # # Report bugs to . # -# # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# -# +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # # Copyright (c) 2003-2009 University of Illinois at Urbana-Champaign. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false fi @@ -90,18 +63,20 @@ # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) +as_nl=' +' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( +case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done IFS=$as_save_IFS ;; @@ -112,322 +87,352 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` # CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +$as_unset CDPATH + if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST + if (eval ":") 2>/dev/null; then + as_have_required=yes else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac + as_have_required=no fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes +if as_func_success; then + : else - as_have_required=no + exitcode=1 + echo as_func_success failed. fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( + case $as_dir in /*) for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac - as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf at gnu.org and -$0: llvmbugs at cs.uiuc.edu about your system, including any -$0: error possibly output before this message. Then install -$0: a modern shell, or manually run the script under such a -$0: shell if you do have one." - fi - exit 1 -fi + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' +if as_func_ret_success; then + : else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append + exitcode=1 + echo as_func_ret_success failed. +fi -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith + exitcode=1 + echo positional parameters were not saved. +fi +test $exitcode = 0) || { (exit 1); exit 1; } -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : else - as_expr=false + exitcode=1 + echo as_func_success failed. fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : else - as_basename=false + exitcode=1 + echo as_func_ret_success failed. fi -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : else - as_dirname=false + exitcode=1 + echo positional parameters were not saved. fi -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf at gnu.org about your system, + echo including any error possibly output before this + echo message +} -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -444,7 +449,8 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the @@ -454,40 +460,49 @@ exit } -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + mkdir conf$$.dir fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi @@ -495,34 +510,25 @@ rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' + as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' + as_executable_p=: fi -as_executable_p=$as_test_x +rm -f conf$$.file # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -531,8 +537,8 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -test -n "$DJDIR" || exec 7<&0 &1 + +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -550,6 +556,7 @@ subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='llvm' @@ -557,280 +564,240 @@ PACKAGE_VERSION='2.7svn' PACKAGE_STRING='llvm 2.7svn' PACKAGE_BUGREPORT='llvmbugs at cs.uiuc.edu' -PACKAGE_URL='' ac_unique_file="lib/VMCore/Module.cpp" -enable_option_checking=no # Factoring default headers for most tests. ac_includes_default="\ #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include # include #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include #endif -#ifdef HAVE_STDINT_H +#if HAVE_STDINT_H # include #endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif" -ac_header_list= -ac_subst_vars='LTLIBOBJS -LIBOBJS -RDYNAMIC -RPATH -ENABLE_VISIBILITY_INLINES_HIDDEN -OCAML_LIBDIR -ALL_BINDINGS -BINDINGS_TO_BUILD -LLVM_CONFIGTIME -LLVM_MANDIR -LLVM_INFODIR -LLVM_INCLUDEDIR -LLVM_ETCDIR -LLVM_DOCSDIR -LLVM_DATADIR -LLVM_LIBDIR -LLVM_BINDIR -LLVM_PREFIX -SHLIBEXT -LLVMGCC_LANGS -LLVMGCC_MAJVERS -LLVMGCC_VERSION -LLVMGCCLIBEXEC -LLVMGCCDIR -LLVMCC1PLUS -LLVMCC1 -MMAP_FILE -HUGE_VAL_SANITY -HAVE_PTHREAD -USE_OPROFILE -USE_UDIS86 -NO_MISSING_FIELD_INITIALIZERS -NO_VARIADIC_MACROS -LLVMGXX -LLVMGCC -LLVMGXXCOMMAND -LLVMGCCCOMMAND -LIBADD_DL -CONVENIENCE_LTDL_FALSE -CONVENIENCE_LTDL_TRUE -INSTALL_LTDL_FALSE -INSTALL_LTDL_TRUE -GAS -OCAMLDOC -OCAMLDEP -OCAMLOPT -OCAMLC -ZIP -TCLSH -RUNTEST -POD2MAN -POD2HTML -GZIP -GROFF -DOXYGEN -BZIP2 -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -HAVE_PERL -PERL -DOTTY -GV -CIRCO -TWOPI -NEATO -FDP -DOT -GRAPHVIZ -BINPWD -TAR -SED -RM -AR -RANLIB -MV -MKDIR -FIND -DATE -CP -CMP -LN_S -ifGNUmake -NM -ac_ct_CXX -CXXFLAGS -CXX -ENABLE_LLVMC_DYNAMIC_PLUGINS -ENABLE_LLVMC_DYNAMIC -BINUTILS_INCDIR -EXTRA_OPTIONS -OPTIMIZE_OPTION -ENABLE_CBE_PRINTF_A -LLVM_ENUM_DISASSEMBLERS -LLVM_ENUM_ASM_PARSERS -LLVM_ENUM_ASM_PRINTERS -LLVM_ENUM_TARGETS -TARGETS_TO_BUILD -ENABLE_PIC -ENABLE_THREADS -ENABLE_DOXYGEN -TARGET_HAS_JIT -JIT -DEBUG_SYMBOLS -DEBUG_RUNTIME -EXPENSIVE_CHECKS -ENABLE_EXPENSIVE_CHECKS -DISABLE_ASSERTIONS -ENABLE_PROFILING -ENABLE_OPTIMIZED -CVSBUILD -BUILD_CXX -BUILD_EXEEXT -BUILD_CC -LLVM_CROSS_COMPILING -EGREP -GREP -CPP -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -ENDIAN -ARCH -LLVM_ON_WIN32 -LLVM_ON_UNIX -NOLINKALL -LINKALL -TARGET_OS -HOST_OS -OS -target_os -target_vendor -target_cpu -target -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -subdirs -LLVM_COPYRIGHT -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME +ac_subst_vars='SHELL PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_optimized -enable_profiling -enable_assertions -enable_expensive_checks -enable_debug_runtime -enable_debug_symbols -enable_jit -enable_doxygen -enable_threads -enable_pic -enable_targets -enable_cbe_printf_a -with_llvmgccdir -with_llvmgcc -with_llvmgxx -with_optimize_option -with_extra_options -enable_bindings -with_ocaml_libdir -with_c_include_dirs -with_cxx_include_root -with_cxx_include_arch -with_cxx_include_32bit_dir -with_cxx_include_64bit_dir -with_binutils_include -enable_libffi -enable_llvmc_dynamic -enable_llvmc_dynamic_plugins -with_tclinclude -enable_ltdl_install -with_udis86 -with_oprofile -' - ac_precious_vars='build_alias +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias host_alias target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS +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 +HOST_OS +TARGET_OS +LINKALL +NOLINKALL +LLVM_ON_UNIX +LLVM_ON_WIN32 +ARCH +ENDIAN +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CPP +GREP +EGREP +LLVM_CROSS_COMPILING +BUILD_CC +BUILD_EXEEXT +BUILD_CXX +CVSBUILD +ENABLE_OPTIMIZED +ENABLE_PROFILING +DISABLE_ASSERTIONS +ENABLE_EXPENSIVE_CHECKS +EXPENSIVE_CHECKS +DEBUG_RUNTIME +DEBUG_SYMBOLS +JIT +TARGET_HAS_JIT +ENABLE_DOXYGEN +ENABLE_THREADS +ENABLE_PIC +TARGETS_TO_BUILD +LLVM_ENUM_TARGETS +LLVM_ENUM_ASM_PRINTERS +LLVM_ENUM_ASM_PARSERS +LLVM_ENUM_DISASSEMBLERS +ENABLE_CBE_PRINTF_A +OPTIMIZE_OPTION +EXTRA_OPTIONS +BINUTILS_INCDIR +ENABLE_LLVMC_DYNAMIC +ENABLE_LLVMC_DYNAMIC_PLUGINS +CXX +CXXFLAGS +ac_ct_CXX +NM +ifGNUmake +LN_S +CMP +CP +DATE +FIND +MKDIR +MV +RANLIB +AR +RM +SED +TAR +BINPWD +GRAPHVIZ +DOT +FDP +NEATO +TWOPI +CIRCO +GV +DOTTY +PERL +HAVE_PERL +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +BZIP2 +DOXYGEN +GROFF +GZIP +POD2HTML +POD2MAN +RUNTEST +TCLSH +ZIP +OCAMLC +OCAMLOPT +OCAMLDEP +OCAMLDOC +GAS +INSTALL_LTDL_TRUE +INSTALL_LTDL_FALSE +CONVENIENCE_LTDL_TRUE +CONVENIENCE_LTDL_FALSE +LIBADD_DL +LLVMGCCCOMMAND +LLVMGXXCOMMAND +LLVMGCC +LLVMGXX +NO_VARIADIC_MACROS +NO_MISSING_FIELD_INITIALIZERS +USE_UDIS86 +USE_OPROFILE +HAVE_PTHREAD +HUGE_VAL_SANITY +MMAP_FILE +LLVMCC1 +LLVMCC1PLUS +LLVMGCCDIR +LLVMGCCLIBEXEC +LLVMGCC_VERSION +LLVMGCC_MAJVERS +LLVMGCC_LANGS +SHLIBEXT +LLVM_PREFIX +LLVM_BINDIR +LLVM_LIBDIR +LLVM_DATADIR +LLVM_DOCSDIR +LLVM_ETCDIR +LLVM_INCLUDEDIR +LLVM_INFODIR +LLVM_MANDIR +LLVM_CONFIGTIME +BINDINGS_TO_BUILD +ALL_BINDINGS +OCAML_LIBDIR +ENABLE_VISIBILITY_INLINES_HIDDEN +RPATH +RDYNAMIC +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +CPPFLAGS +CPP +CXX +CXXFLAGS CCC' ac_subdirs_all='projects/sample projects/privbracket @@ -848,8 +815,6 @@ # Initialize some variables set by options. ac_init_help= ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -948,20 +913,13 @@ datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -974,20 +932,13 @@ dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1178,36 +1129,22 @@ ac_init_version=: ;; -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -1227,25 +1164,25 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; - esac + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1254,36 +1191,23 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -# Check all directory arguments for consistency. +# Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1297,7 +1221,7 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1313,21 +1237,23 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1354,11 +1280,13 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1406,9 +1334,9 @@ Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1418,25 +1346,25 @@ For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/-llvm-] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/-llvm-] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1455,7 +1383,6 @@ cat <<\_ACEOF Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-optimized Compile with optimizations enabled (default is NO) @@ -1524,8 +1451,7 @@ CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command @@ -1542,17 +1468,15 @@ if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue + test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1588,7 +1512,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1598,9 +1522,10 @@ if $ac_init_version; then cat <<\_ACEOF llvm configure 2.7svn -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.60 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -1608,551 +1533,59 @@ _ACEOF exit fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by llvm $as_me 2.7svn, which was +generated by GNU Autoconf 2.60. Invocation command line was -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () + $ $0 $@ + +_ACEOF +exec 5>>config.log { - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` -} # ac_fn_c_try_compile +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval +_ASUNAME -} # ac_fn_c_try_run +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done +IFS=$as_save_IFS -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +} >&5 - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval +cat >&5 <<_ACEOF -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ----------------------------------- ## -## Report this to llvmbugs at cs.uiuc.edu ## -## ----------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_type - -# ac_fn_cxx_try_run LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_cxx_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_run -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by llvm $as_me 2.7svn, which was -generated by GNU Autoconf 2.65. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## + +## ----------- ## +## Core tests. ## +## ----------- ## _ACEOF @@ -2176,12 +1609,12 @@ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) - as_fn_append ac_configure_args1 " '$ac_arg'" + ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -2197,13 +1630,13 @@ -* ) ac_must_keep_next=true ;; esac fi - as_fn_append ac_configure_args " '$ac_arg'" + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -2228,13 +1661,12 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; + *) $as_unset $ac_var ;; esac ;; esac done @@ -2263,9 +1695,9 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -2280,9 +1712,9 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -2298,94 +1730,86 @@ echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h - # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE +# Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + set x "$prefix/share/config.site" "$prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" +shift +for ac_site_file do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -as_fn_append ac_header_list " stdlib.h" -as_fn_append ac_header_list " unistd.h" -as_fn_append ac_header_list " sys/param.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2396,56 +1820,68 @@ eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2465,16 +1901,24 @@ ac_aux_dir= for ac_dir in autoconf "$srcdir"/autoconf; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in autoconf \"$srcdir\"/autoconf" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in autoconf \"$srcdir\"/autoconf" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in autoconf \"$srcdir\"/autoconf" >&2;} + { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, @@ -2487,10 +1931,11 @@ - if test ${srcdir} != "." ; then if test -f ${srcdir}/include/llvm/Config/config.h ; then - as_fn_error "Already configured in ${srcdir}" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: Already configured in ${srcdir}" >&5 +echo "$as_me: error: Already configured in ${srcdir}" >&2;} + { (exit 1); exit 1; }; } fi fi @@ -2499,9 +1944,7 @@ if test -d ${srcdir}/projects/${i} ; then case ${i} in CVS) ;; - sample) - -subdirs="$subdirs projects/sample" + sample) subdirs="$subdirs projects/sample" ;; privbracket) subdirs="$subdirs projects/privbracket" ;; @@ -2528,8 +1971,8 @@ llvm-kernel) subdirs="$subdirs projects/llvm-kernel" ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown project (${i}) won't be configured automatically" >&5 -$as_echo "$as_me: WARNING: Unknown project (${i}) won't be configured automatically" >&2;} + { echo "$as_me:$LINENO: WARNING: Unknown project (${i}) won't be configured automatically" >&5 +echo "$as_me: WARNING: Unknown project (${i}) won't be configured automatically" >&2;} ;; esac fi @@ -2538,27 +1981,35 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2574,24 +2025,28 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2607,24 +2062,28 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 -$as_echo_n "checking target system type... " >&6; } -if test "${ac_cv_target+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6; } +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} + { (exit 1); exit 1; }; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; -*) as_fn_error "invalid value of canonical target" "$LINENO" 5;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' @@ -2647,10 +2106,10 @@ NONENONEs,x,x, && program_prefix=${target_alias}- -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of operating system we're going to host on" >&5 -$as_echo_n "checking type of operating system we're going to host on... " >&6; } -if test "${llvm_cv_os_type+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking type of operating system we're going to host on" >&5 +echo $ECHO_N "checking type of operating system we're going to host on... $ECHO_C" >&6; } +if test "${llvm_cv_os_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $host in *-*-aix*) @@ -2750,13 +2209,13 @@ llvm_cv_platform_type="Unknown" ;; esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $llvm_cv_os_type" >&5 -$as_echo "$llvm_cv_os_type" >&6; } +{ echo "$as_me:$LINENO: result: $llvm_cv_os_type" >&5 +echo "${ECHO_T}$llvm_cv_os_type" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of operating system we're going to target" >&5 -$as_echo_n "checking type of operating system we're going to target... " >&6; } -if test "${llvm_cv_target_os_type+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking type of operating system we're going to target" >&5 +echo $ECHO_N "checking type of operating system we're going to target... $ECHO_C" >&6; } +if test "${llvm_cv_target_os_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $target in *-*-aix*) @@ -2797,11 +2256,13 @@ llvm_cv_target_os_type="Unknown" ;; esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $llvm_cv_target_os_type" >&5 -$as_echo "$llvm_cv_target_os_type" >&6; } +{ echo "$as_me:$LINENO: result: $llvm_cv_target_os_type" >&5 +echo "${ECHO_T}$llvm_cv_target_os_type" >&6; } if test "$llvm_cv_os_type" = "Unknown" ; then - as_fn_error "Operating system is unknown, configure can't continue" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: Operating system is unknown, configure can't continue" >&5 +echo "$as_me: error: Operating system is unknown, configure can't continue" >&2;} + { (exit 1); exit 1; }; } fi OS=$llvm_cv_os_type @@ -2819,7 +2280,9 @@ case $llvm_cv_platform_type in Unix) -$as_echo "#define LLVM_ON_UNIX 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define LLVM_ON_UNIX 1 +_ACEOF LLVM_ON_UNIX=1 @@ -2828,7 +2291,9 @@ ;; Win32) -$as_echo "#define LLVM_ON_WIN32 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define LLVM_ON_WIN32 1 +_ACEOF LLVM_ON_UNIX=0 @@ -2837,10 +2302,10 @@ ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target architecture" >&5 -$as_echo_n "checking target architecture... " >&6; } -if test "${llvm_cv_target_arch+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking target architecture" >&5 +echo $ECHO_N "checking target architecture... $ECHO_C" >&6; } +if test "${llvm_cv_target_arch+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $target in i?86-*) llvm_cv_target_arch="x86" ;; @@ -2858,12 +2323,12 @@ *) llvm_cv_target_arch="Unknown" ;; esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $llvm_cv_target_arch" >&5 -$as_echo "$llvm_cv_target_arch" >&6; } +{ echo "$as_me:$LINENO: result: $llvm_cv_target_arch" >&5 +echo "${ECHO_T}$llvm_cv_target_arch" >&6; } if test "$llvm_cv_target_arch" = "Unknown" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Configuring LLVM for an unknown target archicture" >&5 -$as_echo "$as_me: WARNING: Configuring LLVM for an unknown target archicture" >&2;} + { echo "$as_me:$LINENO: WARNING: Configuring LLVM for an unknown target archicture" >&5 +echo "$as_me: WARNING: Configuring LLVM for an unknown target archicture" >&2;} fi # Determine the LLVM native architecture for the target @@ -2884,10 +2349,10 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2897,25 +2362,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -2924,10 +2389,10 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2937,25 +2402,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2963,8 +2428,12 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2977,10 +2446,10 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2990,25 +2459,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -3017,10 +2486,10 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3031,18 +2500,18 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -3061,11 +2530,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -3076,10 +2545,10 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3089,25 +2558,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -3120,10 +2589,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -3133,25 +2602,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -3163,8 +2632,12 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3174,37 +2647,51 @@ fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3216,55 +2703,59 @@ } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles -if { { ac_try="$ac_link_default" +if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. -for ac_file in $ac_files '' +for ac_file in $ac_files do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3281,44 +2772,76 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else - ac_file='' + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } + ac_exeext=$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3326,90 +2849,37 @@ for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3421,46 +2891,51 @@ } _ACEOF rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi + rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3474,34 +2949,71 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else - ac_compiler_gnu=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3512,11 +3024,51 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3527,12 +3079,52 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else - ac_c_werror_flag=$ac_save_c_werror_flag + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3543,18 +3135,59 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -3570,14 +3203,18 @@ CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -3634,9 +3271,48 @@ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -3647,19 +3323,17 @@ # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -if test "x$ac_cv_prog_cc_c89" != xno; then : -fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3673,15 +3347,15 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -3695,7 +3369,11 @@ # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3704,34 +3382,90 @@ #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok; then break fi @@ -3743,8 +3477,8 @@ else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3754,7 +3488,11 @@ # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3763,40 +3501,97 @@ #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - +if $ac_preproc_ok; then + : else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c @@ -3806,40 +3601,45 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -z "$GREP"; then ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" + echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val + ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" @@ -3851,61 +3651,77 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_GREP_found && break 3 - done - done + + $ac_path_GREP_found && break 3 done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + else ac_cv_path_GREP=$GREP fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else - if test -z "$EGREP"; then + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" + echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val + ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" @@ -3917,31 +3733,46 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - $ac_path_EGREP_found && break 3 - done - done + + $ac_path_EGREP_found && break 3 done +done + +done IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + else ac_cv_path_EGREP=$EGREP fi + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -3956,23 +3787,64 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else - ac_cv_header_stdc=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - + $EGREP "memchr" >/dev/null 2>&1; then + : else ac_cv_header_stdc=no fi @@ -3982,14 +3854,18 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - + $EGREP "free" >/dev/null 2>&1; then + : else ac_cv_header_stdc=no fi @@ -3999,10 +3875,14 @@ if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -4029,36 +3909,130 @@ return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else - ac_cv_header_stdc=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -4066,240 +4040,299 @@ done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include - #include +#include int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include - #include +#include int main () { #if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif + not big endian +#endif ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ; - return 0; -} + # It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () { -#ifndef _BIG_ENDIAN - not big endian - #endif - + _ascii (); _ebcdic (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes -else - ac_cv_c_bigendian=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -short int ascii_mm[] = - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] = - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + -int -main () -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_bigendian=no else - ac_cv_c_bigendian=yes + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - ENDIAN=big -;; #( - no) - ENDIAN=little - ;; #( - universal) -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h +fi - ;; #( - *) - as_fn_error "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +case $ac_cv_c_bigendian in + yes) + ENDIAN=big + ;; + no) + ENDIAN=little + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac if test "$cross_compiling" = yes; then LLVM_CROSS_COMPILING=1 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for executable suffix on build platform" >&5 -$as_echo_n "checking for executable suffix on build platform... " >&6; } -if test "${ac_cv_build_exeext+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for executable suffix on build platform" >&5 +echo $ECHO_N "checking for executable suffix on build platform... $ECHO_C" >&6; } +if test "${ac_cv_build_exeext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$CYGWIN" = yes || test "$MINGW32" = yes; then ac_cv_build_exeext=.exe @@ -4308,10 +4341,10 @@ # Extract the first word of "${ac_build_prefix}gcc", so it can be a program name with args. set dummy ${ac_build_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_BUILD_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_BUILD_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$BUILD_CC"; then ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test. @@ -4321,35 +4354,35 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_BUILD_CC="${ac_build_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi BUILD_CC=$ac_cv_prog_BUILD_CC if test -n "$BUILD_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5 -$as_echo "$BUILD_CC" >&6; } + { echo "$as_me:$LINENO: result: $BUILD_CC" >&5 +echo "${ECHO_T}$BUILD_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test -z "$BUILD_CC"; then # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_BUILD_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_BUILD_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$BUILD_CC"; then ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test. @@ -4359,35 +4392,35 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_BUILD_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi BUILD_CC=$ac_cv_prog_BUILD_CC if test -n "$BUILD_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5 -$as_echo "$BUILD_CC" >&6; } + { echo "$as_me:$LINENO: result: $BUILD_CC" >&5 +echo "${ECHO_T}$BUILD_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test -z "$BUILD_CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_BUILD_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_BUILD_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$BUILD_CC"; then ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test. @@ -4398,18 +4431,18 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_BUILD_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -4428,26 +4461,28 @@ fi BUILD_CC=$ac_cv_prog_BUILD_CC if test -n "$BUILD_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5 -$as_echo "$BUILD_CC" >&6; } + { echo "$as_me:$LINENO: result: $BUILD_CC" >&5 +echo "${ECHO_T}$BUILD_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi fi fi - test -z "$BUILD_CC" && as_fn_error "no acceptable cc found in \$PATH" "$LINENO" 5 + test -z "$BUILD_CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5 +echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + { (exit 1); exit 1; }; } ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_build_exeext= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_build_link\""; } >&5 + if { (eval echo "$as_me:$LINENO: \"$ac_build_link\"") >&5 (eval $ac_build_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.dSYM) ;; @@ -4455,7 +4490,9 @@ esac done else - as_fn_error "installation or configuration problem: compiler cannot create executables." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: installation or configuration problem: compiler cannot create executables." >&5 +echo "$as_me: error: installation or configuration problem: compiler cannot create executables." >&2;} + { (exit 1); exit 1; }; } fi rm -f conftest* test x"${ac_cv_build_exeext}" = x && ac_cv_build_exeext=blank @@ -4464,17 +4501,17 @@ BUILD_EXEEXT="" test x"${ac_cv_build_exeext}" != xblank && BUILD_EXEEXT=${ac_cv_build_exeext} -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_build_exeext}" >&5 -$as_echo "${ac_cv_build_exeext}" >&6; } +{ echo "$as_me:$LINENO: result: ${ac_cv_build_exeext}" >&5 +echo "${ECHO_T}${ac_cv_build_exeext}" >&6; } ac_build_exeext=$BUILD_EXEEXT ac_build_prefix=${build_alias}- # Extract the first word of "${ac_build_prefix}g++", so it can be a program name with args. set dummy ${ac_build_prefix}g++; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_BUILD_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_BUILD_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$BUILD_CXX"; then ac_cv_prog_BUILD_CXX="$BUILD_CXX" # Let the user override the test. @@ -4484,35 +4521,35 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_BUILD_CXX="${ac_build_prefix}g++" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi BUILD_CXX=$ac_cv_prog_BUILD_CXX if test -n "$BUILD_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5 -$as_echo "$BUILD_CXX" >&6; } + { echo "$as_me:$LINENO: result: $BUILD_CXX" >&5 +echo "${ECHO_T}$BUILD_CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test -z "$BUILD_CXX"; then # Extract the first word of "g++", so it can be a program name with args. set dummy g++; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_BUILD_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_BUILD_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$BUILD_CXX"; then ac_cv_prog_BUILD_CXX="$BUILD_CXX" # Let the user override the test. @@ -4522,35 +4559,35 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_BUILD_CXX="g++" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi BUILD_CXX=$ac_cv_prog_BUILD_CXX if test -n "$BUILD_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5 -$as_echo "$BUILD_CXX" >&6; } + { echo "$as_me:$LINENO: result: $BUILD_CXX" >&5 +echo "${ECHO_T}$BUILD_CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test -z "$BUILD_CXX"; then # Extract the first word of "c++", so it can be a program name with args. set dummy c++; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_BUILD_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_BUILD_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$BUILD_CXX"; then ac_cv_prog_BUILD_CXX="$BUILD_CXX" # Let the user override the test. @@ -4561,18 +4598,18 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/c++"; then ac_prog_rejected=yes continue fi ac_cv_prog_BUILD_CXX="c++" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -4591,11 +4628,11 @@ fi BUILD_CXX=$ac_cv_prog_BUILD_CXX if test -n "$BUILD_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5 -$as_echo "$BUILD_CXX" >&6; } + { echo "$as_me:$LINENO: result: $BUILD_CXX" >&5 +echo "${ECHO_T}$BUILD_CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -4618,7 +4655,7 @@ # Check whether --enable-optimized was given. -if test "${enable_optimized+set}" = set; then : +if test "${enable_optimized+set}" = set; then enableval=$enable_optimized; else enableval=$optimize @@ -4633,7 +4670,7 @@ fi # Check whether --enable-profiling was given. -if test "${enable_profiling+set}" = set; then : +if test "${enable_profiling+set}" = set; then enableval=$enable_profiling; else enableval="no" @@ -4648,7 +4685,7 @@ fi # Check whether --enable-assertions was given. -if test "${enable_assertions+set}" = set; then : +if test "${enable_assertions+set}" = set; then enableval=$enable_assertions; else enableval="yes" @@ -4663,7 +4700,7 @@ fi # Check whether --enable-expensive-checks was given. -if test "${enable_expensive_checks+set}" = set; then : +if test "${enable_expensive_checks+set}" = set; then enableval=$enable_expensive_checks; else enableval="no" @@ -4682,7 +4719,7 @@ fi # Check whether --enable-debug-runtime was given. -if test "${enable_debug_runtime+set}" = set; then : +if test "${enable_debug_runtime+set}" = set; then enableval=$enable_debug_runtime; else enableval=no @@ -4697,7 +4734,7 @@ fi # Check whether --enable-debug-symbols was given. -if test "${enable_debug_symbols+set}" = set; then : +if test "${enable_debug_symbols+set}" = set; then enableval=$enable_debug_symbols; else enableval=no @@ -4712,7 +4749,7 @@ fi # Check whether --enable-jit was given. -if test "${enable_jit+set}" = set; then : +if test "${enable_jit+set}" = set; then enableval=$enable_jit; else enableval=default @@ -4754,7 +4791,7 @@ fi # Check whether --enable-doxygen was given. -if test "${enable_doxygen+set}" = set; then : +if test "${enable_doxygen+set}" = set; then enableval=$enable_doxygen; else enableval=default @@ -4767,11 +4804,13 @@ ;; default) ENABLE_DOXYGEN=0 ;; - *) as_fn_error "Invalid setting for --enable-doxygen. Use \"yes\" or \"no\"" "$LINENO" 5 ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-doxygen. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-doxygen. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; esac # Check whether --enable-threads was given. -if test "${enable_threads+set}" = set; then : +if test "${enable_threads+set}" = set; then enableval=$enable_threads; else enableval=default @@ -4784,7 +4823,9 @@ ;; default) ENABLE_THREADS=1 ;; - *) as_fn_error "Invalid setting for --enable-threads. Use \"yes\" or \"no\"" "$LINENO" 5 ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-threads. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-threads. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; esac cat >>confdefs.h <<_ACEOF @@ -4793,7 +4834,7 @@ # Check whether --enable-pic was given. -if test "${enable_pic+set}" = set; then : +if test "${enable_pic+set}" = set; then enableval=$enable_pic; else enableval=default @@ -4806,7 +4847,9 @@ ;; default) ENABLE_PIC=1 ;; - *) as_fn_error "Invalid setting for --enable-pic. Use \"yes\" or \"no\"" "$LINENO" 5 ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-pic. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-pic. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; esac cat >>confdefs.h <<_ACEOF @@ -4816,7 +4859,7 @@ TARGETS_TO_BUILD="" # Check whether --enable-targets was given. -if test "${enable_targets+set}" = set; then : +if test "${enable_targets+set}" = set; then enableval=$enable_targets; else enableval=all @@ -4859,9 +4902,13 @@ MSP430) TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;; s390x) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; Blackfin) TARGETS_TO_BUILD="Blackfin $TARGETS_TO_BUILD" ;; - *) as_fn_error "Can not set target to build" "$LINENO" 5 ;; + *) { { echo "$as_me:$LINENO: error: Can not set target to build" >&5 +echo "$as_me: error: Can not set target to build" >&2;} + { (exit 1); exit 1; }; } ;; esac ;; - *) as_fn_error "Unrecognized target $a_target" "$LINENO" 5 ;; + *) { { echo "$as_me:$LINENO: error: Unrecognized target $a_target" >&5 +echo "$as_me: error: Unrecognized target $a_target" >&2;} + { (exit 1); exit 1; }; } ;; esac done ;; @@ -4906,7 +4953,7 @@ # Check whether --enable-cbe-printf-a was given. -if test "${enable_cbe_printf_a+set}" = set; then : +if test "${enable_cbe_printf_a+set}" = set; then enableval=$enable_cbe_printf_a; else enableval=default @@ -4919,7 +4966,9 @@ ;; default) ENABLE_CBE_PRINTF_A=1 ;; - *) as_fn_error "Invalid setting for --enable-cbe-printf-a. Use \"yes\" or \"no\"" "$LINENO" 5 ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-cbe-printf-a. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-cbe-printf-a. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; esac cat >>confdefs.h <<_ACEOF @@ -4929,7 +4978,7 @@ # Check whether --with-llvmgccdir was given. -if test "${with_llvmgccdir+set}" = set; then : +if test "${with_llvmgccdir+set}" = set; then withval=$with_llvmgccdir; else withval=default @@ -4938,12 +4987,14 @@ case "$withval" in default) WITH_LLVMGCCDIR=default ;; /* | [A-Za-z]:[\\/]*) WITH_LLVMGCCDIR=$withval ;; - *) as_fn_error "Invalid path for --with-llvmgccdir. Provide full path" "$LINENO" 5 ;; + *) { { echo "$as_me:$LINENO: error: Invalid path for --with-llvmgccdir. Provide full path" >&5 +echo "$as_me: error: Invalid path for --with-llvmgccdir. Provide full path" >&2;} + { (exit 1); exit 1; }; } ;; esac # Check whether --with-llvmgcc was given. -if test "${with_llvmgcc+set}" = set; then : +if test "${with_llvmgcc+set}" = set; then withval=$with_llvmgcc; LLVMGCC=$with_llvmgcc WITH_LLVMGCCDIR="" fi @@ -4951,7 +5002,7 @@ # Check whether --with-llvmgxx was given. -if test "${with_llvmgxx+set}" = set; then : +if test "${with_llvmgxx+set}" = set; then withval=$with_llvmgxx; LLVMGXX=$with_llvmgxx WITH_LLVMGCCDIR="" fi @@ -4966,23 +5017,27 @@ fi if test -n "$LLVMGCC" && test -z "$LLVMGXX"; then - as_fn_error "Invalid llvm-g++. Use --with-llvmgxx when --with-llvmgcc is used" "$LINENO" 5; + { { echo "$as_me:$LINENO: error: Invalid llvm-g++. Use --with-llvmgxx when --with-llvmgcc is used" >&5 +echo "$as_me: error: Invalid llvm-g++. Use --with-llvmgxx when --with-llvmgcc is used" >&2;} + { (exit 1); exit 1; }; }; fi if test -n "$LLVMGXX" && test -z "$LLVMGCC"; then - as_fn_error "Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is used" "$LINENO" 5; + { { echo "$as_me:$LINENO: error: Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is used" >&5 +echo "$as_me: error: Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is used" >&2;} + { (exit 1); exit 1; }; }; fi # Check whether --with-optimize-option was given. -if test "${with_optimize_option+set}" = set; then : +if test "${with_optimize_option+set}" = set; then withval=$with_optimize_option; else withval=default fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking optimization flags" >&5 -$as_echo_n "checking optimization flags... " >&6; } +{ echo "$as_me:$LINENO: checking optimization flags" >&5 +echo $ECHO_N "checking optimization flags... $ECHO_C" >&6; } case "$withval" in default) case "$llvm_cv_os_type" in @@ -4993,12 +5048,12 @@ esac OPTIMIZE_OPTION=$optimize_option -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $optimize_option" >&5 -$as_echo "$optimize_option" >&6; } +{ echo "$as_me:$LINENO: result: $optimize_option" >&5 +echo "${ECHO_T}$optimize_option" >&6; } # Check whether --with-extra-options was given. -if test "${with_extra_options+set}" = set; then : +if test "${with_extra_options+set}" = set; then withval=$with_extra_options; else withval=default @@ -5012,7 +5067,7 @@ # Check whether --enable-bindings was given. -if test "${enable_bindings+set}" = set; then : +if test "${enable_bindings+set}" = set; then enableval=$enable_bindings; else enableval=default @@ -5026,7 +5081,9 @@ *)for a_binding in `echo $enableval|sed -e 's/,/ /g' ` ; do case "$a_binding" in ocaml) BINDINGS_TO_BUILD="ocaml $BINDINGS_TO_BUILD" ;; - *) as_fn_error "Unrecognized binding $a_binding" "$LINENO" 5 ;; + *) { { echo "$as_me:$LINENO: error: Unrecognized binding $a_binding" >&5 +echo "$as_me: error: Unrecognized binding $a_binding" >&2;} + { (exit 1); exit 1; }; } ;; esac done ;; @@ -5034,7 +5091,7 @@ # Check whether --with-ocaml-libdir was given. -if test "${with_ocaml_libdir+set}" = set; then : +if test "${with_ocaml_libdir+set}" = set; then withval=$with_ocaml_libdir; else withval=auto @@ -5043,12 +5100,14 @@ case "$withval" in auto) with_ocaml_libdir="$withval" ;; /* | [A-Za-z]:[\\/]*) with_ocaml_libdir="$withval" ;; - *) as_fn_error "Invalid path for --with-ocaml-libdir. Provide full path" "$LINENO" 5 ;; + *) { { echo "$as_me:$LINENO: error: Invalid path for --with-ocaml-libdir. Provide full path" >&5 +echo "$as_me: error: Invalid path for --with-ocaml-libdir. Provide full path" >&2;} + { (exit 1); exit 1; }; } ;; esac # Check whether --with-c-include-dirs was given. -if test "${with_c_include_dirs+set}" = set; then : +if test "${with_c_include_dirs+set}" = set; then withval=$with_c_include_dirs; else withval="" @@ -5062,7 +5121,7 @@ # Check whether --with-cxx-include-root was given. -if test "${with_cxx_include_root+set}" = set; then : +if test "${with_cxx_include_root+set}" = set; then withval=$with_cxx_include_root; else withval="" @@ -5076,7 +5135,7 @@ # Check whether --with-cxx-include-arch was given. -if test "${with_cxx_include_arch+set}" = set; then : +if test "${with_cxx_include_arch+set}" = set; then withval=$with_cxx_include_arch; else withval="" @@ -5090,7 +5149,7 @@ # Check whether --with-cxx-include-32bit-dir was given. -if test "${with_cxx_include_32bit_dir+set}" = set; then : +if test "${with_cxx_include_32bit_dir+set}" = set; then withval=$with_cxx_include_32bit_dir; else withval="" @@ -5104,7 +5163,7 @@ # Check whether --with-cxx-include-64bit-dir was given. -if test "${with_cxx_include_64bit_dir+set}" = set; then : +if test "${with_cxx_include_64bit_dir+set}" = set; then withval=$with_cxx_include_64bit_dir; else withval="" @@ -5118,7 +5177,7 @@ # Check whether --with-binutils-include was given. -if test "${with_binutils_include+set}" = set; then : +if test "${with_binutils_include+set}" = set; then withval=$with_binutils_include; else withval=default @@ -5127,19 +5186,23 @@ case "$withval" in default) WITH_BINUTILS_INCDIR=default ;; /* | [A-Za-z]:[\\/]*) WITH_BINUTILS_INCDIR=$withval ;; - *) as_fn_error "Invalid path for --with-binutils-include. Provide full path" "$LINENO" 5 ;; + *) { { echo "$as_me:$LINENO: error: Invalid path for --with-binutils-include. Provide full path" >&5 +echo "$as_me: error: Invalid path for --with-binutils-include. Provide full path" >&2;} + { (exit 1); exit 1; }; } ;; esac if test "x$WITH_BINUTILS_INCDIR" != xdefault ; then BINUTILS_INCDIR=$WITH_BINUTILS_INCDIR if test ! -f "$WITH_BINUTILS_INCDIR/plugin-api.h"; then echo "$WITH_BINUTILS_INCDIR/plugin-api.h" - as_fn_error "Invalid path to directory containing plugin-api.h." "$LINENO" 5; + { { echo "$as_me:$LINENO: error: Invalid path to directory containing plugin-api.h." >&5 +echo "$as_me: error: Invalid path to directory containing plugin-api.h." >&2;} + { (exit 1); exit 1; }; }; fi fi # Check whether --enable-libffi was given. -if test "${enable_libffi+set}" = set; then : +if test "${enable_libffi+set}" = set; then enableval=$enable_libffi; else enableval=yes @@ -5148,7 +5211,9 @@ case "$enableval" in yes) llvm_cv_enable_libffi="yes" ;; no) llvm_cv_enable_libffi="no" ;; - *) as_fn_error "Invalid setting for --enable-libffi. Use \"yes\" or \"no\"" "$LINENO" 5 ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-libffi. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-libffi. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; esac if test "$llvm_cv_os_type" = "Win32" ; then @@ -5158,7 +5223,7 @@ fi # Check whether --enable-llvmc-dynamic was given. -if test "${enable_llvmc_dynamic+set}" = set; then : +if test "${enable_llvmc_dynamic+set}" = set; then enableval=$enable_llvmc_dynamic; else enableval=$llvmc_dynamic @@ -5173,7 +5238,7 @@ fi # Check whether --enable-llvmc-dynamic-plugins was given. -if test "${enable_llvmc_dynamic_plugins+set}" = set; then : +if test "${enable_llvmc_dynamic_plugins+set}" = set; then enableval=$enable_llvmc_dynamic_plugins; else enableval=yes @@ -5193,15 +5258,15 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -5215,7 +5280,11 @@ # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include @@ -5224,34 +5293,90 @@ #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - # Broken: fails on valid input. -continue + ac_cpp_err=yes fi -rm -f conftest.err conftest.$ac_ext - +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok; then break fi @@ -5263,8 +5388,8 @@ else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -5274,7 +5399,11 @@ # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include @@ -5283,40 +5412,97 @@ #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - +if $ac_preproc_ok; then + : else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c @@ -5335,10 +5521,10 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -5348,25 +5534,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -5379,10 +5565,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -5392,25 +5578,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -5422,8 +5608,12 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -5431,42 +5621,56 @@ fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -5480,34 +5684,71 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else - ac_compiler_gnu=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -5518,11 +5759,51 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -5533,12 +5814,52 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else - ac_c_werror_flag=$ac_save_c_werror_flag + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -5549,18 +5870,59 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -5576,14 +5938,18 @@ CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -5640,9 +6006,48 @@ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -5653,19 +6058,17 @@ # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -if test "x$ac_cv_prog_cc_c89" != xno; then : -fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -5687,10 +6090,10 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. @@ -5700,25 +6103,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -5731,10 +6134,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. @@ -5744,25 +6147,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -5774,8 +6177,12 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX @@ -5785,36 +6192,49 @@ fi fi # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -5828,34 +6248,71 @@ return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else - ac_compiler_gnu=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -5866,11 +6323,51 @@ return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -5881,12 +6378,52 @@ return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -5897,18 +6434,59 @@ return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then @@ -5931,10 +6509,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5 -$as_echo_n "checking for BSD-compatible nm... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. @@ -5980,16 +6558,16 @@ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } +{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 -$as_echo_n "checking for GNU make... " >&6; } -if test "${llvm_cv_gnu_make_command+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for GNU make" >&5 +echo $ECHO_N "checking for GNU make... $ECHO_C" >&6; } +if test "${llvm_cv_gnu_make_command+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else llvm_cv_gnu_make_command='' for a in "$MAKE" make gmake gnumake ; do @@ -6001,34 +6579,34 @@ fi done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $llvm_cv_gnu_make_command" >&5 -$as_echo "$llvm_cv_gnu_make_command" >&6; } +{ echo "$as_me:$LINENO: result: $llvm_cv_gnu_make_command" >&5 +echo "${ECHO_T}$llvm_cv_gnu_make_command" >&6; } if test "x$llvm_cv_gnu_make_command" != "x" ; then ifGNUmake='' ; else ifGNUmake='#' ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5 -$as_echo "\"Not found\"" >&6; }; + { echo "$as_me:$LINENO: result: \"Not found\"" >&5 +echo "${ECHO_T}\"Not found\"" >&6; }; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } fi # Extract the first word of "cmp", so it can be a program name with args. set dummy cmp; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CMP+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_CMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CMP in [\\/]* | ?:[\\/]*) @@ -6040,14 +6618,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_CMP" && ac_cv_path_CMP="cmp" @@ -6056,20 +6634,20 @@ fi CMP=$ac_cv_path_CMP if test -n "$CMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5 -$as_echo "$CMP" >&6; } + { echo "$as_me:$LINENO: result: $CMP" >&5 +echo "${ECHO_T}$CMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CP+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_CP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CP in [\\/]* | ?:[\\/]*) @@ -6081,14 +6659,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_CP" && ac_cv_path_CP="cp" @@ -6097,20 +6675,20 @@ fi CP=$ac_cv_path_CP if test -n "$CP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5 -$as_echo "$CP" >&6; } + { echo "$as_me:$LINENO: result: $CP" >&5 +echo "${ECHO_T}$CP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "date", so it can be a program name with args. set dummy date; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_DATE+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_DATE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DATE in [\\/]* | ?:[\\/]*) @@ -6122,14 +6700,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_DATE" && ac_cv_path_DATE="date" @@ -6138,20 +6716,20 @@ fi DATE=$ac_cv_path_DATE if test -n "$DATE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5 -$as_echo "$DATE" >&6; } + { echo "$as_me:$LINENO: result: $DATE" >&5 +echo "${ECHO_T}$DATE" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "find", so it can be a program name with args. set dummy find; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_FIND+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_FIND+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $FIND in [\\/]* | ?:[\\/]*) @@ -6163,14 +6741,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_FIND" && ac_cv_path_FIND="find" @@ -6179,20 +6757,20 @@ fi FIND=$ac_cv_path_FIND if test -n "$FIND"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5 -$as_echo "$FIND" >&6; } + { echo "$as_me:$LINENO: result: $FIND" >&5 +echo "${ECHO_T}$FIND" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "grep", so it can be a program name with args. set dummy grep; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GREP in [\\/]* | ?:[\\/]*) @@ -6204,14 +6782,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_GREP" && ac_cv_path_GREP="grep" @@ -6220,20 +6798,20 @@ fi GREP=$ac_cv_path_GREP if test -n "$GREP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5 -$as_echo "$GREP" >&6; } + { echo "$as_me:$LINENO: result: $GREP" >&5 +echo "${ECHO_T}$GREP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MKDIR+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_MKDIR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MKDIR in [\\/]* | ?:[\\/]*) @@ -6245,14 +6823,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_MKDIR" && ac_cv_path_MKDIR="mkdir" @@ -6261,20 +6839,20 @@ fi MKDIR=$ac_cv_path_MKDIR if test -n "$MKDIR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5 -$as_echo "$MKDIR" >&6; } + { echo "$as_me:$LINENO: result: $MKDIR" >&5 +echo "${ECHO_T}$MKDIR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MV+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_MV+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MV in [\\/]* | ?:[\\/]*) @@ -6286,14 +6864,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_MV" && ac_cv_path_MV="mv" @@ -6302,21 +6880,21 @@ fi MV=$ac_cv_path_MV if test -n "$MV"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5 -$as_echo "$MV" >&6; } + { echo "$as_me:$LINENO: result: $MV" >&5 +echo "${ECHO_T}$MV" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -6326,25 +6904,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -6353,10 +6931,10 @@ ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. @@ -6366,25 +6944,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -6392,8 +6970,12 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -6405,10 +6987,10 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. @@ -6418,25 +7000,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -6445,10 +7027,10 @@ ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. @@ -6458,25 +7040,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_AR" = x; then @@ -6484,8 +7066,12 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -6496,10 +7082,10 @@ # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_RM+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_RM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $RM in [\\/]* | ?:[\\/]*) @@ -6511,14 +7097,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm" @@ -6527,20 +7113,20 @@ fi RM=$ac_cv_path_RM if test -n "$RM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 -$as_echo "$RM" >&6; } + { echo "$as_me:$LINENO: result: $RM" >&5 +echo "${ECHO_T}$RM" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SED in [\\/]* | ?:[\\/]*) @@ -6552,14 +7138,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_SED" && ac_cv_path_SED="sed" @@ -6568,20 +7154,20 @@ fi SED=$ac_cv_path_SED if test -n "$SED"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 -$as_echo "$SED" >&6; } + { echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "tar", so it can be a program name with args. set dummy tar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_TAR+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_TAR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $TAR in [\\/]* | ?:[\\/]*) @@ -6593,14 +7179,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_TAR" && ac_cv_path_TAR="gtar" @@ -6609,20 +7195,20 @@ fi TAR=$ac_cv_path_TAR if test -n "$TAR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5 -$as_echo "$TAR" >&6; } + { echo "$as_me:$LINENO: result: $TAR" >&5 +echo "${ECHO_T}$TAR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "pwd", so it can be a program name with args. set dummy pwd; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_BINPWD+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_BINPWD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $BINPWD in [\\/]* | ?:[\\/]*) @@ -6634,14 +7220,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_BINPWD="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_BINPWD" && ac_cv_path_BINPWD="pwd" @@ -6650,21 +7236,21 @@ fi BINPWD=$ac_cv_path_BINPWD if test -n "$BINPWD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BINPWD" >&5 -$as_echo "$BINPWD" >&6; } + { echo "$as_me:$LINENO: result: $BINPWD" >&5 +echo "${ECHO_T}$BINPWD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "Graphviz", so it can be a program name with args. set dummy Graphviz; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GRAPHVIZ+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GRAPHVIZ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GRAPHVIZ in [\\/]* | ?:[\\/]*) @@ -6676,14 +7262,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GRAPHVIZ="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_GRAPHVIZ" && ac_cv_path_GRAPHVIZ="echo Graphviz" @@ -6692,17 +7278,19 @@ fi GRAPHVIZ=$ac_cv_path_GRAPHVIZ if test -n "$GRAPHVIZ"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GRAPHVIZ" >&5 -$as_echo "$GRAPHVIZ" >&6; } + { echo "$as_me:$LINENO: result: $GRAPHVIZ" >&5 +echo "${ECHO_T}$GRAPHVIZ" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "$GRAPHVIZ" != "echo Graphviz" ; then -$as_echo "#define HAVE_GRAPHVIZ 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_GRAPHVIZ 1 +_ACEOF if test "$llvm_cv_os_type" = "MingW" ; then GRAPHVIZ=`echo $GRAPHVIZ | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` @@ -6715,10 +7303,10 @@ fi # Extract the first word of "dot", so it can be a program name with args. set dummy dot; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_DOT+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_DOT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DOT in [\\/]* | ?:[\\/]*) @@ -6730,14 +7318,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_DOT" && ac_cv_path_DOT="echo dot" @@ -6746,17 +7334,19 @@ fi DOT=$ac_cv_path_DOT if test -n "$DOT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5 -$as_echo "$DOT" >&6; } + { echo "$as_me:$LINENO: result: $DOT" >&5 +echo "${ECHO_T}$DOT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "$DOT" != "echo dot" ; then -$as_echo "#define HAVE_DOT 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_DOT 1 +_ACEOF if test "$llvm_cv_os_type" = "MingW" ; then DOT=`echo $DOT | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` @@ -6769,10 +7359,10 @@ fi # Extract the first word of "fdp", so it can be a program name with args. set dummy fdp; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_FDP+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_FDP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $FDP in [\\/]* | ?:[\\/]*) @@ -6784,14 +7374,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_FDP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_FDP" && ac_cv_path_FDP="echo fdp" @@ -6800,17 +7390,19 @@ fi FDP=$ac_cv_path_FDP if test -n "$FDP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FDP" >&5 -$as_echo "$FDP" >&6; } + { echo "$as_me:$LINENO: result: $FDP" >&5 +echo "${ECHO_T}$FDP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "$FDP" != "echo fdp" ; then -$as_echo "#define HAVE_FDP 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_FDP 1 +_ACEOF if test "$llvm_cv_os_type" = "MingW" ; then FDP=`echo $FDP | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` @@ -6823,10 +7415,10 @@ fi # Extract the first word of "neato", so it can be a program name with args. set dummy neato; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_NEATO+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_NEATO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $NEATO in [\\/]* | ?:[\\/]*) @@ -6838,14 +7430,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_NEATO="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_NEATO" && ac_cv_path_NEATO="echo neato" @@ -6854,17 +7446,19 @@ fi NEATO=$ac_cv_path_NEATO if test -n "$NEATO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEATO" >&5 -$as_echo "$NEATO" >&6; } + { echo "$as_me:$LINENO: result: $NEATO" >&5 +echo "${ECHO_T}$NEATO" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "$NEATO" != "echo neato" ; then -$as_echo "#define HAVE_NEATO 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_NEATO 1 +_ACEOF if test "$llvm_cv_os_type" = "MingW" ; then NEATO=`echo $NEATO | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` @@ -6877,10 +7471,10 @@ fi # Extract the first word of "twopi", so it can be a program name with args. set dummy twopi; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_TWOPI+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_TWOPI+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $TWOPI in [\\/]* | ?:[\\/]*) @@ -6892,14 +7486,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_TWOPI="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_TWOPI" && ac_cv_path_TWOPI="echo twopi" @@ -6908,17 +7502,19 @@ fi TWOPI=$ac_cv_path_TWOPI if test -n "$TWOPI"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TWOPI" >&5 -$as_echo "$TWOPI" >&6; } + { echo "$as_me:$LINENO: result: $TWOPI" >&5 +echo "${ECHO_T}$TWOPI" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "$TWOPI" != "echo twopi" ; then -$as_echo "#define HAVE_TWOPI 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_TWOPI 1 +_ACEOF if test "$llvm_cv_os_type" = "MingW" ; then TWOPI=`echo $TWOPI | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` @@ -6931,10 +7527,10 @@ fi # Extract the first word of "circo", so it can be a program name with args. set dummy circo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CIRCO+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_CIRCO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CIRCO in [\\/]* | ?:[\\/]*) @@ -6946,14 +7542,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CIRCO="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_CIRCO" && ac_cv_path_CIRCO="echo circo" @@ -6962,17 +7558,19 @@ fi CIRCO=$ac_cv_path_CIRCO if test -n "$CIRCO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CIRCO" >&5 -$as_echo "$CIRCO" >&6; } + { echo "$as_me:$LINENO: result: $CIRCO" >&5 +echo "${ECHO_T}$CIRCO" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "$CIRCO" != "echo circo" ; then -$as_echo "#define HAVE_CIRCO 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_CIRCO 1 +_ACEOF if test "$llvm_cv_os_type" = "MingW" ; then CIRCO=`echo $CIRCO | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` @@ -6987,10 +7585,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GV+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GV+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GV in [\\/]* | ?:[\\/]*) @@ -7002,14 +7600,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GV="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -7017,11 +7615,11 @@ fi GV=$ac_cv_path_GV if test -n "$GV"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GV" >&5 -$as_echo "$GV" >&6; } + { echo "$as_me:$LINENO: result: $GV" >&5 +echo "${ECHO_T}$GV" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -7031,7 +7629,9 @@ if test "$GV" != "echo gv" ; then -$as_echo "#define HAVE_GV 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_GV 1 +_ACEOF if test "$llvm_cv_os_type" = "MingW" ; then GV=`echo $GV | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` @@ -7044,10 +7644,10 @@ fi # Extract the first word of "dotty", so it can be a program name with args. set dummy dotty; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_DOTTY+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_DOTTY+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DOTTY in [\\/]* | ?:[\\/]*) @@ -7059,14 +7659,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DOTTY="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_DOTTY" && ac_cv_path_DOTTY="echo dotty" @@ -7075,17 +7675,19 @@ fi DOTTY=$ac_cv_path_DOTTY if test -n "$DOTTY"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOTTY" >&5 -$as_echo "$DOTTY" >&6; } + { echo "$as_me:$LINENO: result: $DOTTY" >&5 +echo "${ECHO_T}$DOTTY" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "$DOTTY" != "echo dotty" ; then -$as_echo "#define HAVE_DOTTY 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_DOTTY 1 +_ACEOF if test "$llvm_cv_os_type" = "MingW" ; then DOTTY=`echo $DOTTY | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` @@ -7100,10 +7702,10 @@ # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PERL+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PERL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PERL in [\\/]* | ?:[\\/]*) @@ -7115,14 +7717,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="none" @@ -7131,24 +7733,24 @@ fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 -$as_echo "$PERL" >&6; } + { echo "$as_me:$LINENO: result: $PERL" >&5 +echo "${ECHO_T}$PERL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi if test "$PERL" != "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl 5.006 or newer" >&5 -$as_echo_n "checking for Perl 5.006 or newer... " >&6; } + { echo "$as_me:$LINENO: checking for Perl 5.006 or newer" >&5 +echo $ECHO_N "checking for Perl 5.006 or newer... $ECHO_C" >&6; } if $PERL -e 'use 5.006;' 2>&1 > /dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else PERL=none - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } + { echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6; } fi fi @@ -7156,7 +7758,9 @@ if test x"$PERL" = xnone; then HAVE_PERL=0 - as_fn_error "perl is required but was not found, please install it" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: perl is required but was not found, please install it" >&5 +echo "$as_me: error: perl is required but was not found, please install it" >&2;} + { (exit 1); exit 1; }; } else HAVE_PERL=1 @@ -7175,23 +7779,22 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -7199,7 +7802,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -7209,29 +7812,17 @@ # program-specific install script used by HP pwplus--don't use. : else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 fi fi done done ;; esac - - done +done IFS=$as_save_IFS -rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -7244,8 +7835,8 @@ INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -7258,10 +7849,10 @@ # Extract the first word of "bzip2", so it can be a program name with args. set dummy bzip2; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_BZIP2+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_BZIP2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $BZIP2 in [\\/]* | ?:[\\/]*) @@ -7273,14 +7864,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_BZIP2="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -7288,20 +7879,20 @@ fi BZIP2=$ac_cv_path_BZIP2 if test -n "$BZIP2"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BZIP2" >&5 -$as_echo "$BZIP2" >&6; } + { echo "$as_me:$LINENO: result: $BZIP2" >&5 +echo "${ECHO_T}$BZIP2" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_DOXYGEN+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_DOXYGEN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DOXYGEN in [\\/]* | ?:[\\/]*) @@ -7313,14 +7904,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -7328,20 +7919,20 @@ fi DOXYGEN=$ac_cv_path_DOXYGEN if test -n "$DOXYGEN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 -$as_echo "$DOXYGEN" >&6; } + { echo "$as_me:$LINENO: result: $DOXYGEN" >&5 +echo "${ECHO_T}$DOXYGEN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "groff", so it can be a program name with args. set dummy groff; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GROFF+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GROFF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GROFF in [\\/]* | ?:[\\/]*) @@ -7353,14 +7944,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -7368,20 +7959,20 @@ fi GROFF=$ac_cv_path_GROFF if test -n "$GROFF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5 -$as_echo "$GROFF" >&6; } + { echo "$as_me:$LINENO: result: $GROFF" >&5 +echo "${ECHO_T}$GROFF" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "gzip", so it can be a program name with args. set dummy gzip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GZIP+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GZIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GZIP in [\\/]* | ?:[\\/]*) @@ -7393,14 +7984,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -7408,20 +7999,20 @@ fi GZIP=$ac_cv_path_GZIP if test -n "$GZIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5 -$as_echo "$GZIP" >&6; } + { echo "$as_me:$LINENO: result: $GZIP" >&5 +echo "${ECHO_T}$GZIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "pod2html", so it can be a program name with args. set dummy pod2html; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_POD2HTML+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_POD2HTML+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $POD2HTML in [\\/]* | ?:[\\/]*) @@ -7433,14 +8024,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_POD2HTML="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -7448,20 +8039,20 @@ fi POD2HTML=$ac_cv_path_POD2HTML if test -n "$POD2HTML"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POD2HTML" >&5 -$as_echo "$POD2HTML" >&6; } + { echo "$as_me:$LINENO: result: $POD2HTML" >&5 +echo "${ECHO_T}$POD2HTML" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "pod2man", so it can be a program name with args. set dummy pod2man; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_POD2MAN+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_POD2MAN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $POD2MAN in [\\/]* | ?:[\\/]*) @@ -7473,14 +8064,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_POD2MAN="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -7488,20 +8079,20 @@ fi POD2MAN=$ac_cv_path_POD2MAN if test -n "$POD2MAN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POD2MAN" >&5 -$as_echo "$POD2MAN" >&6; } + { echo "$as_me:$LINENO: result: $POD2MAN" >&5 +echo "${ECHO_T}$POD2MAN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # Extract the first word of "runtest", so it can be a program name with args. set dummy runtest; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_RUNTEST+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_RUNTEST+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $RUNTEST in [\\/]* | ?:[\\/]*) @@ -7513,14 +8104,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_RUNTEST="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -7528,28 +8119,28 @@ fi RUNTEST=$ac_cv_path_RUNTEST if test -n "$RUNTEST"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUNTEST" >&5 -$as_echo "$RUNTEST" >&6; } + { echo "$as_me:$LINENO: result: $RUNTEST" >&5 +echo "${ECHO_T}$RUNTEST" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi no_itcl=true -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the tclsh program in tclinclude directory" >&5 -$as_echo_n "checking for the tclsh program in tclinclude directory... " >&6; } +{ echo "$as_me:$LINENO: checking for the tclsh program in tclinclude directory" >&5 +echo $ECHO_N "checking for the tclsh program in tclinclude directory... $ECHO_C" >&6; } # Check whether --with-tclinclude was given. -if test "${with_tclinclude+set}" = set; then : +if test "${with_tclinclude+set}" = set; then withval=$with_tclinclude; with_tclinclude=${withval} else with_tclinclude='' fi -if test "${ac_cv_path_tclsh+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test "${ac_cv_path_tclsh+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test x"${with_tclinclude}" != x ; then @@ -7558,23 +8149,25 @@ elif test -f ${with_tclinclude}/src/tclsh ; then ac_cv_path_tclsh=`(cd ${with_tclinclude}/src; pwd)` else - as_fn_error "${with_tclinclude} directory doesn't contain tclsh" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: ${with_tclinclude} directory doesn't contain tclsh" >&5 +echo "$as_me: error: ${with_tclinclude} directory doesn't contain tclsh" >&2;} + { (exit 1); exit 1; }; } fi fi fi if test x"${ac_cv_path_tclsh}" = x ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } for ac_prog in tclsh8.4 tclsh8.4.8 tclsh8.4.7 tclsh8.4.6 tclsh8.4.5 tclsh8.4.4 tclsh8.4.3 tclsh8.4.2 tclsh8.4.1 tclsh8.4.0 tclsh8.3 tclsh8.3.5 tclsh8.3.4 tclsh8.3.3 tclsh8.3.2 tclsh8.3.1 tclsh8.3.0 tclsh do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_TCLSH+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_TCLSH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $TCLSH in [\\/]* | ?:[\\/]*) @@ -7586,14 +8179,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -7601,11 +8194,11 @@ fi TCLSH=$ac_cv_path_TCLSH if test -n "$TCLSH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5 -$as_echo "$TCLSH" >&6; } + { echo "$as_me:$LINENO: result: $TCLSH" >&5 +echo "${ECHO_T}$TCLSH" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -7618,18 +8211,18 @@ ac_cv_path_tclsh="${TCLSH}"; fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_path_tclsh}" >&5 -$as_echo "${ac_cv_path_tclsh}" >&6; } + { echo "$as_me:$LINENO: result: ${ac_cv_path_tclsh}" >&5 +echo "${ECHO_T}${ac_cv_path_tclsh}" >&6; } TCLSH="${ac_cv_path_tclsh}" fi # Extract the first word of "zip", so it can be a program name with args. set dummy zip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ZIP+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ZIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ZIP in [\\/]* | ?:[\\/]*) @@ -7641,14 +8234,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -7656,11 +8249,11 @@ fi ZIP=$ac_cv_path_ZIP if test -n "$ZIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5 -$as_echo "$ZIP" >&6; } + { echo "$as_me:$LINENO: result: $ZIP" >&5 +echo "${ECHO_T}$ZIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -7668,10 +8261,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_OCAMLC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_OCAMLC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $OCAMLC in [\\/]* | ?:[\\/]*) @@ -7683,14 +8276,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_OCAMLC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -7698,11 +8291,11 @@ fi OCAMLC=$ac_cv_path_OCAMLC if test -n "$OCAMLC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLC" >&5 -$as_echo "$OCAMLC" >&6; } + { echo "$as_me:$LINENO: result: $OCAMLC" >&5 +echo "${ECHO_T}$OCAMLC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -7713,10 +8306,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_OCAMLOPT+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_OCAMLOPT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $OCAMLOPT in [\\/]* | ?:[\\/]*) @@ -7728,14 +8321,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_OCAMLOPT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -7743,11 +8336,11 @@ fi OCAMLOPT=$ac_cv_path_OCAMLOPT if test -n "$OCAMLOPT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLOPT" >&5 -$as_echo "$OCAMLOPT" >&6; } + { echo "$as_me:$LINENO: result: $OCAMLOPT" >&5 +echo "${ECHO_T}$OCAMLOPT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -7758,10 +8351,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_OCAMLDEP+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_OCAMLDEP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $OCAMLDEP in [\\/]* | ?:[\\/]*) @@ -7773,14 +8366,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_OCAMLDEP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -7788,11 +8381,11 @@ fi OCAMLDEP=$ac_cv_path_OCAMLDEP if test -n "$OCAMLDEP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDEP" >&5 -$as_echo "$OCAMLDEP" >&6; } + { echo "$as_me:$LINENO: result: $OCAMLDEP" >&5 +echo "${ECHO_T}$OCAMLDEP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -7803,10 +8396,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_OCAMLDOC+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_OCAMLDOC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $OCAMLDOC in [\\/]* | ?:[\\/]*) @@ -7818,14 +8411,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_OCAMLDOC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -7833,11 +8426,11 @@ fi OCAMLDOC=$ac_cv_path_OCAMLDOC if test -n "$OCAMLDOC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDOC" >&5 -$as_echo "$OCAMLDOC" >&6; } + { echo "$as_me:$LINENO: result: $OCAMLDOC" >&5 +echo "${ECHO_T}$OCAMLDOC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -7848,10 +8441,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GAS+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GAS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GAS in [\\/]* | ?:[\\/]*) @@ -7863,14 +8456,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GAS="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -7878,11 +8471,11 @@ fi GAS=$ac_cv_path_GAS if test -n "$GAS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GAS" >&5 -$as_echo "$GAS" >&6; } + { echo "$as_me:$LINENO: result: $GAS" >&5 +echo "${ECHO_T}$GAS" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi @@ -7890,10 +8483,10 @@ done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler -Wl,-R option" >&5 -$as_echo_n "checking for compiler -Wl,-R option... " >&6; } -if test "${llvm_cv_link_use_r+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for compiler -Wl,-R option" >&5 +echo $ECHO_N "checking for compiler -Wl,-R option... $ECHO_C" >&6; } +if test "${llvm_cv_link_use_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7903,7 +8496,11 @@ oldcflags="$CFLAGS" CFLAGS="$CFLAGS -Wl,-R." - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -7914,13 +8511,50 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then llvm_cv_link_use_r=yes else - llvm_cv_link_use_r=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + llvm_cv_link_use_r=no fi + rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext CFLAGS="$oldcflags" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7930,19 +8564,21 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $llvm_cv_link_use_r" >&5 -$as_echo "$llvm_cv_link_use_r" >&6; } +{ echo "$as_me:$LINENO: result: $llvm_cv_link_use_r" >&5 +echo "${ECHO_T}$llvm_cv_link_use_r" >&6; } if test "$llvm_cv_link_use_r" = yes ; then -$as_echo "#define HAVE_LINK_R 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_LINK_R 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler -Wl,-export-dynamic option" >&5 -$as_echo_n "checking for compiler -Wl,-export-dynamic option... " >&6; } -if test "${llvm_cv_link_use_export_dynamic+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for compiler -Wl,-export-dynamic option" >&5 +echo $ECHO_N "checking for compiler -Wl,-export-dynamic option... $ECHO_C" >&6; } +if test "${llvm_cv_link_use_export_dynamic+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7952,7 +8588,11 @@ oldcflags="$CFLAGS" CFLAGS="$CFLAGS -Wl,-export-dynamic" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -7963,13 +8603,50 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then llvm_cv_link_use_export_dynamic=yes else - llvm_cv_link_use_export_dynamic=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + llvm_cv_link_use_export_dynamic=no fi + rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext CFLAGS="$oldcflags" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7979,23 +8656,29 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $llvm_cv_link_use_export_dynamic" >&5 -$as_echo "$llvm_cv_link_use_export_dynamic" >&6; } +{ echo "$as_me:$LINENO: result: $llvm_cv_link_use_export_dynamic" >&5 +echo "${ECHO_T}$llvm_cv_link_use_export_dynamic" >&6; } if test "$llvm_cv_link_use_export_dynamic" = yes ; then -$as_echo "#define HAVE_LINK_EXPORT_DYNAMIC 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_LINK_EXPORT_DYNAMIC 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -8005,10 +8688,10 @@ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; - const charset cs; + const charset x; /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; + char const *const *ccp; + char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; @@ -8017,11 +8700,11 @@ an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); + ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; @@ -8048,37 +8731,85 @@ const int foo = 10; if (!foo) return 0; } - return !cs[0] && !zero.x; + return !x[0] && !zero.x; #endif ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_c_const=yes else - ac_cv_c_const=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -$as_echo "#define const /**/" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF fi + + + + + ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_hdr> @@ -8092,20 +8823,56 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else - eval "$as_ac_Header=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -eval ac_res=\$$as_ac_Header - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break @@ -8114,13 +8881,17 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -8145,39 +8916,82 @@ ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO"; then : + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_search_opendir=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then break fi done -if test "${ac_cv_search_opendir+set}" = set; then : - +if test "${ac_cv_search_opendir+set}" = set; then + : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : +if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -8202,52 +9016,250 @@ ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO"; then : + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_search_opendir=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then break fi done -if test "${ac_cv_search_opendir+set}" = set; then : - +if test "${ac_cv_search_opendir+set}" = set; then + : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : +if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi + for ac_header in dlfcn.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF - -fi - -done - -# Check whether --enable-ltdl-install was given. -if test "${enable_ltdl_install+set}" = set; then : - enableval=$enable_ltdl_install; +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +# Check whether --enable-ltdl-install was given. +if test "${enable_ltdl_install+set}" = set; then + enableval=$enable_ltdl_install; fi - if test x"${enable_ltdl_install-no}" != xno; then + + +if test x"${enable_ltdl_install-no}" != xno; then INSTALL_LTDL_TRUE= INSTALL_LTDL_FALSE='#' else @@ -8255,7 +9267,9 @@ INSTALL_LTDL_FALSE= fi - if test x"${enable_ltdl_convenience-no}" != xno; then + + +if test x"${enable_ltdl_convenience-no}" != xno; then CONVENIENCE_LTDL_TRUE= CONVENIENCE_LTDL_FALSE='#' else @@ -8264,8 +9278,8 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= @@ -8852,8 +9866,8 @@ dynamic_linker=no ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -8862,18 +9876,18 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which extension is used for loadable modules" >&5 -$as_echo_n "checking which extension is used for loadable modules... " >&6; } -if test "${libltdl_cv_shlibext+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking which extension is used for loadable modules" >&5 +echo $ECHO_N "checking which extension is used for loadable modules... $ECHO_C" >&6; } +if test "${libltdl_cv_shlibext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else module=yes eval libltdl_cv_shlibext=$shrext_cmds fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_shlibext" >&5 -$as_echo "$libltdl_cv_shlibext" >&6; } +{ echo "$as_me:$LINENO: result: $libltdl_cv_shlibext" >&5 +echo "${ECHO_T}$libltdl_cv_shlibext" >&6; } if test -n "$libltdl_cv_shlibext"; then cat >>confdefs.h <<_ACEOF @@ -8883,15 +9897,15 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variable specifies run-time library path" >&5 -$as_echo_n "checking which variable specifies run-time library path... " >&6; } -if test "${libltdl_cv_shlibpath_var+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking which variable specifies run-time library path" >&5 +echo $ECHO_N "checking which variable specifies run-time library path... $ECHO_C" >&6; } +if test "${libltdl_cv_shlibpath_var+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else libltdl_cv_shlibpath_var="$shlibpath_var" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_shlibpath_var" >&5 -$as_echo "$libltdl_cv_shlibpath_var" >&6; } +{ echo "$as_me:$LINENO: result: $libltdl_cv_shlibpath_var" >&5 +echo "${ECHO_T}$libltdl_cv_shlibpath_var" >&6; } if test -n "$libltdl_cv_shlibpath_var"; then cat >>confdefs.h <<_ACEOF @@ -8901,15 +9915,15 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the default library search path" >&5 -$as_echo_n "checking for the default library search path... " >&6; } -if test "${libltdl_cv_sys_search_path+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for the default library search path" >&5 +echo $ECHO_N "checking for the default library search path... $ECHO_C" >&6; } +if test "${libltdl_cv_sys_search_path+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_sys_search_path" >&5 -$as_echo "$libltdl_cv_sys_search_path" >&6; } +{ echo "$as_me:$LINENO: result: $libltdl_cv_sys_search_path" >&5 +echo "${ECHO_T}$libltdl_cv_sys_search_path" >&6; } if test -n "$libltdl_cv_sys_search_path"; then sys_search_path= for dir in $libltdl_cv_sys_search_path; do @@ -8926,10 +9940,10 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${libltdl_cv_objdir+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } +if test "${libltdl_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else libltdl_cv_objdir="$objdir" if test -n "$objdir"; then @@ -8947,8 +9961,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_objdir" >&5 -$as_echo "$libltdl_cv_objdir" >&6; } +{ echo "$as_me:$LINENO: result: $libltdl_cv_objdir" >&5 +echo "${ECHO_T}$libltdl_cv_objdir" >&6; } cat >>confdefs.h <<_ACEOF #define LTDL_OBJDIR "$libltdl_cv_objdir/" @@ -8960,10 +9974,10 @@ # Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. @@ -9065,18 +10079,18 @@ int main(){nm_test_var='a';nm_test_func();return(0);} EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -9127,11 +10141,11 @@ lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" @@ -9165,18 +10179,18 @@ lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } + { echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libtool supports -dlopen/-dlpreopen" >&5 -$as_echo_n "checking whether libtool supports -dlopen/-dlpreopen... " >&6; } -if test "${libltdl_cv_preloaded_symbols+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking whether libtool supports -dlopen/-dlpreopen" >&5 +echo $ECHO_N "checking whether libtool supports -dlopen/-dlpreopen... $ECHO_C" >&6; } +if test "${libltdl_cv_preloaded_symbols+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$lt_cv_sys_global_symbol_pipe"; then libltdl_cv_preloaded_symbols=yes @@ -9185,11 +10199,13 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_preloaded_symbols" >&5 -$as_echo "$libltdl_cv_preloaded_symbols" >&6; } +{ echo "$as_me:$LINENO: result: $libltdl_cv_preloaded_symbols" >&5 +echo "${ECHO_T}$libltdl_cv_preloaded_symbols" >&6; } if test x"$libltdl_cv_preloaded_symbols" = xyes; then -$as_echo "#define HAVE_PRELOADED_SYMBOLS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_PRELOADED_SYMBOLS 1 +_ACEOF fi @@ -9202,20 +10218,122 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : +{ echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } +if test $ac_cv_func_shl_load = yes; then -$as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHL_LOAD 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : - $as_echo_n "(cached) " >&6 + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -9233,31 +10351,74 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else - ac_cv_lib_dld_shl_load=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no fi + rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +if test $ac_cv_lib_dld_shl_load = yes; then -$as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHL_LOAD 1 +_ACEOF LIBADD_DL="$LIBADD_DL -ldld" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -9275,24 +10436,67 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else - ac_cv_lib_dl_dlopen=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no fi + rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then -$as_echo "#define HAVE_LIBDL 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBDL 1 +_ACEOF LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes" else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if HAVE_DLFCN_H # include @@ -9306,19 +10510,61 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then -$as_echo "#define HAVE_LIBDL 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBDL 1 +_ACEOF libltdl_cv_func_dlopen="yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -9336,31 +10582,74 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else - ac_cv_lib_svld_dlopen=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no fi + rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : +{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } +if test $ac_cv_lib_svld_dlopen = yes; then -$as_echo "#define HAVE_LIBDL 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBDL 1 +_ACEOF LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : - $as_echo_n "(cached) " >&6 + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -9378,40 +10667,178 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else - ac_cv_lib_dld_dld_link=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no fi + rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } +if test $ac_cv_lib_dld_dld_link = yes; then -$as_echo "#define HAVE_DLD 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_DLD 1 +_ACEOF LIBADD_DL="$LIBADD_DL -ldld" else - ac_fn_c_check_func "$LINENO" "_dyld_func_lookup" "ac_cv_func__dyld_func_lookup" -if test "x$ac_cv_func__dyld_func_lookup" = x""yes; then : - -$as_echo "#define HAVE_DYLD 1" >>confdefs.h - -fi - - -fi + { echo "$as_me:$LINENO: checking for _dyld_func_lookup" >&5 +echo $ECHO_N "checking for _dyld_func_lookup... $ECHO_C" >&6; } +if test "${ac_cv_func__dyld_func_lookup+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define _dyld_func_lookup to an innocuous variant, in case declares _dyld_func_lookup. + For example, HP-UX 11i declares gettimeofday. */ +#define _dyld_func_lookup innocuous__dyld_func_lookup +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _dyld_func_lookup (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -fi +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef _dyld_func_lookup + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char _dyld_func_lookup (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub__dyld_func_lookup || defined __stub____dyld_func_lookup +choke me +#endif + +int +main () +{ +return _dyld_func_lookup (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func__dyld_func_lookup=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func__dyld_func_lookup=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func__dyld_func_lookup" >&5 +echo "${ECHO_T}$ac_cv_func__dyld_func_lookup" >&6; } +if test $ac_cv_func__dyld_func_lookup = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DYLD 1 +_ACEOF + +fi + + +fi + + +fi fi + rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext fi @@ -9426,12 +10853,111 @@ then lt_save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DL" - for ac_func in dlerror -do : - ac_fn_c_check_func "$LINENO" "dlerror" "ac_cv_func_dlerror" -if test "x$ac_cv_func_dlerror" = x""yes; then : + +for ac_func in dlerror +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_DLERROR 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -9447,28 +10973,28 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _ prefix in compiled symbols" >&5 -$as_echo_n "checking for _ prefix in compiled symbols... " >&6; } -if test "${ac_cv_sys_symbol_underscore+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for _ prefix in compiled symbols" >&5 +echo $ECHO_N "checking for _ prefix in compiled symbols... $ECHO_C" >&6; } +if test "${ac_cv_sys_symbol_underscore+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_sys_symbol_underscore=no cat > conftest.$ac_ext <&5 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then # Now try to grab the symbols. ac_nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist\""; } >&5 + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$ac_nlist"; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ac_cv_sys_symbol_underscore=yes @@ -9489,17 +11015,17 @@ rm -rf conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_symbol_underscore" >&5 -$as_echo "$ac_cv_sys_symbol_underscore" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_sys_symbol_underscore" >&5 +echo "${ECHO_T}$ac_cv_sys_symbol_underscore" >&6; } if test x"$ac_cv_sys_symbol_underscore" = xyes; then if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have to add an underscore for dlsym" >&5 -$as_echo_n "checking whether we have to add an underscore for dlsym... " >&6; } -if test "${libltdl_cv_need_uscore+set}" = set; then : - $as_echo_n "(cached) " >&6 + { echo "$as_me:$LINENO: checking whether we have to add an underscore for dlsym" >&5 +echo $ECHO_N "checking whether we have to add an underscore for dlsym... $ECHO_C" >&6; } +if test "${libltdl_cv_need_uscore+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else libltdl_cv_need_uscore=unknown save_LIBS="$LIBS" @@ -9510,7 +11036,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -9595,22 +11121,24 @@ LIBS="$save_LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_need_uscore" >&5 -$as_echo "$libltdl_cv_need_uscore" >&6; } +{ echo "$as_me:$LINENO: result: $libltdl_cv_need_uscore" >&5 +echo "${ECHO_T}$libltdl_cv_need_uscore" >&6; } fi fi if test x"$libltdl_cv_need_uscore" = xyes; then -$as_echo "#define NEED_USCORE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define NEED_USCORE 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether deplibs are loaded by dlopen" >&5 -$as_echo_n "checking whether deplibs are loaded by dlopen... " >&6; } -if test "${libltdl_cv_sys_dlopen_deplibs+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking whether deplibs are loaded by dlopen" >&5 +echo $ECHO_N "checking whether deplibs are loaded by dlopen... $ECHO_C" >&6; } +if test "${libltdl_cv_sys_dlopen_deplibs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else # PORTME does your system automatically load deplibs for dlopen? # or its logical equivalent (e.g. shl_load for HP-UX < 11) @@ -9688,70 +11216,273 @@ esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_sys_dlopen_deplibs" >&5 -$as_echo "$libltdl_cv_sys_dlopen_deplibs" >&6; } +{ echo "$as_me:$LINENO: result: $libltdl_cv_sys_dlopen_deplibs" >&5 +echo "${ECHO_T}$libltdl_cv_sys_dlopen_deplibs" >&6; } if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then -$as_echo "#define LTDL_DLOPEN_DEPLIBS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define LTDL_DLOPEN_DEPLIBS 1 +_ACEOF fi + for ac_header in argz.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "argz.h" "ac_cv_header_argz_h" "$ac_includes_default" -if test "x$ac_cv_header_argz_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ARGZ_H 1 +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -done - - -ac_fn_c_check_type "$LINENO" "error_t" "ac_cv_type_error_t" "#if HAVE_ARGZ_H -# include -#endif -" -if test "x$ac_cv_type_error_t" = x""yes; then : +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } -cat >>confdefs.h <<_ACEOF -#define HAVE_ERROR_T 1 +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF - - +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define error_t int" >>confdefs.h - + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } -for ac_func in argz_append argz_create_sep argz_insert argz_next argz_stringify -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi -done - - +done +{ echo "$as_me:$LINENO: checking for error_t" >&5 +echo $ECHO_N "checking for error_t... $ECHO_C" >&6; } +if test "${ac_cv_type_error_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#if HAVE_ARGZ_H +# include +#endif +typedef error_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_error_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_error_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_error_t" >&5 +echo "${ECHO_T}$ac_cv_type_error_t" >&6; } +if test $ac_cv_type_error_t = yes; then +cat >>confdefs.h <<_ACEOF +#define HAVE_ERROR_T 1 +_ACEOF +else +cat >>confdefs.h <<\_ACEOF +#define error_t int +_ACEOF +fi @@ -9759,420 +11490,686 @@ -for ac_header in assert.h ctype.h errno.h malloc.h memory.h stdlib.h \ - stdio.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +for ac_func in argz_append argz_create_sep argz_insert argz_next argz_stringify +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -fi - -done - -for ac_header in dl.h sys/dl.h dld.h mach-o/dyld.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -fi +#ifdef __STDC__ +# include +#else +# include +#endif -done - -for ac_header in string.h strings.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - break -fi - -done +#undef $ac_func +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif -for ac_func in strchr index -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +int +main () +{ +return $ac_func (); + ; + return 0; +} _ACEOF - break -fi -done +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -for ac_func in strrchr rindex -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - break + eval "$as_ac_var=no" fi -done -for ac_func in memcpy bcopy -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - break +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -done - -for ac_func in memmove strcmp -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -for ac_func in closedir opendir readdir -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF -fi -done -if test "$WITH_LLVMGCCDIR" = "default" ; then - LLVMGCC="llvm-gcc${EXEEXT}" - LLVMGXX="llvm-g++${EXEEXT}" - LLVMGCCCOMMAND="$LLVMGCC" - LLVMGXXCOMMAND="$LLVMGXX" - LLVMGCCCOMMAND=$LLVMGCCCOMMAND - LLVMGXXCOMMAND=$LLVMGXXCOMMAND - # Extract the first word of "$LLVMGCC", so it can be a program name with args. -set dummy $LLVMGCC; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_LLVMGCC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $LLVMGCC in - [\\/]* | ?:[\\/]*) - ac_cv_path_LLVMGCC="$LLVMGCC" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_LLVMGCC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - ;; -esac -fi -LLVMGCC=$ac_cv_path_LLVMGCC -if test -n "$LLVMGCC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVMGCC" >&5 -$as_echo "$LLVMGCC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - # Extract the first word of "$LLVMGXX", so it can be a program name with args. -set dummy $LLVMGXX; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_LLVMGXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $LLVMGXX in - [\\/]* | ?:[\\/]*) - ac_cv_path_LLVMGXX="$LLVMGXX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_LLVMGXX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - ;; -esac -fi -LLVMGXX=$ac_cv_path_LLVMGXX -if test -n "$LLVMGXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVMGXX" >&5 -$as_echo "$LLVMGXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -else - if test -z "$LLVMGCC"; then - LLVMGCC="$WITH_LLVMGCCDIR/bin/llvm-gcc${EXEEXT}" - LLVMGCCCOMMAND="$LLVMGCC" - fi - if test -z "$LLVMGXX"; then - LLVMGXX="$WITH_LLVMGCCDIR/bin/llvm-g++${EXEEXT}" - LLVMGXXCOMMAND="$LLVMGXX" - fi - LLVMGCC=$LLVMGCC - LLVMGXX=$LLVMGXX - LLVMGCCCOMMAND=$LLVMGCCCOMMAND - LLVMGXXCOMMAND=$LLVMGXXCOMMAND -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking tool compatibility" >&5 -$as_echo_n "checking tool compatibility... " >&6; } -ICC=no -IXX=no -case $CC in - icc*|icpc*) - ICC=yes - IXX=yes - ;; - *) - ;; + + + + + + + +for ac_header in assert.h ctype.h errno.h malloc.h memory.h stdlib.h \ + stdio.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test "$GCC" != "yes" && test "$ICC" != "yes" -then - as_fn_error "gcc|icc required but not found" "$LINENO" 5 + ac_header_compiler=no fi -if test "$GXX" != "yes" && test "$IXX" != "yes" -then - as_fn_error "g++|icc required but not found" "$LINENO" 5 -fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } -if test "$GCC" = "yes" -then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#if !defined(__GNUC__) || __GNUC__ < 3 -#error Unsupported GCC version -#endif - +#include <$ac_header> _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - as_fn_error "gcc 3.x required, but you have a lower version" "$LINENO" 5 + eval "$as_ac_Header=\$ac_header_preproc" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -if test -z "$llvm_cv_gnu_make_command" -then - as_fn_error "GNU Make required but not found" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } +done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking optional compiler flags" >&5 -$as_echo_n "checking optional compiler flags... " >&6; } -NO_VARIADIC_MACROS=`$CXX -Wno-variadic-macros -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-variadic-macros` -NO_MISSING_FIELD_INITIALIZERS=`$CXX -Wno-missing-field-initializers -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-missing-field-initializers` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS" >&5 -$as_echo "$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 -$as_echo_n "checking for sin in -lm... " >&6; } -if test "${ac_cv_lib_m_sin+set}" = set; then : - $as_echo_n "(cached) " >&6 +for ac_header in dl.h sys/dl.h dld.h mach-o/dyld.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sin (); -int -main () -{ -return sin (); - ; - return 0; -} +$ac_includes_default +#include <$ac_header> _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_sin=yes -else - ac_cv_lib_m_sin=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 -$as_echo "$ac_cv_lib_m_sin" >&6; } -if test "x$ac_cv_lib_m_sin" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - LIBS="-lm $LIBS" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi - -if test "$llvm_cv_os_type" = "MingW" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -limagehlp" >&5 -$as_echo_n "checking for main in -limagehlp... " >&6; } -if test "${ac_cv_lib_imagehlp_main+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else - ac_check_lib_save_LIBS=$LIBS -LIBS="-limagehlp $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_imagehlp_main=yes +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_lib_imagehlp_main=no + eval "$as_ac_Header=\$ac_header_preproc" fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_imagehlp_main" >&5 -$as_echo "$ac_cv_lib_imagehlp_main" >&6; } -if test "x$ac_cv_lib_imagehlp_main" = x""yes; then : +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBIMAGEHLP 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - LIBS="-limagehlp $LIBS" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpsapi" >&5 -$as_echo_n "checking for main in -lpsapi... " >&6; } -if test "${ac_cv_lib_psapi_main+set}" = set; then : - $as_echo_n "(cached) " >&6 +done + + + +for ac_header in string.h strings.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpsapi $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no +fi -int -main () -{ -return main (); - ; - return 0; -} +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_psapi_main=yes +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - ac_cv_lib_psapi_main=no + ac_cpp_err=yes fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_psapi_main" >&5 -$as_echo "$ac_cv_lib_psapi_main" >&6; } -if test "x$ac_cv_lib_psapi_main" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPSAPI 1 -_ACEOF - LIBS="-lpsapi $LIBS" +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + break +fi + +done + + -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 -$as_echo_n "checking for library containing dlopen... " >&6; } -if test "${ac_cv_search_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 + +for ac_func in strchr index +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -10180,62 +12177,110 @@ #ifdef __cplusplus extern "C" #endif -char dlopen (); +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + int main () { -return dlopen (); +return $ac_func (); ; return 0; } _ACEOF -for ac_lib in '' dl; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_dlopen=$ac_res +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" fi + rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_dlopen+set}" = set; then : - break + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + break fi done -if test "${ac_cv_search_dlopen+set}" = set; then : -else - ac_cv_search_dlopen=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 -$as_echo "$ac_cv_search_dlopen" >&6; } -ac_res=$ac_cv_search_dlopen -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h +for ac_func in strrchr rindex +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dlopen() not found - disabling plugin support" >&5 -$as_echo "$as_me: WARNING: dlopen() not found - disabling plugin support" >&2;} -fi + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -if test "$llvm_cv_enable_libffi" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ffi_call" >&5 -$as_echo_n "checking for library containing ffi_call... " >&6; } -if test "${ac_cv_search_ffi_call+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -10243,62 +12288,110 @@ #ifdef __cplusplus extern "C" #endif -char ffi_call (); +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + int main () { -return ffi_call (); +return $ac_func (); ; return 0; } _ACEOF -for ac_lib in '' ffi; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_ffi_call=$ac_res +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" fi + rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_ffi_call+set}" = set; then : - break + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + break fi done -if test "${ac_cv_search_ffi_call+set}" = set; then : -else - ac_cv_search_ffi_call=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ffi_call" >&5 -$as_echo "$ac_cv_search_ffi_call" >&6; } -ac_res=$ac_cv_search_ffi_call -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -$as_echo "#define HAVE_FFI_CALL 1" >>confdefs.h +for ac_func in memcpy bcopy +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not found - disabling external calls from interpreter" >&5 -$as_echo "$as_me: WARNING: libffi not found - disabling external calls from interpreter" >&2;} -fi + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -fi +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing mallinfo" >&5 -$as_echo_n "checking for library containing mallinfo... " >&6; } -if test "${ac_cv_search_mallinfo+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -10306,60 +12399,110 @@ #ifdef __cplusplus extern "C" #endif -char mallinfo (); +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + int main () { -return mallinfo (); +return $ac_func (); ; return 0; } _ACEOF -for ac_lib in '' malloc; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_mallinfo=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_mallinfo+set}" = set; then : - break +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" fi -done -if test "${ac_cv_search_mallinfo+set}" = set; then : -else - ac_cv_search_mallinfo=no +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + break fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_mallinfo" >&5 -$as_echo "$ac_cv_search_mallinfo" >&6; } -ac_res=$ac_cv_search_mallinfo -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -$as_echo "#define HAVE_MALLINFO 1" >>confdefs.h +done -fi -if test "$ENABLE_THREADS" -eq 1 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 -$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then : - $as_echo_n "(cached) " >&6 +for ac_func in memmove strcmp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -10367,43 +12510,111 @@ #ifdef __cplusplus extern "C" #endif -char pthread_mutex_init (); +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + int main () { -return pthread_mutex_init (); +return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_mutex_init=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - ac_cv_lib_pthread_pthread_mutex_init=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" fi + rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } -if test "x$ac_cv_lib_pthread_pthread_mutex_init" = x""yes; then : +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPTHREAD 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - LIBS="-lpthread $LIBS" - fi +done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_lock" >&5 -$as_echo_n "checking for library containing pthread_mutex_lock... " >&6; } -if test "${ac_cv_search_pthread_mutex_lock+set}" = set; then : - $as_echo_n "(cached) " >&6 + + + +for ac_func in closedir opendir readdir +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -10411,114 +12622,306 @@ #ifdef __cplusplus extern "C" #endif -char pthread_mutex_lock (); +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + int main () { -return pthread_mutex_lock (); +return $ac_func (); ; return 0; } _ACEOF -for ac_lib in '' pthread; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_pthread_mutex_lock=$ac_res +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" fi + rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_pthread_mutex_lock+set}" = set; then : - break + conftest$ac_exeext conftest.$ac_ext fi -done -if test "${ac_cv_search_pthread_mutex_lock+set}" = set; then : +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -else - ac_cv_search_pthread_mutex_lock=no fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_lock" >&5 -$as_echo "$ac_cv_search_pthread_mutex_lock" >&6; } -ac_res=$ac_cv_search_pthread_mutex_lock -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +done -$as_echo "#define HAVE_PTHREAD_MUTEX_LOCK 1" >>confdefs.h -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_rwlock_init" >&5 -$as_echo_n "checking for library containing pthread_rwlock_init... " >&6; } -if test "${ac_cv_search_pthread_rwlock_init+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test "$WITH_LLVMGCCDIR" = "default" ; then + LLVMGCC="llvm-gcc${EXEEXT}" + LLVMGXX="llvm-g++${EXEEXT}" + LLVMGCCCOMMAND="$LLVMGCC" + LLVMGXXCOMMAND="$LLVMGXX" + LLVMGCCCOMMAND=$LLVMGCCCOMMAND + + LLVMGXXCOMMAND=$LLVMGXXCOMMAND + + # Extract the first word of "$LLVMGCC", so it can be a program name with args. +set dummy $LLVMGCC; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_LLVMGCC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + case $LLVMGCC in + [\\/]* | ?:[\\/]*) + ac_cv_path_LLVMGCC="$LLVMGCC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_LLVMGCC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_rwlock_init (); -int -main () -{ -return pthread_rwlock_init (); - ; - return 0; -} -_ACEOF -for ac_lib in '' pthread; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_pthread_rwlock_init=$ac_res + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_pthread_rwlock_init+set}" = set; then : - break +LLVMGCC=$ac_cv_path_LLVMGCC +if test -n "$LLVMGCC"; then + { echo "$as_me:$LINENO: result: $LLVMGCC" >&5 +echo "${ECHO_T}$LLVMGCC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + + + # Extract the first word of "$LLVMGXX", so it can be a program name with args. +set dummy $LLVMGXX; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_LLVMGXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $LLVMGXX in + [\\/]* | ?:[\\/]*) + ac_cv_path_LLVMGXX="$LLVMGXX" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_LLVMGXX="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi done -if test "${ac_cv_search_pthread_rwlock_init+set}" = set; then : +done +IFS=$as_save_IFS + ;; +esac +fi +LLVMGXX=$ac_cv_path_LLVMGXX +if test -n "$LLVMGXX"; then + { echo "$as_me:$LINENO: result: $LLVMGXX" >&5 +echo "${ECHO_T}$LLVMGXX" >&6; } else - ac_cv_search_pthread_rwlock_init=no + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS + + +else + if test -z "$LLVMGCC"; then + LLVMGCC="$WITH_LLVMGCCDIR/bin/llvm-gcc${EXEEXT}" + LLVMGCCCOMMAND="$LLVMGCC" + fi + if test -z "$LLVMGXX"; then + LLVMGXX="$WITH_LLVMGCCDIR/bin/llvm-g++${EXEEXT}" + LLVMGXXCOMMAND="$LLVMGXX" + fi + + LLVMGCC=$LLVMGCC + + LLVMGXX=$LLVMGXX + + LLVMGCCCOMMAND=$LLVMGCCCOMMAND + + LLVMGXXCOMMAND=$LLVMGXXCOMMAND + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_rwlock_init" >&5 -$as_echo "$ac_cv_search_pthread_rwlock_init" >&6; } -ac_res=$ac_cv_search_pthread_rwlock_init -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -$as_echo "#define HAVE_PTHREAD_RWLOCK_INIT 1" >>confdefs.h +{ echo "$as_me:$LINENO: checking tool compatibility" >&5 +echo $ECHO_N "checking tool compatibility... $ECHO_C" >&6; } + +ICC=no +IXX=no +case $CC in + icc*|icpc*) + ICC=yes + IXX=yes + ;; + *) + ;; +esac + +if test "$GCC" != "yes" && test "$ICC" != "yes" +then + { { echo "$as_me:$LINENO: error: gcc|icc required but not found" >&5 +echo "$as_me: error: gcc|icc required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + +if test "$GXX" != "yes" && test "$IXX" != "yes" +then + { { echo "$as_me:$LINENO: error: g++|icc required but not found" >&5 +echo "$as_me: error: g++|icc required but not found" >&2;} + { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_getspecific" >&5 -$as_echo_n "checking for library containing pthread_getspecific... " >&6; } -if test "${ac_cv_search_pthread_getspecific+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test "$GCC" = "yes" +then + cat >conftest.$ac_ext <<_ACEOF +#if !defined(__GNUC__) || __GNUC__ < 3 +#error Unsupported GCC version +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { { echo "$as_me:$LINENO: error: gcc 3.x required, but you have a lower version" >&5 +echo "$as_me: error: gcc 3.x required, but you have a lower version" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +if test -z "$llvm_cv_gnu_make_command" +then + { { echo "$as_me:$LINENO: error: GNU Make required but not found" >&5 +echo "$as_me: error: GNU Make required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + +{ echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } + +{ echo "$as_me:$LINENO: checking optional compiler flags" >&5 +echo $ECHO_N "checking optional compiler flags... $ECHO_C" >&6; } +NO_VARIADIC_MACROS=`$CXX -Wno-variadic-macros -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-variadic-macros` + +NO_MISSING_FIELD_INITIALIZERS=`$CXX -Wno-missing-field-initializers -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-missing-field-initializers` + +{ echo "$as_me:$LINENO: result: $NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS" >&5 +echo "${ECHO_T}$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS" >&6; } + + + +{ echo "$as_me:$LINENO: checking for sin in -lm" >&5 +echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6; } +if test "${ac_cv_lib_m_sin+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -10527,1087 +12930,4955 @@ #ifdef __cplusplus extern "C" #endif -char pthread_getspecific (); +char sin (); int main () { -return pthread_getspecific (); +return sin (); ; return 0; } _ACEOF -for ac_lib in '' pthread; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_pthread_getspecific=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_pthread_getspecific+set}" = set; then : - break -fi -done -if test "${ac_cv_search_pthread_getspecific+set}" = set; then : - +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_m_sin=yes else - ac_cv_search_pthread_getspecific=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_getspecific" >&5 -$as_echo "$ac_cv_search_pthread_getspecific" >&6; } -ac_res=$ac_cv_search_pthread_getspecific -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -$as_echo "#define HAVE_PTHREAD_GETSPECIFIC 1" >>confdefs.h + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_m_sin=no fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5 +echo "${ECHO_T}$ac_cv_lib_m_sin" >&6; } +if test $ac_cv_lib_m_sin = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + LIBS="-lm $LIBS" -# Check whether --with-udis86 was given. -if test "${with_udis86+set}" = set; then : - withval=$with_udis86; - USE_UDIS86=1 +fi - case "$withval" in - /usr/lib|yes) ;; - *) LDFLAGS="$LDFLAGS -L${withval}" ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ud_init in -ludis86" >&5 -$as_echo_n "checking for ud_init in -ludis86... " >&6; } -if test "${ac_cv_lib_udis86_ud_init+set}" = set; then : - $as_echo_n "(cached) " >&6 +if test "$llvm_cv_os_type" = "MingW" ; then + +{ echo "$as_me:$LINENO: checking for main in -limagehlp" >&5 +echo $ECHO_N "checking for main in -limagehlp... $ECHO_C" >&6; } +if test "${ac_cv_lib_imagehlp_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ludis86 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +LIBS="-limagehlp $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ud_init (); + int main () { -return ud_init (); +return main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_udis86_ud_init=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_imagehlp_main=yes else - ac_cv_lib_udis86_ud_init=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_imagehlp_main=no fi + rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_udis86_ud_init" >&5 -$as_echo "$ac_cv_lib_udis86_ud_init" >&6; } -if test "x$ac_cv_lib_udis86_ud_init" = x""yes; then : +{ echo "$as_me:$LINENO: result: $ac_cv_lib_imagehlp_main" >&5 +echo "${ECHO_T}$ac_cv_lib_imagehlp_main" >&6; } +if test $ac_cv_lib_imagehlp_main = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUDIS86 1 +#define HAVE_LIBIMAGEHLP 1 _ACEOF - LIBS="-ludis86 $LIBS" - -else - - echo "Error! You need to have libudis86 around." - exit -1 + LIBS="-limagehlp $LIBS" fi +{ echo "$as_me:$LINENO: checking for main in -lpsapi" >&5 +echo $ECHO_N "checking for main in -lpsapi... $ECHO_C" >&6; } +if test "${ac_cv_lib_psapi_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - USE_UDIS86=0 + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpsapi $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_psapi_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_psapi_main=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_psapi_main" >&5 +echo "${ECHO_T}$ac_cv_lib_psapi_main" >&6; } +if test $ac_cv_lib_psapi_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPSAPI 1 +_ACEOF + + LIBS="-lpsapi $LIBS" + +fi + +fi + +{ echo "$as_me:$LINENO: checking for library containing dlopen" >&5 +echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6; } +if test "${ac_cv_search_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_dlopen=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_dlopen+set}" = set; then + break +fi +done +if test "${ac_cv_search_dlopen+set}" = set; then + : +else + ac_cv_search_dlopen=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5 +echo "${ECHO_T}$ac_cv_search_dlopen" >&6; } +ac_res=$ac_cv_search_dlopen +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DLOPEN 1 +_ACEOF + +else + { echo "$as_me:$LINENO: WARNING: dlopen() not found - disabling plugin support" >&5 +echo "$as_me: WARNING: dlopen() not found - disabling plugin support" >&2;} +fi + + +if test "$llvm_cv_enable_libffi" = "yes" ; then + { echo "$as_me:$LINENO: checking for library containing ffi_call" >&5 +echo $ECHO_N "checking for library containing ffi_call... $ECHO_C" >&6; } +if test "${ac_cv_search_ffi_call+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ffi_call (); +int +main () +{ +return ffi_call (); + ; + return 0; +} +_ACEOF +for ac_lib in '' ffi; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_ffi_call=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_ffi_call+set}" = set; then + break +fi +done +if test "${ac_cv_search_ffi_call+set}" = set; then + : +else + ac_cv_search_ffi_call=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_ffi_call" >&5 +echo "${ECHO_T}$ac_cv_search_ffi_call" >&6; } +ac_res=$ac_cv_search_ffi_call +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FFI_CALL 1 +_ACEOF + +else + { echo "$as_me:$LINENO: WARNING: libffi not found - disabling external calls from interpreter" >&5 +echo "$as_me: WARNING: libffi not found - disabling external calls from interpreter" >&2;} +fi + +fi + +{ echo "$as_me:$LINENO: checking for library containing mallinfo" >&5 +echo $ECHO_N "checking for library containing mallinfo... $ECHO_C" >&6; } +if test "${ac_cv_search_mallinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char mallinfo (); +int +main () +{ +return mallinfo (); + ; + return 0; +} +_ACEOF +for ac_lib in '' malloc; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_mallinfo=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_mallinfo+set}" = set; then + break +fi +done +if test "${ac_cv_search_mallinfo+set}" = set; then + : +else + ac_cv_search_mallinfo=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_mallinfo" >&5 +echo "${ECHO_T}$ac_cv_search_mallinfo" >&6; } +ac_res=$ac_cv_search_mallinfo +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MALLINFO 1 +_ACEOF + +fi + + +if test "$ENABLE_THREADS" -eq 1 ; then + +{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } +if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_mutex_init (); +int +main () +{ +return pthread_mutex_init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_pthread_pthread_mutex_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_pthread_pthread_mutex_init=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } +if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPTHREAD 1 +_ACEOF + + LIBS="-lpthread $LIBS" + +fi + + { echo "$as_me:$LINENO: checking for library containing pthread_mutex_lock" >&5 +echo $ECHO_N "checking for library containing pthread_mutex_lock... $ECHO_C" >&6; } +if test "${ac_cv_search_pthread_mutex_lock+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_mutex_lock (); +int +main () +{ +return pthread_mutex_lock (); + ; + return 0; +} +_ACEOF +for ac_lib in '' pthread; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_pthread_mutex_lock=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_pthread_mutex_lock+set}" = set; then + break +fi +done +if test "${ac_cv_search_pthread_mutex_lock+set}" = set; then + : +else + ac_cv_search_pthread_mutex_lock=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_pthread_mutex_lock" >&5 +echo "${ECHO_T}$ac_cv_search_pthread_mutex_lock" >&6; } +ac_res=$ac_cv_search_pthread_mutex_lock +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PTHREAD_MUTEX_LOCK 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for library containing pthread_rwlock_init" >&5 +echo $ECHO_N "checking for library containing pthread_rwlock_init... $ECHO_C" >&6; } +if test "${ac_cv_search_pthread_rwlock_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_rwlock_init (); +int +main () +{ +return pthread_rwlock_init (); + ; + return 0; +} +_ACEOF +for ac_lib in '' pthread; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_pthread_rwlock_init=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_pthread_rwlock_init+set}" = set; then + break +fi +done +if test "${ac_cv_search_pthread_rwlock_init+set}" = set; then + : +else + ac_cv_search_pthread_rwlock_init=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_pthread_rwlock_init" >&5 +echo "${ECHO_T}$ac_cv_search_pthread_rwlock_init" >&6; } +ac_res=$ac_cv_search_pthread_rwlock_init +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PTHREAD_RWLOCK_INIT 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for library containing pthread_getspecific" >&5 +echo $ECHO_N "checking for library containing pthread_getspecific... $ECHO_C" >&6; } +if test "${ac_cv_search_pthread_getspecific+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_getspecific (); +int +main () +{ +return pthread_getspecific (); + ; + return 0; +} +_ACEOF +for ac_lib in '' pthread; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_pthread_getspecific=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_pthread_getspecific+set}" = set; then + break +fi +done +if test "${ac_cv_search_pthread_getspecific+set}" = set; then + : +else + ac_cv_search_pthread_getspecific=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_pthread_getspecific" >&5 +echo "${ECHO_T}$ac_cv_search_pthread_getspecific" >&6; } +ac_res=$ac_cv_search_pthread_getspecific +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PTHREAD_GETSPECIFIC 1 +_ACEOF + +fi + +fi + + +# Check whether --with-udis86 was given. +if test "${with_udis86+set}" = set; then + withval=$with_udis86; + USE_UDIS86=1 + + case "$withval" in + /usr/lib|yes) ;; + *) LDFLAGS="$LDFLAGS -L${withval}" ;; + esac + +{ echo "$as_me:$LINENO: checking for ud_init in -ludis86" >&5 +echo $ECHO_N "checking for ud_init in -ludis86... $ECHO_C" >&6; } +if test "${ac_cv_lib_udis86_ud_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ludis86 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ud_init (); +int +main () +{ +return ud_init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_udis86_ud_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_udis86_ud_init=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_udis86_ud_init" >&5 +echo "${ECHO_T}$ac_cv_lib_udis86_ud_init" >&6; } +if test $ac_cv_lib_udis86_ud_init = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBUDIS86 1 +_ACEOF + + LIBS="-ludis86 $LIBS" + +else + + echo "Error! You need to have libudis86 around." + exit -1 + +fi + + +else + USE_UDIS86=0 + +fi + + +cat >>confdefs.h <<_ACEOF +#define USE_UDIS86 $USE_UDIS86 +_ACEOF + + + +# Check whether --with-oprofile was given. +if test "${with_oprofile+set}" = set; then + withval=$with_oprofile; + USE_OPROFILE=1 + + case "$withval" in + /usr|yes) llvm_cv_oppath=/usr/lib/oprofile ;; + no) llvm_cv_oppath= + USE_OPROFILE=0 + ;; + *) llvm_cv_oppath="${withval}/lib/oprofile" + CPPFLAGS="-I${withval}/include";; + esac + if test -n "$llvm_cv_oppath" ; then + LIBS="$LIBS -L${llvm_cv_oppath} -Wl,-rpath,${llvm_cv_oppath}" + { echo "$as_me:$LINENO: checking for library containing bfd_init" >&5 +echo $ECHO_N "checking for library containing bfd_init... $ECHO_C" >&6; } +if test "${ac_cv_search_bfd_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char bfd_init (); +int +main () +{ +return bfd_init (); + ; + return 0; +} +_ACEOF +for ac_lib in '' bfd; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_bfd_init=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_bfd_init+set}" = set; then + break +fi +done +if test "${ac_cv_search_bfd_init+set}" = set; then + : +else + ac_cv_search_bfd_init=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_bfd_init" >&5 +echo "${ECHO_T}$ac_cv_search_bfd_init" >&6; } +ac_res=$ac_cv_search_bfd_init +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + { echo "$as_me:$LINENO: checking for library containing op_open_agent" >&5 +echo $ECHO_N "checking for library containing op_open_agent... $ECHO_C" >&6; } +if test "${ac_cv_search_op_open_agent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char op_open_agent (); +int +main () +{ +return op_open_agent (); + ; + return 0; +} +_ACEOF +for ac_lib in '' opagent; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_op_open_agent=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_op_open_agent+set}" = set; then + break +fi +done +if test "${ac_cv_search_op_open_agent+set}" = set; then + : +else + ac_cv_search_op_open_agent=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_op_open_agent" >&5 +echo "${ECHO_T}$ac_cv_search_op_open_agent" >&6; } +ac_res=$ac_cv_search_op_open_agent +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + + echo "Error! You need to have libopagent around." + exit -1 + +fi + + if test "${ac_cv_header_opagent_h+set}" = set; then + { echo "$as_me:$LINENO: checking for opagent.h" >&5 +echo $ECHO_N "checking for opagent.h... $ECHO_C" >&6; } +if test "${ac_cv_header_opagent_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_opagent_h" >&5 +echo "${ECHO_T}$ac_cv_header_opagent_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking opagent.h usability" >&5 +echo $ECHO_N "checking opagent.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking opagent.h presence" >&5 +echo $ECHO_N "checking opagent.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: opagent.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: opagent.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: opagent.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: opagent.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: opagent.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: opagent.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: opagent.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: opagent.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: opagent.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: opagent.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: opagent.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: opagent.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: opagent.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: opagent.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: opagent.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: opagent.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for opagent.h" >&5 +echo $ECHO_N "checking for opagent.h... $ECHO_C" >&6; } +if test "${ac_cv_header_opagent_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_opagent_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_opagent_h" >&5 +echo "${ECHO_T}$ac_cv_header_opagent_h" >&6; } + +fi +if test $ac_cv_header_opagent_h = yes; then + : +else + + echo "Error! You need to have opagent.h around." + exit -1 + +fi + + + fi + +else + + USE_OPROFILE=0 + + +fi + + +cat >>confdefs.h <<_ACEOF +#define USE_OPROFILE $USE_OPROFILE +_ACEOF + + + + + + + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include <$ac_hdr> + +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + +{ echo "$as_me:$LINENO: checking for MAP_ANONYMOUS vs. MAP_ANON" >&5 +echo $ECHO_N "checking for MAP_ANONYMOUS vs. MAP_ANON... $ECHO_C" >&6; } +if test "${ac_cv_header_mmap_anon+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +int +main () +{ +mmap (0, 1, PROT_READ, MAP_ANONYMOUS, -1, 0); return (0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_mmap_anon=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_mmap_anon=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_mmap_anon" >&5 +echo "${ECHO_T}$ac_cv_header_mmap_anon" >&6; } +if test "$ac_cv_header_mmap_anon" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP_ANONYMOUS 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5 +echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6; } +if test "${ac_cv_header_stat_broken+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +#if defined S_ISBLK && defined S_IFDIR +# if S_ISBLK (S_IFDIR) +You lose. +# endif +#endif + +#if defined S_ISBLK && defined S_IFCHR +# if S_ISBLK (S_IFCHR) +You lose. +# endif +#endif + +#if defined S_ISLNK && defined S_IFREG +# if S_ISLNK (S_IFREG) +You lose. +# endif +#endif + +#if defined S_ISSOCK && defined S_IFREG +# if S_ISSOCK (S_IFREG) +You lose. +# endif +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "You lose" >/dev/null 2>&1; then + ac_cv_header_stat_broken=yes +else + ac_cv_header_stat_broken=no +fi +rm -f conftest* + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5 +echo "${ECHO_T}$ac_cv_header_stat_broken" >&6; } +if test $ac_cv_header_stat_broken = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STAT_MACROS_BROKEN 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } +if test "${ac_cv_header_sys_wait_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_sys_wait_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_sys_wait_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +if test $ac_cv_header_sys_wait_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_WAIT_H 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_time=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_time=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then + +cat >>confdefs.h <<\_ACEOF +#define TIME_WITH_SYS_TIME 1 +_ACEOF + +fi + + + + + + + + +for ac_header in dlfcn.h execinfo.h fcntl.h inttypes.h limits.h link.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + +for ac_header in malloc.h setjmp.h signal.h stdint.h termios.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in utime.h windows.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + +for ac_header in sys/mman.h sys/param.h sys/resource.h sys/time.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + +for ac_header in sys/types.h sys/ioctl.h malloc/malloc.h mach/mach.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +if test "$ENABLE_THREADS" -eq 1 ; then + +for ac_header in pthread.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + HAVE_PTHREAD=1 + +else + HAVE_PTHREAD=0 + +fi + +done + +else + HAVE_PTHREAD=0 + +fi + +if test "$llvm_cv_enable_libffi" = "yes" ; then + + +for ac_header in ffi.h ffi/ffi.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done fi -cat >>confdefs.h <<_ACEOF -#define USE_UDIS86 $USE_UDIS86 -_ACEOF + { echo "$as_me:$LINENO: checking for HUGE_VAL sanity" >&5 +echo $ECHO_N "checking for HUGE_VAL sanity... $ECHO_C" >&6; } +if test "${ac_cv_huge_val_sanity+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else -# Check whether --with-oprofile was given. -if test "${with_oprofile+set}" = set; then : - withval=$with_oprofile; - USE_OPROFILE=1 + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - case "$withval" in - /usr|yes) llvm_cv_oppath=/usr/lib/oprofile ;; - no) llvm_cv_oppath= - USE_OPROFILE=0 - ;; - *) llvm_cv_oppath="${withval}/lib/oprofile" - CPPFLAGS="-I${withval}/include";; - esac - if test -n "$llvm_cv_oppath" ; then - LIBS="$LIBS -L${llvm_cv_oppath} -Wl,-rpath,${llvm_cv_oppath}" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bfd_init" >&5 -$as_echo_n "checking for library containing bfd_init... " >&6; } -if test "${ac_cv_search_bfd_init+set}" = set; then : - $as_echo_n "(cached) " >&6 + CXXFLAGS=-pedantic + if test "$cross_compiling" = yes; then + ac_cv_huge_val_sanity=yes else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char bfd_init (); +#include int main () { -return bfd_init (); +double x = HUGE_VAL; return x != x; ; return 0; } _ACEOF -for ac_lib in '' bfd; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_bfd_init=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_bfd_init+set}" = set; then : - break -fi -done -if test "${ac_cv_search_bfd_init+set}" = set; then : - +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_huge_val_sanity=yes else - ac_cv_search_bfd_init=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_huge_val_sanity=no fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bfd_init" >&5 -$as_echo "$ac_cv_search_bfd_init" >&6; } -ac_res=$ac_cv_search_bfd_init -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + fi +{ echo "$as_me:$LINENO: result: $ac_cv_huge_val_sanity" >&5 +echo "${ECHO_T}$ac_cv_huge_val_sanity" >&6; } + HUGE_VAL_SANITY=$ac_cv_huge_val_sanity - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing op_open_agent" >&5 -$as_echo_n "checking for library containing op_open_agent... " >&6; } -if test "${ac_cv_search_op_open_agent+set}" = set; then : - $as_echo_n "(cached) " >&6 + +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +if test "${ac_cv_type_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char op_open_agent (); +$ac_includes_default +typedef pid_t ac__type_new_; int main () { -return op_open_agent (); +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } _ACEOF -for ac_lib in '' opagent; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_op_open_agent=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_op_open_agent+set}" = set; then : - break -fi -done -if test "${ac_cv_search_op_open_agent+set}" = set; then : - -else - ac_cv_search_op_open_agent=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_op_open_agent" >&5 -$as_echo "$ac_cv_search_op_open_agent" >&6; } -ac_res=$ac_cv_search_op_open_agent -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_pid_t=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - echo "Error! You need to have libopagent around." - exit -1 - + ac_cv_type_pid_t=no fi - ac_fn_c_check_header_mongrel "$LINENO" "opagent.h" "ac_cv_header_opagent_h" "$ac_includes_default" -if test "x$ac_cv_header_opagent_h" = x""yes; then : - -else - - echo "Error! You need to have opagent.h around." - exit -1 - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - - - fi - +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +if test $ac_cv_type_pid_t = yes; then + : else - USE_OPROFILE=0 - - -fi - - cat >>confdefs.h <<_ACEOF -#define USE_OPROFILE $USE_OPROFILE +#define pid_t int _ACEOF +fi - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include <$ac_hdr> - +$ac_includes_default +typedef size_t ac__type_new_; int main () { -if ((DIR *) 0) -return 0; +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_ac_Header=yes" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_size_t=yes else - eval "$as_ac_Header=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_size_t=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -eval ac_res=\$$as_ac_Header - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int _ACEOF -ac_header_dirent=$ac_hdr; break fi -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE void +_ACEOF + +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } +if test "${ac_cv_struct_tm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include +#include -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); int main () { -return opendir (); +struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF -for ac_lib in '' dir; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : - +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_struct_tm=time.h else - ac_cv_search_opendir=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_struct_tm=sys/time.h fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then + +cat >>confdefs.h <<\_ACEOF +#define TM_IN_SYS_TIME 1 +_ACEOF fi +{ echo "$as_me:$LINENO: checking for int64_t" >&5 +echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; } +if test "${ac_cv_type_int64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); +$ac_includes_default +typedef int64_t ac__type_new_; int main () { -return opendir (); +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } _ACEOF -for ac_lib in '' x; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : - +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_int64_t=yes else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_int64_t=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5 +echo "${ECHO_T}$ac_cv_type_int64_t" >&6; } +if test $ac_cv_type_int64_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INT64_T 1 +_ACEOF + -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS vs. MAP_ANON" >&5 -$as_echo_n "checking for MAP_ANONYMOUS vs. MAP_ANON... " >&6; } -if test "${ac_cv_header_mmap_anon+set}" = set; then : - $as_echo_n "(cached) " >&6 else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + { { echo "$as_me:$LINENO: error: Type int64_t required but not found" >&5 +echo "$as_me: error: Type int64_t required but not found" >&2;} + { (exit 1); exit 1; }; } +fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ echo "$as_me:$LINENO: checking for uint64_t" >&5 +echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; } +if test "${ac_cv_type_uint64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -#include +$ac_includes_default +typedef uint64_t ac__type_new_; int main () { -mmap (0, 1, PROT_READ, MAP_ANONYMOUS, -1, 0); return (0); +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_mmap_anon=yes +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_uint64_t=yes else - ac_cv_header_mmap_anon=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_uint64_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_mmap_anon" >&5 -$as_echo "$ac_cv_header_mmap_anon" >&6; } -if test "$ac_cv_header_mmap_anon" = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5 +echo "${ECHO_T}$ac_cv_type_uint64_t" >&6; } +if test $ac_cv_type_uint64_t = yes; then -$as_echo "#define HAVE_MMAP_ANONYMOUS 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_UINT64_T 1 +_ACEOF -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 -$as_echo_n "checking whether stat file-mode macros are broken... " >&6; } -if test "${ac_cv_header_stat_broken+set}" = set; then : - $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { echo "$as_me:$LINENO: checking for u_int64_t" >&5 +echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6; } +if test "${ac_cv_type_u_int64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include +$ac_includes_default +typedef u_int64_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_u_int64_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -#if defined S_ISBLK && defined S_IFDIR -extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; -#endif + ac_cv_type_u_int64_t=no +fi -#if defined S_ISBLK && defined S_IFCHR -extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; -#endif +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5 +echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6; } +if test $ac_cv_type_u_int64_t = yes; then -#if defined S_ISLNK && defined S_IFREG -extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; -#endif +cat >>confdefs.h <<_ACEOF +#define HAVE_U_INT64_T 1 +_ACEOF -#if defined S_ISSOCK && defined S_IFREG -extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; -#endif -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stat_broken=no else - ac_cv_header_stat_broken=yes + { { echo "$as_me:$LINENO: error: Type uint64_t or u_int64_t required but not found" >&5 +echo "$as_me: error: Type uint64_t or u_int64_t required but not found" >&2;} + { (exit 1); exit 1; }; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 -$as_echo "$ac_cv_header_stat_broken" >&6; } -if test $ac_cv_header_stat_broken = yes; then -$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 + + + + + + + +for ac_func in backtrace ceilf floorf roundf rintf nearbyintf getcwd +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -#include -#include +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif int main () { - +return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + eval "$as_ac_var=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : -else - ac_cv_header_stdc=no fi -rm -f conftest* +done + -fi -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : +for ac_func in powf fmodf strtof round +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_stdc=no -fi -rm -f conftest* + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif -fi +#undef $ac_func -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me #endif -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; +return $ac_func (); + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then +done + + + -$as_echo "#define STDC_HEADERS 1" >>confdefs.h -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 -$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then : - $as_echo_n "(cached) " >&6 +for ac_func in getpagesize getrusage getrlimit setrlimit gettimeofday +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -#ifndef WEXITSTATUS -# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include #endif -#ifndef WIFEXITED -# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me #endif int main () { - int s; - wait (&s); - s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; +return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_sys_wait_h=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - ac_cv_header_sys_wait_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 -$as_echo "$ac_cv_header_sys_wait_h" >&6; } -if test $ac_cv_header_sys_wait_h = yes; then -$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi +done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : - $as_echo_n "(cached) " >&6 + + + +for ac_func in isatty mkdtemp mkstemp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -#include +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif int main () { -if ((struct tm *) 0) -return 0; +return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi - -for ac_header in dlfcn.h execinfo.h fcntl.h inttypes.h limits.h link.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi - done -for ac_header in malloc.h setjmp.h signal.h stdint.h termios.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi -done -for ac_header in utime.h windows.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi -done -for ac_header in sys/mman.h sys/param.h sys/resource.h sys/time.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +for ac_func in mktemp realpath sbrk setrlimit strdup +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -fi - -done +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -for ac_header in sys/types.h sys/ioctl.h malloc/malloc.h mach/mach.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +#ifdef __STDC__ +# include +#else +# include +#endif -fi +#undef $ac_func -done +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif -if test "$ENABLE_THREADS" -eq 1 ; then - for ac_header in pthread.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_H 1 +int +main () +{ +return $ac_func (); + ; + return 0; +} _ACEOF - HAVE_PTHREAD=1 - +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - HAVE_PTHREAD=0 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -done - -else - HAVE_PTHREAD=0 - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - -if test "$llvm_cv_enable_libffi" = "yes" ; then - for ac_header in ffi.h ffi/ffi.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi - done -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HUGE_VAL sanity" >&5 -$as_echo_n "checking for HUGE_VAL sanity... " >&6; } -if test "${ac_cv_huge_val_sanity+set}" = set; then : - $as_echo_n "(cached) " >&6 +for ac_func in strerror strerror_r strerror_s setenv +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif - CXXFLAGS=-pedantic - if test "$cross_compiling" = yes; then : - ac_cv_huge_val_sanity=yes -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include int main () { -double x = HUGE_VAL; return x != x; +return $ac_func (); ; return 0; } _ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - ac_cv_huge_val_sanity=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - ac_cv_huge_val_sanity=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_huge_val_sanity" >&5 -$as_echo "$ac_cv_huge_val_sanity" >&6; } - HUGE_VAL_SANITY=$ac_cv_huge_val_sanity +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : +fi +done -else -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF -fi -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : +for ac_func in strtoll strtoq sysconf malloc_zone_statistics +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -fi +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE void -_ACEOF +#undef $ac_func -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 -$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif int main () { -struct tm tm; - int *p = &tm.tm_sec; - return !p; +return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_struct_tm=time.h -else - ac_cv_struct_tm=sys/time.h -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 -$as_echo "$ac_cv_struct_tm" >&6; } -if test $ac_cv_struct_tm = sys/time.h; then - -$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default" -if test "x$ac_cv_type_int64_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_INT64_T 1 -_ACEOF - - -else - as_fn_error "Type int64_t required but not found" "$LINENO" 5 -fi - -ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default" -if test "x$ac_cv_type_uint64_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_UINT64_T 1 -_ACEOF - - +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "$ac_includes_default" -if test "x$ac_cv_type_u_int64_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_U_INT64_T 1 -_ACEOF - + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -else - as_fn_error "Type uint64_t or u_int64_t required but not found" "$LINENO" 5 + eval "$as_ac_var=no" fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - - - -for ac_func in backtrace ceilf floorf roundf rintf nearbyintf getcwd -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -for ac_func in powf fmodf strtof round -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF -fi -done -for ac_func in getpagesize getrusage getrlimit setrlimit gettimeofday -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF -fi -done -for ac_func in isatty mkdtemp mkstemp -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +for ac_func in setjmp longjmp sigsetjmp siglongjmp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func -fi -done - -for ac_func in mktemp realpath sbrk setrlimit strdup -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -fi -done +#ifdef __STDC__ +# include +#else +# include +#endif -for ac_func in strerror strerror_r strerror_s setenv -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +#undef $ac_func -fi -done +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif -for ac_func in strtoll strtoq sysconf malloc_zone_statistics -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +int +main () +{ +return $ac_func (); + ; + return 0; +} _ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -done -for ac_func in setjmp longjmp sigsetjmp siglongjmp -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if printf has the %a format character" >&5 -$as_echo_n "checking if printf has the %a format character... " >&6; } -if test "${llvm_cv_c_printf_a+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking if printf has the %a format character" >&5 +echo $ECHO_N "checking if printf has the %a format character... $ECHO_C" >&6; } +if test "${llvm_cv_c_printf_a+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -11615,12 +17886,16 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then llvmac_cv_c_printf_a=no else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #include @@ -11644,15 +17919,39 @@ return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then llvm_cv_c_printf_a=yes else - llvmac_cv_c_printf_a=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +llvmac_cv_c_printf_a=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -11660,19 +17959,21 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $llvm_cv_c_printf_a" >&5 -$as_echo "$llvm_cv_c_printf_a" >&6; } +{ echo "$as_me:$LINENO: result: $llvm_cv_c_printf_a" >&5 +echo "${ECHO_T}$llvm_cv_c_printf_a" >&6; } if test "$llvm_cv_c_printf_a" = "yes"; then -$as_echo "#define HAVE_PRINTF_A 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_PRINTF_A 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for srand48/lrand48/drand48 in " >&5 -$as_echo_n "checking for srand48/lrand48/drand48 in ... " >&6; } -if test "${ac_cv_func_rand48+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for srand48/lrand48/drand48 in " >&5 +echo $ECHO_N "checking for srand48/lrand48/drand48 in ... $ECHO_C" >&6; } +if test "${ac_cv_func_rand48+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -11680,7 +17981,11 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int @@ -11691,11 +17996,48 @@ return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_rand48=yes else - ac_cv_func_rand48=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_rand48=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -11704,21 +18046,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_rand48" >&5 -$as_echo "$ac_cv_func_rand48" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_func_rand48" >&5 +echo "${ECHO_T}$ac_cv_func_rand48" >&6; } if test "$ac_cv_func_rand48" = "yes" ; then -$as_echo "#define HAVE_RAND48 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_RAND48 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isnan in " >&5 -$as_echo_n "checking for isnan in ... " >&6; } -if test "${ac_cv_func_isnan_in_math_h+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for isnan in " >&5 +echo $ECHO_N "checking for isnan in ... $ECHO_C" >&6; } +if test "${ac_cv_func_isnan_in_math_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -11726,7 +18070,11 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int @@ -11737,11 +18085,48 @@ return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_isnan_in_math_h=yes else - ac_cv_func_isnan_in_math_h=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_isnan_in_math_h=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -11750,20 +18135,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isnan_in_math_h" >&5 -$as_echo "$ac_cv_func_isnan_in_math_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_func_isnan_in_math_h" >&5 +echo "${ECHO_T}$ac_cv_func_isnan_in_math_h" >&6; } if test "$ac_cv_func_isnan_in_math_h" = "yes" ; then -$as_echo "#define HAVE_ISNAN_IN_MATH_H 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISNAN_IN_MATH_H 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isnan in " >&5 -$as_echo_n "checking for isnan in ... " >&6; } -if test "${ac_cv_func_isnan_in_cmath+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for isnan in " >&5 +echo $ECHO_N "checking for isnan in ... $ECHO_C" >&6; } +if test "${ac_cv_func_isnan_in_cmath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -11771,7 +18158,11 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int @@ -11782,11 +18173,48 @@ return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_isnan_in_cmath=yes else - ac_cv_func_isnan_in_cmath=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_isnan_in_cmath=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -11795,19 +18223,21 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isnan_in_cmath" >&5 -$as_echo "$ac_cv_func_isnan_in_cmath" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_func_isnan_in_cmath" >&5 +echo "${ECHO_T}$ac_cv_func_isnan_in_cmath" >&6; } if test "$ac_cv_func_isnan_in_cmath" = "yes" ; then -$as_echo "#define HAVE_ISNAN_IN_CMATH 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISNAN_IN_CMATH 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::isnan in " >&5 -$as_echo_n "checking for std::isnan in ... " >&6; } -if test "${ac_cv_func_std_isnan_in_cmath+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for std::isnan in " >&5 +echo $ECHO_N "checking for std::isnan in ... $ECHO_C" >&6; } +if test "${ac_cv_func_std_isnan_in_cmath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -11815,7 +18245,11 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int @@ -11826,11 +18260,48 @@ return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_std_isnan_in_cmath=yes else - ac_cv_func_std_isnan_in_cmath=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_std_isnan_in_cmath=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -11839,20 +18310,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_std_isnan_in_cmath" >&5 -$as_echo "$ac_cv_func_std_isnan_in_cmath" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_func_std_isnan_in_cmath" >&5 +echo "${ECHO_T}$ac_cv_func_std_isnan_in_cmath" >&6; } if test "$ac_cv_func_std_isnan_in_cmath" = "yes" ; then -$as_echo "#define HAVE_STD_ISNAN_IN_CMATH 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_STD_ISNAN_IN_CMATH 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf in " >&5 -$as_echo_n "checking for isinf in ... " >&6; } -if test "${ac_cv_func_isinf_in_math_h+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for isinf in " >&5 +echo $ECHO_N "checking for isinf in ... $ECHO_C" >&6; } +if test "${ac_cv_func_isinf_in_math_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -11860,7 +18333,11 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int @@ -11871,11 +18348,48 @@ return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_isinf_in_math_h=yes else - ac_cv_func_isinf_in_math_h=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_isinf_in_math_h=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -11884,19 +18398,21 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf_in_math_h" >&5 -$as_echo "$ac_cv_func_isinf_in_math_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_func_isinf_in_math_h" >&5 +echo "${ECHO_T}$ac_cv_func_isinf_in_math_h" >&6; } if test "$ac_cv_func_isinf_in_math_h" = "yes" ; then -$as_echo "#define HAVE_ISINF_IN_MATH_H 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISINF_IN_MATH_H 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf in " >&5 -$as_echo_n "checking for isinf in ... " >&6; } -if test "${ac_cv_func_isinf_in_cmath+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for isinf in " >&5 +echo $ECHO_N "checking for isinf in ... $ECHO_C" >&6; } +if test "${ac_cv_func_isinf_in_cmath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -11904,7 +18420,11 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int @@ -11915,11 +18435,48 @@ return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_isinf_in_cmath=yes else - ac_cv_func_isinf_in_cmath=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_isinf_in_cmath=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -11928,19 +18485,21 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf_in_cmath" >&5 -$as_echo "$ac_cv_func_isinf_in_cmath" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_func_isinf_in_cmath" >&5 +echo "${ECHO_T}$ac_cv_func_isinf_in_cmath" >&6; } if test "$ac_cv_func_isinf_in_cmath" = "yes" ; then -$as_echo "#define HAVE_ISINF_IN_CMATH 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISINF_IN_CMATH 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::isinf in " >&5 -$as_echo_n "checking for std::isinf in ... " >&6; } -if test "${ac_cv_func_std_isinf_in_cmath+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for std::isinf in " >&5 +echo $ECHO_N "checking for std::isinf in ... $ECHO_C" >&6; } +if test "${ac_cv_func_std_isinf_in_cmath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -11948,7 +18507,11 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int @@ -11959,11 +18522,48 @@ return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_std_isinf_in_cmath=yes else - ac_cv_func_std_isinf_in_cmath=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_std_isinf_in_cmath=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -11972,19 +18572,21 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_std_isinf_in_cmath" >&5 -$as_echo "$ac_cv_func_std_isinf_in_cmath" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_func_std_isinf_in_cmath" >&5 +echo "${ECHO_T}$ac_cv_func_std_isinf_in_cmath" >&6; } if test "$ac_cv_func_std_isinf_in_cmath" = "yes" ; then -$as_echo "#define HAVE_STD_ISINF_IN_CMATH 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_STD_ISINF_IN_CMATH 1 +_ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for finite in " >&5 -$as_echo_n "checking for finite in ... " >&6; } -if test "${ac_cv_func_finite_in_ieeefp_h+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for finite in " >&5 +echo $ECHO_N "checking for finite in ... $ECHO_C" >&6; } +if test "${ac_cv_func_finite_in_ieeefp_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -11992,7 +18594,11 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int @@ -12003,11 +18609,48 @@ return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_finite_in_ieeefp_h=yes else - ac_cv_func_finite_in_ieeefp_h=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_finite_in_ieeefp_h=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -12016,12 +18659,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_finite_in_ieeefp_h" >&5 -$as_echo "$ac_cv_func_finite_in_ieeefp_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_func_finite_in_ieeefp_h" >&5 +echo "${ECHO_T}$ac_cv_func_finite_in_ieeefp_h" >&6; } if test "$ac_cv_func_finite_in_ieeefp_h" = "yes" ; then -$as_echo "#define HAVE_FINITE_IN_IEEEFP_H 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_FINITE_IN_IEEEFP_H 1 +_ACEOF fi @@ -12030,16 +18675,168 @@ if test "$llvm_cv_platform_type" = "Unix" ; then +for ac_header in stdlib.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } - for ac_header in $ac_header_list -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs at cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -12047,32 +18844,128 @@ done +for ac_func in getpagesize +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +#undef $ac_func +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" +fi -for ac_func in getpagesize -do : - ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = x""yes; then : +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_GETPAGESIZE 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 -$as_echo_n "checking for working mmap... " >&6; } -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for working mmap" >&5 +echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; } +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ @@ -12103,16 +18996,21 @@ #include #include -#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H +#if !STDC_HEADERS && !HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE +#if !HAVE_GETPAGESIZE +/* Assume that all systems that can run configure have sys/param.h. */ +# if !HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H +# if HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE @@ -12143,9 +19041,8 @@ main () { char *data, *data2, *data3; - const char *cdata2; int i, pagesize; - int fd, fd2; + int fd; pagesize = getpagesize (); @@ -12158,41 +19055,27 @@ umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) - return 2; + return 1; if (write (fd, data, pagesize) != pagesize) - return 3; + return 1; close (fd); - /* Next, check that the tail of a page is zero-filled. File must have - non-zero length, otherwise we risk SIGBUS for entire page. */ - fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); - if (fd2 < 0) - return 4; - cdata2 = ""; - if (write (fd2, cdata2, 1) != 1) - return 5; - data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); - if (data2 == MAP_FAILED) - return 6; - for (i = 0; i < pagesize; ++i) - if (*(data2 + i)) - return 7; - close (fd2); - if (munmap (data2, pagesize)) - return 8; - /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) - return 9; + return 1; + data2 = (char *) malloc (2 * pagesize); + if (!data2) + return 1; + data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) - return 10; + return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) - return 11; + return 1; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on @@ -12201,39 +19084,65 @@ *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) - return 12; + return 1; if (read (fd, data3, pagesize) != pagesize) - return 13; + return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) - return 14; + return 1; close (fd); return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_mmap_fixed_mapped=yes else - ac_cv_func_mmap_fixed_mapped=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_mmap_fixed_mapped=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 -$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then -$as_echo "#define HAVE_MMAP 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP 1 +_ACEOF fi -rm -f conftest.mmap conftest.txt +rm -f conftest.mmap - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mmap of files" >&5 -$as_echo_n "checking for mmap of files... " >&6; } -if test "${ac_cv_func_mmap_file+set}" = set; then : - $as_echo_n "(cached) " >&6 + { echo "$as_me:$LINENO: checking for mmap of files" >&5 +echo $ECHO_N "checking for mmap of files... $ECHO_C" >&6; } +if test "${ac_cv_func_mmap_file+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -12241,12 +19150,16 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then ac_cv_func_mmap_file=no else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #include @@ -12265,15 +19178,39 @@ return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_mmap_file=yes else - ac_cv_func_mmap_file=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_mmap_file=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -12282,20 +19219,22 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_file" >&5 -$as_echo "$ac_cv_func_mmap_file" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_file" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_file" >&6; } if test "$ac_cv_func_mmap_file" = yes; then -$as_echo "#define HAVE_MMAP_FILE /**/" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP_FILE +_ACEOF MMAP_FILE=yes fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if /dev/zero is needed for mmap" >&5 -$as_echo_n "checking if /dev/zero is needed for mmap... " >&6; } -if test "${ac_cv_need_dev_zero_for_mmap+set}" = set; then : - $as_echo_n "(cached) " >&6 + { echo "$as_me:$LINENO: checking if /dev/zero is needed for mmap" >&5 +echo $ECHO_N "checking if /dev/zero is needed for mmap... $ECHO_C" >&6; } +if test "${ac_cv_need_dev_zero_for_mmap+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$llvm_cv_os_type" = "Interix" ; then ac_cv_need_dev_zero_for_mmap=yes @@ -12304,29 +19243,35 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_need_dev_zero_for_mmap" >&5 -$as_echo "$ac_cv_need_dev_zero_for_mmap" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_need_dev_zero_for_mmap" >&5 +echo "${ECHO_T}$ac_cv_need_dev_zero_for_mmap" >&6; } if test "$ac_cv_need_dev_zero_for_mmap" = yes; then -$as_echo "#define NEED_DEV_ZERO_FOR_MMAP 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define NEED_DEV_ZERO_FOR_MMAP 1 +_ACEOF fi if test "$ac_cv_func_mmap_fixed_mapped" = "no" then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mmap() of a fixed address required but not supported" >&5 -$as_echo "$as_me: WARNING: mmap() of a fixed address required but not supported" >&2;} + { echo "$as_me:$LINENO: WARNING: mmap() of a fixed address required but not supported" >&5 +echo "$as_me: WARNING: mmap() of a fixed address required but not supported" >&2;} fi if test "$ac_cv_func_mmap_file" = "no" then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mmap() of files required but not found" >&5 -$as_echo "$as_me: WARNING: mmap() of files required but not found" >&2;} + { echo "$as_me:$LINENO: WARNING: mmap() of files required but not found" >&5 +echo "$as_me: WARNING: mmap() of files required but not found" >&2;} fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC atomic builtins" >&5 -$as_echo_n "checking for GCC atomic builtins... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ echo "$as_me:$LINENO: checking for GCC atomic builtins" >&5 +echo $ECHO_N "checking for GCC atomic builtins... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main() { volatile unsigned long val = 1; @@ -12338,31 +19283,72 @@ } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } -$as_echo "#define LLVM_MULTITHREADED 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define LLVM_MULTITHREADED 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define LLVM_MULTITHREADED 0" >>confdefs.h + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: LLVM will be built thread-unsafe because atomic builtins are missing" >&5 -$as_echo "$as_me: WARNING: LLVM will be built thread-unsafe because atomic builtins are missing" >&2;} +cat >>confdefs.h <<\_ACEOF +#define LLVM_MULTITHREADED 0 +_ACEOF + + { echo "$as_me:$LINENO: WARNING: LLVM will be built thread-unsafe because atomic builtins are missing" >&5 +echo "$as_me: WARNING: LLVM will be built thread-unsafe because atomic builtins are missing" >&2;} fi + rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext if test "$llvm_cv_os_type" = "Linux" -a "$llvm_cv_target_arch" = "x86_64" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit userspace on 64-bit system" >&5 -$as_echo_n "checking for 32-bit userspace on 64-bit system... " >&6; } -if test "${llvm_cv_linux_mixed+set}" = set; then : - $as_echo_n "(cached) " >&6 + { echo "$as_me:$LINENO: checking for 32-bit userspace on 64-bit system" >&5 +echo $ECHO_N "checking for 32-bit userspace on 64-bit system... $ECHO_C" >&6; } +if test "${llvm_cv_linux_mixed+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -12370,7 +19356,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __x86_64__ error: Not x86-64 even if uname says so! @@ -12384,11 +19374,48 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then llvm_cv_linux_mixed=no else - llvm_cv_linux_mixed=yes + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + llvm_cv_linux_mixed=yes fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -12398,8 +19425,8 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $llvm_cv_linux_mixed" >&5 -$as_echo "$llvm_cv_linux_mixed" >&6; } +{ echo "$as_me:$LINENO: result: $llvm_cv_linux_mixed" >&5 +echo "${ECHO_T}$llvm_cv_linux_mixed" >&6; } if test "$llvm_cv_linux_mixed" = "yes"; then llvm_cv_target_arch="x86" @@ -12407,22 +19434,121 @@ fi fi + for ac_func in __dso_handle -do : - ac_fn_c_check_func "$LINENO" "__dso_handle" "ac_cv_func___dso_handle" -if test "x$ac_cv_func___dso_handle" = x""yes; then : +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE___DSO_HANDLE 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether llvm-gcc is sane" >&5 -$as_echo_n "checking whether llvm-gcc is sane... " >&6; } -if test "${llvm_cv_llvmgcc_sanity+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking whether llvm-gcc is sane" >&5 +echo $ECHO_N "checking whether llvm-gcc is sane... $ECHO_C" >&6; } +if test "${llvm_cv_llvmgcc_sanity+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else llvm_cv_llvmgcc_sanity="no" if test -x "$LLVMGCC" ; then @@ -12435,12 +19561,12 @@ rm conftest.c fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $llvm_cv_llvmgcc_sanity" >&5 -$as_echo "$llvm_cv_llvmgcc_sanity" >&6; } +{ echo "$as_me:$LINENO: result: $llvm_cv_llvmgcc_sanity" >&5 +echo "${ECHO_T}$llvm_cv_llvmgcc_sanity" >&6; } if test "$llvm_cv_llvmgcc_sanity" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking llvm-gcc component support" >&5 -$as_echo_n "checking llvm-gcc component support... " >&6; } + { echo "$as_me:$LINENO: checking llvm-gcc component support" >&5 +echo $ECHO_N "checking llvm-gcc component support... $ECHO_C" >&6; } llvmcc1path=`"$LLVMGCC" --print-prog-name=cc1` LLVMCC1=$llvmcc1path @@ -12462,8 +19588,8 @@ llvmgcclangs=`"$LLVMGCC" -v --help 2>&1 | grep '^Configured with:' | sed 's/^.*--enable-languages=\([^ ]*\).*/\1/'` LLVMGCC_LANGS=$llvmgcclangs - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } fi SHLIBEXT=$libltdl_cv_shlibext @@ -12575,18 +19701,18 @@ case "$a_binding" in ocaml) if test "x$OCAMLC" = x ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-bindings=ocaml specified, but ocamlc not found. Try configure OCAMLC=/path/to/ocamlc" >&5 -$as_echo "$as_me: WARNING: --enable-bindings=ocaml specified, but ocamlc not found. Try configure OCAMLC=/path/to/ocamlc" >&2;} + { echo "$as_me:$LINENO: WARNING: --enable-bindings=ocaml specified, but ocamlc not found. Try configure OCAMLC=/path/to/ocamlc" >&5 +echo "$as_me: WARNING: --enable-bindings=ocaml specified, but ocamlc not found. Try configure OCAMLC=/path/to/ocamlc" >&2;} binding_prereqs_failed=1 fi if test "x$OCAMLDEP" = x ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-bindings=ocaml specified, but ocamldep not found. Try configure OCAMLDEP=/path/to/ocamldep" >&5 -$as_echo "$as_me: WARNING: --enable-bindings=ocaml specified, but ocamldep not found. Try configure OCAMLDEP=/path/to/ocamldep" >&2;} + { echo "$as_me:$LINENO: WARNING: --enable-bindings=ocaml specified, but ocamldep not found. Try configure OCAMLDEP=/path/to/ocamldep" >&5 +echo "$as_me: WARNING: --enable-bindings=ocaml specified, but ocamldep not found. Try configure OCAMLDEP=/path/to/ocamldep" >&2;} binding_prereqs_failed=1 fi if test "x$OCAMLOPT" = x ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-bindings=ocaml specified, but ocamlopt not found. Try configure OCAMLOPT=/path/to/ocamlopt" >&5 -$as_echo "$as_me: WARNING: --enable-bindings=ocaml specified, but ocamlopt not found. Try configure OCAMLOPT=/path/to/ocamlopt" >&2;} + { echo "$as_me:$LINENO: WARNING: --enable-bindings=ocaml specified, but ocamlopt not found. Try configure OCAMLOPT=/path/to/ocamlopt" >&5 +echo "$as_me: WARNING: --enable-bindings=ocaml specified, but ocamlopt not found. Try configure OCAMLOPT=/path/to/ocamlopt" >&2;} fi if test "x$with_ocaml_libdir" != xauto ; then OCAML_LIBDIR=$with_ocaml_libdir @@ -12608,13 +19734,15 @@ esac done if test "$binding_prereqs_failed" = 1 ; then - as_fn_error "Prequisites for bindings not satisfied. Fix them or use configure --disable-bindings." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: Prequisites for bindings not satisfied. Fix them or use configure --disable-bindings." >&5 +echo "$as_me: error: Prequisites for bindings not satisfied. Fix them or use configure --disable-bindings." >&2;} + { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler -fvisibility-inlines-hidden option" >&5 -$as_echo_n "checking for compiler -fvisibility-inlines-hidden option... " >&6; } -if test "${llvm_cv_cxx_visibility_inlines_hidden+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ echo "$as_me:$LINENO: checking for compiler -fvisibility-inlines-hidden option" >&5 +echo $ECHO_N "checking for compiler -fvisibility-inlines-hidden option... $ECHO_C" >&6; } +if test "${llvm_cv_cxx_visibility_inlines_hidden+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -12624,7 +19752,11 @@ oldcxxflags="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -12635,11 +19767,48 @@ return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then llvm_cv_cxx_visibility_inlines_hidden=yes else - llvm_cv_cxx_visibility_inlines_hidden=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + llvm_cv_cxx_visibility_inlines_hidden=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS="$oldcxxflags" ac_ext=c @@ -12650,8 +19819,8 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $llvm_cv_cxx_visibility_inlines_hidden" >&5 -$as_echo "$llvm_cv_cxx_visibility_inlines_hidden" >&6; } +{ echo "$as_me:$LINENO: result: $llvm_cv_cxx_visibility_inlines_hidden" >&5 +echo "${ECHO_T}$llvm_cv_cxx_visibility_inlines_hidden" >&6; } if test "$llvm_cv_cxx_visibility_inlines_hidden" = yes ; then ENABLE_VISIBILITY_INLINES_HIDDEN=1 @@ -12773,13 +19942,12 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; + *) $as_unset $ac_var ;; esac ;; esac done @@ -12787,8 +19955,8 @@ (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -12811,12 +19979,12 @@ if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -12832,35 +20000,38 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs - if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then - as_fn_error "conditional \"INSTALL_LTDL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: conditional \"INSTALL_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"INSTALL_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then - as_fn_error "conditional \"CONVENIENCE_LTDL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: conditional \"CONVENIENCE_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CONVENIENCE_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} -ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -12870,79 +20041,55 @@ debug=false ac_cs_recheck=false ac_cs_silent=false - SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## +_ACEOF -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false fi @@ -12951,18 +20098,20 @@ # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) +as_nl=' +' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( +case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done IFS=$as_save_IFS ;; @@ -12973,111 +20122,32 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done +# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -13091,17 +20161,13 @@ as_basename=false fi -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -13116,130 +20182,122 @@ } s/.*/./; q'` -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( +case `echo -n x` in -n*) - case `echo 'xy\c'` in + case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; + *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + mkdir conf$$.dir fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' + as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' + as_executable_p=: fi -as_executable_p=$as_test_x +rm -f conf$$.file # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -13249,19 +20307,13 @@ exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by llvm $as_me 2.7svn, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -13274,16 +20326,7 @@ _ACEOF -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" @@ -13291,25 +20334,22 @@ _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. +\`$as_me' instantiates files from templates according to the +current configuration. -Usage: $0 [OPTION]... [TAG]... +Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages + -V, --version print version number, then exit + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -13320,28 +20360,27 @@ Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ llvm config.status 2.7svn -configured by $0, generated by GNU Autoconf 2.65, - with options \\"\$ac_cs_config\\" +configured by $0, generated by GNU Autoconf 2.60, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' -test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do @@ -13363,40 +20402,34 @@ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" + CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; - *) as_fn_append ac_config_targets " $1" + *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac @@ -13411,29 +20444,27 @@ fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL export CONFIG_SHELL - exec "\$@" + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # @@ -13441,7 +20472,7 @@ _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets @@ -13473,7 +20504,9 @@ "bindings/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS bindings/Makefile" ;; "bindings/ocaml/Makefile.ocaml") CONFIG_COMMANDS="$CONFIG_COMMANDS bindings/ocaml/Makefile.ocaml" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; esac done @@ -13500,7 +20533,7 @@ trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 - trap 'as_fn_exit 1' 1 2 13 15 + trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. @@ -13511,140 +20544,293 @@ { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} +# +# Set up the sed scripts for CONFIG_FILES section. +# -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' -else - ac_cs_awk_cr=$ac_cr -fi +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then -echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +LLVM_COPYRIGHT!$LLVM_COPYRIGHT$ac_delim +subdirs!$subdirs$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +target!$target$ac_delim +target_cpu!$target_cpu$ac_delim +target_vendor!$target_vendor$ac_delim +target_os!$target_os$ac_delim +OS!$OS$ac_delim +HOST_OS!$HOST_OS$ac_delim +TARGET_OS!$TARGET_OS$ac_delim +LINKALL!$LINKALL$ac_delim +NOLINKALL!$NOLINKALL$ac_delim +LLVM_ON_UNIX!$LLVM_ON_UNIX$ac_delim +LLVM_ON_WIN32!$LLVM_ON_WIN32$ac_delim +ARCH!$ARCH$ac_delim +ENDIAN!$ENDIAN$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +LLVM_CROSS_COMPILING!$LLVM_CROSS_COMPILING$ac_delim +BUILD_CC!$BUILD_CC$ac_delim +BUILD_EXEEXT!$BUILD_EXEEXT$ac_delim +BUILD_CXX!$BUILD_CXX$ac_delim +CVSBUILD!$CVSBUILD$ac_delim +ENABLE_OPTIMIZED!$ENABLE_OPTIMIZED$ac_delim +ENABLE_PROFILING!$ENABLE_PROFILING$ac_delim +DISABLE_ASSERTIONS!$DISABLE_ASSERTIONS$ac_delim +ENABLE_EXPENSIVE_CHECKS!$ENABLE_EXPENSIVE_CHECKS$ac_delim +EXPENSIVE_CHECKS!$EXPENSIVE_CHECKS$ac_delim +DEBUG_RUNTIME!$DEBUG_RUNTIME$ac_delim +DEBUG_SYMBOLS!$DEBUG_SYMBOLS$ac_delim +JIT!$JIT$ac_delim +TARGET_HAS_JIT!$TARGET_HAS_JIT$ac_delim +ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim +ENABLE_THREADS!$ENABLE_THREADS$ac_delim +ENABLE_PIC!$ENABLE_PIC$ac_delim +TARGETS_TO_BUILD!$TARGETS_TO_BUILD$ac_delim +LLVM_ENUM_TARGETS!$LLVM_ENUM_TARGETS$ac_delim +LLVM_ENUM_ASM_PRINTERS!$LLVM_ENUM_ASM_PRINTERS$ac_delim +LLVM_ENUM_ASM_PARSERS!$LLVM_ENUM_ASM_PARSERS$ac_delim +LLVM_ENUM_DISASSEMBLERS!$LLVM_ENUM_DISASSEMBLERS$ac_delim +ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$ac_delim +OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim +EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim +BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim +ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim +_ACEOF - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done -rm -f conf$$subs.sh -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF - print line -} -_ACAWK +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +ENABLE_LLVMC_DYNAMIC_PLUGINS!$ENABLE_LLVMC_DYNAMIC_PLUGINS$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +NM!$NM$ac_delim +ifGNUmake!$ifGNUmake$ac_delim +LN_S!$LN_S$ac_delim +CMP!$CMP$ac_delim +CP!$CP$ac_delim +DATE!$DATE$ac_delim +FIND!$FIND$ac_delim +MKDIR!$MKDIR$ac_delim +MV!$MV$ac_delim +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +RM!$RM$ac_delim +SED!$SED$ac_delim +TAR!$TAR$ac_delim +BINPWD!$BINPWD$ac_delim +GRAPHVIZ!$GRAPHVIZ$ac_delim +DOT!$DOT$ac_delim +FDP!$FDP$ac_delim +NEATO!$NEATO$ac_delim +TWOPI!$TWOPI$ac_delim +CIRCO!$CIRCO$ac_delim +GV!$GV$ac_delim +DOTTY!$DOTTY$ac_delim +PERL!$PERL$ac_delim +HAVE_PERL!$HAVE_PERL$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +BZIP2!$BZIP2$ac_delim +DOXYGEN!$DOXYGEN$ac_delim +GROFF!$GROFF$ac_delim +GZIP!$GZIP$ac_delim +POD2HTML!$POD2HTML$ac_delim +POD2MAN!$POD2MAN$ac_delim +RUNTEST!$RUNTEST$ac_delim +TCLSH!$TCLSH$ac_delim +ZIP!$ZIP$ac_delim +OCAMLC!$OCAMLC$ac_delim +OCAMLOPT!$OCAMLOPT$ac_delim +OCAMLDEP!$OCAMLDEP$ac_delim +OCAMLDOC!$OCAMLDOC$ac_delim +GAS!$GAS$ac_delim +INSTALL_LTDL_TRUE!$INSTALL_LTDL_TRUE$ac_delim +INSTALL_LTDL_FALSE!$INSTALL_LTDL_FALSE$ac_delim +CONVENIENCE_LTDL_TRUE!$CONVENIENCE_LTDL_TRUE$ac_delim +CONVENIENCE_LTDL_FALSE!$CONVENIENCE_LTDL_FALSE$ac_delim +LIBADD_DL!$LIBADD_DL$ac_delim +LLVMGCCCOMMAND!$LLVMGCCCOMMAND$ac_delim +LLVMGXXCOMMAND!$LLVMGXXCOMMAND$ac_delim +LLVMGCC!$LLVMGCC$ac_delim +LLVMGXX!$LLVMGXX$ac_delim +NO_VARIADIC_MACROS!$NO_VARIADIC_MACROS$ac_delim +NO_MISSING_FIELD_INITIALIZERS!$NO_MISSING_FIELD_INITIALIZERS$ac_delim +USE_UDIS86!$USE_UDIS86$ac_delim +USE_OPROFILE!$USE_OPROFILE$ac_delim +HAVE_PTHREAD!$HAVE_PTHREAD$ac_delim +HUGE_VAL_SANITY!$HUGE_VAL_SANITY$ac_delim +MMAP_FILE!$MMAP_FILE$ac_delim +LLVMCC1!$LLVMCC1$ac_delim +LLVMCC1PLUS!$LLVMCC1PLUS$ac_delim +LLVMGCCDIR!$LLVMGCCDIR$ac_delim +LLVMGCCLIBEXEC!$LLVMGCCLIBEXEC$ac_delim +LLVMGCC_VERSION!$LLVMGCC_VERSION$ac_delim +LLVMGCC_MAJVERS!$LLVMGCC_MAJVERS$ac_delim +LLVMGCC_LANGS!$LLVMGCC_LANGS$ac_delim +SHLIBEXT!$SHLIBEXT$ac_delim +LLVM_PREFIX!$LLVM_PREFIX$ac_delim +LLVM_BINDIR!$LLVM_BINDIR$ac_delim +LLVM_LIBDIR!$LLVM_LIBDIR$ac_delim +LLVM_DATADIR!$LLVM_DATADIR$ac_delim +LLVM_DOCSDIR!$LLVM_DOCSDIR$ac_delim +LLVM_ETCDIR!$LLVM_ETCDIR$ac_delim +LLVM_INCLUDEDIR!$LLVM_INCLUDEDIR$ac_delim +LLVM_INFODIR!$LLVM_INFODIR$ac_delim +LLVM_MANDIR!$LLVM_MANDIR$ac_delim +LLVM_CONFIGTIME!$LLVM_CONFIGTIME$ac_delim +BINDINGS_TO_BUILD!$BINDINGS_TO_BUILD$ac_delim +ALL_BINDINGS!$ALL_BINDINGS$ac_delim +OCAML_LIBDIR!$OCAML_LIBDIR$ac_delim +ENABLE_VISIBILITY_INLINES_HIDDEN!$ENABLE_VISIBILITY_INLINES_HIDDEN$ac_delim +RPATH!$RPATH$ac_delim +RDYNAMIC!$RDYNAMIC$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 88; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof _ACEOF + # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty @@ -13660,128 +20846,20 @@ }' fi -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -13809,34 +20887,26 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" + ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac @@ -13846,7 +20916,42 @@ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -13864,15 +20969,20 @@ q } s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -13912,12 +21022,12 @@ esac _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { + +case `sed -n '/datarootdir/ { p q } @@ -13925,37 +21035,36 @@ /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +/@mandir@/p +' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t +s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -13965,52 +21074,123 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac ;; :H) # # CONFIG_HEADER # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + rm -f $ac_file + mv "$tmp/config.h" $ac_file fi else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + echo "/* $configure_input */" + cat "$ac_result" fi + rm -f "$tmp/out12" ;; - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -14047,13 +21227,11 @@ done # for ac_tag -as_fn_exit 0 +{ (exit 0); exit 0; } _ACEOF +chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save -test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 - # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -14073,7 +21251,7 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || { (exit 1); exit 1; } fi # @@ -14081,8 +21259,7 @@ # if test "$no_recursion" != yes; then - # Remove --cache-file, --srcdir, and --disable-option-checking arguments - # so they do not pile up. + # Remove --cache-file and --srcdir arguments so they do not pile up. ac_sub_configure_args= ac_prev= eval "set x $ac_configure_args" @@ -14111,13 +21288,11 @@ ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; - --disable-option-checking) - ;; *) case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - as_fn_append ac_sub_configure_args " '$ac_arg'" ;; + ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; esac done @@ -14125,18 +21300,9 @@ # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" - - # Pass --silent - if test "$silent" = yes; then - ac_sub_configure_args="--silent $ac_sub_configure_args" - fi - - # Always prepend --disable-option-checking to silence warnings, since - # different subdirs can have different --enable and --with options. - ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" + ac_sub_configure_args="$ac_arg $ac_sub_configure_args" ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue @@ -14146,17 +21312,57 @@ test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" - $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 - $as_echo "$ac_msg" >&6 - as_dir="$ac_dir"; as_fn_mkdir_p + echo "$as_me:$LINENO: $ac_msg" >&5 + echo "$ac_msg" >&6 + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -14195,8 +21401,8 @@ # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/configure else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 -$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} + { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 +echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi @@ -14209,19 +21415,17 @@ ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 -$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || - as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 +echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} + { (exit 1); exit 1; }; } fi cd "$ac_popdir" done fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi Modified: llvm/trunk/include/llvm/Config/config.h.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.in?rev=95191&r1=95190&r2=95191&view=diff ============================================================================== --- llvm/trunk/include/llvm/Config/config.h.in (original) +++ llvm/trunk/include/llvm/Config/config.h.in Tue Feb 2 20:11:49 2010 @@ -1,8 +1,5 @@ /* include/llvm/Config/config.h.in. Generated from autoconf/configure.ac by autoheader. */ -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - /* 32 bit multilib directory. */ #undef CXX_INCLUDE_32BIT_DIR @@ -554,9 +551,6 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME -/* Define to the home page for this package. */ -#undef PACKAGE_URL - /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -581,18 +575,6 @@ /* Define if use udis86 library */ #undef USE_UDIS86 -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif - /* Define to empty if `const' does not conform to ANSI C. */ #undef const From jyasskin at gmail.com Tue Feb 2 20:43:47 2010 From: jyasskin at gmail.com (jyasskin at gmail.com) Date: Wed, 03 Feb 2010 02:43:47 +0000 Subject: [llvm-commits] [PATCH] Make lit's gtest support honor config.environment (issue199071) Message-ID: <0016e6475bba0b9631047ea930ab@google.com> Reviewers: daniel_zuster.org, Message: Please take a look. The current patch is at http://codereview.appspot.com/download/issue199071_1003.diff Description: This will let me set LD_LIBRARY_PATH correctly when linking the unittests against an LLVM shared library. Please review this at http://codereview.appspot.com/199071/show Affected files: M utils/lit/lit/TestFormats.py M utils/lit/lit/Util.py Index: utils/lit/lit/TestFormats.py =================================================================== --- utils/lit/lit/TestFormats.py (revision 95191) +++ utils/lit/lit/TestFormats.py (working copy) @@ -9,13 +9,19 @@ self.test_sub_dir = str(test_sub_dir) self.test_suffix = str(test_suffix) - def getGTestTests(self, path, litConfig): + def getGTestTests(self, path, litConfig, localConfig): """getGTestTests(path) - [name] - - Return the tests available in gtest executable.""" + Return the tests available in gtest executable. + + Args: + path: String path to a gtest executable + litConfig: LitConfig instance + localConfig: TestingConfig instance""" + try: - lines = Util.capture([path, '--gtest_list_tests']).split('\n') + lines = Util.capture([path, '--gtest_list_tests'], + env=localConfig.environment).split('\n') except: litConfig.error("unable to discover google-tests in %r" % path) raise StopIteration @@ -52,7 +58,8 @@ execpath = os.path.join(filepath, subfilename) # Discover the tests in this executable. - for name in self.getGTestTests(execpath, litConfig): + for name in self.getGTestTests(execpath, litConfig, + localConfig): testPath = path_in_suite + (filename, subfilename, name) yield Test.Test(testSuite, testPath, localConfig) @@ -65,7 +72,8 @@ testName = os.path.join(namePrefix, testName) cmd = [testPath, '--gtest_filter=' + testName] - out, err, exitCode = TestRunner.executeCommand(cmd) + out, err, exitCode = TestRunner.executeCommand( + cmd, env=test.config.environment) if not exitCode: return Test.PASS,'' Index: utils/lit/lit/Util.py =================================================================== --- utils/lit/lit/Util.py (revision 95191) +++ utils/lit/lit/Util.py (working copy) @@ -39,11 +39,12 @@ if e.errno != errno.EEXIST: raise -def capture(args): +def capture(args, env=None): import subprocess """capture(command) - Run the given command (or argv list) in a shell and return the standard output.""" - p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, + env=env) out,_ = p.communicate() return out From jyasskin at gmail.com Tue Feb 2 21:03:28 2010 From: jyasskin at gmail.com (jyasskin at gmail.com) Date: Wed, 03 Feb 2010 03:03:28 +0000 Subject: [llvm-commits] [PATCH] Move --march, --mcpu, and --mattr to TargetMachine.cpp (issue199072) Message-ID: <001636c925856e78ab047ea97663@google.com> Reviewers: llvm-commits_cs.uiuc.edu, Message: Please take a look. The current patch is at http://codereview.appspot.com/download/issue199072_1.diff Description: Both llc.cpp and JIT/TargetSelect.cpp defined these flags, meaning that when I link all of LLVM's libraries into a single shared library, llc crashes on startup with duplicate flag definitions. This patch moves the flag definitions into TargetMachine (which made sense in my head, but the exact location doesn't really matter). Please review this at http://codereview.appspot.com/199072/show Affected files: M include/llvm/Target/TargetOptions.h M lib/ExecutionEngine/JIT/TargetSelect.cpp M lib/Target/TargetMachine.cpp M tools/llc/llc.cpp From espindola at google.com Tue Feb 2 21:18:27 2010 From: espindola at google.com (Rafael Espindola) Date: Tue, 2 Feb 2010 22:18:27 -0500 Subject: [llvm-commits] [llvm-gcc][patch] Don't use inreg to force arguments to memory :-) Message-ID: <38a0d8451002021918kb48fd6au39a6277e85d3d6e6@mail.gmail.com> The attached patch removes the ppc linux ABI use of the inreg attribute to force argument to memory. This was a bit confusing and a big difference to how the default abi converter works. With this patch llvm-gcc uses pad arguments. This also makes NumGPR redundant with the ScalarElts vector. I will remove it in the next patch. llvm-gcc compiled fine and I am running the test-suite. I will commit it if everything is fine. Cheers, -- Rafael ?vila de Esp?ndola -------------- next part -------------- A non-text attachment was scrubbed... Name: inreg.patch Type: text/x-diff Size: 6095 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100202/199e0c63/attachment.bin From evan.cheng at apple.com Tue Feb 2 21:28:03 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Feb 2010 03:28:03 -0000 Subject: [llvm-commits] [llvm] r95195 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/tailcall2.ll test/CodeGen/X86/tailcallfp2.ll Message-ID: <201002030328.o133S3Ls003457@zion.cs.uiuc.edu> Author: evancheng Date: Tue Feb 2 21:28:02 2010 New Revision: 95195 URL: http://llvm.org/viewvc/llvm-project?rev=95195&view=rev Log: Allow all types of callee's to be tail called. But avoid automatic tailcall if the callee is a result of bitcast to avoid losing necessary zext / sext etc. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/test/CodeGen/X86/tailcall2.ll llvm/trunk/test/CodeGen/X86/tailcallfp2.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=95195&r1=95194&r2=95195&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Tue Feb 2 21:28:02 2010 @@ -4197,8 +4197,9 @@ /// /// This function only tests target-independent requirements. static bool -isInTailCallPosition(const Instruction *I, Attributes CalleeRetAttr, +isInTailCallPosition(CallSite CS, Attributes CalleeRetAttr, const TargetLowering &TLI) { + const Instruction *I = CS.getInstruction(); const BasicBlock *ExitBB = I->getParent(); const TerminatorInst *Term = ExitBB->getTerminator(); const ReturnInst *Ret = dyn_cast(Term); @@ -4207,6 +4208,12 @@ // The block must end in a return statement or an unreachable. if (!Ret && !isa(Term)) return false; + // Unless we are explicitly forcing tailcall optimization do not tailcall if + // the called function is bitcast'ed. The analysis may not be entirely + // accurate. + if (!PerformTailCallOpt && isa(CS.getCalledValue())) + return false; + // If I will have a chain, make sure no other instruction that will have a // chain interposes between I and the return. if (I->mayHaveSideEffects() || I->mayReadFromMemory() || @@ -4348,9 +4355,7 @@ // Check if target-independent constraints permit a tail call here. // Target-dependent constraints are checked within TLI.LowerCallTo. if (isTailCall && - !isInTailCallPosition(CS.getInstruction(), - CS.getAttributes().getRetAttributes(), - TLI)) + !isInTailCallPosition(CS, CS.getAttributes().getRetAttributes(), TLI)) isTailCall = false; std::pair Result = Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=95195&r1=95194&r2=95195&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Feb 2 21:28:02 2010 @@ -2269,7 +2269,6 @@ return false; } - // Look for obvious safe cases to perform tail call optimization that does not // requite ABI changes. This is what gcc calls sibcall. @@ -2324,22 +2323,7 @@ } } - // If the caller does not return a value, then this is obviously safe. - // This is one case where it's safe to perform this optimization even - // if the return types do not match. - const Type *CallerRetTy = CallerF->getReturnType(); - if (CallerRetTy->isVoidTy()) - return true; - - // If the return types match, then it's safe. - // Don't tail call optimize recursive call. - GlobalAddressSDNode *G = dyn_cast(Callee); - if (!G) return false; // FIXME: common external symbols? - if (const Function *CalleeF = dyn_cast(G->getGlobal())) { - const Type *CalleeRetTy = CalleeF->getReturnType(); - return CallerRetTy == CalleeRetTy; - } - return false; + return true; } FastISel * Modified: llvm/trunk/test/CodeGen/X86/tailcall2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/tailcall2.ll?rev=95195&r1=95194&r2=95195&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/tailcall2.ll (original) +++ llvm/trunk/test/CodeGen/X86/tailcall2.ll Tue Feb 2 21:28:02 2010 @@ -102,3 +102,28 @@ } declare i32 @bar2(i32, i32, i32) + +define signext i16 @t8() nounwind ssp { +entry: +; 32: t8: +; 32: jmp {{_?}}bar3 + +; 64: t8: +; 64: jmp {{_?}}bar3 + %0 = tail call signext i16 @bar3() nounwind ; [#uses=1] + ret i16 %0 +} + +declare signext i16 @bar3() + +define signext i16 @t9(i32 (i32)* nocapture %x) nounwind ssp { +entry: +; 32: t9: +; 32: call * + +; 64: t9: +; 64: callq * + %0 = bitcast i32 (i32)* %x to i16 (i32)* + %1 = tail call signext i16 %0(i32 0) nounwind + ret i16 %1 +} Modified: llvm/trunk/test/CodeGen/X86/tailcallfp2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/tailcallfp2.ll?rev=95195&r1=95194&r2=95195&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/tailcallfp2.ll (original) +++ llvm/trunk/test/CodeGen/X86/tailcallfp2.ll Tue Feb 2 21:28:02 2010 @@ -2,7 +2,7 @@ declare i32 @putchar(i32) -define fastcc i32 @checktail(i32 %x, i32* %f, i32 %g) { +define fastcc i32 @checktail(i32 %x, i32* %f, i32 %g) nounwind { %tmp1 = icmp sgt i32 %x, 0 br i1 %tmp1, label %if-then, label %if-else @@ -18,8 +18,8 @@ } -define i32 @main() { +define i32 @main() nounwind { %f = bitcast i32 (i32, i32*, i32)* @checktail to i32* %res = tail call fastcc i32 @checktail( i32 10, i32* %f,i32 10) ret i32 %res -} \ No newline at end of file +} From rjmccall at apple.com Tue Feb 2 21:42:45 2010 From: rjmccall at apple.com (John McCall) Date: Wed, 03 Feb 2010 03:42:45 -0000 Subject: [llvm-commits] [llvm] r95196 - in /llvm/trunk: lib/Support/APInt.cpp unittests/ADT/APFloatTest.cpp Message-ID: <201002030342.o133gjHM003994@zion.cs.uiuc.edu> Author: rjmccall Date: Tue Feb 2 21:42:44 2010 New Revision: 95196 URL: http://llvm.org/viewvc/llvm-project?rev=95196&view=rev Log: Make APInt::countLeadingZerosSlowCase() treat the contents of padding bits as undefined. Fixes an assertion in APFloat::toString noticed by Dale. Modified: llvm/trunk/lib/Support/APInt.cpp llvm/trunk/unittests/ADT/APFloatTest.cpp Modified: llvm/trunk/lib/Support/APInt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APInt.cpp?rev=95196&r1=95195&r2=95196&view=diff ============================================================================== --- llvm/trunk/lib/Support/APInt.cpp (original) +++ llvm/trunk/lib/Support/APInt.cpp Tue Feb 2 21:42:44 2010 @@ -767,8 +767,23 @@ } unsigned APInt::countLeadingZerosSlowCase() const { - unsigned Count = 0; - for (unsigned i = getNumWords(); i > 0u; --i) { + // Treat the most significand word differently because it might have + // meaningless bits set beyond the precision. + unsigned BitsInMSW = BitWidth % APINT_BITS_PER_WORD; + integerPart MSWMask; + if (BitsInMSW) MSWMask = (integerPart(1) << BitsInMSW) - 1; + else { + MSWMask = ~integerPart(0); + BitsInMSW = APINT_BITS_PER_WORD; + } + + unsigned i = getNumWords(); + integerPart MSW = pVal[i-1] & MSWMask; + if (MSW) + return CountLeadingZeros_64(MSW) - (APINT_BITS_PER_WORD - BitsInMSW); + + unsigned Count = BitsInMSW; + for (--i; i > 0u; --i) { if (pVal[i-1] == 0) Count += APINT_BITS_PER_WORD; else { @@ -776,10 +791,7 @@ break; } } - unsigned remainder = BitWidth % APINT_BITS_PER_WORD; - if (remainder) - Count -= APINT_BITS_PER_WORD - remainder; - return std::min(Count, BitWidth); + return Count; } static unsigned countLeadingOnes_64(uint64_t V, unsigned skip) { Modified: llvm/trunk/unittests/ADT/APFloatTest.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/APFloatTest.cpp?rev=95196&r1=95195&r2=95196&view=diff ============================================================================== --- llvm/trunk/unittests/ADT/APFloatTest.cpp (original) +++ llvm/trunk/unittests/ADT/APFloatTest.cpp Tue Feb 2 21:42:44 2010 @@ -333,6 +333,8 @@ ASSERT_EQ("1.01E-2", convertToString(1.01E-2, 5, 1)); ASSERT_EQ("0.7853981633974483", convertToString(0.78539816339744830961, 0, 3)); ASSERT_EQ("4.940656458412465E-324", convertToString(4.9406564584124654e-324, 0, 3)); + ASSERT_EQ("873.1834", convertToString(873.1834, 0, 1)); + ASSERT_EQ("8.731834E+2", convertToString(873.1834, 0, 0)); } #ifdef GTEST_HAS_DEATH_TEST From scallanan at apple.com Tue Feb 2 21:46:42 2010 From: scallanan at apple.com (Sean Callanan) Date: Wed, 03 Feb 2010 03:46:42 -0000 Subject: [llvm-commits] [llvm] r95197 - /llvm/trunk/tools/llvm-mc/Disassembler.cpp Message-ID: <201002030346.o133kg9m004115@zion.cs.uiuc.edu> Author: spyffe Date: Tue Feb 2 21:46:41 2010 New Revision: 95197 URL: http://llvm.org/viewvc/llvm-project?rev=95197&view=rev Log: Fixed the disassembler so it accepts multiple instructions on a single line. Also made it a bit more forgiving when it reports errors. Modified: llvm/trunk/tools/llvm-mc/Disassembler.cpp Modified: llvm/trunk/tools/llvm-mc/Disassembler.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/Disassembler.cpp?rev=95197&r1=95196&r2=95197&view=diff ============================================================================== --- llvm/trunk/tools/llvm-mc/Disassembler.cpp (original) +++ llvm/trunk/tools/llvm-mc/Disassembler.cpp Tue Feb 2 21:46:41 2010 @@ -47,32 +47,30 @@ }; } -static bool PrintInst(const llvm::MCDisassembler &DisAsm, +static bool PrintInsts(const llvm::MCDisassembler &DisAsm, llvm::MCInstPrinter &Printer, const ByteArrayTy &Bytes, SourceMgr &SM) { // Wrap the vector in a MemoryObject. VectorMemoryObject memoryObject(Bytes); - // Disassemble it to a string and get the size of the instruction. - MCInst Inst; + // Disassemble it to strings. uint64_t Size; + uint64_t Index; - if (!DisAsm.getInstruction(Inst, Size, memoryObject, 0, - /*REMOVE*/ nulls())) { - SM.PrintMessage(SMLoc::getFromPointer(Bytes[0].second), - "invalid instruction encoding", "error"); - return true; - } - - Printer.printInst(&Inst); - outs() << "\n"; - - // If the disassembled instruction was smaller than the number of bytes we - // read, reject the excess bytes. - if (Bytes.size() != Size) { - SM.PrintMessage(SMLoc::getFromPointer(Bytes[Size].second), - "excess data detected in input", "error"); - return true; + for (Index = 0; Index < Bytes.size(); Index += Size) { + MCInst Inst; + + if (DisAsm.getInstruction(Inst, Size, memoryObject, Index, + /*REMOVE*/ nulls())) { + Printer.printInst(&Inst); + outs() << "\n"; + } + else { + SM.PrintMessage(SMLoc::getFromPointer(Bytes[Index].second), + "invalid instruction encoding", "warning"); + if (Size == 0) + Size = 1; // skip illegible bytes + } } return false; @@ -117,15 +115,9 @@ continue; } - // If this is the end of a line or start of a comment, process the - // instruction we have so far. + // If this is the end of a line or start of a comment, remove the rest of + // the line. if (Str[0] == '\n' || Str[0] == '#') { - // If we have bytes to process, do so. - if (!ByteArray.empty()) { - ErrorOccurred |= PrintInst(*DisAsm, *InstPrinter, ByteArray, SM); - ByteArray.clear(); - } - // Strip to the end of line if we already processed any bytes on this // line. This strips the comment and/or the \n. if (Str[0] == '\n') @@ -159,7 +151,7 @@ } if (!ByteArray.empty()) - ErrorOccurred |= PrintInst(*DisAsm, *InstPrinter, ByteArray, SM); + ErrorOccurred |= PrintInsts(*DisAsm, *InstPrinter, ByteArray, SM); return ErrorOccurred; } From evan.cheng at apple.com Tue Feb 2 21:55:59 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Feb 2010 03:55:59 -0000 Subject: [llvm-commits] [llvm] r95198 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/Transforms/Scalar/TailRecursionElimination.cpp test/CodeGen/X86/tailcall1.ll test/CodeGen/X86/tailcall2.ll test/Transforms/TailCallElim/no-return-calls.ll Message-ID: <201002030356.o133u0iA004424@zion.cs.uiuc.edu> Author: evancheng Date: Tue Feb 2 21:55:59 2010 New Revision: 95198 URL: http://llvm.org/viewvc/llvm-project?rev=95198&view=rev Log: Revert 94937 and move the noreturn check to codegen. Removed: llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp llvm/trunk/test/CodeGen/X86/tailcall1.ll llvm/trunk/test/CodeGen/X86/tailcall2.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=95198&r1=95197&r2=95198&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Tue Feb 2 21:55:59 2010 @@ -4205,8 +4205,13 @@ const ReturnInst *Ret = dyn_cast(Term); const Function *F = ExitBB->getParent(); - // The block must end in a return statement or an unreachable. - if (!Ret && !isa(Term)) return false; + // The block must end in a return statement. + // FIXME: Disallow tailcall if the block ends in an unreachable for now. + // The way tailcall optimization is currently implemented means it will + // add an epilogue followed by a jump. That is not profitable. Also, if + // the callee is a special function (e.g. longjmp on x86), it can end up + // causing miscompilation that has not been fully understood. + if (!Ret) return false; // Unless we are explicitly forcing tailcall optimization do not tailcall if // the called function is bitcast'ed. The analysis may not be entirely Modified: llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp?rev=95198&r1=95197&r2=95198&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/TailRecursionElimination.cpp Tue Feb 2 21:55:59 2010 @@ -184,11 +184,10 @@ if (!FunctionContainsEscapingAllocas) for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) - if (CallInst *CI = dyn_cast(I)) - if (!CI->doesNotReturn()) { - CI->setTailCall(); - MadeChange = true; - } + if (CallInst *CI = dyn_cast(I)) { + CI->setTailCall(); + MadeChange = true; + } return MadeChange; } Modified: llvm/trunk/test/CodeGen/X86/tailcall1.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/tailcall1.ll?rev=95198&r1=95197&r2=95198&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/tailcall1.ll (original) +++ llvm/trunk/test/CodeGen/X86/tailcall1.ll Tue Feb 2 21:55:59 2010 @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -tailcallopt | grep TAILCALL | count 5 +; RUN: llc < %s -march=x86 -tailcallopt | grep TAILCALL | count 4 declare fastcc i32 @tailcallee(i32 %a1, i32 %a2, i32 %a3, i32 %a4) Modified: llvm/trunk/test/CodeGen/X86/tailcall2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/tailcall2.ll?rev=95198&r1=95197&r2=95198&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/tailcall2.ll (original) +++ llvm/trunk/test/CodeGen/X86/tailcall2.ll Tue Feb 2 21:55:59 2010 @@ -127,3 +127,16 @@ %1 = tail call signext i16 %0(i32 0) nounwind ret i16 %1 } + +define void @t10() nounwind ssp { +entry: +; 32: t10: +; 32: call + +; 64: t10: +; 64: callq + %0 = tail call i32 @foo4() noreturn nounwind + unreachable +} + +declare i32 @foo4() Removed: llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll?rev=95197&view=auto ============================================================================== --- llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll (original) +++ llvm/trunk/test/Transforms/TailCallElim/no-return-calls.ll (removed) @@ -1,12 +0,0 @@ -; RUN: opt < %s -tailcallelim -S | FileCheck %s - -define void @t() nounwind ssp { -entry: -; CHECK: entry: -; CHECK: %0 = call i32 @foo() -; CHECK: ret void - %0 = call i32 @foo() nounwind noreturn - ret void -} - -declare i32 @foo() From nicholas at mxc.ca Tue Feb 2 23:21:51 2010 From: nicholas at mxc.ca (Nick Lewycky) Date: Tue, 02 Feb 2010 21:21:51 -0800 Subject: [llvm-commits] patch: moving unreachable elimination to codegenprep In-Reply-To: References: <4B68588F.7070906@mxc.ca> Message-ID: <4B6907EF.4050003@mxc.ca> Jakob Stoklund Olesen wrote: > > On Feb 2, 2010, at 8:53 AM, Nick Lewycky wrote: > >> This is a resurrection of the patch first discussed back in October 2009 to change the way unreachable is handled to make it live in the IR for as long as possible. The goal is to implement http://nondot.org/sabre/LLVMNotes/BuiltinUnreachable.txt in time for the LLVM 2.7 freeze so that python can make use of it when they land unladen-swallow. > > Nick, I couldn't find that discussion in the archives. Do you have any pointers? http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20091012/089120.html >> This patch does most of the work of just moving the time unreachables are eliminated at late as possible, currently CodeGenPrep, and updates InlineCost and SCEV to handle it. Most of the patch is just updating codegen unit tests that use the unreachable instruction. > > I can only comment on the InlineCost changes. > > It seems to me you would need to avoid unreachable instructions in the CountCodeReductionFor* methods as well. Is unreachable only found at the beginning of a block? Unreachable is only of interest when found at the beginning of a block. The change is that we no longer optimize 'conditional branch to block starting with unreachable' to an unconditional branch to the other BB. The handling of unreachables in the middle of a block is unaffected by this patch. > What about all the undead code driving a switch or br to unreachable? That should not be counted in the inline cost since it will eventually be eliminated. > >> The primary concern from last time was the side-effects of keeping the chain of computation that fed into a dead branch. The 'extra' instructions could have effects on everything from inlining to loop analysis, but any approach short of cramming the entire expression into metadata attached to the branch would have the same problem. > > It seems that a lot of optimizations could be sabotaged by undead code. Sure but I'd expect that case to be rare. If an 'unreachable' is created by our own optimization passes then we will still delete the instructions that precede it, up until we reach a call with visible side-effects or a conditional branch. > Do we have any measurements that show this to be a good idea in the first place? The case we want this is in unladen-swallow where we use this for LLVM to perform final value replacement after a type check. After determining the type from type feedback, we construct IR which still needs to do runtime checks of the type, but once the type is validated we can assume things about the contents of other fields in the object. We need a way to express this. Jakob, I'll make the tweaks to InlineCost that you proposed and post an updated patch with the results of a nightly test run. Realize that I'm expecting no visible performance difference at all since no code in the nightly test uses __builtin_unreachable(). Nick From clattner at apple.com Tue Feb 2 23:22:09 2010 From: clattner at apple.com (Chris Lattner) Date: Tue, 2 Feb 2010 21:22:09 -0800 Subject: [llvm-commits] [llvm] r95198 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/Transforms/Scalar/TailRecursionElimination.cpp test/CodeGen/X86/tailcall1.ll test/CodeGen/X86/tailcall2.ll test/Transforms/TailCallElim/no-return-calls.ll In-Reply-To: <201002030356.o133u0iA004424@zion.cs.uiuc.edu> References: <201002030356.o133u0iA004424@zion.cs.uiuc.edu> Message-ID: <1DEF4350-AEE9-4353-AE19-CFFEB05EB7C3@apple.com> On Feb 2, 2010, at 7:55 PM, Evan Cheng wrote: > Author: evancheng > Date: Tue Feb 2 21:55:59 2010 > New Revision: 95198 > > URL: http://llvm.org/viewvc/llvm-project?rev=95198&view=rev > Log: > Revert 94937 and move the noreturn check to codegen. Thanks! From sabre at nondot.org Tue Feb 2 23:55:10 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 05:55:10 -0000 Subject: [llvm-commits] [llvm] r95202 - in /llvm/trunk: include/llvm/Target/TargetMachine.h lib/CodeGen/LLVMTargetMachine.cpp tools/llc/llc.cpp tools/lto/LTOCodeGenerator.cpp Message-ID: <201002030555.o135tBOh009273@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 23:55:08 2010 New Revision: 95202 URL: http://llvm.org/viewvc/llvm-project?rev=95202&view=rev Log: change addPassesToEmitFile to return true on failure instead of its input, add -filetype=null for performance testing and remove -filetype=dynlib, which isn't planned to be implemented. Modified: llvm/trunk/include/llvm/Target/TargetMachine.h llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp llvm/trunk/tools/llc/llc.cpp llvm/trunk/tools/lto/LTOCodeGenerator.cpp Modified: llvm/trunk/include/llvm/Target/TargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=95202&r1=95201&r2=95202&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetMachine.h (original) +++ llvm/trunk/include/llvm/Target/TargetMachine.h Tue Feb 2 23:55:08 2010 @@ -199,8 +199,7 @@ enum CodeGenFileType { CGFT_AssemblyFile, CGFT_ObjectFile, - CGFT_DynamicLibrary, - CGFT_ErrorOccurred + CGFT_Null // Do not emit any output. }; /// getEnableTailMergeDefault - the default setting for -enable-tail-merge @@ -209,15 +208,13 @@ /// addPassesToEmitFile - Add passes to the specified pass manager to get the /// specified file emitted. Typically this will involve several steps of code - /// generation. - /// This method should return InvalidFile if emission of this file type - /// is not supported. - /// - virtual CodeGenFileType addPassesToEmitFile(PassManagerBase &, - formatted_raw_ostream &, - CodeGenFileType Filetype, - CodeGenOpt::Level) { - return CGFT_ErrorOccurred; + /// generation. This method should return true if emission of this file type + /// is not supported, or false on success. + virtual bool addPassesToEmitFile(PassManagerBase &, + formatted_raw_ostream &, + CodeGenFileType Filetype, + CodeGenOpt::Level) { + return true; } /// addPassesToEmitMachineCode - Add passes to the specified pass manager to @@ -264,18 +261,11 @@ /// addPassesToEmitFile - Add passes to the specified pass manager to get the /// specified file emitted. Typically this will involve several steps of code /// generation. If OptLevel is None, the code generator should emit code as - /// fast as possible, though the generated code may be less efficient. This - /// method should return CGFT_ErrorOccurred if emission of this file type is - /// not supported. - /// - /// The default implementation of this method adds components from the - /// LLVM retargetable code generator, invoking the methods below to get - /// target-specific passes in standard locations. - /// - virtual CodeGenFileType addPassesToEmitFile(PassManagerBase &PM, - formatted_raw_ostream &Out, - CodeGenFileType FileType, - CodeGenOpt::Level); + /// fast as possible, though the generated code may be less efficient. + virtual bool addPassesToEmitFile(PassManagerBase &PM, + formatted_raw_ostream &Out, + CodeGenFileType FileType, + CodeGenOpt::Level); /// addPassesToEmitMachineCode - Add passes to the specified pass manager to /// get machine code emitted. This uses a JITCodeEmitter object to handle Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=95202&r1=95201&r2=95202&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Tue Feb 2 23:55:08 2010 @@ -111,21 +111,20 @@ setCodeModel(CodeModel::Small); } -TargetMachine::CodeGenFileType -LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM, - formatted_raw_ostream &Out, - CodeGenFileType FileType, - CodeGenOpt::Level OptLevel) { +bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM, + formatted_raw_ostream &Out, + CodeGenFileType FileType, + CodeGenOpt::Level OptLevel) { // Add common CodeGen passes. if (addCommonCodeGenPasses(PM, OptLevel)) - return CGFT_ErrorOccurred; + return true; OwningPtr Context(new MCContext()); OwningPtr AsmStreamer; formatted_raw_ostream *LegacyOutput; switch (FileType) { - default: return CGFT_ErrorOccurred; + default: return true; case CGFT_AssemblyFile: { const MCAsmInfo &MAI = *getMCAsmInfo(); MCInstPrinter *InstPrinter = @@ -143,7 +142,7 @@ // emission fails. MCCodeEmitter *MCE = getTarget().createCodeEmitter(*this); if (MCE == 0) - return CGFT_ErrorOccurred; + return true; AsmStreamer.reset(createMachOStreamer(*Context, Out, MCE)); @@ -154,6 +153,16 @@ LegacyOutput = new formatted_raw_ostream(errs()); break; } + case CGFT_Null: + // The Null output is intended for use for performance analysis and testing, + // not real users. + AsmStreamer.reset(createNullStreamer(*Context)); + // Any output to the asmprinter's "O" stream is bad and needs to be fixed, + // force it to come out stderr. + // FIXME: this is horrible and leaks, eventually remove the raw_ostream from + // asmprinter. + LegacyOutput = new formatted_raw_ostream(errs()); + break; } // Create the AsmPrinter, which takes ownership of Context and AsmStreamer @@ -162,7 +171,7 @@ getTarget().createAsmPrinter(*LegacyOutput, *this, *Context, *AsmStreamer, getMCAsmInfo()); if (Printer == 0) - return CGFT_ErrorOccurred; + return true; // If successful, createAsmPrinter took ownership of AsmStreamer and Context. Context.take(); AsmStreamer.take(); @@ -172,7 +181,7 @@ // Make sure the code model is set. setCodeModelForStatic(); PM.add(createGCInfoDeleter()); - return FileType; + return false; } /// addPassesToEmitMachineCode - Add passes to the specified pass manager to Modified: llvm/trunk/tools/llc/llc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=95202&r1=95201&r2=95202&view=diff ============================================================================== --- llvm/trunk/tools/llc/llc.cpp (original) +++ llvm/trunk/tools/llc/llc.cpp Tue Feb 2 23:55:08 2010 @@ -91,9 +91,8 @@ "Emit an assembly ('.s') file"), clEnumValN(TargetMachine::CGFT_ObjectFile, "obj", "Emit a native object ('.o') file [experimental]"), - clEnumValN(TargetMachine::CGFT_DynamicLibrary, "dynlib", - "Emit a native dynamic library ('.so') file" - " [experimental]"), + clEnumValN(TargetMachine::CGFT_Null, "null", + "Emit nothing, for performance testing"), clEnumValEnd)); cl::opt NoVerify("disable-verify", cl::Hidden, @@ -177,8 +176,8 @@ OutputFilename += ".o"; Binary = true; break; - case TargetMachine::CGFT_DynamicLibrary: - OutputFilename += LTDL_SHLIB_EXT; + case TargetMachine::CGFT_Null: + OutputFilename += ".null"; Binary = true; break; } @@ -348,20 +347,13 @@ // Override default to generate verbose assembly. Target.setAsmVerbosityDefault(true); - switch (Target.addPassesToEmitFile(Passes, *Out, FileType, OLvl)) { - default: - assert(0 && "Invalid file model!"); - return 1; - case TargetMachine::CGFT_ErrorOccurred: + if (Target.addPassesToEmitFile(Passes, *Out, FileType, OLvl)) { errs() << argv[0] << ": target does not support generation of this" << " file type!\n"; if (Out != &fouts()) delete Out; // And the Out file is empty and useless, so remove it now. sys::Path(OutputFilename).eraseFromDisk(); return 1; - case TargetMachine::CGFT_AssemblyFile: - case TargetMachine::CGFT_ObjectFile: - break; } Passes.doInitialization(); Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOCodeGenerator.cpp?rev=95202&r1=95201&r2=95202&view=diff ============================================================================== --- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original) +++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Tue Feb 2 23:55:08 2010 @@ -393,14 +393,11 @@ codeGenPasses->add(new TargetData(*_target->getTargetData())); - switch (_target->addPassesToEmitFile(*codeGenPasses, out, - TargetMachine::CGFT_AssemblyFile, - CodeGenOpt::Aggressive)) { - case TargetMachine::CGFT_AssemblyFile: - break; - default: - errMsg = "target file type not supported"; - return true; + if (_target->addPassesToEmitFile(*codeGenPasses, out, + TargetMachine::CGFT_AssemblyFile, + CodeGenOpt::Aggressive)) { + errMsg = "target file type not supported"; + return true; } // Run our queue of passes all at once now, efficiently. From sabre at nondot.org Tue Feb 2 23:56:22 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 05:56:22 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r95204 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Message-ID: <201002030556.o135uM15009359@zion.cs.uiuc.edu> Author: lattner Date: Tue Feb 2 23:56:22 2010 New Revision: 95204 URL: http://llvm.org/viewvc/llvm-project?rev=95204&view=rev Log: update for llvm api change. Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=95204&r1=95203&r2=95204&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Tue Feb 2 23:56:22 2010 @@ -672,14 +672,11 @@ // Normal mode, emit a .s file by running the code generator. // Note, this also adds codegenerator level optimization passes. - switch (TheTarget->addPassesToEmitFile(*PM, *AsmOutRawStream, - TargetMachine::CGFT_AssemblyFile, - OptLevel)) { - default: + if (TheTarget->addPassesToEmitFile(*PM, *AsmOutRawStream, + TargetMachine::CGFT_AssemblyFile, + OptLevel)) { errs() << "Error interfacing to target machine!\n"; exit(1); - case TargetMachine::CGFT_AssemblyFile: - break; } } @@ -760,14 +757,11 @@ // Normal mode, emit a .s file by running the code generator. // Note, this also adds codegenerator level optimization passes. - switch (TheTarget->addPassesToEmitFile(*PM, *AsmOutRawStream, - TargetMachine::CGFT_AssemblyFile, - OptLevel)) { - default: + if (TheTarget->addPassesToEmitFile(*PM, *AsmOutRawStream, + TargetMachine::CGFT_AssemblyFile, + OptLevel)) { errs() << "Error interfacing to target machine!\n"; exit(1); - case TargetMachine::CGFT_AssemblyFile: - break; } } } From sabre at nondot.org Wed Feb 3 00:18:31 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 06:18:31 -0000 Subject: [llvm-commits] [llvm] r95205 - in /llvm/trunk: include/llvm/CodeGen/MachineModuleInfoImpls.h lib/CodeGen/MachineModuleInfoImpls.cpp lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp lib/Target/X86/AsmPrinter/X86MCInstLower.cpp lib/Target/X86/X86TargetObjectFile.cpp Message-ID: <201002030618.o136IVdh010241@zion.cs.uiuc.edu> Author: lattner Date: Wed Feb 3 00:18:30 2010 New Revision: 95205 URL: http://llvm.org/viewvc/llvm-project?rev=95205&view=rev Log: make MachineModuleInfoMachO hold non-const MCSymbol*'s instead of const ones. non-const ones aren't very useful, because you can't even, say, emit them. Modified: llvm/trunk/include/llvm/CodeGen/MachineModuleInfoImpls.h llvm/trunk/lib/CodeGen/MachineModuleInfoImpls.cpp llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp Modified: llvm/trunk/include/llvm/CodeGen/MachineModuleInfoImpls.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineModuleInfoImpls.h?rev=95205&r1=95204&r2=95205&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineModuleInfoImpls.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineModuleInfoImpls.h Wed Feb 3 00:18:30 2010 @@ -25,39 +25,38 @@ class MachineModuleInfoMachO : public MachineModuleInfoImpl { /// FnStubs - Darwin '$stub' stubs. The key is something like "Lfoo$stub", /// the value is something like "_foo". - DenseMap FnStubs; + DenseMap FnStubs; /// GVStubs - Darwin '$non_lazy_ptr' stubs. The key is something like /// "Lfoo$non_lazy_ptr", the value is something like "_foo". - DenseMap GVStubs; + DenseMap GVStubs; /// HiddenGVStubs - Darwin '$non_lazy_ptr' stubs. The key is something like /// "Lfoo$non_lazy_ptr", the value is something like "_foo". Unlike GVStubs /// these are for things with hidden visibility. - DenseMap HiddenGVStubs; + DenseMap HiddenGVStubs; virtual void Anchor(); // Out of line virtual method. public: MachineModuleInfoMachO(const MachineModuleInfo &) {} - const MCSymbol *&getFnStubEntry(const MCSymbol *Sym) { + MCSymbol *&getFnStubEntry(MCSymbol *Sym) { assert(Sym && "Key cannot be null"); return FnStubs[Sym]; } - const MCSymbol *&getGVStubEntry(const MCSymbol *Sym) { + MCSymbol *&getGVStubEntry(MCSymbol *Sym) { assert(Sym && "Key cannot be null"); return GVStubs[Sym]; } - const MCSymbol *&getHiddenGVStubEntry(const MCSymbol *Sym) { + MCSymbol *&getHiddenGVStubEntry(MCSymbol *Sym) { assert(Sym && "Key cannot be null"); return HiddenGVStubs[Sym]; } /// Accessor methods to return the set of stubs in sorted order. - typedef std::vector > - SymbolListTy; + typedef std::vector > SymbolListTy; SymbolListTy GetFnStubList() const { return GetSortedStubs(FnStubs); @@ -71,7 +70,7 @@ private: static SymbolListTy - GetSortedStubs(const DenseMap &Map); + GetSortedStubs(const DenseMap &Map); }; } // end namespace llvm Modified: llvm/trunk/lib/CodeGen/MachineModuleInfoImpls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineModuleInfoImpls.cpp?rev=95205&r1=95204&r2=95205&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineModuleInfoImpls.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineModuleInfoImpls.cpp Wed Feb 3 00:18:30 2010 @@ -26,17 +26,17 @@ static int SortSymbolPair(const void *LHS, const void *RHS) { const MCSymbol *LHSS = - ((const std::pair*)LHS)->first; + ((const std::pair*)LHS)->first; const MCSymbol *RHSS = - ((const std::pair*)RHS)->first; + ((const std::pair*)RHS)->first; return LHSS->getName().compare(RHSS->getName()); } /// GetSortedStubs - Return the entries from a DenseMap in a deterministic /// sorted orer. MachineModuleInfoMachO::SymbolListTy -MachineModuleInfoMachO::GetSortedStubs(const DenseMap &Map) { +MachineModuleInfoMachO::GetSortedStubs(const DenseMap &Map) { MachineModuleInfoMachO::SymbolListTy List(Map.begin(), Map.end()); if (!List.empty()) qsort(&List[0], List.size(), sizeof(List[0]), SortSymbolPair); Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=95205&r1=95204&r2=95205&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Wed Feb 3 00:18:30 2010 @@ -200,7 +200,7 @@ MachineModuleInfoMachO &MMIMachO = MMI->getObjFileInfo(); - const MCSymbol *&StubSym = + MCSymbol *&StubSym = GV->hasHiddenVisibility() ? MMIMachO.getHiddenGVStubEntry(Sym) : MMIMachO.getGVStubEntry(Sym); if (StubSym == 0) Modified: llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp?rev=95205&r1=95204&r2=95205&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp Wed Feb 3 00:18:30 2010 @@ -198,7 +198,7 @@ if (GV->isDeclaration() || GV->isWeakForLinker()) { // Dynamically-resolved functions need a stub for the function. MCSymbol *Sym = GetSymbolWithGlobalValueBase(GV, "$stub"); - const MCSymbol *&StubSym = + MCSymbol *&StubSym = MMI->getObjFileInfo().getFnStubEntry(Sym); if (StubSym == 0) StubSym = GetGlobalValueSymbol(GV); @@ -211,8 +211,8 @@ TempNameStr += StringRef(MO.getSymbolName()); TempNameStr += StringRef("$stub"); - const MCSymbol *Sym = GetExternalSymbolSymbol(TempNameStr.str()); - const MCSymbol *&StubSym = + MCSymbol *Sym = GetExternalSymbolSymbol(TempNameStr.str()); + MCSymbol *&StubSym = MMI->getObjFileInfo().getFnStubEntry(Sym); if (StubSym == 0) StubSym = GetExternalSymbolSymbol(MO.getSymbolName()); @@ -401,10 +401,10 @@ return; } - const MCSymbol *NLPSym = + MCSymbol *NLPSym = OutContext.GetOrCreateSymbol(StringRef(MAI->getGlobalPrefix())+ MO.getSymbolName()+"$non_lazy_ptr"); - const MCSymbol *&StubSym = + MCSymbol *&StubSym = MMI->getObjFileInfo().getGVStubEntry(NLPSym); if (StubSym == 0) StubSym = GetExternalSymbolSymbol(MO.getSymbolName()); @@ -422,7 +422,7 @@ (GV->isDeclaration() || GV->isWeakForLinker())) { if (!GV->hasHiddenVisibility()) { SymToPrint = GetSymbolWithGlobalValueBase(GV, "$non_lazy_ptr"); - const MCSymbol *&StubSym = + MCSymbol *&StubSym = MMI->getObjFileInfo().getGVStubEntry(SymToPrint); if (StubSym == 0) StubSym = GetGlobalValueSymbol(GV); @@ -430,7 +430,7 @@ GV->hasAvailableExternallyLinkage()) { SymToPrint = GetSymbolWithGlobalValueBase(GV, "$non_lazy_ptr"); - const MCSymbol *&StubSym = + MCSymbol *&StubSym = MMI->getObjFileInfo(). getHiddenGVStubEntry(SymToPrint); if (StubSym == 0) @@ -780,9 +780,8 @@ for (std::vector::const_iterator I = Personalities.begin(), E = Personalities.end(); I != E; ++I) { if (*I) { - const MCSymbol *NLPSym = - GetSymbolWithGlobalValueBase(*I, "$non_lazy_ptr"); - const MCSymbol *&StubSym = MMIMacho.getGVStubEntry(NLPSym); + MCSymbol *NLPSym = GetSymbolWithGlobalValueBase(*I, "$non_lazy_ptr"); + MCSymbol *&StubSym = MMIMacho.getGVStubEntry(NLPSym); StubSym = GetGlobalValueSymbol(*I); } } Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp?rev=95205&r1=95204&r2=95205&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Wed Feb 3 00:18:30 2010 @@ -132,20 +132,20 @@ MO.getTargetFlags() == X86II::MO_DARWIN_NONLAZY_PIC_BASE) { MCSymbol *Sym = GetSymbolWithGlobalValueBase(GV, "$non_lazy_ptr"); - const MCSymbol *&StubSym = + MCSymbol *&StubSym = MMI->getObjFileInfo().getGVStubEntry(Sym); if (StubSym == 0) StubSym = GetGlobalValueSymbol(GV); } else if (MO.getTargetFlags() == X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE){ MCSymbol *Sym = GetSymbolWithGlobalValueBase(GV, "$non_lazy_ptr"); - const MCSymbol *&StubSym = + MCSymbol *&StubSym = MMI->getObjFileInfo().getHiddenGVStubEntry(Sym); if (StubSym == 0) StubSym = GetGlobalValueSymbol(GV); } else if (MO.getTargetFlags() == X86II::MO_DARWIN_STUB) { MCSymbol *Sym = GetSymbolWithGlobalValueBase(GV, "$stub"); - const MCSymbol *&StubSym = + MCSymbol *&StubSym = MMI->getObjFileInfo().getFnStubEntry(Sym); if (StubSym == 0) StubSym = GetGlobalValueSymbol(GV); @@ -167,8 +167,8 @@ TempNameStr += StringRef(MO.getSymbolName()); TempNameStr += StringRef("$stub"); - const MCSymbol *Sym = GetExternalSymbolSymbol(TempNameStr.str()); - const MCSymbol *&StubSym = + MCSymbol *Sym = GetExternalSymbolSymbol(TempNameStr.str()); + MCSymbol *&StubSym = MMI->getObjFileInfo().getFnStubEntry(Sym); if (StubSym == 0) { TempNameStr.erase(TempNameStr.end()-5, TempNameStr.end()); Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp?rev=95205&r1=95204&r2=95205&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Wed Feb 3 00:18:30 2010 @@ -82,7 +82,7 @@ Name += "$non_lazy_ptr"; MCSymbol *Sym = Ctx.GetOrCreateSymbol(Name.str()); - const MCSymbol *&StubSym = getMachOMMI().getGVStubEntry(Sym); + MCSymbol *&StubSym = getMachOMMI().getGVStubEntry(Sym); if (StubSym == 0) StubSym = AsmPrinter.GetGlobalValueSymbol(GV); return Sym; @@ -90,7 +90,7 @@ case X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE: { Name += "$non_lazy_ptr"; MCSymbol *Sym = Ctx.GetOrCreateSymbol(Name.str()); - const MCSymbol *&StubSym = getMachOMMI().getHiddenGVStubEntry(Sym); + MCSymbol *&StubSym = getMachOMMI().getHiddenGVStubEntry(Sym); if (StubSym == 0) StubSym = AsmPrinter.GetGlobalValueSymbol(GV); return Sym; @@ -98,7 +98,7 @@ case X86II::MO_DARWIN_STUB: { Name += "$stub"; MCSymbol *Sym = Ctx.GetOrCreateSymbol(Name.str()); - const MCSymbol *&StubSym = getMachOMMI().getFnStubEntry(Sym); + MCSymbol *&StubSym = getMachOMMI().getFnStubEntry(Sym); if (StubSym == 0) StubSym = AsmPrinter.GetGlobalValueSymbol(GV); return Sym; @@ -139,7 +139,7 @@ case X86II::MO_DARWIN_STUB: { Name += "$stub"; MCSymbol *Sym = Ctx.GetOrCreateSymbol(Name.str()); - const MCSymbol *&StubSym = getMachOMMI().getFnStubEntry(Sym); + MCSymbol *&StubSym = getMachOMMI().getFnStubEntry(Sym); if (StubSym == 0) { Name.erase(Name.end()-5, Name.end()); Modified: llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp?rev=95205&r1=95204&r2=95205&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp (original) +++ llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp Wed Feb 3 00:18:30 2010 @@ -35,7 +35,7 @@ // Add information about the stub reference to MachOMMI so that the stub gets // emitted by the asmprinter. MCSymbol *Sym = getContext().GetOrCreateSymbol(Name.str()); - const MCSymbol *&StubSym = MachOMMI.getGVStubEntry(Sym); + MCSymbol *&StubSym = MachOMMI.getGVStubEntry(Sym); if (StubSym == 0) { Name.clear(); Mang->getNameWithPrefix(Name, GV, false); From sabre at nondot.org Wed Feb 3 00:21:16 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 06:21:16 -0000 Subject: [llvm-commits] [llvm] r95206 - /llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Message-ID: <201002030621.o136LGCZ010359@zion.cs.uiuc.edu> Author: lattner Date: Wed Feb 3 00:21:16 2010 New Revision: 95206 URL: http://llvm.org/viewvc/llvm-project?rev=95206&view=rev Log: make the x86 backend emit darwin stubs through mcstreamer instead of textually. Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp?rev=95206&r1=95205&r2=95206&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Wed Feb 3 00:21:16 2010 @@ -27,6 +27,7 @@ #include "llvm/Type.h" #include "llvm/Assembly/Writer.h" #include "llvm/MC/MCContext.h" +#include "llvm/MC/MCExpr.h" #include "llvm/MC/MCSectionMachO.h" #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSymbol.h" @@ -502,14 +503,17 @@ OutStreamer.SwitchSection(TheSection); for (unsigned i = 0, e = Stubs.size(); i != e; ++i) { - O << *Stubs[i].first << ":\n"; - // Get the MCSymbol without the $stub suffix. - O << "\t.indirect_symbol " << *Stubs[i].second; - O << "\n\thlt ; hlt ; hlt ; hlt ; hlt\n"; + // L_foo$stub: + OutStreamer.EmitLabel(Stubs[i].first); + // .indirect_symbol _foo + OutStreamer.EmitSymbolAttribute(Stubs[i].second, MCSA_IndirectSymbol); + // hlt; hlt; hlt; hlt; hlt hlt = 0xf4 = -12. + const char HltInsts[] = { -12, -12, -12, -12, -12 }; + OutStreamer.EmitBytes(StringRef(HltInsts, 5), 0/*addrspace*/); } - O << '\n'; Stubs.clear(); + OutStreamer.AddBlankLine(); } // Output stubs for external and common global variables. @@ -522,10 +526,15 @@ OutStreamer.SwitchSection(TheSection); for (unsigned i = 0, e = Stubs.size(); i != e; ++i) { - O << *Stubs[i].first << ":\n\t.indirect_symbol " << *Stubs[i].second; - O << "\n\t.long\t0\n"; + // L_foo$non_lazy_ptr: + OutStreamer.EmitLabel(Stubs[i].first); + // .indirect_symbol _foo + OutStreamer.EmitSymbolAttribute(Stubs[i].second, MCSA_IndirectSymbol); + // .long 0 + OutStreamer.EmitIntValue(0, 4/*size*/, 0/*addrspace*/); } Stubs.clear(); + OutStreamer.AddBlankLine(); } Stubs = MMIMacho.GetHiddenGVStubList(); @@ -536,8 +545,16 @@ for (unsigned i = 0, e = Stubs.size(); i != e; ++i) { O << *Stubs[i].first << ":\n" << MAI->getData32bitsDirective(); O << *Stubs[i].second << '\n'; + + // L_foo$non_lazy_ptr: + OutStreamer.EmitLabel(Stubs[i].first); + // .long _foo + OutStreamer.EmitValue(MCSymbolRefExpr::Create(Stubs[i].second, + OutContext), + 4/*size*/, 0/*addrspace*/); } Stubs.clear(); + OutStreamer.AddBlankLine(); } // Funny Darwin hack: This flag tells the linker that no global symbols From sabre at nondot.org Wed Feb 3 00:28:13 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 06:28:13 -0000 Subject: [llvm-commits] [llvm] r95207 - /llvm/trunk/lib/MC/MCAsmStreamer.cpp Message-ID: <201002030628.o136SDoS010752@zion.cs.uiuc.edu> Author: lattner Date: Wed Feb 3 00:28:13 2010 New Revision: 95207 URL: http://llvm.org/viewvc/llvm-project?rev=95207&view=rev Log: print instruction encodings with the existing comment facilities, so that llvm-mc -show-encoding prints like this: hlt ## encoding: [0xf4] instead of like this: hlt # encoding: [0xf4] Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=95207&r1=95206&r2=95207&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Wed Feb 3 00:28:13 2010 @@ -527,28 +527,27 @@ void MCAsmStreamer::EmitInstruction(const MCInst &Inst) { assert(CurSection && "Cannot emit contents before setting section!"); + // Show the encoding in a comment if we have a code emitter. + if (Emitter) { + SmallString<256> Code; + raw_svector_ostream VecOS(Code); + Emitter->EncodeInstruction(Inst, VecOS); + VecOS.flush(); + + raw_ostream &OS = GetCommentOS(); + OS << "encoding: ["; + for (unsigned i = 0, e = Code.size(); i != e; ++i) { + if (i) + OS << ','; + OS << format("%#04x", uint8_t(Code[i])); + } + OS << "]\n"; + } + // If we have an AsmPrinter, use that to print. if (InstPrinter) { InstPrinter->printInst(&Inst); EmitEOL(); - - // Show the encoding if we have a code emitter. - if (Emitter) { - SmallString<256> Code; - raw_svector_ostream VecOS(Code); - Emitter->EncodeInstruction(Inst, VecOS); - VecOS.flush(); - - OS.indent(20); - OS << " # encoding: ["; - for (unsigned i = 0, e = Code.size(); i != e; ++i) { - if (i) - OS << ','; - OS << format("%#04x", uint8_t(Code[i])); - } - OS << "]\n"; - } - return; } From sabre at nondot.org Wed Feb 3 00:41:18 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 06:41:18 -0000 Subject: [llvm-commits] [llvm] r95208 - /llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Message-ID: <201002030641.o136fIJg011320@zion.cs.uiuc.edu> Author: lattner Date: Wed Feb 3 00:41:18 2010 New Revision: 95208 URL: http://llvm.org/viewvc/llvm-project?rev=95208&view=rev Log: revert r95206, it is apparently causing bootstrap failure on i386-darwin9 Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp?rev=95208&r1=95207&r2=95208&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Wed Feb 3 00:41:18 2010 @@ -27,7 +27,6 @@ #include "llvm/Type.h" #include "llvm/Assembly/Writer.h" #include "llvm/MC/MCContext.h" -#include "llvm/MC/MCExpr.h" #include "llvm/MC/MCSectionMachO.h" #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSymbol.h" @@ -503,17 +502,14 @@ OutStreamer.SwitchSection(TheSection); for (unsigned i = 0, e = Stubs.size(); i != e; ++i) { - // L_foo$stub: - OutStreamer.EmitLabel(Stubs[i].first); - // .indirect_symbol _foo - OutStreamer.EmitSymbolAttribute(Stubs[i].second, MCSA_IndirectSymbol); - // hlt; hlt; hlt; hlt; hlt hlt = 0xf4 = -12. - const char HltInsts[] = { -12, -12, -12, -12, -12 }; - OutStreamer.EmitBytes(StringRef(HltInsts, 5), 0/*addrspace*/); + O << *Stubs[i].first << ":\n"; + // Get the MCSymbol without the $stub suffix. + O << "\t.indirect_symbol " << *Stubs[i].second; + O << "\n\thlt ; hlt ; hlt ; hlt ; hlt\n"; } + O << '\n'; Stubs.clear(); - OutStreamer.AddBlankLine(); } // Output stubs for external and common global variables. @@ -526,15 +522,10 @@ OutStreamer.SwitchSection(TheSection); for (unsigned i = 0, e = Stubs.size(); i != e; ++i) { - // L_foo$non_lazy_ptr: - OutStreamer.EmitLabel(Stubs[i].first); - // .indirect_symbol _foo - OutStreamer.EmitSymbolAttribute(Stubs[i].second, MCSA_IndirectSymbol); - // .long 0 - OutStreamer.EmitIntValue(0, 4/*size*/, 0/*addrspace*/); + O << *Stubs[i].first << ":\n\t.indirect_symbol " << *Stubs[i].second; + O << "\n\t.long\t0\n"; } Stubs.clear(); - OutStreamer.AddBlankLine(); } Stubs = MMIMacho.GetHiddenGVStubList(); @@ -545,16 +536,8 @@ for (unsigned i = 0, e = Stubs.size(); i != e; ++i) { O << *Stubs[i].first << ":\n" << MAI->getData32bitsDirective(); O << *Stubs[i].second << '\n'; - - // L_foo$non_lazy_ptr: - OutStreamer.EmitLabel(Stubs[i].first); - // .long _foo - OutStreamer.EmitValue(MCSymbolRefExpr::Create(Stubs[i].second, - OutContext), - 4/*size*/, 0/*addrspace*/); } Stubs.clear(); - OutStreamer.AddBlankLine(); } // Funny Darwin hack: This flag tells the linker that no global symbols From sabre at nondot.org Wed Feb 3 00:42:38 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 06:42:38 -0000 Subject: [llvm-commits] [llvm] r95209 - /llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Message-ID: <201002030642.o136gcaa011369@zion.cs.uiuc.edu> Author: lattner Date: Wed Feb 3 00:42:38 2010 New Revision: 95209 URL: http://llvm.org/viewvc/llvm-project?rev=95209&view=rev Log: reapply r95206, this time actually delete the code I'm replacing in the third stub case. Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp?rev=95209&r1=95208&r2=95209&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Wed Feb 3 00:42:38 2010 @@ -27,6 +27,7 @@ #include "llvm/Type.h" #include "llvm/Assembly/Writer.h" #include "llvm/MC/MCContext.h" +#include "llvm/MC/MCExpr.h" #include "llvm/MC/MCSectionMachO.h" #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSymbol.h" @@ -502,14 +503,17 @@ OutStreamer.SwitchSection(TheSection); for (unsigned i = 0, e = Stubs.size(); i != e; ++i) { - O << *Stubs[i].first << ":\n"; - // Get the MCSymbol without the $stub suffix. - O << "\t.indirect_symbol " << *Stubs[i].second; - O << "\n\thlt ; hlt ; hlt ; hlt ; hlt\n"; + // L_foo$stub: + OutStreamer.EmitLabel(Stubs[i].first); + // .indirect_symbol _foo + OutStreamer.EmitSymbolAttribute(Stubs[i].second, MCSA_IndirectSymbol); + // hlt; hlt; hlt; hlt; hlt hlt = 0xf4 = -12. + const char HltInsts[] = { -12, -12, -12, -12, -12 }; + OutStreamer.EmitBytes(StringRef(HltInsts, 5), 0/*addrspace*/); } - O << '\n'; Stubs.clear(); + OutStreamer.AddBlankLine(); } // Output stubs for external and common global variables. @@ -522,10 +526,15 @@ OutStreamer.SwitchSection(TheSection); for (unsigned i = 0, e = Stubs.size(); i != e; ++i) { - O << *Stubs[i].first << ":\n\t.indirect_symbol " << *Stubs[i].second; - O << "\n\t.long\t0\n"; + // L_foo$non_lazy_ptr: + OutStreamer.EmitLabel(Stubs[i].first); + // .indirect_symbol _foo + OutStreamer.EmitSymbolAttribute(Stubs[i].second, MCSA_IndirectSymbol); + // .long 0 + OutStreamer.EmitIntValue(0, 4/*size*/, 0/*addrspace*/); } Stubs.clear(); + OutStreamer.AddBlankLine(); } Stubs = MMIMacho.GetHiddenGVStubList(); @@ -534,10 +543,15 @@ EmitAlignment(2); for (unsigned i = 0, e = Stubs.size(); i != e; ++i) { - O << *Stubs[i].first << ":\n" << MAI->getData32bitsDirective(); - O << *Stubs[i].second << '\n'; + // L_foo$non_lazy_ptr: + OutStreamer.EmitLabel(Stubs[i].first); + // .long _foo + OutStreamer.EmitValue(MCSymbolRefExpr::Create(Stubs[i].second, + OutContext), + 4/*size*/, 0/*addrspace*/); } Stubs.clear(); + OutStreamer.AddBlankLine(); } // Funny Darwin hack: This flag tells the linker that no global symbols From baldrick at free.fr Wed Feb 3 01:33:23 2010 From: baldrick at free.fr (Duncan Sands) Date: Wed, 03 Feb 2010 08:33:23 +0100 Subject: [llvm-commits] [PATCH] Move --march, --mcpu, and --mattr to TargetMachine.cpp (issue199072) In-Reply-To: <001636c925856e78ab047ea97663@google.com> References: <001636c925856e78ab047ea97663@google.com> Message-ID: <4B6926C3.4040205@free.fr> Hi, > Please review this at http://codereview.appspot.com/199072/show what is the advantage of using this codereview thingy? Ciao, Duncan. From baldrick at free.fr Wed Feb 3 02:42:17 2010 From: baldrick at free.fr (Duncan Sands) Date: Wed, 03 Feb 2010 08:42:17 -0000 Subject: [llvm-commits] [dragonegg] r95210 - in /dragonegg/trunk: llvm-convert.cpp llvm-internal.h Message-ID: <201002030842.o138gHug018543@zion.cs.uiuc.edu> Author: baldrick Date: Wed Feb 3 02:42:16 2010 New Revision: 95210 URL: http://llvm.org/viewvc/llvm-project?rev=95210&view=rev Log: Clean negation code - make use of NSW/NUW flags. Modified: dragonegg/trunk/llvm-convert.cpp dragonegg/trunk/llvm-internal.h Modified: dragonegg/trunk/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=95210&r1=95209&r2=95210&view=diff ============================================================================== --- dragonegg/trunk/llvm-convert.cpp (original) +++ dragonegg/trunk/llvm-convert.cpp Wed Feb 3 02:42:16 2010 @@ -1360,6 +1360,18 @@ return Builder.CreateNSWMul(LHS, RHS); } +/// CreateAnyNeg - Negate an LLVM scalar value with the given GCC type. Does +/// not support complex numbers. The type is used to set overflow flags. +Value *TreeToLLVM::CreateAnyNeg(Value *V, tree_node *type) { + if (FLOAT_TYPE_P(type)) + return Builder.CreateFNeg(V); + if (TYPE_OVERFLOW_WRAPS(type)) + return Builder.CreateNeg(V); + if (TYPE_UNSIGNED(type)) + return Builder.CreateNUWNeg(V); + return Builder.CreateNSWNeg(V); +} + /// CreateAnySub - Subtract two LLVM scalar values with the given GCC type. /// Does not support complex numbers. The type is used to set overflow flags. Value *TreeToLLVM::CreateAnySub(Value *LHS, Value *RHS, tree_node *type) { @@ -5911,14 +5923,14 @@ } Value *TreeToLLVM::EmitReg_CONJ_EXPR(tree op) { - // ~(a+ib) = a + i*-b + tree elt_type = TREE_TYPE(TREE_TYPE(op)); Value *R, *I; - SplitComplex(EmitRegister(op), R, I, TREE_TYPE(TREE_TYPE(op))); - if (I->getType()->isFloatingPoint()) - I = Builder.CreateFNeg(I); - else - I = Builder.CreateNeg(I); - return CreateComplex(R, I, TREE_TYPE(TREE_TYPE(op))); + SplitComplex(EmitRegister(op), R, I, elt_type); + + // ~(a+ib) = a + i*-b + I = CreateAnyNeg(I, elt_type); + + return CreateComplex(R, I, elt_type); } Value *TreeToLLVM::EmitReg_CONVERT_EXPR(tree type, tree op) { @@ -5928,25 +5940,20 @@ Value *TreeToLLVM::EmitReg_NEGATE_EXPR(tree op) { Value *V = EmitRegister(op); + tree type = TREE_TYPE(op); - if (TREE_CODE(TREE_TYPE(op)) != COMPLEX_TYPE) { - if (V->getType()->isFPOrFPVector()) - return Builder.CreateFNeg(V); - bool HasNSW = !TYPE_OVERFLOW_WRAPS(TREE_TYPE(op)); - return HasNSW ? Builder.CreateNSWNeg(V) : Builder.CreateNeg(V); - } + if (TREE_CODE(type) == COMPLEX_TYPE) { + tree elt_type = TREE_TYPE(type); + Value *R, *I; SplitComplex(V, R, I, elt_type); - // -(a+ib) = -a + i*-b - Value *R, *I; - SplitComplex(V, R, I, TREE_TYPE(TREE_TYPE(op))); - if (R->getType()->isFloatingPoint()) { - R = Builder.CreateFNeg(R); - I = Builder.CreateFNeg(I); - } else { - R = Builder.CreateNeg(R); - I = Builder.CreateNeg(I); + // -(a+ib) = -a + i*-b + R = CreateAnyNeg(R, elt_type); + I = CreateAnyNeg(I, elt_type); + + return CreateComplex(R, I, elt_type); } - return CreateComplex(R, I, TREE_TYPE(TREE_TYPE(op))); + + return CreateAnyNeg(V, type); } Value *TreeToLLVM::EmitReg_PAREN_EXPR(tree op) { Modified: dragonegg/trunk/llvm-internal.h URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-internal.h?rev=95210&r1=95209&r2=95210&view=diff ============================================================================== --- dragonegg/trunk/llvm-internal.h (original) +++ dragonegg/trunk/llvm-internal.h Wed Feb 3 02:42:16 2010 @@ -481,6 +481,10 @@ /// Does not support complex numbers. The type is used to set overflow flags. Value *CreateAnyMul(Value *LHS, Value *RHS, tree_node *type); + /// CreateAnyNeg - Negate an LLVM scalar value with the given GCC type. Does + /// not support complex numbers. The type is used to set overflow flags. + Value *CreateAnyNeg(Value *V, tree_node *type); + /// CreateAnySub - Subtract two LLVM scalar values with the given GCC type. /// Does not support complex numbers. Value *CreateAnySub(Value *LHS, Value *RHS, tree_node *type); From xuzhongxing at gmail.com Wed Feb 3 03:04:12 2010 From: xuzhongxing at gmail.com (Zhongxing Xu) Date: Wed, 03 Feb 2010 09:04:12 -0000 Subject: [llvm-commits] [llvm] r95212 - /llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Message-ID: <201002030904.o1394CNC028752@zion.cs.uiuc.edu> Author: zhongxingxu Date: Wed Feb 3 03:04:11 2010 New Revision: 95212 URL: http://llvm.org/viewvc/llvm-project?rev=95212&view=rev Log: Add constructors. Modified: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Modified: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h?rev=95212&r1=95211&r2=95212&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h (original) +++ llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Wed Feb 3 03:04:11 2010 @@ -92,6 +92,9 @@ typedef typename ImutInfo::data_type_ref data_type_ref; public: + ImutIntervalAVLFactory(BumpPtrAllocator &Alloc) + : ImutAVLFactory(Alloc) {} + TreeTy *Add(TreeTy *T, value_type_ref V) { T = Add_internal(V,T); MarkImmutable(T); @@ -202,6 +205,8 @@ ImutIntervalAVLFactory > F; public: + Factory(BumpPtrAllocator& Alloc) : F(Alloc) {} + ImmutableIntervalMap GetEmptyMap() { return ImmutableIntervalMap(F.GetEmptyTree()); } From xuzhongxing at gmail.com Wed Feb 3 03:05:25 2010 From: xuzhongxing at gmail.com (Zhongxing Xu) Date: Wed, 03 Feb 2010 09:05:25 -0000 Subject: [llvm-commits] [llvm] r95213 - /llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Message-ID: <201002030905.o1395QXc029278@zion.cs.uiuc.edu> Author: zhongxingxu Date: Wed Feb 3 03:05:21 2010 New Revision: 95213 URL: http://llvm.org/viewvc/llvm-project?rev=95213&view=rev Log: Remove redundant declaration. Modified: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Modified: llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h?rev=95213&r1=95212&r2=95213&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h (original) +++ llvm/trunk/include/llvm/ADT/ImmutableIntervalMap.h Wed Feb 3 03:05:21 2010 @@ -79,8 +79,6 @@ } }; -template class ImutIntervalAVLFactory; - template class ImutIntervalAVLFactory : public ImutAVLFactory { typedef ImutAVLTree TreeTy; From baldrick at free.fr Wed Feb 3 04:27:27 2010 From: baldrick at free.fr (Duncan Sands) Date: Wed, 03 Feb 2010 10:27:27 -0000 Subject: [llvm-commits] [dragonegg] r95218 - /dragonegg/trunk/llvm-backend.cpp Message-ID: <201002031027.o13ARRT4003006@zion.cs.uiuc.edu> Author: baldrick Date: Wed Feb 3 04:27:26 2010 New Revision: 95218 URL: http://llvm.org/viewvc/llvm-project?rev=95218&view=rev Log: Port commit 95129 (lattner) from llvm-gcc: update for recent api changes. Modified: dragonegg/trunk/llvm-backend.cpp Modified: dragonegg/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=95218&r1=95217&r2=95218&view=diff ============================================================================== --- dragonegg/trunk/llvm-backend.cpp (original) +++ dragonegg/trunk/llvm-backend.cpp Wed Feb 3 04:27:26 2010 @@ -672,21 +672,14 @@ // Note, this also adds codegenerator level optimization passes. InitializeOutputStreams(false); switch (TheTarget->addPassesToEmitFile(*PM, FormattedOutStream, - TargetMachine::AssemblyFile, + TargetMachine::CGFT_AssemblyFile, OptLevel)) { default: - case FileModel::Error: errs() << "Error interfacing to target machine!\n"; exit(1); - case FileModel::AsmFile: + case TargetMachine::CGFT_AssemblyFile: break; } - - if (TheTarget->addPassesToEmitFileFinish(*PM, (MachineCodeEmitter *)0, - OptLevel)) { - errs() << "Error interfacing to target machine!\n"; - exit(1); - } } if (HasPerFunctionPasses) { @@ -771,21 +764,14 @@ // Note, this also adds codegenerator level optimization passes. InitializeOutputStreams(false); switch (TheTarget->addPassesToEmitFile(*PM, FormattedOutStream, - TargetMachine::AssemblyFile, + TargetMachine::CGFT_AssemblyFile, OptLevel)) { default: - case FileModel::Error: errs() << "Error interfacing to target machine!\n"; exit(1); - case FileModel::AsmFile: + case TargetMachine::CGFT_AssemblyFile: break; } - - if (TheTarget->addPassesToEmitFileFinish(*PM, (MachineCodeEmitter *)0, - OptLevel)) { - errs() << "Error interfacing to target machine!\n"; - exit(1); - } } } From baldrick at free.fr Wed Feb 3 04:31:52 2010 From: baldrick at free.fr (Duncan Sands) Date: Wed, 03 Feb 2010 10:31:52 -0000 Subject: [llvm-commits] [dragonegg] r95219 - /dragonegg/trunk/llvm-backend.cpp Message-ID: <201002031031.o13AVqtV003239@zion.cs.uiuc.edu> Author: baldrick Date: Wed Feb 3 04:31:52 2010 New Revision: 95219 URL: http://llvm.org/viewvc/llvm-project?rev=95219&view=rev Log: Port commit 95204 (lattner) from llvm-gcc: update for llvm api change. Modified: dragonegg/trunk/llvm-backend.cpp Modified: dragonegg/trunk/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=95219&r1=95218&r2=95219&view=diff ============================================================================== --- dragonegg/trunk/llvm-backend.cpp (original) +++ dragonegg/trunk/llvm-backend.cpp Wed Feb 3 04:31:52 2010 @@ -671,14 +671,11 @@ // Normal mode, emit a .s file by running the code generator. // Note, this also adds codegenerator level optimization passes. InitializeOutputStreams(false); - switch (TheTarget->addPassesToEmitFile(*PM, FormattedOutStream, - TargetMachine::CGFT_AssemblyFile, - OptLevel)) { - default: + if (TheTarget->addPassesToEmitFile(*PM, FormattedOutStream, + TargetMachine::CGFT_AssemblyFile, + OptLevel)) { errs() << "Error interfacing to target machine!\n"; exit(1); - case TargetMachine::CGFT_AssemblyFile: - break; } } @@ -763,14 +760,11 @@ // Normal mode, emit a .s file by running the code generator. // Note, this also adds codegenerator level optimization passes. InitializeOutputStreams(false); - switch (TheTarget->addPassesToEmitFile(*PM, FormattedOutStream, - TargetMachine::CGFT_AssemblyFile, - OptLevel)) { - default: + if (TheTarget->addPassesToEmitFile(*PM, FormattedOutStream, + TargetMachine::CGFT_AssemblyFile, + OptLevel)) { errs() << "Error interfacing to target machine!\n"; exit(1); - case TargetMachine::CGFT_AssemblyFile: - break; } } } From jyasskin at google.com Wed Feb 3 10:18:14 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Wed, 3 Feb 2010 08:18:14 -0800 Subject: [llvm-commits] [PATCH] Move --march, --mcpu, and --mattr to TargetMachine.cpp (issue199072) In-Reply-To: <4B6926C3.4040205@free.fr> References: <001636c925856e78ab047ea97663@google.com> <4B6926C3.4040205@free.fr> Message-ID: On Tue, Feb 2, 2010 at 11:33 PM, Duncan Sands wrote: > Hi, > >> Please review this at http://codereview.appspot.com/199072/show > > what is the advantage of using this codereview thingy? You can double-click on a line you want to comment on, and all the context is already there. And when I update the patchset, everyone can immediately see that I've changed it and what I've changed, rather than having to re-scan the diff. But Rietveld (codereview.appspot.com) puts the "Please review" line into the email on its own. I don't really care if you want to review the diff instead (which I linked and is available through the "Download raw patch set" link on Rietveld). Jeffrey From bob.wilson at apple.com Wed Feb 3 11:23:56 2010 From: bob.wilson at apple.com (Bob Wilson) Date: Wed, 03 Feb 2010 17:23:56 -0000 Subject: [llvm-commits] [llvm] r95224 - /llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp Message-ID: <201002031723.o13HNuAM020202@zion.cs.uiuc.edu> Author: bwilson Date: Wed Feb 3 11:23:56 2010 New Revision: 95224 URL: http://llvm.org/viewvc/llvm-project?rev=95224&view=rev Log: Adjust the heuristics used to decide when SROA is likely to be profitable. The SRThreshold value makes perfect sense for checking if an entire aggregate should be promoted to a scalar integer, but it is not so good for splitting an aggregate into its separate elements. A struct may contain a large embedded array along with some scalar fields that would benefit from being split apart by SROA. Even if the total aggregate size is large, it may still be good to perform SROA. Thus, the most important piece of this patch is simply moving the aggregate size comparison vs. SRThreshold so that it guards only the aggregate promotion. We have also been checking the number of elements to decide if an aggregate should be split up. The limit of "SRThreshold/4" seemed rather arbitrary, and I don't think it's very useful to derive this limit from SRThreshold anyway. I've collected some data showing that the current default limit of 32 (since SRThreshold defaults to 128) is a reasonable cutoff for struct types. One thing suggested by the data is that distinguishing between structs and arrays might be useful. There are (obviously) a lot more large arrays than large structs (as measured by the number of elements and not the total size -- a large array inside a struct still counts as a single element given the way we do SROA right now). Out of 8377 arrays where we successfully performed SROA while compiling a large set of benchmarks, only 16 of them had more than 8 elements. And, for those 16 arrays, it's not at all clear that SROA was actually beneficial. So, to offset the compile time cost of investigating more large structs for SROA, the patch lowers the limit on array elements to 8. This fixes Apple Radar 7563690. Modified: llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp Modified: llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp?rev=95224&r1=95223&r2=95224&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp Wed Feb 3 11:23:56 2010 @@ -202,12 +202,18 @@ return Changed; } -/// getNumSAElements - Return the number of elements in the specific struct or -/// array. -static uint64_t getNumSAElements(const Type *T) { +/// ShouldAttemptScalarRepl - Decide if an alloca is a good candidate for +/// SROA. It must be a struct or array type with a small number of elements. +static bool ShouldAttemptScalarRepl(AllocaInst *AI) { + const Type *T = AI->getAllocatedType(); + // Do not promote any struct into more than 32 separate vars. if (const StructType *ST = dyn_cast(T)) - return ST->getNumElements(); - return cast(T)->getNumElements(); + return ST->getNumElements() <= 32; + // Arrays are much less likely to be safe for SROA; only consider + // them if they are very small. + if (const ArrayType *AT = dyn_cast(T)) + return AT->getNumElements() <= 8; + return false; } // performScalarRepl - This algorithm is a simple worklist driven algorithm, @@ -266,22 +272,18 @@ // Do not promote [0 x %struct]. if (AllocaSize == 0) continue; + // If the alloca looks like a good candidate for scalar replacement, and if + // all its users can be transformed, then split up the aggregate into its + // separate elements. + if (ShouldAttemptScalarRepl(AI) && isSafeAllocaToScalarRepl(AI)) { + DoScalarReplacement(AI, WorkList); + Changed = true; + continue; + } + // Do not promote any struct whose size is too big. if (AllocaSize > SRThreshold) continue; - if ((isa(AI->getAllocatedType()) || - isa(AI->getAllocatedType())) && - // Do not promote any struct into more than "32" separate vars. - getNumSAElements(AI->getAllocatedType()) <= SRThreshold/4) { - // Check that all of the users of the allocation are capable of being - // transformed. - if (isSafeAllocaToScalarRepl(AI)) { - DoScalarReplacement(AI, WorkList); - Changed = true; - continue; - } - } - // If we can turn this aggregate value (potentially with casts) into a // simple scalar value that can be mem2reg'd into a register value. // IsNotTrivial tracks whether this is something that mem2reg could have From gohman at apple.com Wed Feb 3 11:27:31 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 03 Feb 2010 17:27:31 -0000 Subject: [llvm-commits] [llvm] r95225 - in /llvm/trunk/docs/tutorial: LangImpl1.html LangImpl2.html LangImpl3.html LangImpl4.html LangImpl5.html LangImpl6.html LangImpl7.html LangImpl8.html OCamlLangImpl1.html OCamlLangImpl2.html OCamlLangImpl3.html OCamlLangImpl4.html OCamlLangImpl5.html OCamlLangImpl6.html OCamlLangImpl7.html Message-ID: <201002031727.o13HRWEH020351@zion.cs.uiuc.edu> Author: djg Date: Wed Feb 3 11:27:31 2010 New Revision: 95225 URL: http://llvm.org/viewvc/llvm-project?rev=95225&view=rev Log: Add "Author Date Id Revision" svn:keyword properties to these files, as is done with the other html files in doc, to hopefully keep strings like "Last modified" current. Modified: llvm/trunk/docs/tutorial/LangImpl1.html (contents, props changed) llvm/trunk/docs/tutorial/LangImpl2.html (contents, props changed) llvm/trunk/docs/tutorial/LangImpl3.html (contents, props changed) llvm/trunk/docs/tutorial/LangImpl4.html (contents, props changed) llvm/trunk/docs/tutorial/LangImpl5.html (contents, props changed) llvm/trunk/docs/tutorial/LangImpl6.html (contents, props changed) llvm/trunk/docs/tutorial/LangImpl7.html (contents, props changed) llvm/trunk/docs/tutorial/LangImpl8.html (contents, props changed) llvm/trunk/docs/tutorial/OCamlLangImpl1.html (contents, props changed) llvm/trunk/docs/tutorial/OCamlLangImpl2.html (contents, props changed) llvm/trunk/docs/tutorial/OCamlLangImpl3.html (contents, props changed) llvm/trunk/docs/tutorial/OCamlLangImpl4.html (contents, props changed) llvm/trunk/docs/tutorial/OCamlLangImpl5.html (contents, props changed) llvm/trunk/docs/tutorial/OCamlLangImpl6.html (contents, props changed) llvm/trunk/docs/tutorial/OCamlLangImpl7.html (contents, props changed) Modified: llvm/trunk/docs/tutorial/LangImpl1.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl1.html?rev=95225&r1=95224&r2=95225&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/LangImpl1.html (original) +++ llvm/trunk/docs/tutorial/LangImpl1.html Wed Feb 3 11:27:31 2010 @@ -342,7 +342,7 @@ Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date$ Propchange: llvm/trunk/docs/tutorial/LangImpl1.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: llvm/trunk/docs/tutorial/LangImpl2.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl2.html?rev=95225&r1=95224&r2=95225&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/LangImpl2.html (original) +++ llvm/trunk/docs/tutorial/LangImpl2.html Wed Feb 3 11:27:31 2010 @@ -1227,7 +1227,7 @@ Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date$ Propchange: llvm/trunk/docs/tutorial/LangImpl2.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: llvm/trunk/docs/tutorial/LangImpl3.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl3.html?rev=95225&r1=95224&r2=95225&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/LangImpl3.html (original) +++ llvm/trunk/docs/tutorial/LangImpl3.html Wed Feb 3 11:27:31 2010 @@ -1263,7 +1263,7 @@ Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2009-07-21 11:05:13 -0700 (Tue, 21 Jul 2009) $ + Last modified: $Date$ Propchange: llvm/trunk/docs/tutorial/LangImpl3.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: llvm/trunk/docs/tutorial/LangImpl4.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl4.html?rev=95225&r1=95224&r2=95225&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/LangImpl4.html (original) +++ llvm/trunk/docs/tutorial/LangImpl4.html Wed Feb 3 11:27:31 2010 @@ -1122,7 +1122,7 @@ Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date$ Propchange: llvm/trunk/docs/tutorial/LangImpl4.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: llvm/trunk/docs/tutorial/LangImpl5.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl5.html?rev=95225&r1=95224&r2=95225&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/LangImpl5.html (original) +++ llvm/trunk/docs/tutorial/LangImpl5.html Wed Feb 3 11:27:31 2010 @@ -1767,7 +1767,7 @@ Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date$ Propchange: llvm/trunk/docs/tutorial/LangImpl5.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: llvm/trunk/docs/tutorial/LangImpl6.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl6.html?rev=95225&r1=95224&r2=95225&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/LangImpl6.html (original) +++ llvm/trunk/docs/tutorial/LangImpl6.html Wed Feb 3 11:27:31 2010 @@ -1804,7 +1804,7 @@ Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date$ Propchange: llvm/trunk/docs/tutorial/LangImpl6.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: llvm/trunk/docs/tutorial/LangImpl7.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl7.html?rev=95225&r1=95224&r2=95225&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/LangImpl7.html (original) +++ llvm/trunk/docs/tutorial/LangImpl7.html Wed Feb 3 11:27:31 2010 @@ -2154,7 +2154,7 @@ Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date$ Propchange: llvm/trunk/docs/tutorial/LangImpl7.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: llvm/trunk/docs/tutorial/LangImpl8.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl8.html?rev=95225&r1=95224&r2=95225&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/LangImpl8.html (original) +++ llvm/trunk/docs/tutorial/LangImpl8.html Wed Feb 3 11:27:31 2010 @@ -359,7 +359,7 @@ Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date$ Propchange: llvm/trunk/docs/tutorial/LangImpl8.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: llvm/trunk/docs/tutorial/OCamlLangImpl1.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl1.html?rev=95225&r1=95224&r2=95225&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/OCamlLangImpl1.html (original) +++ llvm/trunk/docs/tutorial/OCamlLangImpl1.html Wed Feb 3 11:27:31 2010 @@ -359,7 +359,7 @@ Chris Lattner
Erick Tryzelaar
The LLVM Compiler Infrastructure
- Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date$ Propchange: llvm/trunk/docs/tutorial/OCamlLangImpl1.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: llvm/trunk/docs/tutorial/OCamlLangImpl2.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl2.html?rev=95225&r1=95224&r2=95225&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/OCamlLangImpl2.html (original) +++ llvm/trunk/docs/tutorial/OCamlLangImpl2.html Wed Feb 3 11:27:31 2010 @@ -1039,7 +1039,7 @@ Chris Lattner Erick Tryzelaar
The LLVM Compiler Infrastructure
- Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date$ Propchange: llvm/trunk/docs/tutorial/OCamlLangImpl2.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: llvm/trunk/docs/tutorial/OCamlLangImpl3.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl3.html?rev=95225&r1=95224&r2=95225&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/OCamlLangImpl3.html (original) +++ llvm/trunk/docs/tutorial/OCamlLangImpl3.html Wed Feb 3 11:27:31 2010 @@ -1085,7 +1085,7 @@ Chris Lattner
Erick Tryzelaar
The LLVM Compiler Infrastructure
- Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date$ Propchange: llvm/trunk/docs/tutorial/OCamlLangImpl3.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: llvm/trunk/docs/tutorial/OCamlLangImpl4.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl4.html?rev=95225&r1=95224&r2=95225&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/OCamlLangImpl4.html (original) +++ llvm/trunk/docs/tutorial/OCamlLangImpl4.html Wed Feb 3 11:27:31 2010 @@ -1032,7 +1032,7 @@ Chris Lattner
Erick Tryzelaar
The LLVM Compiler Infrastructure
- Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date$ Propchange: llvm/trunk/docs/tutorial/OCamlLangImpl4.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: llvm/trunk/docs/tutorial/OCamlLangImpl5.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl5.html?rev=95225&r1=95224&r2=95225&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/OCamlLangImpl5.html (original) +++ llvm/trunk/docs/tutorial/OCamlLangImpl5.html Wed Feb 3 11:27:31 2010 @@ -1563,7 +1563,7 @@ Chris Lattner
Erick Tryzelaar
The LLVM Compiler Infrastructure
- Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date$ Propchange: llvm/trunk/docs/tutorial/OCamlLangImpl5.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: llvm/trunk/docs/tutorial/OCamlLangImpl6.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl6.html?rev=95225&r1=95224&r2=95225&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/OCamlLangImpl6.html (original) +++ llvm/trunk/docs/tutorial/OCamlLangImpl6.html Wed Feb 3 11:27:31 2010 @@ -1568,7 +1568,7 @@ Chris Lattner
Erick Tryzelaar
The LLVM Compiler Infrastructure
- Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date$ Propchange: llvm/trunk/docs/tutorial/OCamlLangImpl6.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Modified: llvm/trunk/docs/tutorial/OCamlLangImpl7.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl7.html?rev=95225&r1=95224&r2=95225&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/OCamlLangImpl7.html (original) +++ llvm/trunk/docs/tutorial/OCamlLangImpl7.html Wed Feb 3 11:27:31 2010 @@ -1901,7 +1901,7 @@ Chris Lattner
The LLVM Compiler Infrastructure
Erick Tryzelaar
- Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $ + Last modified: $Date$ Propchange: llvm/trunk/docs/tutorial/OCamlLangImpl7.html ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision From gvenn.cfe.dev at gmail.com Wed Feb 3 06:00:03 2010 From: gvenn.cfe.dev at gmail.com (Garrison Venn) Date: Wed, 03 Feb 2010 12:00:03 -0000 Subject: [llvm-commits] [llvm] r95221 - /llvm/trunk/examples/HowToUseJIT/HowToUseJIT.cpp Message-ID: <201002031200.o13C03Jq006948@zion.cs.uiuc.edu> Author: gvenn Date: Wed Feb 3 06:00:02 2010 New Revision: 95221 URL: http://llvm.org/viewvc/llvm-project?rev=95221&view=rev Log: Repository access test commit Modified: llvm/trunk/examples/HowToUseJIT/HowToUseJIT.cpp Modified: llvm/trunk/examples/HowToUseJIT/HowToUseJIT.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/HowToUseJIT/HowToUseJIT.cpp?rev=95221&r1=95220&r2=95221&view=diff ============================================================================== --- llvm/trunk/examples/HowToUseJIT/HowToUseJIT.cpp (original) +++ llvm/trunk/examples/HowToUseJIT/HowToUseJIT.cpp Wed Feb 3 06:00:02 2010 @@ -12,7 +12,7 @@ // // Goal: // The goal of this snippet is to create in the memory -// the LLVM module consisting of two functions as follow: +// the LLVM module consisting of two functions as follow: // // int add1(int x) { // return x+1; From daniel at zuster.org Wed Feb 3 12:18:30 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 03 Feb 2010 18:18:30 -0000 Subject: [llvm-commits] [llvm] r95227 - in /llvm/trunk: include/llvm/MC/MCStreamer.h lib/MC/MCAsmStreamer.cpp tools/llvm-mc/llvm-mc.cpp Message-ID: <201002031818.o13IIU2I022370@zion.cs.uiuc.edu> Author: ddunbar Date: Wed Feb 3 12:18:30 2010 New Revision: 95227 URL: http://llvm.org/viewvc/llvm-project?rev=95227&view=rev Log: llvm-mc: Add --show-inst option, for showing the MCInst inline with the assembly output. Modified: llvm/trunk/include/llvm/MC/MCStreamer.h llvm/trunk/lib/MC/MCAsmStreamer.cpp llvm/trunk/tools/llvm-mc/llvm-mc.cpp Modified: llvm/trunk/include/llvm/MC/MCStreamer.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=95227&r1=95226&r2=95227&view=diff ============================================================================== --- llvm/trunk/include/llvm/MC/MCStreamer.h (original) +++ llvm/trunk/include/llvm/MC/MCStreamer.h Wed Feb 3 12:18:30 2010 @@ -269,11 +269,21 @@ /// createAsmStreamer - Create a machine code streamer which will print out /// assembly for the native target, suitable for compiling with a native /// assembler. + /// + /// \param InstPrint - If given, the instruction printer to use. If not given + /// the MCInst representation will be printed. + /// + /// \param CE - If given, a code emitter to use to show the instruction + /// encoding inline with the assembly. + /// + /// \param ShowInst - Whether to show the MCInst representation inline with + /// the assembly. MCStreamer *createAsmStreamer(MCContext &Ctx, formatted_raw_ostream &OS, const MCAsmInfo &MAI, bool isLittleEndian, bool isVerboseAsm, MCInstPrinter *InstPrint = 0, - MCCodeEmitter *CE = 0); + MCCodeEmitter *CE = 0, + bool ShowInst = false); // FIXME: These two may end up getting rolled into a single // createObjectStreamer interface, which implements the assembler backend, and Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=95227&r1=95226&r2=95227&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Wed Feb 3 12:18:30 2010 @@ -29,20 +29,25 @@ class MCAsmStreamer : public MCStreamer { formatted_raw_ostream &OS; const MCAsmInfo &MAI; - bool IsLittleEndian, IsVerboseAsm; MCInstPrinter *InstPrinter; MCCodeEmitter *Emitter; SmallString<128> CommentToEmit; raw_svector_ostream CommentStream; + + unsigned IsLittleEndian : 1; + unsigned IsVerboseAsm : 1; + unsigned ShowInst : 1; + public: MCAsmStreamer(MCContext &Context, formatted_raw_ostream &os, const MCAsmInfo &mai, bool isLittleEndian, bool isVerboseAsm, MCInstPrinter *printer, - MCCodeEmitter *emitter) - : MCStreamer(Context), OS(os), MAI(mai), IsLittleEndian(isLittleEndian), - IsVerboseAsm(isVerboseAsm), InstPrinter(printer), Emitter(emitter), - CommentStream(CommentToEmit) {} + MCCodeEmitter *emitter, bool showInst) + : MCStreamer(Context), OS(os), MAI(mai), InstPrinter(printer), + Emitter(emitter), CommentStream(CommentToEmit), + IsLittleEndian(isLittleEndian), IsVerboseAsm(isVerboseAsm), + ShowInst(showInst) {} ~MCAsmStreamer() {} bool isLittleEndian() const { return IsLittleEndian; } @@ -527,13 +532,21 @@ void MCAsmStreamer::EmitInstruction(const MCInst &Inst) { assert(CurSection && "Cannot emit contents before setting section!"); + // Show the MCInst if enabled. + if (ShowInst) { + raw_ostream &OS = GetCommentOS(); + OS << "inst: "; + Inst.print(OS, &MAI); + OS << "\n"; + } + // Show the encoding in a comment if we have a code emitter. if (Emitter) { SmallString<256> Code; raw_svector_ostream VecOS(Code); Emitter->EncodeInstruction(Inst, VecOS); VecOS.flush(); - + raw_ostream &OS = GetCommentOS(); OS << "encoding: ["; for (unsigned i = 0, e = Code.size(); i != e; ++i) { @@ -543,29 +556,24 @@ } OS << "]\n"; } - - // If we have an AsmPrinter, use that to print. - if (InstPrinter) { - InstPrinter->printInst(&Inst); - EmitEOL(); - return; - } - // Otherwise fall back to a structural printing for now. Eventually we should - // always have access to the target specific printer. - Inst.print(OS, &MAI); + // If we have an AsmPrinter, use that to print, otherwise dump the MCInst. + if (InstPrinter) + InstPrinter->printInst(&Inst); + else + Inst.print(OS, &MAI); EmitEOL(); } void MCAsmStreamer::Finish() { OS.flush(); } - + MCStreamer *llvm::createAsmStreamer(MCContext &Context, formatted_raw_ostream &OS, const MCAsmInfo &MAI, bool isLittleEndian, bool isVerboseAsm, MCInstPrinter *IP, - MCCodeEmitter *CE) { + MCCodeEmitter *CE, bool ShowInst) { return new MCAsmStreamer(Context, OS, MAI, isLittleEndian, isVerboseAsm, - IP, CE); + IP, CE, ShowInst); } Modified: llvm/trunk/tools/llvm-mc/llvm-mc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/llvm-mc.cpp?rev=95227&r1=95226&r2=95227&view=diff ============================================================================== --- llvm/trunk/tools/llvm-mc/llvm-mc.cpp (original) +++ llvm/trunk/tools/llvm-mc/llvm-mc.cpp Wed Feb 3 12:18:30 2010 @@ -46,6 +46,9 @@ static cl::opt ShowEncoding("show-encoding", cl::desc("Show instruction encodings")); +static cl::opt +ShowInst("show-inst", cl::desc("Show internal instruction representation")); + static cl::opt OutputAsmVariant("output-asm-variant", cl::desc("Syntax variant to use for output printing")); @@ -266,7 +269,8 @@ CE.reset(TheTarget->createCodeEmitter(*TM)); Str.reset(createAsmStreamer(Ctx, *Out, *MAI, TM->getTargetData()->isLittleEndian(), - /*asmverbose*/true, IP.get(), CE.get())); + /*asmverbose*/true, IP.get(), CE.get(), + ShowInst)); } else { assert(FileType == OFT_ObjectFile && "Invalid file type!"); CE.reset(TheTarget->createCodeEmitter(*TM)); From jyasskin at google.com Wed Feb 3 12:23:23 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Wed, 03 Feb 2010 18:23:23 -0000 Subject: [llvm-commits] [llvm] r95229 - /llvm/trunk/docs/index.html Message-ID: <201002031823.o13INNvv022641@zion.cs.uiuc.edu> Author: jyasskin Date: Wed Feb 3 12:23:23 2010 New Revision: 95229 URL: http://llvm.org/viewvc/llvm-project?rev=95229&view=rev Log: Mention the version in the documentation index and link to the 2.6 docs, which is what most readers will actually be aiming for. Modified: llvm/trunk/docs/index.html Modified: llvm/trunk/docs/index.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/index.html?rev=95229&r1=95228&r2=95229&view=diff ============================================================================== --- llvm/trunk/docs/index.html (original) +++ llvm/trunk/docs/index.html Wed Feb 3 12:23:23 2010 @@ -2,12 +2,15 @@ "http://www.w3.org/TR/html4/strict.dtd"> - Documentation for the LLVM System + Documentation for the LLVM System, version pre-2.7 -
Documentation for the LLVM System
+
Documentation for the LLVM System, version pre-2.7
+ +

If you are using the most recent release of LLVM, +see the llvm-2.6 documentation.

From clattner at apple.com Wed Feb 3 12:34:10 2010 From: clattner at apple.com (Chris Lattner) Date: Wed, 3 Feb 2010 10:34:10 -0800 Subject: [llvm-commits] [llvm] r95229 - /llvm/trunk/docs/index.html In-Reply-To: <201002031823.o13INNvv022641@zion.cs.uiuc.edu> References: <201002031823.o13INNvv022641@zion.cs.uiuc.edu> Message-ID: On Feb 3, 2010, at 10:23 AM, Jeffrey Yasskin wrote: > Author: jyasskin > Date: Wed Feb 3 12:23:23 2010 > New Revision: 95229 > > URL: http://llvm.org/viewvc/llvm-project?rev=95229&view=rev > Log: > Mention the version in the documentation index and link to the 2.6 docs, which > is what most readers will actually be aiming for. Instead of mentioning 2.6 and 2.7, how about just linking to releases/ instead of 2.6 and mention "SVN head" instead of 2.7. -Chris > > Modified: > llvm/trunk/docs/index.html > > Modified: llvm/trunk/docs/index.html > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/index.html?rev=95229&r1=95228&r2=95229&view=diff > > ============================================================================== > --- llvm/trunk/docs/index.html (original) > +++ llvm/trunk/docs/index.html Wed Feb 3 12:23:23 2010 > @@ -2,12 +2,15 @@ > "http://www.w3.org/TR/html4/strict.dtd"> > > > - Documentation for the LLVM System > + Documentation for the LLVM System, version pre-2.7 > > > > > -
Documentation for the LLVM System
> +
Documentation for the LLVM System, version pre-2.7
> + > +

If you are using the most recent release of LLVM, > +see the llvm-2.6 documentation.

> >
>
> > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From daniel at zuster.org Wed Feb 3 12:43:46 2010 From: daniel at zuster.org (Daniel Dunbar) Date: Wed, 03 Feb 2010 18:43:46 -0000 Subject: [llvm-commits] [llvm] r95230 - /llvm/trunk/test/lib/llvm.exp Message-ID: <201002031843.o13Ihk6R023728@zion.cs.uiuc.edu> Author: ddunbar Date: Wed Feb 3 12:43:46 2010 New Revision: 95230 URL: http://llvm.org/viewvc/llvm-project?rev=95230&view=rev Log: Add llvm_supports_darwin_and_target to DejaGNU as well, I'd almost forgotten it ever existed. :) Modified: llvm/trunk/test/lib/llvm.exp Modified: llvm/trunk/test/lib/llvm.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lib/llvm.exp?rev=95230&r1=95229&r2=95230&view=diff ============================================================================== --- llvm/trunk/test/lib/llvm.exp (original) +++ llvm/trunk/test/lib/llvm.exp Wed Feb 3 12:43:46 2010 @@ -301,6 +301,16 @@ return 0 } +proc llvm_supports_darwin_and_target { tgtName } { + global target_triplet + if { [ llvm_supports_target $tgtName ] } { + if { [regexp darwin $target_triplet match] } { + return 1 + } + } + return 0 +} + # This procedure provides an interface to check the BINDINGS_TO_BUILD makefile # variable to see if a particular binding has been configured to build. proc llvm_supports_binding { name } { From jyasskin at google.com Wed Feb 3 12:49:55 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Wed, 03 Feb 2010 18:49:55 -0000 Subject: [llvm-commits] [llvm] r95231 - /llvm/trunk/docs/index.html Message-ID: <201002031849.o13IntY2023951@zion.cs.uiuc.edu> Author: jyasskin Date: Wed Feb 3 12:49:55 2010 New Revision: 95231 URL: http://llvm.org/viewvc/llvm-project?rev=95231&view=rev Log: Make docs less specific about their versions, at Chris's suggestion. Modified: llvm/trunk/docs/index.html Modified: llvm/trunk/docs/index.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/index.html?rev=95231&r1=95230&r2=95231&view=diff ============================================================================== --- llvm/trunk/docs/index.html (original) +++ llvm/trunk/docs/index.html Wed Feb 3 12:49:55 2010 @@ -2,15 +2,16 @@ "http://www.w3.org/TR/html4/strict.dtd"> - Documentation for the LLVM System, version pre-2.7 + Documentation for the LLVM System at SVN head -
Documentation for the LLVM System, version pre-2.7
+
Documentation for the LLVM System at SVN head
-

If you are using the most recent release of LLVM, -see the llvm-2.6 documentation.

+

If you are using a released version of LLVM, +see the download page to find +your documentation.

From jyasskin at google.com Wed Feb 3 12:50:26 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Wed, 3 Feb 2010 10:50:26 -0800 Subject: [llvm-commits] [llvm] r95229 - /llvm/trunk/docs/index.html In-Reply-To: References: <201002031823.o13INNvv022641@zion.cs.uiuc.edu> Message-ID: On Wed, Feb 3, 2010 at 10:34 AM, Chris Lattner wrote: > > On Feb 3, 2010, at 10:23 AM, Jeffrey Yasskin wrote: > >> Author: jyasskin >> Date: Wed Feb ?3 12:23:23 2010 >> New Revision: 95229 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=95229&view=rev >> Log: >> Mention the version in the documentation index and link to the 2.6 docs, which >> is what most readers will actually be aiming for. > > Instead of mentioning 2.6 and 2.7, how about just linking to releases/ instead of 2.6 and mention "SVN head" instead of 2.7. Sure, done in r95231. From clattner at apple.com Wed Feb 3 12:55:36 2010 From: clattner at apple.com (Chris Lattner) Date: Wed, 3 Feb 2010 10:55:36 -0800 Subject: [llvm-commits] [llvm] r95229 - /llvm/trunk/docs/index.html In-Reply-To: References: <201002031823.o13INNvv022641@zion.cs.uiuc.edu> Message-ID: On Feb 3, 2010, at 10:50 AM, Jeffrey Yasskin wrote: > On Wed, Feb 3, 2010 at 10:34 AM, Chris Lattner wrote: >> >> On Feb 3, 2010, at 10:23 AM, Jeffrey Yasskin wrote: >> >>> Author: jyasskin >>> Date: Wed Feb 3 12:23:23 2010 >>> New Revision: 95229 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=95229&view=rev >>> Log: >>> Mention the version in the documentation index and link to the 2.6 docs, which >>> is what most readers will actually be aiming for. >> >> Instead of mentioning 2.6 and 2.7, how about just linking to releases/ instead of 2.6 and mention "SVN head" instead of 2.7. > > Sure, done in r95231. Thanks!! From gohman at apple.com Wed Feb 3 13:13:22 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 3 Feb 2010 11:13:22 -0800 Subject: [llvm-commits] [llvm] r95195 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/tailcall2.ll test/CodeGen/X86/tailcallfp2.ll In-Reply-To: <201002030328.o133S3Ls003457@zion.cs.uiuc.edu> References: <201002030328.o133S3Ls003457@zion.cs.uiuc.edu> Message-ID: On Feb 2, 2010, at 7:28 PM, Evan Cheng wrote: > Author: evancheng > Date: Tue Feb 2 21:28:02 2010 > New Revision: 95195 > > URL: http://llvm.org/viewvc/llvm-project?rev=95195&view=rev > Log: > Allow all types of callee's to be tail called. But avoid automatic tailcall if the callee is a result of bitcast to avoid losing necessary zext / sext etc. Hi Evan, I believe the real problem here is not bitcasted callees (which can't be reliably detected, since the bitcast could happen in code that isn't visible to the compiler). I believe the real problem here is with the signext attribute. In this code, with a direct call: declare signext i16 @foo(i32) nounwind define signext i16 @t7() nounwind { entry: %0 = tail call signext i16 @foo(i32 0) nounwind ret i16 %0 } LLVM without the tailcall optimization emits this: callq _foo movswl %ax, %ecx This means that even though the return types and attributes match, CodeGen still believes it needs to do caller-side sign extension. I don't know the details of why that is, but it says that it's not safe to do a tail call with a signext return attribute, regardless of what the callee is. The same appears to apply to the zeroext attribute also. Also, I've confirmed that GCC also uses caller-side casts and suppresses tail calls for both signed short and unsigned short. Dan From nlewycky at google.com Wed Feb 3 13:12:57 2010 From: nlewycky at google.com (Nick Lewycky) Date: Wed, 3 Feb 2010 11:12:57 -0800 Subject: [llvm-commits] patch: moving unreachable elimination to codegenprep In-Reply-To: <4B6907EF.4050003@mxc.ca> References: <4B68588F.7070906@mxc.ca> <4B6907EF.4050003@mxc.ca> Message-ID: On 2 February 2010 21:21, Nick Lewycky wrote: > Jakob, I'll make the tweaks to InlineCost that you proposed and post an > updated patch with the results of a nightly test run. Realize that I'm > expecting no visible performance difference at all since no code in the > nightly test uses __builtin_unreachable(). > I've attached the updated patch, and the reference (without the patch) and report (with the patch) nightly test results. What they show is what noise looks like in a llvm-test run. :-) Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100203/73f602df/attachment.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100203/73f602df/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: preserve-unreachable3.patch Type: text/x-diff Size: 23752 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100203/73f602df/attachment.bin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100203/73f602df/attachment-0002.html From jyasskin at google.com Wed Feb 3 13:18:05 2010 From: jyasskin at google.com (Jeffrey Yasskin) Date: Wed, 03 Feb 2010 19:18:05 -0000 Subject: [llvm-commits] [llvm] r95236 - in /llvm/trunk: include/llvm/ExecutionEngine/ExecutionEngine.h lib/ExecutionEngine/ExecutionEngine.cpp Message-ID: <201002031918.o13JI5n0025458@zion.cs.uiuc.edu> Author: jyasskin Date: Wed Feb 3 13:18:04 2010 New Revision: 95236 URL: http://llvm.org/viewvc/llvm-project?rev=95236&view=rev Log: r94686 changed all ModuleProvider parameters to Modules, which made the 1-argument ExecutionEngine::create(Module*) ambiguous with the signature that used to be ExecutionEngine::create(ModuleProvider*, defaulted_params). Fixed by removing the 1-argument create(). Fixes PR6221. Modified: llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Modified: llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h?rev=95236&r1=95235&r2=95236&view=diff ============================================================================== --- llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h (original) +++ llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h Wed Feb 3 13:18:04 2010 @@ -157,11 +157,6 @@ // default freeMachineCodeForFunction works. bool GVsWithCode = true); - /// create - This is the factory method for creating an execution engine which - /// is appropriate for the current machine. This takes ownership of the - /// module. - static ExecutionEngine *create(Module *M); - /// createJIT - This is the factory method for creating a JIT for the current /// machine, it does not fall back to the interpreter. This takes ownership /// of the Module and JITMemoryManager if successful. Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=95236&r1=95235&r2=95236&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Wed Feb 3 13:18:04 2010 @@ -387,10 +387,6 @@ .create(); } -ExecutionEngine *ExecutionEngine::create(Module *M) { - return EngineBuilder(M).create(); -} - ExecutionEngine *EngineBuilder::create() { // Make sure we can resolve symbols in the program as well. The zero arg // to the function tells DynamicLibrary to load the program, not a library. From evan.cheng at apple.com Wed Feb 3 13:33:37 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 3 Feb 2010 11:33:37 -0800 Subject: [llvm-commits] [llvm] r95195 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/tailcall2.ll test/CodeGen/X86/tailcallfp2.ll In-Reply-To: References: <201002030328.o133S3Ls003457@zion.cs.uiuc.edu> Message-ID: <698F7FF5-B344-4C97-9A1E-0D6440779FC8@apple.com> On Feb 3, 2010, at 11:13 AM, Dan Gohman wrote: > > On Feb 2, 2010, at 7:28 PM, Evan Cheng wrote: > >> Author: evancheng >> Date: Tue Feb 2 21:28:02 2010 >> New Revision: 95195 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=95195&view=rev >> Log: >> Allow all types of callee's to be tail called. But avoid automatic tailcall if the callee is a result of bitcast to avoid losing necessary zext / sext etc. > > Hi Evan, > > I believe the real problem here is not bitcasted callees (which > can't be reliably detected, since the bitcast could happen in code > that isn't visible to the compiler). I believe the real problem > here is with the signext attribute. Yes I am aware this is one of the issues (it caused miscompilation of llvm Module.cpp and others). For now, I think it makes sense to avoid tail calling these because the we can't reasonable claim the caller / callee signatures would match when a bitcast is involved. Evan > > In this code, with a direct call: > > declare signext i16 @foo(i32) nounwind > > define signext i16 @t7() nounwind { > entry: > %0 = tail call signext i16 @foo(i32 0) nounwind > ret i16 %0 > } > > LLVM without the tailcall optimization emits this: > > callq _foo > movswl %ax, %ecx > > This means that even though the return types and attributes > match, CodeGen still believes it needs to do caller-side sign > extension. I don't know the details of why that is, but it > says that it's not safe to do a tail call with a signext > return attribute, regardless of what the callee is. > > The same appears to apply to the zeroext attribute also. > > Also, I've confirmed that GCC also uses caller-side casts and > suppresses tail calls for both signed short and unsigned short. > > Dan > From evan.cheng at apple.com Wed Feb 3 13:36:13 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 3 Feb 2010 11:36:13 -0800 Subject: [llvm-commits] [llvm] r95195 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/tailcall2.ll test/CodeGen/X86/tailcallfp2.ll In-Reply-To: <698F7FF5-B344-4C97-9A1E-0D6440779FC8@apple.com> References: <201002030328.o133S3Ls003457@zion.cs.uiuc.edu> <698F7FF5-B344-4C97-9A1E-0D6440779FC8@apple.com> Message-ID: On Feb 3, 2010, at 11:33 AM, Evan Cheng wrote: > > On Feb 3, 2010, at 11:13 AM, Dan Gohman wrote: > >> >> On Feb 2, 2010, at 7:28 PM, Evan Cheng wrote: >> >>> Author: evancheng >>> Date: Tue Feb 2 21:28:02 2010 >>> New Revision: 95195 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=95195&view=rev >>> Log: >>> Allow all types of callee's to be tail called. But avoid automatic tailcall if the callee is a result of bitcast to avoid losing necessary zext / sext etc. >> >> Hi Evan, >> >> I believe the real problem here is not bitcasted callees (which >> can't be reliably detected, since the bitcast could happen in code >> that isn't visible to the compiler). I believe the real problem >> here is with the signext attribute. > > Yes I am aware this is one of the issues (it caused miscompilation of llvm Module.cpp and others). For now, I think it makes sense to avoid tail calling these because the we can't reasonable claim the caller / callee signatures would match when a bitcast is involved. Oh you mean we should disable tailcall opt when either the caller or callee result is sext / zext. Right now we allow tailcall opt when their attributes match. If the calling conventions match I don't see why that's not sufficient. Certainly I am not seeing any evidence that's a problem yet. Evan > > Evan > >> >> In this code, with a direct call: >> >> declare signext i16 @foo(i32) nounwind >> >> define signext i16 @t7() nounwind { >> entry: >> %0 = tail call signext i16 @foo(i32 0) nounwind >> ret i16 %0 >> } >> >> LLVM without the tailcall optimization emits this: >> >> callq _foo >> movswl %ax, %ecx >> >> This means that even though the return types and attributes >> match, CodeGen still believes it needs to do caller-side sign >> extension. I don't know the details of why that is, but it >> says that it's not safe to do a tail call with a signext >> return attribute, regardless of what the callee is. >> >> The same appears to apply to the zeroext attribute also. >> >> Also, I've confirmed that GCC also uses caller-side casts and >> suppresses tail calls for both signed short and unsigned short. >> >> Dan >> > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From dpatel at apple.com Wed Feb 3 13:57:19 2010 From: dpatel at apple.com (Devang Patel) Date: Wed, 03 Feb 2010 19:57:19 -0000 Subject: [llvm-commits] [llvm] r95240 - in /llvm/trunk: include/llvm/Analysis/DebugInfo.h lib/Analysis/DebugInfo.cpp lib/CodeGen/AsmPrinter/DwarfDebug.cpp Message-ID: <201002031957.o13JvJtQ027303@zion.cs.uiuc.edu> Author: dpatel Date: Wed Feb 3 13:57:19 2010 New Revision: 95240 URL: http://llvm.org/viewvc/llvm-project?rev=95240&view=rev Log: Provide interface to identifiy artificial methods. Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h llvm/trunk/lib/Analysis/DebugInfo.cpp llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=95240&r1=95239&r2=95240&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original) +++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Wed Feb 3 13:57:19 2010 @@ -375,6 +375,7 @@ DICompositeType getContainingType() const { return getFieldAs(13); } + unsigned isArtificial() const { return getUnsignedField(14); } StringRef getFilename() const { return getCompileUnit().getFilename();} StringRef getDirectory() const { return getCompileUnit().getDirectory();} @@ -595,7 +596,8 @@ bool isDefinition, unsigned VK = 0, unsigned VIndex = 0, - DIType = DIType()); + DIType = DIType(), + bool isArtificial = 0); /// CreateSubprogramDefinition - Create new subprogram descriptor for the /// given declaration. Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=95240&r1=95239&r2=95240&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/DebugInfo.cpp (original) +++ llvm/trunk/lib/Analysis/DebugInfo.cpp Wed Feb 3 13:57:19 2010 @@ -860,7 +860,8 @@ bool isLocalToUnit, bool isDefinition, unsigned VK, unsigned VIndex, - DIType ContainingType) { + DIType ContainingType, + bool isArtificial) { Value *Elts[] = { GetTagConstant(dwarf::DW_TAG_subprogram), @@ -876,9 +877,10 @@ ConstantInt::get(Type::getInt1Ty(VMContext), isDefinition), ConstantInt::get(Type::getInt32Ty(VMContext), (unsigned)VK), ConstantInt::get(Type::getInt32Ty(VMContext), VIndex), - ContainingType.getNode() + ContainingType.getNode(), + ConstantInt::get(Type::getInt1Ty(VMContext), isArtificial) }; - return DISubprogram(MDNode::get(VMContext, &Elts[0], 14)); + return DISubprogram(MDNode::get(VMContext, &Elts[0], 15)); } /// CreateSubprogramDefinition - Create new subprogram descriptor for the @@ -902,9 +904,10 @@ ConstantInt::get(Type::getInt1Ty(VMContext), true), DeclNode->getOperand(11), // Virtuality DeclNode->getOperand(12), // VIndex - DeclNode->getOperand(13) // Containting Type + DeclNode->getOperand(13), // Containting Type + DeclNode->getOperand(14) // isArtificial }; - return DISubprogram(MDNode::get(VMContext, &Elts[0], 14)); + return DISubprogram(MDNode::get(VMContext, &Elts[0], 15)); } /// CreateGlobalVariable - Create a new descriptor for the specified global. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=95240&r1=95239&r2=95240&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Feb 3 13:57:19 2010 @@ -1201,6 +1201,9 @@ } } + if (SP.isArtificial()) + addUInt(SPDie, dwarf::DW_AT_artificial, dwarf::DW_FORM_flag, 1); + // DW_TAG_inlined_subroutine may refer to this DIE. ModuleCU->insertDIE(SP.getNode(), SPDie); return SPDie; From gohman at apple.com Wed Feb 3 13:57:15 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 3 Feb 2010 11:57:15 -0800 Subject: [llvm-commits] patch: moving unreachable elimination to codegenprep In-Reply-To: References: <4B68588F.7070906@mxc.ca> <4B6907EF.4050003@mxc.ca> Message-ID: On 2 February 2010 21:21, Nick Lewycky wrote: > > Jakob, I'll make the tweaks to InlineCost that you proposed and post an > updated patch with the results of a nightly test run. Realize that I'm > expecting no visible performance difference at all since no code in the > nightly test uses __builtin_unreachable(). There is code which uses things like "noreturn" and other things which can lead to unreachable getting generated. Offhand you may be right that these wouldn't be affected though. This happens to be a very testable hypothesis :). Would you mind compiling some tests with and without the change, and diffing the .s files? I'd be interested in learning what kinds of diffs, if any, appear. I'm concerned that artificially keeping the condition instructions live will hamper the optimizer. Your benchmark results are good, however it's not clear if that's just a consequence of an absence of __builtin_unreachable or if that actually says something about the impact of artificial life on the optimizer. One comment on the patch itself: --- lib/Analysis/ScalarEvolution.cpp (revision 95201) +++ lib/Analysis/ScalarEvolution.cpp (working copy) + // Ignore faux exits. + for (unsigned i = 0; i != ExitingBlocks.size(); ++i) { + if (isa(ExitingBlocks[i]->front())) { + ExitingBlocks.erase(ExitingBlocks.begin() + i); + --i; + } + } ExitingBlocks is an unsorted array. Instead of deleting blocks from the middle of it, please swap the element to the end and pop_back(). Also, would it make sense to pull this code into the Loop(Base) class itself? There is other code that looks at loop exists and probably would need this. Dan From dpatel at apple.com Wed Feb 3 13:58:14 2010 From: dpatel at apple.com (Devang Patel) Date: Wed, 03 Feb 2010 19:58:14 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r95241 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Message-ID: <201002031958.o13JwEhs027354@zion.cs.uiuc.edu> Author: dpatel Date: Wed Feb 3 13:58:13 2010 New Revision: 95241 URL: http://llvm.org/viewvc/llvm-project?rev=95241&view=rev Log: Do not skip artificial methods that are used. The debugger uses this information to reconstruct virtual base info. Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=95241&r1=95240&r2=95241&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Wed Feb 3 13:58:13 2010 @@ -948,7 +948,8 @@ Member = TREE_CHAIN(Member)) { if (DECL_ABSTRACT_ORIGIN (Member)) continue; - if (DECL_ARTIFICIAL (Member)) continue; + // Ignore unused aritificial members. + if (DECL_ARTIFICIAL (Member) && !TREE_USED (Member)) continue; // In C++, TEMPLATE_DECLs are marked Ignored, and should be. if (DECL_P (Member) && DECL_IGNORED_P (Member)) continue; @@ -976,7 +977,8 @@ LinkageName, getOrCreateCompileUnit(MemLoc.file), MemLoc.line, SPTy, false, false, - Virtuality, VIndex, ContainingType); + Virtuality, VIndex, ContainingType, + DECL_ARTIFICIAL (Member)); EltTys.push_back(SP); SPCache[Member] = WeakVH(SP.getNode()); } From gohman at apple.com Wed Feb 3 14:07:39 2010 From: gohman at apple.com (Dan Gohman) Date: Wed, 3 Feb 2010 12:07:39 -0800 Subject: [llvm-commits] [llvm] r95195 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/tailcall2.ll test/CodeGen/X86/tailcallfp2.ll In-Reply-To: References: <201002030328.o133S3Ls003457@zion.cs.uiuc.edu> <698F7FF5-B344-4C97-9A1E-0D6440779FC8@apple.com> Message-ID: On Feb 3, 2010, at 11:36 AM, Evan Cheng wrote: > > On Feb 3, 2010, at 11:33 AM, Evan Cheng wrote: > >> >> On Feb 3, 2010, at 11:13 AM, Dan Gohman wrote: >> >>> >>> On Feb 2, 2010, at 7:28 PM, Evan Cheng wrote: >>> >>>> Author: evancheng >>>> Date: Tue Feb 2 21:28:02 2010 >>>> New Revision: 95195 >>>> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=95195&view=rev >>>> Log: >>>> Allow all types of callee's to be tail called. But avoid automatic tailcall if the callee is a result of bitcast to avoid losing necessary zext / sext etc. >>> >>> Hi Evan, >>> >>> I believe the real problem here is not bitcasted callees (which >>> can't be reliably detected, since the bitcast could happen in code >>> that isn't visible to the compiler). I believe the real problem >>> here is with the signext attribute. >> >> Yes I am aware this is one of the issues (it caused miscompilation of llvm Module.cpp and others). For now, I think it makes sense to avoid tail calling these because the we can't reasonable claim the caller / callee signatures would match when a bitcast is involved. > > Oh you mean we should disable tailcall opt when either the caller or callee result is sext / zext. > > Right now we allow tailcall opt when their attributes match. If the calling conventions match I don't see why that's not sufficient. Certainly I am not seeing any evidence that's a problem yet. Both GCC and llvm-gcc emit an explicit sign-extend in the caller for this C code on x86-32 and x86-64. short foo(void); short bar(void) { return foo(); } Also, GCC declines the tailcall optimization for this code. Dan From dpatel at apple.com Wed Feb 3 14:08:49 2010 From: dpatel at apple.com (Devang Patel) Date: Wed, 03 Feb 2010 20:08:49 -0000 Subject: [llvm-commits] [llvm] r95242 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Message-ID: <201002032008.o13K8nJA027849@zion.cs.uiuc.edu> Author: dpatel Date: Wed Feb 3 14:08:48 2010 New Revision: 95242 URL: http://llvm.org/viewvc/llvm-project?rev=95242&view=rev Log: Emit appropriate expression to find virtual base offset. Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=95242&r1=95241&r2=95242&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Feb 3 14:08:48 2010 @@ -1123,7 +1123,26 @@ // This is not a bitfield. addUInt(MemLocationDie, 0, dwarf::DW_FORM_udata, DT.getOffsetInBits() >> 3); - addBlock(MemberDie, dwarf::DW_AT_data_member_location, 0, MemLocationDie); + if (DT.getTag() == dwarf::DW_TAG_inheritance + && DT.isVirtual()) { + + // For C++, virtual base classes are not at fixed offset. Use following + // expression to extract appropriate offset from vtable. + // BaseAddr = ObAddr + *((*ObAddr) - Offset) + + DIEBlock *VBaseLocationDie = new DIEBlock(); + addUInt(VBaseLocationDie, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_dup); + addUInt(VBaseLocationDie, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_deref); + addUInt(VBaseLocationDie, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_constu); + addUInt(VBaseLocationDie, 0, dwarf::DW_FORM_udata, DT.getOffsetInBits()); + addUInt(VBaseLocationDie, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_minus); + addUInt(VBaseLocationDie, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_deref); + addUInt(VBaseLocationDie, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_plus); + + addBlock(MemberDie, dwarf::DW_AT_data_member_location, 0, + VBaseLocationDie); + } else + addBlock(MemberDie, dwarf::DW_AT_data_member_location, 0, MemLocationDie); if (DT.isProtected()) addUInt(MemberDie, dwarf::DW_AT_accessibility, dwarf::DW_FORM_flag, From dpatel at apple.com Wed Feb 3 14:09:41 2010 From: dpatel at apple.com (Devang Patel) Date: Wed, 03 Feb 2010 20:09:41 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r95243 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Message-ID: <201002032009.o13K9fPg027903@zion.cs.uiuc.edu> Author: dpatel Date: Wed Feb 3 14:09:41 2010 New Revision: 95243 URL: http://llvm.org/viewvc/llvm-project?rev=95243&view=rev Log: BINFO_VPTR_FIELD has the virtual base offset (-ve.) Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=95243&r1=95242&r2=95243&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Wed Feb 3 14:09:41 2010 @@ -880,6 +880,8 @@ unsigned Offset = BINFO_OFFSET(BInfo) ? getINTEGER_CSTVal(BINFO_OFFSET(BInfo))*8 : 0; + if (BINFO_VIRTUAL_P (BInfo)) + Offset = 0 - getINTEGER_CSTVal(BINFO_VPTR_FIELD (BInfo)); // FIXME : name, size, align etc... DIType DTy = DebugFactory.CreateDerivedType(DW_TAG_inheritance, From evan.cheng at apple.com Wed Feb 3 14:37:17 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 3 Feb 2010 12:37:17 -0800 Subject: [llvm-commits] [llvm] r95195 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/tailcall2.ll test/CodeGen/X86/tailcallfp2.ll In-Reply-To: References: <201002030328.o133S3Ls003457@zion.cs.uiuc.edu> <698F7FF5-B344-4C97-9A1E-0D6440779FC8@apple.com> Message-ID: On Feb 3, 2010, at 12:07 PM, Dan Gohman wrote: > > On Feb 3, 2010, at 11:36 AM, Evan Cheng wrote: > >> >> On Feb 3, 2010, at 11:33 AM, Evan Cheng wrote: >> >>> >>> On Feb 3, 2010, at 11:13 AM, Dan Gohman wrote: >>> >>>> >>>> On Feb 2, 2010, at 7:28 PM, Evan Cheng wrote: >>>> >>>>> Author: evancheng >>>>> Date: Tue Feb 2 21:28:02 2010 >>>>> New Revision: 95195 >>>>> >>>>> URL: http://llvm.org/viewvc/llvm-project?rev=95195&view=rev >>>>> Log: >>>>> Allow all types of callee's to be tail called. But avoid automatic tailcall if the callee is a result of bitcast to avoid losing necessary zext / sext etc. >>>> >>>> Hi Evan, >>>> >>>> I believe the real problem here is not bitcasted callees (which >>>> can't be reliably detected, since the bitcast could happen in code >>>> that isn't visible to the compiler). I believe the real problem >>>> here is with the signext attribute. >>> >>> Yes I am aware this is one of the issues (it caused miscompilation of llvm Module.cpp and others). For now, I think it makes sense to avoid tail calling these because the we can't reasonable claim the caller / callee signatures would match when a bitcast is involved. >> >> Oh you mean we should disable tailcall opt when either the caller or callee result is sext / zext. >> >> Right now we allow tailcall opt when their attributes match. If the calling conventions match I don't see why that's not sufficient. Certainly I am not seeing any evidence that's a problem yet. > > Both GCC and llvm-gcc emit an explicit sign-extend in the caller for this C code > on x86-32 and x86-64. > > short foo(void); > short bar(void) { return foo(); } > > Also, GCC declines the tailcall optimization for this code. I know. The question is whether that's just a missed optimization? Evan > > Dan > From criswell at uiuc.edu Wed Feb 3 14:53:58 2010 From: criswell at uiuc.edu (John Criswell) Date: Wed, 03 Feb 2010 20:53:58 -0000 Subject: [llvm-commits] [poolalloc] r95248 - /poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Message-ID: <201002032053.o13KrwI4029796@zion.cs.uiuc.edu> Author: criswell Date: Wed Feb 3 14:53:58 2010 New Revision: 95248 URL: http://llvm.org/viewvc/llvm-project?rev=95248&view=rev Log: Correct transformation of calloc() to poolcalloc(). The old code was passing one of the calloc() arguments twice if a cast needed to be inserted. Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PASimple.cpp?rev=95248&r1=95247&r2=95248&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Wed Feb 3 14:53:58 2010 @@ -271,7 +271,7 @@ InsertPt); if (NumElements->getType() != Int32Type) - NumElements = CastInst::CreateIntegerCast (Size, + NumElements = CastInst::CreateIntegerCast (NumElements, Int32Type, false, NumElements->getName(), From stoklund at 2pi.dk Wed Feb 3 14:55:06 2010 From: stoklund at 2pi.dk (Jakob Stoklund Olesen) Date: Wed, 3 Feb 2010 12:55:06 -0800 Subject: [llvm-commits] patch: moving unreachable elimination to codegenprep In-Reply-To: <4B6907EF.4050003@mxc.ca> References: <4B68588F.7070906@mxc.ca> <4B6907EF.4050003@mxc.ca> Message-ID: <0437A6DB-4E24-4388-A133-1F654703FEBB@2pi.dk> On Feb 2, 2010, at 9:21 PM, Nick Lewycky wrote: > Jakob Stoklund Olesen wrote: >> >> On Feb 2, 2010, at 8:53 AM, Nick Lewycky wrote: >> >>> This is a resurrection of the patch first discussed back in October 2009 to change the way unreachable is handled to make it live in the IR for as long as possible. The goal is to implement http://nondot.org/sabre/LLVMNotes/BuiltinUnreachable.txt in time for the LLVM 2.7 freeze so that python can make use of it when they land unladen-swallow. >> >> Nick, I couldn't find that discussion in the archives. Do you have any pointers? > > http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20091012/089120.html Thanks, it looks like Dan and Chris have already covered it. [...] > Jakob, I'll make the tweaks to InlineCost that you proposed and post an updated patch with the results of a nightly test run. Realize that I'm expecting no visible performance difference at all since no code in the nightly test uses __builtin_unreachable(). Thanks. Your update to InlineCost looks fine to me, but undead instructions feeding into the condition are still counted. I would like this patch better if you would implement Chris' suggestion of DCE'ing unreachable blocks with conditions that are too gross for the optimizer. As it stands there can be arbitrarily complex instructions feeding into the condition. /jakob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1929 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100203/9aa0a7fd/attachment.bin From enderby at apple.com Wed Feb 3 15:04:42 2010 From: enderby at apple.com (Kevin Enderby) Date: Wed, 03 Feb 2010 21:04:42 -0000 Subject: [llvm-commits] [llvm] r95252 - in /llvm/trunk: lib/Target/X86/AsmParser/X86AsmParser.cpp lib/Target/X86/X86InstrInfo.td test/MC/AsmParser/X86/x86_instructions.s Message-ID: <201002032104.o13L4hdx030360@zion.cs.uiuc.edu> Author: enderby Date: Wed Feb 3 15:04:42 2010 New Revision: 95252 URL: http://llvm.org/viewvc/llvm-project?rev=95252&view=rev Log: Added support for X86 instruction prefixes so llvm-mc can assemble them. The Lock prefix, Repeat string operation prefixes and the Segment override prefixes. Also added versions of the move string and store string instructions without the repeat prefixes to X86InstrInfo.td. And finally marked the rep versions of move/store string records in X86InstrInfo.td as isCodeGenOnly = 1 so tblgen is happy building the disassembler files. Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp llvm/trunk/lib/Target/X86/X86InstrInfo.td llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=95252&r1=95251&r2=95252&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Wed Feb 3 15:04:42 2010 @@ -462,8 +462,18 @@ if (Name.startswith("sal")) { std::string Tmp = "shl" + Name.substr(3).str(); Operands.push_back(X86Operand::CreateToken(Tmp, NameLoc)); - } else - Operands.push_back(X86Operand::CreateToken(Name, NameLoc)); + } else { + // FIXME: This is a hack. We eventually want to add a general pattern + // mechanism to be used in the table gen file for these assembly names that + // use the same opcodes. Also we should only allow the "alternate names" + // for rep and repne with the instructions they can only appear with. + StringRef PatchedName = Name; + if (Name == "repe" || Name == "repz") + PatchedName = "rep"; + else if (Name == "repnz") + PatchedName = "repne"; + Operands.push_back(X86Operand::CreateToken(PatchedName, NameLoc)); + } if (getLexer().isNot(AsmToken::EndOfStatement)) { Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=95252&r1=95251&r2=95252&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Wed Feb 3 15:04:42 2010 @@ -883,7 +883,7 @@ "lea{l}\t{$src|$dst}, {$dst|$src}", [(set GR32:$dst, lea32addr:$src)]>, Requires<[In32BitMode]>; -let Defs = [ECX,EDI,ESI], Uses = [ECX,EDI,ESI] in { +let Defs = [ECX,EDI,ESI], Uses = [ECX,EDI,ESI], isCodeGenOnly = 1 in { def REP_MOVSB : I<0xA4, RawFrm, (outs), (ins), "{rep;movsb|rep movsb}", [(X86rep_movs i8)]>, REP; def REP_MOVSW : I<0xA5, RawFrm, (outs), (ins), "{rep;movsw|rep movsw}", @@ -892,16 +892,31 @@ [(X86rep_movs i32)]>, REP; } -let Defs = [ECX,EDI], Uses = [AL,ECX,EDI] in +// These uses the DF flag in the EFLAGS register to inc or dec EDI and ESI +let Defs = [EDI,ESI], Uses = [EDI,ESI,EFLAGS] in { +def MOVSB : I<0xA4, RawFrm, (outs), (ins), "{movsb}", []>; +def MOVSW : I<0xA5, RawFrm, (outs), (ins), "{movsw}", []>, OpSize; +def MOVSD : I<0xA5, RawFrm, (outs), (ins), "{movsl|movsd}", []>; +} + +let Defs = [ECX,EDI], Uses = [AL,ECX,EDI], isCodeGenOnly = 1 in def REP_STOSB : I<0xAA, RawFrm, (outs), (ins), "{rep;stosb|rep stosb}", [(X86rep_stos i8)]>, REP; -let Defs = [ECX,EDI], Uses = [AX,ECX,EDI] in +let Defs = [ECX,EDI], Uses = [AX,ECX,EDI], isCodeGenOnly = 1 in def REP_STOSW : I<0xAB, RawFrm, (outs), (ins), "{rep;stosw|rep stosw}", [(X86rep_stos i16)]>, REP, OpSize; -let Defs = [ECX,EDI], Uses = [EAX,ECX,EDI] in +let Defs = [ECX,EDI], Uses = [EAX,ECX,EDI], isCodeGenOnly = 1 in def REP_STOSD : I<0xAB, RawFrm, (outs), (ins), "{rep;stosl|rep stosd}", [(X86rep_stos i32)]>, REP; +// These uses the DF flag in the EFLAGS register to inc or dec EDI and ESI +let Defs = [EDI], Uses = [AL,EDI,EFLAGS] in +def STOSB : I<0xAA, RawFrm, (outs), (ins), "{stosb}", []>; +let Defs = [EDI], Uses = [AX,EDI,EFLAGS] in +def STOSW : I<0xAB, RawFrm, (outs), (ins), "{stosw}", []>, OpSize; +let Defs = [EDI], Uses = [EAX,EDI,EFLAGS] in +def STOSD : I<0xAB, RawFrm, (outs), (ins), "{stosl|stosd}", []>; + def SCAS8 : I<0xAE, RawFrm, (outs), (ins), "scas{b}", []>; def SCAS16 : I<0xAF, RawFrm, (outs), (ins), "scas{w}", []>, OpSize; def SCAS32 : I<0xAF, RawFrm, (outs), (ins), "scas{l}", []>; @@ -1002,6 +1017,7 @@ "mov{l}\t{$src, $dst|$dst, $src}", [(set GR32:$dst, imm:$src)]>; } + def MOV8mi : Ii8 <0xC6, MRM0m, (outs), (ins i8mem :$dst, i8imm :$src), "mov{b}\t{$src, $dst|$dst, $src}", [(store (i8 imm:$src), addr:$dst)]>; @@ -4161,6 +4177,26 @@ def LLDT16m : I<0x00, MRM2m, (outs), (ins i16mem:$src), "lldt{w}\t$src", []>, TB; +// Lock instruction prefix +def LOCK_PREFIX : I<0xF0, RawFrm, (outs), (ins), "lock", []>; + +// Repeat string operation instruction prefixes +// These uses the DF flag in the EFLAGS register to inc or dec ECX +let Defs = [ECX], Uses = [ECX,EFLAGS] in { +// Repeat (used with INS, OUTS, MOVS, LODS and STOS) +def REP_PREFIX : I<0xF3, RawFrm, (outs), (ins), "rep", []>; +// Repeat while not equal (used with CMPS and SCAS) +def REPNE_PREFIX : I<0xF2, RawFrm, (outs), (ins), "repne", []>; +} + +// Segment override instruction prefixes +def CS_PREFIX : I<0x2E, RawFrm, (outs), (ins), "cs", []>; +def SS_PREFIX : I<0x36, RawFrm, (outs), (ins), "ss", []>; +def DS_PREFIX : I<0x3E, RawFrm, (outs), (ins), "ds", []>; +def ES_PREFIX : I<0x26, RawFrm, (outs), (ins), "es", []>; +def FS_PREFIX : I<0x64, RawFrm, (outs), (ins), "fs", []>; +def GS_PREFIX : I<0x65, RawFrm, (outs), (ins), "gs", []>; + // String manipulation instructions def LODSB : I<0xAC, RawFrm, (outs), (ins), "lodsb", []>; Modified: llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s?rev=95252&r1=95251&r2=95252&view=diff ============================================================================== --- llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s (original) +++ llvm/trunk/test/MC/AsmParser/X86/x86_instructions.s Wed Feb 3 15:04:42 2010 @@ -70,3 +70,71 @@ // CHECK: shll $2, %eax sall $2, %eax + +// CHECK: rep +// CHECK: insb + rep;insb + +// CHECK: rep +// CHECK: outsb + rep;outsb + +// CHECK: rep +// CHECK: movsb + rep;movsb + +// CHECK: rep +// CHECK: lodsb + rep;lodsb + +// CHECK: rep +// CHECK: stosb + rep;stosb + +// NOTE: repz and repe have the same opcode as rep +// CHECK: rep +// CHECK: cmpsb + repz;cmpsb + +// NOTE: repnz has the same opcode as repne +// CHECK: repne +// CHECK: cmpsb + repnz;cmpsb + +// NOTE: repe and repz have the same opcode as rep +// CHECK: rep +// CHECK: scasb + repe;scasb + +// CHECK: repne +// CHECK: scasb + repne;scasb + +// CHECK: lock +// CHECK: cmpxchgb %al, 0(%ebx) + lock;cmpxchgb %al, 0(%ebx) + +// CHECK: cs +// CHECK: movb 0(%eax), %al + cs;movb 0(%eax), %al + +// CHECK: ss +// CHECK: movb 0(%eax), %al + ss;movb 0(%eax), %al + +// CHECK: ds +// CHECK: movb 0(%eax), %al + ds;movb 0(%eax), %al + +// CHECK: es +// CHECK: movb 0(%eax), %al + es;movb 0(%eax), %al + +// CHECK: fs +// CHECK: movb 0(%eax), %al + fs;movb 0(%eax), %al + +// CHECK: gs +// CHECK: movb 0(%eax), %al + gs;movb 0(%eax), %al + From sabre at nondot.org Wed Feb 3 15:14:34 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 21:14:34 -0000 Subject: [llvm-commits] [llvm] r95254 - in /llvm/trunk/lib/Target/X86: X86.h X86CodeEmitter.cpp X86TargetMachine.cpp Message-ID: <201002032114.o13LEYIm030792@zion.cs.uiuc.edu> Author: lattner Date: Wed Feb 3 15:14:33 2010 New Revision: 95254 URL: http://llvm.org/viewvc/llvm-project?rev=95254&view=rev Log: rename createX86MCCodeEmitter to more accurately reflect what it creates. Modified: llvm/trunk/lib/Target/X86/X86.h llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Modified: llvm/trunk/lib/Target/X86/X86.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86.h?rev=95254&r1=95253&r2=95254&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86.h (original) +++ llvm/trunk/lib/Target/X86/X86.h Wed Feb 3 15:14:33 2010 @@ -49,7 +49,7 @@ FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM, JITCodeEmitter &JCE); -MCCodeEmitter *createX86MCCodeEmitter(const Target &, TargetMachine &TM); +MCCodeEmitter *createHeinousX86MCCodeEmitter(const Target &, TargetMachine &TM); /// createX86EmitCodeToMemory - Returns a pass that converts a register /// allocated function into raw machine code in a dynamically Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp?rev=95254&r1=95253&r2=95254&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Wed Feb 3 15:14:33 2010 @@ -1100,7 +1100,7 @@ } // Ok, now you can look. -MCCodeEmitter *llvm::createX86MCCodeEmitter(const Target &, - TargetMachine &TM) { +MCCodeEmitter *llvm::createHeinousX86MCCodeEmitter(const Target &, + TargetMachine &TM) { return new X86MCCodeEmitter(static_cast(TM)); } Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=95254&r1=95253&r2=95254&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original) +++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Wed Feb 3 15:14:33 2010 @@ -48,8 +48,10 @@ RegisterAsmInfoFn B(TheX86_64Target, createMCAsmInfo); // Register the code emitter. - TargetRegistry::RegisterCodeEmitter(TheX86_32Target, createX86MCCodeEmitter); - TargetRegistry::RegisterCodeEmitter(TheX86_64Target, createX86MCCodeEmitter); + TargetRegistry::RegisterCodeEmitter(TheX86_32Target, + createHeinousX86MCCodeEmitter); + TargetRegistry::RegisterCodeEmitter(TheX86_64Target, + createHeinousX86MCCodeEmitter); } From sabre at nondot.org Wed Feb 3 15:24:50 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 21:24:50 -0000 Subject: [llvm-commits] [llvm] r95256 - in /llvm/trunk/lib/Target/X86: CMakeLists.txt X86.h X86CodeEmitter.cpp X86MCCodeEmitter.cpp X86TargetMachine.cpp Message-ID: <201002032124.o13LOo2n031191@zion.cs.uiuc.edu> Author: lattner Date: Wed Feb 3 15:24:49 2010 New Revision: 95256 URL: http://llvm.org/viewvc/llvm-project?rev=95256&view=rev Log: stub out a new X86 encoder, which can be tried with -enable-new-x86-encoder until its stable. Added: llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp Modified: llvm/trunk/lib/Target/X86/CMakeLists.txt llvm/trunk/lib/Target/X86/X86.h llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Modified: llvm/trunk/lib/Target/X86/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/CMakeLists.txt?rev=95256&r1=95255&r2=95256&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/CMakeLists.txt (original) +++ llvm/trunk/lib/Target/X86/CMakeLists.txt Wed Feb 3 15:24:49 2010 @@ -25,6 +25,7 @@ X86InstrInfo.cpp X86JITInfo.cpp X86MCAsmInfo.cpp + X86MCCodeEmitter.cpp X86RegisterInfo.cpp X86Subtarget.cpp X86TargetMachine.cpp Modified: llvm/trunk/lib/Target/X86/X86.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86.h?rev=95256&r1=95255&r2=95256&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86.h (original) +++ llvm/trunk/lib/Target/X86/X86.h Wed Feb 3 15:24:49 2010 @@ -50,6 +50,7 @@ JITCodeEmitter &JCE); MCCodeEmitter *createHeinousX86MCCodeEmitter(const Target &, TargetMachine &TM); +MCCodeEmitter *createX86MCCodeEmitter(const Target &, TargetMachine &TM); /// createX86EmitCodeToMemory - Returns a pass that converts a register /// allocated function into raw machine code in a dynamically Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp?rev=95256&r1=95255&r2=95256&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Wed Feb 3 15:24:49 2010 @@ -1099,8 +1099,19 @@ }; } +#include "llvm/Support/CommandLine.h" + +static cl::opt EnableNewEncoder("enable-new-x86-encoder", + cl::ReallyHidden); + + // Ok, now you can look. -MCCodeEmitter *llvm::createHeinousX86MCCodeEmitter(const Target &, +MCCodeEmitter *llvm::createHeinousX86MCCodeEmitter(const Target &T, TargetMachine &TM) { + + // FIXME: Remove the heinous one when the new one works. + if (EnableNewEncoder) + return createX86MCCodeEmitter(T, TM); + return new X86MCCodeEmitter(static_cast(TM)); } Added: llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp?rev=95256&view=auto ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp (added) +++ llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp Wed Feb 3 15:24:49 2010 @@ -0,0 +1,41 @@ +//===-- X86/X86MCCodeEmitter.cpp - Convert X86 code to machine code -------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements the X86MCCodeEmitter class. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "x86-emitter" +#include "X86.h" +#include "X86TargetMachine.h" +#include "llvm/MC/MCCodeEmitter.h" +using namespace llvm; + +namespace { +class X86MCCodeEmitter : public MCCodeEmitter { + X86MCCodeEmitter(const X86MCCodeEmitter &); // DO NOT IMPLEMENT + void operator=(const X86MCCodeEmitter &); // DO NOT IMPLEMENT + X86TargetMachine &TM; +public: + X86MCCodeEmitter(X86TargetMachine &tm) : TM(tm) { + } + + ~X86MCCodeEmitter() {} + + void EncodeInstruction(const MCInst &MI, raw_ostream &OS) const { + } +}; + +} // end anonymous namespace + + +MCCodeEmitter *llvm::createX86MCCodeEmitter(const Target &, + TargetMachine &TM) { + return new X86MCCodeEmitter(static_cast(TM)); +} Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=95256&r1=95255&r2=95256&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original) +++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Wed Feb 3 15:24:49 2010 @@ -48,6 +48,7 @@ RegisterAsmInfoFn B(TheX86_64Target, createMCAsmInfo); // Register the code emitter. + // FIXME: Remove the heinous one when the new one works. TargetRegistry::RegisterCodeEmitter(TheX86_32Target, createHeinousX86MCCodeEmitter); TargetRegistry::RegisterCodeEmitter(TheX86_64Target, From gvenn.cfe.dev at gmail.com Wed Feb 3 15:33:28 2010 From: gvenn.cfe.dev at gmail.com (Garrison Venn) Date: Wed, 3 Feb 2010 16:33:28 -0500 Subject: [llvm-commits] [patch] ExceptionDemo patch for review Message-ID: The attached patch will add a JIT based exception handling example to the examples directory. Both zero cost example specific, and C++ foreign exception handling is demoed. The example's documentation fully explains how to run the example. Caveats: 1) The example uses an extremely simple type info model. 2) Only a single landing pad is used (one call to llvm.eh.selector) 3) llvm.eh.selector support for filter arguments is not given. 4) llvm.eh.typeid.for is not used. 5) Forced unwind behavior is not supported. 6) The code is written in a C style utilizing C++ APIs, and syntax. The LLVM?s C interface is NOT used, but statics, fprintf, and an inconsistent mixture of C and C++ casting are all utilized. 7) Pedantic, redundant, and inconsistent forcing of precedence exists in the code. 8) Very little if any error handling is given. 9) The example is currently intended for a UNIX C++ developer audience who is familiar with LLVM?s IR classes. 10) __attribute__((__aligned__)) is used. 11) The example has not been ported to WINDOWS. 12) The patch was tested for a debug build on 32bit X86 CentOS LINUX, and both a debug and release build on OS X 10.6.2 (64bit). 13) This version conforms to the latest mainline (2.7). Thanks in advance for any review comments. Garrison -------------- next part -------------- A non-text attachment was scrubbed... Name: ExceptionDemo.patch Type: application/octet-stream Size: 87991 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100203/5f622425/attachment.obj From evan.cheng at apple.com Wed Feb 3 15:39:04 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Feb 2010 21:39:04 -0000 Subject: [llvm-commits] [llvm] r95258 - /llvm/trunk/test/CodeGen/X86/2009-11-04-SubregCoalescingBug.ll Message-ID: <201002032139.o13Ld4HG032319@zion.cs.uiuc.edu> Author: evancheng Date: Wed Feb 3 15:39:04 2010 New Revision: 95258 URL: http://llvm.org/viewvc/llvm-project?rev=95258&view=rev Log: Make test less fragile Modified: llvm/trunk/test/CodeGen/X86/2009-11-04-SubregCoalescingBug.ll Modified: llvm/trunk/test/CodeGen/X86/2009-11-04-SubregCoalescingBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-11-04-SubregCoalescingBug.ll?rev=95258&r1=95257&r2=95258&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/2009-11-04-SubregCoalescingBug.ll (original) +++ llvm/trunk/test/CodeGen/X86/2009-11-04-SubregCoalescingBug.ll Wed Feb 3 15:39:04 2010 @@ -5,7 +5,7 @@ entry: ; CHECK: leal 15(%rsi), %edi ; CHECK-NOT: movl -; CHECK: jmp _foo +; CHECK: _foo %0 = add i32 %a, 15 ; [#uses=1] %1 = zext i32 %0 to i64 ; [#uses=1] tail call void @foo(i64 %1) nounwind From evan.cheng at apple.com Wed Feb 3 15:40:41 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 03 Feb 2010 21:40:41 -0000 Subject: [llvm-commits] [llvm] r95259 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/tailcall2.ll Message-ID: <201002032140.o13Lefib032396@zion.cs.uiuc.edu> Author: evancheng Date: Wed Feb 3 15:40:40 2010 New Revision: 95259 URL: http://llvm.org/viewvc/llvm-project?rev=95259&view=rev Log: Speculatively disable x86 automatic tail call optimization while we track down a self-hosting issue. Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/test/CodeGen/X86/tailcall2.ll Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=95259&r1=95258&r2=95259&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Feb 3 15:40:40 2010 @@ -52,6 +52,7 @@ STATISTIC(NumTailCalls, "Number of tail calls"); +static cl::opt TailCallLimit("tailcall-limit", cl::init(0)); static cl::opt DisableMMX("disable-mmx", cl::Hidden, cl::desc("Disable use of MMX")); @@ -2271,6 +2272,8 @@ // Look for obvious safe cases to perform tail call optimization that does not // requite ABI changes. This is what gcc calls sibcall. + if (NumTailCalls >= TailCallLimit) + return false; // Do not tail call optimize vararg calls for now. if (isVarArg) Modified: llvm/trunk/test/CodeGen/X86/tailcall2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/tailcall2.ll?rev=95259&r1=95258&r2=95259&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/tailcall2.ll (original) +++ llvm/trunk/test/CodeGen/X86/tailcall2.ll Wed Feb 3 15:40:40 2010 @@ -1,5 +1,6 @@ ; RUN: llc < %s -march=x86 -asm-verbose=false | FileCheck %s -check-prefix=32 ; RUN: llc < %s -march=x86-64 -asm-verbose=false | FileCheck %s -check-prefix=64 +; XFAIL: * define void @t1(i32 %x) nounwind ssp { entry: From sabre at nondot.org Wed Feb 3 15:43:43 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 21:43:43 -0000 Subject: [llvm-commits] [llvm] r95260 - /llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp Message-ID: <201002032143.o13LhhxB032511@zion.cs.uiuc.edu> Author: lattner Date: Wed Feb 3 15:43:43 2010 New Revision: 95260 URL: http://llvm.org/viewvc/llvm-project?rev=95260&view=rev Log: set up some infrastructure, some minor cleanups. Modified: llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp Modified: llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp?rev=95260&r1=95259&r2=95260&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp Wed Feb 3 15:43:43 2010 @@ -13,23 +13,31 @@ #define DEBUG_TYPE "x86-emitter" #include "X86.h" -#include "X86TargetMachine.h" +#include "X86InstrInfo.h" #include "llvm/MC/MCCodeEmitter.h" +#include "llvm/MC/MCInst.h" +#include "llvm/Support/raw_ostream.h" using namespace llvm; namespace { class X86MCCodeEmitter : public MCCodeEmitter { X86MCCodeEmitter(const X86MCCodeEmitter &); // DO NOT IMPLEMENT void operator=(const X86MCCodeEmitter &); // DO NOT IMPLEMENT - X86TargetMachine &TM; + const TargetMachine &TM; + const TargetInstrInfo &TII; public: - X86MCCodeEmitter(X86TargetMachine &tm) : TM(tm) { + X86MCCodeEmitter(TargetMachine &tm) + : TM(tm), TII(*TM.getInstrInfo()) { } ~X86MCCodeEmitter() {} - void EncodeInstruction(const MCInst &MI, raw_ostream &OS) const { + void EmitByte(unsigned char C, raw_ostream &OS) const { + OS << (char)C; } + + void EncodeInstruction(const MCInst &MI, raw_ostream &OS) const; + }; } // end anonymous namespace @@ -37,5 +45,31 @@ MCCodeEmitter *llvm::createX86MCCodeEmitter(const Target &, TargetMachine &TM) { - return new X86MCCodeEmitter(static_cast(TM)); + return new X86MCCodeEmitter(TM); +} + + + +void X86MCCodeEmitter:: +EncodeInstruction(const MCInst &MI, raw_ostream &OS) const { + unsigned Opcode = MI.getOpcode(); + const TargetInstrDesc &Desc = TII.get(Opcode); + + // Emit the lock opcode prefix as needed. + if (Desc.TSFlags & X86II::LOCK) + EmitByte(0xF0, OS); + + // Emit segment override opcode prefix as needed. + switch (Desc.TSFlags & X86II::SegOvrMask) { + default: assert(0 && "Invalid segment!"); + case 0: break; // No segment override! + case X86II::FS: + EmitByte(0x64, OS); + break; + case X86II::GS: + EmitByte(0x65, OS); + break; + } + + } From sabre at nondot.org Wed Feb 3 15:57:59 2010 From: sabre at nondot.org (Chris Lattner) Date: Wed, 03 Feb 2010 21:57:59 -0000 Subject: [llvm-commits] [llvm] r95261 - in /llvm/trunk/lib/Target/X86: X86CodeEmitter.cpp X86InstrInfo.h X86MCCodeEmitter.cpp Message-ID: <201002032157.o13Lvxqv000588@zion.cs.uiuc.edu> Author: lattner Date: Wed Feb 3 15:57:59 2010 New Revision: 95261 URL: http://llvm.org/viewvc/llvm-project?rev=95261&view=rev Log: enhance new encoder to support prefixes + RawFrm instructions with no operands. It can now handle define void @test2() nounwind { ret void } Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp llvm/trunk/lib/Target/X86/X86InstrInfo.h llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp?rev=95261&r1=95260&r2=95261&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Wed Feb 3 15:57:59 2010 @@ -559,7 +559,7 @@ // Skip the last source operand that is tied_to the dest reg. e.g. LXADD32 --NumOps; - unsigned char BaseOpcode = II->getBaseOpcodeFor(Desc); + unsigned char BaseOpcode = X86InstrInfo::getBaseOpcodeFor(*Desc); switch (Desc->TSFlags & X86II::FormMask) { default: llvm_unreachable("Unknown FormMask value in X86 MachineCodeEmitter!"); Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.h?rev=95261&r1=95260&r2=95261&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.h (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.h Wed Feb 3 15:57:59 2010 @@ -640,11 +640,11 @@ // getBaseOpcodeFor - This function returns the "base" X86 opcode for the // specified machine instruction. // - unsigned char getBaseOpcodeFor(const TargetInstrDesc *TID) const { - return TID->TSFlags >> X86II::OpcodeShift; + static unsigned char getBaseOpcodeFor(const TargetInstrDesc &TID) { + return TID.TSFlags >> X86II::OpcodeShift; } unsigned char getBaseOpcodeFor(unsigned Opcode) const { - return getBaseOpcodeFor(&get(Opcode)); + return getBaseOpcodeFor(get(Opcode)); } static bool isX86_64NonExtLowByteReg(unsigned reg) { Modified: llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp?rev=95261&r1=95260&r2=95261&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp Wed Feb 3 15:57:59 2010 @@ -54,13 +54,17 @@ EncodeInstruction(const MCInst &MI, raw_ostream &OS) const { unsigned Opcode = MI.getOpcode(); const TargetInstrDesc &Desc = TII.get(Opcode); - + unsigned TSFlags = Desc.TSFlags; + + // FIXME: We should emit the prefixes in exactly the same order as GAS does, + // in order to provide diffability. + // Emit the lock opcode prefix as needed. - if (Desc.TSFlags & X86II::LOCK) + if (TSFlags & X86II::LOCK) EmitByte(0xF0, OS); // Emit segment override opcode prefix as needed. - switch (Desc.TSFlags & X86II::SegOvrMask) { + switch (TSFlags & X86II::SegOvrMask) { default: assert(0 && "Invalid segment!"); case 0: break; // No segment override! case X86II::FS: @@ -71,5 +75,127 @@ break; } + // Emit the repeat opcode prefix as needed. + if ((TSFlags & X86II::Op0Mask) == X86II::REP) + EmitByte(0xF3, OS); + + // Emit the operand size opcode prefix as needed. + if (TSFlags & X86II::OpSize) + EmitByte(0x66, OS); + + // Emit the address size opcode prefix as needed. + if (TSFlags & X86II::AdSize) + EmitByte(0x67, OS); + + bool Need0FPrefix = false; + switch (TSFlags & X86II::Op0Mask) { + default: assert(0 && "Invalid prefix!"); + case 0: break; // No prefix! + case X86II::REP: break; // already handled. + case X86II::TB: // Two-byte opcode prefix + case X86II::T8: // 0F 38 + case X86II::TA: // 0F 3A + Need0FPrefix = true; + break; + case X86II::TF: // F2 0F 38 + EmitByte(0xF2, OS); + Need0FPrefix = true; + break; + case X86II::XS: // F3 0F + EmitByte(0xF3, OS); + Need0FPrefix = true; + break; + case X86II::XD: // F2 0F + EmitByte(0xF2, OS); + Need0FPrefix = true; + break; + case X86II::D8: EmitByte(0xD8, OS); break; + case X86II::D9: EmitByte(0xD9, OS); break; + case X86II::DA: EmitByte(0xDA, OS); break; + case X86II::DB: EmitByte(0xDB, OS); break; + case X86II::DC: EmitByte(0xDC, OS); break; + case X86II::DD: EmitByte(0xDD, OS); break; + case X86II::DE: EmitByte(0xDE, OS); break; + case X86II::DF: EmitByte(0xDF, OS); break; + } + + // Handle REX prefix. +#if 0 // FIXME: Add in, also, can this come before F2 etc to simplify emission? + if (Is64BitMode) { + if (unsigned REX = X86InstrInfo::determineREX(MI)) + EmitByte(0x40 | REX, OS); + } +#endif + + // 0x0F escape code must be emitted just before the opcode. + if (Need0FPrefix) + EmitByte(0x0F, OS); + + // FIXME: Pull this up into previous switch if REX can be moved earlier. + switch (TSFlags & X86II::Op0Mask) { + case X86II::TF: // F2 0F 38 + case X86II::T8: // 0F 38 + EmitByte(0x38, OS); + break; + case X86II::TA: // 0F 3A + EmitByte(0x3A, OS); + break; + } + + // If this is a two-address instruction, skip one of the register operands. + unsigned NumOps = Desc.getNumOperands(); + unsigned CurOp = 0; + if (NumOps > 1 && Desc.getOperandConstraint(1, TOI::TIED_TO) != -1) + ++CurOp; + else if (NumOps > 2 && Desc.getOperandConstraint(NumOps-1, TOI::TIED_TO)== 0) + // Skip the last source operand that is tied_to the dest reg. e.g. LXADD32 + --NumOps; + unsigned char BaseOpcode = X86InstrInfo::getBaseOpcodeFor(Desc); + switch (TSFlags & X86II::FormMask) { + default: assert(0 && "Unknown FormMask value in X86MCCodeEmitter!"); + case X86II::RawFrm: { + EmitByte(BaseOpcode, OS); + + if (CurOp == NumOps) + break; + + assert(0 && "Unimpl"); +#if 0 + const MachineOperand &MO = MI.getOperand(CurOp++); + + DEBUG(dbgs() << "RawFrm CurOp " << CurOp << "\n"); + DEBUG(dbgs() << "isMBB " << MO.isMBB() << "\n"); + DEBUG(dbgs() << "isGlobal " << MO.isGlobal() << "\n"); + DEBUG(dbgs() << "isSymbol " << MO.isSymbol() << "\n"); + DEBUG(dbgs() << "isImm " << MO.isImm() << "\n"); + + if (MO.isMBB()) { + emitPCRelativeBlockAddress(MO.getMBB()); + break; + } + + if (MO.isGlobal()) { + emitGlobalAddress(MO.getGlobal(), X86::reloc_pcrel_word, + MO.getOffset(), 0); + break; + } + + if (MO.isSymbol()) { + emitExternalSymbolAddress(MO.getSymbolName(), X86::reloc_pcrel_word); + break; + } + + assert(MO.isImm() && "Unknown RawFrm operand!"); + if (Opcode == X86::CALLpcrel32 || Opcode == X86::CALL64pcrel32) { + // Fix up immediate operand for pc relative calls. + intptr_t Imm = (intptr_t)MO.getImm(); + Imm = Imm - MCE.getCurrentPCValue() - 4; + emitConstant(Imm, X86InstrInfo::sizeOfImm(Desc)); + } else + emitConstant(MO.getImm(), X86InstrInfo::sizeOfImm(Desc)); + break; +#endif + } + } } From dalej at apple.com Wed Feb 3 16:24:49 2010 From: dalej at apple.com (Dale Johannesen) Date: Wed, 03 Feb 2010 22:24:49 -0000 Subject: [llvm-commits] [llvm] r95263 - in /llvm/trunk/test: FrontendC++/2006-11-30-Pubnames.cpp FrontendC/2009-02-17-BitField-dbg.c Message-ID: <201002032224.o13MOnI8001717@zion.cs.uiuc.edu> Author: johannes Date: Wed Feb 3 16:24:49 2010 New Revision: 95263 URL: http://llvm.org/viewvc/llvm-project?rev=95263&view=rev Log: Debugging is now reenabled on PPC darwin, so reenable these tests (they pass). Modified: llvm/trunk/test/FrontendC++/2006-11-30-Pubnames.cpp llvm/trunk/test/FrontendC/2009-02-17-BitField-dbg.c Modified: llvm/trunk/test/FrontendC++/2006-11-30-Pubnames.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC%2B%2B/2006-11-30-Pubnames.cpp?rev=95263&r1=95262&r2=95263&view=diff ============================================================================== --- llvm/trunk/test/FrontendC++/2006-11-30-Pubnames.cpp (original) +++ llvm/trunk/test/FrontendC++/2006-11-30-Pubnames.cpp Wed Feb 3 16:24:49 2010 @@ -8,9 +8,7 @@ // RUN: echo {break main\nrun\np Pubnames::pubname} > %t.in // RUN: gdb -q -batch -n -x %t.in %t.exe | tee %t.out | grep {\$1 = 10} // -// XFAIL: alpha,arm,powerpc-apple-darwin -// FIXME: This doesn't work for PPC Darwin because we turned off debugging on -// that platform. +// XFAIL: alpha,arm struct Pubnames { static int pubname; Modified: llvm/trunk/test/FrontendC/2009-02-17-BitField-dbg.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/2009-02-17-BitField-dbg.c?rev=95263&r1=95262&r2=95263&view=diff ============================================================================== --- llvm/trunk/test/FrontendC/2009-02-17-BitField-dbg.c (original) +++ llvm/trunk/test/FrontendC/2009-02-17-BitField-dbg.c Wed Feb 3 16:24:49 2010 @@ -6,9 +6,6 @@ // RUN: gdb -q -batch -n -x %t2 2009-02-17-BitField-dbg.o | \ // RUN: tee 2009-02-17-BitField-dbg.out | grep "int a : 4" // -// XFAIL: powerpc-apple-darwin -// FIXME: This doesn't work for PPC Darwin because we turned off debugging on -// that platform. struct { int a:4; From dalej at apple.com Wed Feb 3 16:29:02 2010 From: dalej at apple.com (Dale Johannesen) Date: Wed, 03 Feb 2010 22:29:02 -0000 Subject: [llvm-commits] [llvm] r95264 - /llvm/trunk/test/LLVMC/MultiplePluginPriorities.td Message-ID: <201002032229.o13MT2xT002018@zion.cs.uiuc.edu> Author: johannes Date: Wed Feb 3 16:29:02 2010 New Revision: 95264 URL: http://llvm.org/viewvc/llvm-project?rev=95264&view=rev Log: This test passes now on ppc darwin, so reenable it. Modified: llvm/trunk/test/LLVMC/MultiplePluginPriorities.td Modified: llvm/trunk/test/LLVMC/MultiplePluginPriorities.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LLVMC/MultiplePluginPriorities.td?rev=95264&r1=95263&r2=95264&view=diff ============================================================================== --- llvm/trunk/test/LLVMC/MultiplePluginPriorities.td (original) +++ llvm/trunk/test/LLVMC/MultiplePluginPriorities.td Wed Feb 3 16:29:02 2010 @@ -1,9 +1,6 @@ // Check that multiple plugin priorities are not allowed. // RUN: ignore tblgen -I %p/../../include --gen-llvmc %s |& grep "More than one 'PluginPriority' instance found" -// Disable for Darwin PPC: -// XFAIL: powerpc-apple-darwin - include "llvm/CompilerDriver/Common.td" def Graph : CompilationGraph<[]>; From dalej at apple.com Wed Feb 3 16:33:17 2010 From: dalej at apple.com (Dale Johannesen) Date: Wed, 03 Feb 2010 22:33:17 -0000 Subject: [llvm-commits] [llvm] r95265 - /llvm/trunk/test/FrontendC/2010-01-13-MemBarrier.c Message-ID: <201002032233.o13MXI6D002242@zion.cs.uiuc.edu> Author: johannes Date: Wed Feb 3 16:33:17 2010 New Revision: 95265 URL: http://llvm.org/viewvc/llvm-project?rev=95265&view=rev Log: This test passes now on ppc darwin; if it doesn't pass on some other ppc say something on the list. Modified: llvm/trunk/test/FrontendC/2010-01-13-MemBarrier.c Modified: llvm/trunk/test/FrontendC/2010-01-13-MemBarrier.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/2010-01-13-MemBarrier.c?rev=95265&r1=95264&r2=95265&view=diff ============================================================================== --- llvm/trunk/test/FrontendC/2010-01-13-MemBarrier.c (original) +++ llvm/trunk/test/FrontendC/2010-01-13-MemBarrier.c Wed Feb 3 16:33:17 2010 @@ -1,5 +1,5 @@ // RUN: %llvmgcc %s -S -emit-llvm -o - | FileCheck %s -// XFAIL: sparc,powerpc +// XFAIL: sparc // rdar://7536390 unsigned t(unsigned *ptr, unsigned val) { From echristo at apple.com Wed Feb 3 17:56:07 2010 From: echristo at apple.com (Eric Christopher) Date: Wed, 03 Feb 2010 23:56:07 -0000 Subject: [llvm-commits] [llvm] r95266 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineCalls.cpp test/Transforms/InstCombine/objsize.ll Message-ID: <201002032356.o13Nu8GL005663@zion.cs.uiuc.edu> Author: echristo Date: Wed Feb 3 17:56:07 2010 New Revision: 95266 URL: http://llvm.org/viewvc/llvm-project?rev=95266&view=rev Log: If we're dealing with a zero-length array, don't lower to any particular size, we just don't know what the length is yet. Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/trunk/test/Transforms/InstCombine/objsize.ll Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=95266&r1=95265&r2=95266&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Wed Feb 3 17:56:07 2010 @@ -648,14 +648,19 @@ if (const ArrayType *AT = dyn_cast(ObjTy->getElementType())) { - // Deal with multi-dimensional arrays + // Deal with multi-dimensional arrays const ArrayType *SAT = AT; while ((AT = dyn_cast(AT->getElementType()))) SAT = AT; size_t numElems = SAT->getNumElements(); - // We return the remaining bytes, so grab the size of an element - // in bytes. + + // If numElems is 0, we don't know how large the array is so we can't + // make any determinations yet. + if (numElems == 0) break; + + // We return the remaining bytes, so grab the size of an element + // in bytes. size_t sizeofElem = SAT->getElementType()->getPrimitiveSizeInBits() / 8; ConstantInt *Const = @@ -665,7 +670,7 @@ ConstantInt::get(ReturnTy, ((numElems - indx) * sizeofElem))); } - } + } // TODO: Add more types here. } } Modified: llvm/trunk/test/Transforms/InstCombine/objsize.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/objsize.ll?rev=95266&r1=95265&r2=95266&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/objsize.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/objsize.ll Wed Feb 3 17:56:07 2010 @@ -27,4 +27,15 @@ ret i8* %2; } + at window = external global [0 x i8] + +define i1 @baz() nounwind { +; CHECK: @baz +; CHECK-NEXT: llvm.objectsize.i32 + %1 = tail call i32 @llvm.objectsize.i32(i8* getelementptr inbounds ([0 x i8]* @window, i32 0, i32 0), i1 false) + %2 = icmp eq i32 %1, -1 + ret i1 %2 +} + + declare i32 @llvm.objectsize.i32(i8*, i1) nounwind readonly \ No newline at end of file From vhernandez at apple.com Wed Feb 3 19:13:08 2010 From: vhernandez at apple.com (Victor Hernandez) Date: Thu, 04 Feb 2010 01:13:08 -0000 Subject: [llvm-commits] [llvm] r95269 - in /llvm/trunk: lib/Bitcode/Writer/ValueEnumerator.cpp test/Assembler/functionlocal-metadata.ll Message-ID: <201002040113.o141D8m1008647@zion.cs.uiuc.edu> Author: hernande Date: Wed Feb 3 19:13:08 2010 New Revision: 95269 URL: http://llvm.org/viewvc/llvm-project?rev=95269&view=rev Log: Fix (and test) function-local metadata that occurs before the instruction that it refers to; fix is to not enumerate operands of function-local metadata until after all instructions have been enumerated Modified: llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp llvm/trunk/test/Assembler/functionlocal-metadata.ll Modified: llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp?rev=95269&r1=95268&r2=95269&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp (original) +++ llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp Wed Feb 3 19:13:08 2010 @@ -408,21 +408,25 @@ FirstInstID = Values.size(); + SmallVector FunctionLocalMDs; // Add all of the instructions. for (Function::const_iterator BB = F.begin(), E = F.end(); BB != E; ++BB) { for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I!=E; ++I) { for (User::const_op_iterator OI = I->op_begin(), E = I->op_end(); OI != E; ++OI) { if (MDNode *MD = dyn_cast(*OI)) - if (!MD->isFunctionLocal()) - // These were already enumerated during ValueEnumerator creation. - continue; - EnumerateOperandType(*OI); + if (MD->isFunctionLocal()) + // Enumerate metadata after the instructions they might refer to. + FunctionLocalMDs.push_back(MD); } if (!I->getType()->isVoidTy()) EnumerateValue(I); } } + + // Add all of the function-local metadata. + for (unsigned i = 0, e = FunctionLocalMDs.size(); i != e; ++i) + EnumerateOperandType(FunctionLocalMDs[i]); } void ValueEnumerator::purgeFunction() { Modified: llvm/trunk/test/Assembler/functionlocal-metadata.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/functionlocal-metadata.ll?rev=95269&r1=95268&r2=95269&view=diff ============================================================================== --- llvm/trunk/test/Assembler/functionlocal-metadata.ll (original) +++ llvm/trunk/test/Assembler/functionlocal-metadata.ll Wed Feb 3 19:13:08 2010 @@ -2,6 +2,8 @@ define void @Foo(i32 %a, i32 %b) { entry: + call void @llvm.dbg.value(metadata !{ i32* %1 }, i64 16, metadata !"bar") +; CHECK: call void @llvm.dbg.value(metadata !{i32* %1}, i64 16, metadata !"bar") %0 = add i32 %a, 1 ; [#uses=1] %two = add i32 %b, %0 ; [#uses=0] %1 = alloca i32 ; [#uses=1] From dalej at apple.com Wed Feb 3 19:33:43 2010 From: dalej at apple.com (Dale Johannesen) Date: Thu, 04 Feb 2010 01:33:43 -0000 Subject: [llvm-commits] [llvm] r95271 - /llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Message-ID: <201002040133.o141XhB2009464@zion.cs.uiuc.edu> Author: johannes Date: Wed Feb 3 19:33:43 2010 New Revision: 95271 URL: http://llvm.org/viewvc/llvm-project?rev=95271&view=rev Log: Rewrite FP constant handling in DEBUG_VALUE yet again, so it more or less handles long double. Restore \n removed in latest MC frenzy. Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp?rev=95271&r1=95270&r2=95271&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp (original) +++ llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Wed Feb 3 19:33:43 2010 @@ -25,6 +25,7 @@ #include "llvm/Target/Mangler.h" #include "llvm/Support/FormattedStream.h" #include "llvm/ADT/SmallString.h" +#include "llvm/Type.h" using namespace llvm; @@ -430,14 +431,25 @@ if (MI->getOperand(0).getType()==MachineOperand::MO_Register && MI->getOperand(0).getReg()==0) { // Suppress offset in this case, it is not meaningful. - O << "undef"; + O << "undef\n"; return; } else if (MI->getOperand(0).getType()==MachineOperand::MO_FPImmediate) { // This is more naturally done in printOperand, but since the only use - // of such an operand is in this comment and that is temporary, we - // prefer to keep this localized. - O << '$'; - MI->getOperand(0).print(O, &TM); + // of such an operand is in this comment and that is temporary (and it's + // ugly), we prefer to keep this localized. + // The include of Type.h may be removable when this code is. + if (MI->getOperand(0).getFPImm()->getType()->isFloatTy() || + MI->getOperand(0).getFPImm()->getType()->isDoubleTy()) + MI->getOperand(0).print(O, &TM); + else { + // There is no good way to print long double. Convert a copy to + // double. Ah well, it's only a comment. + bool ignored; + APFloat APF = APFloat(MI->getOperand(0).getFPImm()->getValueAPF()); + APF.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven, + &ignored); + O << "(long double) " << APF.convertToDouble(); + } } else printOperand(MI, 0); } else { From gohman at apple.com Wed Feb 3 19:42:13 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 04 Feb 2010 01:42:13 -0000 Subject: [llvm-commits] [llvm] r95272 - /llvm/trunk/lib/MC/MCAsmStreamer.cpp Message-ID: <201002040142.o141gDCL009782@zion.cs.uiuc.edu> Author: djg Date: Wed Feb 3 19:42:13 2010 New Revision: 95272 URL: http://llvm.org/viewvc/llvm-project?rev=95272&view=rev Log: Use a tab instead of space after .type, for consistency. Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=95272&r1=95271&r2=95272&view=diff ============================================================================== --- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original) +++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Wed Feb 3 19:42:13 2010 @@ -241,7 +241,7 @@ case MCSA_ELF_TypeCommon: /// .type _foo, STT_COMMON # aka @common case MCSA_ELF_TypeNoType: /// .type _foo, STT_NOTYPE # aka @notype assert(MAI.hasDotTypeDotSizeDirective() && "Symbol Attr not supported"); - OS << "\t.type " << *Symbol << ',' + OS << "\t.type\t" << *Symbol << ',' << ((MAI.getCommentString()[0] != '@') ? '@' : '%'); switch (Attribute) { default: assert(0 && "Unknown ELF .type"); From scallanan at apple.com Wed Feb 3 19:43:08 2010 From: scallanan at apple.com (Sean Callanan) Date: Thu, 04 Feb 2010 01:43:08 -0000 Subject: [llvm-commits] [llvm] r95274 - in /llvm/trunk: include/llvm-c/EnhancedDisassembly.h tools/edis/EDMain.cpp tools/edis/EDOperand.cpp tools/edis/EDOperand.h Message-ID: <201002040143.o141h8RM009840@zion.cs.uiuc.edu> Author: spyffe Date: Wed Feb 3 19:43:08 2010 New Revision: 95274 URL: http://llvm.org/viewvc/llvm-project?rev=95274&view=rev Log: Filled in a few new APIs for the enhanced disassembly library that provide access to instruction information, and fixed ambiguous wording in the comments for the header. Modified: llvm/trunk/include/llvm-c/EnhancedDisassembly.h llvm/trunk/tools/edis/EDMain.cpp llvm/trunk/tools/edis/EDOperand.cpp llvm/trunk/tools/edis/EDOperand.h Modified: llvm/trunk/include/llvm-c/EnhancedDisassembly.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/EnhancedDisassembly.h?rev=95274&r1=95273&r2=95274&view=diff ============================================================================== --- llvm/trunk/include/llvm-c/EnhancedDisassembly.h (original) +++ llvm/trunk/include/llvm-c/EnhancedDisassembly.h Wed Feb 3 19:43:08 2010 @@ -176,7 +176,7 @@ /*! @function EDInstByteSize @param inst The instruction to be queried. - @result The number of bytes consumed by the instruction. + @result The number of bytes in the instruction's machine-code representation. */ int EDInstByteSize(EDInstRef inst); Modified: llvm/trunk/tools/edis/EDMain.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDMain.cpp?rev=95274&r1=95273&r2=95274&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDMain.cpp (original) +++ llvm/trunk/tools/edis/EDMain.cpp Wed Feb 3 19:43:08 2010 @@ -201,6 +201,34 @@ return inst->getOperand(*operand, index); } +int EDOperandIsRegister(EDOperandRef operand) { + return operand->isRegister(); +} + +int EDOperandIsImmediate(EDOperandRef operand) { + return operand->isImmediate(); +} + +int EDOperandIsMemory(EDOperandRef operand) { + return operand->isMemory(); +} + +int EDRegisterOperandValue(unsigned *value, + EDOperandRef operand) { + if(!operand->isRegister()) + return -1; + *value = operand->regVal(); + return 0; +} + +int EDImmedateOperandValue(uint64_t *value, + EDOperandRef operand) { + if(!operand->isImmediate()) + return -1; + *value = operand->immediateVal(); + return 0; +} + int EDEvaluateOperand(uint64_t *result, EDOperandRef operand, EDRegisterReaderCallback regReader, Modified: llvm/trunk/tools/edis/EDOperand.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDOperand.cpp?rev=95274&r1=95273&r2=95274&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDOperand.cpp (original) +++ llvm/trunk/tools/edis/EDOperand.cpp Wed Feb 3 19:43:08 2010 @@ -125,6 +125,26 @@ return -1; } +int EDOperand::isRegister() { + return(Inst.ThisInstInfo->operandFlags[OpIndex] & kOperandFlagRegister); +} + +unsigned EDOperand::regVal() { + return Inst.Inst->getOperand(MCOpIndex).getReg(); +} + +int EDOperand::isImmediate() { + return(Inst.ThisInstInfo->operandFlags[OpIndex] & kOperandFlagImmediate); +} + +uint64_t EDOperand::immediateVal() { + return Inst.Inst->getOperand(MCOpIndex).getImm(); +} + +int EDOperand::isMemory() { + return(Inst.ThisInstInfo->operandFlags[OpIndex] & kOperandFlagMemory); +} + #ifdef __BLOCKS__ struct RegisterReaderWrapper { EDRegisterBlock_t regBlock; Modified: llvm/trunk/tools/edis/EDOperand.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDOperand.h?rev=95274&r1=95273&r2=95274&view=diff ============================================================================== --- llvm/trunk/tools/edis/EDOperand.h (original) +++ llvm/trunk/tools/edis/EDOperand.h Wed Feb 3 19:43:08 2010 @@ -54,6 +54,19 @@ int evaluate(uint64_t &result, EDRegisterReaderCallback callback, void *arg); + + /// isRegister - Returns 1 if the operand is a register or 0 otherwise + int isRegister(); + /// regVal - Returns the register value. + unsigned regVal(); + + /// isImmediate - Returns 1 if the operand is an immediate or 0 otherwise + int isImmediate(); + /// immediateVal - Returns the immediate value. + uint64_t immediateVal(); + + /// isMemory - Returns 1 if the operand is a memory location or 0 otherwise + int isMemory(); #ifdef __BLOCKS__ /// evaluate - Like evaluate for a callback, but uses a block instead From evan.cheng at apple.com Wed Feb 3 20:40:39 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 04 Feb 2010 02:40:39 -0000 Subject: [llvm-commits] [llvm] r95280 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Message-ID: <201002040240.o142eeiT011974@zion.cs.uiuc.edu> Author: evancheng Date: Wed Feb 3 20:40:39 2010 New Revision: 95280 URL: http://llvm.org/viewvc/llvm-project?rev=95280&view=rev Log: Indirect tail call has to go through a call preserved register since it's after callee register pops. X86 isel lowering is using EAX / R11 and it was somehow adding that to function live out. That prevented the real function return register from being added to the function live out list and bad things happen. This fixes 483.xalancbmk (with tail call opt). Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=95280&r1=95279&r2=95280&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Feb 3 20:40:39 2010 @@ -1196,13 +1196,11 @@ RVLocs, *DAG.getContext()); CCInfo.AnalyzeReturn(Outs, RetCC_X86); - // If this is the first return lowered for this function, add the regs to the - // liveout set for the function. - if (DAG.getMachineFunction().getRegInfo().liveout_empty()) { - for (unsigned i = 0; i != RVLocs.size(); ++i) - if (RVLocs[i].isRegLoc()) - DAG.getMachineFunction().getRegInfo().addLiveOut(RVLocs[i].getLocReg()); - } + // Add the regs to the liveout set for the function. + MachineRegisterInfo &MRI = DAG.getMachineFunction().getRegInfo(); + for (unsigned i = 0; i != RVLocs.size(); ++i) + if (RVLocs[i].isRegLoc() && !MRI.isLiveOut(RVLocs[i].getLocReg())) + MRI.addLiveOut(RVLocs[i].getLocReg()); SDValue Flag; @@ -1255,7 +1253,7 @@ X86MachineFunctionInfo *FuncInfo = MF.getInfo(); unsigned Reg = FuncInfo->getSRetReturnReg(); if (!Reg) { - Reg = MF.getRegInfo().createVirtualRegister(getRegClassFor(MVT::i64)); + Reg = MRI.createVirtualRegister(getRegClassFor(MVT::i64)); FuncInfo->setSRetReturnReg(Reg); } SDValue Val = DAG.getCopyFromReg(Chain, dl, Reg, getPointerTy()); @@ -1264,7 +1262,7 @@ Flag = Chain.getValue(1); // RAX now acts like a return value. - MF.getRegInfo().addLiveOut(X86::RAX); + MRI.addLiveOut(X86::RAX); } RetOps[0] = Chain; // Update chain. @@ -2097,14 +2095,15 @@ } if (isTailCall && !WasGlobalOrExternal) { - unsigned Opc = Is64Bit ? X86::R11 : X86::EAX; - + // Force the address into a (call preserved) caller-saved register since + // tailcall must happen after callee-saved registers are poped. + // FIXME: Give it a special register class that contains caller-saved + // register instead? + unsigned TCReg = Is64Bit ? X86::R11 : X86::EAX; Chain = DAG.getCopyToReg(Chain, dl, - DAG.getRegister(Opc, getPointerTy()), + DAG.getRegister(TCReg, getPointerTy()), Callee,InFlag); - Callee = DAG.getRegister(Opc, getPointerTy()); - // Add register as live out. - MF.getRegInfo().addLiveOut(Opc); + Callee = DAG.getRegister(TCReg, getPointerTy()); } // Returns a chain & a flag for retval copy to use. From gohman at apple.com Wed Feb 3 20:43:51 2010 From: gohman at apple.com (Dan Gohman) Date: Thu, 04 Feb 2010 02:43:51 -0000 Subject: [llvm-commits] [llvm] r95281 - in /llvm/trunk: include/llvm/Analysis/ScalarEvolution.h lib/Analysis/ScalarEvolution.cpp Message-ID: <201002040243.o142hpJO012091@zion.cs.uiuc.edu> Author: djg Date: Wed Feb 3 20:43:51 2010 New Revision: 95281 URL: http://llvm.org/viewvc/llvm-project?rev=95281&view=rev Log: Change the argument to getIntegerSCEV to be an int64_t, rather than int. This will make it more convenient for LSR, which does a lot of things with int64_t offsets. Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=95281&r1=95280&r2=95281&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original) +++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Wed Feb 3 20:43:51 2010 @@ -517,7 +517,7 @@ /// getIntegerSCEV - Given a SCEVable type, create a constant for the /// specified signed integer value and return a SCEV for the constant. - const SCEV *getIntegerSCEV(int Val, const Type *Ty); + const SCEV *getIntegerSCEV(int64_t Val, const Type *Ty); /// getUMaxFromMismatchedTypes - Promote the operands to the wider of /// the types using zero-extension, and then perform a umax operation Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=95281&r1=95280&r2=95281&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Wed Feb 3 20:43:51 2010 @@ -2351,7 +2351,7 @@ /// getIntegerSCEV - Given a SCEVable type, create a constant for the /// specified signed integer value and return a SCEV for the constant. -const SCEV *ScalarEvolution::getIntegerSCEV(int Val, const Type *Ty) { +const SCEV *ScalarEvolution::getIntegerSCEV(int64_t Val, const Type *Ty) { const IntegerType *ITy = cast(getEffectiveSCEVType(Ty)); return getConstant(ConstantInt::get(ITy, Val)); } From evan.cheng at apple.com Wed Feb 3 20:45:02 2010 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 04 Feb 2010 02:45:02 -0000 Subject: [llvm-commits] [llvm] r95282 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Message-ID: <201002040245.o142j29v012148@zion.cs.uiuc.edu> Author: evancheng Date: Wed Feb 3 20:45:02 2010 New Revision: 95282 URL: http://llvm.org/viewvc/llvm-project?rev=95282&view=rev Log: It's too risky to eliminate sext / zext of call results for tail call optimization even if the caller / callee attributes completely match. The callee may have been bitcast'ed (or otherwise lied about what it's doing). Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=95282&r1=95281&r2=95282&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Wed Feb 3 20:45:02 2010 @@ -4213,12 +4213,6 @@ // causing miscompilation that has not been fully understood. if (!Ret) return false; - // Unless we are explicitly forcing tailcall optimization do not tailcall if - // the called function is bitcast'ed. The analysis may not be entirely - // accurate. - if (!PerformTailCallOpt && isa(CS.getCalledValue())) - return false; - // If I will have a chain, make sure no other instruction that will have a // chain interposes between I and the return. if (I->mayHaveSideEffects() || I->mayReadFromMemory() || @@ -4246,6 +4240,10 @@ if ((CalleeRetAttr ^ CallerRetAttr) & ~Attribute::NoAlias) return false; + // It's not safe to eliminate thee sign / zero extension of the return value. + if ((CallerRetAttr & Attribute::ZExt) || (CallerRetAttr & Attribute::SExt)) + return false; + // Otherwise, make sure the unmodified return value of I is the return value. for (const Instruction *U = dyn_cast(Ret->getOperand(0)); ; U = dyn_cast(U->getOperand(0))) { From echristo at apple.com Wed Feb 3 20:55:34 2010 From: echristo at apple.com (Eric Christopher) Date: Thu, 04 Feb 2010 02:55:34 -0000 Subject: [llvm-commits] [llvm] r95283 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineCalls.cpp test/Transforms/InstCombine/objsize.ll Message-ID: <201002040255.o142tY3c012540@zion.cs.uiuc.edu> Author: echristo Date: Wed Feb 3 20:55:34 2010 New Revision: 95283 URL: http://llvm.org/viewvc/llvm-project?rev=95283&view=rev Log: Rework constant expr and array handling for objectsize instcombining. Fix bugs where we would compute out of bounds as in bounds, and where we couldn't know that the linker could override the size of an array. Add a few new testcases, change existing testcase to use a private global array instead of extern. Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/trunk/test/Transforms/InstCombine/objsize.ll Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=95283&r1=95282&r2=95283&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original) +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Wed Feb 3 20:55:34 2010 @@ -635,43 +635,69 @@ case Intrinsic::objectsize: { const Type *ReturnTy = CI.getType(); Value *Op1 = II->getOperand(1); - - // If we're a constant expr then we just return the number of bytes - // left in whatever we're indexing. Since it's constant there's no - // need for maximum or minimum bytes. + + // If we've got a GEP we're going to do some calculations + size_t GEPindex = 0; + + // Strip any casts we see and continue processing. + Op1 = Op1->stripPointerCasts(); + + // Make sure we can reliably know the size. + if (GlobalVariable *GV = dyn_cast(Op1)) + if (!GV->hasDefinitiveInitializer()) break; + if (ConstantExpr *CE = dyn_cast(Op1)) { - // If this isn't a GEP give up. - if (CE->getOpcode() != Instruction::GetElementPtr) return 0; + // If this isn't a GEP give up. + if (CE->getOpcode() != Instruction::GetElementPtr) break; - const PointerType *ObjTy = - reinterpret_cast(CE->getOperand(0)->getType()); + // If this isn't guaranteed to be inbounds, give up. + bool OOB = false; + GEPOperator *GEPO = cast(Op1); + if (!GEPO->isInBounds()) OOB = true; + + for (int i = GEPO->getNumIndices() - 1; i > 0; i--) { + if (Constant *C = dyn_cast(GEPO->getOperand(i))) + if (C->isNullValue()) + continue; + + OOB = true; + } + + // If we're guaranteed to be out of bounds just return that there's + // no room left. + if (OOB) return ReplaceInstUsesWith(CI, ConstantInt::get(ReturnTy, 0)); + + // Tell the later calculation that we have an offset and what + // it is. + Op1 = CE->getOperand(0); + ConstantInt *Const = + cast(CE->getOperand(CE->getNumOperands() - 1)); + GEPindex = Const->getZExtValue(); + } - if (const ArrayType *AT = dyn_cast(ObjTy->getElementType())) { + // This may be a pointer to an array. If we have an index from earlier + // use that too. + if (const PointerType *PT = dyn_cast(Op1->getType())) { + if (const ArrayType *AT = dyn_cast(PT->getElementType())) { // Deal with multi-dimensional arrays const ArrayType *SAT = AT; while ((AT = dyn_cast(AT->getElementType()))) SAT = AT; - - size_t numElems = SAT->getNumElements(); - - // If numElems is 0, we don't know how large the array is so we can't - // make any determinations yet. - if (numElems == 0) break; // We return the remaining bytes, so grab the size of an element - // in bytes. - size_t sizeofElem = SAT->getElementType()->getPrimitiveSizeInBits() / 8; + // in bytes and the number of elements. + if (!SAT->isSized() || !TD) break; - ConstantInt *Const = - cast(CE->getOperand(CE->getNumOperands() - 1)); - size_t indx = Const->getZExtValue(); - return ReplaceInstUsesWith(CI, - ConstantInt::get(ReturnTy, - ((numElems - indx) * sizeofElem))); + size_t sizeofElem = TD->getTypeAllocSize(SAT->getElementType()); + size_t numElems = SAT->getNumElements(); + size_t remSize = (numElems - GEPindex) * sizeofElem; + return ReplaceInstUsesWith(CI, ConstantInt::get(ReturnTy, remSize)); } } + // TODO: Add more types here. + // TODO: Check for type isSized() here as well. } } Modified: llvm/trunk/test/Transforms/InstCombine/objsize.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/objsize.ll?rev=95283&r1=95282&r2=95283&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/objsize.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/objsize.ll Wed Feb 3 20:55:34 2010 @@ -1,5 +1,9 @@ +; Test a pile of objectsize bounds checking. ; RUN: opt < %s -instcombine -S | FileCheck %s - at a = common global [60 x i8] zeroinitializer, align 1 ; <[60 x i8]*> +; We need target data to get the sizes of the arrays and structures. +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" + + at a = private global [60 x i8] zeroinitializer, align 1 ; <[60 x i8]*> @.str = private constant [8 x i8] c"abcdefg\00" ; <[8 x i8]*> define i32 @foo() nounwind { @@ -27,6 +31,13 @@ ret i8* %2; } +define i32 @f() nounwind { +; CHECK: @f +; CHECK-NEXT: ret i32 0 + %1 = call i32 @llvm.objectsize.i32(i8* getelementptr ([60 x i8]* @a, i32 1, i32 0), i1 false) + ret i32 %1 +} + @window = external global [0 x i8] define i1 @baz() nounwind { @@ -37,5 +48,4 @@ ret i1 %2 } - declare i32 @llvm.objectsize.i32(i8*, i1) nounwind readonly \ No newline at end of file From rafael.espindola at gmail.com Wed Feb 3 21:51:11 2010 From: rafael.espindola at gmail.com (Rafael Espindola) Date: Thu, 04 Feb 2010 03:51:11 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r95285 - /llvm-gcc-4.2/trunk/gcc/llvm-abi.h Message-ID: <201002040351.o143pCJF014538@zion.cs.uiuc.edu> Author: rafael Date: Wed Feb 3 21:51:11 2010 New Revision: 95285 URL: http://llvm.org/viewvc/llvm-project?rev=95285&view=rev Log: Add a virtual destructor to avoid the warnings. Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-abi.h?rev=95285&r1=95284&r2=95285&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-abi.h (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-abi.h Wed Feb 3 21:51:11 2010 @@ -56,6 +56,7 @@ /// DefaultABIClient - This is a simple implementation of the ABI client /// interface that can be subclassed. struct DefaultABIClient { + virtual ~DefaultABIClient() {} virtual CallingConv::ID& getCallingConv(void) = 0; virtual bool isShadowReturn() const { return false; } From espindola at google.com Wed Feb 3 23:26:31 2010 From: espindola at google.com (Rafael Espindola) Date: Thu, 4 Feb 2010 00:26:31 -0500 Subject: [llvm-commits] [llvm-gcc][patch] Don't use inreg to force arguments to memory :-) In-Reply-To: <38a0d8451002021918kb48fd6au39a6277e85d3d6e6@mail.gmail.com> References: <38a0d8451002021918kb48fd6au39a6277e85d3d6e6@mail.gmail.com> Message-ID: <38a0d8451002032126j6925c4e6v89c6961adc19266f@mail.gmail.com> > llvm-gcc compiled fine and I am running the test-suite. I will commit > it if everything is fine. New patch attached. The test-suite found an issue: llvm-gcc was emitting the pad for integer argument after the real argument. This would missalign the following arguments. Fixed by moving the padding to before the argument. This patch also has one additional modification in llvm-convert.cpp. The function prolog visitor was avoiding calling ABIConverter.HandleArgument for byval argument. For the ppc backend this is a problem since the NumGPR would not be updated and the casts would be incorrect. For the default ABI this change is a nop. It really looks like this was an issue before, it is just that adding the pads causes a different set of failures. llvm-gcc compiled. Running the llvm test-suite again. If everything is fine tomorrow I will run it on x86_64 and if everything is fine again I will commit it. Cheers, -- Rafael ?vila de Esp?ndola -------------- next part -------------- A non-text attachment was scrubbed... Name: inreg.patch Type: text/x-diff Size: 7524 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100204/b6d03257/attachment.bin From sabre at nondot.org Thu Feb 4 00:19:44 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 04 Feb 2010 06:19:44 -0000 Subject: [llvm-commits] [llvm] r95292 - in /llvm/trunk: lib/Archive/ArchiveReader.cpp test/Archive/MacOSX.toc Message-ID: <201002040619.o146JiPX020122@zion.cs.uiuc.edu> Author: lattner Date: Thu Feb 4 00:19:43 2010 New Revision: 95292 URL: http://llvm.org/viewvc/llvm-project?rev=95292&view=rev Log: >From PR6228: "Attached patch removes the extra NUL bytes from the output and changes test/Archive/MacOSX.toc from a binary to a text file (removes svn:mime-type=application/octet-stream and adds svn:eol-style=native). I can't figure out how to get SVN to include the new contents of the file in the patch so I'm attaching it separately." Patch by James Abbatiello! Modified: llvm/trunk/lib/Archive/ArchiveReader.cpp llvm/trunk/test/Archive/MacOSX.toc Modified: llvm/trunk/lib/Archive/ArchiveReader.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Archive/ArchiveReader.cpp?rev=95292&r1=95291&r2=95292&view=diff ============================================================================== --- llvm/trunk/lib/Archive/ArchiveReader.cpp (original) +++ llvm/trunk/lib/Archive/ArchiveReader.cpp Thu Feb 4 00:19:43 2010 @@ -120,7 +120,8 @@ if (Hdr->name[1] == '1' && Hdr->name[2] == '/') { if (isdigit(Hdr->name[3])) { unsigned len = atoi(&Hdr->name[3]); - pathname.assign(At, len); + const char *nulp = (const char *)memchr(At, '\0', len); + pathname.assign(At, nulp != 0 ? nulp - At : len); At += len; MemberSize -= len; flags |= ArchiveMember::HasLongFilenameFlag; Modified: llvm/trunk/test/Archive/MacOSX.toc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Archive/MacOSX.toc?rev=95292&r1=95291&r2=95292&view=diff ============================================================================== Binary files - no diff available. From sabre at nondot.org Thu Feb 4 00:34:02 2010 From: sabre at nondot.org (Chris Lattner) Date: Thu, 04 Feb 2010 06:34:02 -0000 Subject: [llvm-commits] [llvm] r95293 - in /llvm/trunk: include/llvm/ADT/Triple.h lib/Support/Triple.cpp lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp lib/Target/Sparc/Sparc.h lib/Target/Sparc/SparcSubtarget.cpp lib/Target/Sparc/SparcSubtarget.h lib/Target/Sparc/SparcTargetMachine.cpp lib/Target/Sparc/SparcTargetMachine.h lib/Target/Sparc/TargetInfo/SparcTargetInfo.cpp test/CodeGen/SPARC/ctpop.ll Message-ID: <201002040634.o146Y2rg020749@zion.cs.uiuc.edu> Author: lattner Dat