similar to: top and allocation issues

Displaying 20 results from an estimated 4000 matches similar to: "top and allocation issues"

2011 Apr 24
2
random roundoff?
On my CentOS 5 box, in a C++ program that does much arithmetic, including numerous matrix multiplications, I have a situation in in which the result depends on the nature of nearby I/O. Thus, with all arithmetic done with type double, and where values are mostly in the range [-1.0e0,+1.0e0] or nearby, I do: cerr << "some stuff" << endl; mat3 = matmult(mat1,mat2); I
2006 Mar 19
1
[LLVMdev] Idioms for retrieving global symbols and inheritance
Hello, I have a couple of doubts, as listed below: 1. To list all the global variables in the module, I am iterating using type_iterator and for each Type I get, I am using value_iterator to iterate over Values . In the second iteration I am getting unexpected results. For each type obtained from type_iterator->second, value_iterator->first produces the same list as what
2006 May 31
0
[LLVMdev] Adding an object to llc (analysis pass)
On Wed, 31 May 2006, Silken Tiger wrote: >> that requires a BasicBlockPass, it will fail the same was as when a >> ModulePass requires a FunctionPass. > void MParSchedule::getAnalysisUsage(AnalysisUsage &AU) const { > AU.setPreservesAll(); > } > > MParSchedule requires nothing and changes nothing. So hopefully the above code > represents this fact? Right
2009 Mar 11
3
[LLVMdev] opt -O2/-O3 does not Initialize pass?
Hello, I'm writing a pass that adds a function prototype to the module during doInitialization() and stores the pointer in a global variable. If I run opt with "-O1" or less, everything works fine. However, If I call opt with "-O2" or "-O3" then as soon as runOnFunction() is called, the pointer seems to be NULL. Here is a code that shows the problem:
2006 May 31
2
[LLVMdev] Adding an object to llc (analysis pass)
Hi Am Dienstag, 30. Mai 2006 19:21 schrieb Chris Lattner: > On Tue, 30 May 2006, Silken Tiger wrote: > > Everthing now compiles fine, but when running llc with invoking my own > > backend derived from the cbackend i get the following error: > > namespace llvm { > > class MParSchedule : public BasicBlockPass { > > public: > > > >
2006 May 23
3
[LLVMdev] Binary output to cout on Windows
The solution (provided in Microsoft's documentation) is to add: #include <cstdio> #include <io.h> #include <fcntl.h> and run: int result = _setmode( _fileno(stdin), _O_BINARY ); if( result == -1 ) { std::cerr<<"Cannot set input mode to binary."<<std::endl; return 1; } result = _setmode( _fileno(stdout), _O_BINARY ); if( result == -1 ) {
2014 Sep 01
2
[LLVMdev] Problem linking and JITing code through C++-API
I have a frontend that generates some LLVM bitcode that needs to be linked with other bitcode (its runtime library), which I generate from C++ source using Clang. If I write the output of my program to disk, link it with llvm-link, and then run it with lli, everything works perfectly. But if I try to perform the linking and running steps in my main program, I get this error during
2014 Sep 02
2
[LLVMdev] Problem linking and JITing code through C++-API
Yes. It appears that a bad reference to DataLayout was passed to MachineJumpTableInfo::getEntrySize. I'm using LLVM as a pre-compiled Ubuntu package for this work, so I can't do much more in GDB without building from source. Program received signal SIGSEGV, Segmentation fault. 0x00000000007565f0 in llvm::MachineJumpTableInfo::getEntrySize(llvm::DataLayout const&) const () (gdb)
2004 Jun 23
2
[LLVMdev] weird issue with mem2reg, still
On Wed, 23 Jun 2004, Patrick Meredith wrote: > Somehow it fails with operand out of bounds when the number of operands > is 2 and I am asking for the second operand. Second meaning operand 1. Okay, so you have something like this: if (CallInst *CI = dyn_cast<CallInst>(...)) { ... = CI->getOperand(1); } Can you send in this snippet of code, the assertion, and the
2014 Sep 08
2
[LLVMdev] Problem linking and JITing code through C++-API
Hi Andy, It looks like you're using LLVM's old JIT, rather than MCJIT? The old JIT has been removed from the mainline, and is no longer supported. I'd recommend building your own copy of LLVM from the development branch (as Reed suggested) where MCJIT is used by default - this may fix your issue. If you want to stick with the precompiled binaries, then you should change: #include
2006 Dec 07
7
[LLVMdev] #include <iostream>
Hi all, With the newest patches to LLVM, there should be no reason for having "#include <iostream>" in any library source code file, except for lib/ Support/Streams.cpp. Please use the following instead: OLD NEW --- --- std::ostream llvm::OStream std::istream llvm::IStream std::cerr llvm::cerr std::cerr llvm::cout
2004 Jun 23
0
[LLVMdev] weird issue with mem2reg, still
void MetaSplit::handleProgramUses(Value *V){ if(!isa<BasicBlock>(V)) programValues.insert(V); if(User *U = dyn_cast<User>(V)){ User::op_iterator OB = U->op_begin(), OE = U->op_end(); for(; OB != OE; ++OB){ if(CallInst *CI = dyn_cast<CallInst>(*OB)){ Function *F = CI->getCalledFunction(); if(F == ii || F == fi || F == vi || F == di || F == ci
2004 Oct 19
1
[LLVMdev] Re:question about Insert callInst to call a function in library
Thanks Chris, but the method you mentioned is not what I want. Maybe I didn't make it clear. As you said, /runtime/libprofile is runtime library for the following function. llvm_start_func_profiling llvm_start_block_profiling llvm_start_basic_block_tracing llvm_trace_basic_block And those above functions can be inserted into basic block etc for getting profile. However, those
2008 Aug 11
2
[LLVMdev] Applying different Optimizations for different Functions - Questions?
Hi! I am trying to develop an LLVM tool which can apply different optimizations for selected functions. For example, I want to apply an optimization onto one function but not for another one. I am using the standard optimizations available in LLVM. That is the runOnModule function I have written: bool ComplNewBBFuncs::runOnModule(Module &M) { Function *Main =
2004 Sep 08
3
do.call("[", ...) question
Hi again everyone I have an arbitrarily dimensional array "a" and a list "jj" of length length(dim(a)). The elements of jj are vectors of indexes. How do I use do.call() to extract a[ jj[[1]], jj[[2]], jj[[3]], ...] ? Toy example follows: a <- matrix(1:30,5,6) jj <- list(5:1,6:1) I want the following a[ jj[[1]],jj[[2]] ] How do I do this? OBAttempts:
2013 Apr 17
4
[LLVMdev] Loop vectorizer behaviour for 2D arrays and parallel annotation
Hello, I am trying to vectorize the following loop but the vectorizer says: "Found a possible write-write reorder" and does not vectorize. Why? for (j=0; j < 8; j++) { jj = j << 3; m2[j][0] = diff[jj ] + diff[jj+4]; m2[j][1] = diff[jj+1] + diff[jj+5]; m2[j][2] = diff[jj+2] + diff[jj+6]; m2[j][3] = diff[jj+3] + diff[jj+7]; m2[j][4] = diff[jj ] -
2000 Dec 10
1
seq(0.05,0.95,by=0.002) and logical error
Regardless of which version -- 1.1.1 or 1.2.0 (2000-11-27) -- with a fresh "directory" (i.e. no .RData), I am getting an extremely weird result. R : Copyright 2000, The R Development Core Team Version 1.2.0 Under development (unstable) (2000-11-27) > jj _ seq(0.05,0.95,by=0.002) > sum(jj==0.75) ## WRONG ANSWER [1] 0 > 0.05 + 350*.002 ## Double check that 0.75 is in jj [1]
2009 May 14
2
[LLVMdev] alias analysis results
Hi there, I am trying to understand how AliasAnalysis works out in LLVM. I used the following simple test-case (test4.c): -- void test() { int *jj, *kk; int aa = 100; jj = &aa; *jj = 300; } int main() { test(); return 0; } -- Then I did "llvm-gcc -emit-llvm -c -o test4.bc test4.c" to get bc. I tried the following 2 ways to get what I expect to get as
2009 Oct 23
1
access elements of a named list using a factor
Hi I have a factor 'f' and a named list 'jj'. I want names(jj) to match up with levels(f). How do I use levels(f) to access elements of jj? > f <- factor(c("pigs","pigs","slugs")) > f [1] pigs pigs slugs Levels: pigs slugs > > jj <- list(pigs=1:10,slugs=1:3) My attempts to produce jj$pigs all give errors: >
2005 Jun 13
3
extracting components of a list
Hi how do I extract those components of a list that satisfy a certain requirement? If jj <- list(list(a=1,b=4:7),list(a=5,b=3:6),list(a=10,b=4:5)) I want just the components of jj that have b[1] ==4 which in this case would be the first and third of jj, viz list (jj[[1]],jj[[3]]). How to do this efficiently? My only idea was to loop through jj, and set unwanted components to NULL,