Displaying 20 results from an estimated 1000 matches similar to: "Function Return Legalization"
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 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 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 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 02
4
RTLIB and Custom Library calls
Hello LLVM-Dev,
Most of the processing for i64 and f64 types for our backend are emulation library calls. Some of the library calls are not defined in the RuntimeLibcalls.def Libcall enum so we have to define custom library calls.
How is the ideal way of implementing the custom library calls? Providing us with a target backend having a similar functionality would also help us significantly.
Say
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
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 Apr 24
9
[LLVMdev] Calling-convention lowering proposal
Hello,
Attached is a patch which significantly reworks how calls, incoming
arguments, and outgoing return values are lowered. It's a major change,
affecting all targets, so I'm looking for feedback on the approach.
The goal of the patch is to eliminate a bunch of awkward code,
eliminate some unnecessary differences between targets, and to
facilitate future refactoring and feature work.
2017 Jul 12
2
A strange problem about type i64 for LLVM
Hello, everyone,
I encounter a strange problem about llvm type i64 and C++ type int64_t.
I instrumented a program to call the function 'myFunction' in the C++
shared library. 'myFunction' is something like this:
int64_t myFunction() {
int64_t retValue;
...
std::cout << "retValue: " << retValue << "\n";
return retValue;
}
2009 Sep 16
2
[LLVMdev] struct returns
> I recently made a major reorganization of the calling-convention
> lowering code which cleared away one of the major obstacles to
> doing this within codegen.
>
> Dan
So what was the obstacle, and how was it cleared? And how do you see
the large struct return working in codegen?
Anything you care to tell me would be welcome. I will be starting on
this today or tomorrow.
2018 Aug 09
3
Replace "ret" with "pop+jump"
Hi
I want to replace all the return instructions in the program with pop
<reg>; jmp <reg>.
Should I use IRBuilder in LLVM IR level?
I found that there is a IRBuilder::CreateIndirectBr
Or Should I modify the code in lib/Target/X86/X86ISelLowering.cpp in
backend ?
I found that there is a X86TargetLowering::LowerCall
Which is better?
Thanks
-------------- next part --------------
2017 Jul 12
2
A strange problem about type i64 for LLVM
Hi Tim Northover,
I just use Mac OS X, Intel Core i5. 'retValue' is initialized, computed,
and then returned from 'myFunction', so I think this problem is not
introduced by uninitialized value. In addition, '306205760' is not
a meaningless value, but the result of truncating '140583176769504' to 32
bits.
Actually, I instrumented some call instructions for value
2009 Sep 16
0
[LLVMdev] struct returns
On Sep 16, 2009, at 5:58 AM, Kenneth Uildriks wrote:
>> I recently made a major reorganization of the calling-convention
>> lowering code which cleared away one of the major obstacles to
>> doing this within codegen.
>>
>> Dan
>
> So what was the obstacle, and how was it cleared?
The biggest obstacle is that there used to be two different methods
for lowering
2009 Apr 24
0
[LLVMdev] Calling-convention lowering proposal
Dan Gohman wrote:
> Hello,
>
> Attached is a patch which significantly reworks how calls, incoming
> arguments, and outgoing return values are lowered. It's a major change,
> affecting all targets, so I'm looking for feedback on the approach.
>
> The goal of the patch is to eliminate a bunch of awkward code,
> eliminate some unnecessary differences between targets,
2018 Sep 01
3
Clang for the PlayStation 2
Hello,
I'm part of the (sadly fairly small) community of PS2 hackers. The current
cross-toolchain for the PS2 is based on GCC 3.2.3, an outdated and buggy
compiler, which I have personally gotten tired of working with, so I would
like to port Clang as a newer cross-compiler for the PS2.
However, the PS2 has some notable quirks which make this a non-trivial task
for the current compiler. It
2019 Jan 04
2
Potential bug in SelectionDAGLegalize::ConvertNodeToLibcall()?
+ Eli Friedman as he often has very insightful comments regarding back end
changes.
On Fri, Jan 4, 2019 at 9:03 AM Nemanja Ivanovic <nemanja.i.ibm at gmail.com>
wrote:
> The changes seem fine to me. I don't think this is excessively intrusive
> and it accomplishes what is needed by targets whose call lowering can
> introduce illegal types.
> Adding Justin Bogner as the
2011 Mar 16
2
[LLVMdev] Calls to functions with signext/zeroext return values
On Mar 16, 2011, at 9:31 AM, Cameron Zwarich wrote:
> Promoting the return value is unsafe for bool returns on x86-64, which in the latest revision of the ABI only guarantees that the top 7 bits of the 8-bit register are 0.
My comment is a bit off, because the question of what type to make the return value is somewhat orthogonal to the question of which zext assert we should add.
Cameron
2019 Apr 26
10
Automatically backing up and restoring x18 around function calls on AArch64?
Hi,
When using Wine to run Windows ARM64 executables on Linux, there's one
major ABI incompatibility between the two; Windows treats the x18
register as the reserved platform register, while it is free to be
clobbered anywhere in code on Linux.
The Wine code sets up this register before passing control over to the
Windows executable code, but whenever the Windows code calls a function
2017 Dec 21
2
How to implement lowerReturn for poring GlobalISel to RISCV?
Hi LLVM developers,
Thank Daniel Sanders, Aditya Nandakumar and Justin Bogner's Tutorial[1]:
Head First into GlobalISel about how to port, and Aditya took BPF target
as a simple instance:
bool BPFCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder,
const Value *Val, unsigned VReg) const {
assert(!Val == !VReg && "Return value
2015 Jul 10
2
[HCL] <Fideltronik INIGO> <Viper 1200> supported by <nutdrv_qx>
Device manufacturer: Fideltronik INIGO
Device name: Viper 1200
Device type: UPS
Bus type: USB
WWW: http://fideltronikinigo.com/viper/viper-1200/
" nut-scanner -U" output:
[nutdev1]
driver = "blazer_usb"
port = "auto"
vendorid = "0001"
productid = "0000"
product = "MEC0003"
vendor =