search for: getcallingconv

Displaying 20 results from an estimated 42 matches for "getcallingconv".

Did you mean: setcallingconv
2011 Oct 14
2
[LLVMdev] Request for merge: GHC/ARM calling convention.
Hi Duncan, > const unsigned* > ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { > + bool ghcCall = false; > + > + if (MF) { > + const Function *F = MF->getFunction(); > + ghcCall = (F ? F->getCallingConv() == CallingConv::GHC : false); > + } > This bit looks dubious. Why do you need to do it? What exactly? We need to test if this is GHC calling convention or not and if its, then return different set of callee saved regs. What exactly don't you like on this piece? Thanks! Karel
2011 Oct 14
3
[LLVMdev] Request for merge: GHC/ARM calling convention.
...;> > const unsigned* >> > ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) >> const { >> > + bool ghcCall = false; >> > + >> > + if (MF) { >> > + const Function *F = MF->getFunction(); >> > + ghcCall = (F ? F->getCallingConv() == CallingConv::GHC : false); >> > + } >> >> > This bit looks dubious. Why do you need to do it? >> >> What exactly? We need to test if this is GHC calling convention or not >> and if >> its, then return different set of callee saved regs. What exac...
2011 Oct 14
0
[LLVMdev] Request for merge: GHC/ARM calling convention.
...gt;>> > ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) >>> const { >>> > + bool ghcCall = false; >>> > + >>> > + if (MF) { >>> > + const Function *F = MF->getFunction(); >>> > + ghcCall = (F ? F->getCallingConv() == CallingConv::GHC : false); >>> > + } >>> >>> > This bit looks dubious. Why do you need to do it? >>> >>> What exactly? We need to test if this is GHC calling convention or not >>> and if >>> its, then return different set of...
2011 Sep 22
2
[LLVMdev] How to const char* Value for function argument
...ConstantInt::get(Type::getInt32Ty(context), call->getNumArgOperands())); callargs.insert(callargs.begin(), callee->getName()); CallInst* newcall = CallInst::Create(launch, callargs, "", call); newcall->takeName(call); newcall->setCallingConv(call->getCallingConv()); newcall->setAttributes(call->getAttributes()); newcall->setDebugLoc(call->getDebugLoc()); call->replaceAllUsesWith(newcall); found = true; break; } The line callargs.insert(callargs.begin(), callee->getName()); is invalid: instead of StringR...
2016 Jun 28
2
Tail call optimization is getting affected due to local function related optimization with IPRA
...t; > Hello , > > To solve this bug locally I have given preference to tail call optimization over local function related optimization in IPRA. I have added following method to achieve this: > > bool isEligibleForTailCallOptimization(Function *F) { > CallingConv::ID CC = F->getCallingConv(); > if (CC == CallingConv::Fast || CC == CallingConv::GHC || CC == CallingConv::HiPE) > return true; > return false; > } > > Any other suggestions are always welcomed. Why aren’t checking for the presence of a tail call? — Mehdi > > and I am checking this cond...
2016 Jun 28
2
Tail call optimization is getting affected due to local function related optimization with IPRA
...gt; To solve this bug locally I have given preference to tail call optimization over local function related optimization in IPRA. I have added following method to achieve this: >>> >>> bool isEligibleForTailCallOptimization(Function *F) { >>> CallingConv::ID CC = F->getCallingConv(); >>> if (CC == CallingConv::Fast || CC == CallingConv::GHC || CC == CallingConv::HiPE) >>> return true; >>> return false; >>> } >>> >>> Any other suggestions are always welcomed. >> >> Why aren’t checking for the presence...
2016 Jun 26
3
Tail call optimization is getting affected due to local function related optimization with IPRA
...ark regiseters as >> callee >> saved in RegMask due to CC with follwoing change in code: >> >> if (!F->hasLocalLinkage() || F->hasAddressTaken()) { >> const uint32_t *CallPreservedMask = >> TRI->getCallPreservedMask(MF, MF.getFunction()->getCallingConv()); >> // Set callee saved register as preserved. >> for (unsigned i = 0; i < RegMaskSize; ++i) >> RegMask[i] = RegMask[i] | CallPreservedMask[i]; >> } >> >> For more details please follow following link. >> https://groups.google....
2016 Jun 27
0
Tail call optimization is getting affected due to local function related optimization with IPRA
Hello , To solve this bug locally I have given preference to tail call optimization over local function related optimization in IPRA. I have added following method to achieve this: bool isEligibleForTailCallOptimization(Function *F) { CallingConv::ID CC = F->getCallingConv(); if (CC == CallingConv::Fast || CC == CallingConv::GHC || CC == CallingConv::HiPE) return true; return false; } Any other suggestions are always welcomed. and I am checking this condition along with hasLocalLinkage() and hasAddressTaken(). Due to this test-suite now has only 2 runtime...
2011 Oct 14
0
[LLVMdev] Request for merge: GHC/ARM calling convention.
Hi Karel, > > const unsigned* > > ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { > > + bool ghcCall = false; > > + > > + if (MF) { > > + const Function *F = MF->getFunction(); > > + ghcCall = (F ? F->getCallingConv() == CallingConv::GHC : false); > > + } > > > This bit looks dubious. Why do you need to do it? > > What exactly? We need to test if this is GHC calling convention or not and if > its, then return different set of callee saved regs. What exactly don't you like > on...
2017 Jun 08
4
DICompileUnit duplication in LLVM 4.0.0?
...ction *FunctionDuplication::duplicate(Module &M, Function &Old, FunctionType *NewTy) const { Function *New = Function::Create(NewTy, Old.getLinkage(), "", &M); New->setAttributes(Old.getAttributes()); New->setCallingConv(Old.getCallingConv()); // Map old arguments to the new arguments. ValueToValueMapTy VMap; for (auto OldFI = Old.arg_begin(), OldFE = Old.arg_end(), NewFI = New->arg_begin(); OldFI != OldFE; ++OldFI, ++NewFI) { Argument &OldA = *OldFI; Argument &NewA = *NewFI; NewA.setN...
2016 Jun 28
2
Tail call optimization is getting affected due to local function related optimization with IPRA
...cally I have given preference to tail call optimization over local function related optimization in IPRA. I have added following method to achieve this: >>>>> >>>>> bool isEligibleForTailCallOptimization(Function *F) { >>>>> CallingConv::ID CC = F->getCallingConv(); >>>>> if (CC == CallingConv::Fast || CC == CallingConv::GHC || CC == CallingConv::HiPE) >>>>> return true; >>>>> return false; >>>>> } >>>>> >>>>> Any other suggestions are always welcomed. >&gt...
2016 Jun 28
0
Tail call optimization is getting affected due to local function related optimization with IPRA
...Hello , > > To solve this bug locally I have given preference to tail call > optimization over local function related optimization in IPRA. I have added > following method to achieve this: > > bool isEligibleForTailCallOptimization(Function *F) { > CallingConv::ID CC = F->getCallingConv(); > if (CC == CallingConv::Fast || CC == CallingConv::GHC || CC == > CallingConv::HiPE) > return true; > return false; > } > > Any other suggestions are always welcomed. > > > Why aren’t checking for the presence of a tail call? > Are you asking about if ta...
2016 Jun 28
2
Tail call optimization is getting affected due to local function related optimization with IPRA
...given preference to tail call optimization over local function related optimization in IPRA. I have added following method to achieve this: >>>>>> >>>>>> bool isEligibleForTailCallOptimization(Function *F) { >>>>>> CallingConv::ID CC = F->getCallingConv(); >>>>>> if (CC == CallingConv::Fast || CC == CallingConv::GHC || CC == CallingConv::HiPE) >>>>>> return true; >>>>>> return false; >>>>>> } >>>>>> >>>>>> Any other suggestions are...
2016 Jun 28
0
Tail call optimization is getting affected due to local function related optimization with IPRA
...gt; To solve this bug locally I have given preference to tail call optimization over local function related optimization in IPRA. I have added following method to achieve this: >>> >>> bool isEligibleForTailCallOptimization(Function *F) { >>> CallingConv::ID CC = F->getCallingConv(); >>> if (CC == CallingConv::Fast || CC == CallingConv::GHC || CC == CallingConv::HiPE) >>> return true; >>> return false; >>> } >>> >>> Any other suggestions are always welcomed. >> >> Why aren’t checking for the presence...
2019 Jul 24
2
About a new porting of GlobalIsel for RISCV
...ust 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 reuse part of code...
2016 Jun 25
3
Tail call optimization is getting affected due to local function related optimization with IPRA
...m also changing RegUsageInfoCollector.cpp to not to mark regiseters as callee saved in RegMask due to CC with follwoing change in code: if (!F->hasLocalLinkage() || F->hasAddressTaken()) { const uint32_t *CallPreservedMask = TRI->getCallPreservedMask(MF, MF.getFunction()->getCallingConv()); // Set callee saved register as preserved. for (unsigned i = 0; i < RegMaskSize; ++i) RegMask[i] = RegMask[i] | CallPreservedMask[i]; } For more details please follow following link. https://groups.google.com/d/msg/llvm-dev/XRzGhJ9wtZg/bYFMzppXEwAJ Now consider foll...
2011 Sep 22
0
[LLVMdev] How to const char* Value for function argument
...allargs.begin(), callee->getName()); CallInst* newcall = CallInst::Create(launch, callargs, "", call); newcall->takeName(call); newcall->setCallingConv(call->getCallingConv()); newcall->setAttributes(call->getAttributes()); newcall->setDebugLoc(call->getDebugLoc()); call->replaceAllUsesWith(newcall);...
2011 Sep 16
2
[LLVMdev] How to duplicate a function?
...nstruction *New; Instruction *Before = Call; if ( InvokeInst *II = dyn_cast<InvokeInst>(Call) ) { New = InvokeInst::Create(NF, II->getNormalDest(), II->getUnwindDest(), Args, "", Before); cast<InvokeInst>(New)->setCallingConv(CS.getCallingConv()); // cast<InvokeInst>(New)->setParamAttrs(CS.getParamAttrs()); cast<InvokeInst>(New)->setAttributes(CS.getAttributes()); } else { New = CallInst::Create(NF, Args, "", Before); cast<CallInst>(New)->setCalling...
2016 Jun 28
0
Tail call optimization is getting affected due to local function related optimization with IPRA
...cally I have given preference to tail call optimization over local function related optimization in IPRA. I have added following method to achieve this: >>>>> >>>>> bool isEligibleForTailCallOptimization(Function *F) { >>>>> CallingConv::ID CC = F->getCallingConv(); >>>>> if (CC == CallingConv::Fast || CC == CallingConv::GHC || CC == CallingConv::HiPE) >>>>> return true; >>>>> return false; >>>>> } >>>>> >>>>> Any other suggestions are always welcomed. >&gt...
2017 Jun 08
2
DICompileUnit duplication in LLVM 4.0.0?
...e(Module &M, Function &Old, >> FunctionType *NewTy) const { >> Function *New = Function::Create(NewTy, Old.getLinkage(), "", &M); >> New->setAttributes(Old.getAttributes()); >> New->setCallingConv(Old.getCallingConv()); >> >> // Map old arguments to the new arguments. >> ValueToValueMapTy VMap; >> for (auto OldFI = Old.arg_begin(), OldFE = Old.arg_end(), >> NewFI = New->arg_begin(); >> OldFI != OldFE; ++OldFI, ++NewFI) { >> Argument &amp...