@@ -685,7 +685,7 @@ bool DXILResourceTypeMap::invalidate(Module &M, const PreservedAnalyses &PA,
685685
686686// ===----------------------------------------------------------------------===//
687687
688- void DXILBindingMap ::populate (Module &M, DXILResourceTypeMap &DRTM) {
688+ void DXILResourceMap ::populate (Module &M, DXILResourceTypeMap &DRTM) {
689689 SmallVector<std::tuple<CallInst *, ResourceInfo, ResourceTypeInfo>> CIToInfos;
690690
691691 for (Function &F : M.functions ()) {
@@ -764,8 +764,8 @@ void DXILBindingMap::populate(Module &M, DXILResourceTypeMap &DRTM) {
764764 }
765765}
766766
767- void DXILBindingMap ::print (raw_ostream &OS, DXILResourceTypeMap &DRTM,
768- const DataLayout &DL) const {
767+ void DXILResourceMap ::print (raw_ostream &OS, DXILResourceTypeMap &DRTM,
768+ const DataLayout &DL) const {
769769 for (unsigned I = 0 , E = Infos.size (); I != E; ++I) {
770770 OS << " Binding " << I << " :\n " ;
771771 const dxil::ResourceInfo &RI = Infos[I];
@@ -781,7 +781,7 @@ void DXILBindingMap::print(raw_ostream &OS, DXILResourceTypeMap &DRTM,
781781}
782782
783783SmallVector<dxil::ResourceInfo>
784- DXILBindingMap ::findByUse (const Value *Key) const {
784+ DXILResourceMap ::findByUse (const Value *Key) const {
785785 if (const PHINode *Phi = dyn_cast<PHINode>(Key)) {
786786 SmallVector<dxil::ResourceInfo> Children;
787787 for (const Value *V : Phi->operands ()) {
@@ -824,19 +824,20 @@ DXILBindingMap::findByUse(const Value *Key) const {
824824AnalysisKey DXILResourceTypeAnalysis::Key;
825825AnalysisKey DXILResourceAnalysis::Key;
826826
827- DXILBindingMap DXILResourceAnalysis::run (Module &M, ModuleAnalysisManager &AM) {
828- DXILBindingMap Data;
827+ DXILResourceMap DXILResourceAnalysis::run (Module &M,
828+ ModuleAnalysisManager &AM) {
829+ DXILResourceMap Data;
829830 DXILResourceTypeMap &DRTM = AM.getResult <DXILResourceTypeAnalysis>(M);
830831 Data.populate (M, DRTM);
831832 return Data;
832833}
833834
834835PreservedAnalyses DXILResourcePrinterPass::run (Module &M,
835836 ModuleAnalysisManager &AM) {
836- DXILBindingMap &DBM = AM.getResult <DXILResourceAnalysis>(M);
837+ DXILResourceMap &DRM = AM.getResult <DXILResourceAnalysis>(M);
837838 DXILResourceTypeMap &DRTM = AM.getResult <DXILResourceTypeAnalysis>(M);
838839
839- DBM .print (OS, DRTM, M.getDataLayout ());
840+ DRM .print (OS, DRTM, M.getDataLayout ());
840841 return PreservedAnalyses::all ();
841842}
842843
@@ -854,32 +855,29 @@ ModulePass *llvm::createDXILResourceTypeWrapperPassPass() {
854855 return new DXILResourceTypeWrapperPass ();
855856}
856857
857- DXILResourceBindingWrapperPass::DXILResourceBindingWrapperPass ()
858- : ModulePass(ID) {
859- initializeDXILResourceBindingWrapperPassPass (
860- *PassRegistry::getPassRegistry ());
858+ DXILResourceWrapperPass::DXILResourceWrapperPass () : ModulePass(ID) {
859+ initializeDXILResourceWrapperPassPass (*PassRegistry::getPassRegistry ());
861860}
862861
863- DXILResourceBindingWrapperPass ::~DXILResourceBindingWrapperPass () = default ;
862+ DXILResourceWrapperPass ::~DXILResourceWrapperPass () = default ;
864863
865- void DXILResourceBindingWrapperPass ::getAnalysisUsage (AnalysisUsage &AU) const {
864+ void DXILResourceWrapperPass ::getAnalysisUsage (AnalysisUsage &AU) const {
866865 AU.addRequiredTransitive <DXILResourceTypeWrapperPass>();
867866 AU.setPreservesAll ();
868867}
869868
870- bool DXILResourceBindingWrapperPass ::runOnModule (Module &M) {
871- Map.reset (new DXILBindingMap ());
869+ bool DXILResourceWrapperPass ::runOnModule (Module &M) {
870+ Map.reset (new DXILResourceMap ());
872871
873872 DRTM = &getAnalysis<DXILResourceTypeWrapperPass>().getResourceTypeMap ();
874873 Map->populate (M, *DRTM);
875874
876875 return false ;
877876}
878877
879- void DXILResourceBindingWrapperPass ::releaseMemory () { Map.reset (); }
878+ void DXILResourceWrapperPass ::releaseMemory () { Map.reset (); }
880879
881- void DXILResourceBindingWrapperPass::print (raw_ostream &OS,
882- const Module *M) const {
880+ void DXILResourceWrapperPass::print (raw_ostream &OS, const Module *M) const {
883881 if (!Map) {
884882 OS << " No resource map has been built!\n " ;
885883 return ;
@@ -889,13 +887,13 @@ void DXILResourceBindingWrapperPass::print(raw_ostream &OS,
889887
890888#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
891889LLVM_DUMP_METHOD
892- void DXILResourceBindingWrapperPass ::dump () const { print (dbgs (), nullptr ); }
890+ void DXILResourceWrapperPass ::dump () const { print (dbgs (), nullptr ); }
893891#endif
894892
895- INITIALIZE_PASS (DXILResourceBindingWrapperPass , " dxil-resource" ,
893+ INITIALIZE_PASS (DXILResourceWrapperPass , " dxil-resource" ,
896894 " DXIL Resource Binding Analysis" , false , true )
897- char DXILResourceBindingWrapperPass ::ID = 0;
895+ char DXILResourceWrapperPass ::ID = 0;
898896
899- ModulePass *llvm::createDXILResourceBindingWrapperPassPass () {
900- return new DXILResourceBindingWrapperPass ();
897+ ModulePass *llvm::createDXILResourceWrapperPassPass () {
898+ return new DXILResourceWrapperPass ();
901899}
0 commit comments