Displaying 20 results from an estimated 106 matches for "valuemap".
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 !=...
2006 May 16
1
[LLVMdev] CloneModule ValueMap
...e to a Value
pointing into the new one.
The CloneModule implementation already has to keep such a mapping
internally, so I've written a patch that exposes it as a second inout
parameter to CloneModule(), with the one param version being a simple
wrapper for backward compatibility.
The type of ValueMap is std::map<const Value *, Value*> and the
semantics are simply:
Value *New = ValueMap[Old];
Nick Lewycky
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clonemodule.patch
Type: text/x-patch
Size: 2138 bytes
Desc: not available
URL: <http://lists.llvm...
2008 Apr 16
2
[LLVMdev] Problems in removing a cloned instruction.
...elow:
// This function, takes a basic block and clones it to another
identical basic block, the only changes occur for the return
instructions, which are replaced by ret void.
BasicBlock *ProgSlicer::CloneBasicBlock(const BasicBlock *BB,
DenseMap<const Value*, Value*> &ValueMap,
const char *NameSuffix, Function *F) {
BasicBlock *NewBB = new BasicBlock("", F);
if (BB->hasName()) NewBB->setName(BB->getName()+NameSuffix);
bool hasCalls = false, hasDynamicAllocas = false,
hasStaticAllocas = false, isTerminal =...
2019 Sep 26
2
DenseMap/ValueMap: is M[New]=M[Old] valid ?
Hi,
I have a question about llvm/ADT/DenseMap.h and llvm/IR/ValueMap.h:
When you have a:
MapType M;
is it safe to do:
M[NewKey] = M[OldKey];
or do you need to do it in two steps:
auto tmp = M[OldKey]; // ensure the reference to M[OldKey] is copied, before reassigning.
M[NewKey] = tmp; // might reallocate
aka, will a possible allocation for M...
2008 Apr 16
0
[LLVMdev] Problems in removing a cloned instruction.
Hi,
I'm gonna try to give some feedback, but I have only been working with LLVM
for a few days, so don't take what I'm saying without verifying :-)
> BasicBlock *ProgSlicer::CloneBasicBlock(const BasicBlock *BB,
> DenseMap<const Value*, Value*> &ValueMap,
> const char *NameSuffix, Function *F) {
>
> BasicBlock *NewBB = new BasicBlock("", F);
> if (BB->hasName()) NewBB->setName(BB->getName()+NameSuffix);
>
> bool hasCalls = false, hasDynamicAllocas = false,
> has...
2014 Dec 10
2
[LLVMdev] Metadata/Value split has landed
...ObjectImpl(void*) () from /opt/buildbot/lib/libLLVM-3.6svn.so
> #6 0x00007ffff3a40eed in llvm::MDNode::getTemporary(llvm::LLVMContext&, llvm::ArrayRef<llvm::Metadata*>) () from /opt/buildbot/lib/libLLVM-3.6svn.so
> #7 0x00007ffff3426b3f in MapValueImpl(llvm::Metadata const*, llvm::ValueMap<llvm::Value const*, llvm::WeakVH, llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex<false> > >&, llvm::RemapFlags, llvm::ValueMapTypeRemapper*, llvm::ValueMaterializer*) ()
> from /opt/buildbot/lib/libLLVM-3.6svn.so
> #8 0x00007ffff3426bd6 in MapValueImpl...
2013 Apr 02
1
[LLVMdev] cyclical dependence between caller and callee in JIT
...ng the type returned by
llvm::Function::getType(), but i get this assertion failure:
%"calling function" = call i32 @X.foo(i32 %read)
F is used in instruction:
%"calling function" = call i32 @X.foo(i32 %read)
mytests: /home/charlesq/third_party/llvm-3.1.src/include/llvm/ADT/ValueMap.h:220:
void llvm::ValueMapCallbackVH<KeyT, ValueT,
Config>::allUsesReplacedWith(llvm::Value*) [with KeyT = const
llvm::Function*; ValueT = {anonymous}::JITEmitter::EmittedCode; Config
= {anonymous}::JITEmitter::EmittedFunctionConfig]: Assertion
`isa<KeySansPointerT>(new_key) &&...
2011 Jul 06
2
[LLVMdev] First steps with LLVM and partial evaluation
...erivedTypes.h"
#include "llvm/LLVMContext.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/Transforms/Utils/Cloning.h"
using namespace std;
using namespace llvm;
static Function *cloneFunctionInfo(const Function *F,
ValueToValueMapTy& ValueMap)
{
vector<const Type*> ArgTypes;
// The user might be deleting arguments to the function by specifying them in
// the ValueMap. If so, we need to not add the arguments to the arg ty vector
//
for (Function::const_arg_iterator I = F->arg_begin(), E = F-&...
2009 Oct 27
1
[LLVMdev] Remove class/struct DenseMapInfo mix
Hello
Visual Studio is complaining about the mix of struct and class.
2>C:\dev\llvm\include\llvm/ADT/ValueMap.h(202) : warning C4099:
'llvm::DenseMapInfo<llvm::ValueMapCallbackVH<KeyT,ValueT,Config,ValueInfoT>>'
: type name first seen using 'struct' now seen using 'class'
2> C:\dev\llvm\include\llvm/ADT/ValueMap.h(251) : see reference to
class template instanti...
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.
2008 Jul 11
0
[LLVMdev] Cloning Functions
...doing
> >
> > for each function
> > generate_ir
> > convert_to_llvm_ir
> > optimize_llvm_ir
>
> Yep.
Ok, I've mostly got a mechanism to do what I want:
1. As each function comes in for op/codegen, clone it and save off
the clone and its associated ValueMap (I call these clones "pristine"
functions.
2. After all processing is done, clone the resulting Module (this has all of
the global data and the optimized functions). Save the ValueMap from this
operation.
3. Merge the ValueMaps from the Module clone and all the pristine func...
2008 Jul 11
2
[LLVMdev] Cloning Functions
...ction
>>> generate_ir
>>> convert_to_llvm_ir
>>> optimize_llvm_ir
>>
>> Yep.
>
> Ok, I've mostly got a mechanism to do what I want:
>
> 1. As each function comes in for op/codegen, clone it and save off
> the clone and its associated ValueMap (I call these clones
> "pristine"
> functions.
>
> 2. After all processing is done, clone the resulting Module (this
> has all of
> the global data and the optimized functions). Save the ValueMap
> from this
> operation.
The global data is also optimi...
2014 Dec 10
3
[LLVMdev] Metadata/Value split has landed
...) () from /opt/buildbot/lib/libLLVM-3.6svn.so
>>> #6 0x00007ffff3a40eed in llvm::MDNode::getTemporary(llvm::LLVMContext&, llvm::ArrayRef<llvm::Metadata*>) () from /opt/buildbot/lib/libLLVM-3.6svn.so
>>> #7 0x00007ffff3426b3f in MapValueImpl(llvm::Metadata const*, llvm::ValueMap<llvm::Value const*, llvm::WeakVH, llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex<false> > >&, llvm::RemapFlags, llvm::ValueMapTypeRemapper*, llvm::ValueMaterializer*) ()
>>> from /opt/buildbot/lib/libLLVM-3.6svn.so
>>> #8 0x00007ffff3426bd6...
2014 Dec 10
4
[LLVMdev] Metadata/Value split has landed
The `Metadata`/`Value` split (PR21532) landed in r223802 -- at least, the
C++ side of it. This was a rocky day, but I suppose that's what I get
for failing to stage the change in smaller pieces.
As of r223916 (lldb), I'm not aware of any remaining (in-tree) breakage,
so if I've missed some problem in the sea of buildbot errors, please
flag me down.
I'll follow up soon with
2008 Jul 09
2
[LLVMdev] Cloning Functions
On Wednesday 09 July 2008 13:24, Devang Patel wrote:
> Is it possible to explain intended use of original unoptimized version ?
bugpoint. I want to run it on the IR produced by our frontend. This will
help us generate new LLVM tests we can send upstream. We've fixed
bugs that aren't caught by the upstream tests and it would be nice to capture
the problem and make the test
2014 Dec 11
2
[LLVMdev] Metadata/Value split has landed
...ldbot/lib/libLLVM-3.6svn.so
> >>>> #6 0x00007ffff3a40eed in llvm::MDNode::getTemporary(llvm::LLVMContext&, llvm::ArrayRef<llvm::Metadata*>) () from /opt/buildbot/lib/libLLVM-3.6svn.so
> >>>> #7 0x00007ffff3426b3f in MapValueImpl(llvm::Metadata const*, llvm::ValueMap<llvm::Value const*, llvm::WeakVH, llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex<false> > >&, llvm::RemapFlags, llvm::ValueMapTypeRemapper*, llvm::ValueMaterializer*) ()
> >>>> from /opt/buildbot/lib/libLLVM-3.6svn.so
> >>>> #8 0x...
2019 Sep 27
2
DenseMap/ValueMap: is M[New]=M[Old] valid ?
...or correctness if "NewKey" might not
> already be in "M".
>
> On Thu, Sep 26, 2019 at 2:48 PM Jeroen Dobbelaere via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> Hi,
>
> I have a question about llvm/ADT/DenseMap.h and
> llvm/IR/ValueMap.h:
>
> When you have a:
> MapType M;
>
> is it safe to do:
> M[NewKey] = M[OldKey];
>
> or do you need to do it in two steps:
> auto tmp = M[OldKey]; // ensure the reference to M[OldKey] is
> copied, before reassign...
2014 Dec 11
2
[LLVMdev] Metadata/Value split has landed
...LVM-3.6svn.so
>>>>>>> #6 0x00007ffff3a40eed in llvm::MDNode::getTemporary(llvm::LLVMContext&, llvm::ArrayRef<llvm::Metadata*>) () from /opt/buildbot/lib/libLLVM-3.6svn.so
>>>>>>> #7 0x00007ffff3426b3f in MapValueImpl(llvm::Metadata const*, llvm::ValueMap<llvm::Value const*, llvm::WeakVH, llvm::ValueMapConfig<llvm::Value const*, llvm::sys::SmartMutex<false> > >&, llvm::RemapFlags, llvm::ValueMapTypeRemapper*, llvm::ValueMaterializer*) ()
>>>>>>> from /opt/buildbot/lib/libLLVM-3.6svn.so
>>>>>&...
2008 Jul 11
0
[LLVMdev] Cloning Functions
On Friday 11 July 2008 12:05, Devang Patel wrote:
> > Ok, I've mostly got a mechanism to do what I want:
> >
> > 1. As each function comes in for op/codegen, clone it and save off
> > the clone and its associated ValueMap (I call these clones
> > "pristine"
> > functions.
> >
> > 2. After all processing is done, clone the resulting Module (this
> > has all of
> > the global data and the optimized functions). Save the ValueMap
> > from this
> > operatio...
2016 Jul 29
2
[ThinLTO] assert(GS != DefinedGlobals.end()) failed in FunctionImport.cpp
...eturned from getLinkedToGlobal(SGV) and assigned to DGV. However, as ForAlias is true and ShouldLink is false, DGV becomes nullptr later, and NewGV is created from copyGlobalValueProto(SGV, ShouldLink) call. Therefore, returned value from linkGlobalValueProto is different from the value obtained by ValueMap.lookup(SGV) in IRLinker::materialize.
BTW, I updated LLVM to the latest version in SVN this morning, and the assertion failure is gone. Instead, it ends up with broken module found errors:
Global is external, but doesn't have external or weak linkage!
void (%2*, %2*, i32)* @"_foo.llvm.E5...