Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] keeping instructions in order and hidden dependencies"
2013 Feb 17
3
[LLVMdev] keeping instructions in order and hidden dependencies
AFAIK, You have two choices: use a pseudo that is lowered into separate instructions later as part of asm emission, or use MI bundles. The former is generally what existing targets use for this sort of thing, but perhaps the second would work better for you.
Cameron
On Feb 16, 2013, at 8:37 PM, Reed Kotler <rkotler at mips.com> wrote:
> Some of my pseudos do conditional branch .+4 and
2013 Feb 17
0
[LLVMdev] keeping instructions in order and hidden dependencies
One of my reasons for lowering things early is that I need to get an
accurate count of the size of things.
Some of the pseudos even have instructions like compare immediate, which
in Mips 16 has two forms depending on the magnitude of the immediate field.
Though I suppose it's possible to leave things as a pseudo and calculate
their size, though I'm not sure where I could store the
2013 Feb 17
0
[LLVMdev] keeping instructions in order and hidden dependencies
Some of my pseudos do conditional branch .+4 and such.
I don't want the instruction scheduler to get creative on me.
On 02/16/2013 07:20 PM, reed kotler wrote:
> I have some pseudos that I am expanding in the Mips 16 port. Currently
> they are blasted in one chunk as a multi line instruction sequence but I
> am changing the code now to expand them
> after register allocation.
2013 Feb 17
4
[LLVMdev] keeping instructions in order and hidden dependencies
You are trying to do a few different things here, and a uniform solution may not work for all of them. For a fixed instruction sequence, e.g. a special kind of move-and-branch sequence used for tail calls, you probably want a pseudo. If you are trying to combine arbitrary instructions together, e.g. Thumb IT blocks, you probably want to use bundles, even if the sequences are a fixed length. I
2013 Feb 17
0
[LLVMdev] keeping instructions in order and hidden dependencies
Sounds like bundles will be the simplest to start with though I suppose
I could just lower the pseudos after scheduling is done; for now.
Bundles will prevent things from being able to be scheduled in more
creative ways but for that I need to think more about the problem.
So I can just create a bundle, insert instructions in it, and all will
work more or less?
I'm trying to take the next
2013 Feb 17
4
[LLVMdev] splitting a branch within a pseudo
After discussions last night, I'm leaning towards going legit with all
my pseudo expansions in Mips 16.
Some I think I can clearly do by just putting in the proper side effects
of implicit registers (T8 the condition code register as used by mips 16).
But I'm still left with some pseudos that have jmp .+4 type instructions
in them.
The original Mips port was to Mips I and Mips I,
2013 Feb 18
0
[LLVMdev] splitting a branch within a pseudo
Reed,
Have a look at custom inserters. In particular, how they're used for atomics in the ARM backend.
-Jim
On Feb 17, 2013, at 12:51 PM, Reed Kotler <rkotler at mips.com> wrote:
> After discussions last night, I'm leaning towards going legit with all my pseudo expansions in Mips 16.
>
> Some I think I can clearly do by just putting in the proper side effects of
2013 Feb 18
1
[LLVMdev] splitting a branch within a pseudo
Some stuff did not get pasted in properly.
static MachineBasicBlock* ExpandCondMov(MachineInstr *MI,
MachineBasicBlock *BB,
DebugLoc dl,
const MipsSubtarget *Subtarget,
const TargetInstrInfo *TII,
bool isFPCmp, unsigned Opc) {
//
2013 Feb 18
0
[LLVMdev] splitting a branch within a pseudo
This is the old MIPS I code that sort of does what I need to do. This
seems really involved to do such a simple thing.
Maybe there are now helper classes for this or some better example I can
look at. I suppose I can mimick this if people say this just the correct
way to do this in LLVM.
static MachineBasicBlock* ExpandCondMov(MachineInstr *MI,
MachineBasicBlock *BB,
2012 Sep 16
2
[LLVMdev] Pattern class
This Pattern class says it's possible but seems just to not work or maybe I'm using it incorrectly.
Probably I will go and fix it when I'm done with mips16.
________________________________________
From: Hal Finkel [hfinkel at anl.gov]
Sent: Sunday, September 16, 2012 10:59 AM
To: Anton Korobeynikov
Cc: Kotler, Reed; LLVM-Dev [llvmdev at cs.uiuc.edu]
Subject: Re: [LLVMdev] Pattern
2012 Sep 16
1
[LLVMdev] Pattern class
Here is a simple place I wanted to use it.
...
On multiply, the result implicit is placed in a 64 bit hi/lo register.
//
// Format: MFLO rx MIPS16e
// Purpose: Move From LO Register
// To copy the special purpose LO register to a GPR.
//
def Mflo16: FRR16_M_ins<0b10010, "mflo", IIAlu> {
let Uses = [LO];
let neverHasSideEffects = 1;
}
//
// Pseudo Instruction for mult
//
2012 Sep 16
2
[LLVMdev] Pattern class
I'm interested in class Pattern.
Classes Pat and ComplexPattern are used everywhere.
________________________________________
From: Triple Yang [triple.yang at gmail.com]
Sent: Sunday, September 16, 2012 9:55 AM
To: Kotler, Reed
Cc: LLVM-Dev [llvmdev at cs.uiuc.edu]
Subject: Re: [LLVMdev] Pattern class
You might want to refer to lib/Target/Sparc/SparcInstrInfo.td for
examples of both Pat
2013 Feb 06
2
[LLVMdev] register scavenging
So what I realized is that you can't use the simple scavenger trick
where you create the virtual register and use the more advanced features.
This is because you can't call forward() in any form if there are
virtual registers being used by any of the instructions in the basic
block. This will cause forward to fail.
Maybe this is a bug in forward()
On 02/05/2013 02:51 PM, Reed Kotler
2012 Sep 26
5
[LLVMdev] mips16 puzzle
We already divided out our classes as you did for ARM.
The problem here is that we have a store/load byte/halfword to/from a
Frame object.
We know at that time that it's not going to be possible to store it
using SP because there is only such instructions for store/load of a word.
What we would want to do is to move SP into a Mips 16 register and then
do a indexed load/store off of that
2013 Mar 27
2
[LLVMdev] LLVM pass question
What I am thinking of now is to just register the MIPS116 and MIPS32
DAGToDAGISel passes and then within run on machine function, I can just
return if the current mode indicates that mips16 is needed for example,
so the run on machine function for Mips32 would return immediately.
On 03/27/2013 10:05 AM, Reed Kotler wrote:
> I guess another way to do this is to just register both passes for
2012 Sep 26
0
[LLVMdev] mips16 puzzle
Ok. That's a somewhat different problem, then. Devil will be in the details of what you want to do. A few options. First is to always have a standard frame pointer register available and reference off of that. Caveat: dynamic stack realignment and vararrays muck with that more than a bit. Second is what gcc is doing and reserve a register just for this in addition to the frame register.
2012 Sep 21
2
[LLVMdev] mips16 puzzle
Actually, SP is already not in the mips 16 register class but there is
some C++ code that is common to mips32, mips64 and mips16 that is
wanting to use SP. It's kind of awkward but does work except in this
case of load/store haflword and byte to stack objects.
Maybe I'm shooting myself in the foot there. I don't know that code too
well so maybe I need to look into it.
There are
2013 Mar 22
4
[LLVMdev] proposed change to class BasicTTI
Just realized that BasicTransformInfoClass is an immutable pass.
Not sure how to reconcile this with fact that there will be different
answers needed depending on the subtarget.
Seems like BasicTansformInfoClass should become a function pass that
does not modify anything.
On 03/22/2013 09:43 AM, Reed Kotler wrote:
> Another way to do this would to be to have a reset virtual function
>
2012 Sep 16
0
[LLVMdev] Pattern class
What have you tried?
On Sun, Sep 16, 2012 at 3:34 PM, Kotler, Reed <rkotler at mips.com> wrote:
> This Pattern class says it's possible but seems just to not work or maybe I'm using it incorrectly.
>
> Probably I will go and fix it when I'm done with mips16.
>
>
> ________________________________________
> From: Hal Finkel [hfinkel at anl.gov]
> Sent:
2013 Mar 27
1
[LLVMdev] LLVM pass question
So the switching between mips16 and mips32 on a per function basis seems
to basically be working except that asm printer has some kind of
issue here.
I'm debugging that now.
I get this:
lc: /home/rkotler/workspace/llvmpb6/include/llvm/MC/MCStreamer.h:224:
void llvm::MCStreamer::SwitchSection(const llvm::MCSection*): Assertion
`Section && "Cannot switch to a null