Re: [llvm-commits] [llvm] r46587 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGNodes.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/CodeGen/SelectionDAG/
How about changing it to FLT_ROUND (no s) or something else? Using a trailing '_' seems silly. Thanks, Evan On Jan 30, 2008, at 4:41 PM, Dan Gohman wrote: Author: djg Date: Wed Jan 30 18:41:03 2008 New Revision: 46587 URL: http://llvm.org/viewvc/llvm-project?rev=46587view=rev Log: Rename ISD::FLT_ROUNDS to ISD::FLT_ROUNDS_ to avoid conflicting with the real FLT_ROUNDS (defined in float.h). Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.h Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=46587r1=46586r2=46587view=diff = = = = = = = = == --- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Wed Jan 30 18:41:03 2008 @@ -404,13 +404,13 @@ /// FP_EXTEND(FP_ROUND(X,0)) because the extra bits aren't removed. FP_ROUND, -// FLT_ROUNDS - Returns current rounding mode: +// FLT_ROUNDS_ - Returns current rounding mode: // -1 Undefined // 0 Round to 0 // 1 Round to nearest // 2 Round to +inf // 3 Round to -inf -FLT_ROUNDS, +FLT_ROUNDS_, /// X = FP_ROUND_INREG(Y, VT) - This operator takes an FP register, and /// rounds it to a floating point value. It then promotes it and returns it Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=46587r1=46586r2=46587view=diff = = = = = = = = == --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Jan 30 18:41:03 2008 @@ -3902,7 +3902,7 @@ AddLegalizedOperand(SDOperand(Node, 1), Tmp1); return Op.ResNo ? Tmp1 : Result; } - case ISD::FLT_ROUNDS: { + case ISD::FLT_ROUNDS_: { MVT::ValueType VT = Node-getValueType(0); switch (TLI.getOperationAction(Node-getOpcode(), VT)) { default: assert(0 This action not supported for this op yet!); Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=46587r1=46586r2=46587view=diff = = = = = = = = == --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Jan 30 18:41:03 2008 @@ -3808,7 +3808,7 @@ case ISD::SIGN_EXTEND_INREG: return sign_extend_inreg; case ISD::TRUNCATE:return truncate; case ISD::FP_ROUND:return fp_round; - case ISD::FLT_ROUNDS: return flt_rounds; + case ISD::FLT_ROUNDS_: return flt_rounds; case ISD::FP_ROUND_INREG: return fp_round_inreg; case ISD::FP_EXTEND: return fp_extend; Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=46587r1=46586r2=46587view=diff = = = = = = = = == --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Jan 30 18:41:03 2008 @@ -2925,7 +2925,7 @@ return 0; case Intrinsic::flt_rounds: { -setValue(I, DAG.getNode(ISD::FLT_ROUNDS, MVT::i32)); +setValue(I, DAG.getNode(ISD::FLT_ROUNDS_, MVT::i32)); return 0; } Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=46587r1=46586r2=46587view=diff = = = = = = = = == --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Wed Jan 30 18:41:03 2008 @@ -111,7 +111,7 @@ setOperationAction(ISD::FREM , MVT::f32, Expand); setOperationAction(ISD::FPOW , MVT::f32, Expand); - setOperationAction(ISD::FLT_ROUNDS, MVT::i32, Custom); + setOperationAction(ISD::FLT_ROUNDS_, MVT::i32, Custom); // If we're enabling GP optimizations, use hardware square root if (!TM.getSubtargetPPCSubtarget().hasFSQRT()) { @@ -2215,7 +2215,7 @@ return FP; } -static SDOperand
[llvm-commits] [test-suite] r46608 - in /test-suite/trunk/MultiSource/Applications/ClamAV: Makefile clamscan_clamscan.c inputs/clamdoc.pdf inputs/clamdoc.tar.gz
Author: evancheng Date: Thu Jan 31 02:14:31 2008 New Revision: 46608 URL: http://llvm.org/viewvc/llvm-project?rev=46608view=rev Log: Slightly shrinkify inputs, slightly increase test size. Added: test-suite/trunk/MultiSource/Applications/ClamAV/inputs/clamdoc.tar.gz (with props) Removed: test-suite/trunk/MultiSource/Applications/ClamAV/inputs/clamdoc.pdf Modified: test-suite/trunk/MultiSource/Applications/ClamAV/Makefile test-suite/trunk/MultiSource/Applications/ClamAV/clamscan_clamscan.c Modified: test-suite/trunk/MultiSource/Applications/ClamAV/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/ClamAV/Makefile?rev=46608r1=46607r2=46608view=diff == --- test-suite/trunk/MultiSource/Applications/ClamAV/Makefile (original) +++ test-suite/trunk/MultiSource/Applications/ClamAV/Makefile Thu Jan 31 02:14:31 2008 @@ -26,7 +26,7 @@ PROG = clamscan CPPFLAGS += -DHAVE_CONFIG_H -I. LDFLAGS = -lz -RUN_OPTIONS = --debug --no-summary -d$(PROJ_SRC_DIR)/dbdir -r $(PROJ_SRC_DIR)/inputs/* +RUN_OPTIONS = --debug --verbose -d$(PROJ_SRC_DIR)/dbdir -r $(PROJ_SRC_DIR)/inputs/* include $(LEVEL)/Makefile.config Modified: test-suite/trunk/MultiSource/Applications/ClamAV/clamscan_clamscan.c URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/ClamAV/clamscan_clamscan.c?rev=46608r1=46607r2=46608view=diff == --- test-suite/trunk/MultiSource/Applications/ClamAV/clamscan_clamscan.c (original) +++ test-suite/trunk/MultiSource/Applications/ClamAV/clamscan_clamscan.c Thu Jan 31 02:14:31 2008 @@ -236,7 +236,9 @@ } mb = info.blocks * (CL_COUNT_PRECISION / 1024) / 1024.0; logg(Data scanned: %2.2lf MB\n, mb); +#if 0 logg(Time: %u.%3.3u sec (%u m %u s)\n, ds, dms/1000, ds/60, ds%60); +#endif } opt_free(opt); Removed: test-suite/trunk/MultiSource/Applications/ClamAV/inputs/clamdoc.pdf URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/ClamAV/inputs/clamdoc.pdf?rev=46607view=auto == Binary file - no diff available. Added: test-suite/trunk/MultiSource/Applications/ClamAV/inputs/clamdoc.tar.gz URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/ClamAV/inputs/clamdoc.tar.gz?rev=46608view=auto == Binary file - no diff available. Propchange: test-suite/trunk/MultiSource/Applications/ClamAV/inputs/clamdoc.tar.gz -- svn:mime-type = application/octet-stream ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [test-suite] r46573 [1/3] - in /test-suite/trunk/MultiSource/Applications: ./ ClamAV/ ClamAV/dbdir/ ClamAV/inputs/ ClamAV/inputs/rtf-test/ ClamAV/scripts/
On Jan 30, 2008, at 4:59 PM, Chris Lattner wrote: On Jan 30, 2008, at 1:17 PM, Evan Cheng wrote: Author: evancheng Date: Wed Jan 30 15:17:10 2008 New Revision: 46573 URL: http://llvm.org/viewvc/llvm-project?rev=46573view=rev Log: Add new benchmark ClamAV. Cool. Can we shrink the size of this though, to reduce the checkout size of llvm-test? Added: test-suite/trunk/MultiSource/Applications/ClamAV/ test-suite/trunk/MultiSource/Applications/ClamAV/COPYING test-suite/trunk/MultiSource/Applications/ClamAV/ClamAV- srcflat.tar.gz (with props) Is this tar.gz file needed? No, removed. test-suite/trunk/MultiSource/Applications/ClamAV/filetypes.h test-suite/trunk/MultiSource/Applications/ClamAV/fsg.h test-suite/trunk/MultiSource/Applications/ClamAV/getopt.h test-suite/trunk/MultiSource/Applications/ClamAV/global.h test-suite/trunk/MultiSource/Applications/ClamAV/hashtab.h test-suite/trunk/MultiSource/Applications/ClamAV/htmlnorm.h test-suite/trunk/MultiSource/Applications/ClamAV/iana_tld.h test-suite/trunk/MultiSource/Applications/ClamAV/inputs/ test-suite/trunk/MultiSource/Applications/ClamAV/inputs/README test-suite/trunk/MultiSource/Applications/ClamAV/inputs/clam- v2.rar (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/clam- v3.rar (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/ clam.cab (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/ clam.exe (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/ clam.exe.bz2 (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/ clam.zip (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/ clamdoc.pdf (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/rtf-test/ test-suite/trunk/MultiSource/Applications/ClamAV/inputs/rtf-test/ Doc1.rtf (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/rtf-test/ Doc11.rtf (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/rtf-test/ Doc2.rtf (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/rtf-test/ Doc22.rtf (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/rtf-test/ doc3.rtf (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/rtf-test/ docCLAMexe.rtf (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/rtf-test/ rtf-novirus.rtf (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/rtf-test/ rtf1.rtf (with props) Are all these inputs used by the tester? Well, it's a virus scanner so we need some Windows files. :-) Evan -Chris ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r46609 - in /llvm/trunk: include/llvm/CodeGen/ lib/CodeGen/ lib/CodeGen/SelectionDAG/ lib/Target/ lib/Target/CellSPU/ lib/Target/PowerPC/ lib/Target/X86/ utils/TableGen/
Author: evancheng Date: Thu Jan 31 03:59:15 2008 New Revision: 46609 URL: http://llvm.org/viewvc/llvm-project?rev=46609view=rev Log: Add an extra operand to LABEL nodes which distinguishes between debug, EH, or misc labels. This fixes the EH breakage. However I am not convinced this is *the* solution. Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h llvm/trunk/lib/CodeGen/Collector.cpp llvm/trunk/lib/CodeGen/MachineInstr.cpp llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/trunk/lib/Target/CellSPU/SPURegisterInfo.cpp llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp llvm/trunk/lib/Target/Target.td llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=46609r1=46608r2=46609view=diff == --- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Thu Jan 31 03:59:15 2008 @@ -134,6 +134,10 @@ delete removeFromParent(); } + /// isDebugLabel - Returns true if the MachineInstr represents a debug label. + /// + bool isDebugLabel() const; + /// findRegisterUseOperandIdx() - Returns the operand index that is a use of /// the specific register or -1 if it is not found. It further tightening /// the search criteria to a use that kills the register if isKill is true. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=46609r1=46608r2=46609view=diff == --- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Thu Jan 31 03:59:15 2008 @@ -496,6 +496,8 @@ // returns a chain. // Operand #0 : input chain. // Operand #1 : module unique number use to identify the label. +// Operand #2 : 0 indicates a debug label (e.g. stoppoint), 1 indicates +//a EH label, 2 indicates unknown label type. LABEL, // STACKSAVE - STACKSAVE has one operand, an input chain. It produces a @@ -593,6 +595,11 @@ /// isBuildVectorAllZeros - Return true if the specified node is a /// BUILD_VECTOR where all of the elements are 0 or undef. bool isBuildVectorAllZeros(const SDNode *N); + + /// isDebugLabel - Return true if the specified node represents a debug + /// label (i.e. ISD::LABEL or TargetInstrInfo::LANEL node and third operand + /// is 0). + bool isDebugLabel(const SDNode *N); //======// /// MemIndexedMode enum - This enum defines the load / store indexed Modified: llvm/trunk/lib/CodeGen/Collector.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/Collector.cpp?rev=46609r1=46608r2=46609view=diff == --- llvm/trunk/lib/CodeGen/Collector.cpp (original) +++ llvm/trunk/lib/CodeGen/Collector.cpp Thu Jan 31 03:59:15 2008 @@ -337,7 +337,7 @@ unsigned MachineCodeAnalysis::InsertLabel(MachineBasicBlock MBB, MachineBasicBlock::iterator MI) const { unsigned Label = MMI-NextLabelID(); - BuildMI(MBB, MI, TII-get(TargetInstrInfo::LABEL)).addImm(Label); + BuildMI(MBB, MI, TII-get(TargetInstrInfo::LABEL)).addImm(Label).addImm(2); return Label; } Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=46609r1=46608r2=46609view=diff == --- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Thu Jan 31 03:59:15 2008 @@ -18,6 +18,7 @@ #include llvm/CodeGen/PseudoSourceValue.h #include llvm/CodeGen/SelectionDAGNodes.h #include llvm/Target/TargetMachine.h +#include llvm/Target/TargetInstrInfo.h #include llvm/Target/TargetInstrDesc.h #include llvm/Target/MRegisterInfo.h #include llvm/Support/LeakDetector.h @@ -512,6 +513,12 @@ } +/// isDebugLabel - Returns true if the MachineInstr represents a debug label. +/// +bool MachineInstr::isDebugLabel() const { + return getOpcode() == TargetInstrInfo::LABEL getOperand(1).getImm() == 0; +} + /// findRegisterUseOperandIdx() - Returns the MachineOperand that is a use
[llvm-commits] [llvm] r46610 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
Author: evancheng Date: Thu Jan 31 04:05:13 2008 New Revision: 46610 URL: http://llvm.org/viewvc/llvm-project?rev=46610view=rev Log: Add a comment for a nasty short term hack. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp?rev=46610r1=46609r2=46610view=diff == --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Thu Jan 31 04:05:13 2008 @@ -741,6 +741,10 @@ unsigned NumLabels = 0; MachineBasicBlock::iterator MBBI = BB-begin(); while (MBBI != BB-end()) { +// FIXME: This is a nasty short term workaround. For now, we are +// assuming there are two debug labels at the beginning of the +// entry block: one for dbg_func_start, one for the first +// dbg_stoppoint before actual code. if (!MBBI-isDebugLabel() || ++NumLabels 1) break; ++MBBI; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r46612 - /llvm/trunk/include/llvm/ADT/StringMap.h
Author: asl Date: Thu Jan 31 06:30:40 2008 New Revision: 46612 URL: http://llvm.org/viewvc/llvm-project?rev=46612view=rev Log: Make StringMap to be more STL'ish. Patch by Mikhail Glushenkov! Modified: llvm/trunk/include/llvm/ADT/StringMap.h Modified: llvm/trunk/include/llvm/ADT/StringMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringMap.h?rev=46612r1=46611r2=46612view=diff == --- llvm/trunk/include/llvm/ADT/StringMap.h (original) +++ llvm/trunk/include/llvm/ADT/StringMap.h Thu Jan 31 06:30:40 2008 @@ -126,23 +126,26 @@ /// and data. templatetypename ValueTy class StringMapEntry : public StringMapEntryBase { - ValueTy Val; public: + ValueTy second; + explicit StringMapEntry(unsigned StrLen) -: StringMapEntryBase(StrLen), Val() {} +: StringMapEntryBase(StrLen), second() {} StringMapEntry(unsigned StrLen, const ValueTy V) -: StringMapEntryBase(StrLen), Val(V) {} +: StringMapEntryBase(StrLen), second(V) {} - const ValueTy getValue() const { return Val; } - ValueTy getValue() { return Val; } + const ValueTy getValue() const { return second; } + ValueTy getValue() { return second; } - void setValue(const ValueTy V) { Val = V; } + void setValue(const ValueTy V) { second = V; } /// getKeyData - Return the start of the string data that is the key for this /// value. The string data is always stored immediately after the /// StringMapEntry object. const char *getKeyData() const {return reinterpret_castconst char*(this+1);} + const char *first() const { return getKeyData(); } + /// Create - Create a StringMapEntry for the specified key and default /// construct the value. templatetypename AllocatorTy, typename InitType @@ -239,6 +242,11 @@ AllocatorTy getAllocator() { return Allocator; } const AllocatorTy getAllocator() const { return Allocator; } + typedef const char* key_type; + typedef ValueTy mapped_type; + typedef StringMapEntryValueTy value_type; + typedef size_t size_type; + typedef StringMapConstIteratorValueTy const_iterator; typedef StringMapIteratorValueTy iterator; @@ -267,6 +275,25 @@ return const_iterator(TheTable+Bucket); } + iterator find(const char *Key) { +return find(Key, Key + strlen(Key)); + } + const_iterator find(const char *Key) const { +return find(Key, Key + strlen(Key)); + } + + ValueTy operator[](const char *Key) { +value_type entry = GetOrCreateValue(Key, Key + strlen(Key)); +return entry.getValue(); + } + + size_type count(const char *KeyStart, const char *KeyEnd) const { +return find(KeyStart, KeyEnd) == end() ? 0 : 1; + } + size_type count(const char *Key) const { +return count(Key, Key + strlen(Key)); + } + /// insert - Insert the specified key/value pair into the map. If the key /// already exists in the map, return false and ignore the request, otherwise /// insert it and return true. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r46611 - /llvm/trunk/include/llvm/ADT/StringMap.h
Author: asl Date: Thu Jan 31 06:10:41 2008 New Revision: 46611 URL: http://llvm.org/viewvc/llvm-project?rev=46611view=rev Log: Whitespace cleanup Modified: llvm/trunk/include/llvm/ADT/StringMap.h Modified: llvm/trunk/include/llvm/ADT/StringMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringMap.h?rev=46611r1=46610r2=46611view=diff == --- llvm/trunk/include/llvm/ADT/StringMap.h (original) +++ llvm/trunk/include/llvm/ADT/StringMap.h Thu Jan 31 06:10:41 2008 @@ -26,7 +26,7 @@ class StringMapEntry; /// StringMapEntryInitializer - This datatype can be partially specialized for -/// various datatypes in a stringmap to allow them to be initialized when an +/// various datatypes in a stringmap to allow them to be initialized when an /// entry is default constructed for the map. templatetypename ValueTy class StringMapEntryInitializer { @@ -35,17 +35,17 @@ static void Initialize(StringMapEntryValueTy T, InitTy InitVal) { } }; - - + + /// StringMapEntryBase - Shared base class of StringMapEntry instances. class StringMapEntryBase { unsigned StrLen; public: explicit StringMapEntryBase(unsigned Len) : StrLen(Len) {} - + unsigned getKeyLength() const { return StrLen; } }; - + /// StringMapImpl - This is the base class of StringMap that is shared among /// all of its instantiations. class StringMapImpl { @@ -56,11 +56,11 @@ /// FullHashValue - This remembers the full hash value of the key for /// easy scanning. unsigned FullHashValue; - + /// Item - This is a pointer to the actual item object. StringMapEntryBase *Item; }; - + protected: ItemBucket *TheTable; unsigned NumBuckets; @@ -77,7 +77,7 @@ } StringMapImpl(unsigned InitSize, unsigned ItemSize); void RehashTable(); - + /// ShouldRehash - Return true if the table should be rehashed after a new /// element was recently inserted. bool ShouldRehash() const { @@ -87,14 +87,14 @@ return NumItems*4 NumBuckets*3 || NumBuckets-(NumItems+NumTombstones) NumBuckets/8; } - + /// LookupBucketFor - Look up the bucket that the specified string should end /// up in. If it already exists as a key in the map, the Item pointer for the /// specified bucket will be non-null. Otherwise, it will be null. In either /// case, the FullHashValue field of the bucket will be set to the hash value /// of the string. unsigned LookupBucketFor(const char *KeyStart, const char *KeyEnd); - + /// FindKey - Look up the bucket that contains the specified key. If it exists /// in the map, return the bucket number of the key. Otherwise return -1. /// This does not modify the map. @@ -113,7 +113,7 @@ static StringMapEntryBase *getTombstoneVal() { return (StringMapEntryBase*)-1; } - + unsigned getNumBuckets() const { return NumBuckets; } unsigned getNumItems() const { return NumItems; } @@ -135,14 +135,14 @@ const ValueTy getValue() const { return Val; } ValueTy getValue() { return Val; } - + void setValue(const ValueTy V) { Val = V; } - + /// getKeyData - Return the start of the string data that is the key for this /// value. The string data is always stored immediately after the /// StringMapEntry object. const char *getKeyData() const {return reinterpret_castconst char*(this+1);} - + /// Create - Create a StringMapEntry for the specified key and default /// construct the value. templatetypename AllocatorTy, typename InitType @@ -150,37 +150,37 @@ AllocatorTy Allocator, InitType InitVal) { unsigned KeyLength = KeyEnd-KeyStart; - + // Okay, the item doesn't already exist, and 'Bucket' is the bucket to fill // in. Allocate a new item with space for the string at the end and a null // terminator. - + unsigned AllocSize = sizeof(StringMapEntry)+KeyLength+1; unsigned Alignment = alignofStringMapEntry(); - + StringMapEntry *NewItem = static_castStringMapEntry*(Allocator.Allocate(AllocSize,Alignment)); - + // Default construct the value. new (NewItem) StringMapEntry(KeyLength); - + // Copy the string information. char *StrBuffer = const_castchar*(NewItem-getKeyData()); memcpy(StrBuffer, KeyStart, KeyLength); StrBuffer[KeyLength] = 0; // Null terminate for convenience of clients. - + // Initialize the value if the client wants to. StringMapEntryInitializerValueTy::Initialize(*NewItem, InitVal); return NewItem; } - + templatetypename AllocatorTy static StringMapEntry *Create(const char *KeyStart, const char *KeyEnd, AllocatorTy Allocator) { return Create(KeyStart, KeyEnd, Allocator, (void*)0); } - - + + /// Create - Create a StringMapEntry with
[llvm-commits] [llvm] r46615 - /llvm/trunk/include/llvm/ADT/StringMap.h
Author: asl Date: Thu Jan 31 11:43:25 2008 New Revision: 46615 URL: http://llvm.org/viewvc/llvm-project?rev=46615view=rev Log: Reapply the patch with fix. Modified: llvm/trunk/include/llvm/ADT/StringMap.h Modified: llvm/trunk/include/llvm/ADT/StringMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringMap.h?rev=46615r1=46614r2=46615view=diff == --- llvm/trunk/include/llvm/ADT/StringMap.h (original) +++ llvm/trunk/include/llvm/ADT/StringMap.h Thu Jan 31 11:43:25 2008 @@ -126,23 +126,26 @@ /// and data. templatetypename ValueTy class StringMapEntry : public StringMapEntryBase { - ValueTy Val; public: + ValueTy second; + explicit StringMapEntry(unsigned StrLen) -: StringMapEntryBase(StrLen), Val() {} +: StringMapEntryBase(StrLen), second() {} StringMapEntry(unsigned StrLen, const ValueTy V) -: StringMapEntryBase(StrLen), Val(V) {} +: StringMapEntryBase(StrLen), second(V) {} - const ValueTy getValue() const { return Val; } - ValueTy getValue() { return Val; } + const ValueTy getValue() const { return second; } + ValueTy getValue() { return second; } - void setValue(const ValueTy V) { Val = V; } + void setValue(const ValueTy V) { second = V; } /// getKeyData - Return the start of the string data that is the key for this /// value. The string data is always stored immediately after the /// StringMapEntry object. const char *getKeyData() const {return reinterpret_castconst char*(this+1);} + const char *first() const { return getKeyData(); } + /// Create - Create a StringMapEntry for the specified key and default /// construct the value. templatetypename AllocatorTy, typename InitType @@ -198,7 +201,7 @@ static StringMapEntry GetStringMapEntryFromValue(ValueTy V) { StringMapEntry *EPtr = 0; char *Ptr = reinterpret_castchar*(V) - - (reinterpret_castchar*(EPtr-Val) - + (reinterpret_castchar*(EPtr-second) - reinterpret_castchar*(EPtr)); return *reinterpret_castStringMapEntry*(Ptr); } @@ -239,6 +242,11 @@ AllocatorTy getAllocator() { return Allocator; } const AllocatorTy getAllocator() const { return Allocator; } + typedef const char* key_type; + typedef ValueTy mapped_type; + typedef StringMapEntryValueTy value_type; + typedef size_t size_type; + typedef StringMapConstIteratorValueTy const_iterator; typedef StringMapIteratorValueTy iterator; @@ -267,6 +275,25 @@ return const_iterator(TheTable+Bucket); } + iterator find(const char *Key) { +return find(Key, Key + strlen(Key)); + } + const_iterator find(const char *Key) const { +return find(Key, Key + strlen(Key)); + } + + ValueTy operator[](const char *Key) { +value_type entry = GetOrCreateValue(Key, Key + strlen(Key)); +return entry.getValue(); + } + + size_type count(const char *KeyStart, const char *KeyEnd) const { +return find(KeyStart, KeyEnd) == end() ? 0 : 1; + } + size_type count(const char *Key) const { +return count(Key, Key + strlen(Key)); + } + /// insert - Insert the specified key/value pair into the map. If the key /// already exists in the map, return false and ignore the request, otherwise /// insert it and return true. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r46565 - in /llvm/trunk: lib/CodeGen/MachineModuleInfo.cpp test/DebugInfo/globalGetElementPtr.ll
Hi Dale, maybe you could use IntrinsicInst::StripPointerCasts instead? Didn't know about this, thanks. It recurses and I don't think that's what I want in this case. I did, however, steal its looping code:) Are you sure you don't want it to be recursive? I can take a global variable, bitcast it, do a GEP 0 on that, bitcast the result, etc. The final result will be equivalent to a single bitcast of the original global. So shouldn't this code handle it? Of course if the optimizers are run then they would simplify such a silly example. But it seems wrong to me to assume that the IR has been optimized... Best wishes, Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r46565 - in /llvm/trunk: lib/CodeGen/MachineModuleInfo.cpp test/DebugInfo/globalGetElementPtr.ll
On Jan 31, 2008, at 9:55 AM, Duncan Sands wrote: Hi Dale, maybe you could use IntrinsicInst::StripPointerCasts instead? Didn't know about this, thanks. It recurses and I don't think that's what I want in this case. I did, however, steal its looping code:) Are you sure you don't want it to be recursive? I can take a global variable, bitcast it, do a GEP 0 on that, bitcast the result, etc. The final result will be equivalent to a single bitcast of the original global. So shouldn't this code handle it? Of course if the optimizers are run then they would simplify such a silly example. But it seems wrong to me to assume that the IR has been optimized... No I'm not sure, but I know of no case where this is useful or desirable. The code in question is handling the debug info for global variables, specifically the part that points to the global variable itself. That's under the control of the front ends, although the optimizers can do simplifications. I don't think there's a need to handle more general expressions here. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r46617 - /llvm/trunk/lib/Support/APFloat.cpp
Author: johannes Date: Thu Jan 31 12:34:01 2008 New Revision: 46617 URL: http://llvm.org/viewvc/llvm-project?rev=46617view=rev Log: Chris' change to print an approximation to long doubles exposed a bug in APFloat's long double-double conversion of NaNs. Broke several things in the ieee part of gcc testsuite. Modified: llvm/trunk/lib/Support/APFloat.cpp Modified: llvm/trunk/lib/Support/APFloat.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=46617r1=46616r2=46617view=diff == --- llvm/trunk/lib/Support/APFloat.cpp (original) +++ llvm/trunk/lib/Support/APFloat.cpp Thu Jan 31 12:34:01 2008 @@ -1712,6 +1712,8 @@ fs = normalize(rounding_mode, lostFraction); } else if (category == fcNaN) { int shift = toSemantics.precision - semantics-precision; +// Do this now so significandParts gets the right answer +semantics = toSemantics; // No normalization here, just truncate if (shift0) APInt::tcShiftLeft(significandParts(), newPartCount, shift); @@ -1721,7 +1723,6 @@ // does not give you back the same bits. This is dubious, and we // don't currently do it. You're really supposed to get // an invalid operation signal at runtime, but nobody does that. -semantics = toSemantics; fs = opOK; } else { semantics = toSemantics; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r46617 - /llvm/trunk/lib/Support/APFloat.cpp
On Jan 31, 2008, at 10:34 AM, Dale Johannesen wrote: Author: johannes Date: Thu Jan 31 12:34:01 2008 New Revision: 46617 URL: http://llvm.org/viewvc/llvm-project?rev=46617view=rev Log: Chris' change to print an approximation to long doubles exposed a bug in APFloat's long double-double conversion of NaNs. Broke several things in the ieee part of gcc testsuite. Oops, nice catch dale. Thanks! -Chris ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [test-suite] r46573 [1/3] - in /test-suite/trunk/MultiSource/Applications: ./ ClamAV/ ClamAV/dbdir/ ClamAV/inputs/ ClamAV/inputs/rtf-test/ ClamAV/scripts/
On Jan 31, 2008, at 12:15 AM, Evan Cheng wrote: Doc22.rtf (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/rtf-test/ doc3.rtf (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/rtf-test/ docCLAMexe.rtf (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/rtf-test/ rtf-novirus.rtf (with props) test-suite/trunk/MultiSource/Applications/ClamAV/inputs/rtf-test/ rtf1.rtf (with props) Are all these inputs used by the tester? Well, it's a virus scanner so we need some Windows files. :-) :) I'm just wondering if we can have some other way to increase execution time without chewing up disk space: maybe run it on the same file multiple times? -Chris ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r46565 - in /llvm/trunk: lib/CodeGen/MachineModuleInfo.cpp test/DebugInfo/globalGetElementPtr.ll
On Jan 31, 2008, at 10:46 AM, Dale Johannesen wrote: No I'm not sure, but I know of no case where this is useful or desirable. The code in question is handling the debug info for global variables, specifically the part that points to the global variable itself. That's under the control of the front ends, although the optimizers can do simplifications. I don't think there's a need to handle more general expressions here. I agree with dale. In the future, we should find a more structured way of encoding debug info: until then, this approach should be ok. -Chris ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r46565 - in /llvm/trunk: lib/CodeGen/MachineModuleInfo.cpp test/DebugInfo/globalGetElementPtr.ll
Hi Dale, maybe you could use IntrinsicInst::StripPointerCasts instead? Didn't know about this, thanks. It recurses and I don't think that's what I want in this case. I did, however, steal its looping code:) Are you sure you don't want it to be recursive? I can take a global variable, bitcast it, do a GEP 0 on that, bitcast the result, etc. The final result will be equivalent to a single bitcast of the original global. So shouldn't this code handle it? Of course if the optimizers are run then they would simplify such a silly example. But it seems wrong to me to assume that the IR has been optimized... No I'm not sure, but I know of no case where this is useful or desirable. When linking, I vaguely recall that if a declaration of a global and the definition are not quite the same, uses of the declaration get replaced with a bitcast of the definition (maybe I'm confusing with what's done for functions). If that declaration was itself bitcast to an i8* for use in the debug intrinsic, you might end up with a double bitcast I suppose. All I'm saying is that it seems possible to me that double bitcasts could be generated in practice (if rarely), and I don't see that it hurts to handle them. Plus you get to reduce code duplication by using StripPointerCasts. Don't forget that code with debug info tends to be unoptimized, making pointless bitcast combinations more likely. The code in question is handling the debug info for global variables, specifically the part that points to the global variable itself. That's under the control of the front ends, although the optimizers can do simplifications. I don't think there's a need to handle more general expressions here. I understand where you're coming from, but I can't help suspecting that this is going to blow up for some poor person in obscure circumstances. I don't feel strongly about it though. Ciao, Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r46556 - in /llvm/trunk: include/llvm/CodeGen/PseudoSourceValue.h include/llvm/Value.h lib/CodeGen/PseudoSourceValue.cpp
On Jan 31, 2008, at 11:44 AM, Evan Cheng wrote: This is a static initializer, so it can't assume Type::Int8Ty has been initialized at this point. Can you take a look? Thanks. A good way to fix this is to replace direct use of the objects with simple accessors. This is how ConstantInt::getTrue() handle's the 'i1 1' singleton for example. -Chris ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r46625 - /llvm/trunk/include/llvm/ADT/StringMap.h
URL: http://llvm.org/viewvc/llvm-project?rev=46625view=rev Log: Add convenient std::string helpers to StringMap. Patch by Mikhail Glushenkov! Cool. Before David chimes in :) , I'll point out: + iterator find(const std::string Key) { +const char* key_start = Key[0]; +return find(key_start, key_start + Key.size()); + } This sort of thing won't work when the string is empty and checking is enabled. Maybe something like this is enough: if (Key.empty()) return find(0,0); etc. -Chris ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [test-suite] r46573 [1/3] - in /test-suite/trunk/MultiSource/Applications: ./ ClamAV/ ClamAV/dbdir/ ClamAV/inputs/ ClamAV/inputs/rtf-test/ ClamAV/scripts/
On Jan 31, 2008, at 11:37 AM, Evan Cheng wrote: All the Windows file are actually pretty tiny. The only big one is clamdoc.tar.gz. Perhaps we should take Edwin's advice and add links to test data from other benchmarks? I removed them because I thought they were left in by mistake. Ok, if they aren't big, don't worry about it. Using test data for other benchmarks makes sense too. -Chris ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r46556 - in /llvm/trunk: include/llvm/CodeGen/PseudoSourceValue.h include/llvm/Value.h lib/CodeGen/PseudoSourceValue.cpp
This is a static initializer, so it can't assume Type::Int8Ty has been initialized at this point. Can you take a look? Thanks. A good way to fix this is to replace direct use of the objects with simple accessors. This is how ConstantInt::getTrue() handle's the 'i1 1' singleton for example. Thanks. I'll take a look at it. Dan -- Dan Gohman, Cray Inc. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r46625 - /llvm/trunk/include/llvm/ADT/StringMap.h
Hello, Chris This sort of thing won't work when the string is empty and checking is enabled. Maybe something like this is enough: if (Key.empty()) return find(0,0); Will find() operate sane in such case (supplying NULL pointer as input)? -- With best regards, Anton Korobeynikov. Faculty of Mathematics Mechanics, Saint Petersburg State University. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r46625 - /llvm/trunk/include/llvm/ADT/StringMap.h
Author: asl Date: Thu Jan 31 17:02:33 2008 New Revision: 46625 URL: http://llvm.org/viewvc/llvm-project?rev=46625view=rev Log: Add convenient std::string helpers to StringMap. Patch by Mikhail Glushenkov! Modified: llvm/trunk/include/llvm/ADT/StringMap.h Modified: llvm/trunk/include/llvm/ADT/StringMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringMap.h?rev=46625r1=46624r2=46625view=diff == --- llvm/trunk/include/llvm/ADT/StringMap.h (original) +++ llvm/trunk/include/llvm/ADT/StringMap.h Thu Jan 31 17:02:33 2008 @@ -16,6 +16,7 @@ #include llvm/Support/Allocator.h #include cstring +#include string namespace llvm { templatetypename ValueT @@ -268,24 +269,36 @@ if (Bucket == -1) return end(); return iterator(TheTable+Bucket); } + iterator find(const char *Key) { +return find(Key, Key + strlen(Key)); + } + iterator find(const std::string Key) { +const char* key_start = Key[0]; +return find(key_start, key_start + Key.size()); + } const_iterator find(const char *KeyStart, const char *KeyEnd) const { int Bucket = FindKey(KeyStart, KeyEnd); if (Bucket == -1) return end(); return const_iterator(TheTable+Bucket); } - - iterator find(const char *Key) { -return find(Key, Key + strlen(Key)); - } const_iterator find(const char *Key) const { return find(Key, Key + strlen(Key)); } + const_iterator find(const std::string Key) const { +const char* key_start = Key[0]; +return find(key_start, key_start + Key.size()); + } ValueTy operator[](const char *Key) { value_type entry = GetOrCreateValue(Key, Key + strlen(Key)); return entry.getValue(); } + ValueTy operator[](const std::string Key) { +const char* key_start = Key[0]; +value_type entry = GetOrCreateValue(key_start, key_start + Key.size()); +return entry.getValue(); + } size_type count(const char *KeyStart, const char *KeyEnd) const { return find(KeyStart, KeyEnd) == end() ? 0 : 1; @@ -293,6 +306,10 @@ size_type count(const char *Key) const { return count(Key, Key + strlen(Key)); } + size_type count(const std::string Key) const { +const char* key_start = Key[0]; +return count(key_start, key_start + Key.size()); + } /// insert - Insert the specified key/value pair into the map. If the key /// already exists in the map, return false and ignore the request, otherwise ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm-gcc-4.2] r43913 [33/80] - in
Hi John, My name is John Brumbelow, and I am a developer of OptiDoc. I am trying to make a reader/magnifier for our software to read text from any application, including Java Applets, into our C++/VB/C# programs. To explain this need. We have customers who are visually impared, but need to gather information from 3rd party applications, and get it to index information. Sun has an API which makes a good part of this possible. It is called the Java Access Bridge. This API is usable in C/C++/VB/C# applications, to let them read from Java Applets. But it does not work on all components of Java Applets. In particular, combo box, push button, check box and other controls do not have functionality in the Java Access Bridge (JAB) to get their text. So, I have been struggling to find anything that can take the Java Access Bridge or something, the extra step to get the text from combo box, push button, and other controls. In my searches, I came across this website of yours: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071105/055414.html Unfortunately, I won't be able to help you. The patch you mentioned was a result of a merge of our tree with another tree. So I didn't write this code, and, unfortunately, I'm not up-to-date on Java technology. -bw It had a link to a Bill Wendling, who evidently is related to code in this link. This link has lots of C/C++ code for providing accessibility support for the combo box. I can clearly see relationship from the code to jobject handles, which is a key ingredient to JAB's various functions. If you can please, help me bridge between JAB or something, to get the text from combo box, push button and other various control. Here are questions I think that if you could please help me answer, would bridge this gap: Is there a way, that one can take a jobject handle that JAB gets for a combo box object and some how use it with your AccessibleAWTChoice class in your code, to then let one use the AccessibleAWTChoice's member function called getItem to get the text? If not, do you know of anyway one can use JAB or something in a C/C++ windows application, to get the text from combo box, push button, and other controls from an external running Java Applet? Thank you for your time, John Brumbelow ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r46587 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGNodes.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/CodeGen/SelectionDAG/
How about changing it to FLT_ROUND (no s) or something else? Using a trailing '_' seems silly. FLT_ROUNDS is a specific standard macro, and the opcode in question is for implementing it. I'd prefer to not change any letters in the spelling. FWIW, it's consistent with PIC_. Dan -- Dan Gohman, Cray Inc. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r46587 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGNodes.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/CodeGen/SelectionDAG/
Hello, Everyone FLT_ROUNDS is a specific standard macro, and the opcode in question is for implementing it. I'd prefer to not change any letters in the spelling. FWIW, it's consistent with PIC_. I'm for FLT_ROUNDS_ -- With best regards, Anton Korobeynikov. Faculty of Mathematics Mechanics, Saint Petersburg State University. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r46628 - in /llvm/trunk: include/llvm/CodeGen/MachineModuleInfo.h lib/CodeGen/MachineModuleInfo.cpp lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Author: evancheng Date: Thu Jan 31 20:05:57 2008 New Revision: 46628 URL: http://llvm.org/viewvc/llvm-project?rev=46628view=rev Log: Rename RecordLabel to RecordSourceLine because that's what it is doing. Modified: llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Modified: llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h?rev=46628r1=46627r2=46628view=diff == --- llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h Thu Jan 31 20:05:57 2008 @@ -1101,10 +1101,10 @@ return ID; } - /// RecordLabel - Records location information and associates it with a + /// RecordSourceLine - Records location information and associates it with a /// label. Returns a unique label ID used to generate a label and /// provide correspondence to the source line list. - unsigned RecordLabel(unsigned Line, unsigned Column, unsigned Source); + unsigned RecordSourceLine(unsigned Line, unsigned Column, unsigned Source); /// InvalidateLabel - Inhibit use of the specified label # from /// MachineModuleInfo, for example because the code was deleted. Modified: llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp?rev=46628r1=46627r2=46628view=diff == --- llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Thu Jan 31 20:05:57 2008 @@ -1611,11 +1611,11 @@ return ::getGlobalVariablesUsing(M, RootName); } -/// RecordLabel - Records location information and associates it with a +/// RecordSourceLine - Records location information and associates it with a /// debug label. Returns a unique label ID used to generate a label and /// provide correspondence to the source line list. -unsigned MachineModuleInfo::RecordLabel(unsigned Line, unsigned Column, - unsigned Source) { +unsigned MachineModuleInfo::RecordSourceLine(unsigned Line, unsigned Column, + unsigned Source) { unsigned ID = NextLabelID(); Lines.push_back(SourceLineInfo(Line, Column, Source, ID)); return ID; Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=46628r1=46627r2=46628view=diff == --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Jan 31 20:05:57 2008 @@ -1055,7 +1055,7 @@ } else { unsigned Line = castConstantSDNode(LineOp)-getValue(); unsigned Col = castConstantSDNode(ColOp)-getValue(); - unsigned ID = MMI-RecordLabel(Line, Col, SrcFile); + unsigned ID = MMI-RecordSourceLine(Line, Col, SrcFile); Ops.push_back(DAG.getConstant(ID, MVT::i32)); Ops.push_back(DAG.getConstant(0, MVT::i32)); // a debug label Result = DAG.getNode(ISD::LABEL, MVT::Other, Ops[0], Ops.size()); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r46625 - /llvm/trunk/include/llvm/ADT/StringMap.h
On Jan 31, 2008, at 3:32 PM, Anton Korobeynikov wrote: Hello, Chris This sort of thing won't work when the string is empty and checking is enabled. Maybe something like this is enough: if (Key.empty()) return find(0,0); Will find() operate sane in such case (supplying NULL pointer as input)? Sure, it's a zero length range, so it would be invalid to dereference either pointer. -Chris ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits