Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] ScalarEvolution: Suboptimal handling of globals"
2008 Jul 08
3
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Hi Evan,
Evan Cheng wrote:
> The patch looks great. But I do have one comment:
>
> +let usesCustomDAGSchedInserter = 1 in {
> + let Uses = [CR0] in {
> + let Uses = [R0] in
> + def ATOMIC_LOAD_ADD_I32 : Pseudo<
>
> The "let Uses = [R0]" is not needed. The pseudo instruction will be
> expanded like this later:
>
> + BuildMI(BB,
2008 Jul 08
0
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Look for createVirtualRegister. These are examples in
PPCISelLowering.cpp.
Evan
On Jul 8, 2008, at 8:24 AM, Gary Benson wrote:
> Hi Evan,
>
> Evan Cheng wrote:
>> The patch looks great. But I do have one comment:
>>
>> +let usesCustomDAGSchedInserter = 1 in {
>> + let Uses = [CR0] in {
>> + let Uses = [R0] in
>> + def ATOMIC_LOAD_ADD_I32 :
2008 Jul 04
0
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Hi Gary,
The patch looks great. But I do have one comment:
+let usesCustomDAGSchedInserter = 1 in {
+ let Uses = [CR0] in {
+ let Uses = [R0] in
+ def ATOMIC_LOAD_ADD_I32 : Pseudo<
The "let Uses = [R0]" is not needed. The pseudo instruction will be
expanded like this later:
+ BuildMI(BB, TII->get(is64bit ? PPC::LDARX : PPC::LWARX), dest)
+
2008 Jul 02
2
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Evan Cheng wrote:
> You need to insert new basic blocks and update CFG to accomplish this.
> There is a hackish way to do this right now. Add a pseudo instruction
> to represent this operation and mark it usesCustomDAGSchedInserter.
> This means the intrinsic is mapped to a single (pseudo) node. But it
> is then expanded into instructions that can span multiple basic
>
2019 Jul 03
2
optimisation issue in an llvm IR pass
Hello,
I have an optimisation issue in an llvm IR pass - the issue being that
unnecessary instructions are generated in the final assembly (with -O3).
I want to create the following assembly snippet:
mov dl,BYTE PTR [rsi+rdi*1]
add dl,0x1
adc dl,0x0
mov BYTE PTR [rsi+rdi*1],dl
however what is created is (variant #1):
mov dl,BYTE PTR [rsi+rdx*1]
add dl,0x1
cmp
2019 Jul 03
3
optimisation issue in an llvm IR pass
Hi Craig,
On 03.07.19 17:33, Craig Topper wrote:
> Don't the CreateICmp calls return a Value* with an i1 type? But then
> they are added to an i8 type? Not sure that works.
I had that initially:
auto cf = IRB.CreateICmpULT(Incr, ConstantInt::get(Int8Ty, 1));
auto carry = IRB.CreateZExt(cf, Int8Ty);
Incr = IRB.CreateAdd(Incr, carry);
it makes no difference to the generated assembly
2008 Jul 10
2
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Cool, that worked. New patch attached...
Cheers,
Gary
Evan Cheng wrote:
> Just cast both values to const TargetRegisterClass*.
>
> Evan
>
> On Jul 10, 2008, at 7:36 AM, Gary Benson wrote:
> > Evan Cheng wrote:
> > > How about?
> > >
> > > const TargetRegisterClass *RC = is64Bit ? &PPC:GPRCRegClass :
> > > &PPC:G8RCRegClass;
>
2008 Jul 08
2
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Would it be acceptable to change MachineInstr::getRegInfo from private
to public so I can use it from PPCTargetLowering::EmitInstrWithCustomInserter?
Cheers,
Gary
Evan Cheng wrote:
> Look for createVirtualRegister. These are examples in
> PPCISelLowering.cpp.
>
> Evan
> On Jul 8, 2008, at 8:24 AM, Gary Benson wrote:
>
> > Hi Evan,
> >
> > Evan Cheng wrote:
2010 Jun 19
1
[LLVMdev] Is alloca instruction allowed within the cycle?
I am running this code in JIT on x86 (32 bit).
It crashes when 'alloca %object' instruction is within the body of the
cycle, and it finishes successfully when this instruction is in the
beginning of main (outside the cycle). Crash occurs in the middle of the
cycle after few hundreds of thousands iterations.
What is wrong? Does alloca inside the cycle forces it to allocate it on
stack
2009 Jul 17
2
Remembering a value in multiple calls of a function
Hello,
I tried this pseudo-generator style experiment (see below). The "<<-"
operator assigns to in the calling environment which would be the
environment of "getN".
Yet when the function incr is returned, isn't this environment lost?
Also the print displays GlobalEnv, yet the globalenv does not have any
mention of startgiven.
This code was inspired from and old
2020 Oct 16
1
[PATCH v4 09/10] dma-buf-map: Add memcpy and pointer-increment interfaces
Hi Thomas.
On Thu, Oct 15, 2020 at 02:38:05PM +0200, Thomas Zimmermann wrote:
> To do framebuffer updates, one needs memcpy from system memory and a
> pointer-increment function. Add both interfaces with documentation.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
Looks good.
Reviewed-by: Sam Ravnborg <sam at ravnborg.org>
> ---
>
2004 Jun 22
1
Multiple --compare-dest args again
Hi all.
A while ago (April 15th or so) I posted a patch that allows rsync to
take multiple --compare-dest or --link-dest arguments, allowing
fetching of files not present in multiple trees. I never got any
feedback on it, though, so I'm picking it up again. :) Is there any
interest in such a patch at all?
Below is the usage example i outlined back then;
--start--
[...] Its primary usage is
2011 Apr 28
1
using lme4 with three nested random effects
Hi all,
I'm trying to fit models for data with three levels of nested random
effects: site/transect/plot. For example,
modelincrBS<-glmer(l.ru.ba.incr~shigo.av+pre.f.crwn.length+bark.thick.bh+Date+slope.pos.num+dens.T+dbh+leaf.area+can.pos.num+(1|site/transect/plot),
data=rws30.UL, family=gaussian, na.action=na.omit)
but I get the following error:
Error: length(f1) == length(f2) is not
2016 Oct 19
4
Bacula Restore
Hi list,
another question about bacula, but this time about restoring backups.
I've a server that I must backup every day. My plan is:
from mon to sat incrimental backup
and on sunday full backup.
When I will perform a restore I must restore from last valid full
backup and then all valid incremental backup from last backup to
specific date.
This server has aweb managed application where
2014 Sep 02
3
[LLVMdev] LICM promoting memory to scalar
All,
If we can speculatively execute a load instruction, why isn’t it safe to hoist it out by promoting it to a scalar in LICM pass?
There is a comment in LICM pass that if a load/store is conditional then it is not safe because it would break the LLVM concurrency model (See commit 73bfa4a).
It has an IR test for checking this in test/Transforms/LICM/scalar-promote-memmodel.ll
However, I have
2008 Jul 08
0
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
PPCTargetLowering::EmitInstrWithCustomInserter has a reference
to the current MachineFunction for other purposes. Can you use
MachineFunction::getRegInfo instead?
Dan
On Jul 8, 2008, at 1:56 PM, Gary Benson wrote:
> Would it be acceptable to change MachineInstr::getRegInfo from private
> to public so I can use it from
> PPCTargetLowering::EmitInstrWithCustomInserter?
>
>
2008 Jul 11
0
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Hi Gary,
This does not patch cleanly for me (PPCISelLowering.cpp). Can you
prepare a updated patch?
Thanks,
Evan
On Jul 10, 2008, at 11:45 AM, Gary Benson wrote:
> Cool, that worked. New patch attached...
>
> Cheers,
> Gary
>
> Evan Cheng wrote:
>> Just cast both values to const TargetRegisterClass*.
>>
>> Evan
>>
>> On Jul 10, 2008, at 7:36
2008 Jul 10
0
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Just cast both values to const TargetRegisterClass*.
Evan
On Jul 10, 2008, at 7:36 AM, Gary Benson wrote:
> Evan Cheng wrote:
>> How about?
>>
>> const TargetRegisterClass *RC = is64Bit ? &PPC:GPRCRegClass :
>> &PPC:G8RCRegClass;
>> unsigned TmpReg = RegInfo.createVirtualRegister(RC);
>
> I tried something like that yesterday:
>
> const
2015 Dec 03
3
GlobalsAA from GVN
Hi James,
Thanks for the help. From the log, I could infer that SLP vectorizer is not
preserving alias analysis, preventing GVN from getting the info. Although
the first function to get compiled has GlobalsAA available during GVN, rest
of them do not as SLP vectorizer run on that function invalidates GlobalsAA
which is a module pass. Is there a way to force re-computation of a
particular
2008 Jul 10
2
[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Evan Cheng wrote:
> How about?
>
> const TargetRegisterClass *RC = is64Bit ? &PPC:GPRCRegClass :
> &PPC:G8RCRegClass;
> unsigned TmpReg = RegInfo.createVirtualRegister(RC);
I tried something like that yesterday:
const TargetRegisterClass *RC =
is64bit ? &PPC::GPRCRegClass : &PPC::G8RCRegClass;
but I kept getting this error no matter how I arranged it: