similar to: IPRA, interprocedural register allocation, question

Displaying 20 results from an estimated 8000 matches similar to: "IPRA, interprocedural register allocation, question"

2016 Jul 08
2
IPRA, interprocedural register allocation, question
On Fri, Jul 8, 2016 at 9:47 AM, Lawrence, Peter <c_plawre at qca.qualcomm.com> wrote: > Vivek, > > I am looking into these function attributes in the clang docs > > Preserve_most > > Preserve_all > > They are not available in the 3.6.2 that I am currently using, but I hope > they exist in 3.8 > > > >
2016 Jul 09
3
IPRA, interprocedural register allocation, question
Vivek, IIUC it seems that we need two pieces of information to do IPRA, 1. what registers the callee clobbers 2. what the callee does to the call-graph And it is #2 that we are missing when we define an external function, Even when we declare it with a preserves or a regmask attribute, So what I / we need is another attribute that says this is a leaf function, At least in my case all
2016 Jul 12
2
IPRA, interprocedural register allocation, question
Vivek, Here’s the way I see it, let me know if you agree or disagree, You cannot optimize a function’s calling convention (register-usage) unless You can see and change every caller, and you only know this for non-static functions if you know that all calls to external functions cannot call back into the current compilation unit. #1 gives you the info necessary to change the call-site
2016 Jul 12
3
IPRA, interprocedural register allocation, question
Mehdi, I’m compiling embedded applications which are small enough to do whole-program-compilation. There’s no advantage in breaking them up into separate compilation pieces and linking them, even though in source form they are composed of a couple of separate source files. So for me the compilation unit is always the entire program (and includes main()) Except for some
2016 Jul 12
3
IPRA, interprocedural register allocation, question
Mehdi, I am looking for an understanding of 1) IPRA in general, 2) IPRA in LLVM. Whether I want to use LTO or not is a separate issue. 1) I currently believe it is a true statement that: If all external functions are known to not call back into the “whole-program” Being compiled, then IPRA is free to do anything at all to the functions being
2016 Jun 30
4
Help required regarding IPRA and Local Function optimization
Hello Mentors, I am currently finding bug in Local Function related optimization due to which runtime failures are observed in some test cases, as those test cases are containing very large function with recursion and object oriented code so I am not able to find a pattern which is causing failure. So I tried following simple case to understand expected behavior from this optimization. Consider
2016 Jun 25
3
Tail call optimization is getting affected due to local function related optimization with IPRA
Hello LLVM Community, To improve Interprocedural Register Allocation (IPRA) we are trying to force caller saved registers for local functions (which has likage type local). To achive it I have modified TargetFrameLowering::determineCalleeSaves() to return early for function which satisfies if (F->hasLocalLinkage() && !F->hasAddressTaken()) and also reflecting the fact that for local
2016 Jun 26
3
Tail call optimization is getting affected due to local function related optimization with IPRA
According to this http://llvm.org/docs/CodeGenerator.html#tail-call-section, it seems that adding a new CC for the purpose of local function optimization seems a good idea because tail call optimization only takes place when both caller and callee have fastcc or GHC or HiPE calling convention. -Vivek On Sun, Jun 26, 2016 at 1:26 AM, vivek pandya <vivekvpandya at gmail.com> wrote: >
2016 Jun 28
2
Tail call optimization is getting affected due to local function related optimization with IPRA
> On Jun 27, 2016, at 12:25 PM, vivek pandya <vivekvpandya at gmail.com> wrote: > > 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 =
2016 Jul 08
2
IPRA, interprocedural register allocation, question
> On Jul 7, 2016, at 9:17 PM, Lawrence, Peter via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Vivek, > I am looking into these function attributes in the clang docs > Preserve_most > Preserve_all > They are not available in the 3.6.2 that I am currently using, but I hope they exist in 3.8 > > These should provide
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;
2016 Jun 25
0
Tail call optimization is getting affected due to local function related optimization with IPRA
On Sat, Jun 25, 2016 at 11:03 PM, vivek pandya <vivekvpandya at gmail.com> wrote: > Hello LLVM Community, > > To improve Interprocedural Register Allocation (IPRA) we are trying to > force caller > saved registers for local functions (which has likage type local). To > achive it > I have modified TargetFrameLowering::determineCalleeSaves() to return > early for >
2016 Jun 28
0
Tail call optimization is getting affected due to local function related optimization with IPRA
On Tue, Jun 28, 2016 at 8:11 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: > > On Jun 27, 2016, at 12:25 PM, vivek pandya <vivekvpandya at gmail.com> wrote: > > 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: > >
2016 Jul 15
4
RFC: To add __attribute__((regmask("preserve/clobbered list here"))) in clang
Hello Clang and LLVM Devs, I have been working to add support for an attribute in clang and LLVM that helps user to guide interprocedural register allocation. But the use case I am having is very limited and thus I belieave it is good to have discussion on this before sending a patch. So for IPRA we have a situation where a function is calling a function which is written in assembly and it is
2016 Jul 13
6
IPRA, interprocedural register allocation, question
Vivek, I apologize if you took my original email as a request for implementation, I meant to be asking what is already available, I think the answer to that is the ‘preserves_most’ and ‘preserves_all’ attributes, but I will also Use ‘regmask’ if those prove to be too sub-optimal. I am still interested in figuring out the necessary and sufficient conditions For LLC to do optimal IPRA
2016 Jul 25
2
[GSoC 2016] [Weekly Status] Interprocedural Register Allocation
Dear Community, Sorry for being late for weekly status report but I was traveling back to my college. Please consider this week's summary as follows: Implementation: ============ This week I tried to get experimental PGO driven IPRA work. The idea is to save all register in prolog and restore it in epilog for cold function so that IPRA can propagate some free register to upper region of
2016 Jul 28
1
A thought to improve IPRA
> On Jul 28, 2016, at 12:59 PM, vivek pandya <vivekvpandya at gmail.com> wrote: > > I have been working on PGO driven IPRA and I want to measure if this help to reduce execution time. So as mentioned earlier the idea is to make cold function register usage free i.e saving and restoring all used register by such cold function so caller of that function will have more free registers.
2016 Jul 10
2
[GSoC 2016] [Weekly Status] Interprocedural Register Allocation
Hello LLVM Developers, Please feel free to send any ideas that you can think to improve current IPRA. I will work on it and if possible I will implement that. Please consider summary of work done during this week. Implementation: ============ The reviews requests has been updated to reflect the reviews. Testing: ===== To get more benefit from IPRA I experimented it with LTO and results
2016 Jun 28
2
Tail call optimization is getting affected due to local function related optimization with IPRA
Sent from my iPhone > On Jun 28, 2016, at 12:53 PM, vivek pandya <vivekvpandya at gmail.com> wrote: > > > >> On Tue, Jun 28, 2016 at 8:11 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: >> >>> On Jun 27, 2016, at 12:25 PM, vivek pandya <vivekvpandya at gmail.com> wrote: >>> >>> Hello , >>> >>> To solve
2016 Aug 05
2
A thought to improve IPRA
The code in X86TargetLowering::IsEligibleForTailCallOptimization() has this part: // The callee has to preserve all registers the caller needs to preserve. const X86RegisterInfo *TRI = Subtarget.getRegisterInfo(); const uint32_t *CallerPreserved = TRI->getCallPreservedMask(MF, CallerCC); if (!CCMatch) { const uint32_t *CalleePreserved = TRI->getCallPreservedMask(MF, CalleeCC);