similar to: [LLVMdev] opt -O2/-O3 does not Initialize pass?

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] opt -O2/-O3 does not Initialize pass?"

2009 Mar 12
1
[LLVMdev] opt -O2/-O3 does not Initialize pass?
I was using 2.4, but I built 2.5 and it behaves the same. I will test the SVN head too. On Mar 11, 2009, at 10:41 PM, Nick Lewycky wrote: > Anthony Danalis wrote: >> 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
2009 Mar 12
0
[LLVMdev] opt -O2/-O3 does not Initialize pass?
Anthony Danalis wrote: > 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
2011 Mar 03
3
top and allocation issues
In a context where exceptions are caught, I ran the fragment: cerr << "allocating" << endl; char* arr[100]; for (int jj = 0; jj < 10; ++jj) { cerr << "jj = " << jj << endl; arr[jj] = new char[2000000000]; sleep (30); } sleep (10); for (int jj = 0; jj < 10; ++jj) delete[] arr[jj]; cerr
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
2007 Jan 22
2
[LLVMdev] addPassesToEmit(Whole)File changes?
Hi folks, just installed the new llvm 1.9 build and noticed that my code no longer worked. It seems something has changed with addPassesToEmitFile(). First, the arguments to that method changed so that it no longer takes a PassManager, but only a FunctionPassManager. Instead there is a addPassesToEmitWholeFile() method, but that is marked as optional, and when I change my code to
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
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 ) {
2007 Jan 22
0
[LLVMdev] addPassesToEmit(Whole)File changes?
On Sun, 21 Jan 2007, Marcel Weiher wrote: > just installed the new llvm 1.9 build and noticed that my code no > longer worked. It seems something has changed with > addPassesToEmitFile(). First, the arguments to that method changed so > that it no longer takes a PassManager, but only a > FunctionPassManager. Instead there is a addPassesToEmitWholeFile() > method, but that is
2007 Nov 08
3
[LLVMdev] Newbie JITter
Hi, I'm experimenting with using LLVM to generate dynamic FFI bridges in VisualWorks Smalltalk. LLVM is an amazing thing! I'm going from dynamically generated assembler source to machine code, and I have that all working, copied from the llc tool and the JIT example. I have two questions: 1. What optimization passes, if any, should I run on the module before I pass it to the
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
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 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)
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
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
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
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 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 Dec 10
3
How to fix broken ogg/theora files
Hi there, I haven't been on this list until now, so I wasn't aware of this problem until last night ;-) - sorry for that. I am working on a patch for oggCut for that issue (looks good actually but I would like to do some testing befor I can release a patch.) Normal players are not effected by the page time misordering, so I took this issue as "minor". The reason for the