search for: ipra

Displaying 20 results from an estimated 102 matches for "ipra".

Did you mean: ipa
2016 Jul 08
2
IPRA, interprocedural register allocation, question
...alls to functions with these attributes > > with be code-gen’ed through different “calling conventions”, > > and CALL instructions to them should have different register USE and DEF > info, > > > Yes I believe that preserve_most or preserve_all should help you even with out IPRA. But just to note IPRA can even help further for example on X86 preserve_most cc will not preserve R11 (this can be verified from X86CallingConv.td and X86RegisterInfo.cpp) how ever IPAR calculates regmask based on the actual register usage and if procedure with preserve_most cc does not use R11 an...
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 le...
2016 Jul 06
3
IPRA, interprocedural register allocation, question
...t only the assembler knows about. These functions typically don't > Use any registers besides the incoming argument registers, IE they don't > Need to use any additional callee-save nor caller-save registers. > > If inline asm template has specified clobbered list properly than IPRA is able to use that information and it propagates correct register mask (and that also means that skipping clobbers list while IPRA enabled may broke executable) For example in following code: int gcd( int a, int b ) { int result ; /* Compute Greatest Common Divisor using Euclid's Algor...
2016 Jul 06
2
Can we get interprocedural register allocation work across module boundary?
On Tue, Jul 5, 2016 at 11:54 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: > > > On Jul 5, 2016, at 9:28 AM, vivek pandya <vivekvpandya at gmail.com> wrote: > > > > Hello Mentors, > > > > I have a very naive idea to get IPRA woking at link time and thus > extending its scope to intermodule. I seek some help if it seems to be a > feasible idea. > > > > So idea is to take advantage of LTO's capability to work with bit code > files. LTO can optimize number of bitcode files and combine them into a...
2016 Jul 12
2
IPRA, interprocedural register allocation, question
...change Foo()’s calling convention. Also, the issue of escaping-pointer-to-function is made clear by the example Of the atexit() and exit() library functions, IE even static functions can end up Being called by external functions. So exit() can never be declared “leaf”, and To get the benefit of IPRA it needs to be within the compilation unit, either By whole-program compilation or by LTO, if it is used. --Peter. From: vivek pandya [mailto:vivekvpandya at gmail.com] Sent: Friday, July 08, 2016 9:26 PM To: Lawrence, Peter <c_plawre at qca.qualcomm.com> Cc: llvm-dev <llvm-dev at...
2016 Jul 12
3
IPRA, interprocedural register allocation, question
...t functions that are “external” to the compilation unit and in my case never call back into the compilation unit, IE they are always “leaf” functions from the point of view of the compilation unit’s call-graph. Hence I would like a clang function attribute that says this function is “leaf” So that IPRA can know that none of the functions it is compiling is ever called From outside this compilation unit. And I apologize to everyone for confusingly using the term “compilation unit” When I meant “whole program”. Yes I am aware of the fact that if you change a function’s calling convention By conv...
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 were...
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 call graph. For this I changed spill callee saved regs related functions in PrologEpilogInserter pass to pass ProfileSummaryInfo object as pa...
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 a...
2016 Jul 05
2
Can we get interprocedural register allocation work across module boundary?
Hello Mentors, I have a very naive idea to get IPRA woking at link time and thus extending its scope to intermodule. I seek some help if it seems to be a feasible idea. So idea is to take advantage of LTO's capability to work with bit code files. LTO can optimize number of bitcode files and combine them into a big module. LTO then generates nat...
2016 Jun 26
2
[GSoC 2016] [Weekly Status] Interprocedural Register Allocation
...as MachineRegisterInfo::isPhysRegModified() except no check of isNoReturnDef() is required. So we proposed to add a bool argument SkipNoReturnDef with default value false to isPhysRegModified method so that with out breaking current use of isPhysRegModified we can reuse that code for the purpose of IPRA. The patch can be found here : http://reviews.llvm.org/D21395 With IPRA to improve code quality, call site with local functions are forced to have caller saved registers ( more improved heuristics will be implemented ) I have been experimenting this on my local machine and I discovered that tail c...
2016 Jul 08
2
IPRA, interprocedural register allocation, question
...read the MC dumps, every call instruction seems to have > every caller-save register flagged as “imp-def”, IE implicitly-defined by the instruction, > and hopefully what is considered a caller-save register at a call-site is defined by the callee. > And this should be the information that IPRA takes advantage of in its bottom-up analysis. The idea of IPRA is to *produce* more accurate list of clobbered register by a functions, so that at call site the caller needs to only save/restore the minimum amount of registers across the call. > > Which leads me to this question, when co...
2016 Dec 08
2
Issues with DummyCGSCCPass used for IPRA
> > Hello, > > I'm trying to enable interprocedural register allocation (IPRA). Hi Maxime, I don't understand here why you need to enable IPRA as that is already scheduled based on option -mllvm -enable-ipra. So I think easy way to make IPRA execute every time is to set default value of EnableIPRA option to true. you can find this option defined in lib/CodeGen/TargetMa...
2016 Jun 19
2
[GSoC 2016] [Weekly Status] Interprocedural Register Allocation
Dear Community, Please find summary of work done during this week as follow: Implementation: ============ During this week we have identified a bug in IPRA due to not considering RegMask of function calls in given machine function. The same bug on AArch64 has been reported by Chad Rosier and more detailed description can be found at https://llvm.org/bugs/show_bug.cgi?id=28144 . To fix this bug RegMask calculation have been modified to consider RegMask...
2016 Jul 12
2
IPRA, interprocedural register allocation, question
...pple.com] Sent: Tuesday, July 12, 2016 12:31 PM To: Lawrence, Peter <c_plawre at qca.qualcomm.com> Cc: vivek pandya <vivekvpandya at gmail.com>; llvm-dev <llvm-dev at lists.llvm.org>; llvm-dev-request at lists.llvm.org; Hal Finkel <hfinkel at anl.gov> Subject: Re: [llvm-dev] IPRA, interprocedural register allocation, question On Jul 12, 2016, at 12:20 PM, Lawrence, Peter <c_plawre at qca.qualcomm.com<mailto:c_plawre at qca.qualcomm.com>> wrote: Mehdi, I am looking for an understanding of 1) IPRA in general, 2) IPRA in LLVM. Whether I want to...
2018 May 01
0
IPRA and conditionally reserved registers
Hi Kit, I see you have been working on IPRA (https://reviews.llvm.org/D45308), and would therefore like to bring up an issue with it I am looking into on SystemZ (see https://reviews.llvm.org/D46232). I first realized that %r14, the return register, must be saved and restored with IPRA enabled, since otherwise the function can't retu...
2016 Jun 20
4
FireFox-46.0.1 build with interprocedural register allocation enabled
...> > > > I build FireFox-46.0.1 source with llvm to test interprocedural register > > allocation. > > The build was successful with out any runtime faliures, here are few > stats: > > This is very good, thanks for working on this. > > > > > Measure W/O IPRA WITH IPRA > > ======= ======== ========= > > Total Build Time 76 mins 82.3 mins 8% increment > > Octane v2.0 JS Benchmark Score (higher is better) 18675.69 19665.16 5% > > improvement > > This speedup is kind of amazing, enough to make me a little bit suspicious. >...
2016 Jun 15
2
[GSoC 2016] [Weekly Status] Interprocedural Register Allocation
...evious results as there was a major bug in RegMask calculation due to not considering RegMasks of callee in MF body while calculating register usage information, that has been fixed now ( as discussed with Matthias Braun and Mehdi Amini ) and after this bugfix I have run test-suite with and without IPRA. Yes there is runtime slow down for some test cases ranging from 1% to 64% similarly compile time slow down is ranging from 1% to 48%. The runtime performance improvement is ranging from 1% to 35% and surprisingly there is also compile time improvement in a range from 1% to 60% . I would request y...
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 not defined in current module. IPRA's scope is limited to a module so for such externally defined function it uses default calling convention but here as the function is written in assembly user ca...
2017 Jan 12
2
RFC: Dynamically Allocated "Callee Saved Registers" Lists
...aration – No implementation // Assume that the value is returned in EAX and the arguments are passed in EAX, ECX, EDX, ESI, EDI. int __regcall callee (int a, int b, int c, int d, int e); // implemented in a different module void caller() { … x = callee(1,2,3,4,5); … } What will be RegMask using IPRA register usage collector? Callee Saved Registers (from the static register mask) minus RAX. What should really be the RegMask? Callee Saved Registers (from the static register mask) minus RAX, ESI and EDI (and their sub registers). Do you think that I should fix IPRA collector? Even after fixing...