[llvm-dev] My Pass error

Manideepa Mukherjee via llvm-dev llvm-dev at lists.llvm.org
Sat Mar 19 09:29:24 PDT 2016


Hi,

I am trying to integrate my pass with the current llvm version 3.8.0. My
pass was running fine with llvm 3.4. I am novice in CMake. I am getting a
huge error list at the time of make.
My CMakeLists file:

set( LLVM_DIR "${LLVM_ROOT}/share/llvm/cmake" )
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LLVM_DIR} )
find_package(LLVM)
include(AddLLVM)
add_definitions(${LLVM_DEFINITIONS})
include_directories(${LLVM_INCLUDE_DIRS})
link_directories(${LLVM_LIBRARY_DIRS})

add_llvm_loadable_module(LoopGraphAnalysisPass_0
  LoopGraphAnalysisPass.cpp
  )
My errors are attached in a separate file

Deep
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160319/6a69e91b/attachment.html>
-------------- next part --------------
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/lib/Transforms/LoopGraphAnalysisPass_0/LoopGraphAnalysisPass.cpp: In member function ‘virtual bool {anonymous}::LoopGraphAnalysisPass_0::runOnFunction(llvm::Function&)’:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/lib/Transforms/LoopGraphAnalysisPass_0/LoopGraphAnalysisPass.cpp:102:34: error: base operand of ‘->’ has non-pointer type ‘llvm::LoopInfo’
    for (LoopInfo::iterator I = LI->begin(), E = LI->end(); I != E; ++I) //gives the collection of Loops
                                  ^
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/lib/Transforms/LoopGraphAnalysisPass_0/LoopGraphAnalysisPass.cpp:102:65: error: ‘E’ was not declared in this scope
    for (LoopInfo::iterator I = LI->begin(), E = LI->end(); I != E; ++I) //gives the collection of Loops
                                                                 ^
In file included from /home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/Pass.h:382:0,
                 from /home/manideepa/Desktop/research/compiler/llvm3.8/llvm/lib/Transforms/LoopGraphAnalysisPass_0/LoopGraphAnalysisPass.cpp:1:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h: In instantiation of ‘llvm::AnalysisUsage& llvm::AnalysisUsage::addRequired() [with PassClass = llvm::PostDominatorTree]’:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/lib/Transforms/LoopGraphAnalysisPass_0/LoopGraphAnalysisPass.cpp:81:38:   required from here
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:61:39: error: ‘ID’ is not a member of ‘llvm::PostDominatorTree’
     return addRequiredID(PassClass::ID);
                                       ^
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h: In instantiation of ‘llvm::AnalysisUsage& llvm::AnalysisUsage::addRequired() [with PassClass = llvm::ScalarEvolution]’:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/lib/Transforms/LoopGraphAnalysisPass_0/LoopGraphAnalysisPass.cpp:86:36:   required from here
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:61:39: error: ‘ID’ is not a member of ‘llvm::ScalarEvolution’
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h: In instantiation of ‘llvm::AnalysisUsage& llvm::AnalysisUsage::addPreserved() [with PassClass = llvm::ScalarEvolution]’:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/lib/Transforms/LoopGraphAnalysisPass_0/LoopGraphAnalysisPass.cpp:87:37:   required from here
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:84:25: error: ‘ID’ is not a member of ‘llvm::ScalarEvolution’
     Preserved.push_back(&PassClass::ID);
                         ^
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h: In instantiation of ‘llvm::AnalysisUsage& llvm::AnalysisUsage::addRequired() [with PassClass = llvm::AAResults]’:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/lib/Transforms/LoopGraphAnalysisPass_0/LoopGraphAnalysisPass.cpp:88:34:   required from here
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:61:39: error: ‘ID’ is not a member of ‘llvm::AAResults’
     return addRequiredID(PassClass::ID);
                                       ^
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h: In instantiation of ‘llvm::AnalysisUsage& llvm::AnalysisUsage::addPreserved() [with PassClass = llvm::AAResults]’:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/lib/Transforms/LoopGraphAnalysisPass_0/LoopGraphAnalysisPass.cpp:89:35:   required from here
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:84:25: error: ‘ID’ is not a member of ‘llvm::AAResults’
     Preserved.push_back(&PassClass::ID);
                         ^
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h: In instantiation of ‘llvm::AnalysisUsage& llvm::AnalysisUsage::addRequired() [with PassClass = llvm::MemoryDependenceAnalysis]’:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/lib/Transforms/LoopGraphAnalysisPass_0/LoopGraphAnalysisPass.cpp:90:45:   required from here
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:61:39: error: no matching function for call to ‘llvm::AnalysisUsage::addRequiredID(void* (&)())’
     return addRequiredID(PassClass::ID);
                                       ^
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:61:39: note: candidates are:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:57:18: note: llvm::AnalysisUsage& llvm::AnalysisUsage::addRequiredID(const void*) <near match>
   AnalysisUsage &addRequiredID(const void *ID);
                  ^
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:57:18: note:   no known conversion for argument 1 from ‘void*()’ to ‘const void*’
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:58:18: note: llvm::AnalysisUsage& llvm::AnalysisUsage::addRequiredID(char&)
   AnalysisUsage &addRequiredID(char &ID);
                  ^
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:58:18: note:   no known conversion for argument 1 from ‘void*()’ to ‘char&’
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h: In instantiation of ‘llvm::AnalysisUsage& llvm::AnalysisUsage::addPreserved() [with PassClass = llvm::MemoryDependenceAnalysis]’:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/lib/Transforms/LoopGraphAnalysisPass_0/LoopGraphAnalysisPass.cpp:91:46:   required from here
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:84:5: error: no matching function for call to ‘llvm::SmallVector<const void*, 2u>::push_back(void* (*)())’
     Preserved.push_back(&PassClass::ID);
     ^
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:84:5: note: candidate is:
In file included from /home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/Support/Allocator.h:24:0,
                 from /home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/ADT/StringMap.h:18,
                 from /home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/Support/Host.h:17,
                 from /home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/ADT/Hashing.h:49,
                 from /home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/ADT/ArrayRef.h:13,
                 from /home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/ADT/DenseMapInfo.h:17,
                 from /home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/ADT/DenseMap.h:17,
                 from /home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassRegistry.h:20,
                 from /home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassSupport.h:27,
                 from /home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/Pass.h:381,
                 from /home/manideepa/Desktop/research/compiler/llvm3.8/llvm/lib/Transforms/LoopGraphAnalysisPass_0/LoopGraphAnalysisPass.cpp:1:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/ADT/SmallVector.h:337:8: note: void llvm::SmallVectorTemplateBase<T, true>::push_back(const T&) [with T = const void*] <near match>
   void push_back(const T &Elt) {
        ^
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/ADT/SmallVector.h:337:8: note:   no known conversion for argument 1 from ‘void* (*)()’ to ‘const void* const&’
In file included from /home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/Pass.h:382:0,
                 from /home/manideepa/Desktop/research/compiler/llvm3.8/llvm/lib/Transforms/LoopGraphAnalysisPass_0/LoopGraphAnalysisPass.cpp:1:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h: In instantiation of ‘AnalysisType& llvm::Pass::getAnalysis() const [with AnalysisType = llvm::PostDominatorTree]’:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/lib/Transforms/LoopGraphAnalysisPass_0/LoopGraphAnalysisPass.cpp:289:62:   required from here
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:223:38: error: ‘ID’ is not a member of ‘llvm::PostDominatorTree’
   return getAnalysisID<AnalysisType>(&AnalysisType::ID);
                                      ^
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h: In member function ‘llvm::AnalysisUsage& llvm::AnalysisUsage::addRequired() [with PassClass = llvm::PostDominatorTree]’:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:62:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h: In member function ‘llvm::AnalysisUsage& llvm::AnalysisUsage::addRequired() [with PassClass = llvm::ScalarEvolution]’:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:62:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h: In member function ‘llvm::AnalysisUsage& llvm::AnalysisUsage::addRequired() [with PassClass = llvm::AAResults]’:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:62:3: warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h: In member function ‘llvm::AnalysisUsage& llvm::AnalysisUsage::addRequired() [with PassClass = llvm::MemoryDependenceAnalysis]’:
/home/manideepa/Desktop/research/compiler/llvm3.8/llvm/include/llvm/PassAnalysisSupport.h:62:3: warning: control reaches end of non-void function [-Wreturn-type]
   }



More information about the llvm-dev mailing list