search for: isvararg

Displaying 20 results from an estimated 98 matches for "isvararg".

2015 Jan 19
2
[LLVMdev] [INCOMPLETE] [GC] Support wrapping vararg functions in statepoint
...@@ -5726,7 +5726,7 @@ SelectionDAGBuilder::lowerInvokable(TargetLowering::CallLoweringInfo &CLI, } void SelectionDAGBuilder::LowerCallTo(ImmutableCallSite CS, SDValue Callee, - bool isTailCall, + bool isTailCall, bool isVarArg, MachineBasicBlock *LandingPad) { PointerType *PT = cast<PointerType>(CS.getCalledValue()->getType()); FunctionType *FTy = cast<FunctionType>(PT->getElementType()); @@ -5760,7 +5760,7 @@ void SelectionDAGBuilder::LowerCallTo(ImmutableCa...
2010 Mar 03
0
[LLVMdev] [PATCH] New calling convention for use by GHC
...t && ArgsAreStructReturn(Ins)) + if (!Is64Bit && CallConv != CallingConv::Fast && + CallConv != CallingConv::GHC && ArgsAreStructReturn(Ins)) This should probably use !IsTailCallConvention(CallConv) instead of duplicating the two conventions assert(!(isVarArg && CallConv == CallingConv::Fast) && "Var args not supported with calling convention fastcc"); + assert(!(isVarArg && CallConv == CallingConv::GHC) && + "Var args not supported with calling convention ghc"); Likewise. @@ -2151...
2010 Mar 07
1
[LLVMdev] [PATCH] New calling convention for use by GHC
...turn(Ins)) > + if (!Is64Bit&& CallConv != CallingConv::Fast&& > + CallConv != CallingConv::GHC&& ArgsAreStructReturn(Ins)) > > This should probably use !IsTailCallConvention(CallConv) instead of duplicating the two conventions > > assert(!(isVarArg&& CallConv == CallingConv::Fast)&& > "Var args not supported with calling convention fastcc"); > + assert(!(isVarArg&& CallConv == CallingConv::GHC)&& > + "Var args not supported with calling convention ghc"); > &...
2010 Mar 03
2
[LLVMdev] [PATCH] New calling convention for use by GHC
Hi all, As previously mentioned on this list the Haskell compiler GHC has a new LLVM based back-end. The back-end needs a new calling convention to efficiently use LLVM and that is what this patch does, just for X86 at the moment. Breakdown: 1) Need actual calling convention Touches: - include/llvm/CallingConv.h - lib/Target/X86/X86CallingConv.td 2) Handling new calling
2006 Nov 15
2
[LLVMdev] LowerCALL (TargetLowering)
...= Result.Val->getNumValues() && "Lowering call/formal_arguments produced unexpected # results!"' failed. This is what my LowerCALL looks like: SDOperand MCTargetLowering::LowerCALL(SDOperand Op, SelectionDAG &DAG) { SDOperand Chain = Op.getOperand(0); bool isVarArg = cast<ConstantSDNode>(Op.getOperand(2))->getValue() != 0; assert(!isVarArg); bool isTailCall = cast<ConstantSDNode>(Op.getOperand(3))->getValue() != 0; SDOperand Callee = Op.getOperand(4); MVT::ValueType RetVT= Op.Val->getValueType(0); unsigned...
2007 Feb 25
0
[LLVMdev] Linux/ppc backend
...ns, please don't use nested ?: expressions without parens, and please be careful about indentation. Please verify that mainline CVS has everything you think it should. The one hunk I didn't apply was this one: @@ -1392,12 +1418,13 @@ case MVT::f32: case MVT::f64: - if (isVarArg && isPPC64) { + if (isVarArg || isPPC64) { // Float varargs need to be promoted to double. if (Arg.getValueType() == MVT::f32) Arg = DAG.getNode(ISD::FP_EXTEND, MVT::f64, Arg); This changes the darwin/ppc ABI. It's not clear to me that this was in...
2007 Feb 25
2
[LLVMdev] Linux/ppc backend
...se verify that mainline CVS has > everything you think it should. > I just verified and launched some compilations. Everything seems OK. > The one hunk I didn't apply was this one: > > @@ -1392,12 +1418,13 @@ > case MVT::f32: > case MVT::f64: > - if (isVarArg && isPPC64) { > + if (isVarArg || isPPC64) { > // Float varargs need to be promoted to double. > if (Arg.getValueType() == MVT::f32) > Arg = DAG.getNode(ISD::FP_EXTEND, MVT::f64, Arg); > > This changes the darwin/ppc ABI. It's not...
2006 Nov 09
3
[LLVMdev] Is this bug in LLVM?
...And I made 'hello.bc' by "$ llvm-gcc hello.c -o hello". In order to make ARM assembly code, I typed "llc -march=arm hello.bc -o hello.arm" But, I met this error. llc: ARMISelDAGToDAG.cpp:73: llvm::SDOperand LowerCALL(llvm::SDOperand, llvm::SelectionDAG&): Assertion `isVarArg == false && "VarArg not supported"' failed. llc((anonymous namespace)::PrintStackTrace()+0x15)[0x850437d] llc((anonymous namespace)::SignalHandler(int)+0x139)[0x8504645] Aborted I can't understand. Would you mind replying to me w.r.t this? Thank you. Best regards, Seung...
2006 Nov 15
0
[LLVMdev] LowerCALL (TargetLowering)
..."Lowering call/formal_arguments produced unexpected # results!"' > failed. > > This is what my LowerCALL looks like: > > SDOperand MCTargetLowering::LowerCALL(SDOperand Op, SelectionDAG > &DAG) { > SDOperand Chain = Op.getOperand(0); > bool isVarArg = cast<ConstantSDNode>(Op.getOperand(2))- > >getValue() != 0; > assert(!isVarArg); > bool isTailCall = cast<ConstantSDNode>(Op.getOperand(3))- > >getValue() != 0; > SDOperand Callee = Op.getOperand(4); > MVT::ValueType RetVT= Op.Val...
2012 Mar 16
1
[LLVMdev] Lowering formal pointer arguments
...rik, > DAG.getMachineFunction().getFunction() only works in LowerFormalArguments (there it returns the callee), not in LowerCall (where it returns the caller, rather than the callee). You need to pass more information about the function type to LowerCall (besides partial information such as the isVarArg parameter). > > I can provide a patch if you are interested. (Unfortunately, to push this upstream has been on my to-do-list for while). please do! I have been facing the same problem and am very interested in a clean solution for this. Best regards, Christoph
2007 Feb 17
2
[LLVMdev] Linux/ppc backend
Evan Cheng wrote: > I think the easiest thing for you to do is to define a separate CALL > instruction with a different set of Defs. This instruction should > only be selected when the predicate isMacho is true. Also update > PPCRegisterInfo.cpp getCalleeSavedRegs() to return a different list > when subtarget->isMachoABI() is true. > Alright, thx Evan, that's
2012 May 09
0
[LLVMdev] Calling C-language variadic functions
...on that exists in a library that gets > linked to the LLVM module). > > Is there something special I need to do? Declare the function with the right type: FunctionType* FuncTy_7 = FunctionType::get( /*Result=*/IntegerType::get(mod->getContext(), 32), /*Params=*/FuncTy_7_args, /*isVarArg=*/true); Function* func_foo = Function::Create( /*Type=*/FuncTy_7, /*Linkage=*/GlobalValue::ExternalLinkage, /*Name=*/"foo", mod); // (external, no body) func_foo->setCallingConv(CallingConv::C); Note the `` /*isVarArg=*/true " part. These are excerpts taken from the onl...
2007 Sep 24
2
[LLVMdev] RFC: Tail call optimization X86
...e/llvm/Target/TargetLowering.h (revision 42247) > +++ include/llvm/Target/TargetLowering.h (working copy) > @@ -851,8 +851,18 @@ > virtual std::pair<SDOperand, SDOperand> > LowerCallTo(SDOperand Chain, const Type *RetTy, bool > RetTyIsSigned, > bool isVarArg, unsigned CallingConv, bool isTailCall, > - SDOperand Callee, ArgListTy &Args, SelectionDAG &DAG); > + bool isNextInstRet, SDOperand Callee, ArgListTy &Args, > + SelectionDAG &DAG); > + // IsEligibleForTailCallElimination - Check w...
2012 May 09
2
[LLVMdev] Calling C-language variadic functions
Such as printf, etc., from IR created using the API (IRBuilder). Google hasn't provided much help, and I can't find anything relevant in the docs (the docs talk about how to do varargs in LLVM ASM, but not how to call an external vararg function that exists in a library that gets linked to the LLVM module). Is there something special I need to do? Simply calling
2007 Feb 25
0
[LLVMdev] Linux/ppc backend
...ed some compilations. Everything seems OK. Ok, I just broke ELF support to refix darwin, so please take a look again :) >> The one hunk I didn't apply was this one: >> >> @@ -1392,12 +1418,13 @@ >> case MVT::f32: >> case MVT::f64: >> - if (isVarArg && isPPC64) { >> + if (isVarArg || isPPC64) { >> // Float varargs need to be promoted to double. >> if (Arg.getValueType() == MVT::f32) >> Arg = DAG.getNode(ISD::FP_EXTEND, MVT::f64, Arg); >> >> This changes the darwin...
2007 Oct 05
0
[LLVMdev] RFC: Tail call optimization X86
...ted to "caller/callee cleans arguments off the stack" is not controlled by the .td. It's controlled in code by the operands of CALLSEQ_END. for example in SDOperand X86TargetLowering::LowerCCCCallTo: ... if (CC == CallingConv::X86_StdCall || CC == CallingConv::Fast) { if (isVarArg) NumBytesForCalleeToPush = isSRet ? 4 : 0; else NumBytesForCalleeToPush = NumBytes; assert(!(isVarArg && CC==CallingConv::Fast) && "CallingConv::Fast does not support varargs."); } else { // If this is is a call to a struct-retu...
2008 Jan 28
2
[LLVMdev] llc fails to generate code for arm
...code for arm using the llc utility. However, llc fails to generate code for arm. Output is as below... arvind at zeus:~/tools/llvm/del$ llc main.bc -o mainarm -filetype=asm -march=arm -f llc: ARMISelDAGToDAG.cpp:73: llvm::SDOperand LowerCALL(llvm::SDOperand, llvm::SelectionDAG&): Assertion `isVarArg == false && "VarArg not supported"' failed. llc[0x85335ac] [0xffffe420] [0xffffe410] /lib/tls/i686/cmov/libc.so.6(gsignal+0x50)[0xb7d5bdf0] /lib/tls/i686/cmov/libc.so.6(abort+0x101)[0xb7d5d641] /lib/tls/i686/cmov/libc.so.6(__assert_fail+0xfb)[0xb7d5543b] llc[0x82aaeed] Aborted...
2006 Sep 02
2
[LLVMdev] gfortran calling convention
...ons function calls with *no arguments* simple common blocks Function calls with more than one argument don't work. Specifically: ..../gfortran funccall-1arg.f -o funccall-1arg.exe ..../llvm/lib/VMCore/Instructions.cpp:209: failed assertion `(Params.size() == FTy->getNumParams() || (FTy->isVarArg() && Params.size() > FTy->getNumParams())) && "Calling a function with bad signature!"' funccall-1arg.f: In function 'MAIN__': funccall-1arg.f:5: internal compiler error: Abort trap Please submit a full bug report, with preprocessed source if appropriate....
2013 Jan 03
2
[LLVMdev] Opt error
...e following exception: $ opt -o a.bc -load /data/llvm3.1/Release+Asserts/lib/Dat.so -MyPass < malloc.bc opt: Instructions.cpp:269: void llvm::CallInst::init(llvm::Value*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&): Assertion `(Args.size() == FTy->getNumParams() || (FTy->isVarArg() && Args.size() > FTy->getNumParams())) && "Calling a function with bad signature!"' failed. In older llvm, I had the following line: CallInst::Create(func, Opts, Opts , "", newBB); Which I have now modified for llvm3.1 to: CallInst::Create(func, ma...
2007 Sep 24
0
[LLVMdev] RFC: Tail call optimization X86
...tLowering.h (revision 42247) >> +++ include/llvm/Target/TargetLowering.h (working copy) >> @@ -851,8 +851,18 @@ >> virtual std::pair<SDOperand, SDOperand> >> LowerCallTo(SDOperand Chain, const Type *RetTy, bool >> RetTyIsSigned, >> bool isVarArg, unsigned CallingConv, bool isTailCall, >> - SDOperand Callee, ArgListTy &Args, SelectionDAG &DAG); >> + bool isNextInstRet, SDOperand Callee, ArgListTy &Args, >> + SelectionDAG &DAG); >> + // IsEligibleForTailCallElimi...