search for: bolvansky

Displaying 20 results from an estimated 25 matches for "bolvansky".

Did you mean: bolvanský
2018 Apr 20
2
Missed strlen optimizations
Use *last = nullptr; for (Use &U : Src->uses()) last = &U; last->getUser()->dump(); Or any better solution? 2018-04-20 19:19 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > Is: > > > 2018-04-20 18:07 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > >> Hello, >> >> Code: https://godbolt.org/g/EG4Wi6 >> >> unsigned fff3(void) { >> char buf[10] = ""; >> return...
2018 Apr 20
0
Missed strlen optimizations
Maybe nicer.. auto i = Src->uses().begin(); std::advance(i, Src->getNumUses() - 1); i->getUser()->dump(); 2018-04-20 19:19 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > Use *last = nullptr; > for (Use &U : Src->uses()) > last = &U; > last->getUser()->dump(); > > > Or any better solution? > > 2018-04-20 19:19 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > >> Is:...
2018 May 22
0
DSE: Remove useless stores between malloc & memset
...); CI->eraseFromParent(); return true; } return false; } ------------------------------------------------------ That IR is still wrongly transformed with this code to ret i32 0 (but there is write between calloc and strlen). Any suggestions? 2018-05-23 0:49 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > It works with > > MemoryLocation MemoryLocation::get(const CallInst *CI) { > AAMDNodes AATags; > CI->getAAMetadata(AATags); > const auto &DL = CI->getModule()->getDataLayout(); > > return MemoryLocation(CI, DL.getTypeStoreSize(CI->getType...
2018 May 22
2
DSE: Remove useless stores between malloc & memset
...> return false; > } > > > ------------------------------------------------------ > That IR is still wrongly transformed with this code to ret i32 0 (but > there is write between calloc and strlen). Any suggestions? > > 2018-05-23 0:49 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com > <mailto:david.bolvansky at gmail.com>>: > > It works with > > MemoryLocation MemoryLocation::get(const CallInst *CI) { > AAMDNodes AATags; > CI->getAAMetadata(AATags); > const auto &DL = CI->getModule()->getDataLayout...
2018 May 22
2
DSE: Remove useless stores between malloc & memset
...n MemoryLocation::get(const CallInst *CI) { AAMDNodes AATags; CI->getAAMetadata(AATags); const auto &DL = CI->getModule()->getDataLayout(); return MemoryLocation(CI, DL.getTypeStoreSize(CI->getType()), AATags); } Is it fine? :) 2018-05-22 23:56 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > Looks like there are many overloads for "get". http://llvm.org/ > doxygen/MemoryLocation_8cpp_source.html > > But nothing for CallInst. Any suggestions how to do a proper one? I will > look at it too. > > 2018-05-22 23:34 GMT+02:00 Dávid Bolvanský...
2018 Apr 20
2
Missed strlen optimizations
Hello, Code: https://godbolt.org/g/EG4Wi6 unsigned fff3(void) { char buf[10] = ""; return strlen(buf); } Since we are memset-ing before strlen call, we could replace strlen with just 0. Has LLVM any API to get "last instruction before strlen" which modifies strlen argument "buf"? So we can check "yes, it is memset there, replace strlen with zero"
2018 Apr 20
0
Missed strlen optimizations
Is: 2018-04-20 18:07 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > Hello, > > Code: https://godbolt.org/g/EG4Wi6 > > unsigned fff3(void) { > char buf[10] = ""; > return strlen(buf); > } > > Since we are memset-ing before strlen call, we could replace strlen with > just 0. > > Has LLVM an...
2018 May 22
0
DSE: Remove useless stores between malloc & memset
...} > return false; > } > > > ------------------------------------------------------ > That IR is still wrongly transformed with this code to ret i32 0 (but > there is write between calloc and strlen). Any suggestions? > > 2018-05-23 0:49 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > >> It works with >> >> MemoryLocation MemoryLocation::get(const CallInst *CI) { >> AAMDNodes AATags; >> CI->getAAMetadata(AATags); >> const auto &DL = CI->getModule()->getDataLayout(); >> >> return MemoryLocation(CI...
2018 May 09
0
Ignored branch predictor hints
I did https://bugs.llvm.org/show_bug.cgi?id=37368 2018-05-09 20:33 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > I did > > https://bugs.llvm.org/show_bug.cgi?id=37368 > > 2018-05-09 20:29 GMT+02:00 David Zarzycki <dave at znu.io>: > >> I’d wager that the if-else chain is being converted to a "switch >> statement” during an optimization pass and the...
2018 May 09
2
Ignored branch predictor hints
...t;; } Dave > On May 9, 2018, at 2:33 PM, Dávid Bolvanský via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > I did > https://bugs.llvm.org/show_bug.cgi?id=37368 <https://bugs.llvm.org/show_bug.cgi?id=37368> > > 2018-05-09 20:33 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com <mailto:david.bolvansky at gmail.com>>: > I did > > https://bugs.llvm.org/show_bug.cgi?id=37368 <https://bugs.llvm.org/show_bug.cgi?id=37368> > > 2018-05-09 20:29 GMT+02:00 David Zarzycki <dave at znu.io <mailto:dave at znu.io>>: > I’d wa...
2018 May 09
3
Ignored branch predictor hints
Hello, #define likely(x) __builtin_expect((x),1) // switch like char * b(int e) { if (likely(e == 0)) return "0"; else if (e == 1) return "1"; else return "f"; } GCC correctly prefers the first case: b(int): mov eax, OFFSET FLAT:.LC0 test edi, edi jne .L7 ret But Clang seems to ignore _builtin_expect hints in this case.
2018 May 22
0
DSE: Remove useless stores between malloc & memset
Looks like there are many overloads for "get". http://llvm.org/doxygen/MemoryLocation_8cpp_source.html But nothing for CallInst. Any suggestions how to do a proper one? I will look at it too. 2018-05-22 23:34 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > Full stack trace: > > opt: /home/xbolva00/LLVM/llvm/include/llvm/ADT/Optional.h:176: T* > llvm::Optional<T>::getPointer() [with T = llvm::MemoryLocation]: > Assertion `Storage.hasVal' failed. > Stack dump: > 0. Program arguments: opt aaa.ll -dse -...
2018 May 22
2
DSE: Remove useless stores between malloc & memset
...uess what's happening otherwise.) > > -Eli > > > On 5/22/2018 2:16 PM, Dávid Bolvanský wrote: > > * if (isStringFromCalloc(Dst, TLI)) should be if > (!isStringFromCalloc(Dst, TLI)) > but still asserting... > > 2018-05-22 23:06 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > >> Can you help a bit? >> >> I try to work with DSE but I got the following assert: >> opt: /home/xbolva00/LLVM/llvm/include/llvm/ADT/Optional.h:176: T* >> llvm::Optional<T>::getPointer() [with T = llvm::MemoryLocation]: >> Assertion...
2018 Sep 16
2
[cfe-dev] New warnings when building trunk with GCC 9
...; wrote: > Fair point made on that thread - that this is a DR, so technically the > std::move is pessimizing even in C++11 mode. Richard: Any thoughts on > generalizing the warning to cover these cases even in C++11 mode? > > On Sat, Sep 15, 2018 at 2:37 AM Dávid Bolvanský <david.bolvansky at gmail.com> > wrote: > >> There is a new discussion related to -Wredundant-move warning on GCC >> bugzilla. >> >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87300 >> >> pi 14. 9. 2018 o 9:53 David Blaikie <dblaikie at gmail.com> napísal(a): &gt...
2018 May 22
2
DSE: Remove useless stores between malloc & memset
* if (isStringFromCalloc(Dst, TLI)) should be if (!isStringFromCalloc(Dst, TLI)) but still asserting... 2018-05-22 23:06 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > Can you help a bit? > > I try to work with DSE but I got the following assert: > opt: /home/xbolva00/LLVM/llvm/include/llvm/ADT/Optional.h:176: T* > llvm::Optional<T>::getPointer() [with T = llvm::MemoryLocation]: > Assertion `Storage.hasVal' failed....
2018 Sep 15
2
New warnings when building trunk with GCC 9
...t.com> > wrote: > >> On 13/09/2018 18:22, David Blaikie via llvm-dev wrote: >> > On Thu, Sep 13, 2018 at 12:13 AM Dávid Bolvanský via llvm-dev >> > <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: >> > >> /home/davidbolvansky/trunk/llvm/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp:79:40: >> >> > required from here >> > >> /home/davidbolvansky/trunk/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:314:29: >> > warning: redundant move in return st...
2018 May 22
0
DSE: Remove useless stores between malloc & memset
...trace; it's hard to guess what's happening otherwise.) -Eli On 5/22/2018 2:16 PM, Dávid Bolvanský wrote: > * if (isStringFromCalloc(Dst, TLI)) should be if > (!isStringFromCalloc(Dst, TLI)) > but still asserting... > > 2018-05-22 23:06 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com > <mailto:david.bolvansky at gmail.com>>: > > Can you help a bit? > > I try to work with DSE but I got the following assert: > opt: /home/xbolva00/LLVM/llvm/include/llvm/ADT/Optional.h:176: T* > llvm::Optional<T>::getPointer() [with...
2018 Mar 09
0
Externally loadable Alias Analysis pass
...static char ID; // Pass identification, replacement for typeid Hello() : FunctionPass(ID) {} bool runOnFunction(Function &F) override { errs().write_escaped(F.getName()) << '\n'; return false; } }; } 2018-03-09 14:44 GMT+01:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > I am currectly experimenting with -Xclang option.. I have a simple pass > (to just print function names). > > I ran: clang -Xclang -load -Xclang LLVMHello.so t.c > > but nothing was printed, no output from the pass. > > when I run: opt -load LLVMHello.so...
2018 May 09
0
Ignored branch predictor hints
...gt; else return "f"; > } > > Dave > > On May 9, 2018, at 2:33 PM, Dávid Bolvanský via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > I did > https://bugs.llvm.org/show_bug.cgi?id=37368 > > 2018-05-09 20:33 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > >> I did >> >> https://bugs.llvm.org/show_bug.cgi?id=37368 >> >> 2018-05-09 20:29 GMT+02:00 David Zarzycki <dave at znu.io>: >> >>> I’d wager that the if-else chain is being converted to a "switch >>> statement”...
2018 Sep 25
3
[cfe-dev] New warnings when building trunk with GCC 9
...- that this is a DR, so technically the >>> std::move is pessimizing even in C++11 mode. Richard: Any thoughts on >>> generalizing the warning to cover these cases even in C++11 mode? >>> >>> On Sat, Sep 15, 2018 at 2:37 AM Dávid Bolvanský < >>> david.bolvansky at gmail.com> wrote: >>> >>>> There is a new discussion related to -Wredundant-move warning on GCC >>>> bugzilla. >>>> >>>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87300 >>>> >>>> pi 14. 9. 2018 o 9:53 David Bl...