similar to: Help with interfacing C & R

Displaying 20 results from an estimated 400 matches similar to: "Help with interfacing C & R"

2012 Jul 23
2
[LLVMdev] building a pass with cmake
Dear all, I want to build an LLVM pass by using CMake. After reading the ralevant part of the documentation ( http://llvm.org/releases/3.1/docs/CMake.html#passdev), I copied the files in the llvm/lib/Transforms/Hello to another folder in order to give a try. Then I renamed the folder as Hello2. Then I have changed CMakeLists.txt as following: cmake_minimum_required(VERSION 2.8) # A
2013 Mar 29
1
[LLVMdev] How to use the llvm::Linker?
Hi,All this one pass that will use the Linker namespace { // Hello2 - The second implementation with getAnalysisUsage implemented. llvm::StringRef programNametest(""); struct Hello2 : public ModulePass { static char ID; // Pass identification, replacement for typeid Hello2() : ModulePass(ID) {} virtual bool runOnModule(llvm::Module &M){ llvm::Linker
2012 Jul 23
0
[LLVMdev] building a pass with cmake
erkan diken <erkandiken at gmail.com> writes: [snip] > It seems that cmake is ok. When I run make install, it gives errors (see > below) and i think the reason is that it can not find the directory to llvm > header files. > I could not figure it out which variable to set and how to use it in order > to point the required directory ? > ( as in the make pass build which
2012 Nov 20
1
[LLVMdev] Removing unused global constant
Hi I create a simple bytecode file with clang -c -emit-llvm test.c -o test.bc #include <stdio.h> void hello(){ printf("hello\n"); } void hello2(){ printf("hello2\n"); } Then i want to keep only the hello function so i do : llvm-extract -func=hello -o test2.bc test.bc but the string constants are removed and "@.str" is marked as external @str
2005 Dec 27
1
Odd Behavior with render
I''d been trying to iterate through an array of hashes using the ActionController''s render method. Unfortunately, it appears that when I use a hash as one of the array elements, it gets passed as a nil to the partial. Here''s some code: @books = [ ''hello'', ''hello2'' ] render :partial => "book",
2017 Oct 25
3
LLVM v6.0 Internalize and GlobalDCE PASS can not work together?
Hi LLVM developers, $ cat hello.c #include <stdio.h> void foo() { } int main(int argc, char *argv[]) {   for (int i = 0; i < 10; i++) {     printf("%d\n", i);   }   return 0; } $ /opt/llvm-svn/bin/clang --version Fedora clang version 6.0.0 (trunk 316308) (based on LLVM 6.0.0svn) Target: x86_64-redhat-linux Thread model: posix InstalledDir: /opt/llvm-svn/bin $
2017 Oct 26
2
LLVM v6.0 Internalize and GlobalDCE PASS can not work together?
Hi Hal, Thanks for your hint! $ /opt/llvm-svn/bin/opt -S -internalize -internalize-public-api-list=main -globaldce hello3.ll -o hello3.dce.ll    it works :) But I argue that `main` Function should be inserted into ExternalNames by default: Index: lib/Transforms/IPO/Internalize.cpp =================================================================== --- lib/Transforms/IPO/Internalize.cpp 
2004 Aug 06
1
[LLVMdev] Why I cannot use PgmDependenceGraph?
I want to use PgmDependenceGraph pass , but my pass cannot work with PgmDependenceGraph. I tried again in Hello2 pass, and it could not work also. The following is I did with llvm/lib/Transforms/Hello.cpp: 1.insert #include "llvm/Analysis/PgmDependenceGraph.h" in Hello.cpp. 2.insert AU.addRequired<PgmDependenceGraph>() in the getAnalysisUsage(AnalysisUsage &AU) of Hello2.
2009 Dec 18
1
[LLVMdev] Compiling a raw binary with llvm/clang
$ clang -ffunction-sections -fdata-sections -Os -nostartfiles -c -o hello.o hello.c $ clang -ffunction-sections -fdata-sections -Os -nostartfiles -c -o test.o test.c $ llvm-ld -s -o hello2 hello.o $ llc hello2.bc -o hello3 $ ld -o hello_B hello3 --oformat binary ld:hello3: file format not recognized; treating as linker script ld:hello3:1: syntax error I am guessing that is what you meant by the
2009 Jun 23
2
[LLVMdev] lli aborts on arm QEMU
I get the following error when I try to run arm lli on QEMU: lli: llvm-arm/src/llvm/include/llvm/ADT/ilist.h:197: typename bidirectional_iterator<NodeTy, int>::reference llvm::ilist_iterator<NodeTy>::operator*() const [with NodeTy = llvm::RecyclerStruct]: Assertion `Traits::getNext(NodePtr) != 0 && "Dereferencing end()!"' failed. 0 lli 0x006abbfc Stack dump: 0.
2009 Jun 24
0
[LLVMdev] lli aborts on arm QEMU
hannibal hannibal wrote: > I get the following error when I try to run arm lli on QEMU: > > lli: llvm-arm/src/llvm/include/llvm/ADT/ilist.h:197: typename bidirectional_iterator<NodeTy, int>::reference llvm::ilist_iterator<NodeTy>::operator*() const [with NodeTy = llvm::RecyclerStruct]: Assertion `Traits::getNext(NodePtr) != 0 && "Dereferencing end()!"'
2011 May 03
0
[LLVMdev] Loop-Unroll optimization
Even after all the sequence of commands below bit-code is not showing any effect of loop-unrolling *manish at manish:~/Test2$ llvm-gcc-4.2 -O2 -emit-llvm Hello.c -c -o Hello.bc* *manish at manish:~/Test2$ opt-2.8 -loops Hello.bc -o Hello1.bc* *manish at manish:~/Test2$ opt-2.8 -loopsimplify Hello1.bc -o Hello2.bc* *manish at manish:~/Test2$ opt-2.8 -indvars Hello2.bc -o Hello3.bc* *manish at
2011 May 04
1
[LLVMdev] Loop-Unroll optimization
1. You should run the passes in the same opt command, for passes like loops which is an analysis pass provides results to the following passes. 2. You can pass a -debug flag to opt to see the some debugging info. 3. I tried this opt -mem2reg -loops -loopsimplify -loop-unroll -unroll-count=3 -debug loop.o -o tt.bc and got this message. Loop Size = 14 Can't unroll; loop not terminated by
2004 Sep 22
2
Facing problems with C code compilation - Please help.
Hello, I started using R a month ago - so I am a novice in this area. I am stuck with a problem and need some help urgently. I am using windows version of R 1.9.1. I am trying to compile C code in it. I have my C code - "hello.c" is lying in C:\Program Files\R\rw1091 This code is - #include <R.h> void hello(int *n) { int i; for(i=0;i< *n; i++) {
2010 Apr 23
1
[LLVMdev] pass argument to a FunctionPass
Hello is there any way to pass argument to my own Function pass I mean I wrote a Function pass (like Hello) that give me somme analyzes about the code source and I need to pass somme argument to the Pass like the size of data.... I want some think like this opt -load ../../../Debug/lib/LLVMHello.so -hello2 < test.bc > /dev/null arg1 arg2 ... So how to get inside the Function pass the
2010 Sep 02
1
[LLVMdev] Problems with Passing agrument to a Pass
Hi, I have a very naive question. I've written a pass that gets an argument from the command line with the following code: static cl::opt<int> LineNum("line-number", cl::Hidden, cl::Required,cl::desc("line of variable being observed")); Now when I run it, it seems like it cant see that I've put in an argument on the command line: opt -load
2012 Apr 09
0
[LLVMdev] How to instrument a this function using insertBefore instruction???
Thank you very much! To make it simpler, I may as well just implement the self-written "check function" in C language instead of wrapping it in LLVM module. According to the hint you give me, all I need to do is as follow(?) 1. Implement the "Check function" in the check.c file; 2. Add the check function into the module(the Hello1.bc file which I will run the functionPass on)
2012 Apr 09
1
[LLVMdev] How to instrument a this function using insertBefore instruction???
That sounds like a good general plan, yes! Joey 2012/4/9 15102925731 <zhenkaixd at 126.com> > Thank you very much! > > To make it simpler, I may as well just implement the self-written "check > function" in C language instead of wrapping it in LLVM module. *According > to the hint you give me, all I need to do is as follow(?)* > > 1. Implement the
2015 Jun 21
0
9p host/guest permissions & selinux...?
Hello Folks It's with some trepidation that I venture on to such a heady newsgroup, but I'm about ready to throw myself off a bridge after getting this all set up and apparently working only to be struck down by permissions and selinux hell (either, or both). I've followed instructions here: http://wiki.qemu.org/Documentation/9psetup
2010 Nov 15
1
[LLVMdev] --enable-optimized breaks pass registration for dynamically loadable passes?
Hello all, Is it well known that building LLVM with --enable-optimized causes RegisterPass calls to be removed from dynamically loadable libraries (i.e., those built with LOADABLE_MODULE=1)? For example, here's what happens to the Hello pass (ToT on Darwin, both with and without --enable-optimized): $ pwd /Users/ransford/llvm/lib/Transforms/Hello $ nm -j Release+Asserts/Hello.o | c++filt -p