Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] pass argument to a FunctionPass"
2010 Apr 19
4
[LLVMdev] Problem with the installation of llvm gcc
Hello
I'm trying to install LLVM and LLVM GCC
so I check out the source of llvm and llvm-gcc-4.2 from the svn
I flow the instructions of this page
http://llvm.org/docs/GCCFEBuildInstrs.html
I did the installation of LLVM and LLVM GCC well but the problem is there is
no llvm-gcc at the end of instalation !!! ??
I mean in the /usr/local/bin/ there are all the commands of llvm (lli llc
llvmc
2010 Apr 19
0
[LLVMdev] Problem with the installation of llvm gcc
You need to manually copy the llvm-gcc front-end binaries to somewhere
in your path. Alternatively, you can download the clang front-end and
start using that instead.
On Mon, Apr 19, 2010 at 10:58 AM, khaled hamidouche
<khaledhamidouche at gmail.com> wrote:
> Hello
>
> I'm trying to install LLVM and LLVM GCC
> so I check out the source of llvm and llvm-gcc-4.2 from the svn
2010 Apr 21
2
[LLVMdev] determining the number of iteration of a loop
Hello
I'm wandring to know how many times a block is executed inside a loop ?
knowing that I can't use getSmallConstantTripCount() because the number is
unkown "for (i=0;i<N;i++) for example"
I'm using a Function pass
for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
if (Loop *L = LI->getLoopFor(BB)) {
if (L->getHeader() ==
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
2010 Apr 20
1
[LLVMdev] iterate over loops inside the runOnFunction
Hello
I'm wandring to write a Function parser that iterates over loops inside each
function and inside each loop iterates over instructions
So I found a way to do the Function parser that iterates over BasicBlocks
(using the runOnfunction Pass) but I no know how make it iterates over
loops ?
So my question is there any way to make a loop inside the runOnfunction to
iterate over
2010 Apr 23
1
[LLVMdev] How to get the Operand type
Hello
How to get the type of an Operand ?
so for example I want to get the type of the operand(0) in this istruction
%arrayidx22 = getelementptr [1000 x double]* %C, i64 0, i64 %indvar67 ;
<double*> [#uses=1]
I tried (II->getOperand(0))->getType() ) but this give me an adress (I
think) (some think like 0x1253.. )
also I tried to get the type of the instruction with
switch
2010 Apr 21
0
[LLVMdev] determining the number of iteration of a loop
On Apr 21, 2010, at 7:31 AM, khaled hamidouche wrote:
> I'm wandring to know how many times a block is executed inside a
> loop ?
> knowing that I can't use getSmallConstantTripCount() because the
> number is unkown "for (i=0;i<N;i++) for example"
In general, the number of iterations is undecidable. For example:
int main(char **argv, int N) {
for
2010 Apr 19
0
[LLVMdev] Problem with the installation of llvm gcc
khaled hamidouche wrote:
> Hello
>
> I'm trying to install LLVM and LLVM GCC
> so I check out the source of llvm and llvm-gcc-4.2 from the svn
>
> I flow the instructions of this page
> http://llvm.org/docs/GCCFEBuildInstrs.html
>
> I did the installation of LLVM and LLVM GCC well but the problem is
> there is no llvm-gcc at the end of instalation !!! ??
>
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
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
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.
2012 Aug 22
0
[LLVMdev] issues registering passes in osx 10.8
Have you tried to pass --enable-shared to configure? It works for me.
$ opt -load /usr/local/lib/LLVMHello.dylib -help | grep hello
-hello - Hello World Pass
-hello2 - Hello World Pass (with getAnalysisUsage implemented)
- xi
On Aug 21, 2012, at 5:55 PM, Ashwin kumar <ashwinkumar18 at gmail.com> wrote:
>
2007 Feb 08
1
Help with interfacing C & R
Hi all,
I was trying to set up an interface for using C functions in R. For this, my R file hello2.r is:
---------------------------------------------------------------------------------
hello2 <- function(n) {
.C("hello", as.integer(n))
}
hello2(3)
--------------------------------------------------------------------------------
and my hello.c file is:
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.