Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] llvm-gfortran problems"
2011 Sep 12
3
[LLVMdev] llvm-gfortran problems
Hello,
Sorry for the late reply. Using dragonegg worked well, thanks all!
Just as a note... I had to use llvm-ld during the link step because gfortran
could not link bitcode. Here's an example of the error shown when using
gfortran instead of llvm-ld:
$ ${GCC_4_5_0}/bin/gfortran hw.f -c -fplugin=${DRAGONEGG_PLUGIN}/dragonegg.so
-o hw.o -flto -emit-llvm -S
$ ${LLVM_2_9}/bin/opt -mem2reg hw.o
2011 Sep 12
2
[LLVMdev] llvm-gfortran problems
Thats correct. But using llc becomes a problem when I have archives (.a
files). I could, in theory, extract its contents to a tempdir and then use
llc and link but just wondering if there is a more elegant solution.
Ashay
On Mon, Sep 12, 2011 at 3:00 PM, Dmitry N. Mikushin <maemarcus at gmail.com>wrote:
> Ashay,
>
> If I understand correctly, in hw.o you would have llvm
2011 Sep 12
2
[LLVMdev] llvm-gfortran problems
Hmm.. I didn't explain the problem completely last time. I am creating a
drop-in replacement for gcc and gfortran that runs an additional pass on the
bitcode before generating the native binary. Here's whats happening: If the
source code compilation process builds a static library (.a archive file), I
need a means to link the `.a' file statically into the application. So if
the
2011 Aug 31
0
[LLVMdev] llvm-gfortran problems
Hi Ashay,
Do you need specifically llvm-gfortran that is based on gcc 4.2? Since
that, DragonEgg has been introduced - a powerful plugin to gcc that
makes it possible to utilize regular gcc compilers as frontends to
llvm: http://dragonegg.llvm.org/
It generates Fortran90 programs for me very well.
- D.
2011/9/1 Ashay Rane <ashay.rane at tacc.utexas.edu>:
> Hello,
> I have been
2011 Sep 12
0
[LLVMdev] llvm-gfortran problems
Ashay,
If I understand correctly, in hw.o you would have llvm bytecode, while
linker expects regular object binary. Probably first you need to emit
asm out of bytecode using llc?
- D.
2011/9/12 Ashay Rane <ashay.rane at tacc.utexas.edu>:
> Hello,
> Sorry for the late reply. Using dragonegg worked well, thanks all!
> Just as a note... I had to use llvm-ld during the link step
2011 Sep 12
0
[LLVMdev] llvm-gfortran problems
Sorry, at what step do you need archive? llc emits binary, it does not
perform any linking, thus it does not need anything except the input
bytecode file. Then during linking you can link whatever archives of
binaries you want.
2011/9/13 Ashay Rane <ashay.rane at tacc.utexas.edu>:
> Thats correct. But using llc becomes a problem when I have archives (.a
> files). I could, in theory,
2011 Sep 12
1
[LLVMdev] llvm-gfortran problems
No, I am running the LLVM pass at the compilation step. So by the time I
reach the link step, the transformed bitcode has been generated.
Ashay
On Mon, Sep 12, 2011 at 4:12 PM, Dmitry N. Mikushin <maemarcus at gmail.com>wrote:
> I see. And what's the purpose for outputting bitcode into *.o and *.a
> files? Do you want to perform an LLVM pass on linking step?
>
> 2011/9/13
2011 Sep 12
0
[LLVMdev] llvm-gfortran problems
I see. And what's the purpose for outputting bitcode into *.o and *.a
files? Do you want to perform an LLVM pass on linking step?
2011/9/13 Ashay Rane <ashay.rane at tacc.utexas.edu>:
> Hmm.. I didn't explain the problem completely last time. I am creating a
> drop-in replacement for gcc and gfortran that runs an additional pass on the
> bitcode before generating the native
2011 Aug 31
0
[LLVMdev] llvm-gfortran problems
Hello
> I am not very familiar with Fortran programs. I saw a few programs that had
> a "MAIN" subroutine defined, some others that did not. Am I missing
> something while compiling the code? Is there a different way to compile
> bitcode (from Fortran programs) to a native binary?
For Fortran MAIN is indeed something similar to C main, but not
exactly the same.
You have to
2011 Mar 17
0
[LLVMdev] Operating on contents of virtual registers
On Wed, Mar 16, 2011 at 9:33 PM, Ashay Rane <ashay.rane at asu.edu> wrote:
> Hi Eli,
> Thanks for the reply. The problem is that getOperand() returns an
> llvm::Instruction (that refers to the definition of the operand). What I am
> trying to find out is how to get the value of the operand. When you refer to
> bitcasting to i8*, do you mean casting the return value from
2011 Mar 17
2
[LLVMdev] Operating on contents of virtual registers
Hi Eli,
Thanks for the reply. The problem is that getOperand() returns an
llvm::Instruction (that refers to the definition of the operand). What I am
trying to find out is how to get the value of the operand. When you refer to
bitcasting to i8*, do you mean casting the return value from getOperand()
itself?
Ashay
On Wed, Mar 16, 2011 at 11:03 PM, Eli Friedman <eli.friedman at
2011 Mar 17
1
[LLVMdev] Operating on contents of virtual registers
Thanks Eli, that worked!
For the record, I had to make one change though. I had to bitcast to i32*
(instead of i8*) otherwise I was seeing errors like:
Instruction referencing instruction not embedded in a basic block!
%retval = alloca i32
<badref> = bitcast i32* %retval to i8*
and sometimes:
Instruction does not dominate all uses!
That makes me curious to ask, what does the choice of
2012 Feb 29
4
[LLVMdev] Recovering variable names from bitcode
Hello,
I have been facing a few problems getting names of variables from the
bitcode. The bitcode does contain debug metadata. The first problem is
regarding `memtmp' variables (apparently, the original variable name is no
longer present in the bitcode). The other two problems concern OpenMP. In
one case, the instruction is not named and hence establishing a connection
to the debug metadata
2011 Aug 09
2
[LLVMdev] llvm-gcc with static libraries
`/usr/bin/ld -v' says it is not running gold and I suppose fixing that would
require place LLVMgold.so into /usr/lib/bfd-plugins. Is there any way to
make this work without requiring root access to the machine?
Also, just to confirm, is the gold plugin required even when all of the
files have been compiled/built using llvm-gcc and llvm-ar?
Ashay
On Tue, Aug 9, 2011 at 1:33 PM, Eli Friedman
2011 Mar 17
2
[LLVMdev] Operating on contents of virtual registers
Hello,
I was facing some difficulty in implementing a transform and I was wondering
if I could get some help please.
The transform needs to operate on the operands of certain instructions. For
example, given an instruction, say "%10 = load i32* %9, align 4", I have to
record the value of %9 and process it. Of course, this is only possible at
runtime and so I am instrumenting the code
2011 Aug 09
2
[LLVMdev] llvm-gcc with static libraries
Hello,
While linking programs against static libraries built using llvm-ar and
llvm-ranlib, I see an error message:
could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status
Using either /usr/bin/nm or llvm-nm (depending on the use of --emit-llvm
flag to llvm-gcc), one of them is able to list the symbols in the archive
file. However, the link step
2011 Aug 09
0
[LLVMdev] llvm-gcc with static libraries
On Tue, Aug 9, 2011 at 12:03 PM, Ashay Rane <ashay.rane at asu.edu> wrote:
> `/usr/bin/ld -v' says it is not running gold and I suppose fixing that would
> require place LLVMgold.so into /usr/lib/bfd-plugins. Is there any way to
> make this work without requiring root access to the machine?
If you install your own version of binutils into the same prefix as llvm-gcc,
it should
2011 Aug 09
0
[LLVMdev] llvm-gcc with static libraries
On Tue, Aug 9, 2011 at 11:16 AM, Ashay Rane <ashay.rane at asu.edu> wrote:
> Hello,
> While linking programs against static libraries built using llvm-ar and
> llvm-ranlib, I see an error message:
> could not read symbols: Archive has no index; run ranlib to add one
> collect2: ld returned 1 exit status
> Using either /usr/bin/nm or llvm-nm (depending on the use of
2011 Mar 17
0
[LLVMdev] Operating on contents of virtual registers
On Wed, Mar 16, 2011 at 6:00 PM, Ashay Rane <ashay.rane at asu.edu> wrote:
> Hello,
> I was facing some difficulty in implementing a transform and I was wondering
> if I could get some help please.
> The transform needs to operate on the operands of certain instructions. For
> example, given an instruction, say "%10 = load i32* %9, align 4", I have to
> record the
2016 Dec 14
2
llvm.trap() from -O1 optimization
Hello,
This is likely to be some small issue, but I am unable to figure out
the solution. The following code, when run through `opt' with the -O1
flag, replaces the call to foo() with a call to llvm.trap() followed
by an `unreachable' instruction.
=====================
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple =