search for: valueenumerator

Displaying 17 results from an estimated 17 matches for "valueenumerator".

2010 Sep 22
2
[LLVMdev] Hit assert(I != ValueMap.end() && "Value not in slotcalculator!") in ValueEnumerator.cpp
Hi there, I added a function to a module, but failed to write the bitcode to file because it hit the: assert(I != ValueMap.end() && "Value not in slotcalculator!") So I added some diagnosis information there, unsigned ValueEnumerator::getValueID(const Value *V) const { if (isa<MDNode>(V) || isa<MDString>(V)) { ValueMapType::const_iterator I = MDValueMap.find(V); assert(I != MDValueMap.end() && "Value not in slotcalculator!"); return I->second-1; } ValueMapType::const_ite...
2010 Sep 22
0
[LLVMdev] Hit assert(I != ValueMap.end() && "Value not in slotcalculator!") in ValueEnumerator.cpp
Hi Guoliang, > I added a function to a module, but failed to write the bitcode to file > because it hit the: > assert(I != ValueMap.end()&& "Value not in slotcalculator!") does the module pass the verifier after you add the function to it? Ciao, Duncan.
2016 Jun 28
0
mutateType on AllocaInst problem
...gt;(AI)->mutateType(cast<Value>(FDP_AI)->getType()); cast<Value>(AI)->replaceAllUsesWith(cast<Value>(FDP_AI)); } } I am getting an error at optimization time. After my pass ran, during the Bitcode Writer pass time: opt: /home/pierre/Desktop/llvm/lib/Bitcode/Writer/ValueEnumerator.h:162: unsigned int llvm::ValueEnumerator::getTypeID(llvm::Type*) const: Assertion `I != TypeMap.end() && "Type not in ValueEnumerator!"' failed. #0 0x0000000002a95b5c llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/pierre/Desktop/llvm/lib/Support/Unix/Signals.inc:400...
2012 Sep 26
0
[LLVMdev] [PATCH / PROPOSAL] bitcode encoding that is ~15% smaller for large bitcode files...
...// FUNCTION_BLOCK_REL abbrev id's. Should this comment have been changed? > FUNCTION_INST_LOAD_ABBREV = bitc::FIRST_APPLICATION_ABBREV, > FUNCTION_INST_BINOP_ABBREV, > FUNCTION_INST_BINOP_FLAGS_ABBREV, ... > @@ -1025,12 +1037,15 @@ static void WriteModuleConstants(const ValueEnumerator &VE, > /// > /// This function adds V's value ID to Vals. If the value ID is higher than the > /// instruction ID, then it is a forward reference, and it also includes the > -/// type ID. > +/// type ID. The value ID that is writtne is encoded as relative to the InstID....
2012 Sep 26
9
[LLVMdev] [PATCH / PROPOSAL] bitcode encoding that is ~15% smaller for large bitcode files...
...hrink linked bitcode files by about 15%. See this spreadsheet for some rough data: https://docs.google.com/spreadsheet/ccc?key=0AjRrJHQc4_bddEtJdjdIek5fMDdIdFFIZldZXzdWa0E The change is in how operand ids are encoded in bitcode files. Rather than use an "absolute number" given by the ValueEnumerator, which counts up within a function, we can have the id be relative to the current instruction. I.e., Instead of having: ... = icmp eq i32 n-1, n-2 br i1 ..., label %bb1, label %bb2 you have ... = icmp eq i32 1, 2 br i1 1, label %bb1, label %bb2 Thus the ids remain relatively small and can be...
2016 Apr 21
2
Refactor BitcodeWriter into classes?
...ll separated components (yes many places are drifting a lot in LLVM...). > > Not to say that it can't be done, just that it requires a lot of care. I don't think we should throw *all* the state in. But some of the state is passed everywhere. At least (off the top of my head): - ValueEnumerator& - BitstreamWriter&
2009 Jan 13
2
[LLVMdev] Build problems on MinGW
...not many of them are marked "good" either. During build I get lots of missing symbol errors from LD. Near the end it goes through a monster link step that spews many screenfuls of link errors. Here's an example from near the end: c:/mingw/src/llvm-2.4/Release/lib/libLLVMBitWriter.a(ValueEnumerator.o):ValueEnumerator.cpp:(.text$_ZNSt6vectorIN4llvm11 AttrListPtrESaIS1_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS1_S3_EERKS1_[std::vector<llvm::AttrListPtr, std::al locator<llvm::AttrListPtr> >::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::AttrListPtr*, std::vector<llv...
2012 Sep 30
0
[LLVMdev] [PATCH / PROPOSAL] bitcode encoding that is ~15% smaller for large bitcode files...
...s by about 15%. See this spreadsheet for some rough data: > > https://docs.google.com/spreadsheet/ccc?key=0AjRrJHQc4_bddEtJdjdIek5fMDdIdFFIZldZXzdWa0E > > > The change is in how operand ids are encoded in bitcode files. Rather than use an "absolute number" given by the ValueEnumerator, which counts up within a function, we can have the id be relative to the current instruction. Very cool. This is the "obviously right" way to do it, I'm glad you've implemented it. It looks like Duncan gave you a lot of feedback already, I'm looking forward to seeing the u...
2011 Aug 31
2
[LLVMdev] How to place call(s) to functions found in other llvm modules ???
...s = %cond_false %tmp5 = sub i32 %x, %y %tmp6 = call i32 @gcd(i32 %tmp5, i32 %y) ret i32 %tmp6 } ; ModuleID = 'GCDMain' define i32 @main() { EntryBlock: %tmp = call i32 @gcd(i32 30, i32 50) ret i32 %tmp } ModuleMaker2: /home/hamayun/workspace/NaSiK/sw/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp:155: unsigned int llvm::ValueEnumerator::getValueID(const llvm::Value*) const: Assertion `I != ValueMap.end() && "Value not in slotcalculator!"' failed. Aborted ---------------------------------------------------------------------- And here is the source code of my exa...
2015 Apr 01
4
[LLVMdev] [RFC] Setting preserve-bc-use-list-order=true by default
...ne and the LTO codegen pipeline. On SPEC, serializing to/from bitcode will change the output executable in 33 benchmarks. If you use `-preserve-bc-use-list-order`, all executables match. How? ==== Have a look at `BitcodeReader::ParseUseLists()` and `predictUseListOrder()` in `lib/Bitcode/Writer/ValueEnumerator.cpp`. Does it degrade smoothly if IR changes? ======================================= Yes. If a `Value`'s use-list has changed in size (e.g., because of bitcode upgrades), its use-list order record is ignored. What does it cost? ================== Manman collected a bunch of numbers, with...
2014 Oct 24
8
[LLVMdev] First-class debug info IR: MDLocation
...lvm/IR/DebugLoc.h include/llvm/IR/Metadata.h include/llvm/IR/Value.h lib/AsmParser/LLLexer.cpp lib/AsmParser/LLParser.cpp lib/AsmParser/LLParser.h lib/AsmParser/LLToken.h lib/Bitcode/Reader/BitcodeReader.cpp lib/Bitcode/Writer/BitcodeWriter.cpp lib/Bitcode/Writer/ValueEnumerator.cpp lib/Bitcode/Writer/ValueEnumerator.h lib/IR/AsmWriter.cpp lib/IR/AsmWriter.h lib/IR/DebugInfo.cpp lib/IR/DebugLoc.cpp lib/IR/LLVMContextImpl.cpp lib/IR/LLVMContextImpl.h lib/IR/Metadata.cpp Using `Value` instead of `MDNode` ================================= A n...
2016 Apr 21
3
Refactor BitcodeWriter into classes?
I am currently making some BitcodeWriter changes that involve some refactoring, and am thinking for the Nth time that it would be much nicer to have a class instead of passing around a long list of parameters. I am thinking of biting the bullet and doing that - any objections? I assume the reason why there is no existing class wrapping the bitcode writing process is just legacy code and nothing
2012 Oct 02
2
[LLVMdev] [PATCH / PROPOSAL] bitcode encoding that is ~15% smaller for large bitcode files...
...5%. > See this spreadsheet for some rough data: > > > https://docs.google.com/spreadsheet/ccc?key=0AjRrJHQc4_bddEtJdjdIek5fMDdIdFFIZldZXzdWa0E > > > The change is in how operand ids are encoded in bitcode files. Rather > than use an "absolute number" given by the ValueEnumerator, which counts up > within a function, we can have the id be relative to the current > instruction. > > > Very cool. This is the "obviously right" way to do it, I'm glad you've > implemented it. It looks like Duncan gave you a lot of feedback already, > I'...
2007 Jul 03
0
[LLVMdev] Solaris 9 compilation
...eaches end of non-void function /home/ggreif/llvm/lib/Target/MSIL/MSILWriter.cpp: In member function `std::string <unnamed>::MSILWriter::getConvModopt(unsigned int)': /home/ggreif/llvm/lib/Target/MSIL/MSILWriter.cpp:261: warning: control reaches end of non-void function llvm[3]: Compiling ValueEnumerator.cpp for Release build /home/ggreif/llvm/lib/Target/MSIL/MSILWriter.cpp: In member function `std::string <unnamed>::MSILWriter::getTypeName(const llvm::Type*, bool, bool)': /home/ggreif/llvm/lib/Target/MSIL/MSILWriter.cpp:333: warning: control reaches end of non-void function 8) /home/gg...
2014 Jul 24
2
[LLVMdev] Continuing PR5680: preserve order of use lists in bitcode
I had a long discussion with Nick about this where he changed several of my core assumptions and feelings about the best way to proceed here. I'd rather he provide his perspective rather me try to repeat it, so poking him on this thread.... On Sun, Jul 20, 2014 at 3:21 PM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote: > > > On 2014 Jul 8, at 18:47, Duncan P. N.
2011 Feb 15
3
[LLVMdev] Structure Types and ABI sizes
Hi all, We're hitting some walls here when generating the correct structure layout for specific C++ ABI requirements, and I was wondering how much StructLayout could help. For instance, the ABI has some complicated rules on the size of derived classes (http://www.codesourcery.com/public/cxx-abi/abi.html#class-types) and LLVM struct type cannot reflect that in full. Example: // CHECK:
2015 Jul 29
1
[LLVMdev] Error when i am using command make -j4 command in cygwin to compile safecode
...Asserts build llvm[2]: Compiling AliasAnalysisEvaluator.cpp for Release+Asserts build llvm[2]: Compiling AliasDebugger.cpp for Release+Asserts build llvm[3]: Compiling BitcodeWriterPass.cpp for Release+Asserts build llvm[2]: Compiling AliasSetTracker.cpp for Release+Asserts build llvm[3]: Compiling ValueEnumerator.cpp for Release+Asserts build llvm[2]: Compiling Parser.cpp for Release+Asserts build llvm[3]: Compiling BitstreamReader.cpp for Release+Asserts build llvm[2]: Compiling Analysis.cpp for Release+Asserts build llvm[2]: Building Release+Asserts Archive Library libLLVMAsmParser.a llvm[3]: Building Rel...