Displaying 13 results from an estimated 13 matches for "ccinfo".
Did you mean:
cainfo
2007 Jun 20
1
[LLVMdev] Calling Convention & Stack Frame
Hello,
I want to find information/documentation on how reorganize stack frame (add other information, etc.) & how add new calling convention into ARM backend?
I think it is needed to modify lowering of CALL, RET & FORMAL_ARGUMENT instruction, and also to modify emitPrologue & emitEpilogue functions.
What are the others things to modify in order to realize my
2019 Jul 24
2
About a new porting of GlobalIsel for RISCV
...efined, just like the solution in Mips, a new
target-specific "ValueHandler" will be created to support
calllowering.
I have made some experiment that trying to implement the "LowerReturn"
function, and it can return correctly. The code snippet may be as
follows:
...
CCState CCInfo(F.getCallingConv(), F.isVarArg(), MF, ArgLocs, F.getContext());
TLI.analyzeOutputArgs(MF, CCInfo, Outs, true, nullptr);
RISCVValueHandler RetHandler(MIRBuilder, MF.getRegInfo(), Ret);
RetHandler.handleArg(ArgLocs, RetInfos);
...
In order to reduce duplicated code as much as possible, and re...
2013 Jul 04
2
[LLVMdev] making a copy of a byval aggregate on the callee's frame
Hi Tim,
Thank you for the input.
I think I follow you.
I believe the LowerCall is doing what it needs to do - passing pointer either on the stack or in register as per ABI.
The LowerFormalArguments() is where I am stuck.
LowerFormalArguments () calls CCInfo.AnalyzeFormalArguments(Ins, CC_XCore), which calls the CC_XCore().
This is where I placed the CCIfByVal<CCPassByVal<0,4>> which only pushed the pointer to the stack.
However, I don't want to push the pointer to the stack but COPY the pointee.
Indeed, I want to keep the pointer where...
2007 Sep 11
0
[LLVMdev] RFC: Tail call optimization X86
...t<ConstantSDNode>(Op.getOperand(3))-
>getValue() != 0;
+ SDOperand Callee = Op.getOperand(4);
+ //unsigned NumOps = (Op.getNumOperands() - 5) / 2;
+
+ // Analyze operands of the call, assigning locations to each operand.
+ SmallVector<CCValAssign, 16> ArgLocs;
+ CCState CCInfo(CC, isVarArg, getTargetMachine(), ArgLocs);
+ CCInfo.AnalyzeCallOperands(Op.Val, CC_X86_32_TailCall);
+ if (isTailCall &&
+ IsEligibleForTailCallElimination(Op, DAG,CC, Callee) &&
+ PerformTailCallOpt) {
IsEligibleForTailCallElimination() should be a target hook. This...
2007 Sep 06
2
[LLVMdev] RFC: Tail call optimization X86
Hi Evan,
first off thanks to you and Chris for taking time.
On 6 Sep 2007, at 00:57, Evan Cheng wrote:
> We'd like to see tail call optimization to be similar to the target
> independent lowering of ISD::CALL nodes. These are auto-generated
> from ???CallingConv.td files. Some target specific details such as
> function address register (ECX in your example) should be coded in
2013 Jul 04
0
[LLVMdev] making a copy of a byval aggregate on the callee's frame
Hi,
> I believe the LowerCall is doing what it needs to do - passing pointer either on the stack or in register as per ABI.
>From very quick test-cases with no understanding of XCore, that looks plausible.
> LowerFormalArguments () calls CCInfo.AnalyzeFormalArguments(Ins, CC_XCore), which calls the CC_XCore().
> This is where I placed the CCIfByVal<CCPassByVal<0,4>> which only pushed the pointer to the stack.
Really, all it did was ask LowerCall and LowerFormalArguments to pass
the pointer on the stack (well, strictly &quo...
2015 Nov 25
2
need help for customized backend LowerFormalArguments
...als) const {
MachineFunction &MF = DAG.getMachineFunction();
MachineRegisterInfo &RegInfo = MF.getRegInfo();
assert(!isVarArg && "VarArg not supported");
// Assign locations to all of the incoming arguments.
SmallVector<CCValAssign, 16> ArgLocs;
CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(), ArgLocs,
*DAG.getContext());
CCInfo.AnalyzeFormalArguments(Ins, CC_FOO);
for (auto &VA : ArgLocs) {
if (VA.isRegLoc()) {
// Arguments passed in registers
EVT RegVT = VA.getLocVT();
const unsigned VReg =
R...
2007 Sep 11
2
[LLVMdev] RFC: Tail call optimization X86
...)-
>> getValue() != 0;
> + SDOperand Callee = Op.getOperand(4);
> + //unsigned NumOps = (Op.getNumOperands() - 5) / 2;
> +
> + // Analyze operands of the call, assigning locations to each
> operand.
> + SmallVector<CCValAssign, 16> ArgLocs;
> + CCState CCInfo(CC, isVarArg, getTargetMachine(), ArgLocs);
> + CCInfo.AnalyzeCallOperands(Op.Val, CC_X86_32_TailCall);
> + if (isTailCall &&
> + IsEligibleForTailCallElimination(Op, DAG,CC, Callee) &&
> + PerformTailCallOpt) {
>
>
> IsEligibleForTailCallElimination...
2013 Feb 02
0
[LLVMdev] Moving return value registers from MRI to return instructions
...turn() should add return value registers to the RET_FLAG node instead of calling MRI.addLiveOut():
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -1590,14 +1590,7 @@ X86TargetLowering::LowerReturn(SDValue Chain,
RVLocs, *DAG.getContext());
CCInfo.AnalyzeReturn(Outs, RetCC_X86);
- // Add the regs to the liveout set for the function.
- MachineRegisterInfo &MRI = DAG.getMachineFunction().getRegInfo();
- for (unsigned i = 0; i != RVLocs.size(); ++i)
- if (RVLocs[i].isRegLoc() && !MRI.isLiveOut(RVLocs[i].getLocReg()))
-...
2013 Jul 04
0
[LLVMdev] making a copy of a byval aggregate on the callee's frame
Hi Robert,
> I tried adding to the XCoreCallingConv.td:
> CCIfByVal<CCPassByVal<0,4>> // pushes pointer to the stack
This looks sensible to me. After that it comes down to cooperation
between XCoreISelLowering's LowerFormalArguments and LowerCall
functions. LowerFormalArguments is at the beginning of a function and
is responsible for taking arguments out of
2013 Jul 04
2
[LLVMdev] making a copy of a byval aggregate on the callee's frame
...y of a byval aggregate on the callee's frame
Hi,
> I believe the LowerCall is doing what it needs to do - passing pointer either on the stack or in register as per ABI.
>From very quick test-cases with no understanding of XCore, that looks plausible.
> LowerFormalArguments () calls CCInfo.AnalyzeFormalArguments(Ins, CC_XCore), which calls the CC_XCore().
> This is where I placed the CCIfByVal<CCPassByVal<0,4>> which only pushed the pointer to the stack.
Really, all it did was ask LowerCall and LowerFormalArguments to pass
the pointer on the stack (well, strictly &quo...
2013 Jul 04
2
[LLVMdev] making a copy of a byval aggregate on the callee's frame
Hi - help!
I have read through previous threads on the subject of 'byval' e.g.
https://groups.google.com/forum/#!topicsearchin/llvm-dev/Exact$20meaning$20of$20byval/llvm-dev/cyRZyXcMCNI
https://groups.google.com/forum/#!topicsearchin/llvm-dev/$20byval/llvm-dev/uk4uiK93jeM
https://groups.google.com/forum/#!topicsearchin/llvm-dev/byval/llvm-dev/46Tv0lSRwBg
and read through code
2018 Sep 14
6
Function calls keep increasing the stack usage
Hi everyone,
I found that LLVM generates redundant code when calling functions with
constant parameters, with optimizations disabled.
Consider the following C code snippet:
int foo(int x, int y);
void bar()
{
foo(1, 2);
foo(3, 4);
}
Clang/LLVM 6.0 generates the following assembly code:
_bar:
subl $32, %esp
movl $1, %eax
movl $2, %ecx
movl $1, (%esp)
movl $2, 4(%esp)
movl %eax, 28(%esp)
movl