Displaying 20 results from an estimated 40000 matches similar to: "Compiling the code generated by LLVM C++ backend"
2017 Oct 22
2
How to dump broken IR from LLVM backend?
Just use Unix IO redirect? `llc -mllvm -print-after-all &> a.txt`
2017-10-22 14:17 GMT+08:00 Dipanjan Das via llvm-dev <
llvm-dev at lists.llvm.org>:
>
> Seems like "-mllvm -print-after-all" does the trick. Is there any switch
> that dumps the output to a file instead of console?
>
> On 21 October 2017 at 21:33, Dipanjan Das <mail.dipanjan.das at
2017 Oct 22
2
How to dump broken IR from LLVM backend?
You can also `-disable-verify -o <output-filename> ` which will disable the
verify check.
On Sat, 21 Oct 2017 at 23:54 Dipanjan Das via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
>
> Yes, that definitely works. Wanted to know if there's a switch for file
> output or not.
>
> On 21 October 2017 at 23:45, 陳韋任 <chenwj.cs97g at g2.nctu.edu.tw> wrote:
>
2017 Oct 22
2
How to dump broken IR from LLVM backend?
My pass complains and gives up after spitting out:
======================================
Instruction does not dominate all uses!
%44 = icmp ne i8** %endptr, null
br i1 %44, label %32, label %33
Instruction has bogus parent pointer!
======================================
Is there any way to dump the entire IR even in broken form from the backend
so that I can inspect what's going on?
--
2015 Sep 10
2
Rewriting LLVM IR intrinsic functions
On 10 Sep 2015, at 10:09, serge guelton via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> On Thu, Sep 10, 2015 at 04:20:01PM +0800, Dipanjan Das via llvm-dev wrote:
>> Hello,
>>
>> I can see the occurrences of several LLVM intrinsic functions in the LLVM
>> IR generated by llvm-dis disassembler. Is there any means to rewrite these
>> functions
2015 Sep 14
2
Rewriting LLVM IR intrinsic functions
On 14 Sep 2015, at 06:58, Dipanjan Das via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
>
> Hi David,
>
> I think you people can help me better if I explain what I am trying to achieve.
> • I have compiled gmp with LLVM 2.9
> • Linked the library statically with a stub program (gmp_demo.bc)
> • Transformed the bitcode to LLVM IR: llvm-dis gmp_demo.bc -o
2013 Mar 13
3
[LLVMdev] guidance on backend writing; canonical example?
*> Chris Lattner**, Mon Nov 15 12:06:18 CST 2010, wrote:
**>
*> If anyone was really interested in this, I'd strongly suggest a complete
rewrite of the C backend: make use the existing target independent code
generator code (for legalization etc) and
> then just put out a weird ".s file" at the end. -Chris
I see that Chris made the above suggestion a while ago. Are
2014 Jul 03
9
[LLVMdev] MOS6502 target
Hey there!
I've started to embark on a path to try and create a backend for a 39 year old CPU with only an accumulator, two index registers, and a 256 byte stack. It does have a bank of 256 bytes before the stack that are pretty quick though.
Really, if I can get an assembler out of `llc`, that'll be success enough for me. Clang would be better, but I think that might be crazy talk.
2012 Jan 20
1
[LLVMdev] SelectionDAG debug output
Hello all,
I am currently working with LLVM and make use of the debug output from
llc. The SelectionDAG dumping features are especially interesting to me
since I am looking for operation patterns that allow me to decide which
custom instructions can be added to a processor in order to improve the
performance.
Providing a -view-dag-combine1-dags option (and its friends) to llc show
the
2015 Sep 30
3
New LLVM backend Target: compile procedure
Hi all,
I'm trying to get familiar with the LLVM build procedure when adding a
new Target.
In the main source tree, i copied the lib/Target/MSP430 as
lib/Target/newUC and renamed all the files. Further i edited the
different files like Triple.h, Triple.cpp, LLVMBuild.txt, CMakeLists.txt,
CallingConv.h to take in this new Target.
Then i deleted the files under the current
2012 Sep 13
2
[LLVMdev] A Question about LLVM-backend
On 13/09/12 10:57, Duncan Sands wrote:
> Hi 조영필,
>
> > I want to manipulate LLVM-backend to emit other compiler's IR, in this case,
>> VPO's IR.
>> So, what i want to know is.. Is there a project to be referred? (For example,
>> "Do LLVM-backend -> GIMPLE" project exist?)
>
> as far as I know there is no LLVM IR -> gimple pass. LLVM
2012 Nov 21
2
[LLVMdev] A Question about LLVM-backend
For those wondering about the C backend, a patch(set) to current trunk
is available but too large to send through the LLVM mailinglist. I can
send the patch(es) directly if people are interested.
Cheers,
Roel
On 17/11/12 03:48, David Claughton wrote:
> Hi Roel,
>
> On 13/09/12 11:02, Roel Jordans wrote:
>>
>> For those that are interested, I can provide a patch to the
2012 Nov 17
0
[LLVMdev] A Question about LLVM-backend
Hi Roel,
On 13/09/12 11:02, Roel Jordans wrote:
>
> For those that are interested, I can provide a patch to the current
> trunk which provides a working version of the C backend. So far this
> patch just takes the parts that were removed and updates them to the
> current infrastructure.
>
Yes please! I've been looking at the C backend recently with a view
towards seeing
2014 Dec 11
2
[LLVMdev] How to get the original function name in C++?
If you want to get the original name by a library function, as Jonathan
mentioned, you can call __cxa_demangle in cxxabi.h. However, this API is
only available in gcc. If you want something more portable, try glog or
libibert, notice libibert is GPL licensed.
On Thu, Dec 11, 2014 at 7:57 AM, Roel Jordans <r.jordans at tue.nl> wrote:
> When a C++ compiler translates source code it will
2017 Jun 11
2
Force casting a Value*
On 11 June 2017 at 07:53, David Blaikie <dblaikie at gmail.com> wrote:
> Sounds like you're looking for reinterpret_cast: http://en.
> cppreference.com/w/cpp/language/reinterpret_cast
>
I tried cast<ConstInt>(vo), but that failed at run-time.
>
> On Sun, Jun 11, 2017 at 3:06 AM Dipanjan Das via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
2017 Jun 12
4
How to know the sub-class of a Value class?
As a concrete question, I understand 'Value' class is the parent of many
concrete sub-classes. Let's say I retrieve a Value* value =
store_inst->getValueOperand(). Unless I know what the sub-type is, how can
I further use this object? I tried something like this:
=================================================
Value* value = store_inst->getValueOperand()
2017 Jun 15
2
Linker error while linking DataFlowSanitizer to LLVM IR
I am using pre-built LLVM/Clang 3.8.0 binaries on Ubuntu 16.04.2, 64 bit. I
tried to lift a minimal program to LLVM IR, then link the IR to
DataFlowSanitizer libraries to produce executable code. In the second step,
the process throws a bunch of linker errors.
=========================================
#include <sanitizer/dfsan_interface.h>
#include <assert.h>
int main(void) {
int
2017 May 04
6
Computing unique ID of IR instructions that can be mapped back
I am writing an analysis pass on LLVM which requires to:
[1] generate unique, positive ID corresponding to each instruction
[2] the ID must survive across runs
[3] given the ID, corresponding instruction has to be mapped back
For [1], the general suggestion is to use the Value* instr_ptr associated
to each instruction. The instr_ptr points to specific instruction in
memory, hence
2012 Nov 21
2
[LLVMdev] Python Backend
Hi,
I have a version of the old CBackend which is working with the current
trunk.
I am in the progress of rewriting it into a new version but that project
is not going as fast as I would hope as I have been distracted by other
tasks with higher priority lately.
Anyway, for those interested, I can provide patches, optionally
separated into several parts (core, testing, misc).
I am afraid that
2017 Apr 28
4
How to pass a StringRef to a function call inserted as instrumentation?
I am wriitng an LLVM pass to insert instrumentation at certain points of
the program. I want to pass the `StringRef` obtained from `getName()` as a
parameter to a function `func(char* s)`. I can allocate some space on stack
using `AllocaInst` to generate an `alloca` instruction. But, how can I copy
the `StringRef` to the stack space?
--
Thanks & Regards,
Dipanjan
-------------- next part
2017 Jun 12
2
Force casting a Value*
On 11 June 2017 at 14:04, don hinton <hintonda at gmail.com> wrote:
> Assuming you know it's a 64 bit value, and the function you are calling
> takes a uint64_t, try this:
>
The values from the test program are of type: i32/i32*/i32**. Can't I
interpret these as uint64_t some way?
>
> Value* args[] = {store_inst->getOperand(0)};
>
>
> On Sun, Jun 11,