[llvm-commits] [llvm] r158096 - in /llvm/trunk: include/llvm/Analysis/ lib/Analysis/ lib/CodeGen/ lib/ExecutionEngine/MCJIT/ lib/Target/CellSPU/ lib/Target/NVPTX/ lib/Target/Sparc/ lib/Target/XCore/ tools/llvm-prof/ unittests/Support/ utils/Table
Craig Topper
craig.topper at gmail.com
Wed Jun 6 23:38:16 PDT 2012
I think there are still some that only show in release builds. For instance
lib/CodeGen/MachineScheduler.cpp:356:12: error: private field
'NumInstrsScheduled' is not used [-Werror,-Wunused-private-field]
unsigned NumInstrsScheduled;
Its only used by some NDEBUG code.
Also in lib/ExecutionEngine/JIT/JITEmitter.cpp. TheJIT is only used in
asserts. I'm concerned that this implies that the MutexGuards here are only
being used in debug builds and not release builds.
FunctionToLazyStubMapTy& getFunctionToLazyStubMap(
const MutexGuard& locked) {
assert(locked.holds(TheJIT->lock));
return FunctionToLazyStubMap;
}
GlobalToIndirectSymMapTy& getGlobalToIndirectSymMap(const MutexGuard&
lck) {
assert(lck.holds(TheJIT->lock));
return GlobalToIndirectSymMap;
}
std::pair<void *, Function *> LookupFunctionFromCallSite(
const MutexGuard &locked, void *CallSite) const {
assert(locked.holds(TheJIT->lock));
// The address given to us for the stub may not be exactly right, it
// might be a little bit after the stub. As such, use upper_bound to
// find it.
CallSiteToFunctionMapTy::const_iterator I =
CallSiteToFunctionMap.upper_bound(CallSite);
assert(I != CallSiteToFunctionMap.begin() &&
"This is not a known call site!");
--I;
return *I;
}
void AddCallSite(const MutexGuard &locked, void *CallSite, Function *F)
{
assert(locked.holds(TheJIT->lock));
bool Inserted = CallSiteToFunctionMap.insert(
std::make_pair(CallSite, F)).second;
(void)Inserted;
assert(Inserted && "Pair was already in CallSiteToFunctionMap");
FunctionToCallSitesMap[F].insert(CallSite);
}
On Wed, Jun 6, 2012 at 12:47 PM, Benjamin Kramer
<benny.kra at googlemail.com>wrote:
> Author: d0k
> Date: Wed Jun 6 14:47:08 2012
> New Revision: 158096
>
> URL: http://llvm.org/viewvc/llvm-project?rev=158096&view=rev
> Log:
> Round 2 of dead private variable removal.
>
> LLVM is now -Wunused-private-field clean except for
> - lib/MC/MCDisassembler/Disassembler.h. Not sure why it keeps all those
> unaccessible fields.
> - gtest.
>
> Modified:
> llvm/trunk/include/llvm/Analysis/ProfileInfoLoader.h
> llvm/trunk/lib/Analysis/ProfileInfoLoader.cpp
> llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp
> llvm/trunk/lib/CodeGen/InlineSpiller.cpp
> llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
> llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp
> llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h
> llvm/trunk/lib/Target/CellSPU/SPUHazardRecognizers.cpp
> llvm/trunk/lib/Target/CellSPU/SPUHazardRecognizers.h
> llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h
> llvm/trunk/lib/Target/NVPTX/NVPTXRegisterInfo.cpp
> llvm/trunk/lib/Target/NVPTX/NVPTXRegisterInfo.h
> llvm/trunk/lib/Target/Sparc/SparcFrameLowering.h
> llvm/trunk/lib/Target/XCore/XCoreFrameLowering.cpp
> llvm/trunk/lib/Target/XCore/XCoreFrameLowering.h
> llvm/trunk/tools/llvm-prof/llvm-prof.cpp
> llvm/trunk/unittests/Support/TypeBuilderTest.cpp
> llvm/trunk/utils/TableGen/DAGISelEmitter.h
>
> Modified: llvm/trunk/include/llvm/Analysis/ProfileInfoLoader.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ProfileInfoLoader.h?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/Analysis/ProfileInfoLoader.h (original)
> +++ llvm/trunk/include/llvm/Analysis/ProfileInfoLoader.h Wed Jun 6
> 14:47:08 2012
> @@ -28,7 +28,6 @@
>
> class ProfileInfoLoader {
> const std::string &Filename;
> - Module &M;
> std::vector<std::string> CommandLines;
> std::vector<unsigned> FunctionCounts;
> std::vector<unsigned> BlockCounts;
> @@ -39,8 +38,7 @@
> public:
> // ProfileInfoLoader ctor - Read the specified profiling data file,
> exiting
> // the program if the file is invalid or broken.
> - ProfileInfoLoader(const char *ToolName, const std::string &Filename,
> - Module &M);
> + ProfileInfoLoader(const char *ToolName, const std::string &Filename);
>
> static const unsigned Uncounted;
>
>
> Modified: llvm/trunk/lib/Analysis/ProfileInfoLoader.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileInfoLoader.cpp?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Analysis/ProfileInfoLoader.cpp (original)
> +++ llvm/trunk/lib/Analysis/ProfileInfoLoader.cpp Wed Jun 6 14:47:08 2012
> @@ -83,10 +83,8 @@
> // program if the file is invalid or broken.
> //
> ProfileInfoLoader::ProfileInfoLoader(const char *ToolName,
> - const std::string &Filename,
> - Module &TheModule) :
> - Filename(Filename),
> - M(TheModule), Warned(false) {
> + const std::string &Filename)
> + : Filename(Filename), Warned(false) {
> FILE *F = fopen(Filename.c_str(), "rb");
> if (F == 0) {
> errs() << ToolName << ": Error opening '" << Filename << "': ";
>
> Modified: llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp (original)
> +++ llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp Wed Jun 6 14:47:08
> 2012
> @@ -152,7 +152,7 @@
> }
>
> bool LoaderPass::runOnModule(Module &M) {
> - ProfileInfoLoader PIL("profile-loader", Filename, M);
> + ProfileInfoLoader PIL("profile-loader", Filename);
>
> EdgeInformation.clear();
> std::vector<unsigned> Counters = PIL.getRawEdgeCounts();
>
> Modified: llvm/trunk/lib/CodeGen/InlineSpiller.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/InlineSpiller.cpp?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/InlineSpiller.cpp (original)
> +++ llvm/trunk/lib/CodeGen/InlineSpiller.cpp Wed Jun 6 14:47:08 2012
> @@ -52,7 +52,6 @@
>
> namespace {
> class InlineSpiller : public Spiller {
> - MachineFunctionPass &Pass;
> MachineFunction &MF;
> LiveIntervals &LIS;
> LiveStacks &LSS;
> @@ -137,8 +136,7 @@
> InlineSpiller(MachineFunctionPass &pass,
> MachineFunction &mf,
> VirtRegMap &vrm)
> - : Pass(pass),
> - MF(mf),
> + : MF(mf),
> LIS(pass.getAnalysis<LiveIntervals>()),
> LSS(pass.getAnalysis<LiveStacks>()),
> AA(&pass.getAnalysis<AliasAnalysis>()),
>
> Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original)
> +++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Wed Jun 6 14:47:08 2012
> @@ -73,7 +73,6 @@
>
> // analyses
> SlotIndexes *Indexes;
> - LiveStacks *LS;
> MachineDominatorTree *DomTree;
> MachineLoopInfo *Loops;
> EdgeBundles *Bundles;
>
> Modified: llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp (original)
> +++ llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp Wed Jun 6 14:47:08 2012
> @@ -45,7 +45,7 @@
>
> // If the target supports JIT code generation, create the JIT.
> if (TargetJITInfo *TJ = TM->getJITInfo())
> - return new MCJIT(M, TM, *TJ, new MCJITMemoryManager(JMM, M),
> GVsWithCode);
> + return new MCJIT(M, TM, *TJ, new MCJITMemoryManager(JMM),
> GVsWithCode);
>
> if (ErrorStr)
> *ErrorStr = "target does not support JIT code generation";
>
> Modified: llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h (original)
> +++ llvm/trunk/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h Wed Jun 6
> 14:47:08 2012
> @@ -22,15 +22,11 @@
> // matching LLVM IR counterparts in the module(s) being compiled.
> class MCJITMemoryManager : public RTDyldMemoryManager {
> virtual void anchor();
> - JITMemoryManager *JMM;
> + OwningPtr<JITMemoryManager> JMM;
>
> - // FIXME: Multiple modules.
> - Module *M;
> public:
> - MCJITMemoryManager(JITMemoryManager *jmm, Module *m) :
> - JMM(jmm?jmm:JITMemoryManager::CreateDefaultMemManager()), M(m) {}
> - // We own the JMM, so make sure to delete it.
> - ~MCJITMemoryManager() { delete JMM; }
> + MCJITMemoryManager(JITMemoryManager *jmm) :
> + JMM(jmm?jmm:JITMemoryManager::CreateDefaultMemManager()) {}
>
> uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
> unsigned SectionID) {
>
> Modified: llvm/trunk/lib/Target/CellSPU/SPUHazardRecognizers.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUHazardRecognizers.cpp?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/CellSPU/SPUHazardRecognizers.cpp (original)
> +++ llvm/trunk/lib/Target/CellSPU/SPUHazardRecognizers.cpp Wed Jun 6
> 14:47:08 2012
> @@ -30,12 +30,6 @@
> // very little right now.
>
> //===----------------------------------------------------------------------===//
>
> -SPUHazardRecognizer::SPUHazardRecognizer(const TargetInstrInfo &tii) :
> - TII(tii),
> - EvenOdd(0)
> -{
> -}
> -
> /// Return the pipeline hazard type encountered or generated by this
> /// instruction. Currently returns NoHazard.
> ///
>
> Modified: llvm/trunk/lib/Target/CellSPU/SPUHazardRecognizers.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUHazardRecognizers.h?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/CellSPU/SPUHazardRecognizers.h (original)
> +++ llvm/trunk/lib/Target/CellSPU/SPUHazardRecognizers.h Wed Jun 6
> 14:47:08 2012
> @@ -24,12 +24,8 @@
> /// SPUHazardRecognizer
> class SPUHazardRecognizer : public ScheduleHazardRecognizer
> {
> -private:
> - const TargetInstrInfo &TII;
> - int EvenOdd;
> -
> public:
> - SPUHazardRecognizer(const TargetInstrInfo &TII);
> + SPUHazardRecognizer(const TargetInstrInfo &/*TII*/) {}
> virtual HazardType getHazardType(SUnit *SU, int Stalls);
> virtual void EmitInstruction(SUnit *SU);
> virtual void AdvanceCycle();
>
> Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h (original)
> +++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h Wed Jun 6 14:47:08
> 2012
> @@ -86,7 +86,6 @@
> class SPUTargetLowering :
> public TargetLowering
> {
> - int VarArgsFrameIndex; // FrameIndex for start of varargs
> area.
> SPUTargetMachine &SPUTM;
>
> public:
>
> Modified: llvm/trunk/lib/Target/NVPTX/NVPTXRegisterInfo.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXRegisterInfo.cpp?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/NVPTX/NVPTXRegisterInfo.cpp (original)
> +++ llvm/trunk/lib/Target/NVPTX/NVPTXRegisterInfo.cpp Wed Jun 6 14:47:08
> 2012
> @@ -250,12 +250,8 @@
>
> NVPTXRegisterInfo::NVPTXRegisterInfo(const TargetInstrInfo &tii,
> const NVPTXSubtarget &st)
> -: NVPTXGenRegisterInfo(0),
> - TII(tii),
> - ST(st) {
> - Is64Bit = st.is64Bit();
> -}
> -
> + : NVPTXGenRegisterInfo(0),
> + Is64Bit(st.is64Bit()) {}
>
> #define GET_REGINFO_TARGET_DESC
> #include "NVPTXGenRegisterInfo.inc"
>
> Modified: llvm/trunk/lib/Target/NVPTX/NVPTXRegisterInfo.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXRegisterInfo.h?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/NVPTX/NVPTXRegisterInfo.h (original)
> +++ llvm/trunk/lib/Target/NVPTX/NVPTXRegisterInfo.h Wed Jun 6 14:47:08
> 2012
> @@ -31,8 +31,6 @@
>
> class NVPTXRegisterInfo : public NVPTXGenRegisterInfo {
> private:
> - const TargetInstrInfo &TII;
> - const NVPTXSubtarget &ST;
> bool Is64Bit;
> // Hold Strings that can be free'd all together with NVPTXRegisterInfo
> ManagedStringPool ManagedStrPool;
>
> Modified: llvm/trunk/lib/Target/Sparc/SparcFrameLowering.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcFrameLowering.h?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/Sparc/SparcFrameLowering.h (original)
> +++ llvm/trunk/lib/Target/Sparc/SparcFrameLowering.h Wed Jun 6 14:47:08
> 2012
> @@ -22,10 +22,9 @@
> class SparcSubtarget;
>
> class SparcFrameLowering : public TargetFrameLowering {
> - const SparcSubtarget &STI;
> public:
> - explicit SparcFrameLowering(const SparcSubtarget &sti)
> - : TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 8, 0),
> STI(sti) {
> + explicit SparcFrameLowering(const SparcSubtarget &/*sti*/)
> + : TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 8, 0) {
> }
>
> /// emitProlog/emitEpilog - These methods insert prolog and epilog code
> into
>
> Modified: llvm/trunk/lib/Target/XCore/XCoreFrameLowering.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreFrameLowering.cpp?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/XCore/XCoreFrameLowering.cpp (original)
> +++ llvm/trunk/lib/Target/XCore/XCoreFrameLowering.cpp Wed Jun 6 14:47:08
> 2012
> @@ -78,8 +78,7 @@
>
> //===----------------------------------------------------------------------===//
>
> XCoreFrameLowering::XCoreFrameLowering(const XCoreSubtarget &sti)
> - : TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 4, 0),
> - STI(sti) {
> + : TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 4, 0) {
> // Do nothing
> }
>
>
> Modified: llvm/trunk/lib/Target/XCore/XCoreFrameLowering.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreFrameLowering.h?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/XCore/XCoreFrameLowering.h (original)
> +++ llvm/trunk/lib/Target/XCore/XCoreFrameLowering.h Wed Jun 6 14:47:08
> 2012
> @@ -22,7 +22,6 @@
> class XCoreSubtarget;
>
> class XCoreFrameLowering: public TargetFrameLowering {
> - const XCoreSubtarget &STI;
> public:
> XCoreFrameLowering(const XCoreSubtarget &STI);
>
>
> Modified: llvm/trunk/tools/llvm-prof/llvm-prof.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-prof/llvm-prof.cpp?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/tools/llvm-prof/llvm-prof.cpp (original)
> +++ llvm/trunk/tools/llvm-prof/llvm-prof.cpp Wed Jun 6 14:47:08 2012
> @@ -281,7 +281,7 @@
> // using the standard profile info provider pass, but for now this gives
> us
> // access to additional information not exposed via the ProfileInfo
> // interface.
> - ProfileInfoLoader PIL(argv[0], ProfileDataFile, *M);
> + ProfileInfoLoader PIL(argv[0], ProfileDataFile);
>
> // Run the printer pass.
> PassManager PassMgr;
>
> Modified: llvm/trunk/unittests/Support/TypeBuilderTest.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TypeBuilderTest.cpp?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/unittests/Support/TypeBuilderTest.cpp (original)
> +++ llvm/trunk/unittests/Support/TypeBuilderTest.cpp Wed Jun 6 14:47:08
> 2012
> @@ -167,13 +167,13 @@
> &(TypeBuilder<types::i<1>,
> true>::get(context2))->getContext());
> }
>
> -class MyType {
> +struct MyType {
> int a;
> int *b;
> void *array[1];
> };
>
> -class MyPortableType {
> +struct MyPortableType {
> int32_t a;
> int32_t *b;
> void *array[1];
>
> Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.h?rev=158096&r1=158095&r2=158096&view=diff
>
> ==============================================================================
> --- llvm/trunk/utils/TableGen/DAGISelEmitter.h (original)
> +++ llvm/trunk/utils/TableGen/DAGISelEmitter.h Wed Jun 6 14:47:08 2012
> @@ -23,10 +23,9 @@
> /// and emission of the instruction selector.
> ///
> class DAGISelEmitter : public TableGenBackend {
> - RecordKeeper &Records;
> CodeGenDAGPatterns CGP;
> public:
> - explicit DAGISelEmitter(RecordKeeper &R) : Records(R), CGP(R) {}
> + explicit DAGISelEmitter(RecordKeeper &R) : CGP(R) {}
>
> // run - Output the isel, returning true on failure.
> void run(raw_ostream &OS);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
--
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120606/bce67db5/attachment.html>
More information about the llvm-commits
mailing list