Displaying 20 results from an estimated 1000 matches similar to: "RTLIB and Custom Library calls"
2020 Mar 02
3
TableGen Instruction class Uses and Defs
Hello LLVM-Dev,
I understand that Uses and Defs are for implicit registers. Uses is defined as for using non-operand registers and Defs is defined as for modifying non-operand registers.
For example, for compare and compare with carry instructions, is my understanding correct that the instructions should be defined as described below?
Considering that the carry flag is part of the status
2020 Feb 18
2
Function Return Legalization
Hi llvm-dev,
>> The CopyFromReg->CopyToReg->CopyFromReg sequence doesn’t have the chains set correctly: the second CopyFromReg’s input chain isn’t connected to the CopyToReg’s output chain. (This appears to be the same problem in both graphs.)
The DAG mentioned was generated by the SelectionDAGBuilder and as much as possible, we only modify the files within our target so I tried
2020 Feb 12
3
Function Return Legalization
Hi All,
In the target we are implementing, function return for i64 and f64 types has a different processing.
For types i8 to i32, and f32, the return values are stored in their designated return registers (like how other targets does it).
For i64 and f64 types, in the function call, after pushing the function parameters into the stack, the address of the allocated return memory space is
2020 Feb 14
2
Function Return Legalization
Hi,
After removing support for the i64 type in the *CallingConv.td, sret-demotion is performed and we now have a store<(store 8, align 1)> DAG node being generated. Please refer to the attached dag_funcret.pdf DAG visualization.
My understanding is that, the second operand(CopyFromReg->Register %1, Register %0 back-up) in the store node is the memory location allocated for the i64 type
2020 Feb 07
2
LLVM Backend Legalize Phase
Hello Sebastien,
Thank you very much for the clarification. This would greatly help us in our development.
I have noticed that setOperationAction(Expand) does not always work, for these cases, does it automatically mean that setOperationAction(Custom) should be used or not necessarily?
Currently, we perform a pseudo instruction instead of setting it to custom.
For example in the case of a
2020 Mar 27
2
Instruction selection phase
Hello LLVM-Dev,
Attached are:
· The DAG after being built
· The DAG before the legalization phase
The DAG illustrated performs a signed division for type i32. As can be seen, the SDIV node was converted to a series of other nodes (which includes a MULHS node). In the target lowering class of our target, the SDIV has an operation action of custom. Does anybody know where in
2019 Jun 10
2
Bug: Library functions for ISD::SRA, ISD::SHL, and ISD::SRL
LLVM appears to support Library functions for ISD::SRA ,ISD::SHL, and ISD::SRL, as they are properly defined in RuntimeLibCalls.def.
The library functions defined in RuntimeLibCalls.def (among others) are these:
HANDLE_LIBCALL(SRA_I16, "__ashrhi3")
HANDLE_LIBCALL(SRA_I32, "__ashrsi3")
HANDLE_LIBCALL(SRA_I64, "__ashrdi3")
However, setting
2019 Jun 10
2
Bug: Library functions for ISD::SRA, ISD::SHL, and ISD::SRL
Hi Eli,
Thanks for pointing to the CTLZ_ZERO_UNDEF “LibCall” implementation. I have not it in the version that I am currently using, so it’s nice to know that it’s implemented now.
Incidentally, the CTLZ… implementation is IDENTICAL to what I am proposing for the Shifts. This is not just adding support for “out-of-tree-targets”, but giving consistency to the fact that we have perfectly defined
2019 Jun 11
2
Bug: Library functions for ISD::SRA, ISD::SHL, and ISD::SRL
Hi Eli,
First of all, please I would appreciate that you try to not confuse my limited use of English with stupidity or lack or criteria in other subjects. I’m not English native, so please keep that in mind. You have been significantly helpful in the recent past so please keep on.
Interestingly, you made a mention of a related but not identical issue. It is true that most (or all) processors
2018 Jul 02
2
[RFC][VECLIB] how should we legalize VECLIB calls?
It may not be a full solution for the problems you're trying to solve, but
I don't know why adding to include/llvm/CodeGen/RuntimeLibcalls.def is a
problem in itself. Certainly, it's a mess that could be organized,
especially so we're not repeating everything for each data type as we do
right now.
So yes, I think that would allow us to remove the VecLib mappings because
we are
2018 Jul 02
2
[RFC][VECLIB] how should we legalize VECLIB calls?
Adding to Ashutosh's comments, We are also interested in making LLVM
generate vector math library calls that are available with glibc (version >
2.22).
reference: https://sourceware.org/glibc/wiki/libmvec
Using the example case given in the reference, we found there are 2 vector
versions for "sin" (4 X double) with same VF namely _ZGVcN4v_sin (avx)
version and _ZGVdN4v_sin
2018 Jul 02
8
[RFC][VECLIB] how should we legalize VECLIB calls?
On 07/02/2018 04:33 PM, Saito, Hideki wrote:
>
>
>
> >It may not be a full solution for the problems you're trying to solve
>
>
>
> If we are inventing a new solution, I’d like it also to solve OpenMP
> declare simd legalization issue. If a small extension of existing scheme
>
> works for mathlib only, I’m happy to take that and discuss OpenMP
>
2018 Jun 29
2
[RFC][VECLIB] how should we legalize VECLIB calls?
Ashutosh,
Thanks for the repy.
Related earlier topic on this appears in the review of the SVML patch (@mmasten). Adding few names from there.
https://reviews.llvm.org/D19544
There, I see Hal's review comment "let's start only with the directly-legal calls". Apparently, what we have right now
in the trunk is "not legal enough". I'll work on the patch to stop
2020 Oct 15
3
Out-of-line atomics implementation ways
Greetings everyone,
I am working on Aarch64 LSE out-of-line atomics support in LLVM, porting this GCC series: https://gcc.gnu.org/legacy-ml/gcc-patches/2019-09/msg01034.html
After local design experiments I've got some questions about upstream-suitable ways of implementation. More specifically:
1. Pass to expand atomics to library helper functions calls.
These helpers test for the presence
2012 Jan 07
2
[LLVMdev] libcalls for shifts
Hello,
my target has libcall support for long long shifts. I already have the
following lines in my Lowering constructor:
setLibcallName(RTLIB::SHL_I64, "__llshl");
setLibcallName(RTLIB::SRL_I64, "__llshru");
setLibcallName(RTLIB::SRA_I64, "__llshr");
and
setOperationAction(ISD::SHL, MVT::i64, Expand);
setOperationAction(ISD::SRA, MVT::i64,
2020 Apr 17
1
Compare ISel
Good day LLVM-Dev,
I hope all are in good health.
We are currently implementing the compare operation for i64 type in our target.
The main difference of the i64 type compare to lower integer types is that it performs a library call instead of generating a compare instruction.
All is good until before ISelDAGToDAG class. We have observed that the difference in a compare operation for i32 and
2009 May 21
0
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
On Wed, May 20, 2009 at 4:55 PM, Dan Gohman <gohman at apple.com> wrote:
> Can you explain why you chose the approach of using a new pass?
> I pictured removing LegalizeDAG's type legalization code would
> mostly consist of finding all the places that use TLI.getTypeAction
> and just deleting code for handling its Expand and Promote. Are you
> anticipating something more
2009 May 20
2
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
On May 20, 2009, at 1:34 PM, Eli Friedman wrote:
> On Wed, May 20, 2009 at 1:19 PM, Eli Friedman
> <eli.friedman at gmail.com> wrote:
>
>> Per subject, this patch adding an additional pass to handle vector
>>
>> operations; the idea is that this allows removing the code from
>>
>> LegalizeDAG that handles illegal types, which should be a significant
2013 Jun 21
3
[LLVMdev] ExpandDivRemLibCall vs. AEABI
Folks,
I'm working on bug 16387:
"clang doesn't produce ARM EABI-compliant modulo runtime function"
http://llvm.org/bugs/show_bug.cgi?id=16387
And I need some pointers.
I've changed ARMISelLowering::ARMTargetLowering::ARMTargetLowering() to
associate __aeabi_idivmod variants to RTLIB::{U,S}DIVREM_* library calls,
but now I need to teach the expansion that on AEABI case,
2013 Jun 21
0
[LLVMdev] ExpandDivRemLibCall vs. AEABI
Hi Renato,
> * Have some call-back mechanism, possibly upon a flag
> (HasSpecialDivRemLowering), and update the remainder result
If you setOperationAction on SDIVREM and UDIVREM to Custom you can
expand the rtlib call appropriately yourself. There's precedent for
sincos on Darwin systems (both ARM and x86) and in AArch64 for
basically every operation on fp128.
Cheers.
Tim.