search for: promotememorytoregister_8cpp_source

Displaying 4 results from an estimated 4 matches for "promotememorytoregister_8cpp_source".

2015 Jul 17
2
[LLVMdev] Suspicious behavior of mem2reg (promoteSingleBlockAlloca)
...as I understand, the mem2reg pass essentially uses the SSA construction algorithm to promote allocas into registers, but there are shortcuts for some special cases. One of the special cases is when an alloca is "only used within a single basic block." ( http://llvm.org/docs/doxygen/html/PromoteMemoryToRegister_8cpp_source.html#l00435 ) But currently, I cannot understand the algorithm for this special case. In this case, the mem2reg pass "perform[s] a single linear pass over the basic block using the Alloca." In other words, a load is replaced by a read from a register corresponding to the nearest preced...
2020 Sep 14
3
Mem2reg: load before single store
...eg pass. When optimizing single stores, undefined value is placed before any load preceding the store (based on basicblock's ordering and simple dominator analysis, if I remember correctly). This is the line that is responsible for the behavior: (LLVM9 does the same) https://llvm.org/doxygen/PromoteMemoryToRegister_8cpp_source.html#l00629 A problem arises, and I am not sure if it is really a problem or just weird C-compliant behavior. int a; // or, equally, int a=0; int main(){ int b; if (b) // (*) b=a; if (b) printf("This will be called"); } The first load of variable b, before the single store (t...
2016 Aug 25
2
CFLAA
I did gathered aggregate statistics reported by “-stats” over the ~400 test files. The following table summarizes the impact. The first column is the sum where the new analysis is enabled, the second column is the delta from baseline where no CFL alias analysis is performed. I am not experienced enough to know which of these are “good” or “bad” indicators. —david 72,250 685 SLP
2016 Aug 25
4
CFLAA
...32 ...) On Thu, Aug 25, 2016 at 9:54 AM, Daniel Berlin <dberlin at dberlin.org> wrote: > Okay, dumb question: > Are you really getting negative numbers in the second column? > > 526,766 -136 mem2reg # PHI nodes inserted > > http://llvm.org/docs/doxygen/html/PromoteMemoryToRegister_8cpp_source.html > (Search for NumPHIInsert). > > I don't see how it could be negative unless this wrapped around? > > > On Thu, Aug 25, 2016 at 9:49 AM, David Callahan <dcallahan at fb.com> wrote: > >> I did gathered aggregate statistics reported by “-stats” over the ~400...