Displaying 20 results from an estimated 100 matches similar to: "[LLVMdev] Encoding instructions with inconsistent formats"
2015 Jan 31
0
[LLVMdev] Encoding instructions with inconsistent formats
I can't get it to work with pattern matching. My operand is defined like so:
def LDSTPtrReg : Operand<i16>
{
let MIOperandInfo = (ops PTRREGS);
let EncoderMethod = "encodeLDSTPtrReg";
}
I am able to use it in the place of PTRREGS in the definition of the LD
instruction, but if I use it in an instruction matching pattern,
compilation fails with the error "Unknown
2011 Mar 25
2
[LLVMdev] Possible missed optimization?
Hello, I've noticed the following issue while testing some codegen tests, i
would like to know if it's a missed optimization or i missed something out
here. This is for an out of tree backend im writing. I managed to reduce it
to the following C function:
void foo(int *a) // int here is 16bits
{
*a &= 0xFF;
}
This is the code before regalloc:
Live Ins: %R25R24
2011 Mar 26
0
[LLVMdev] Possible missed optimization?
On Mar 24, 2011, at 5:42 PM, Borja Ferrer wrote:
> The last copy instruction should be removed as pointed out above, but since R27R26 is killed in the load instruction it has to be emitted. About the insane amount of regclasses there, the load/store and the andi instructions take subsets of regs from the main register class, they cant work with all registers, that's why STW and LDW needs
2011 Mar 26
2
[LLVMdev] Possible missed optimization?
Hello Jakob, thanks for the reply. The three regclasses involved here are
all subsets from each other and aren't disjoint. These are the basic
descriptions of the regclasses involved to show what i mean:
DREGS: R31R30, R29R28 down to R1R0 (16 regs)
DLDREGS: R31R30, R29R28 down to R17R16 (8 regs)
PTRREGS: R31R30, R29R28, R27R26 (3 regs)
All classes intersect each other
2019 Mar 11
3
IsDead, IsKill
Thanks.
I saw the header comments but it wasn’t clear to me what the difference between those concepts is?
My slightly vague understanding is IsDef means that the register specified by this operand is set by the machine instruction. So I understand that to mean the MO will override that register?
Also things like early clobber, perhaps there is another document that clarifies some of these
2011 Mar 26
0
[LLVMdev] Possible missed optimization?
On Mar 26, 2011, at 1:04 PM, Borja Ferrer wrote:
> Hello Jakob, thanks for the reply. The three regclasses involved here are all subsets from each other and aren't disjoint. These are the basic descriptions of the regclasses involved to show what i mean:
>
> DREGS: R31R30, R29R28 down to R1R0 (16 regs)
> DLDREGS: R31R30, R29R28 down to R17R16 (8 regs)
> PTRREGS:
2013 Apr 07
2
[LLVMdev] Pat operands matching example in ppc
Hi,
How do "Pat" operands get matched? I am trying to follow the example given
in http://llvm.org/docs/CodeGenerator.html#selectiondag-process
In the latest trunk of ppcintrinfo.td following pattern is defined:
def : Pat<(pre_store i32:$rS, iPTR:$ptrreg, iaddroff:$ptroff),
(STWU $rS, iaddroff:$ptroff, $ptrreg)>;
I understand that input operand list i.e. ins of
2013 Apr 07
0
[LLVMdev] Pat operands matching example in ppc
Hi Anitha,
memri is just describing that the address contains two components, an
immediate and a register, and how to handle them in the instruction
printer. The STWU expects a memri operand, and that is what is passed
from the Pat.
Hope that helps,
Sam
On 07/04/2013 10:19, Anitha B Gollamudi wrote:
> Hi,
>
>
> How do "Pat" operands get matched? I am trying to follow
2013 Apr 07
1
[LLVMdev] Pat operands matching example in ppc
On 7 April 2013 14:54, Sam Parker <S.Parker3 at lboro.ac.uk> wrote:
> Hi Anitha,
>
> memri is just describing that the address contains two components, an
> immediate and a register, and how to handle them in the instruction printer.
> The STWU expects a memri operand, and that is what is passed from the Pat.
>
My confusion is how operands of STWU from "Pat
2016 Sep 26
2
Incompatible type assertion from llvm-tblgen
But don't the defs for ADDR_RR and ADDR_RI also contain dags?
def ADDR_RR : Addr< 2, "SelectAddrRegReg",
(ops GPRC:$base, GPRC:$offsetreg) >;
def ADDR_RI : Addr< 2, "SelectAddrRegImm",
(ops GPRC:$base, i64imm:$offsetimm) >;
Do I need to create some other intermediate node type for a shifted address?
Phil
On
2016 Sep 28
2
Incompatible type assertion from llvm-tblgen
On Mon, Sep 26, 2016 at 2:24 PM, Krzysztof Parzyszek <
kparzysz at codeaurora.org> wrote:
> On 9/26/2016 3:58 PM, Phil Tomson wrote:
>
>> But don't the defs for ADDR_RR and ADDR_RI also contain dags?
>>
>> def ADDR_RR : Addr< 2, "SelectAddrRegReg",
>> (ops GPRC:$base, GPRC:$offsetreg) >;
>> def ADDR_RI :
2012 Sep 26
2
[LLVMdev] What does MCOperand model?
A question for LLVM code generator developers:
After having read through "The LLVM Target-Independent Code Generator"
[1] I'm unclear about what precisely the objects MCInst and MCOperand
represent. They sit in the space between assembly syntax and binary
encodings, but which are they modeling? For example, a Thumb 2 branch
instruction 'b' takes an immediate. That syntax
2010 Nov 17
1
[LLVMdev] [llvm-commits] [patch] ARM/MC/ELF add new stub for movt/movw in ARMFixupKinds
+llvmdev
-llvmcommits
On Fri, Nov 12, 2010 at 8:03 AM, Jim Grosbach <grosbach at apple.com> wrote:
> Sorta. getBinaryCodeForInst() is auto-generated by tablegen, so shouldn't be modified directly. The target can register hooks for instruction operands for any special encoding needs, including registering fixups, using the EncoderMethod string. For an example, have a look at the
2019 Mar 25
2
Printing PC-relative offsets - how to get the instruction length?
Hi
In my MC6809 backend, in llvm/lib/Target/MC6809/InstPrinter/MC6809InstPrinter.cpp, I have the routine
void MC6809InstPrinter::printPCRelImmOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O) {
const MCOperand &Op = MI->getOperand(OpNo);
ZZ
if (Op.isImm()) {
int64_t Imm = Op.getImm() + 2; <<<========================
O << "$";
if (Imm
2014 Jun 26
2
[LLVMdev] cross-section differences in MC generation
I'm working on Position-independent code for 32-bit PowerPC, but
running into a problem. At the beginning of each function, there's a
pre-word that's the difference between the PICBase (.L1$pb) and the
GOT. This works fine when generating assembly output, but it fails
when generating ELF output, with the error "Cannot represent a
difference across sections" (line 847,
2017 Jan 19
3
Got stuck with PC-rel branching
Hi all,
I'm trying to make an LLVM backend for the Adapteva's Epiphany E16 CPU
(used in Parallella board), using CPU0 and some other backends as examples,
and I've got stuck with branching.
When I'm printing out asm, all branch labels are printed as they should be.
But when I'm trying to generate obj file, I'm getting zeros instead of
PC-related offset in all branch
2012 Sep 26
0
[LLVMdev] What does MCOperand model?
Owen is correct in his descriptions. The MCOperand values are intended to model the instruction encoding. Where that doesn't match the assembly syntax, the asm parser (and codegen) and the instruction printer are responsible for encoding/decoding the values.
For targets that predate the MC layer, this isn't always the case, leading to things being a bit confusing when just reading the
2015 Dec 14
2
Tablegen definition question
Hi,
That's what the DecoderMethod is for. Similarly ParserMatchClass for the
asm parser and PrintMethod for the asm printer:
def CondCodeOperand : AsmOperandClass { let Name = "CondCode"; }
def pred : PredicateOperand<OtherVT, (ops i32imm, i32imm),
(ops (i32 14), (i32 zero_reg))> {
let PrintMethod = "printPredicateOperand";
2018 Sep 28
3
error: expected memory with 32-bit signed offset
Hi,
I want to encode Loongson ISA initially
https://gist.github.com/xiangzhai/8ae6966e2f02a94e180dd16ff1cd60ac
gslbx $2,0($3,$4)
It is equivalent to:
dadd $1, $3, $4
lb $2,0($1)
I just use mem_simmptr as the default value of DAGOperand MO ,
because MipsMemAsmOperand use parseMemOperand to parse general
MemOffset and only *one* AnyRegister , for example:
0($1)
But
2016 Mar 18
2
Immediate operand for load instruction, in back end
Hello,
I'm trying to define in my new back end, in MyBackendInstrInfo.td file, a vector load
instruction that takes an immediate address operand. (I got inspired from Mips' MSA SIMD
extensions.)
Could you please tell me what's the right way to do it?
Here, the load class has $addrsrc which is a relative address with base a certain
register and offset:
class