[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-11 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd8f99bb6e064: [AMDGPU] replace hostcall module flag with function attribute (authored by sameerds). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-11 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. Attributor use looks good. @arsenm will need to look at the rest. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119216/new/ https://review

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-10 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds updated this revision to Diff 407762. sameerds added a comment. use AAPointerInfo; add more tests to demonstrate the same Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119216/new/ https://reviews.llvm.org/D119216 Files: clang/lib/CodeGe

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-09 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:566 + return false; +}; + sameerds wrote: > sameerds wrote: > > jdoerfert wrote: > > > sameerds wrote: > > > > jdoerfert wrote: > > > > > sameerds wrote: > > > > > > jd

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-09 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:566 + return false; +}; + sameerds wrote: > jdoerfert wrote: > > sameerds wrote: > > > jdoerfert wrote: > > > > sameerds wrote: > > > > > jdoerfert wrote: > > > > > >

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-09 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds marked 2 inline comments as not done. sameerds added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:566 + return false; +}; + jdoerfert wrote: > sameerds wrote: > > jdoerfert wrote: > > > sameerds wrote: > > > > jdoerfe

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:566 + return false; +}; + sameerds wrote: > jdoerfert wrote: > > sameerds wrote: > > > jdoerfert wrote: > > > > jdoerfert wrote: > > > > > sameerds wrote: > > > > >

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:566 + return false; +}; + jdoerfert wrote: > sameerds wrote: > > jdoerfert wrote: > > > jdoerfert wrote: > > > > sameerds wrote: > > > > > jdoerfert wrote: > > > > >

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert requested changes to this revision. jdoerfert added a comment. This revision now requires changes to proceed. @kpyzhov Usually people don't accept without comment, especially if there is clearly ongoing discussion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:566 + return false; +}; + sameerds wrote: > jdoerfert wrote: > > jdoerfert wrote: > > > sameerds wrote: > > > > jdoerfert wrote: > > > > > You can use AAPointerInfo

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds updated this revision to Diff 406889. sameerds added a comment. added tests for i128 load. hostcall position is now independent of subtarget. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119216/new/ https://reviews.llvm.org/D119216 Files

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:198 +const auto *STI = TM.getMCSubtargetInfo(); +return llvm::AMDGPU::getHostcallImplicitArgPosition(STI); + } arsenm wrote: > sameerds wrote: > > arsenm wrote: > > > T

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:198 +const auto *STI = TM.getMCSubtargetInfo(); +return llvm::AMDGPU::getHostcallImplicitArgPosition(STI); + } arsenm wrote: > The ABI should not be a property of the

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:198 +const auto *STI = TM.getMCSubtargetInfo(); +return llvm::AMDGPU::getHostcallImplicitArgPosition(STI); + } arsenm wrote: > The ABI should not be a property of the s

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds updated this revision to Diff 406860. sameerds added a comment. further simplified the callback return value; moved hostcall info out of the subtarget Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119216/new/ https://reviews.llvm.org/D119

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:566 + return false; +}; + jdoerfert wrote: > sameerds wrote: > > jdoerfert wrote: > > > You can use AAPointerInfo for the call site return IRPosition. It will > > >

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:581-584 + if (ArgUsedToRetrieveHostcallPtr(I)) { +return false; + } + return true; I'd suggest to switch the return value of ArgUsed... so it matches t

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:521 + + while (!WorkList.empty()) { +auto UseInfo = WorkList.back(); Can you use checkForAllUses instead of creating your own worklist? Repository: rG LLVM Gith

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:198 +const auto *STI = TM.getMCSubtargetInfo(); +return llvm::AMDGPU::getHostcallImplicitArgPosition(STI); + } The ABI should not be a property of the subtarget, and th

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:589 +A.checkForAllCallLikeInstructions(CheckForHostcallAccess, *this, + UsedAssumedInformation); + jdoerfert wrote: > Always check the

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds updated this revision to Diff 406785. sameerds added a comment. eliminated NeedsHostcall by simply checking the return value of the walk over all calls Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119216/new/ https://reviews.llvm.org/D11

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:566 + return false; +}; + jdoerfert wrote: > You can use AAPointerInfo for the call site return IRPosition. It will > (through the iterations) gather all accesses an

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-08 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:566 + return false; +}; + You can use AAPointerInfo for the call site return IRPosition. It will (through the iterations) gather all accesses and put them into "bin

[PATCH] D119216: [AMDGPU] replace hostcall module flag with function attribute

2022-02-07 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds created this revision. Herald added subscribers: sdasgup3, wenzhicui, wrengr, Chia-hungDuan, foad, dcaballe, cota, teijeong, rdzhabarov, tatianashp, okura, jdoerfert, msifontes, jurahul, kuter, Kayjukh, grosul1, uenoku, Joonsoo, kerbowa, liufengdb, aartbik, mgester, arpith-jacob, csigg,