Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Block management"
2010 Jun 13
0
[LLVMdev] Block management
On Jun 13, 2010, at 2:12 AM, Stéphane Letz wrote:
> Hi,
>
> In my code generator, I need to prepare a block and add instructions to it, then insert this block in a function defined later (that is I cannot create the function at the beginning stage become some info are not available yet). I tried to create a block without any "parent" (BasicBlock::Create(getGlobalContext(),
2010 Jun 14
1
[LLVMdev] Block management
Hi Chris,
>> In my code generator, I need to prepare a block and add instructions to it, then insert this block in a function defined later (that is I cannot create the function at the beginning stage become some info are not available yet). I tried to create a block without any "parent" (BasicBlock::Create(getGlobalContext(), "init"), fill it, but how to link it with
2018 Aug 27
3
Replacing a function from one module into another one
Hello LLVM Developers,
I'm trying to replace a function defined in one module into another module
(different files). The first issue I ran into was that llvm::Function does
not have a method "moveBefore" or "moveAfter" as the llvm::BasicBlock or
llvm::Instruction do, so I figured I would just move the BasicBlocks of the
replacing function into the function that was being
2018 Sep 02
2
Replacing a function from one module into another one
Hello and thanks for the answer,
I'm still facing issues, I'll do my best to explain my situation, as I
explained, I have two modules, each one with its own main and functions, I
would like to replace in the *oldModule* a function call that is calling
*foo2* (defined in *oldModule*) to instead call *foo3*, which is defined in
the *refModule. *So in summary, I have:
1. The original
2013 May 13
1
[LLVMdev] Problem with MachineFunctionPass and JMP
Hi !
I'm trying to modify the code in a machine function pass…
I added a new basicblock and I want to add a jump to an another BB from my new BB.
Here is my code :
bool Obfuscation::runOnMachineFunction(MachineFunction &MF) {
MachineBasicBlock *newEntry = MF.CreateMachineBasicBlock();
MF.insert(MF.begin(), newEntry);
std::vector<MachineBasicBlock*> origBB;
2018 Sep 02
2
Replacing a function from one module into another one
Hi Ahmad,
What does that tool does besides what LLVM linker already does? I don't
think my problem is in linking both modules, I think LLVM linker does the
job for me, the issue is when changing the called function to call another
function (in the example previously provided, to change it from foo2 to
foo3, and adjusting the function parameter's references).
Regards,
Daniel Moya
El
2006 May 12
7
RJS and page.select collection size
I need to implement a conditional in my RJS template which looks
something like:
if (page.select(''row1'').first != null)
page << "new TableRow.MoveAfter(''row1'', ''newrow'');"
else
page << "new TableRow.MoveAfter(''row2'', ''newrow'');"
end
Now, dumb question.. My
2016 Sep 19
3
llvm interpreter does not find function defined by addGlobalMapping
Hi,
I want to use a function defined in c(++)-code from code generated by llvm. For this I use ExecutionEngine.addGlobalMapping(). I started with the JIT execution engine and everything worked, then I switched to the interpreter engine and it stopped working, but only if compiled on a Linux system. More precisely it works if I use
llvm 3.8.1 + gcc (Linux) + JIT
llvm 3.8.0 + mingw-gcc
2018 Sep 03
2
Replacing a function from one module into another one
Thank you Ahmad,
I figured out that, although the type of both p(oInst) and p(nInst) were
the same, I had to:
for (unsigned int i = 0; i < callOInst->getNumArgOperands(); i++) {
callOInst->getArgOperand(i)->mutateType(callNInst->getArgOperand(i)->getType());
}
that solves the issue at the calling instruction in the main function, but
now I see that *linkModules* does not work
2010 May 29
2
[LLVMdev] Vectorized LLVM IR
>
> <32 x float> takes up 8 SSE registers; you're likely running into
> issues with register pressure. Does it work better if you use
> something smaller like <4 x float>?
>
> Besides that, I don't see any obvious issues.
>
> -Eli
You are right yes. The code works faster with <4 x float> types, with still works a bit slower than the scalar
2013 Jul 16
4
[LLVMdev] General strategy to optimize LLVM IR
Hi,
Our DSL emit sub-optimal LLVM IR that we optimize later on (LLVM IR ==> LLVM IR) before dynamically compiling it with the JIT. We would like to simply follow what clang/clang++ does when compiling with -O1/-O2/-O3 options. Our strategy up to now what to look at the opt.cpp code and take part of it in order to implement our optimization code.
It appears to be rather difficult to follow
2010 Jun 02
3
[LLVMdev] Generating Floating point constants
Le 2 juin 2010 à 12:21, Eli Friedman a écrit :
> On Wed, Jun 2, 2010 at 2:59 AM, Stéphane Letz <letz at free.fr> wrote:
>> Hi,
>>
>> We need to generate "Floating point constants" in our code. In http://llvm.org/docs/LangRef.html it is explained that FP has to follow special encoding rules to be handled by LLVM later one (hexadecimal coding...)
>>
2010 May 28
3
[LLVMdev] Vectorized LLVM IR
Hi,
We are experimenting directly generating vectorized LLVM IR (using <8 x float> kind of types), then compiling the code to SSE on a 64 bits machine. Right now the equivalent code in scalar mode sill outperform the SSE one.
What is the quality of the SSE support in X86 LLVL backend? Are they any specific things to be aware of to improve the speed?
Thanks
Stéphane Letz
2013 Jul 05
2
[LLVMdev] Enabling vectorization with LLVM 3.3 for a DSL emitting LLVM IR
Le 5 juil. 2013 à 04:11, Tobias Grosser <tobias at grosser.es> a écrit :
> On 07/04/2013 01:39 PM, Stéphane Letz wrote:
>> Hi,
>>
>> Our DSL can generate C or directly generate LLVM IR. With LLVM 3.3, we can vectorize the C produced code using clang with -O3, or clang with -O1 then opt -O3 -vectorize-loops. But the same program generating LLVM IR version cannot be
2014 Dec 08
2
[LLVMdev] Virtual register problem in X86 backend
Hi,
I'm having trouble using virtual register in the X86 backend.
I implemented a new intrinsic and I use a custom inserter. The goal of
the intrinsic is to set the content of the stack to zero at the end of
each function.
Here is my code:
MachineBasicBlock *
X86TargetLowering::EmitBURNSTACKWithCustomInserter(
MachineInstr *MI,
MachineBasicBlock
2010 May 29
0
[LLVMdev] Vectorized LLVM IR
On Sat, May 29, 2010 at 1:23 AM, Stéphane Letz <letz at grame.fr> wrote:
>>
>> <32 x float> takes up 8 SSE registers; you're likely running into
>> issues with register pressure. Does it work better if you use
>> something smaller like <4 x float>?
>>
>> Besides that, I don't see any obvious issues.
>>
>> -Eli
>
>
2013 Jul 16
0
[LLVMdev] General strategy to optimize LLVM IR
On Tue, Jul 16, 2013 at 8:16 AM, Stéphane Letz <letz at grame.fr> wrote:
> Hi,
>
> Our DSL emit sub-optimal LLVM IR that we optimize later on (LLVM IR ==> LLVM IR) before dynamically compiling it with the JIT. We would like to simply follow what clang/clang++ does when compiling with -O1/-O2/-O3 options. Our strategy up to now what to look at the opt.cpp code and take part of it
2013 Jul 05
2
[LLVMdev] Enabling vectorization with LLVM 3.3 for a DSL emitting LLVM IR
Le 5 juil. 2013 à 17:23, Arnold Schwaighofer <aschwaighofer at apple.com> a écrit :
>
> On Jul 5, 2013, at 9:50 AM, Stéphane Letz <letz at grame.fr> wrote:
>
>>
>> Le 5 juil. 2013 à 04:11, Tobias Grosser <tobias at grosser.es> a écrit :
>>
>>> On 07/04/2013 01:39 PM, Stéphane Letz wrote:
>>>> Hi,
>>>>
2010 Jun 02
2
[LLVMdev] Generating Floating point constants
Hi,
We need to generate "Floating point constants" in our code. In http://llvm.org/docs/LangRef.html it is explained that FP has to follow special encoding rules to be handled by LLVM later one (hexadecimal coding...)
Is there any code available in LLVM to handle this kind of "standard float to LLVM float" conversion?
Thanks.
Stéphane Letz
2010 Jun 03
3
[LLVMdev] Generating Floating point constants
Le 3 juin 2010 à 16:00, Martin Guy a écrit :
> [off list]
>
>> 0.8f get converted in 0x3FE99999A0000000 by LLVM
>
> single precision
>
>> http://babbage.cs.qc.edu/IEEE-754/Decimal.html gives:
>>
>> 0x3FE999999999999A instead and this value cannot be read back by "llc"...
>
> double precision
>
> M
Well
For float 0.8 :